Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a9fb1e7 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Support disabled by default adjustment types" into main

parents ece1572f 859bbfcb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7323,4 +7323,8 @@

    <!-- Whether the device supports Wi-Fi USD feature. -->
    <bool name="config_deviceSupportsWifiUsd">false</bool>

    <!-- Array containing the notification assistant service adjustments that are not supported by
     default on this device-->
    <string-array translatable="false" name="config_notificationDefaultUnsupportedAdjustments" />
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -5842,4 +5842,6 @@
  <!-- Whether the device supports Wi-Fi USD feature. -->
  <java-symbol type="bool" name="config_deviceSupportsWifiUsd" />

  <java-symbol type="array" name="config_notificationDefaultUnsupportedAdjustments" />

</resources>
+7 −0
Original line number Diff line number Diff line
@@ -762,6 +762,7 @@ public class NotificationManagerService extends SystemService {
    private int mWarnRemoteViewsSizeBytes;
    private int mStripRemoteViewsSizeBytes;
    private String[] mDefaultUnsupportedAdjustments;
    @VisibleForTesting
    protected boolean mShowReviewPermissionsNotification;
@@ -2938,6 +2939,9 @@ public class NotificationManagerService extends SystemService {
        mShowReviewPermissionsNotification = getContext().getResources().getBoolean(
                R.bool.config_notificationReviewPermissions);
        mDefaultUnsupportedAdjustments = getContext().getResources().getStringArray(
                R.array.config_notificationDefaultUnsupportedAdjustments);
        init(handler, new RankingHandlerWorker(mRankingThread.getLooper()),
                AppGlobals.getPackageManager(), getContext().getPackageManager(),
                getLocalService(LightsManager.class),
@@ -11990,6 +11994,9 @@ public class NotificationManagerService extends SystemService {
                }
            } else {
                mAllowedAdjustmentKeyTypes.addAll(List.of(DEFAULT_ALLOWED_ADJUSTMENT_KEY_TYPES));
                if (mDefaultUnsupportedAdjustments != null) {
                    mAllowedAdjustments.removeAll(List.of(mDefaultUnsupportedAdjustments));
                }
            }
        }