Loading src/com/android/launcher3/config/BaseFlags.java +12 −2 Original line number Diff line number Diff line Loading @@ -17,13 +17,16 @@ package com.android.launcher3.config; import static androidx.core.util.Preconditions.checkNotNull; import android.content.ContentResolver; import android.content.Context; import android.content.SharedPreferences; import android.provider.Settings; import androidx.annotation.GuardedBy; import androidx.annotation.Keep; import androidx.annotation.VisibleForTesting; import com.android.launcher3.Utilities; import java.util.ArrayList; Loading Loading @@ -95,8 +98,9 @@ abstract class BaseFlags { public static final TogglableFlag APPLY_CONFIG_AT_RUNTIME = new TogglableFlag( "APPLY_CONFIG_AT_RUNTIME", true, "Apply display changes dynamically"); public static final TogglableFlag ENABLE_TASK_STABILIZER = new TogglableFlag( "ENABLE_TASK_STABILIZER", false, "Stable task list across fast task switches"); public static final ToggleableGlobalSettingsFlag ENABLE_TASK_STABILIZER = new ToggleableGlobalSettingsFlag("ENABLE_TASK_STABILIZER", false, "Stable task list across fast task switches"); public static final TogglableFlag QUICKSTEP_SPRINGS = new TogglableFlag("QUICKSTEP_SPRINGS", false, "Enable springs for quickstep animations"); Loading Loading @@ -249,11 +253,17 @@ abstract class BaseFlags { @Override void updateStorage(Context context, boolean value) { if (contentResolver == null) { return; } Settings.Global.putInt(contentResolver, getKey(), value ? 1 : 0); } @Override boolean getFromStorage(Context context, boolean defaultValue) { if (contentResolver == null) { return defaultValue; } return Settings.Global.getInt(contentResolver, getKey(), defaultValue ? 1 : 0) == 1; } Loading Loading
src/com/android/launcher3/config/BaseFlags.java +12 −2 Original line number Diff line number Diff line Loading @@ -17,13 +17,16 @@ package com.android.launcher3.config; import static androidx.core.util.Preconditions.checkNotNull; import android.content.ContentResolver; import android.content.Context; import android.content.SharedPreferences; import android.provider.Settings; import androidx.annotation.GuardedBy; import androidx.annotation.Keep; import androidx.annotation.VisibleForTesting; import com.android.launcher3.Utilities; import java.util.ArrayList; Loading Loading @@ -95,8 +98,9 @@ abstract class BaseFlags { public static final TogglableFlag APPLY_CONFIG_AT_RUNTIME = new TogglableFlag( "APPLY_CONFIG_AT_RUNTIME", true, "Apply display changes dynamically"); public static final TogglableFlag ENABLE_TASK_STABILIZER = new TogglableFlag( "ENABLE_TASK_STABILIZER", false, "Stable task list across fast task switches"); public static final ToggleableGlobalSettingsFlag ENABLE_TASK_STABILIZER = new ToggleableGlobalSettingsFlag("ENABLE_TASK_STABILIZER", false, "Stable task list across fast task switches"); public static final TogglableFlag QUICKSTEP_SPRINGS = new TogglableFlag("QUICKSTEP_SPRINGS", false, "Enable springs for quickstep animations"); Loading Loading @@ -249,11 +253,17 @@ abstract class BaseFlags { @Override void updateStorage(Context context, boolean value) { if (contentResolver == null) { return; } Settings.Global.putInt(contentResolver, getKey(), value ? 1 : 0); } @Override boolean getFromStorage(Context context, boolean defaultValue) { if (contentResolver == null) { return defaultValue; } return Settings.Global.getInt(contentResolver, getKey(), defaultValue ? 1 : 0) == 1; } Loading