5232658de2e83b9ecb218ed355f338311a980442
Bug: 154869719 Test: atest TetheringTests Original-Change: https://android-review.googlesource.com/1288503 Fix TetheringServiceTest test WRITE_SETTINGS permission failure AdoptShellPermissionIdentity can not pass permission check by Settings#checkAndNoteWriteSettingsOperation. It would compare the caller uid and its package name. See error below: 1. java.lang.SecurityException: Specified package com.android.shell under uid 10239 but it is really 2000 2. java.lang.SecurityException: uid 10245 does not have android.permission.UPDATE_APP_OPS_STATS. Override the method and test if caller hold WRITE_SETTINGS directly. Bug: 154869719 Test: TetheringTests, TetheringCoverageTests, NetworkStackNextTests, NetworkStackCoverageTests Original-Change: https://android-review.googlesource.com/1313806 Change-Id: I7beea3f011d930e433443ed62d772a3f8cce5d78 Merged-In: I7beea3f011d930e433443ed62d772a3f8cce5d78
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%