Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d9ad30b authored by Stanley Wang's avatar Stanley Wang
Browse files

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
parent 594a5c71
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -86,6 +86,12 @@ public class MockLocationAppPreferenceController extends DeveloperOptionsPrefere
        return true;
    }

    @Override
    public void onDeveloperOptionsDisabled() {
        super.onDeveloperOptionsDisabled();
        removeAllMockLocations();
    }

    private void updateMockLocation() {
        final String mockLocationApp = getCurrentMockLocationApp();