Merge "Make foreground scrim darker on Recents View." into sc-dev
diff --git a/go/quickstep/res/values-en-rAU/strings.xml b/go/quickstep/res/values-en-rAU/strings.xml
new file mode 100644
index 0000000..3a609b6
--- /dev/null
+++ b/go/quickstep/res/values-en-rAU/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_share_drop_target_label" msgid="5804774105974539508">"Share app"</string>
+ <string name="action_listen" msgid="2370304050784689486">"Listen"</string>
+ <string name="action_translate" msgid="8028378961867277746">"Translate"</string>
+ <string name="action_search" msgid="6269564710943755464">"Lens"</string>
+</resources>
diff --git a/go/quickstep/res/values-en-rCA/strings.xml b/go/quickstep/res/values-en-rCA/strings.xml
new file mode 100644
index 0000000..3a609b6
--- /dev/null
+++ b/go/quickstep/res/values-en-rCA/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_share_drop_target_label" msgid="5804774105974539508">"Share app"</string>
+ <string name="action_listen" msgid="2370304050784689486">"Listen"</string>
+ <string name="action_translate" msgid="8028378961867277746">"Translate"</string>
+ <string name="action_search" msgid="6269564710943755464">"Lens"</string>
+</resources>
diff --git a/go/quickstep/res/values-en-rGB/strings.xml b/go/quickstep/res/values-en-rGB/strings.xml
new file mode 100644
index 0000000..3a609b6
--- /dev/null
+++ b/go/quickstep/res/values-en-rGB/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_share_drop_target_label" msgid="5804774105974539508">"Share app"</string>
+ <string name="action_listen" msgid="2370304050784689486">"Listen"</string>
+ <string name="action_translate" msgid="8028378961867277746">"Translate"</string>
+ <string name="action_search" msgid="6269564710943755464">"Lens"</string>
+</resources>
diff --git a/go/quickstep/res/values-en-rIN/strings.xml b/go/quickstep/res/values-en-rIN/strings.xml
new file mode 100644
index 0000000..3a609b6
--- /dev/null
+++ b/go/quickstep/res/values-en-rIN/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_share_drop_target_label" msgid="5804774105974539508">"Share app"</string>
+ <string name="action_listen" msgid="2370304050784689486">"Listen"</string>
+ <string name="action_translate" msgid="8028378961867277746">"Translate"</string>
+ <string name="action_search" msgid="6269564710943755464">"Lens"</string>
+</resources>
diff --git a/go/quickstep/res/values-uz/strings.xml b/go/quickstep/res/values-uz/strings.xml
new file mode 100644
index 0000000..4e375c7
--- /dev/null
+++ b/go/quickstep/res/values-uz/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_share_drop_target_label" msgid="5804774105974539508">"Ilovani ulashish"</string>
+ <string name="action_listen" msgid="2370304050784689486">"Tinglash"</string>
+ <string name="action_translate" msgid="8028378961867277746">"Tarjimon"</string>
+ <string name="action_search" msgid="6269564710943755464">"Lens"</string>
+</resources>
diff --git a/quickstep/res/values-en-rAU/strings.xml b/quickstep/res/values-en-rAU/strings.xml
index 1040a03..5aae288 100644
--- a/quickstep/res/values-en-rAU/strings.xml
+++ b/quickstep/res/values-en-rAU/strings.xml
@@ -74,14 +74,10 @@
<string name="gesture_tutorial_try_again" msgid="65962545858556697">"Try again"</string>
<string name="gesture_tutorial_nice" msgid="2936275692616928280">"Nice!"</string>
<string name="gesture_tutorial_step" msgid="1279786122817620968">"Tutorial <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
- <!-- no translation found for allset_title (5021126669778966707) -->
- <skip />
- <!-- no translation found for allset_hint (459504134589971527) -->
- <skip />
- <!-- no translation found for allset_description (6350320429953234580) -->
- <skip />
- <!-- no translation found for allset_navigation_settings (417773244979225071) -->
- <skip />
+ <string name="allset_title" msgid="5021126669778966707">"Ready!"</string>
+ <string name="allset_hint" msgid="459504134589971527">"Swipe up to go home"</string>
+ <string name="allset_description" msgid="6350320429953234580">"You’re ready to start using your phone"</string>
+ <string name="allset_navigation_settings" msgid="417773244979225071"><annotation id="link">"Navigation settings for accessibility"</annotation></string>
<string name="action_share" msgid="2648470652637092375">"Share"</string>
<string name="action_screenshot" msgid="8171125848358142917">"Screenshot"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"This action isn\'t allowed by the app or your organisation"</string>
diff --git a/quickstep/res/values-en-rCA/strings.xml b/quickstep/res/values-en-rCA/strings.xml
index 1040a03..5aae288 100644
--- a/quickstep/res/values-en-rCA/strings.xml
+++ b/quickstep/res/values-en-rCA/strings.xml
@@ -74,14 +74,10 @@
<string name="gesture_tutorial_try_again" msgid="65962545858556697">"Try again"</string>
<string name="gesture_tutorial_nice" msgid="2936275692616928280">"Nice!"</string>
<string name="gesture_tutorial_step" msgid="1279786122817620968">"Tutorial <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
- <!-- no translation found for allset_title (5021126669778966707) -->
- <skip />
- <!-- no translation found for allset_hint (459504134589971527) -->
- <skip />
- <!-- no translation found for allset_description (6350320429953234580) -->
- <skip />
- <!-- no translation found for allset_navigation_settings (417773244979225071) -->
- <skip />
+ <string name="allset_title" msgid="5021126669778966707">"Ready!"</string>
+ <string name="allset_hint" msgid="459504134589971527">"Swipe up to go home"</string>
+ <string name="allset_description" msgid="6350320429953234580">"You’re ready to start using your phone"</string>
+ <string name="allset_navigation_settings" msgid="417773244979225071"><annotation id="link">"Navigation settings for accessibility"</annotation></string>
<string name="action_share" msgid="2648470652637092375">"Share"</string>
<string name="action_screenshot" msgid="8171125848358142917">"Screenshot"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"This action isn\'t allowed by the app or your organisation"</string>
diff --git a/quickstep/res/values-en-rGB/strings.xml b/quickstep/res/values-en-rGB/strings.xml
index 1040a03..5aae288 100644
--- a/quickstep/res/values-en-rGB/strings.xml
+++ b/quickstep/res/values-en-rGB/strings.xml
@@ -74,14 +74,10 @@
<string name="gesture_tutorial_try_again" msgid="65962545858556697">"Try again"</string>
<string name="gesture_tutorial_nice" msgid="2936275692616928280">"Nice!"</string>
<string name="gesture_tutorial_step" msgid="1279786122817620968">"Tutorial <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
- <!-- no translation found for allset_title (5021126669778966707) -->
- <skip />
- <!-- no translation found for allset_hint (459504134589971527) -->
- <skip />
- <!-- no translation found for allset_description (6350320429953234580) -->
- <skip />
- <!-- no translation found for allset_navigation_settings (417773244979225071) -->
- <skip />
+ <string name="allset_title" msgid="5021126669778966707">"Ready!"</string>
+ <string name="allset_hint" msgid="459504134589971527">"Swipe up to go home"</string>
+ <string name="allset_description" msgid="6350320429953234580">"You’re ready to start using your phone"</string>
+ <string name="allset_navigation_settings" msgid="417773244979225071"><annotation id="link">"Navigation settings for accessibility"</annotation></string>
<string name="action_share" msgid="2648470652637092375">"Share"</string>
<string name="action_screenshot" msgid="8171125848358142917">"Screenshot"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"This action isn\'t allowed by the app or your organisation"</string>
diff --git a/quickstep/res/values-en-rIN/strings.xml b/quickstep/res/values-en-rIN/strings.xml
index 1040a03..5aae288 100644
--- a/quickstep/res/values-en-rIN/strings.xml
+++ b/quickstep/res/values-en-rIN/strings.xml
@@ -74,14 +74,10 @@
<string name="gesture_tutorial_try_again" msgid="65962545858556697">"Try again"</string>
<string name="gesture_tutorial_nice" msgid="2936275692616928280">"Nice!"</string>
<string name="gesture_tutorial_step" msgid="1279786122817620968">"Tutorial <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
- <!-- no translation found for allset_title (5021126669778966707) -->
- <skip />
- <!-- no translation found for allset_hint (459504134589971527) -->
- <skip />
- <!-- no translation found for allset_description (6350320429953234580) -->
- <skip />
- <!-- no translation found for allset_navigation_settings (417773244979225071) -->
- <skip />
+ <string name="allset_title" msgid="5021126669778966707">"Ready!"</string>
+ <string name="allset_hint" msgid="459504134589971527">"Swipe up to go home"</string>
+ <string name="allset_description" msgid="6350320429953234580">"You’re ready to start using your phone"</string>
+ <string name="allset_navigation_settings" msgid="417773244979225071"><annotation id="link">"Navigation settings for accessibility"</annotation></string>
<string name="action_share" msgid="2648470652637092375">"Share"</string>
<string name="action_screenshot" msgid="8171125848358142917">"Screenshot"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"This action isn\'t allowed by the app or your organisation"</string>
diff --git a/quickstep/res/values-uz/strings.xml b/quickstep/res/values-uz/strings.xml
index 4ddcae8..8ca3898 100644
--- a/quickstep/res/values-uz/strings.xml
+++ b/quickstep/res/values-uz/strings.xml
@@ -74,14 +74,10 @@
<string name="gesture_tutorial_try_again" msgid="65962545858556697">"Qayta urinish"</string>
<string name="gesture_tutorial_nice" msgid="2936275692616928280">"Yaxshi!"</string>
<string name="gesture_tutorial_step" msgid="1279786122817620968">"Darslik: <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
- <!-- no translation found for allset_title (5021126669778966707) -->
- <skip />
- <!-- no translation found for allset_hint (459504134589971527) -->
- <skip />
- <!-- no translation found for allset_description (6350320429953234580) -->
- <skip />
- <!-- no translation found for allset_navigation_settings (417773244979225071) -->
- <skip />
+ <string name="allset_title" msgid="5021126669778966707">"Hammasi tayyor!"</string>
+ <string name="allset_hint" msgid="459504134589971527">"Boshiga qaytish uchun tepaga suring"</string>
+ <string name="allset_description" msgid="6350320429953234580">"Telefoningiz xizmatga tayyor"</string>
+ <string name="allset_navigation_settings" msgid="417773244979225071"><annotation id="link">"Maxsus imkoniyatlar uchun navigatsiya sozlamalari"</annotation></string>
<string name="action_share" msgid="2648470652637092375">"Ulashish"</string>
<string name="action_screenshot" msgid="8171125848358142917">"Skrinshot"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"Bu amal ilova yoki tashkilotingiz tomonidan taqiqlangan"</string>
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
index 2aac877..6966fb6 100644
--- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -23,6 +23,7 @@
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
+import static com.android.quickstep.util.NavigationModeFeatureFlag.LIVE_TILE;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY;
import android.animation.AnimatorSet;
@@ -190,6 +191,15 @@
}
@Override
+ protected void onScreenOff() {
+ super.onScreenOff();
+ if (LIVE_TILE.get()) {
+ RecentsView recentsView = getOverviewPanel();
+ recentsView.finishRecentsAnimation(true /* toRecents */, null);
+ }
+ }
+
+ @Override
public void startIntentSenderForResult(IntentSender intent, int requestCode,
Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) {
if (requestCode != -1) {
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java
index b0d0b15..e2747df 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java
@@ -78,18 +78,9 @@
return true;
}
if (AbstractFloatingView.getTopOpenView(mLauncher) != null) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
- "Didn't intercept touch due to top view: "
- + AbstractFloatingView.getTopOpenView(mLauncher));
- }
return false;
}
if ((ev.getEdgeFlags() & EDGE_NAV_BAR) == 0) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
- "Didn't intercept touch because event wasn't from nav bar");
- }
return false;
}
if (!mIsTransposed && mLauncher.isInState(OVERVIEW)) {
@@ -101,10 +92,6 @@
@Override
public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
boolean intercept = super.onControllerInterceptTouchEvent(ev);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
- "2 button touch controller intercept touch? " + intercept);
- }
return intercept;
}
@@ -123,10 +110,6 @@
@Override
protected void onReinitToState(LauncherState newToState) {
super.onReinitToState(newToState);
-
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "onReinitToState: " + newToState);
- }
}
@Override
@@ -175,9 +158,6 @@
@Override
protected void onSwipeInteractionCompleted(LauncherState targetState) {
super.onSwipeInteractionCompleted(targetState);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "Reached state: " + targetState);
- }
if (!mIsTransposed) {
mContinuousTouchCount++;
}
diff --git a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
index 62b821c..35a851a 100644
--- a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
+++ b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
@@ -35,7 +35,6 @@
import com.android.launcher3.R;
import com.android.launcher3.ResourceUtils;
-import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.DisplayController.Info;
import java.io.PrintWriter;
@@ -92,7 +91,7 @@
};
private static final String TAG = "OrientationTouchTransformer";
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final int QUICKSTEP_ROTATION_UNINITIALIZED = -1;
@@ -161,11 +160,9 @@
resetSwipeRegions(info);
}
- void setNavigationMode(SysUINavigationMode.Mode newMode, Info info,
- Resources newRes) {
+ void setNavigationMode(SysUINavigationMode.Mode newMode, Info info, Resources newRes) {
if (DEBUG) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "setNavigationMode new: " + newMode
- + " oldMode: " + mMode + " " + this);
+ Log.d(TAG, "setNavigationMode new: " + newMode + " oldMode: " + mMode + " " + this);
}
if (mMode == newMode) {
return;
@@ -258,18 +255,10 @@
mCurrentDisplay = new CurrentDisplay(region.currentSize, region.rotation);
OrientationRectF regionToKeep = mSwipeTouchRegions.get(mCurrentDisplay);
- if (DEBUG) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "cached region: " + regionToKeep
- + " mCurrentDisplay: " + mCurrentDisplay + " " + this);
- }
if (regionToKeep == null) {
regionToKeep = createRegionForDisplay(region);
}
mSwipeTouchRegions.clear();
- if (DEBUG) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "adding region: " + regionToKeep
- + " mCurrentDisplay: " + mCurrentDisplay + " " + this);
- }
mSwipeTouchRegions.put(mCurrentDisplay, regionToKeep);
updateAssistantRegions(regionToKeep);
}
@@ -301,10 +290,6 @@
mAssistantLeftRegion.setEmpty();
mAssistantRightRegion.setEmpty();
int navbarSize = getNavbarSize(ResourceUtils.NAVBAR_LANDSCAPE_LEFT_RIGHT_SIZE);
- if (DEBUG) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "else case mode: " + mMode
- + " getNavbarSize: " + navbarSize + " rotation: " + rotation + " " + this);
- }
switch (rotation) {
case Surface.ROTATION_90:
orientationRectF.left = orientationRectF.right
@@ -355,8 +340,8 @@
}
boolean touchInValidSwipeRegions(float x, float y) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "touchInValidSwipeRegions " + x + "," + y + " in "
+ if (DEBUG) {
+ Log.d(TAG, "touchInValidSwipeRegions " + x + "," + y + " in "
+ mLastRectTouched + " this: " + this);
}
if (mLastRectTouched != null) {
@@ -399,16 +384,10 @@
}
for (OrientationRectF rect : mSwipeTouchRegions.values()) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "transform:DOWN, rect=" + rect);
- }
if (rect == null) {
continue;
}
if (rect.applyTransform(event, false)) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "setting mLastRectTouched");
- }
mLastRectTouched = rect;
mActiveTouchRotation = rect.mRotation;
if (mEnableMultipleRegions
diff --git a/quickstep/src/com/android/quickstep/RecentTasksList.java b/quickstep/src/com/android/quickstep/RecentTasksList.java
index 2f1538b..3302da0 100644
--- a/quickstep/src/com/android/quickstep/RecentTasksList.java
+++ b/quickstep/src/com/android/quickstep/RecentTasksList.java
@@ -93,10 +93,6 @@
* @return The change id of the current task list
*/
public synchronized int getTasks(boolean loadKeysOnly, Consumer<ArrayList<Task>> callback) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: keysOnly=" + loadKeysOnly
- + " callback=" + callback);
- }
final int requestLoadId = mChangeId;
if (mResultsUi.isValidForRequest(requestLoadId, loadKeysOnly)) {
// The list is up to date, send the callback on the next frame,
@@ -105,9 +101,6 @@
// Copy synchronously as the changeId might change by next frame
ArrayList<Task> result = copyOf(mResultsUi);
mMainThreadExecutor.post(() -> {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: no new tasks");
- }
callback.accept(result);
});
}
@@ -118,24 +111,15 @@
// Kick off task loading in the background
mLoadingTasksInBackground = true;
UI_HELPER_EXECUTOR.execute(() -> {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: loading in bg start");
- }
if (!mResultsBg.isValidForRequest(requestLoadId, loadKeysOnly)) {
mResultsBg = loadTasksInBackground(Integer.MAX_VALUE, requestLoadId, loadKeysOnly);
}
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: loading in bg end");
- }
TaskLoadResult loadResult = mResultsBg;
mMainThreadExecutor.execute(() -> {
mLoadingTasksInBackground = false;
mResultsUi = loadResult;
if (callback != null) {
ArrayList<Task> result = copyOf(mResultsUi);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: callback w/ bg results");
- }
callback.accept(result);
}
});
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
index e271203..110b356 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
@@ -229,7 +229,6 @@
* Cleans up all the registered listeners and receivers.
*/
public void destroy() {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "destroying RADS", new Throwable());
for (Runnable r : mOnDestroyActions) {
r.run();
}
diff --git a/quickstep/src/com/android/quickstep/RotationTouchHelper.java b/quickstep/src/com/android/quickstep/RotationTouchHelper.java
index 7629862..070d725 100644
--- a/quickstep/src/com/android/quickstep/RotationTouchHelper.java
+++ b/quickstep/src/com/android/quickstep/RotationTouchHelper.java
@@ -133,8 +133,6 @@
private RotationTouchHelper(Context context) {
mContext = context;
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RotationTouchHelper ctor init? " + mNeedsInit
- + " " + this);
if (mNeedsInit) {
init();
}
@@ -142,11 +140,8 @@
public void init() {
if (!mNeedsInit) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "Did not need init? " + " " + this);
return;
}
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RotationTouchHelper init() " + this,
- new Throwable());
mDisplayController = DisplayController.INSTANCE.get(mContext);
Resources resources = mContext.getResources();
mSysUiNavMode = SysUINavigationMode.INSTANCE.get(mContext);
@@ -157,8 +152,6 @@
// Register for navigation mode changes
SysUINavigationMode.Mode newMode = mSysUiNavMode.addModeChangeListener(this);
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "AddedModeChangeListener: " + this +
- " currentMode: " + newMode);
onNavigationModeChanged(newMode);
runOnDestroy(() -> mSysUiNavMode.removeModeChangeListener(this));
@@ -204,7 +197,6 @@
* Cleans up all the registered listeners and receivers.
*/
public void destroy() {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "destroying " + this);
for (Runnable r : mOnDestroyActions) {
r.run();
}
@@ -253,7 +245,6 @@
@Override
public void onNavigationModeChanged(SysUINavigationMode.Mode newMode) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "nav mode changed: " + newMode);
mDisplayController.removeChangeListener(this);
mDisplayController.addChangeListener(this);
onDisplayInfoChanged(mContext, mDisplayController.getInfo(), CHANGE_ALL);
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index 5fe0fc7..027dd1c 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -165,8 +165,6 @@
@BinderThread
public void onInitialize(Bundle bundle) {
- Log.d(TAG + " b/182478748", "TouchInteractionService.onInitialize: user="
- + getUserId());
ISystemUiProxy proxy = ISystemUiProxy.Stub.asInterface(
bundle.getBinder(KEY_EXTRA_SYSUI_PROXY));
IPip pip = IPip.Stub.asInterface(bundle.getBinder(KEY_EXTRA_SHELL_PIP));
@@ -350,8 +348,6 @@
mMainChoreographer = Choreographer.getInstance();
mAM = ActivityManagerWrapper.getInstance();
mDeviceState = new RecentsAnimationDeviceState(this, true);
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RADS OTT instance: " +
- mDeviceState.getRotationTouchHelper().getOrientationTouchTransformer());
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
@@ -363,8 +359,6 @@
}
private void disposeEventHandlers() {
- Log.d(TAG + " b/182478748", "TouchInteractionService.disposeEventHandlers: user="
- + getUserId());
if (mInputEventReceiver != null) {
mInputEventReceiver.dispose();
mInputEventReceiver = null;
@@ -376,21 +370,12 @@
}
private void initInputMonitor() {
- Log.d(TAG + " b/182478748", "TouchInteractionService.initInputMonitor: user="
- + getUserId());
disposeEventHandlers();
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.TIS_NO_EVENTS, "initInputMonitor: isButtonMode? "
- + mDeviceState.isButtonNavMode());
- }
-
if (mDeviceState.isButtonNavMode()) {
- Log.d(TAG + " b/182478748", "isButtonNav: user=" + getUserId());
return;
}
- Log.d(TAG + " b/182478748", "create swipe-up input monitor: user=" + getUserId());
mInputMonitorCompat = new InputMonitorCompat("swipe-up", mDeviceState.getDisplayId());
mInputEventReceiver = mInputMonitorCompat.getInputReceiver(Looper.getMainLooper(),
mMainChoreographer, this::onInputEvent);
@@ -572,17 +557,10 @@
final int action = event.getAction();
if (action == ACTION_DOWN) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "TouchInteractionService.onInputEvent:DOWN");
- }
mRotationTouchHelper.setOrientationTransformIfNeeded(event);
if (!mDeviceState.isOneHandedModeActive()
&& mRotationTouchHelper.isInSwipeUpTouchRegion(event)) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME,
- "TouchInteractionService.onInputEvent:isInSwipeUpTouchRegion");
- }
// Clone the previous gesture state since onConsumerAboutToBeSwitched might trigger
// onConsumerInactive and wipe the previous gesture state
GestureState prevGestureState = new GestureState(mGestureState);
@@ -678,9 +656,6 @@
private InputConsumer newConsumer(GestureState previousGestureState,
GestureState newGestureState, MotionEvent event) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "newConsumer");
- }
boolean canStartSystemGesture = mDeviceState.canStartSystemGesture();
if (!mDeviceState.isUserUnlocked()) {
@@ -692,9 +667,6 @@
return mResetGestureInputConsumer;
}
}
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_SWIPE_TO_HOME, "newConsumer:user is unlocked");
- }
// When there is an existing recents animation running, bypass systemState check as this is
// a followup gesture and the first gesture started in a valid system state.
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java
index 1bb8e96..ac3fb27 100644
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java
@@ -140,10 +140,6 @@
// as well. This tile is never shown as we have setCurrentTaskHidden, but allows use to
// track the index of the next task appropriately, as if we are switching on any other app.
if (mHomeTaskInfo != null && mHomeTaskInfo.taskId == mRunningTaskId && !tasks.isEmpty()) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED,
- "FallbackRecentsView.applyLoadPlan: running task is home");
- }
// Check if the task list has running task
boolean found = false;
for (Task t : tasks) {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 7bd0195..3eba9eb 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1087,12 +1087,6 @@
}
protected void applyLoadPlan(ArrayList<Task> tasks) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "applyLoadPlan: taskCount=" + tasks.size());
- for (Task t : tasks) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "\t" + t);
- }
- }
if (mPendingAnimation != null) {
mPendingAnimation.addEndListener(success -> applyLoadPlan(tasks));
return;
@@ -1154,11 +1148,6 @@
resetTaskVisuals();
onTaskStackUpdated();
updateEnabledOverlays();
-
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "applyLoadPlan: taskViewCount="
- + getTaskViewCount());
- }
}
private boolean isModal() {
@@ -1179,12 +1168,6 @@
}
public int getTaskViewCount() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getTaskViewCount:"
- + " numChildren=" + getChildCount()
- + " start=" + mTaskViewStartIndex
- + " clearAll=" + indexOfChild(mClearAllButton));
- }
int taskViewCount = getChildCount() - mTaskViewStartIndex;
if (indexOfChild(mClearAllButton) != -1) {
taskViewCount--;
diff --git a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
index f93d87c..b6b7f50 100644
--- a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
+++ b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
@@ -178,13 +178,13 @@
protected <T> T getFromRecents(Function<RecentsActivity, T> f) {
if (!TestHelpers.isInLauncherProcess()) return null;
if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "getFromRecents");
+ Log.d(TestProtocol.FALLBACK_ACTIVITY_NO_SET, "getFromRecents");
}
Object[] result = new Object[1];
Wait.atMost("Failed to get from recents", () -> MAIN_EXECUTOR.submit(() -> {
RecentsActivity activity = RecentsActivity.ACTIVITY_TRACKER.getCreatedActivity();
if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "activity=" + activity);
+ Log.d(TestProtocol.FALLBACK_ACTIVITY_NO_SET, "activity=" + activity);
}
if (activity == null) {
return false;
@@ -212,10 +212,6 @@
BaseOverview overview = mLauncher.getBackground().switchToOverview();
executeOnRecents(recents -> {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.GET_RECENTS_FAILED, "isLoading=" +
- recents.<RecentsView>getOverviewPanel().isLoadingTasks());
- }
assertTrue("Don't have at least 3 tasks", getTaskCount(recents) >= 3);
});
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index a700e16..a5038a1 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -189,12 +189,10 @@
@NavigationModeSwitch
@PortraitLandscape
public void testSwitchToOverview() throws Exception {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "testSwitchToOverview");
assertNotNull("Workspace.switchToOverview() returned null",
mLauncher.pressHome().switchToOverview());
assertTrue("Launcher internal state didn't switch to Overview",
isInState(() -> LauncherState.OVERVIEW));
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "testSwitchToOverview finished");
}
@Test
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 8dd37bc..5af3e7d 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -97,8 +97,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> items"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> or more items"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpapers"</string>
- <!-- no translation found for styles_wallpaper_button_text (8216961355289236794) -->
- <skip />
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Wallpaper & style"</string>
<string name="settings_button_text" msgid="8873672322605444408">"Home settings"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"Disabled by your admin"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Allow Home screen rotation"</string>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index 8dd37bc..5af3e7d 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -97,8 +97,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> items"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> or more items"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpapers"</string>
- <!-- no translation found for styles_wallpaper_button_text (8216961355289236794) -->
- <skip />
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Wallpaper & style"</string>
<string name="settings_button_text" msgid="8873672322605444408">"Home settings"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"Disabled by your admin"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Allow Home screen rotation"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 8dd37bc..5af3e7d 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -97,8 +97,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> items"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> or more items"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpapers"</string>
- <!-- no translation found for styles_wallpaper_button_text (8216961355289236794) -->
- <skip />
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Wallpaper & style"</string>
<string name="settings_button_text" msgid="8873672322605444408">"Home settings"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"Disabled by your admin"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Allow Home screen rotation"</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 8dd37bc..5af3e7d 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -97,8 +97,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> items"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> or more items"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpapers"</string>
- <!-- no translation found for styles_wallpaper_button_text (8216961355289236794) -->
- <skip />
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Wallpaper & style"</string>
<string name="settings_button_text" msgid="8873672322605444408">"Home settings"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"Disabled by your admin"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Allow Home screen rotation"</string>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 52b06ac..7f0ced4 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -97,8 +97,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"Jild: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> fayllar"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"Jild: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> va undan ortiq fayllar"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fon rasmlari"</string>
- <!-- no translation found for styles_wallpaper_button_text (8216961355289236794) -->
- <skip />
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Fon rasmi va stili"</string>
<string name="settings_button_text" msgid="8873672322605444408">"Bosh ekran sozlamalari"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"Administrator tomonidan o‘chirilgan"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Bosh ekranni burishga ruxsat"</string>
diff --git a/res/values/config.xml b/res/values/config.xml
index 9ad1224..2e5ecba 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -77,11 +77,6 @@
<!-- Menu id for feature flags -->
<item type="id" name="menu_apply_flags" />
- <!-- Popup items -->
- <integer name="config_popupOpenCloseDuration">150</integer>
- <integer name="config_popupArrowOpenCloseDuration">40</integer>
- <integer name="config_removeNotificationViewDuration">300</integer>
-
<!-- Default packages -->
<string name="wallpaper_picker_package" translatable="false"></string>
<string name="local_colors_extraction_class" translatable="false"></string>
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java
index 95cdbdd..32b2c9a 100644
--- a/src/com/android/launcher3/AbstractFloatingView.java
+++ b/src/com/android/launcher3/AbstractFloatingView.java
@@ -39,6 +39,7 @@
import com.android.launcher3.util.TouchController;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
+import com.android.launcher3.widget.LocalColorExtractor;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -108,12 +109,21 @@
protected boolean mIsOpen;
+ // Index used to get background color when using local wallpaper color extraction.
+ protected int mColorExtractionIndex;
+
public AbstractFloatingView(Context context, AttributeSet attrs) {
super(context, attrs);
+ init(context);
}
public AbstractFloatingView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
+ init(context);
+ }
+
+ private void init(Context context) {
+ mColorExtractionIndex = LocalColorExtractor.getColorIndex(context);
}
/**
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index 7836fa3..318dde1 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -369,10 +369,6 @@
}
private void onConfigChanged(Context context) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "IDP.onConfigChanged");
- }
-
// Re-init grid
String gridName = getCurrentGridName(context);
initGrid(context, gridName);
@@ -527,11 +523,6 @@
float availableWidth = config.screenWidthDp * res.getDisplayMetrics().density;
float availableHeight = config.screenHeightDp * res.getDisplayMetrics().density;
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED,
- "getDeviceProfile: orientation=" + config.orientation
- + " size=" + availableWidth + "x" + availableHeight);
- }
DeviceProfile bestMatch = supportedProfiles.get(0);
float minDiff = Float.MAX_VALUE;
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5896f5a..491d95d 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -554,21 +554,12 @@
onIdpChanged(mDeviceProfile.inv);
}
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "onConfigurationChanged: diff=" + diff);
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "newConfig=" + newConfig);
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "oldConfig=" + mOldConfig);
- }
-
mOldConfig.setTo(newConfig);
super.onConfigurationChanged(newConfig);
}
@Override
public void onIdpChanged(InvariantDeviceProfile idp) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "onIdpChanged");
- }
initDeviceProfile(idp);
dispatchDeviceProfileChanged();
reapplyUi();
@@ -1346,14 +1337,7 @@
private final BroadcastReceiver mScreenOffReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- // Reset AllApps to its initial state only if we are not in the middle of
- // processing a multi-step drop
- if (mPendingRequestArgs == null) {
- if (!isInState(NORMAL)) {
- onUiChangedWhileSleeping();
- }
- mStateManager.goToState(NORMAL);
- }
+ onScreenOff();
}
};
@@ -1923,6 +1907,17 @@
}
}
+ protected void onScreenOff() {
+ // Reset AllApps to its initial state only if we are not in the middle of
+ // processing a multi-step drop
+ if (mPendingRequestArgs == null) {
+ if (!isInState(NORMAL)) {
+ onUiChangedWhileSleeping();
+ }
+ mStateManager.goToState(NORMAL);
+ }
+ }
+
@TargetApi(Build.VERSION_CODES.M)
@Override
protected boolean onErrorStartingShortcut(Intent intent, ItemInfo info) {
diff --git a/src/com/android/launcher3/anim/Interpolators.java b/src/com/android/launcher3/anim/Interpolators.java
index 11e831e..9d73bba 100644
--- a/src/com/android/launcher3/anim/Interpolators.java
+++ b/src/com/android/launcher3/anim/Interpolators.java
@@ -53,6 +53,9 @@
public static final Interpolator AGGRESSIVE_EASE = new PathInterpolator(0.2f, 0f, 0f, 1f);
public static final Interpolator AGGRESSIVE_EASE_IN_OUT = new PathInterpolator(0.6f,0, 0.4f, 1);
+ public static final Interpolator DECELERATED_EASE = new PathInterpolator(0, 0, .2f, 1f);
+ public static final Interpolator ACCELERATED_EASE = new PathInterpolator(0.4f, 0, 1f, 1f);
+
public static final Interpolator EXAGGERATED_EASE;
public static final Interpolator INSTANT = t -> 1;
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index ba5101b..6b42d98 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -88,7 +88,7 @@
"ENABLE_QUICKSTEP_LIVE_TILE", true, "Enable live tile in Quickstep overview");
public static final BooleanFlag ENABLE_QUICKSTEP_WIDGET_APP_START = getDebugFlag(
- "ENABLE_QUICKSTEP_WIDGET_APP_START", false,
+ "ENABLE_QUICKSTEP_WIDGET_APP_START", true,
"Enable Quickstep animation when launching activities from an app widget");
// Keep as DeviceFlag to allow remote disable in emergency.
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index cf1cb45..92d891f 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -31,6 +31,7 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.appwidget.AppWidgetHostView;
import android.content.Context;
@@ -38,6 +39,8 @@
import android.graphics.Insets;
import android.graphics.Path;
import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.text.InputType;
import android.text.Selection;
@@ -45,6 +48,7 @@
import android.util.AttributeSet;
import android.util.Log;
import android.util.Pair;
+import android.util.SparseIntArray;
import android.util.TypedValue;
import android.view.FocusFinder;
import android.view.KeyEvent;
@@ -96,13 +100,16 @@
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pageindicators.PageIndicatorDots;
import com.android.launcher3.util.Executors;
+import com.android.launcher3.util.Themes;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
import com.android.launcher3.views.ClipPathView;
+import com.android.launcher3.widget.LocalColorExtractor;
import com.android.launcher3.widget.PendingAddShortcutInfo;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -152,6 +159,7 @@
private static final float ICON_OVERSCROLL_WIDTH_FACTOR = 0.45f;
private static final int FOLDER_NAME_ANIMATION_DURATION = 633;
+ private static final int FOLDER_COLOR_ANIMATION_DURATION = 150;
private static final int REORDER_DELAY = 250;
private static final int ON_EXIT_CLOSE_DELAY = 400;
@@ -224,6 +232,19 @@
@Nullable private FolderWindowInsetsAnimationCallback mFolderWindowInsetsAnimationCallback;
+ // Wallpaper local color extraction
+ @Nullable private LocalColorExtractor mColorExtractor;
+ @Nullable private LocalColorExtractor.Listener mColorListener;
+ private final Rect mTempRect = new Rect();
+ private final RectF mTempRectF = new RectF();
+
+ // For simplicity, we start the color change only after the open animation has started.
+ private Runnable mColorChangeRunnable;
+ private Animator mColorChangeAnimator;
+ // The background color animator used in the folder open animation. We keep a reference to this,
+ // so that we can cancel it when starting mColorChangeAnimator.
+ private ObjectAnimator mOpenAnimationColorChangeAnimator;
+
/**
* Used to inflate the Workspace from XML.
*
@@ -241,7 +262,6 @@
// name is complete, we have something to focus on, thus hiding the cursor and giving
// reliable behavior when clicking the text field (since it will always gain focus on click).
setFocusableInTouchMode(true);
-
}
@Override
@@ -276,6 +296,45 @@
setWindowInsetsAnimationCallback(mFolderWindowInsetsAnimationCallback);
}
+
+ if (Utilities.ATLEAST_S) {
+ mColorExtractor = LocalColorExtractor.newInstance(mLauncher);
+ mColorListener = (RectF rect, SparseIntArray extractedColors) -> {
+ mColorChangeRunnable = () -> {
+ mColorChangeRunnable = null;
+ int duration = FOLDER_COLOR_ANIMATION_DURATION;
+
+ // Cancel the open animation color change animator.
+ ObjectAnimator existingAnim = mOpenAnimationColorChangeAnimator;
+ if (existingAnim != null && existingAnim.isRunning()) {
+ duration = (int) Math.max(FOLDER_COLOR_ANIMATION_DURATION,
+ existingAnim.getDuration() * (1f - existingAnim.getDuration()));
+ existingAnim.cancel();
+ mOpenAnimationColorChangeAnimator = null;
+ }
+
+ // Start a new animator to the extracted color.
+ int newColor = extractedColors.get(mColorExtractionIndex);
+ GradientDrawable bg = (GradientDrawable) getBackground();
+ mColorChangeAnimator = ObjectAnimator.ofArgb(bg, "color",
+ bg.getColor().getDefaultColor(), newColor).setDuration(duration);
+ mColorChangeAnimator.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mColorChangeAnimator = null;
+ }
+ });
+ mColorChangeAnimator.start();
+ };
+
+ // If the folder open animation has started, we can start the color change now.
+ // Otherwise we wait for it to start.
+ if (mOpenAnimationColorChangeAnimator != null
+ && mOpenAnimationColorChangeAnimator.isStarted()) {
+ post(mColorChangeRunnable);
+ }
+ };
+ }
}
public boolean onLongClick(View v) {
@@ -652,15 +711,18 @@
// dropping. One resulting issue is that replaceFolderWithFinalItem() can be called twice.
mDeleteFolderOnDropCompleted = false;
- if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
- mCurrentAnimator.cancel();
- }
- AnimatorSet anim = new FolderAnimationManager(this, true /* isOpening */).getAnimator();
+ cancelRunningAnimations();
+ FolderAnimationManager fam = new FolderAnimationManager(this, true /* isOpening */);
+ AnimatorSet anim = fam.getAnimator();
+ mOpenAnimationColorChangeAnimator = fam.getBgColorAnimator();
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
mFolderIcon.setIconVisible(false);
mFolderIcon.drawLeaveBehindIfExists();
+ if (mColorChangeRunnable != null) {
+ mColorChangeRunnable.run();
+ }
}
@Override
public void onAnimationEnd(Animator animation) {
@@ -752,6 +814,15 @@
AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
}
+ private void cancelRunningAnimations() {
+ if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
+ mCurrentAnimator.cancel();
+ }
+ if (mColorChangeAnimator != null && mColorChangeAnimator.isRunning()) {
+ mColorChangeAnimator.cancel();
+ }
+ }
+
private void animateClosed() {
if (mIsAnimatingClosed) {
return;
@@ -760,9 +831,7 @@
mContent.completePendingPageChanges();
mContent.snapToPageImmediately(mContent.getDestinationPage());
- if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
- mCurrentAnimator.cancel();
- }
+ cancelRunningAnimations();
AnimatorSet a = new FolderAnimationManager(this, false /* isOpening */).getAnimator();
a.addListener(new AnimatorListenerAdapter() {
@Override
@@ -837,6 +906,19 @@
clearDragInfo();
mState = STATE_SMALL;
mContent.setCurrentPage(0);
+
+ mOpenAnimationColorChangeAnimator = null;
+ mColorChangeRunnable = null;
+ if (mColorChangeAnimator != null) {
+ mColorChangeAnimator.cancel();
+ mColorChangeAnimator = null;
+ }
+ if (mColorExtractor != null) {
+ mColorExtractor.removeLocations();
+ mColorExtractor.setListener(null);
+ }
+ GradientDrawable bg = (GradientDrawable) getBackground();
+ bg.setColor(Themes.getAttrColor(getContext(), R.attr.folderFillColor));
}
@Override
@@ -1104,6 +1186,17 @@
lp.height = height;
lp.x = left;
lp.y = top;
+
+ if (mColorExtractor != null) {
+ mColorExtractor.removeLocations();
+ mColorExtractor.setListener(mColorListener);
+ mTempRect.set(lp.x, lp.y, lp.x + lp.width, lp.y + lp.height);
+ mColorExtractor.getExtractedRectForViewRect(mLauncher,
+ mLauncher.getWorkspace().getCurrentPage(), mTempRect, mTempRectF);
+ if (!mTempRectF.isEmpty()) {
+ mColorExtractor.addLocation(Arrays.asList(mTempRectF));
+ }
+ }
}
protected int getContentAreaHeight() {
diff --git a/src/com/android/launcher3/folder/FolderAnimationManager.java b/src/com/android/launcher3/folder/FolderAnimationManager.java
index ee6ea99..af8be8d 100644
--- a/src/com/android/launcher3/folder/FolderAnimationManager.java
+++ b/src/com/android/launcher3/folder/FolderAnimationManager.java
@@ -35,8 +35,6 @@
import android.view.View;
import android.view.animation.AnimationUtils;
-import androidx.core.graphics.ColorUtils;
-
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.CellLayout;
import com.android.launcher3.R;
@@ -80,6 +78,8 @@
private final PreviewItemDrawingParams mTmpParams = new PreviewItemDrawingParams(0, 0, 0, 0);
private final FolderGridOrganizer mPreviewVerifier;
+ private ObjectAnimator mBgColorAnimator;
+
public FolderAnimationManager(Folder folder, boolean isOpening) {
mFolder = folder;
mContent = folder.mContent;
@@ -105,6 +105,12 @@
R.interpolator.large_folder_preview_item_close_interpolator);
}
+ /**
+ * Returns the animator that changes the background color.
+ */
+ public ObjectAnimator getBgColorAnimator() {
+ return mBgColorAnimator;
+ }
/**
* Prepares the Folder for animating between open / closed states.
@@ -162,10 +168,15 @@
final float yDistance = initialY - lp.y;
// Set up the Folder background.
- final int finalColor = ColorUtils.setAlphaComponent(
- Themes.getAttrColor(mContext, R.attr.folderFillColor), 255);
- final int initialColor = setColorAlphaBound(
- finalColor, mPreviewBackground.getBackgroundAlpha());
+ int previewBackgroundColor = Themes.getAttrColor(mContext, R.attr.folderFillColor);
+ final int finalColor;
+ if (mIsOpening) {
+ finalColor = Themes.getAttrColor(mContext, R.attr.popupColorPrimary);
+ } else {
+ finalColor = mFolderBackground.getColor().getDefaultColor();
+ }
+ final int initialColor = setColorAlphaBound(previewBackgroundColor,
+ mPreviewBackground.getBackgroundAlpha());
mFolderBackground.mutate();
mFolderBackground.setColor(mIsOpening ? initialColor : finalColor);
@@ -193,11 +204,12 @@
play(a, anim);
}
+ mBgColorAnimator = getAnimator(mFolderBackground, "color", initialColor, finalColor);
+ play(a, mBgColorAnimator);
play(a, getAnimator(mFolder, View.TRANSLATION_X, xDistance, 0f));
play(a, getAnimator(mFolder, View.TRANSLATION_Y, yDistance, 0f));
play(a, getAnimator(mFolder.mContent, SCALE_PROPERTY, initialScale, finalScale));
play(a, getAnimator(mFolder.mFooter, SCALE_PROPERTY, initialScale, finalScale));
- play(a, getAnimator(mFolderBackground, "color", initialColor, finalColor));
play(a, mFolderIcon.mFolderName.createTextAlphaAnimator(!mIsOpening));
play(a, getShape().createRevealAnimator(
mFolder, startRect, endRect, finalRadius, !mIsOpening));
@@ -409,7 +421,7 @@
: ObjectAnimator.ofFloat(view, property, v2, v1);
}
- private Animator getAnimator(GradientDrawable drawable, String property, int v1, int v2) {
+ private ObjectAnimator getAnimator(GradientDrawable drawable, String property, int v1, int v2) {
return mIsOpening
? ObjectAnimator.ofArgb(drawable, property, v1, v2)
: ObjectAnimator.ofArgb(drawable, property, v2, v1);
diff --git a/src/com/android/launcher3/model/LoaderCursor.java b/src/com/android/launcher3/model/LoaderCursor.java
index 897b02e..7e3bcee 100644
--- a/src/com/android/launcher3/model/LoaderCursor.java
+++ b/src/com/android/launcher3/model/LoaderCursor.java
@@ -52,6 +52,7 @@
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
+import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.util.ContentWriter;
import com.android.launcher3.util.GridOccupancy;
import com.android.launcher3.util.IntArray;
@@ -394,6 +395,11 @@
* otherwise marks it for deletion.
*/
public void checkAndAddItem(ItemInfo info, BgDataModel dataModel) {
+ if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
+ // Ensure that it is a valid intent. An exception here will
+ // cause the item loading to get skipped
+ ShortcutKey.fromItemInfo(info);
+ }
if (checkItemPlacement(info)) {
dataModel.addItem(mContext, info, false);
} else {
diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java
index c63d69d..03351af 100644
--- a/src/com/android/launcher3/popup/ArrowPopup.java
+++ b/src/com/android/launcher3/popup/ArrowPopup.java
@@ -16,7 +16,9 @@
package com.android.launcher3.popup;
-import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
+import static com.android.launcher3.anim.Interpolators.ACCELERATED_EASE;
+import static com.android.launcher3.anim.Interpolators.DECELERATED_EASE;
+import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS;
import android.animation.Animator;
@@ -24,7 +26,6 @@
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
-import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Resources;
@@ -42,6 +43,7 @@
import android.view.ViewGroup;
import android.view.ViewOutlineProvider;
import android.view.ViewTreeObserver;
+import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
@@ -51,13 +53,10 @@
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.InsettableFrameLayout;
import com.android.launcher3.Launcher;
-import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
-import com.android.launcher3.anim.RevealOutlineAnimation;
-import com.android.launcher3.anim.RoundedRectRevealOutlineProvider;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.shortcuts.DeepShortcutView;
import com.android.launcher3.statemanager.StatefulActivity;
@@ -77,11 +76,21 @@
public abstract class ArrowPopup<T extends StatefulActivity<LauncherState>>
extends AbstractFloatingView {
+ // Duration values (ms) for popup open and close animations.
+ private static final int OPEN_DURATION = 276;
+ private static final int OPEN_FADE_START_DELAY = 0;
+ private static final int OPEN_FADE_DURATION = 38;
+ private static final int OPEN_CHILD_FADE_START_DELAY = 38;
+ private static final int OPEN_CHILD_FADE_DURATION = 76;
+
+ private static final int CLOSE_DURATION = 200;
+ private static final int CLOSE_FADE_START_DELAY = 140;
+ private static final int CLOSE_FADE_DURATION = 50;
+ private static final int CLOSE_CHILD_FADE_START_DELAY = 0;
+ private static final int CLOSE_CHILD_FADE_DURATION = 140;
+
// +1 for system shortcut view
private static final int MAX_NUM_CHILDREN = MAX_SHORTCUTS + 1;
- // Index used to get background color when using local wallpaper color extraction,
- private static final int LIGHT_COLOR_EXTRACTION_INDEX = android.R.color.system_accent2_50;
- private static final int DARK_COLOR_EXTRACTION_INDEX = android.R.color.system_accent2_800;
private final Rect mTempRect = new Rect();
@@ -103,10 +112,8 @@
protected boolean mIsAboveIcon;
private int mGravity;
- protected Animator mOpenCloseAnimator;
+ protected AnimatorSet mOpenCloseAnimator;
protected boolean mDeferContainerRemoval;
- private final Rect mStartRect = new Rect();
- private final Rect mEndRect = new Rect();
private final GradientDrawable mRoundedTop;
private final GradientDrawable mRoundedBottom;
@@ -119,7 +126,6 @@
private final int[] mColors;
private final HashMap<String, View> mViewForRect = new HashMap<>();
- private final int mColorExtractionIndex;
@Nullable private LocalColorExtractor mColorExtractor;
public ArrowPopup(Context context, AttributeSet attrs, int defStyleAttr) {
@@ -128,9 +134,6 @@
mOutlineRadius = Themes.getDialogCornerRadius(context);
mLauncher = BaseDraggingActivity.fromContext(context);
mIsRtl = Utilities.isRtl(getResources());
- mColorExtractionIndex = Utilities.isDarkTheme(context)
- ? DARK_COLOR_EXTRACTION_INDEX
- : LIGHT_COLOR_EXTRACTION_INDEX;
setClipToOutline(true);
setOutlineProvider(new ViewOutlineProvider() {
@Override
@@ -557,48 +560,13 @@
return getChildCount() > 0 ? getChildAt(0) : this;
}
- private int getArrowDuration() {
- return shouldAddArrow()
- ? getResources().getInteger(R.integer.config_popupArrowOpenCloseDuration)
- : 0;
- }
-
private void animateOpen() {
setVisibility(View.VISIBLE);
- final AnimatorSet openAnim = new AnimatorSet();
- final Resources res = getResources();
- final long revealDuration = (long) res.getInteger(R.integer.config_popupOpenCloseDuration);
- final long arrowDuration = getArrowDuration();
- final TimeInterpolator revealInterpolator = ACCEL_DEACCEL;
-
- // Rectangular reveal.
- mEndRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
- final ValueAnimator revealAnim = createOpenCloseOutlineProvider()
- .createRevealAnimator(this, false);
- revealAnim.setDuration(revealDuration);
- revealAnim.setInterpolator(revealInterpolator);
- // Clip the popup to the initial outline while the notification dot and arrow animate.
- revealAnim.start();
- revealAnim.pause();
-
- ValueAnimator fadeIn = ValueAnimator.ofFloat(0, 1);
- fadeIn.setDuration(revealDuration + arrowDuration);
- fadeIn.setInterpolator(revealInterpolator);
- fadeIn.addUpdateListener(anim -> {
- float alpha = (float) anim.getAnimatedValue();
- mArrow.setAlpha(alpha);
- setAlpha(revealAnim.isStarted() ? alpha : 0);
- });
- openAnim.play(fadeIn);
-
- // Animate the arrow.
- mArrow.setScaleX(0);
- mArrow.setScaleY(0);
- Animator arrowScale = ObjectAnimator.ofFloat(mArrow, LauncherAnimUtils.SCALE_PROPERTY, 1)
- .setDuration(arrowDuration);
-
- openAnim.addListener(new AnimatorListenerAdapter() {
+ mOpenCloseAnimator = getOpenCloseAnimator(true, OPEN_DURATION, OPEN_FADE_START_DELAY,
+ OPEN_FADE_DURATION, OPEN_CHILD_FADE_START_DELAY, OPEN_CHILD_FADE_DURATION,
+ DECELERATED_EASE);
+ mOpenCloseAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
setAlpha(1f);
@@ -606,56 +574,68 @@
mOpenCloseAnimator = null;
}
});
-
- mOpenCloseAnimator = openAnim;
- openAnim.playSequentially(arrowScale, revealAnim);
- openAnim.start();
+ mOpenCloseAnimator.start();
}
+ private AnimatorSet getOpenCloseAnimator(boolean isOpening, int totalDuration,
+ int fadeStartDelay, int fadeDuration, int childFadeStartDelay,
+ int childFadeDuration, Interpolator interpolator) {
+ final AnimatorSet openAnim = new AnimatorSet();
+ float[] alphaValues = isOpening ? new float[] {0, 1} : new float[] {1, 0};
+ float[] scaleValues = isOpening ? new float[] {0.5f, 1} : new float[] {1, 0.5f};
+
+ ValueAnimator fade = ValueAnimator.ofFloat(alphaValues);
+ fade.setStartDelay(fadeStartDelay);
+ fade.setDuration(fadeDuration);
+ fade.setInterpolator(LINEAR);
+ fade.addUpdateListener(anim -> {
+ float alpha = (float) anim.getAnimatedValue();
+ mArrow.setAlpha(alpha);
+ setAlpha(alpha);
+ });
+ openAnim.play(fade);
+
+ setPivotX(mIsLeftAligned ? 0 : getMeasuredWidth());
+ setPivotY(mIsAboveIcon ? getMeasuredHeight() : 0);
+ Animator scale = ObjectAnimator.ofFloat(this, View.SCALE_Y, scaleValues);
+ scale.setDuration(totalDuration);
+ scale.setInterpolator(interpolator);
+ openAnim.play(scale);
+
+ for (int i = getChildCount() - 1; i >= 0; --i) {
+ View view = getChildAt(i);
+ if (view.getVisibility() == VISIBLE && view instanceof ViewGroup) {
+ for (int j = ((ViewGroup) view).getChildCount() - 1; j >= 0; --j) {
+ View childView = ((ViewGroup) view).getChildAt(j);
+
+ childView.setAlpha(alphaValues[0]);
+ ValueAnimator childFade = ObjectAnimator.ofFloat(childView, ALPHA, alphaValues);
+ childFade.setStartDelay(childFadeStartDelay);
+ childFade.setDuration(childFadeDuration);
+ childFade.setInterpolator(LINEAR);
+
+ openAnim.play(childFade);
+ }
+ }
+ }
+ return openAnim;
+ }
+
+
protected void animateClose() {
if (!mIsOpen) {
return;
}
- if (getOutlineProvider() instanceof RevealOutlineAnimation) {
- ((RevealOutlineAnimation) getOutlineProvider()).getOutline(mEndRect);
- } else {
- mEndRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
- }
if (mOpenCloseAnimator != null) {
mOpenCloseAnimator.cancel();
}
mIsOpen = false;
-
- final AnimatorSet closeAnim = new AnimatorSet();
- final Resources res = getResources();
- final TimeInterpolator revealInterpolator = ACCEL_DEACCEL;
- final long revealDuration = res.getInteger(R.integer.config_popupOpenCloseDuration);
- final long arrowDuration = getArrowDuration();
-
- // Hide the arrow
- Animator scaleArrow = ObjectAnimator.ofFloat(mArrow, LauncherAnimUtils.SCALE_PROPERTY, 0)
- .setDuration(arrowDuration);
-
- // Rectangular reveal (reversed).
- final ValueAnimator revealAnim = createOpenCloseOutlineProvider()
- .createRevealAnimator(this, true);
- revealAnim.setDuration(revealDuration);
- revealAnim.setInterpolator(revealInterpolator);
- closeAnim.playSequentially(revealAnim, scaleArrow);
-
- ValueAnimator fadeOut = ValueAnimator.ofFloat(getAlpha(), 0);
- fadeOut.setDuration(revealDuration + arrowDuration);
- fadeOut.setInterpolator(revealInterpolator);
- fadeOut.addUpdateListener(anim -> {
- float alpha = (float) anim.getAnimatedValue();
- mArrow.setAlpha(alpha);
- setAlpha(scaleArrow.isStarted() ? 0 : alpha);
- });
- closeAnim.play(fadeOut);
-
- onCreateCloseAnimation(closeAnim);
- closeAnim.addListener(new AnimatorListenerAdapter() {
+ mOpenCloseAnimator = getOpenCloseAnimator(false, CLOSE_DURATION, CLOSE_FADE_START_DELAY,
+ CLOSE_FADE_DURATION, CLOSE_CHILD_FADE_START_DELAY, CLOSE_CHILD_FADE_DURATION,
+ ACCELERATED_EASE);
+ onCreateCloseAnimation(mOpenCloseAnimator);
+ mOpenCloseAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
mOpenCloseAnimator = null;
@@ -666,8 +646,7 @@
}
}
});
- mOpenCloseAnimator = closeAnim;
- closeAnim.start();
+ mOpenCloseAnimator.start();
}
/**
@@ -675,16 +654,6 @@
*/
protected void onCreateCloseAnimation(AnimatorSet anim) { }
- private RoundedRectRevealOutlineProvider createOpenCloseOutlineProvider() {
- int arrowLeft = getArrowLeft();
- int arrowCenterY = mIsAboveIcon ? getMeasuredHeight() : 0;
-
- mStartRect.set(arrowLeft, arrowCenterY, arrowLeft + mArrowWidth, arrowCenterY);
-
- return new RoundedRectRevealOutlineProvider(
- mArrowPointRadius, mOutlineRadius, mStartRect, mEndRect);
- }
-
/**
* Closes the popup without animation.
*/
diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java
index 3296ea5..4012e89 100644
--- a/src/com/android/launcher3/testing/TestProtocol.java
+++ b/src/com/android/launcher3/testing/TestProtocol.java
@@ -109,10 +109,6 @@
public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation";
public static final String PERMANENT_DIAG_TAG = "TaplTarget";
- public static final String LAUNCHER_NOT_TRANSPOSED = "b/185820525";
- public static final String NO_SWIPE_TO_HOME = "b/158017601";
public static final String WORK_PROFILE_REMOVED = "b/159671700";
- public static final String TIS_NO_EVENTS = "b/180915942";
- public static final String GET_RECENTS_FAILED = "b/177472267";
- public static final String TWO_BUTTON_NORMAL_NOT_OVERVIEW = "b/177316094";
+ public static final String FALLBACK_ACTIVITY_NO_SET = "b/181019015";
}
diff --git a/src/com/android/launcher3/widget/LocalColorExtractor.java b/src/com/android/launcher3/widget/LocalColorExtractor.java
index 8ae6b2e..a66024a 100644
--- a/src/com/android/launcher3/widget/LocalColorExtractor.java
+++ b/src/com/android/launcher3/widget/LocalColorExtractor.java
@@ -28,6 +28,7 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.util.ResourceBasedOverride;
import java.util.List;
@@ -35,6 +36,10 @@
/** Extracts the colors we need from the wallpaper at given locations. */
public class LocalColorExtractor implements ResourceBasedOverride {
+ // Index used to get background color when using local wallpaper color extraction,
+ private static final int LIGHT_COLOR_EXTRACTION_INDEX = android.R.color.system_accent2_50;
+ private static final int DARK_COLOR_EXTRACTION_INDEX = android.R.color.system_accent2_800;
+
/** Listener for color changes on a screen location. */
public interface Listener {
/**
@@ -103,4 +108,13 @@
RectF colorExtractionRectOut) {
// no-op
}
+
+ /**
+ * Returns an index used to query the color of interest from the list of extracted colors.
+ */
+ public static int getColorIndex(Context context) {
+ return Utilities.isDarkTheme(context)
+ ? DARK_COLOR_EXTRACTION_INDEX
+ : LIGHT_COLOR_EXTRACTION_INDEX;
+ }
}
diff --git a/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java b/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java
index 6c68daa..8f2d528 100644
--- a/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java
+++ b/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java
@@ -55,23 +55,19 @@
}
private void evaluateInPortrait() throws Throwable {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInPortrait");
mTest.mDevice.setOrientationNatural();
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_0);
AbstractLauncherUiTest.checkDetectedLeaks(mTest.mLauncher);
base.evaluate();
mTest.getDevice().pressHome();
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInPortrait finished");
}
private void evaluateInLandscape() throws Throwable {
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInLandscape");
mTest.mDevice.setOrientationLeft();
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_90);
AbstractLauncherUiTest.checkDetectedLeaks(mTest.mLauncher);
base.evaluate();
mTest.getDevice().pressHome();
- Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInLandscape finished");
}
};
}