summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/applications/AdvancedAppSettings.java
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-05-16 22:59:38 -0700
committerSvet Ganov <svetoslavganov@google.com>2015-05-16 22:59:41 -0700
commit67e067fff4e4ef1eb54f9c238dbf07312434a07e (patch)
tree095ea665c3482ca42887b1135e09d155a3a8fd5a /src/com/android/settings/applications/AdvancedAppSettings.java
parent11b29e7613a30610981d56786fd5d2e0b7494aab (diff)
downloadpackages_apps_Settings-67e067fff4e4ef1eb54f9c238dbf07312434a07e.zip
packages_apps_Settings-67e067fff4e4ef1eb54f9c238dbf07312434a07e.tar.gz
packages_apps_Settings-67e067fff4e4ef1eb54f9c238dbf07312434a07e.tar.bz2
Hide platform platform legacy permissions behind a menu option - settings.
bug:21195624 Change-Id: Ib1dcfe2a15685c36e2a59e0921ea74d46ec9738c
Diffstat (limited to 'src/com/android/settings/applications/AdvancedAppSettings.java')
-rw-r--r--src/com/android/settings/applications/AdvancedAppSettings.java34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/com/android/settings/applications/AdvancedAppSettings.java b/src/com/android/settings/applications/AdvancedAppSettings.java
index 268bc5b..0d2f206 100644
--- a/src/com/android/settings/applications/AdvancedAppSettings.java
+++ b/src/com/android/settings/applications/AdvancedAppSettings.java
@@ -15,11 +15,10 @@
*/
package com.android.settings.applications;
-import android.app.Activity;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.preference.Preference;
-import android.util.Log;
import com.android.internal.logging.MetricsLogger;
import com.android.settings.R;
@@ -27,36 +26,34 @@ import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.applications.ApplicationsState.AppEntry;
import com.android.settings.applications.ApplicationsState.Session;
import com.android.settings.fuelgauge.PowerWhitelistBackend;
-import com.android.settingslib.applications.PermissionsInfo;
import java.util.ArrayList;
public class AdvancedAppSettings extends SettingsPreferenceFragment implements
- ApplicationsState.Callbacks, PermissionsInfo.Callback {
+ ApplicationsState.Callbacks {
static final String TAG = "AdvancedAppSettings";
- static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private static final String KEY_APP_PERM = "manage_perms";
private static final String KEY_APP_DOMAIN_URLS = "domain_urls";
private static final String KEY_HIGH_POWER_APPS = "high_power_apps";
- private ApplicationsState mApplicationsState;
private Session mSession;
- private Preference mAppPermsPreference;
private Preference mAppDomainURLsPreference;
private Preference mHighPowerPreference;
- private PermissionsInfo mPermissionsInfo;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.advanced_apps);
- mApplicationsState = ApplicationsState.getInstance(getActivity().getApplication());
- mSession = mApplicationsState.newSession(this);
+ Preference permissions = getPreferenceScreen().findPreference(KEY_APP_PERM);
+ permissions.setIntent(new Intent(Intent.ACTION_MANAGE_PERMISSIONS));
+
+ ApplicationsState applicationsState = ApplicationsState.getInstance(
+ getActivity().getApplication());
+ mSession = applicationsState.newSession(this);
- mAppPermsPreference = findPreference(KEY_APP_PERM);
mAppDomainURLsPreference = findPreference(KEY_APP_DOMAIN_URLS);
mHighPowerPreference = findPreference(KEY_HIGH_POWER_APPS);
updateUI();
@@ -86,12 +83,6 @@ public class AdvancedAppSettings extends SettingsPreferenceFragment implements
}
@Override
- public void onResume() {
- super.onResume();
- mPermissionsInfo = new PermissionsInfo(getActivity(), this);
- }
-
- @Override
public void onRunningStateChanged(boolean running) {
// No-op.
}
@@ -130,13 +121,4 @@ public class AdvancedAppSettings extends SettingsPreferenceFragment implements
public void onLoadEntriesCompleted() {
// No-op.
}
-
- @Override
- public void onPermissionLoadComplete() {
- Activity activity = getActivity();
- if (activity == null) return;
-// mAppPermsPreference.setSummary(activity.getString(R.string.app_permissions_summary,
-// mPermissionsInfo.getRuntimePermAppsGrantedCount(),
-// mPermissionsInfo.getRuntimePermAppsCount()));
- }
}