Skip to content

Commit 82305f0

Browse files
committed
Fixed an issue where tapping the location sharing settings redirected to the login page.
1 parent 4e8200a commit 82305f0

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
public class LocationSettingsActivity extends Activity {
3030

3131
private final static String ACCOUNT_NAME = "account_name";
32+
private final static String ACCOUNT_NAME_V2 = "accountName";
3233

3334
@Override
3435
protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -38,8 +39,17 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
3839
Intent intent = new Intent(this, MainActivity.class);
3940
intent.setAction(ACTION_LOCATION_SHARING);
4041
Bundle extras = getIntent().getExtras();
41-
if (extras != null && extras.containsKey(ACCOUNT_NAME)) {
42-
intent.putExtra(EXTRA_ACCOUNT_NAME, extras.getString(ACCOUNT_NAME));
42+
if (extras != null) {
43+
String accountName = null;
44+
if (extras.containsKey(ACCOUNT_NAME)) {
45+
accountName = extras.getString(ACCOUNT_NAME);
46+
}
47+
else if (extras.containsKey(ACCOUNT_NAME_V2)) {
48+
accountName = extras.getString(ACCOUNT_NAME_V2);
49+
}
50+
if (accountName != null) {
51+
intent.putExtra(EXTRA_ACCOUNT_NAME, accountName);
52+
}
4353
}
4454
startActivity(intent);
4555
}

0 commit comments

Comments
 (0)