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

Commit 1bc20dd2 authored by Matías Hernández's avatar Matías Hernández Committed by Android (Google) Code Review
Browse files

Merge "Inline MODES_UI and related flags (Core & SystemUI)" into main

parents cacbaefd e13ace5d
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -212,19 +212,6 @@ public final class AutomaticZenRule implements Parcelable {
        this.mZenPolicy = policy;
    }

    /**
     * @hide
     * @deprecated Do not add new usages; will be removed soon.
     */
    // TODO: b/368247671 - Remove when modes_ui is inlined (remaining usages are in obsolete tests)
    @Deprecated
    public AutomaticZenRule(String name, ComponentName owner, ComponentName configurationActivity,
            Uri conditionId, ZenPolicy policy, int interruptionFilter, boolean enabled,
            long creationTime) {
        this(name, owner, configurationActivity, conditionId, policy, interruptionFilter, enabled);
        this.creationTime = creationTime;
    }

    public AutomaticZenRule(Parcel source) {
        enabled = source.readInt() == ENABLED;
        if (source.readInt() == ENABLED) {
+5 −9
Original line number Diff line number Diff line
@@ -1771,14 +1771,10 @@ public class NotificationManager {
     * {@link Settings#ACTION_AUTOMATIC_ZEN_RULE_SETTINGS}.
     */
    public boolean areAutomaticZenRulesUserManaged() {
        if (Flags.modesUi()) {
        PackageManager pm = mContext.getPackageManager();
        return !pm.hasSystemFeature(PackageManager.FEATURE_WATCH)
                && !pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)
                && !pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK);
        } else {
            return false;
        }
    }

    /**
@@ -2376,10 +2372,10 @@ public class NotificationManager {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * @hide
     */
    @FlaggedApi(Flags.FLAG_MODES_UI)
    public void setManualZenRuleDeviceEffects(@NonNull ZenDeviceEffects effects) {
        INotificationManager service = service();
        try {
+1 −27
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ flag {
  bug: "300477976"
}

# Flag for inlined feature: In Nextfood but checked by CTS (and therefore must stay).
flag {
  name: "modes_ui"
  namespace: "systemui"
@@ -50,26 +51,6 @@ flag {
  bug: "270703654"
}

flag {
  name: "modes_ui_icons"
  namespace: "systemui"
  description: "Shows current Priority Mode icon in lockscreen, status bar, and QS; dependent on flags modes_api and modes_ui"
  bug: "360399800"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "modes_ui_empty_shade"
  namespace: "systemui"
  description: "Shows mode that is currently blocking notifications in the empty shade; dependent on flags modes_api and modes_ui"
  bug: "366003631"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "modes_ui_dnd_tile"
  namespace: "systemui"
@@ -100,13 +81,6 @@ flag {
  }
}

flag {
  name: "modes_cleanup_implicit"
  namespace: "systemui"
  description: "Deletes implicit modes if never customized and not used for some time. Depends on MODES_UI"
  bug: "394087495"
}

flag {
  name: "api_tvextender"
  is_exported: true
+1 −4
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
import android.app.AutomaticZenRule;
import android.app.Flags;
import android.content.Context;
import android.service.notification.ZenModeConfig.EventInfo;
import android.service.notification.ZenModeConfig.ScheduleInfo;
@@ -52,12 +51,10 @@ public final class SystemZenRules {
                if (rule.type == AutomaticZenRule.TYPE_UNKNOWN) {
                    upgradeSystemProviderRule(context, rule);
                }
                if (Flags.modesUi()) {
                rule.allowManualInvocation = true;
            }
        }
    }
    }

    /**
     * Returns whether the rule corresponds to a system ConditionProviderService (i.e. it is owned
+234 −747

File changed.

Preview size limit exceeded, changes collapsed.

Loading