Skip to content

Commit

Permalink
Add Google redirect location settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
DaVinci9196 authored and mar-v-in committed Aug 4, 2024
1 parent 4a81ee6 commit 271a215
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions play-services-location/core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@
</intent-filter>
</activity>

<activity
android:name="org.microg.gms.location.settings.GoogleLocationSettingsActivity"
android:excludeFromRecents="true"
android:exported="true"
android:launchMode="singleTask"
android:process=":ui"
android:theme="@style/Theme.App.Translucent">
<intent-filter>
<action android:name="com.google.android.location.settings.GOOGLE_LOCATION_SETTINGS" />
<action android:name="com.google.android.gms.location.settings.GOOGLE_LOCATION_SETTINGS" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name="org.microg.gms.location.manager.AskPermissionActivity"
android:excludeFromRecents="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2024 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.gms.location.settings

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

class GoogleLocationSettingsActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
runCatching { startActivity(Intent("android.settings.LOCATION_SOURCE_SETTINGS")) }
finish()
}
}

0 comments on commit 271a215

Please sign in to comment.