Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
fix AppSwitch#isNotificationSuppressed
Browse files Browse the repository at this point in the history
When package state is null, no flags are set including the flag that
suppresses notifications. This method should return false in such cases.
  • Loading branch information
octocorvus committed May 14, 2024
1 parent 08df59e commit f5f693b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/java/android/ext/settings/app/AppSwitch.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public final boolean isNotificationSuppressed(@Nullable GosPackageStateBase ps)
if (flag == 0) {
return false;
}
return ps == null || ps.hasFlags(flag);
return ps != null && ps.hasFlags(flag);
}

public final void addSuppressNotificationFlag(GosPackageState.Editor ed) {
Expand Down

0 comments on commit f5f693b

Please sign in to comment.