Merge "Update UI for Flash notifications" into main

This commit is contained in:
Angela Wang
2024-08-07 07:11:40 +00:00
committed by Android (Google) Code Review
4 changed files with 28 additions and 20 deletions

View File

@@ -110,7 +110,7 @@ public class FlashNotificationsPreviewPreferenceController extends
if (preference == null) {
return;
}
preference.setEnabled(FlashNotificationsUtil.getFlashNotificationsState(mContext)
preference.setVisible(FlashNotificationsUtil.getFlashNotificationsState(mContext)
!= FlashNotificationsUtil.State.OFF);
}
}

View File

@@ -65,8 +65,7 @@ public class ScreenFlashNotificationColorDialogFragment extends DialogFragment i
final ScreenFlashNotificationColorDialogFragment result =
new ScreenFlashNotificationColorDialogFragment();
result.mCurrentColor = initialColor;
result.mConsumer = colorConsumer != null ? colorConsumer : i -> {
};
result.mConsumer = colorConsumer != null ? colorConsumer : i -> {};
return result;
}
@@ -89,7 +88,7 @@ public class ScreenFlashNotificationColorDialogFragment extends DialogFragment i
.setNeutralButton(R.string.flash_notifications_preview, null)
.setNegativeButton(R.string.color_selector_dialog_cancel, (dialog, which) -> {
})
.setPositiveButton(R.string.color_selector_dialog_done, (dialog, which) -> {
.setPositiveButton(R.string.color_selector_dialog_save, (dialog, which) -> {
mCurrentColor = colorSelectorLayout.getCheckedColor(DEFAULT_SCREEN_FLASH_COLOR);
mConsumer.accept(mCurrentColor);
})