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

Unverified Commit e94be3b8 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-security-15.0.0_r10' into staging/lineage-22.2_merge-android-security-15.0.0_r10

Android Security 15.0.0 Release 10 (13793697)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCaLciwQAKCRDorT+BmrEO
# ePwOAJ9Pxvjd0xwWD7Txiyeo+WRZLbdEDACeNx1wi6WO79TS78fZJem413/s7MI=
# =Fi9R
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Sep  2 20:00:49 2025 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

* tag 'android-security-15.0.0_r10': (32 commits)
  Trim oversized strings in setId and setConversationId
  Implement onNullBinding() in autofill service connection
  PrintSpooler: Require empty output for PDF
  cleanup: Fix permission protection of setObservedMotionEventSources
  Check DPC package validity during package updates
  DevicePolicyManager: ignore invalid proxy settings
  Ensuring valid packageName when granting slice permission
  [RESTRICT AUTOMERGE] [appops] Preflight skip datasource validation
  [RESTRICT AUTOMERGE] Fix recording config mic indicator suppression
  [RESTRICT AUTOMERGE] appop: Finish all when last in chain fail
  [RESTRICT AUTOMERGE] Disallow PINNED in setLaunchWindowingMode
  Prevent root from getting unverified attributions from non system apps
  Check sound Uri permission when creating a notification channel
  Move the mStrictModeCallbacks to be self-locked
  Don't allow SdkSandbox to bypass systemUid check.
  Calculate how much memory is used per account.
  Prevent non-system ShutdownActivity from being launched by BatteryService
  Don't allow hiding SysUi
  Avoid mixups between different CPSes in ZenModeConditions
  Revert "Fix biometric prompt appearing above shade"
  ...

 Conflicts:
	core/tests/coretests/src/android/app/NotificationChannelTest.java
	packages/CtsShim/build/Android.bp
	packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
	packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java
	services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
	services/core/java/com/android/server/BatteryService.java
	services/core/java/com/android/server/notification/NotificationRecord.java
	services/core/java/com/android/server/notification/PreferencesHelper.java
	services/core/java/com/android/server/wm/BackgroundActivityStartController.java
	services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java
	services/core/java/com/android/server/wm/WindowProcessController.java
	services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
	services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
	services/tests/uiservicestests/src/com/android/server/notification/PreferencesHelperTest.java
	services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
	services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerExemptionTests.java
	services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerTests.java
	services/tests/wmtests/src/com/android/server/wm/BackgroundLaunchProcessControllerTests.java

Change-Id: Ia20bade443f06d15dfa428af687836903f31bec2
parents 6fa82a0c 3d39a54f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -621,7 +621,7 @@ public final class NotificationChannel implements Parcelable {
     * @hide
     */
    public void setId(String id) {
        mId = id;
        mId = getTrimmedString(id);
    }

    // Modifiable by apps on channel creation.
@@ -865,8 +865,8 @@ public final class NotificationChannel implements Parcelable {
     */
    public void setConversationId(@NonNull String parentChannelId,
            @NonNull String conversationId) {
        mParentId = parentChannelId;
        mConversationId = conversationId;
        mParentId = getTrimmedString(parentChannelId);
        mConversationId = getTrimmedString(conversationId);
    }

    /**
+2 −0
Original line number Diff line number Diff line
@@ -409,6 +409,8 @@ public final class DeviceAdminInfo implements Parcelable {
        } catch (NameNotFoundException e) {
            throw new XmlPullParserException(
                    "Unable to create context for: " + mActivityInfo.packageName);
        } catch (OutOfMemoryError e) {
            throw new XmlPullParserException("Out of memory when parsing", null, e);
        } finally {
            if (parser != null) parser.close();
        }
+7 −0
Original line number Diff line number Diff line
@@ -235,6 +235,8 @@ public final class AssociationRequest implements Parcelable {
     */
    private boolean mSkipPrompt;

    private static final int DISPLAY_NAME_LENGTH_LIMIT = 1024;

    /**
     * The device icon displayed in selfManaged association dialog.
     * @hide
@@ -443,6 +445,11 @@ public final class AssociationRequest implements Parcelable {
        public Builder setDisplayName(@NonNull CharSequence displayName) {
            checkNotUsed();
            mDisplayName = requireNonNull(displayName);
            if (displayName.length() > DISPLAY_NAME_LENGTH_LIMIT) {
                throw new IllegalArgumentException("Length of the display name must be at most "
                        + DISPLAY_NAME_LENGTH_LIMIT + " characters");
            }

            return this;
        }

+30 −0
Original line number Diff line number Diff line
@@ -254,6 +254,36 @@ public class NotificationChannelTest {
                fromParcel.getSound().toString().length());
    }

    @Test
    public void testSetId_longStringIsTrimmed() {
        NotificationChannel channel =
                new NotificationChannel("id", "name", NotificationManager.IMPORTANCE_DEFAULT);
        String longId = Strings.repeat("A", NotificationChannel.MAX_TEXT_LENGTH + 10);

        channel.setId(longId);

        assertThat(channel.getId()).hasLength(NotificationChannel.MAX_TEXT_LENGTH);
        assertThat(channel.getId())
                .isEqualTo(longId.substring(0, NotificationChannel.MAX_TEXT_LENGTH));
    }

    @Test
    public void testSetConversationId_longStringsAreTrimmed() {
        NotificationChannel channel =
                new NotificationChannel("id", "name", NotificationManager.IMPORTANCE_DEFAULT);
        String longParentId = Strings.repeat("P", NotificationChannel.MAX_TEXT_LENGTH + 10);
        String longConversationId = Strings.repeat("C", NotificationChannel.MAX_TEXT_LENGTH + 10);

        channel.setConversationId(longParentId, longConversationId);

        assertThat(channel.getParentChannelId()).hasLength(NotificationChannel.MAX_TEXT_LENGTH);
        assertThat(channel.getParentChannelId())
                .isEqualTo(longParentId.substring(0, NotificationChannel.MAX_TEXT_LENGTH));
        assertThat(channel.getConversationId()).hasLength(NotificationChannel.MAX_TEXT_LENGTH);
        assertThat(channel.getConversationId())
                .isEqualTo(longConversationId.substring(0, NotificationChannel.MAX_TEXT_LENGTH));
    }

    @Test
    @EnableFlags({Flags.FLAG_NOTIFICATION_CHANNEL_VIBRATION_EFFECT_API,
            Flags.FLAG_NOTIF_CHANNEL_CROP_VIBRATION_EFFECTS})
+8 −36
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ java_genrule {
  name: "generate_priv_manifest",
  srcs: [
    "shim_priv/AndroidManifest.xml",
        ":CtsShimPrivUpgrade",
    ":CtsShimPrivUpgrade"
  ],
  out: ["AndroidManifest.xml"],
  cmd: "sed -e s/__HASH__/`sha512sum -b $(location :CtsShimPrivUpgrade) | cut -d' ' -f1`/ $(location shim_priv/AndroidManifest.xml) > $(out)",
@@ -151,34 +151,6 @@ android_app {
    ],
}

//##########################################################
// Variant: System app upgrade

android_app {
    name: "CtsShimUpgrade",

    sdk_version: "current",
    optimize: {
        enabled: false,
    },
    dex_preopt: {
        enabled: false,
    },

    manifest: "shim/AndroidManifestUpgrade.xml",
    min_sdk_version: "24",
}

java_genrule {
    name: "generate_shim_manifest",
    srcs: [
        "shim/AndroidManifest.xml",
        ":CtsShimUpgrade",
    ],
    out: ["AndroidManifest.xml"],
    cmd: "sed -e s/__HASH__/`sha512sum -b $(location :CtsShimUpgrade) | cut -d' ' -f1`/ $(location shim/AndroidManifest.xml) > $(out)",
}

//##########################################################
// Variant: System app

@@ -193,7 +165,7 @@ android_app {
        enabled: false,
    },

    manifest: ":generate_shim_manifest",
    manifest: "shim/AndroidManifest.xml",
    apex_available: [
        "//apex_available:platform",
        "com.android.apex.cts.shim.v1",
Loading