From 45c12ff1b5d7ffcd7cf7ce21cc05fb93df9df140 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Tue, 30 Jul 2019 15:33:12 -0700 Subject: Set recents view to be visible from alt+tab Recents was being initialized but was not marked as attached to app window. This was causing it's animator to never make it View.VISIBLE. Test: Open any app On physical keyboard press alt+tab Observe that overview shows up fixes: 138396234 Change-Id: I9e6c001242f4552027e79b162fb812f476823a37 --- .../src/com/android/quickstep/AppToOverviewAnimationProvider.java | 1 + .../src/com/android/quickstep/OverviewCommandHelper.java | 1 + 2 files changed, 2 insertions(+) (limited to 'quickstep') diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java index 5e77e0ade..5ebefa337 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java @@ -81,6 +81,7 @@ final class AppToOverviewAnimationProvider imple }); factory.onRemoteAnimationReceived(null); factory.createActivityController(RECENTS_LAUNCH_DURATION); + factory.setRecentsAttachedToAppWindow(true, false); mActivity = activity; mRecentsView = mActivity.getOverviewPanel(); return false; diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java index 6533c63ef..a94f25d2b 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java @@ -99,6 +99,7 @@ public class OverviewCommandHelper { @Override protected void onTransitionComplete() { + // TODO(b/138729100) This doesn't execute first time launcher is run if (mTriggeredFromAltTab) { RecentsView rv = (RecentsView) mHelper.getVisibleRecentsView(); if (rv == null) { -- cgit v1.2.3 From 84fa94e2fc79aac983b5048caec84ce93a1302fc Mon Sep 17 00:00:00 2001 From: Becky Qiu Date: Tue, 30 Jul 2019 15:08:50 -0700 Subject: Fill the log container as hotseat or workspace based on position. Test: manual Bug: 137953006 Swipe from workspace: 07-30 15:15:44.031 9779 9779 D UserEvent: action:FLING direction=UP direction=UP 07-30 15:15:44.031 9779 9779 D UserEvent: Source child:WORKSPACE id=0 span(951,1313) parent:WORKSPACE id=0 07-30 15:15:44.031 9779 9779 D UserEvent: Destination child:ALLAPPS 07-30 15:15:44.031 9779 9779 D UserEvent: Elapsed container 826 ms, session 9361 ms, action 0 ms Swipe from hotseat: 07-30 15:15:46.010 9779 9779 D UserEvent: action:FLING direction=UP direction=UP 07-30 15:15:46.010 9779 9779 D UserEvent: Source child:HOTSEAT id=0 span(786,1908) parent:WORKSPACE id=0 07-30 15:15:46.010 9779 9779 D UserEvent: Destination child:ALLAPPS 07-30 15:15:46.010 9779 9779 D UserEvent: Elapsed container 1139 ms, session 11339 ms, action 0 ms Change-Id: I959528889fda778efc569bb59e7f44d3bd5b81bc --- .../touchcontrollers/OverviewToAllAppsTouchController.java | 2 +- .../uioverrides/touchcontrollers/QuickSwitchTouchController.java | 2 +- .../uioverrides/touchcontrollers/LandscapeEdgeSwipeController.java | 2 +- .../uioverrides/touchcontrollers/PortraitStatesTouchController.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'quickstep') diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/OverviewToAllAppsTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/OverviewToAllAppsTouchController.java index 73f328bc1..90911684e 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/OverviewToAllAppsTouchController.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/OverviewToAllAppsTouchController.java @@ -75,7 +75,7 @@ public class OverviewToAllAppsTouchController extends PortraitStatesTouchControl } @Override - protected int getLogContainerTypeForNormalState() { + protected int getLogContainerTypeForNormalState(MotionEvent ev) { return LauncherLogProto.ContainerType.WORKSPACE; } } diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java index 18b8af4fa..eb571f607 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java @@ -154,7 +154,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll } @Override - protected int getLogContainerTypeForNormalState() { + protected int getLogContainerTypeForNormalState(MotionEvent ev) { return LauncherLogProto.ContainerType.NAVBAR; } diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeEdgeSwipeController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeEdgeSwipeController.java index 0605953dc..bb72315d3 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeEdgeSwipeController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeEdgeSwipeController.java @@ -46,7 +46,7 @@ public class LandscapeEdgeSwipeController extends AbstractStateChangeTouchContro } @Override - protected int getLogContainerTypeForNormalState() { + protected int getLogContainerTypeForNormalState(MotionEvent ev) { return LauncherLogProto.ContainerType.NAVBAR; } diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java index a55f36b78..b81edfa4c 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java @@ -147,8 +147,8 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr } @Override - protected int getLogContainerTypeForNormalState() { - return ContainerType.HOTSEAT; + protected int getLogContainerTypeForNormalState(MotionEvent ev) { + return isTouchOverHotseat(mLauncher, ev) ? ContainerType.HOTSEAT : ContainerType.WORKSPACE; } private AnimatorSetBuilder getNormalToOverviewAnimation() { -- cgit v1.2.3 From bd7acf7665712c742af7f08dd76c3678cb5d52ab Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Wed, 31 Jul 2019 15:15:03 -0700 Subject: Change RecentsAnimationListenerSet interface (Launcher) Bug: 138683199 Test: N/A Change-Id: Ic53ef92fe4d5b55ff1d105a250accdf6f6c0916b (cherry picked from commit 8e8a36f673de31a31e19131ab286de7798e23b78) --- .../com/android/quickstep/util/RecentsAnimationListenerSet.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'quickstep') diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java index 83601e617..14083dd95 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java @@ -23,6 +23,7 @@ import android.util.ArraySet; import com.android.launcher3.Utilities; import com.android.launcher3.util.Preconditions; import com.android.quickstep.util.SwipeAnimationTargetSet.SwipeAnimationListener; +import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RecentsAnimationListener; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; @@ -39,7 +40,7 @@ import androidx.annotation.UiThread; public class RecentsAnimationListenerSet implements RecentsAnimationListener { // The actual app surface is replaced by a screenshot upon recents animation cancelation when - // deferredWithScreenshot is true. Launcher takes the responsibility to clean up this screenshot + // the thumbnailData exists. Launcher takes the responsibility to clean up this screenshot // after app transition is finished. This delay is introduced to cover the app transition // period of time. private final int TRANSITION_DELAY = 100; @@ -90,14 +91,14 @@ public class RecentsAnimationListenerSet implements RecentsAnimationListener { } @Override - public final void onAnimationCanceled(boolean deferredWithScreenshot) { + public final void onAnimationCanceled(ThumbnailData thumbnailData) { Utilities.postAsyncCallback(MAIN_THREAD_EXECUTOR.getHandler(), () -> { for (SwipeAnimationListener listener : getListeners()) { listener.onRecentsAnimationCanceled(); } }); // TODO: handle the transition better instead of simply using a transition delay. - if (deferredWithScreenshot) { + if (thumbnailData != null) { MAIN_THREAD_EXECUTOR.getHandler().postDelayed(() -> mController.cleanupScreenshot(), TRANSITION_DELAY); } @@ -109,6 +110,6 @@ public class RecentsAnimationListenerSet implements RecentsAnimationListener { public void cancelListener() { mCancelled = true; - onAnimationCanceled(false); + onAnimationCanceled(null); } } -- cgit v1.2.3 From e4061fc931cb8bc50306a76e617761936a74b97f Mon Sep 17 00:00:00 2001 From: Pinyao Ting Date: Fri, 26 Jul 2019 12:28:38 -0700 Subject: show dot in deep shortcuts when notification contains exactly identical set of person Bug: 132336512 Change-Id: I975524e28168c10a186cdc24b188c161faf433cf Merged-In: I975524e28168c10a186cdc24b188c161faf433cf --- quickstep/src/com/android/launcher3/uioverrides/UiFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'quickstep') diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java index 97cd38a11..c02df9386 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java @@ -32,9 +32,11 @@ import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN; import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.app.Activity; +import android.app.Person; import android.content.Context; import android.content.Intent; import android.content.IntentSender; +import android.content.pm.ShortcutInfo; import android.os.Bundle; import android.os.CancellationSignal; import android.util.Base64; @@ -244,4 +246,9 @@ public class UiFactory extends RecentsUiFactory { } return new ScaleAndTranslation(1.1f, 0f, 0f); } + + public static Person[] getPersons(ShortcutInfo si) { + Person[] persons = si.getPersons(); + return persons == null ? Utilities.EMPTY_PERSON_ARRAY : persons; + } } -- cgit v1.2.3 From 90ea00b39908c5e999b54a629fb2d5dca85a0b04 Mon Sep 17 00:00:00 2001 From: Becky Qiu Date: Thu, 8 Aug 2019 11:33:53 -0700 Subject: Log the event for swiping up to dismiss a task in Overview. Test: manual Bug: 137777105 Demo logging for dismissing a task: data { elapsed_timestamp_nanos: 70772067228810 atom { launcher_event { action: DISMISS_TASK src_state: OVERVIEW dst_state: BACKGROUND is_swipe_up_enabled: true } } } Change-Id: I5569b80e2e1f35661bc5e9e343c6c298791a1ec1 --- .../src/com/android/quickstep/views/RecentsView.java | 6 ++++-- .../com/android/quickstep/logging/StatsLogCompatManager.java | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'quickstep') diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 9b157d163..1bf77f53c 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -97,6 +97,7 @@ import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; +import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.OverScroller; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.util.Themes; @@ -1051,9 +1052,10 @@ public abstract class RecentsView extends PagedView impl if (task != null) { ActivityManagerWrapper.getInstance().removeTask(task.key.id); if (shouldLog) { + ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key); mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss( - onEndListener.logAction, Direction.UP, index, - TaskUtils.getLaunchComponentKeyForTask(task.key)); + onEndListener.logAction, Direction.UP, index, componentKey); + mActivity.getStatsLogManager().logTaskDismiss(this, componentKey); } } } diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java index 2f411efc7..13a8dc26a 100644 --- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java +++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java @@ -25,6 +25,7 @@ import static android.stats.launcher.nano.Launcher.ALLAPPS; import static android.stats.launcher.nano.Launcher.HOME; import static android.stats.launcher.nano.Launcher.LAUNCH_APP; import static android.stats.launcher.nano.Launcher.LAUNCH_TASK; +import static android.stats.launcher.nano.Launcher.DISMISS_TASK; import static android.stats.launcher.nano.Launcher.BACKGROUND; import static android.stats.launcher.nano.Launcher.OVERVIEW; @@ -74,6 +75,16 @@ public class StatsLogCompatManager extends StatsLogManager { MessageNano.toByteArray(ext), true); } + @Override + public void logTaskDismiss(View v, ComponentKey componentKey) { + LauncherExtension ext = new LauncherExtension(); + ext.srcTarget = new LauncherTarget[SUPPORTED_TARGET_DEPTH]; + int srcState = OVERVIEW; + fillInLauncherExtension(v, ext); + StatsLogCompat.write(DISMISS_TASK, srcState, BACKGROUND /* dstState */, + MessageNano.toByteArray(ext), true); + } + public static boolean fillInLauncherExtension(View v, LauncherExtension extension) { StatsLogUtils.LogContainerProvider provider = StatsLogUtils.getLaunchProviderRecursive(v); if (v == null || !(v.getTag() instanceof ItemInfo) || provider == null) { -- cgit v1.2.3 From 7ca46ba2ee185cf9a199172b94bf37163d06f2d7 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Wed, 14 Aug 2019 09:40:04 -0700 Subject: Fixed PredictionAppTracker as service might not be available on device. Fixes: 139416391 Bug: 135218095 Test: echo 'in TreeHugger we trust' Change-Id: Iea89b3d379792327657e01869c9494975e7b0306 (cherry picked from commit 214a45ee02674712542dabdb7d8c70ace21f4501) --- .../src/com/android/launcher3/appprediction/PredictionAppTracker.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'quickstep') diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java index 8f1282ded..24fc61bef 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java @@ -95,6 +95,10 @@ public class PredictionAppTracker extends AppLaunchTracker { private AppPredictor createPredictor(Client client, int count) { AppPredictionManager apm = mContext.getSystemService(AppPredictionManager.class); + if (apm == null) { + return null; + } + AppPredictor predictor = apm.createAppPredictionSession( new AppPredictionContext.Builder(mContext) .setUiSurface(client.id) -- cgit v1.2.3 From 934ebd087b90ad0afbb620f16c14843ea640cc3b Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 6 Aug 2019 09:48:36 -0700 Subject: Adding support for storing keywords in iconCache Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9 Merged-In: I1183e63a6556ebfb3eee5df23d149e09728193a9 (cherry picked from commit e529a86fbd2eaf7b13575af6b6adf0eb6e25e45c) --- .../src/com/android/quickstep/TaskOverlayFactory.java | 5 +++-- quickstep/src/com/android/quickstep/RecentsModel.java | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'quickstep') diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java index b90f6c2b1..17457aace 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java @@ -16,6 +16,8 @@ package com.android.quickstep; +import static com.android.launcher3.util.MainThreadInitializedObject.forOverride; + import android.graphics.Matrix; import android.view.View; @@ -47,8 +49,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride { }; public static final MainThreadInitializedObject INSTANCE = - new MainThreadInitializedObject<>(c -> Overrides.getObject(TaskOverlayFactory.class, - c, R.string.task_overlay_factory_class)); + forOverride(TaskOverlayFactory.class, R.string.task_overlay_factory_class); public List getEnabledShortcuts(TaskView taskView) { final ArrayList shortcuts = new ArrayList<>(); diff --git a/quickstep/src/com/android/quickstep/RecentsModel.java b/quickstep/src/com/android/quickstep/RecentsModel.java index 9f1248458..dfab43459 100644 --- a/quickstep/src/com/android/quickstep/RecentsModel.java +++ b/quickstep/src/com/android/quickstep/RecentsModel.java @@ -16,15 +16,12 @@ package com.android.quickstep; import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId; -import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SUPPORTS_WINDOW_CORNERS; -import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_WINDOW_CORNER_RADIUS; import android.annotation.TargetApi; import android.app.ActivityManager; import android.content.ComponentCallbacks2; import android.content.Context; import android.os.Build; -import android.os.Bundle; import android.os.HandlerThread; import android.os.Process; import android.os.RemoteException; @@ -35,7 +32,6 @@ import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.TaskStackChangeListener; import java.util.ArrayList; @@ -52,7 +48,7 @@ public class RecentsModel extends TaskStackChangeListener { // We do not need any synchronization for this variable as its only written on UI thread. public static final MainThreadInitializedObject INSTANCE = - new MainThreadInitializedObject<>(c -> new RecentsModel(c)); + new MainThreadInitializedObject<>(RecentsModel::new); private final List mThumbnailChangeListeners = new ArrayList<>(); private final Context mContext; -- cgit v1.2.3 From a81be5003ce6c951a012578746c7d5c33cf66b98 Mon Sep 17 00:00:00 2001 From: vadimt Date: Wed, 14 Aug 2019 17:16:57 -0700 Subject: Extending the list of test owners Otherwise, changes in tests would require my-only approval. Change-Id: Ia957a28a5a8e55dc2ee4efdf9a46c91511d3e611 --- quickstep/tests/OWNERS | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quickstep') diff --git a/quickstep/tests/OWNERS b/quickstep/tests/OWNERS index 046d87116..02e8ebcab 100644 --- a/quickstep/tests/OWNERS +++ b/quickstep/tests/OWNERS @@ -1 +1,4 @@ vadimt@google.com +sunnygoyal@google.com +winsonc@google.com +hyunyoungs@google.com -- cgit v1.2.3 From d4204437de888756d2cf8ccb8e9244960bd6d423 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Tue, 13 Aug 2019 15:57:15 -0700 Subject: 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 --- .../launcher3/uioverrides/TogglableFlag.java | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 quickstep/src/com/android/launcher3/uioverrides/TogglableFlag.java (limited to 'quickstep') diff --git a/quickstep/src/com/android/launcher3/uioverrides/TogglableFlag.java b/quickstep/src/com/android/launcher3/uioverrides/TogglableFlag.java new file mode 100644 index 000000000..e42508814 --- /dev/null +++ b/quickstep/src/com/android/launcher3/uioverrides/TogglableFlag.java @@ -0,0 +1,32 @@ +/* + * 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 android.provider.DeviceConfig; +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 DeviceConfig.getBoolean("launcher", getKey(), value); + } +} -- cgit v1.2.3