X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/5eb95c31a8eb6c13d27dcceb5510f2d9c6a04d71..da4772c4e54467920d642e2a792c5d16d3b7bf33:/tools/interfaces/IPlatform.py diff --git a/tools/interfaces/IPlatform.py b/tools/interfaces/IPlatform.py index a8a5410..a5d6d08 100644 --- a/tools/interfaces/IPlatform.py +++ b/tools/interfaces/IPlatform.py @@ -18,7 +18,8 @@ TRANSACTION_getAppName = 8 TRANSACTION_settingsPutString = 9 TRANSACTION_settingsGetString = 10 TRANSACTION_settingsPutInt = 11 -TRANSACTION_getAppName = 12 +TRANSACTION_settingsGetInt = 12 +TRANSACTION_launchIntent = 13 class IPlatform: def __init__(self, remote): @@ -182,6 +183,25 @@ class IPlatform: if exception != 0: logging.error("Failed with code: {}".format(exception)) + def launchIntent(self, arg1, arg2): + request = self.client.new_request() + request.append_string16(arg1) + request.append_string16(arg2) + reply, status = self.client.transact_sync_reply( + TRANSACTION_launchIntent, request) + + if status: + logging.error("Sending reply failed") + else: + reader = reply.init_reader() + status, exception = reader.read_int32() + if exception == 0: + rep1 = reader.read_string16() + return rep1 + else: + logging.error("Failed with code: {}".format(exception)) + return None + def getAppName(self, arg1): request = self.client.new_request() request.append_string16(arg1)