Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9097d7d0 authored by Sebastian Franco's avatar Sebastian Franco
Browse files

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
parent 844efbaa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment