mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Adds a removeChangeListener to FeatureFlags$BooleanFlag." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a9cb2fb476
@@ -60,6 +60,14 @@ public class DeviceFlag extends DebugFlag {
|
||||
mListeners.add(r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeChangeListener(Runnable r) {
|
||||
if (mListeners == null) {
|
||||
return;
|
||||
}
|
||||
mListeners.remove(r);
|
||||
}
|
||||
|
||||
private void registerDeviceConfigChangedListener(Context context) {
|
||||
DeviceConfig.addOnPropertiesChangedListener(
|
||||
NAMESPACE_LAUNCHER,
|
||||
|
||||
@@ -158,7 +158,7 @@ public final class FeatureFlags {
|
||||
"ENABLE_SMARTSPACE_UNIVERSAL", false,
|
||||
"Replace Smartspace with a version rendered by System UI.");
|
||||
|
||||
public static final BooleanFlag ENABLE_SMARTSPACE_ENHANCED = getDebugFlag(
|
||||
public static final BooleanFlag ENABLE_SMARTSPACE_ENHANCED = new DeviceFlag(
|
||||
"ENABLE_SMARTSPACE_ENHANCED", false,
|
||||
"Replace Smartspace with the enhanced version. "
|
||||
+ "Ignored if ENABLE_SMARTSPACE_UNIVERSAL is enabled.");
|
||||
@@ -263,6 +263,8 @@ public final class FeatureFlags {
|
||||
}
|
||||
|
||||
public void addChangeListener(Context context, Runnable r) { }
|
||||
|
||||
public void removeChangeListener(Runnable r) {}
|
||||
}
|
||||
|
||||
public static class DebugFlag extends BooleanFlag {
|
||||
|
||||
Reference in New Issue
Block a user