Skip to content

Commit 730b917

Browse files
authored
Fixed an issue where tapping the location sharing settings redirected to the login page. (#3526)
1 parent 0b62625 commit 730b917

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

play-services-core/src/main/java/org/microg/gms/ui/LocationSettingsActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.microg.gms.ui;
1818

1919
import static org.microg.gms.accountsettings.ui.ExtensionsKt.ACTION_LOCATION_SHARING;
20+
import static org.microg.gms.accountsettings.ui.ExtensionsKt.EXTRA_ACCOUNT_NAME;
2021

2122
import android.app.Activity;
2223
import android.content.Intent;
@@ -27,13 +28,19 @@
2728

2829
public class LocationSettingsActivity extends Activity {
2930

31+
private final static String ACCOUNT_NAME = "account_name";
32+
3033
@Override
3134
protected void onCreate(@Nullable Bundle savedInstanceState) {
3235
super.onCreate(savedInstanceState);
3336
try {
3437
if (ACTION_LOCATION_SHARING.equals(getIntent().getAction())) {
3538
Intent intent = new Intent(this, MainActivity.class);
3639
intent.setAction(ACTION_LOCATION_SHARING);
40+
Bundle extras = getIntent().getExtras();
41+
if (extras != null && extras.containsKey(ACCOUNT_NAME)) {
42+
intent.putExtra(EXTRA_ACCOUNT_NAME, extras.getString(ACCOUNT_NAME));
43+
}
3744
startActivity(intent);
3845
}
3946
} catch (Exception ignore) {

0 commit comments

Comments
 (0)