diff options
author | Vinit Nayak <peanutbutter@google.com> | 2019-07-10 14:25:32 -0700 |
---|---|---|
committer | Vinit Nayak <peanutbutter@google.com> | 2019-07-19 11:11:35 -0700 |
commit | f9b585b507bca5afb0e443ec4cfd5f98829a73b1 (patch) | |
tree | 4ea4d2115163d24c41b6c68e50a207db7c18d055 /src/com/android/launcher3/BaseDraggingActivity.java | |
parent | d3c2a6cecfab92d9852e3c55f9798c207bdd0a9c (diff) | |
download | android_packages_apps_Trebuchet-f9b585b507bca5afb0e443ec4cfd5f98829a73b1.tar.gz android_packages_apps_Trebuchet-f9b585b507bca5afb0e443ec4cfd5f98829a73b1.tar.bz2 android_packages_apps_Trebuchet-f9b585b507bca5afb0e443ec4cfd5f98829a73b1.zip |
Don't specify 1P Launcher3 type if 3P Launcher is active
Instead of referencing Launcher directly (which may not be
present when there's a 3P launcher), reference the lowest
common ancestor of Launcher and RecentActivity to avoid
ClassCastExceptions.
Test: Visually inspected that Pixel Launcher crash dialog
no longer pops up.
* Install 3P launcher
* In developer options enable "enable freeform windows"
* Restart phone for settings to take effect
* Try to use it on any app you have in recent tasks
Fixes: 135419782
Change-Id: Ie1f54880ab46956b23e253850ca7f79b161da9bd
Diffstat (limited to 'src/com/android/launcher3/BaseDraggingActivity.java')
-rw-r--r-- | src/com/android/launcher3/BaseDraggingActivity.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BaseDraggingActivity.java b/src/com/android/launcher3/BaseDraggingActivity.java index 1cdb18c99..8de00691e 100644 --- a/src/com/android/launcher3/BaseDraggingActivity.java +++ b/src/com/android/launcher3/BaseDraggingActivity.java @@ -120,6 +120,10 @@ public abstract class BaseDraggingActivity extends BaseActivity public abstract View getRootView(); + public void returnToHomescreen() { + // no-op + } + public Rect getViewBounds(View v) { int[] pos = new int[2]; v.getLocationOnScreen(pos); |