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

Commit 83b34efe authored by Dan Sandler's avatar Dan Sandler Committed by Android (Google) Code Review
Browse files

Merge "Make some notifications public (safe for secure lockscreens):"

parents 6c306b8e bfe61f69
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -311,6 +311,8 @@ public class StorageNotification extends SystemUI {
            }

            mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi);
            mUsbStorageNotification.visibility = Notification.VISIBILITY_PUBLIC;

            final boolean adbOn = 1 == Settings.Global.getInt(
                mContext.getContentResolver(),
                Settings.Global.ADB_ENABLED,
@@ -401,6 +403,7 @@ public class StorageNotification extends SystemUI {

            mMediaStorageNotification.icon = icon;
            mMediaStorageNotification.setLatestEventInfo(mContext, title, message, pi);
            mMediaStorageNotification.visibility = Notification.VISIBILITY_PUBLIC;
        }

        final int notificationId = mMediaStorageNotification.icon;
+1 −0
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ public class Tethering extends BaseNetworkObserver {
        mTetheredNotification.defaults &= ~Notification.DEFAULT_SOUND;
        mTetheredNotification.flags = Notification.FLAG_ONGOING_EVENT;
        mTetheredNotification.tickerText = title;
        mTetheredNotification.visibility = Notification.VISIBILITY_PUBLIC;
        mTetheredNotification.setLatestEventInfo(mContext, title, message, pi);

        notificationManager.notifyAsUser(null, mTetheredNotification.icon,
+1 −0
Original line number Diff line number Diff line
@@ -454,6 +454,7 @@ public class DeviceStorageMonitorService extends SystemService {
        notification.tickerText = title;
        notification.flags |= Notification.FLAG_NO_CLEAR;
        notification.setLatestEventInfo(context, title, details, intent);
        notification.visibility = Notification.VISIBILITY_PUBLIC;
        mNotificationMgr.notifyAsUser(null, LOW_MEMORY_NOTIFICATION_ID, notification,
                UserHandle.ALL);
        context.sendStickyBroadcastAsUser(mStorageLowIntent, UserHandle.ALL);
+2 −0
Original line number Diff line number Diff line
@@ -697,6 +697,7 @@ public class UsbDeviceManager {
                    PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0,
                            intent, 0, null, UserHandle.CURRENT);
                    notification.setLatestEventInfo(mContext, title, message, pi);
                    notification.visibility = Notification.VISIBILITY_PUBLIC;
                    mNotificationManager.notifyAsUser(null, id, notification,
                            UserHandle.ALL);
                    mUsbNotificationId = id;
@@ -732,6 +733,7 @@ public class UsbDeviceManager {
                    PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0,
                            intent, 0, null, UserHandle.CURRENT);
                    notification.setLatestEventInfo(mContext, title, message, pi);
                    notification.visibility = Notification.VISIBILITY_PUBLIC;
                    mAdbNotificationShown = true;
                    mNotificationManager.notifyAsUser(null, id, notification,
                            UserHandle.ALL);