diff options
author | Ryo Hashimoto <hashimoto@google.com> | 2015-04-09 10:26:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-09 10:26:54 +0000 |
commit | fa54606dc75fdb2c038fdcc5b5b6b62c06389cc4 (patch) | |
tree | 13c13394fbc4f7ca33b3f20166ef598782427b30 | |
parent | c2ab9341179c876b782c45d3d69897f9fd5fab80 (diff) | |
parent | 5213531f30c5db6a799a98452c97a079e3ed4d7c (diff) | |
download | packages_apps_Settings-fa54606dc75fdb2c038fdcc5b5b6b62c06389cc4.zip packages_apps_Settings-fa54606dc75fdb2c038fdcc5b5b6b62c06389cc4.tar.gz packages_apps_Settings-fa54606dc75fdb2c038fdcc5b5b6b62c06389cc4.tar.bz2 |
Merge "Enable BugreportStorageProvider when bug report is enabled"
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index e0091e1..5fafc92 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -24,6 +24,7 @@ import android.app.admin.DevicePolicyManager; import android.app.backup.IBackupManager; import android.bluetooth.BluetoothAdapter; import android.content.BroadcastReceiver; +import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; @@ -751,6 +752,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } private void updateBugreportOptions() { + final ComponentName bugreportStorageProviderComponentName = + new ComponentName("com.android.shell", + "com.android.shell.BugreportStorageProvider"); if ("user".equals(Build.TYPE)) { final ContentResolver resolver = getActivity().getContentResolver(); final boolean adbEnabled = Settings.Global.getInt( @@ -758,14 +762,23 @@ public class DevelopmentSettings extends SettingsPreferenceFragment if (adbEnabled) { mBugreport.setEnabled(true); mBugreportInPower.setEnabled(true); + getPackageManager().setComponentEnabledSetting( + bugreportStorageProviderComponentName, + PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0); } else { mBugreport.setEnabled(false); mBugreportInPower.setEnabled(false); mBugreportInPower.setChecked(false); Settings.Secure.putInt(resolver, Settings.Secure.BUGREPORT_IN_POWER_MENU, 0); + getPackageManager().setComponentEnabledSetting( + bugreportStorageProviderComponentName, + PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0); } } else { mBugreportInPower.setEnabled(true); + getPackageManager().setComponentEnabledSetting( + bugreportStorageProviderComponentName, + PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0); } } |