Add Account.name to the tile's intent.
For dynamic tiles that are displayed in specific account type, add the account name to the tile's intent so that when we launch the preference, it can associate with the correct account. Change-Id: I25f76c1b5710f525634983d00832c9a68cdeeebb Fix: 62365341 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -39,6 +39,7 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "AccountDetailDashboard";
|
||||
private static final String METADATA_IA_ACCOUNT = "com.android.settings.ia.account";
|
||||
private static final String EXTRA_ACCOUNT_NAME = "extra.accountName";
|
||||
|
||||
public static final String KEY_ACCOUNT = "account";
|
||||
public static final String KEY_ACCOUNT_TYPE = "account_type";
|
||||
@@ -127,7 +128,11 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
|
||||
if (metadata == null) {
|
||||
return false;
|
||||
}
|
||||
return mAccountType.equals(metadata.getString(METADATA_IA_ACCOUNT));
|
||||
final boolean display = mAccountType.equals(metadata.getString(METADATA_IA_ACCOUNT));
|
||||
if (display && tile.intent != null) {
|
||||
tile.intent.putExtra(EXTRA_ACCOUNT_NAME, mAccount.name);
|
||||
}
|
||||
return display;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Reference in New Issue
Block a user