Merge "Hide screen lock options button in confirm lock" into oc-dr1-dev
This commit is contained in:
@@ -202,7 +202,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
private SaveAndFinishWorker mSaveAndFinishWorker;
|
private SaveAndFinishWorker mSaveAndFinishWorker;
|
||||||
private int mRequestedQuality = DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
|
private int mRequestedQuality = DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
|
||||||
private ChooseLockSettingsHelper mChooseLockSettingsHelper;
|
private ChooseLockSettingsHelper mChooseLockSettingsHelper;
|
||||||
private Stage mUiStage = Stage.Introduction;
|
protected Stage mUiStage = Stage.Introduction;
|
||||||
private PasswordRequirementAdapter mPasswordRequirementAdapter;
|
private PasswordRequirementAdapter mPasswordRequirementAdapter;
|
||||||
private GlifLayout mLayout;
|
private GlifLayout mLayout;
|
||||||
protected boolean mForFingerprint;
|
protected boolean mForFingerprint;
|
||||||
@@ -820,7 +820,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
/**
|
/**
|
||||||
* Update the hint based on current Stage and length of password entry
|
* Update the hint based on current Stage and length of password entry
|
||||||
*/
|
*/
|
||||||
private void updateUi() {
|
protected void updateUi() {
|
||||||
final boolean canInput = mSaveAndFinishWorker == null;
|
final boolean canInput = mSaveAndFinishWorker == null;
|
||||||
String password = mPasswordEntry.getText().toString();
|
String password = mPasswordEntry.getText().toString();
|
||||||
final int length = password.length();
|
final int length = password.length();
|
||||||
|
@@ -21,6 +21,7 @@ import android.app.Fragment;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -73,6 +74,9 @@ public class SetupChooseLockPassword extends ChooseLockPassword {
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static final int REQUEST_SCREEN_LOCK_OPTIONS = 1;
|
static final int REQUEST_SCREEN_LOCK_OPTIONS = 1;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private Button mOptionsButton;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
@@ -86,9 +90,9 @@ public class SetupChooseLockPassword extends ChooseLockPassword {
|
|||||||
boolean showOptionsButton = getActivity().getIntent().getBooleanExtra(
|
boolean showOptionsButton = getActivity().getIntent().getBooleanExtra(
|
||||||
ChooseLockGenericFragment.EXTRA_SHOW_OPTIONS_BUTTON, false);
|
ChooseLockGenericFragment.EXTRA_SHOW_OPTIONS_BUTTON, false);
|
||||||
if (showOptionsButton) {
|
if (showOptionsButton) {
|
||||||
Button optionsButton = view.findViewById(R.id.screen_lock_options);
|
mOptionsButton = view.findViewById(R.id.screen_lock_options);
|
||||||
optionsButton.setVisibility(View.VISIBLE);
|
mOptionsButton.setVisibility(View.VISIBLE);
|
||||||
optionsButton.setOnClickListener(this);
|
mOptionsButton.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,5 +172,14 @@ public class SetupChooseLockPassword extends ChooseLockPassword {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateUi() {
|
||||||
|
super.updateUi();
|
||||||
|
if (mOptionsButton != null) {
|
||||||
|
mOptionsButton.setVisibility(
|
||||||
|
mUiStage == Stage.Introduction ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user