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

Commit fd48a9a9 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13482186 from 9078e990 to 25Q3-release

Change-Id: I1f611a4c39b5e7d0dc5f2176adc7249e66419240
parents acde48fb 9078e990
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1627,7 +1627,6 @@ public class DeviceIdleController extends SystemService
        }

        private void updateConstantsLocked() {
            if (mSmallBatteryDevice) return;
            FLEX_TIME_SHORT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_FLEX_TIME_SHORT, mDefaultFlexTimeShort);

+1 −0
Original line number Diff line number Diff line
@@ -56034,6 +56034,7 @@ package android.view {
    field public static final String PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED = "android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED";
    field public static final String PROPERTY_CAMERA_COMPAT_ALLOW_FORCE_ROTATION = "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_FORCE_ROTATION";
    field public static final String PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH = "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH";
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing_opt_out_api") public static final String PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION = "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION";
    field public static final String PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE = "android.window.PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE";
    field public static final String PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE = "android.window.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE";
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final String PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED = "android.window.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED";
+1 −0
Original line number Diff line number Diff line
@@ -3648,6 +3648,7 @@ package android.companion.virtual.camera {
  }
  public interface VirtualCameraCallback {
    method @FlaggedApi("android.companion.virtualdevice.flags.virtual_camera_on_open") public default void onOpenCamera();
    method public default void onProcessCaptureRequest(int, long);
    method public void onStreamClosed(int);
    method public void onStreamConfigured(int, @NonNull android.view.Surface, @IntRange(from=1) int, @IntRange(from=1) int, int);
+1 −0
Original line number Diff line number Diff line
@@ -1082,6 +1082,7 @@ package android.content.pm {
    field public static final long NEVER_SANDBOX_DISPLAY_APIS = 184838306L; // 0xb0468a2L
    field public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_FORCE_ROTATION = 263959004L; // 0xfbbb1dcL
    field public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_REFRESH = 264304459L; // 0xfc0f74bL
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing_opt_out_api") public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_SIMULATE_REQUESTED_ORIENTATION = 398195815L; // 0x17bbfc67L
    field public static final long OVERRIDE_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE = 264301586L; // 0xfc0ec12L
    field public static final long OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS = 263259275L; // 0xfb1048bL
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final long OVERRIDE_ENABLE_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED = 273509367L; // 0x104d6bf7L
+39 −34
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.text.BidiFormatter;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextUtils;
@@ -3427,6 +3428,39 @@ public class Notification implements Parcelable
        return cs.toString();
    }
    @Nullable
    private static CharSequence stripNonStyleSpans(@Nullable CharSequence text) {
        if (text == null) return null;
        if (text instanceof Spanned) {
            Spanned ss = (Spanned) text;
            Object[] spans = ss.getSpans(0, ss.length(), Object.class);
            SpannableString outString = new SpannableString(ss.toString());
            for (Object span : spans) {
                final Object resultSpan;
                if (span instanceof StyleSpan
                        || span instanceof StrikethroughSpan
                        || span instanceof UnderlineSpan) {
                    resultSpan = span;
                } else if (span instanceof TextAppearanceSpan) {
                    final TextAppearanceSpan originalSpan = (TextAppearanceSpan) span;
                    resultSpan = new TextAppearanceSpan(
                            null,
                            originalSpan.getTextStyle(),
                            -1,
                            null,
                            null);
                } else {
                    continue;
                }
                outString.setSpan(resultSpan, ss.getSpanStart(span), ss.getSpanEnd(span),
                        ss.getSpanFlags(span));
            }
            return outString;
        }
        return text;
    }
    private static CharSequence normalizeBigText(@Nullable CharSequence charSequence) {
        if (charSequence == null) {
            return charSequence;
@@ -7405,8 +7439,10 @@ public class Notification implements Parcelable
         */
        public CharSequence ensureColorSpanContrastOrStripStyling(CharSequence cs,
                int buttonFillColor) {
            // Ongoing promoted notifications are allowed to have styling.
            if (Flags.cleanUpSpansAndNewLines()) {
            if ( mN.isPromotedOngoing()) {
                // RON keeps non style spans just like MessagingStyle
                return stripNonStyleSpans(cs);
            } else if (Flags.cleanUpSpansAndNewLines()) {
                return stripStyling(cs);
            }
@@ -9018,7 +9054,7 @@ public class Notification implements Parcelable
            // Replace the text with the big text, but only if the big text is not empty.
            CharSequence bigTextText = mBuilder.processLegacyText(mBigText);
            // Ongoing promoted notifications are allowed to have styling.
            if (Flags.cleanUpSpansAndNewLines()) {
            if (!mBuilder.mN.isPromotedOngoing() && Flags.cleanUpSpansAndNewLines()) {
                bigTextText = normalizeBigText(stripStyling(bigTextText));
            }
            if (!TextUtils.isEmpty(bigTextText)) {
@@ -10153,37 +10189,6 @@ public class Notification implements Parcelable
                }
            }
            private CharSequence stripNonStyleSpans(CharSequence text) {
                if (text instanceof Spanned) {
                    Spanned ss = (Spanned) text;
                    Object[] spans = ss.getSpans(0, ss.length(), Object.class);
                    SpannableStringBuilder builder = new SpannableStringBuilder(ss.toString());
                    for (Object span : spans) {
                        final Object resultSpan;
                        if (span instanceof StyleSpan
                                || span instanceof StrikethroughSpan
                                || span instanceof UnderlineSpan) {
                            resultSpan = span;
                        } else if (span instanceof TextAppearanceSpan) {
                            final TextAppearanceSpan originalSpan = (TextAppearanceSpan) span;
                            resultSpan = new TextAppearanceSpan(
                                    null,
                                    originalSpan.getTextStyle(),
                                    -1,
                                    null,
                                    null);
                        } else {
                            continue;
                        }
                        builder.setSpan(resultSpan, ss.getSpanStart(span), ss.getSpanEnd(span),
                                ss.getSpanFlags(span));
                    }
                    return builder;
                }
                return text;
            }
            /**
             * Updates TextAppearance spans in the message text so it has sufficient contrast
             * against its background.
Loading