[automerger] DO NOT MERGE Disable changing lock when device is not provisioned. am: c624deaff5
am: c056ac3011
am: 782fc16dc4
am: aaa67659a6
Change-Id: I9c1ba2599a78d6518531a2bff2b899eecb3b6554
This commit is contained in:
@@ -140,6 +140,11 @@ public class ChooseLockGeneric extends SettingsActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
final Activity activity = getActivity();
|
||||||
|
if (!Utils.isDeviceProvisioned(activity) && !canRunBeforeDeviceProvisioned()) {
|
||||||
|
activity.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String chooseLockAction = getActivity().getIntent().getAction();
|
String chooseLockAction = getActivity().getIntent().getAction();
|
||||||
mFingerprintManager =
|
mFingerprintManager =
|
||||||
@@ -217,6 +222,10 @@ public class ChooseLockGeneric extends SettingsActivity {
|
|||||||
addHeaderView();
|
addHeaderView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean canRunBeforeDeviceProvisioned() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected void addHeaderView() {
|
protected void addHeaderView() {
|
||||||
if (mForFingerprint) {
|
if (mForFingerprint) {
|
||||||
setHeaderView(R.layout.choose_lock_generic_fingerprint_header);
|
setHeaderView(R.layout.choose_lock_generic_fingerprint_header);
|
||||||
|
@@ -626,7 +626,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
|||||||
// No UP affordance if we are displaying the main Dashboard
|
// No UP affordance if we are displaying the main Dashboard
|
||||||
mDisplayHomeAsUpEnabled = false;
|
mDisplayHomeAsUpEnabled = false;
|
||||||
// Show Search affordance
|
// Show Search affordance
|
||||||
mDisplaySearch = true;
|
mDisplaySearch = Utils.isDeviceProvisioned(this);
|
||||||
mInitialTitleResId = R.string.dashboard_title;
|
mInitialTitleResId = R.string.dashboard_title;
|
||||||
|
|
||||||
// add argument to indicate which settings tab should be initially selected
|
// add argument to indicate which settings tab should be initially selected
|
||||||
|
@@ -138,6 +138,11 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
|
|||||||
return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
|
return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canRunBeforeDeviceProvisioned() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Disables preferences that are less secure than required quality and shows only secure
|
* Disables preferences that are less secure than required quality and shows only secure
|
||||||
* screen lock options here.
|
* screen lock options here.
|
||||||
|
Reference in New Issue
Block a user