summaryrefslogtreecommitdiff
path: root/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
diff options
context:
space:
mode:
authorSergii Piatakov <sergii.piatakov@globallogic.com>2020-06-15 15:42:11 +0300
committerSergii Piatakov <sergii.piatakov@globallogic.com>2020-09-15 08:47:04 +0300
commit302822b2dd5b39c7765ebabec64943b2278fd006 (patch)
treee86c8e5d8ce4b388c9018b7a83a5191a7c0810ae /tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
parent0a2c4f34c900f6685ffc17173237063e25ab8e6b (diff)
fix broadcast receivers overflow for system_server
Every time when user is switched the `UsbSettingsManager` creates a new instance of settings object for the new user. It leads to creating several receivers and subscribing to some broadcast messages. Then system is switched on other user, settings for the old user are removed from the internal container, but receivers are not unsubscribed. As a result, the number of receivers for the `system_server` process is continuously increased and may exceed the allowed limit. It is proposed to explicitly unscribe receivers before remove settings. Test: flash a DUT with user build and then run: > run cts -m CtsDevicePolicyManagerTestCases at least two times, check that DUT is not in the recovery mode; or switch user ~1000 times: $ adb shell am switch-user 0 $ adb shell am switch-user 10 and check that logcat doesn't contain a line: E SystemServiceManager: java.lang.IllegalStateException: \ Too many receivers, total of 1000, registered Change-Id: I4bb9feb408ce7c321a56d0e573c45c8794ed6860 Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
Diffstat (limited to 'tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java')
0 files changed, 0 insertions, 0 deletions