sm6150-common: parts: Semantic fixes
Change-Id: I26ad700931e8b104ee21666eff1ce73eafbac56d
This commit is contained in:
parent
b3b6b7c683
commit
3182cdfce9
@ -176,8 +176,8 @@ public class DozeSettingsFragment extends PreferenceFragment
|
||||
}
|
||||
|
||||
mHandler.post(() -> {
|
||||
DozeUtils.checkDozeService(getActivity());
|
||||
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
|
||||
DozeUtils.checkDozeService(getActivity());
|
||||
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
|
||||
});
|
||||
|
||||
return true;
|
||||
|
@ -17,12 +17,15 @@
|
||||
|
||||
package org.lineageos.settings.doze;
|
||||
|
||||
import static android.provider.Settings.Secure.DOZE_ALWAYS_ON;
|
||||
import static android.provider.Settings.Secure.DOZE_ENABLED;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.hardware.display.AmbientDisplayConfiguration;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorManager;
|
||||
import android.hardware.display.AmbientDisplayConfiguration;
|
||||
import android.os.PowerManager;
|
||||
import android.os.SystemClock;
|
||||
import android.os.UserHandle;
|
||||
@ -34,9 +37,6 @@ import androidx.preference.PreferenceManager;
|
||||
import org.lineageos.settings.R;
|
||||
import org.lineageos.settings.utils.FileUtils;
|
||||
|
||||
import static android.provider.Settings.Secure.DOZE_ALWAYS_ON;
|
||||
import static android.provider.Settings.Secure.DOZE_ENABLED;
|
||||
|
||||
public final class DozeUtils {
|
||||
private static final String TAG = "DozeUtils";
|
||||
private static final boolean DEBUG = false;
|
||||
@ -119,11 +119,15 @@ public final class DozeUtils {
|
||||
|
||||
protected static void wakeOrLaunchDozePulse(Context context) {
|
||||
if (isWakeOnGestureEnabled(context)) {
|
||||
if (DEBUG) Log.d(TAG, "Wake up display");
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Wake up display");
|
||||
}
|
||||
PowerManager powerManager = context.getSystemService(PowerManager.class);
|
||||
powerManager.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, TAG);
|
||||
} else {
|
||||
if (DEBUG) Log.d(TAG, "Launch doze pulse");
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Launch doze pulse");
|
||||
}
|
||||
context.sendBroadcastAsUser(
|
||||
new Intent(DOZE_INTENT), new UserHandle(UserHandle.USER_CURRENT));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user