Merge "Fix a monkey crash: guard against position -1."
This commit is contained in:
committed by
Android (Google) Code Review
commit
25deda5129
@@ -647,6 +647,10 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
}
|
||||
final int position = mRecyclerView.getChildAdapterPosition(view);
|
||||
|
||||
if (position == RecyclerView.NO_POSITION) {
|
||||
Log.w(TAG, "Cannot find position for child, skipping onClick handling");
|
||||
return;
|
||||
}
|
||||
if (mApplications.getApplicationCount() > position) {
|
||||
ApplicationsState.AppEntry entry = mApplications.getAppEntry(position);
|
||||
mCurrentPkgName = entry.info.packageName;
|
||||
|
||||
Reference in New Issue
Block a user