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

Commit bc253a28 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Remove 'peekable' preference.

To be replaced by 'importance' in the future.

Bug: 22854014
Change-Id: Idc9ca79b145d5c69e769c9239ed9291dce40d8c8
parent 06993a33
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -50,9 +50,6 @@ interface INotificationManager
    void setPackagePriority(String pkg, int uid, int priority);
    int getPackagePriority(String pkg, int uid);

    void setPackagePeekable(String pkg, int uid, boolean peekable);
    boolean getPackagePeekable(String pkg, int uid);

    void setPackageVisibilityOverride(String pkg, int uid, int visibility);
    int getPackageVisibilityOverride(String pkg, int uid);

+0 −33
Original line number Diff line number Diff line
@@ -837,13 +837,6 @@ public class Notification implements Parcelable
     */
    public static final String EXTRA_PEOPLE = "android.people";

    /**
     * {@link #extras} key: used to provide hints about the appropriateness of
     * displaying this notification as a heads-up notification.
     * @hide
     */
    public static final String EXTRA_AS_HEADS_UP = "headsup";

    /**
     * Allow certain system-generated notifications to appear before the device is provisioned.
     * Only available to notifications coming from the android package.
@@ -887,32 +880,6 @@ public class Notification implements Parcelable
     */
    public static final String EXTRA_BUILDER_APPLICATION_INFO = "android.appInfo";

    /**
     * Value for {@link #EXTRA_AS_HEADS_UP} that indicates this notification should not be
     * displayed in the heads up space.
     *
     * <p>
     * If this notification has a {@link #fullScreenIntent}, then it will always launch the
     * full-screen intent when posted.
     * </p>
     * @hide
     */
    public static final int HEADS_UP_NEVER = 0;

    /**
     * Default value for {@link #EXTRA_AS_HEADS_UP} that indicates this notification may be
     * displayed as a heads up.
     * @hide
     */
    public static final int HEADS_UP_ALLOWED = 1;

    /**
     * Value for {@link #EXTRA_AS_HEADS_UP} that indicates this notification is a
     * good candidate for display as a heads up.
     * @hide
     */
    public static final int HEADS_UP_REQUESTED = 2;

    private Icon mSmallIcon;
    private Icon mLargeIcon;

+0 −3
Original line number Diff line number Diff line
@@ -2161,13 +2161,10 @@ public abstract class BaseStatusBar extends SystemUI implements
        boolean isHighPriority = sbn.getScore() >= INTERRUPTION_THRESHOLD;
        boolean isFullscreen = notification.fullScreenIntent != null;
        boolean hasTicker = mHeadsUpTicker && !TextUtils.isEmpty(notification.tickerText);
        boolean isAllowed = notification.extras.getInt(Notification.EXTRA_AS_HEADS_UP,
                Notification.HEADS_UP_ALLOWED) != Notification.HEADS_UP_NEVER;
        boolean accessibilityForcesLaunch = isFullscreen
                && mAccessibilityManager.isTouchExplorationEnabled();
        boolean justLaunchedFullScreenIntent = entry.hasJustLaunchedFullScreenIntent();
        boolean interrupt = (isFullscreen || (isHighPriority && (isNoisy || hasTicker)))
                && isAllowed
                && !accessibilityForcesLaunch
                && !justLaunchedFullScreenIntent
                && mPowerManager.isScreenOn()
+0 −21
Original line number Diff line number Diff line
@@ -1223,19 +1223,6 @@ public class NotificationManagerService extends SystemService {
            return mRankingHelper.getPackagePriority(pkg, uid);
        }

        @Override
        public void setPackagePeekable(String pkg, int uid, boolean peekable) {
            checkCallerIsSystem();

            mRankingHelper.setPackagePeekable(pkg, uid, peekable);
        }

        @Override
        public boolean getPackagePeekable(String pkg, int uid) {
            checkCallerIsSystem();
            return mRankingHelper.getPackagePeekable(pkg, uid);
        }

        @Override
        public void setPackageVisibilityOverride(String pkg, int uid, int visibility) {
            checkCallerIsSystem();
@@ -2157,14 +2144,6 @@ public class NotificationManagerService extends SystemService {
                            notification.priority = Notification.PRIORITY_HIGH;
                        }
                    }
                    // force no heads up per package config
                    if (!mRankingHelper.getPackagePeekable(pkg, callingUid)) {
                        if (notification.extras == null) {
                            notification.extras = new Bundle();
                        }
                        notification.extras.putInt(Notification.EXTRA_AS_HEADS_UP,
                                Notification.HEADS_UP_NEVER);
                    }

                    // 1. initial score: buckets of 10, around the app [-20..20]
                    final int score = notification.priority * NOTIFICATION_PRIORITY_MULTIPLIER;
+0 −4
Original line number Diff line number Diff line
@@ -20,10 +20,6 @@ public interface RankingConfig {

    void setPackagePriority(String packageName, int uid, int priority);

    boolean getPackagePeekable(String packageName, int uid);

    void setPackagePeekable(String packageName, int uid, boolean peekable);

    int getPackageVisibilityOverride(String packageName, int uid);

    void setPackageVisibilityOverride(String packageName, int uid, int visibility);
Loading