summaryrefslogtreecommitdiffstats
path: root/src_ui_overrides
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2019-08-13 15:57:15 -0700
committerHyunyoung Song <hyunyoungs@google.com>2019-08-15 14:02:28 -0700
commitd4204437de888756d2cf8ccb8e9244960bd6d423 (patch)
treea5822a94851f4f2deadaefe64a2c56028e161eca /src_ui_overrides
parent1b0445dfa4179bb04a4d01ada9561dbd3944a4b1 (diff)
downloadandroid_packages_apps_Trebuchet-d4204437de888756d2cf8ccb8e9244960bd6d423.tar.gz
android_packages_apps_Trebuchet-d4204437de888756d2cf8ccb8e9244960bd6d423.tar.bz2
android_packages_apps_Trebuchet-d4204437de888756d2cf8ccb8e9244960bd6d423.zip
Make TogglableFlag backed by DeviceConfig for e2e testing
Bug: 138964490 TL;DR;; need this to be part of QQ1 or QD1 to verify if DeviceConfig can be supported for launcher toggleableFlags. Not handled in this CL: - When flag is locally modified, that will override the flag value How that scenario is handled should be discussed separately and is not within scope of this CL. Change-Id: I2e6694a40bee9202ed0b0d559e3b5607634071bf
Diffstat (limited to 'src_ui_overrides')
-rw-r--r--src_ui_overrides/com/android/launcher3/uioverrides/TogglableFlag.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/TogglableFlag.java b/src_ui_overrides/com/android/launcher3/uioverrides/TogglableFlag.java
new file mode 100644
index 000000000..e875a3c46
--- /dev/null
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/TogglableFlag.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3.uioverrides;
+
+import com.android.launcher3.config.BaseFlags.BaseTogglableFlag;
+
+public class TogglableFlag extends BaseTogglableFlag {
+
+ public TogglableFlag(String key, boolean defaultValue, String description) {
+ super(key, defaultValue, description);
+ }
+
+ @Override
+ public boolean getInitialValue(boolean value) {
+ return value;
+ }
+}