You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
Try to start all external Services over DBus
No need to hardcode this only for Cloud Messaging
This commit is contained in:
@@ -176,9 +176,10 @@ JNIEXPORT void JNICALL Java_android_content_Context_nativeRegisterUnifiedPush(JN
|
||||
(*env)->ReleaseStringUTFChars(env, application_jstr, application);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_content_Context_nativeStartExternalService(JNIEnv *env, jclass this, jstring package_jstr, jobject intent)
|
||||
JNIEXPORT void JNICALL Java_android_content_Context_nativeStartExternalService(JNIEnv *env, jclass this, jobject intent)
|
||||
{
|
||||
GVariant *variant = intent_serialize(env, intent);
|
||||
jstring package_jstr = _GET_OBJ_FIELD(intent, "packageName", "Ljava/lang/String;");
|
||||
const char *package = (*env)->GetStringUTFChars(env, package_jstr, NULL);
|
||||
char *object_path = g_strdup_printf("/%s", package);
|
||||
g_strdelimit(object_path, ".", '/');
|
||||
|
||||
@@ -52,10 +52,10 @@ JNIEXPORT void JNICALL Java_android_content_Context_nativeRegisterUnifiedPush
|
||||
/*
|
||||
* Class: android_content_Context
|
||||
* Method: nativeStartExternalService
|
||||
* Signature: (Ljava/lang/String;Landroid/content/Intent;)V
|
||||
* Signature: (Landroid/content/Intent;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_content_Context_nativeStartExternalService
|
||||
(JNIEnv *, jclass, jstring, jobject);
|
||||
(JNIEnv *, jclass, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user