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
import android.hardware.SensorManager;
import android.os.IBinder;
import android.os.PowerManager;
+import android.os.UserHandle;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.util.Log;
}
private void launchDozePulse() {
- mContext.sendBroadcast(new Intent(DOZE_INTENT));
+ mContext.sendBroadcastAsUser(new Intent(DOZE_INTENT),
+ new UserHandle(UserHandle.USER_CURRENT));
}
private boolean isInteractive() {