Fix FaceSettings UI problem
Update the visibility of button in onStart to avoid missing check state if Fragment & Activity were restarted Bug: 269553342 Test: 1. enroll face 2. go to settings > Security privacy > device lock > face & fingerprint unlock 3. Eenter screen lock 4. Click face unlock > delete face model 5.re-enroll face 6.check the UI of face unlock detailed page Change-Id: I152467afe2cc90932a53fe73b541e97b5b742831
This commit is contained in:
@@ -203,7 +203,11 @@ public class FaceSettings extends DashboardFragment {
|
|||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
mToken = savedInstanceState.getByteArray(KEY_TOKEN);
|
mToken = savedInstanceState.getByteArray(KEY_TOKEN);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
final boolean hasEnrolled = mFaceManager.hasEnrolledTemplates(mUserId);
|
final boolean hasEnrolled = mFaceManager.hasEnrolledTemplates(mUserId);
|
||||||
mEnrollButton.setVisible(!hasEnrolled);
|
mEnrollButton.setVisible(!hasEnrolled);
|
||||||
mRemoveButton.setVisible(hasEnrolled);
|
mRemoveButton.setVisible(hasEnrolled);
|
||||||
|
Reference in New Issue
Block a user