Keep the displayed app order intact until the grid reuse comparison, and retain selection during rebuilds so D-pad rearranging visibly moves the chosen tile. Add Android-confirmed uninstall for user apps and a foreground-only Wi-Fi/Ethernet shortcut with separate TV-input spacing. Remove the duplicate Personalize footer. Use an explicitly authorized replacement signing identity after loss of the original key. Document the one-time reinstall and preserve signature verification. Add a portable build using ignored signing configuration and regression checks for movement, lifecycle, native network settings, and cancel/confirm uninstall. Validated on the authorized onn 4K Plus: original failing move reproduction now passes, HomeActions/GridReuse/WakeRegression/Navigation instrumentation passes, and native settings/uninstall checks pass. Input-header availability was simulated; physical Ethernet and input switching were not exercised. Restore prior visible settings and Home override; remove the disposable test APK.
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
"""Exercise remote move entry and one arrow; Back restores the original order."""
|
|
import argparse
|
|
import subprocess
|
|
import time
|
|
import xml.etree.ElementTree as ET
|
|
|
|
p = argparse.ArgumentParser()
|
|
p.add_argument('--adb', required=True)
|
|
p.add_argument('--device', required=True)
|
|
a = p.parse_args()
|
|
|
|
def adb(*args):
|
|
return subprocess.check_output([a.adb, '-s', a.device, *map(str, args)]).decode('utf-8')
|
|
|
|
def key(k, long=False):
|
|
adb('shell', 'input', 'keyevent', *(['--longpress'] if long else []), k)
|
|
time.sleep(.3)
|
|
|
|
def tree():
|
|
adb('shell', 'uiautomator', 'dump', '/sdcard/luma-move.xml')
|
|
return ET.fromstring(adb('shell', 'cat', '/sdcard/luma-move.xml'))
|
|
|
|
def apps():
|
|
return [n.get('content-desc') for n in tree().iter('node')
|
|
if n.get('long-clickable') == 'true' and n.get('content-desc')]
|
|
|
|
adb('shell', 'am', 'start', '-W', '-n', 'tv.luma.launcher/.MainActivity')
|
|
key(4)
|
|
key(19)
|
|
key(20)
|
|
before = apps()
|
|
assert len(before) >= 2, before
|
|
key(23, True)
|
|
for _ in range(2):
|
|
key(20)
|
|
focused = next(n.get('text') for n in tree().iter('node') if n.get('focused') == 'true')
|
|
assert focused.startswith('Move in grid'), focused
|
|
key(23)
|
|
try:
|
|
key(22)
|
|
after = apps()
|
|
assert after[:2] == [before[1], before[0]], f'Arrow did not move app: before={before[:3]}, after={after[:3]}'
|
|
print('PASS: remote menu -> move -> right swaps the first two apps')
|
|
finally:
|
|
key(4)
|
|
assert apps()[:2] == before[:2], 'Back did not restore original order'
|