summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-06-10 12:24:10 -0700
committervadimt <vadimt@google.com>2019-06-10 12:24:10 -0700
commit915fd75faede1b5cb2f5ef4a60b8b2bdae41f979 (patch)
tree8978e24c982667568082d8a854ea1c0043f2d621 /quickstep
parentc25d97534276057341f1d3b761af6013e83fc9dd (diff)
downloadandroid_packages_apps_Trebuchet-915fd75faede1b5cb2f5ef4a60b8b2bdae41f979.tar.gz
android_packages_apps_Trebuchet-915fd75faede1b5cb2f5ef4a60b8b2bdae41f979.tar.bz2
android_packages_apps_Trebuchet-915fd75faede1b5cb2f5ef4a60b8b2bdae41f979.zip
Not assuming that the activity is Launcher for the fallback recents
Bug: 134919468 Change-Id: Ibb3b11a5bf57848212c806f2023e4cf43c8a862b
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/views/DigitalWellBeingToast.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/DigitalWellBeingToast.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/DigitalWellBeingToast.java
index 204dd5687..5aab944a3 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/DigitalWellBeingToast.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/DigitalWellBeingToast.java
@@ -37,7 +37,7 @@ import android.widget.TextView;
import androidx.annotation.StringRes;
-import com.android.launcher3.Launcher;
+import com.android.launcher3.BaseActivity;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.userevent.nano.LauncherLogProto;
@@ -187,12 +187,12 @@ public final class DigitalWellBeingToast extends LinearLayout {
mTask.getTopComponent().getPackageName()).addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
try {
- final Launcher launcher = Launcher.getLauncher(getContext());
+ final BaseActivity activity = BaseActivity.fromContext(getContext());
final ActivityOptions options = ActivityOptions.makeScaleUpAnimation(
this, 0, 0,
getWidth(), getHeight());
- launcher.startActivity(intent, options.toBundle());
- launcher.getUserEventDispatcher().logActionOnControl(LauncherLogProto.Action.Touch.TAP,
+ activity.startActivity(intent, options.toBundle());
+ activity.getUserEventDispatcher().logActionOnControl(LauncherLogProto.Action.Touch.TAP,
LauncherLogProto.ControlType.APP_USAGE_SETTINGS, this);
} catch (ActivityNotFoundException e) {
Log.e(TAG, "Failed to open app usage settings for task "