Snap for 7604864 from 144b16bbb1 to sc-v2-release

Change-Id: I199f1a1c33298caa124bff0e33d61c4b1f6557fe
This commit is contained in:
Android Build Coastguard Worker
2021-08-03 01:09:05 +00:00
4 changed files with 17 additions and 0 deletions
@@ -33,8 +33,11 @@ import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.SystemClock;
import android.util.Log;
import android.util.SparseIntArray;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.tracing.OverviewComponentObserverProto;
import com.android.launcher3.tracing.TouchInteractionServiceProto;
import com.android.launcher3.util.SimpleBroadcastReceiver;
@@ -129,6 +132,16 @@ public final class OverviewComponentObserver {
private void updateOverviewTargets() {
ComponentName defaultHome = PackageManagerWrapper.getInstance()
.getHomeActivities(new ArrayList<>());
if (TestProtocol.sDebugTracing && defaultHome == null) {
Log.d(TestProtocol.THIRD_PARTY_LAUNCHER_NOT_SET, "getHomeActivities returned null");
while ((defaultHome =
PackageManagerWrapper.getInstance().getHomeActivities(new ArrayList<>()))
== null) {
SystemClock.sleep(10);
}
Log.d(TestProtocol.THIRD_PARTY_LAUNCHER_NOT_SET,
"getHomeActivities returned non-null: " + defaultHome);
}
mIsHomeDisabled = mDeviceState.isHomeDisabled();
mIsDefaultHome = Objects.equals(mMyHomeIntent.getComponent(), defaultHome);
@@ -99,6 +99,7 @@ public class FallbackRecentsTest {
mDevice = UiDevice.getInstance(instrumentation);
mDevice.setOrientationNatural();
mLauncher = new LauncherInstrumentation();
mLauncher.enableDebugTracing();
// b/143488140
//mLauncher.enableCheckEventsForSuccessfulGestures();
@@ -112,4 +112,5 @@ public final class TestProtocol {
public static final String PERMANENT_DIAG_TAG = "TaplTarget";
public static final String WORK_PROFILE_REMOVED = "b/159671700";
public static final String FALLBACK_ACTIVITY_NO_SET = "b/181019015";
public static final String THIRD_PARTY_LAUNCHER_NOT_SET = "b/187080582";
}
@@ -27,6 +27,7 @@ import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.tapl.Widget;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import com.android.launcher3.ui.TestViewHelpers;
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.launcher3.util.rule.ShellCommandRule;
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
@@ -80,6 +81,7 @@ public class AddWidgetTest extends AbstractLauncherUiTest {
*/
@Test
@PortraitLandscape
@ScreenRecord //b/195263971
public void testDragCustomShortcut() throws Throwable {
clearHomescreen();
mDevice.pressHome();