Fix IllegalArgumentException
Add the try-catch to avoid crash. Fix: 301362148 Test: build pass Change-Id: Ia1f5a4299d5f0eeffc7b25b0f3b89d56f1647062
This commit is contained in:
committed by
SongFerng Wang
parent
cb624a3155
commit
e4b08837d1
@@ -176,7 +176,13 @@ public class ConfirmDialogFragment extends BaseDialogFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void informCaller(boolean confirmed, int itemPosition) {
|
private void informCaller(boolean confirmed, int itemPosition) {
|
||||||
OnConfirmListener listener = getListener(OnConfirmListener.class);
|
OnConfirmListener listener;
|
||||||
|
try {
|
||||||
|
listener = getListener(OnConfirmListener.class);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Log.e(TAG, "Do nothing and return.", e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (listener == null) {
|
if (listener == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user