Snap for 7351654 from 6ee0782167 to sc-release

Change-Id: Ia00fcb62d4cf4f70c9c7b5b6b3d8a3a47d64c2aa
This commit is contained in:
android-build-team Robot
2021-05-11 01:08:09 +00:00
34 changed files with 170 additions and 257 deletions
@@ -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>
@@ -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>
@@ -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>
@@ -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>
+8
View File
@@ -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>
+4 -8
View File
@@ -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">"Youre 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>
+4 -8
View File
@@ -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">"Youre 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>
+4 -8
View File
@@ -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">"Youre 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>
+4 -8
View File
@@ -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">"Youre 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>
+4 -8
View File
@@ -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>
@@ -23,6 +23,7 @@ import static com.android.launcher3.LauncherState.NO_OFFSET;
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;
@@ -189,6 +190,15 @@ public abstract class BaseQuickstepLauncher extends Launcher
() -> ActivityManagerWrapper.getInstance().invalidateHomeTaskSnapshot(this));
}
@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) {
@@ -78,18 +78,9 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
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 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
@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 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
@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 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
@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++;
}
@@ -35,7 +35,6 @@ import android.view.Surface;
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 @@ class OrientationTouchTransformer {
};
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 @@ class OrientationTouchTransformer {
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 @@ class OrientationTouchTransformer {
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 @@ class OrientationTouchTransformer {
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 @@ class OrientationTouchTransformer {
}
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 @@ class OrientationTouchTransformer {
}
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
@@ -93,10 +93,6 @@ public class RecentTasksList extends TaskStackChangeListener {
* @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 @@ public class RecentTasksList extends TaskStackChangeListener {
// 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 @@ public class RecentTasksList extends TaskStackChangeListener {
// 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);
}
});
@@ -229,7 +229,6 @@ public class RecentsAnimationDeviceState implements
* 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();
}
@@ -133,8 +133,6 @@ public class RotationTouchHelper implements
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 class RotationTouchHelper implements
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 @@ public class RotationTouchHelper implements
// 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 @@ public class RotationTouchHelper implements
* 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 @@ public class RotationTouchHelper implements
@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);
@@ -165,8 +165,6 @@ public class TouchInteractionService extends Service implements PluginListener<O
@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 @@ public class TouchInteractionService extends Service implements PluginListener<O
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 @@ public class TouchInteractionService extends Service implements PluginListener<O
}
private void disposeEventHandlers() {
Log.d(TAG + " b/182478748", "TouchInteractionService.disposeEventHandlers: user="
+ getUserId());
if (mInputEventReceiver != null) {
mInputEventReceiver.dispose();
mInputEventReceiver = null;
@@ -376,21 +370,12 @@ public class TouchInteractionService extends Service implements PluginListener<O
}
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 @@ public class TouchInteractionService extends Service implements PluginListener<O
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 @@ public class TouchInteractionService extends Service implements PluginListener<O
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 @@ public class TouchInteractionService extends Service implements PluginListener<O
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.
@@ -140,10 +140,6 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
// 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) {
@@ -63,7 +63,9 @@ import android.annotation.TargetApi;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.BlendMode;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.PointF;
@@ -98,6 +100,7 @@ import android.widget.OverScroller;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
import androidx.core.graphics.ColorUtils;
import com.android.launcher3.BaseActivity;
import com.android.launcher3.BaseActivity.MultiWindowModeChangedListener;
@@ -243,6 +246,24 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
};
/**
* Can be used to tint the color of the RecentsView to simulate a scrim that can views
* excluded from. Really should be a proper scrim.
* TODO(b/187528071): Remove this and replace with a real scrim.
*/
private static final FloatProperty<RecentsView> COLOR_TINT =
new FloatProperty<RecentsView>("colorTint") {
@Override
public void setValue(RecentsView recentsView, float v) {
recentsView.setColorTint(v);
}
@Override
public Float get(RecentsView recentsView) {
return recentsView.getColorTint();
}
};
/**
* Even though {@link TaskView} has distinct offsetTranslationX/Y and resistance property, they
* are currently both used to apply secondary translation. Should their use cases change to be
@@ -404,6 +425,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
// The GestureEndTarget that is still in progress.
protected GestureState.GestureEndTarget mCurrentGestureEndTarget;
// TODO(b/187528071): Remove these and replace with a real scrim.
private float mColorTint;
private final int mTintingColor;
private int mOverScrollShift = 0;
/**
@@ -616,6 +641,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mLiveTileTaskViewSimulator.recentsViewScale.value = 1;
mLiveTileTaskViewSimulator.setOrientationState(mOrientationState);
mLiveTileTaskViewSimulator.setDrawsBelowRecents(true);
mTintingColor = getForegroundScrimDimColor(context);
}
public OverScroller getScroller() {
@@ -1060,12 +1087,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
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;
@@ -1127,11 +1148,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
resetTaskVisuals();
onTaskStackUpdated();
updateEnabledOverlays();
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.GET_RECENTS_FAILED, "applyLoadPlan: taskViewCount="
+ getTaskViewCount());
}
}
private boolean isModal() {
@@ -1152,12 +1168,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
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--;
@@ -1203,6 +1213,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
loadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
setTaskModalness(0);
updateVerticalPageOffsets();
setColorTint(0);
}
public void setFullscreenProgress(float fullscreenProgress) {
@@ -3678,9 +3689,34 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* tasks to be dimmed while other elements in the recents view are left alone.
*/
public void showForegroundScrim(boolean show) {
ObjectAnimator anim = ObjectAnimator.ofFloat(this, COLOR_TINT, show ? 0.5f : 0f);
anim.setAutoCancel(true);
anim.start();
}
/** Tint the RecentsView and TaskViews in to simulate a scrim. */
// TODO(b/187528071): Replace this tinting with a scrim on top of RecentsView
private void setColorTint(float tintAmount) {
mColorTint = tintAmount;
for (int i = 0; i < getTaskViewCount(); i++) {
getTaskViewAt(i).showColorTint(show);
getTaskViewAt(i).setColorTint(mColorTint, mTintingColor);
}
Drawable scrimBg = mActivity.getScrimView().getBackground();
if (scrimBg != null) {
if (tintAmount == 0f) {
scrimBg.setTintList(null);
} else {
scrimBg.setTintBlendMode(BlendMode.SRC_OVER);
scrimBg.setTint(
ColorUtils.setAlphaComponent(mTintingColor, (int) (255 * tintAmount)));
}
}
}
private float getColorTint() {
return mColorTint;
}
private boolean showAsGrid() {
@@ -3756,4 +3792,11 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
});
}
}
/** Get the color used for foreground scrimming the RecentsView for sharing. */
public static int getForegroundScrimDimColor(Context context) {
int baseColor = Themes.getAttrColor(context, R.attr.overviewScrimColor);
// The Black blending is temporary until we have the proper color token.
return ColorUtils.blendARGB(Color.BLACK, baseColor, 0.25f);
}
}
@@ -53,7 +53,6 @@ import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.util.Themes;
import com.android.quickstep.TaskOverlayFactory.TaskOverlay;
import com.android.quickstep.views.TaskView.FullscreenDrawParams;
import com.android.systemui.plugins.OverviewScreenshotActions;
@@ -121,7 +120,7 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
// Initialize with placeholder value. It is overridden later by TaskView
mFullscreenParams = TEMP_PARAMS.get(context);
mDimColor = Themes.getColorBackgroundFloating(context);
mDimColor = RecentsView.getForegroundScrimDimColor(context);
mDimmingPaintAfterClearing.setColor(mDimColor);
}
@@ -88,7 +88,6 @@ import com.android.launcher3.util.ActivityOptionsWrapper;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.TransformingTouchDelegate;
import com.android.launcher3.util.ViewPool.Reusable;
import com.android.quickstep.RecentsModel;
@@ -328,19 +327,6 @@ public class TaskView extends FrameLayout implements Reusable {
}
};
private static final FloatProperty<TaskView> COLOR_TINT =
new FloatProperty<TaskView>("colorTint") {
@Override
public void setValue(TaskView taskView, float v) {
taskView.setColorTint(v);
}
@Override
public Float get(TaskView taskView) {
return taskView.getColorTint();
}
};
private final TaskOutlineProvider mOutlineProvider;
private Task mTask;
@@ -393,11 +379,6 @@ public class TaskView extends FrameLayout implements Reusable {
private final float[] mIconCenterCoords = new float[2];
private final float[] mChipCenterCoords = new float[2];
// Colored tint for the task view and all its supplementary views (like the task icon and well
// being banner.
private final int mTintingColor;
private float mTintAmount;
private boolean mIsClickableAsLiveTile = true;
public TaskView(Context context) {
@@ -419,8 +400,6 @@ public class TaskView extends FrameLayout implements Reusable {
mOutlineProvider = new TaskOutlineProvider(getContext(), mCurrentFullscreenParams,
mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx);
setOutlineProvider(mOutlineProvider);
mTintingColor = Themes.getColorBackgroundFloating(context);
}
/**
@@ -864,7 +843,7 @@ public class TaskView extends FrameLayout implements Reusable {
setTranslationZ(0);
setAlpha(mStableAlpha);
setIconScaleAndDim(1);
setColorTint(0);
setColorTint(0, 0);
}
public void setStableAlpha(float parentAlpha) {
@@ -1472,25 +1451,13 @@ public class TaskView extends FrameLayout implements Reusable {
getRecentsView().initiateSplitSelect(this, splitPositionOption);
}
private void setColorTint(float amount) {
mTintAmount = amount;
mSnapshotView.setDimAlpha(mTintAmount);
mIconView.setIconColorTint(mTintingColor, mTintAmount);
mDigitalWellBeingToast.setBannerColorTint(mTintingColor, mTintAmount);
}
private float getColorTint() {
return mTintAmount;
}
/**
* Show the task view with a color tint (animates value).
* Set a color tint on the snapshot and supporting views.
*/
public void showColorTint(boolean enable) {
ObjectAnimator tintAnimator = ObjectAnimator.ofFloat(
this, COLOR_TINT, enable ? MAX_PAGE_SCRIM_ALPHA : 0);
tintAnimator.setAutoCancel(true);
tintAnimator.start();
public void setColorTint(float amount, int tintColor) {
mSnapshotView.setDimAlpha(amount);
mIconView.setIconColorTint(tintColor, amount);
mDigitalWellBeingToast.setBannerColorTint(tintColor, amount);
}
/**
@@ -178,13 +178,13 @@ public class FallbackRecentsTest {
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 @@ public class FallbackRecentsTest {
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);
});
@@ -189,12 +189,10 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
@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
+1 -2
View File
@@ -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 &amp; 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>
+1 -2
View File
@@ -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 &amp; 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>
+1 -2
View File
@@ -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 &amp; 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>
+1 -2
View File
@@ -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 &amp; 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>
+1 -2
View File
@@ -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 ochirilgan"</string>
<string name="allow_rotation_title" msgid="7728578836261442095">"Bosh ekranni burishga ruxsat"</string>
@@ -369,10 +369,6 @@ public class InvariantDeviceProfile {
}
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 @@ public class InvariantDeviceProfile {
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;
+12 -17
View File
@@ -554,21 +554,12 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
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 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
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 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
}
}
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) {
@@ -88,7 +88,7 @@ public final class FeatureFlags {
"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.
@@ -52,6 +52,7 @@ import com.android.launcher3.logging.FileLog;
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 @@ public class LoaderCursor extends CursorWrapper {
* 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 {
@@ -109,10 +109,6 @@ public final class TestProtocol {
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";
}
@@ -55,23 +55,19 @@ class PortraitLandscapeRunner implements TestRule {
}
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");
}
};
}