diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-08-02 18:22:42 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-08-02 19:20:48 -0700 |
commit | a6683e0f4af75005ab5a1742d30df4bee071f725 (patch) | |
tree | 58ac7fec71fe24ed7e58de576bdf129cf2c53d01 /src/com/android/settings/applications/ManageApplications.java | |
parent | 034b83e8668a0b26d1eccfc9fa433b8eae3e50a8 (diff) | |
download | packages_apps_Settings-a6683e0f4af75005ab5a1742d30df4bee071f725.tar.gz packages_apps_Settings-a6683e0f4af75005ab5a1742d30df4bee071f725.tar.bz2 packages_apps_Settings-a6683e0f4af75005ab5a1742d30df4bee071f725.zip |
Reset app preferences now resets all app ops.
Change-Id: I7966245b5f322f55e139b2da661c02cd58530f11
Diffstat (limited to 'src/com/android/settings/applications/ManageApplications.java')
-rw-r--r-- | src/com/android/settings/applications/ManageApplications.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java index 7ec01aa60..d37688c0f 100644 --- a/src/com/android/settings/applications/ManageApplications.java +++ b/src/com/android/settings/applications/ManageApplications.java @@ -22,6 +22,7 @@ import static android.net.NetworkPolicyManager.POLICY_REJECT_METERED_BACKGROUND; import android.app.Activity; import android.app.ActivityManager; import android.app.AlertDialog; +import android.app.AppOpsManager; import android.app.Fragment; import android.app.INotificationManager; import android.content.ComponentName; @@ -1116,10 +1117,12 @@ public class ManageApplications extends Fragment implements if (mResetDialog == dialog) { final PackageManager pm = getActivity().getPackageManager(); final IPackageManager mIPm = IPackageManager.Stub.asInterface( - ServiceManager.getService("package")); + ServiceManager.getService("package")); final INotificationManager nm = INotificationManager.Stub.asInterface( ServiceManager.getService(Context.NOTIFICATION_SERVICE)); final NetworkPolicyManager npm = NetworkPolicyManager.from(getActivity()); + final AppOpsManager aom = (AppOpsManager)getActivity().getSystemService( + Context.APP_OPS_SERVICE); final Handler handler = new Handler(getActivity().getMainLooper()); (new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { @@ -1146,6 +1149,7 @@ public class ManageApplications extends Fragment implements mIPm.resetPreferredActivities(UserHandle.myUserId()); } catch (RemoteException e) { } + aom.resetAllModes(); final int[] restrictedUids = npm.getUidsWithPolicy( POLICY_REJECT_METERED_BACKGROUND); final int currentUserId = ActivityManager.getCurrentUser(); |