Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7971537 authored by Edgar Wang's avatar Edgar Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix "Factory Reset" fails to reset the device" into tm-dev

parents 8bd66478 f8739eda
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.oemlock.OemLockManager;
@@ -67,6 +68,8 @@ import com.google.android.setupdesign.GlifLayout;
public class MainClearConfirm extends InstrumentedFragment {
    private static final String TAG = "MainClearConfirm";

    private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";

    @VisibleForTesting View mContentView;
    private boolean mEraseSdCard;
    @VisibleForTesting boolean mEraseEsims;
@@ -83,6 +86,11 @@ public class MainClearConfirm extends InstrumentedFragment {
                return;
            }

            // pre-flight check hardware support PersistentDataBlockManager
            if (SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("")) {
                return;
            }

            final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
                    getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);