commit | 0d9ad30b058c165882fc098aa0c0a80cd6f6b6ec | [log] [tgz] |
---|---|---|
author | Stanley Wang <stanleytfwang@google.com> | Tue Mar 03 11:29:37 2020 +0800 |
committer | Stanley Wang <stanleytfwang@google.com> | Tue Mar 03 14:12:05 2020 +0800 |
tree | 9d04b90014d021e96336da37f22da8ea4cfc5f73 | |
parent | 594a5c71f56bb850fbc0a0a1e92809a73c3f9a16 [diff] |
Fix security issue for using mock location without permission. Remove mock location apps if developer option is disabled. Bugs: 145136060 Test: manual Change-Id: I7ecf0bdbfc49674b350cdfe81fe1a626da5ef3ca
diff --git a/src/com/android/settings/development/MockLocationAppPreferenceController.java b/src/com/android/settings/development/MockLocationAppPreferenceController.java index 45d6be8..addc79b 100644 --- a/src/com/android/settings/development/MockLocationAppPreferenceController.java +++ b/src/com/android/settings/development/MockLocationAppPreferenceController.java
@@ -86,6 +86,12 @@ return true; } + @Override + public void onDeveloperOptionsDisabled() { + super.onDeveloperOptionsDisabled(); + removeAllMockLocations(); + } + private void updateMockLocation() { final String mockLocationApp = getCurrentMockLocationApp();