Skip to content

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 93c5673 commit 45ce741
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 45ce741

Please sign in to comment.