mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
android: fix application name used in ./mach run (#32652)
This patch also switches the code to python format strings so that the application name can be interpolated where needed. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
e2e7476404
commit
0615428aa9
1 changed files with 7 additions and 4 deletions
|
@ -33,6 +33,9 @@ from servo.command_base import (
|
|||
)
|
||||
|
||||
|
||||
ANDROID_APP_NAME = "org.servo.servoshell"
|
||||
|
||||
|
||||
def read_file(filename, if_exists=False):
|
||||
if if_exists and not path.exists(filename):
|
||||
return None
|
||||
|
@ -104,7 +107,7 @@ class PostBuildCommands(CommandBase):
|
|||
print("https://github.com/servo/servo/wiki/Building-for-Android#debugging-on-device")
|
||||
return
|
||||
script = [
|
||||
"am force-stop org.servo.servoshell",
|
||||
f"am force-stop {ANDROID_APP_NAME}",
|
||||
]
|
||||
json_params = shell_quote(json.dumps(params))
|
||||
extra = "-e servoargs " + json_params
|
||||
|
@ -115,10 +118,10 @@ class PostBuildCommands(CommandBase):
|
|||
if gst_debug:
|
||||
extra += " -e gstdebug " + gst_debug
|
||||
script += [
|
||||
"am start " + extra + " org.servo.servoshell/org.servo.servoshell.MainActivity",
|
||||
f"am start {extra} {ANDROID_APP_NAME}/{ANDROID_APP_NAME}.MainActivity",
|
||||
"sleep 0.5",
|
||||
"echo Servo PID: $(pidof org.servo.servoshell)",
|
||||
"logcat --pid=$(pidof org.servo.sevoshell)",
|
||||
f"echo Servo PID: $(pidof {ANDROID_APP_NAME})",
|
||||
f"logcat --pid=$(pidof {ANDROID_APP_NAME})",
|
||||
"exit"
|
||||
]
|
||||
args = [self.android_adb_path(env)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue