Added a content call to emulate the other devices displays
Running the following commands should change your connected device display: adb root adb shell setprop ro.test_harness 1 adb shell pm enable --user 0 com.google.android.apps.nexuslauncher/com.android.launcher3.testing.TestInformationProvider adb shell content call --uri content://com.google.android.apps.nexuslauncher.TestInfo --method emulate-display --extra device:s:pixel5 --extra grid:s:crazy_big adb shell setprop ro.test_harness 0 Alternative method for this is using ./display_emulator.py emulate --device pixel5 I hooked up the existing DisplayEmulator into a content provider. Doing this has a couple advantages to the previous method of calling the emulator inside of a test. The biggest one is that running the emulation doesn't restarts the Launcher3, and because of that the previous method could leave the user in a fake emulation where it looks like the device is being emulated but is not 100% accurate. Test: Run the command lines described above. Fix: 229666646 Change-Id: Ia039fbaf4c7330d6bdf469633127f58d2466a1bf
Loading
Please register or sign in to comment