mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-03-03 21:26:36 +00:00
ipc/android: Single point of truth for action name.
This commit is contained in:
parent
aa222ebba1
commit
d9053e0dc5
src/xrt/ipc/android
|
@ -12,6 +12,13 @@ android {
|
|||
// needed for ASharedMemory, etc.
|
||||
minSdkVersion 26
|
||||
targetSdkVersion project.sharedTargetSdk
|
||||
|
||||
// Single point of truth for this name.
|
||||
def serviceAction = "org.freedesktop.monado.ipc.CONNECT"
|
||||
manifestPlaceholders = [
|
||||
serviceActionName: serviceAction
|
||||
]
|
||||
buildConfigField("String", "SERVICE_ACTION", "\"${serviceAction}\"")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
android:exported="true"
|
||||
android:foregroundServiceType="connectedDevice|mediaPlayback">
|
||||
<intent-filter>
|
||||
<action android:name="org.freedesktop.monado.ipc.CONNECT" />
|
||||
<action android:name="${serviceActionName}" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
</application>
|
||||
|
|
|
@ -152,7 +152,7 @@ public class Client implements ServiceConnection {
|
|||
return false;
|
||||
}
|
||||
|
||||
Intent intent = new Intent("org.freedesktop.monado.ipc.CONNECT")
|
||||
intent = new Intent(BuildConfig.SERVICE_ACTION)
|
||||
.setPackage(packageName);
|
||||
|
||||
context.startForegroundService(intent);
|
||||
|
|
Loading…
Reference in a new issue