InputSettings: Fix incorrect keyboard list on rotation.
In this situation onLoadFinished callback is triggered before the loader ids list is updated. Updated the loader ids list before triggering the loader. Bug: 28182232 Change-Id: I1e4035f4dcff33e6b9a42d448303e962bd87c14b
This commit is contained in:
@@ -206,9 +206,9 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment
|
||||
clearLoader();
|
||||
mLastHardKeyboards.clear();
|
||||
mLastHardKeyboards.addAll(newHardKeyboards);
|
||||
mLoaderIDs.add(mNextLoaderId);
|
||||
getLoaderManager().initLoader(mNextLoaderId, null,
|
||||
new Callbacks(getContext(), this, mLastHardKeyboards));
|
||||
mLoaderIDs.add(mNextLoaderId);
|
||||
++mNextLoaderId;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user