Bypass the SystemUI notification flags on Android 15 too - #882
Merged
Conversation
Constructing a Notification on Android 16 reads an aconfig flag of the systemui container, and the daemon cannot serve that read: it holds an ActivityThread but no application record, so the settings provider is refused it and the constructor throws SecurityException. Setting systemui_is_cached ahead of the first read avoids it. The gate has been SDK_INT == 36 since the Kotlin refactor. It was originally >= VANILLA_ICE_CREAM, because Xiaomi shipped the change on Android 15 without the SDK level, which is #96 and now #880 again. Android 17 drops the read, so the test now spans 35 to 36.
JingMatrix
force-pushed
the
notification-flags-android-15
branch
from
August 6, 2026 12:24
f96d3ce to
ed77923
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Constructing a
Notificationreads an aconfig flag of thesystemuicontainer (Notification()onandroid16-release, flag declaration). The generatedFeatureFlagsImplcaches that read behindsystemui_is_cached, and the read itself queriescontent://settings/config, which the daemon cannot obtain: it holds anActivityThreadbut no application record, soActivityManagerServicerefuses it a provider (ContentProviderHelper) and the constructor throwsSecurityException. The field is set only after the read returns, so the failure never converges and every later construction repeats it. Setting it in advance leaves the flags at their compiled defaults and removes the read (feature flagging).The bypass dates from
1b98e55cfand was gated onSDK_INT >= VANILLA_ICE_CREAM. The read belongs to Android 16, but the gate was wider on purpose: #96 was a Xiaomi HyperOS device failing this way on Android 15, filed four days before Android 16 DP1 was published, the vendor having taken the platform change without the SDK level. #597 rewrote the gate asSDK_INT == 36and that case was lost. #880 is the same report as #96, same vendor and same version, and its reporter confirms 2.0 (3021) predates #597 and works while 2.2 (3080) does not.Android 17 sets the fields unconditionally and the flag is gone from the class (
Notification()onandroid17-release), so the test spans 35 to 36: the versions in which the field can exist, rather than the version that introduced it. A device that never carried it fails with theClassNotFoundExceptionalready ignored there. The unguarded builders inNotificationManagerare left as they are.