Shows LGAAYL when launching Location Settings
- Partial fix of b/10897468 Change-Id: Iec96909b87e71869c5a020ce848c6cf4fada3616
This commit is contained in:
@@ -55,11 +55,15 @@ import java.util.HashSet;
|
|||||||
/** Manages settings for Google Account. */
|
/** Manages settings for Google Account. */
|
||||||
public class ManageAccountsSettings extends AccountPreferenceBase
|
public class ManageAccountsSettings extends AccountPreferenceBase
|
||||||
implements OnAccountsUpdateListener {
|
implements OnAccountsUpdateListener {
|
||||||
|
|
||||||
private static final String ACCOUNT_KEY = "account"; // to pass to auth settings
|
private static final String ACCOUNT_KEY = "account"; // to pass to auth settings
|
||||||
public static final String KEY_ACCOUNT_TYPE = "account_type";
|
public static final String KEY_ACCOUNT_TYPE = "account_type";
|
||||||
public static final String KEY_ACCOUNT_LABEL = "account_label";
|
public static final String KEY_ACCOUNT_LABEL = "account_label";
|
||||||
|
|
||||||
|
// Action name for the broadcast intent when the Google account preferences page is launching
|
||||||
|
// the location settings.
|
||||||
|
private static final String LAUNCHING_LOCATION_SETTINGS =
|
||||||
|
"com.android.settings.accounts.LAUNCHING_LOCATION_SETTINGS";
|
||||||
|
|
||||||
private static final int MENU_SYNC_NOW_ID = Menu.FIRST;
|
private static final int MENU_SYNC_NOW_ID = Menu.FIRST;
|
||||||
private static final int MENU_SYNC_CANCEL_ID = Menu.FIRST + 1;
|
private static final int MENU_SYNC_CANCEL_ID = Menu.FIRST + 1;
|
||||||
|
|
||||||
@@ -366,6 +370,13 @@ public class ManageAccountsSettings extends AccountPreferenceBase
|
|||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
((PreferenceActivity) getActivity()).startPreferencePanel(
|
((PreferenceActivity) getActivity()).startPreferencePanel(
|
||||||
mClass, null, mTitleRes, null, null, 0);
|
mClass, null, mTitleRes, null, null, 0);
|
||||||
|
// Hack: announce that the Google account preferences page is launching the location
|
||||||
|
// settings
|
||||||
|
if (mClass.equals(LocationSettings.class.getName())) {
|
||||||
|
Intent intent = new Intent(LAUNCHING_LOCATION_SETTINGS);
|
||||||
|
getActivity().sendBroadcast(
|
||||||
|
intent, android.Manifest.permission.WRITE_SECURE_SETTINGS);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user