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
LocationManager: disable location access by default
environment variable ATL_UGLY_ENABLE_LOCATION can be set to enable it
This commit is contained in:
@@ -25,6 +25,11 @@ static void location_updated (
|
|||||||
static XdpPortal *portal = NULL;
|
static XdpPortal *portal = NULL;
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_android_location_LocationManager_nativeGetLocation(JNIEnv *env, jobject) {
|
JNIEXPORT void JNICALL Java_android_location_LocationManager_nativeGetLocation(JNIEnv *env, jobject) {
|
||||||
|
if (!getenv("ATL_UGLY_ENABLE_LOCATION")) {
|
||||||
|
// Location access is prohibited by default until sanboxing is implemented.
|
||||||
|
// Set ATL_UGLY_ENABLE_LOCATION environment variable to enable it.
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!portal) {
|
if (!portal) {
|
||||||
portal = xdp_portal_new();
|
portal = xdp_portal_new();
|
||||||
JavaVM *jvm;
|
JavaVM *jvm;
|
||||||
|
|||||||
Reference in New Issue
Block a user