MotoActions: Broadcast doze pulse as current user
authorKyle Harrison <khwebmail@gmail.com>
Wed, 15 May 2019 16:45:55 +0000 (17:45 +0100)
committerNolen Johnson <johnsonnolen@gmail.com>
Sun, 13 Feb 2022 04:28:18 +0000 (23:28 -0500)
- Fixes warning in logcat

Change-Id: Ibed659bd5d801a8cdcfe12ec9dd789cb8ce481cb

MotoActions/src/org/lineageos/settings/device/doze/DozePulseAction.java

index 7c483116920a87fcc60007908c1d197988ef29bf..267ebce1c0780fa94ab495ebc2b4e46d23a16dfc 100644 (file)
@@ -19,6 +19,7 @@ package org.lineageos.settings.device.doze;
 
 import android.content.Context;
 import android.content.Intent;
+import android.os.UserHandle;
 import android.util.Log;
 
 import org.lineageos.settings.device.SensorAction;
@@ -48,7 +49,8 @@ public class DozePulseAction implements SensorAction, ScreenStateNotifier {
     public void action() {
          if (mayDoze()) {
             Log.d(TAG, "Sending doze.pulse intent");
-            mContext.sendBroadcast(new Intent("com.android.systemui.doze.pulse"));
+            Intent pulseIntent = new Intent("com.android.systemui.doze.pulse");
+            mContext.sendBroadcastAsUser(pulseIntent, UserHandle.CURRENT);
         }
     }