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:
Abodunrinwa Toki
2016-04-19 17:18:51 +01:00
parent 25c0b7bc4e
commit 93c8c0a09a

View File

@@ -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;
}
}