diff options
author | markchien <markchien@google.com> | 2020-05-20 11:44:05 +0800 |
---|---|---|
committer | markchien <markchien@google.com> | 2020-05-20 16:56:33 +0800 |
commit | 85ce1ebd7937aec2da6cb7104e23f8da70df8a3f (patch) | |
tree | a5273d25fa533ed13f3f8315d64d7abfe3f609ac /tools/aapt2/java/AnnotationProcessor.cpp | |
parent | c3076ed3b279cfa806a0e15b441cd76e92f52672 (diff) |
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
Change-Id: I2a60c4d66ef30028f9663159f85464ea815248e2
Diffstat (limited to 'tools/aapt2/java/AnnotationProcessor.cpp')
0 files changed, 0 insertions, 0 deletions