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

Commit ed760377 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Add a persistent system property to disable the adb notification.



Setting to persist.adb.notify to 0 will disable the ad notification.
You need to be root to set this, so this allows disabling the notification
only on eng and userdebug builds.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent b45451f6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.os.IBinder;
import android.os.Message;
import android.os.Power;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.Vibrator;
import android.provider.Settings;
import android.text.TextUtils;
@@ -945,6 +946,9 @@ class NotificationManagerService extends INotificationManager.Stub
    // to accidentally lose.
    private void updateAdbNotification() {
        if (mAdbEnabled && mBatteryPlugged == BatteryManager.BATTERY_PLUGGED_USB) {
            if ("0".equals(SystemProperties.get("persist.adb.notify"))) {
                return;
            }
            if (!mAdbNotificationShown) {
                NotificationManager notificationManager = (NotificationManager) mContext
                        .getSystemService(Context.NOTIFICATION_SERVICE);