Set background of all face enroll status/footer bars
Moves the logic for setting an explicit background on the status and footer bars shown during face and fingerprint enrollment from BiometricEnrollIntroduction to BiometricEnrollBase. This ensures that the status and footer bars on all biometric enroll screens will have their backgrounds set, preventing the screen content from showing through. Test: Manual Fixes: 190138494 Change-Id: If5050d07d277f51c784daecf80d5e3cdeae0ba49
This commit is contained in:
@@ -18,8 +18,6 @@ package com.android.settings.biometrics;
|
||||
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.os.Bundle;
|
||||
@@ -27,17 +25,14 @@ import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.password.ChooseLockGeneric;
|
||||
import com.android.settings.password.ChooseLockSettingsHelper;
|
||||
|
||||
@@ -187,15 +182,6 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
final LinearLayout buttonContainer = mFooterBarMixin.getButtonContainer();
|
||||
if (buttonContainer != null) {
|
||||
buttonContainer.setBackgroundColor(getBackgroundColor());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
@@ -213,12 +199,6 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
getWindow().setStatusBarColor(getBackgroundColor());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
@@ -355,10 +335,4 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
}
|
||||
return mIconColorFilter;
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
private int getBackgroundColor() {
|
||||
final ColorStateList stateList = Utils.getColorAttr(this, android.R.attr.windowBackground);
|
||||
return stateList != null ? stateList.getDefaultColor() : Color.TRANSPARENT;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user