OSDN Git Service

Change permissions checks for setAirplaneMode.
authorLorenzo Colitti <lorenzo@google.com>
Tue, 9 Oct 2018 09:55:11 +0000 (18:55 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Fri, 12 Oct 2018 07:35:46 +0000 (16:35 +0900)
commitf5845d14e1b32a1a7cf39a6fe3a6982931715283
tree0c137c92c78716db35fbe6d43829aaeb30484d70
parent85eca488e562275de3f5395fb5ad58d3bd8218bd
Change permissions checks for setAirplaneMode.

Require NETWORK_SETTINGS (or NETWORK_SETUP_WIZARD) instead of the
legacy CONNECTIVITY_INTERNAL permission. The users are as follows:

- The system callers (Phone, Settings, SystemUI, VrSettings) all
  have NETWORK_SETTINGS.
- SetupWizard has NETWORK_SETUP_WIZARD
- sl4a has NETWORK_STACK

Bug: 115302596
Test: builds, boots, airplane mode via SystemUI works
Change-Id: I8ca40182bd8b5e3fd9a82296c0cc28de30ed4baf
core/java/android/net/ConnectivityManager.java
services/core/java/com/android/server/ConnectivityService.java