commit | 9c69df3b827ea4374b1976c08d43303164c32df1 | [log] [tgz] |
---|---|---|
author | Jeremy Goldman <goldmanj@google.com> | Thu Apr 15 14:30:54 2021 +0800 |
committer | Jeremy Goldman <goldmanj@google.com> | Thu Apr 15 14:33:40 2021 +0800 |
tree | e8f61ea165c6e3a82bd99bf0ab1b5fc3fd9f3cb7 | |
parent | 1812aabcec0b3d87341b2c08ba4f41aa85a998dc [diff] |
Check if the SubscriptionsChangeListener has been started before stop calling mContext.unregisterReceiver on an unregistered broadcast receiver will result in an exception. To make the SubscriptionsChangeListener safe from this kind of error, add a check to see whether start has been called before implementing stop's functionality. Bug: 184662284 Bug: 184521296 Test: atest -c SettingsUnitTests Change-Id: Ie901ac6d89f954749793e95923a4a1b1945b9999