summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/MasterClearConfirm.java
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2014-09-08 13:14:00 -0700
committerAndres Morales <anmorales@google.com>2014-09-08 13:14:00 -0700
commite6bf2a5609b9aabbd790c3c3680172f4b50a3f8e (patch)
treee2e9bd6c9ef45ec3159e39b71e6e5abdc1e900d9 /src/com/android/settings/MasterClearConfirm.java
parent1f389c1996d754142c52c947105af4ec2db84f5c (diff)
downloadpackages_apps_Settings-e6bf2a5609b9aabbd790c3c3680172f4b50a3f8e.zip
packages_apps_Settings-e6bf2a5609b9aabbd790c3c3680172f4b50a3f8e.tar.gz
packages_apps_Settings-e6bf2a5609b9aabbd790c3c3680172f4b50a3f8e.tar.bz2
Fix issue where can't FR Volantis if OEM unlock is enabled
Bug: 17426800 Change-Id: I02340d1ec4b80d9e3b05d35d36653c6ff4ff3232
Diffstat (limited to 'src/com/android/settings/MasterClearConfirm.java')
-rw-r--r--src/com/android/settings/MasterClearConfirm.java46
1 files changed, 22 insertions, 24 deletions
diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java
index 0455d74..40c2324 100644
--- a/src/com/android/settings/MasterClearConfirm.java
+++ b/src/com/android/settings/MasterClearConfirm.java
@@ -62,31 +62,29 @@ public class MasterClearConfirm extends Fragment {
final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
- if (pdbManager != null) {
+ if (pdbManager != null && !pdbManager.getOemUnlockEnabled()) {
// if OEM unlock is enabled, this will be wiped during FR process.
- if (!pdbManager.getOemUnlockEnabled()) {
- final ProgressDialog progressDialog = getProgressDialog();
- progressDialog.show();
-
- // need to prevent orientation changes as we're about to go into
- // a long IO request, so we won't be able to access inflate resources on flash
- final int oldOrientation = getActivity().getRequestedOrientation();
- getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LOCKED);
- new AsyncTask<Void, Void, Void>() {
- @Override
- protected Void doInBackground(Void... params) {
- pdbManager.wipe();
- return null;
- }
-
- @Override
- protected void onPostExecute(Void aVoid) {
- progressDialog.hide();
- getActivity().setRequestedOrientation(oldOrientation);
- doMasterClear();
- }
- }.execute();
- }
+ final ProgressDialog progressDialog = getProgressDialog();
+ progressDialog.show();
+
+ // need to prevent orientation changes as we're about to go into
+ // a long IO request, so we won't be able to access inflate resources on flash
+ final int oldOrientation = getActivity().getRequestedOrientation();
+ getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LOCKED);
+ new AsyncTask<Void, Void, Void>() {
+ @Override
+ protected Void doInBackground(Void... params) {
+ pdbManager.wipe();
+ return null;
+ }
+
+ @Override
+ protected void onPostExecute(Void aVoid) {
+ progressDialog.hide();
+ getActivity().setRequestedOrientation(oldOrientation);
+ doMasterClear();
+ }
+ }.execute();
} else {
doMasterClear();
}