From 2f73399f6eb12982ea96aa235927b1e1d9226aec Mon Sep 17 00:00:00 2001 From: Kyle Harrison Date: Wed, 15 May 2019 17:45:55 +0100 Subject: [PATCH] MotoActions: Broadcast doze pulse as current user - Fixes warning in logcat Change-Id: Ibed659bd5d801a8cdcfe12ec9dd789cb8ce481cb --- .../org/lineageos/settings/device/doze/DozePulseAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MotoActions/src/org/lineageos/settings/device/doze/DozePulseAction.java b/MotoActions/src/org/lineageos/settings/device/doze/DozePulseAction.java index 7c48311..267ebce 100644 --- a/MotoActions/src/org/lineageos/settings/device/doze/DozePulseAction.java +++ b/MotoActions/src/org/lineageos/settings/device/doze/DozePulseAction.java @@ -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); } } -- 2.20.1