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

Commit da416ba8 authored by Steve Kondik's avatar Steve Kondik
Browse files

Add ADB_NOTIFY setting.

This allows the user to disable the USB debugging connection
notification. It's quite annoying.
parent f9d76066
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2003,6 +2003,12 @@ public final class Settings {
         */
        public static final String ADB_ENABLED = "adb_enabled";

        /**
         * Whether to show ADB notifications.
         * @hide
         */
        public static final String ADB_NOTIFY = "adb_notify";
            
        /**
         * Weather Compcache is eanbled.
         * @hide
+3 −1
Original line number Diff line number Diff line
@@ -1087,7 +1087,9 @@ class NotificationManagerService extends INotificationManager.Stub
    // to accidentally lose.
    private void updateAdbNotification() {
        if (mAdbEnabled && mUsbConnected) {
            if ("0".equals(SystemProperties.get("persist.adb.notify"))) {
            if ("0".equals(SystemProperties.get("persist.adb.notify")) ||
                   Settings.Secure.getInt(mContext.getContentResolver(),
                           Settings.Secure.ADB_NOTIFY, 1) == 0) {
                return;
            }
            if (!mAdbNotificationShown) {