diff options
| -rw-r--r-- | core/java/com/android/internal/widget/NotificationCloseButton.java | 5 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 3 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/core/java/com/android/internal/widget/NotificationCloseButton.java b/core/java/com/android/internal/widget/NotificationCloseButton.java index 22be87b2b1ed..bce266d71e43 100644 --- a/core/java/com/android/internal/widget/NotificationCloseButton.java +++ b/core/java/com/android/internal/widget/NotificationCloseButton.java @@ -20,8 +20,10 @@ import android.annotation.ColorInt; import android.annotation.Nullable; import android.content.Context; import android.content.res.ColorStateList; +import android.content.res.Resources; import android.util.AttributeSet; import android.view.RemotableViewMethod; +import android.view.View; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.Button; import android.widget.ImageView; @@ -60,6 +62,9 @@ public class NotificationCloseButton extends ImageView { protected void onFinishInflate() { super.onFinishInflate(); setContentDescription(mContext.getText(R.string.close_button_text)); + boolean notificationCloseButtonSupported = Resources.getSystem().getBoolean( + com.android.internal.R.bool.config_notificationCloseButtonSupported); + this.setVisibility(notificationCloseButtonSupported ? View.VISIBLE : View.GONE); } @Override diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index f43351a2e456..3ac07a387edb 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -7077,6 +7077,9 @@ <!-- Whether the system uses auto-suspend mode. --> <bool name="config_useAutoSuspend">true</bool> + <!-- Whether close/dismiss buttons are supported on notifications. --> + <bool name="config_notificationCloseButtonSupported">false</bool> + <!-- Whether to show GAIA education screen during account login of private space setup. OEM/Partner can explicitly opt to disable the screen. --> <bool name="config_enableGaiaEducationInPrivateSpace">true</bool> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 070f6c48ef14..242d33869779 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -521,6 +521,7 @@ <java-symbol type="bool" name="config_preferKeepClearForFocus" /> <java-symbol type="bool" name="config_hibernationDeletesOatArtifactsEnabled"/> <java-symbol type="integer" name="config_defaultAnalogClockSecondsHandFps"/> + <java-symbol type="bool" name="config_notificationCloseButtonSupported"/> <java-symbol type="bool" name="config_enableGaiaEducationInPrivateSpace"/> <java-symbol type="color" name="tab_indicator_text_v4" /> |