summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/deviceinfo
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-05-14 20:51:05 -0700
committerJeff Sharkey <jsharkey@android.com>2012-05-14 20:53:11 -0700
commitcaf15613c29870850da952e51aaebb8b84867c49 (patch)
treec17a8e5423921ec4b4fc138db9600e06f921649c /src/com/android/settings/deviceinfo
parente5050b1be72c5552bfc9c734d5a0e89f215bed62 (diff)
downloadpackages_apps_Settings-caf15613c29870850da952e51aaebb8b84867c49.tar.gz
packages_apps_Settings-caf15613c29870850da952e51aaebb8b84867c49.tar.bz2
packages_apps_Settings-caf15613c29870850da952e51aaebb8b84867c49.zip
Enforce READ_EXTERNAL in Developer Options.
Move from Storage to Developer Options, and add interstitial dialog with more details. Bug: 6461446 Change-Id: I6d3d8fdc61a3e920ed58ab4d726949ac3c31feab
Diffstat (limited to 'src/com/android/settings/deviceinfo')
-rw-r--r--src/com/android/settings/deviceinfo/Memory.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java
index b9ea432a1..cb344bf23 100644
--- a/src/com/android/settings/deviceinfo/Memory.java
+++ b/src/com/android/settings/deviceinfo/Memory.java
@@ -16,9 +16,6 @@
package com.android.settings.deviceinfo;
-import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
-
-import android.app.ActivityThread;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
@@ -26,7 +23,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.pm.IPackageManager;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Environment;
@@ -68,7 +64,6 @@ public class Memory extends SettingsPreferenceFragment {
private IMountService mMountService = null;
private StorageManager mStorageManager = null;
- private IPackageManager mPackageService;
private StorageVolumePreferenceCategory mInternalStorageVolumePreferenceCategory;
private StorageVolumePreferenceCategory[] mStorageVolumePreferenceCategories;
@@ -82,8 +77,6 @@ public class Memory extends SettingsPreferenceFragment {
mStorageManager.registerListener(mStorageListener);
}
- mPackageService = ActivityThread.getPackageManager();
-
addPreferencesFromResource(R.xml.device_info_memory);
mResources = getResources();
@@ -178,16 +171,6 @@ public class Memory extends SettingsPreferenceFragment {
public void onPrepareOptionsMenu(Menu menu) {
final MenuItem usb = menu.findItem(R.id.storage_usb);
usb.setVisible(!isMassStorageEnabled());
-
- final boolean enforced;
- try {
- enforced = mPackageService.isPermissionEnforced(READ_EXTERNAL_STORAGE);
- } catch (RemoteException e) {
- throw new RuntimeException("Problem talking with PackageManager", e);
- }
-
- final MenuItem enforceReadExternal = menu.findItem(R.id.storage_enforce_read_external);
- enforceReadExternal.setChecked(enforced);
}
@Override
@@ -204,18 +187,6 @@ public class Memory extends SettingsPreferenceFragment {
startFragment(this, UsbSettings.class.getCanonicalName(), -1, null);
}
return true;
- case R.id.storage_enforce_read_external: {
- final boolean checked = !item.isChecked();
- item.setChecked(checked);
-
- try {
- // TODO: offload to background thread
- mPackageService.setPermissionEnforced(READ_EXTERNAL_STORAGE, checked);
- } catch (RemoteException e) {
- throw new RuntimeException("Problem talking with PackageManager", e);
- }
- return true;
- }
}
return super.onOptionsItemSelected(item);
}