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

Commit b57f9fb8 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Add API for modes user management" into main

parents 8bc47b3c 97910cb7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6904,6 +6904,7 @@ package android.app {
  public class NotificationManager {
    method public String addAutomaticZenRule(android.app.AutomaticZenRule);
    method @FlaggedApi("android.app.modes_api") public boolean areAutomaticZenRulesUserManaged();
    method @Deprecated public boolean areBubblesAllowed();
    method public boolean areBubblesEnabled();
    method public boolean areNotificationsEnabled();
+16 −0
Original line number Diff line number Diff line
@@ -1246,6 +1246,22 @@ public class NotificationManager {
        }
    }

    /**
     * Returns true if users can independently and fully manage {@link AutomaticZenRule} rules. This
     * includes the ability to independently activate/deactivate rules and overwrite/freeze the
     * behavior (policy) of the rule when activated.
     * <p>
     * If this method returns true, calls to
     * {@link #updateAutomaticZenRule(String, AutomaticZenRule)} may fail and apps should defer
     * rule management to system settings/uis.
     */
    @FlaggedApi(Flags.FLAG_MODES_API)
    public boolean areAutomaticZenRulesUserManaged() {
        // modes ui is dependent on modes api
        return Flags.modesApi() && Flags.modesUi();
    }


    /**
     * Returns AutomaticZenRules owned by the caller.
     *
+7 −0
Original line number Diff line number Diff line
@@ -7,6 +7,13 @@ flag {
  bug: "300477976"
}

flag {
  name: "modes_ui"
  namespace: "systemui"
  description: "This flag controls new and updated DND UIs; dependent on flag modes_api"
  bug: "270703654"
}

flag {
  name: "api_tvextender"
  namespace: "systemui"