Fix the injection disappearance in the Account detail page

displayTile() requires some parameters to determine whether to show the
injection tiles and update the intent, but the parameters were not
initialized.

Move the parameter initialization before super.onCreate() since
displayTile() will be called in super.onCreate().

Test: visual, robotest
Fix: 242673595
Change-Id: Idf2d758a8b8c4230e644bcd0d286a278d258b736
This commit is contained in:
Jason Chiu
2022-08-30 10:46:19 +08:00
parent baa3f3a3c6
commit 0e2147c5e2

View File

@@ -64,8 +64,7 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
getPreferenceManager().setPreferenceComparisonCallback(null);
// Initialize the parameters since displayTile() will be called in super.onCreate().
Bundle args = getArguments();
final Activity activity = getActivity();
mUserHandle = Utils.getSecureTargetUser(activity.getActivityToken(),
@@ -82,6 +81,9 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
mAccountType = args.getString(KEY_ACCOUNT_TYPE);
}
}
super.onCreate(icicle);
getPreferenceManager().setPreferenceComparisonCallback(null);
mAccountSynController.init(mAccount, mUserHandle);
mRemoveAccountController.init(mAccount, mUserHandle);
}