summaryrefslogtreecommitdiff
path: root/startop/scripts/lib/cmd_utils.py
diff options
context:
space:
mode:
authorYe Jiao <ye.jiao@mediatek.com>2019-01-28 12:54:22 +0800
committerIris Chang <iris.chang@mediatek.com>2019-03-29 07:25:57 +0000
commit21f962585d4d1cd218b4d29bc5b436f13e48a265 (patch)
treedd624e747ba56437775ce7e733533005baa8dada /startop/scripts/lib/cmd_utils.py
parent09e3d8c3eb7869df54e692ed8588e05ec445964b (diff)
Fix getWifiManager exception if phone is encrypted
[Issue Details] NetworkPolicyManagerService may invoke dispatchRestrictBackgroundChanged after reboot if settings changed, and invokes untetherAll in turn, which triggers ServiceNotFoundException indirectly if the device is under encryption. The cause is that WifiService is not running if the device is still locked. [Solution] In order to avoid ServiceNotFoundException in setWifiTethering, we add check on return value of getWifiManager. Moreover, check of UsbManager is also added to prevent potential similar issues of USB tethering. Bug: 123504004 Test: FrameworksNetTests adb shell am instrument -w com.android.frameworks.tests.net Test: CTS - CtsNetTestCases ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m CtsNetTestCases Test: CTS - CtsNetTestCasesLegacyApi22 ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m CtsNetTestCasesLegacyApi22 Test: CTS - CtsNetTestCasesLegacyPermission22 ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m CtsNetTestCasesLegacyPermission22 Change-Id: I2643188b51900f97ba58c8614c66cb55ebfaa2f6
Diffstat (limited to 'startop/scripts/lib/cmd_utils.py')
0 files changed, 0 insertions, 0 deletions