Disable toolbar title of screen lock pages
After applying collapsing toolbar in the Settings app, the toolbar title will be shown in every subsetting pages. However some pages in the security category don't need the title, like set screen lock page and lock screen page. This CL is to disable these titles through overriding isToolbarEnabled method. Bug: 176883575 Test: manual test and visual verified 1) Navigate to Settings -> Security -> Screen lock -> Pattern/PIN/Password 2) Observe and check if there is a duplicated title. Change-Id: I6dfa4fbe1b5e2ac3582804ba1e125196f3bdba6c
This commit is contained in:
@@ -77,6 +77,11 @@ public class RedactionInterstitial extends SettingsActivity {
|
||||
findViewById(R.id.content_parent).setFitsSystemWindows(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isToolbarEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an intent for launching RedactionInterstitial.
|
||||
*
|
||||
|
@@ -184,6 +184,11 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isToolbarEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* package */ Class<? extends Fragment> getFragmentClass() {
|
||||
return ChooseLockPasswordFragment.class;
|
||||
}
|
||||
|
@@ -194,6 +194,11 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isToolbarEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static class ChooseLockPatternFragment extends InstrumentedFragment
|
||||
implements SaveAndFinishWorker.Listener {
|
||||
|
||||
|
@@ -176,6 +176,11 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isToolbarEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void prepareEnterAnimation() {
|
||||
getFragment().prepareEnterAnimation();
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -65,8 +64,7 @@ public class SetupChooseLockPassword extends ChooseLockPassword {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstance) {
|
||||
super.onCreate(savedInstance);
|
||||
LinearLayout layout = (LinearLayout) findViewById(R.id.content_parent);
|
||||
layout.setFitsSystemWindows(false);
|
||||
findViewById(R.id.content_parent).setFitsSystemWindows(false);
|
||||
}
|
||||
|
||||
public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment
|
||||
|
Reference in New Issue
Block a user