Fix parental control dialog
This CL fixes a bug introduced by ag/19712818: when inflating the parental control dialog, we should use the Quick Settings context (which is always using dark mode) and not the application context. Otherwise, if we are in light mode, then the color of the text is the same as the background and it looks like there is not content in the dialog. In dark mode, everything was looking fine because the text color from the application context would be light. Bug: 260108168 Test: Manual Change-Id: Ibc9d5374d44955493a41b477482d5585546c7eb1
This commit is contained in:
@@ -476,7 +476,7 @@ public class QSSecurityFooterUtils implements DialogInterface.OnClickListener {
|
||||
@VisibleForTesting
|
||||
View createDialogView(Context quickSettingsContext) {
|
||||
if (mSecurityController.isParentalControlsEnabled()) {
|
||||
return createParentalControlsDialogView();
|
||||
return createParentalControlsDialogView(quickSettingsContext);
|
||||
}
|
||||
return createOrganizationDialogView(quickSettingsContext);
|
||||
}
|
||||
@@ -579,8 +579,8 @@ public class QSSecurityFooterUtils implements DialogInterface.OnClickListener {
|
||||
return dialogView;
|
||||
}
|
||||
|
||||
private View createParentalControlsDialogView() {
|
||||
View dialogView = LayoutInflater.from(mContext)
|
||||
private View createParentalControlsDialogView(Context quickSettingsContext) {
|
||||
View dialogView = LayoutInflater.from(quickSettingsContext)
|
||||
.inflate(R.layout.quick_settings_footer_dialog_parental_controls, null, false);
|
||||
|
||||
DeviceAdminInfo info = mSecurityController.getDeviceAdminInfo();
|
||||
|
||||
Reference in New Issue
Block a user