samsung: doze: specify a qualified user to send the pulse broadcast

Should fix this:

W/ContextImpl(3700): Calling a method in the system process without a qualified user:
android.app.ContextImpl.sendBroadcast:877
android.content.ContextWrapper.sendBroadcast:421
com.cyanogenmod.settings.device.SamsungDozeService.launchDozePulse:151
com.cyanogenmod.settings.device.SamsungDozeService.-wrap1:-1
com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.onSensorChanged:81

Change-Id: I680a57c9010d06719c3bd014001b00353f8e12fd
tirimbino
Sean hoyt 8 years ago committed by Jan Altensen
parent bf82c89c3f
commit f1c7c30e5d
No known key found for this signature in database
GPG Key ID: 3E45BB95F7AD33DA
  1. 4
      doze/src/com/cyanogenmod/settings/device/SamsungDozeService.java

@ -28,6 +28,7 @@ import android.hardware.SensorEventListener;
import android.hardware.SensorManager; import android.hardware.SensorManager;
import android.os.IBinder; import android.os.IBinder;
import android.os.PowerManager; import android.os.PowerManager;
import android.os.UserHandle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.provider.Settings; import android.provider.Settings;
import android.util.Log; import android.util.Log;
@ -144,7 +145,8 @@ public class SamsungDozeService extends Service {
} }
private void launchDozePulse() { private void launchDozePulse() {
mContext.sendBroadcast(new Intent(DOZE_INTENT)); mContext.sendBroadcastAsUser(new Intent(DOZE_INTENT),
new UserHandle(UserHandle.USER_CURRENT));
} }
private boolean isInteractive() { private boolean isInteractive() {

Loading…
Cancel
Save