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

Commit 4c7fdd9e authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Fix dual USB notifications" into gingerbread

parents b2d6c8de 5f4abd39
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -27,13 +27,15 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.os.storage.StorageEventListener;
import android.os.storage.StorageManager;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Slog;

public class StorageNotification extends StorageEventListener {
    private static final String TAG = "StorageNotification";

    private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true;
    private static final boolean POP_UMS_ACTIVITY_ON_CONNECT =
        (SystemProperties.getInt("ro.usb.use_custom_service", 0) == 0);

    /**
     * Binder context for this service
@@ -280,6 +282,8 @@ public class StorageNotification extends StorageEventListener {
    private synchronized void setUsbStorageNotification(int titleId, int messageId, int icon,
            boolean sound, boolean visible, PendingIntent pi) {

        visible = visible && POP_UMS_ACTIVITY_ON_CONNECT;

        if (!visible && mUsbStorageNotification == null) {
            return;
        }