diff options
| author | Felipe Leme <felipeal@google.com> | 2017-01-18 18:38:46 -0800 |
|---|---|---|
| committer | Felipe Leme <felipeal@google.com> | 2017-01-18 18:38:46 -0800 |
| commit | dfd119615e21edf779f140f93b154ed23b3cb337 (patch) | |
| tree | 88394492cefaa77c1233298652d1a00b1616fdea /core/java/android | |
| parent | 6c4c1119f4419e2d23ee9f12d27e183f5240f7e9 (diff) | |
Fixed enhanced for loop.
It was trying to interact through null, which could throw an exception. Example:
01-18 18:28:12.609 862 2038 W Binder : Binder call failed.
01-18 18:28:12.609 862 2038 W Binder : java.lang.NullPointerException: Attempt to get length of null array
01-18 18:28:12.609 862 2038 W Binder : at android.app.Notification$Action$Builder.build(Notification.java:1289)
Test: manual verification
Change-Id: I84fda80ebd12df7d90730b17fa77d4b9ce5f58d2
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/Notification.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index ab0b68d61df5..5b74e23da7c9 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1285,7 +1285,7 @@ public class Notification implements Parcelable ArrayList<RemoteInput> dataOnlyInputs = new ArrayList<>(); RemoteInput[] previousDataInputs = (RemoteInput[]) mExtras.getParcelableArray(EXTRA_DATA_ONLY_INPUTS); - if (previousDataInputs == null) { + if (previousDataInputs != null) { for (RemoteInput input : previousDataInputs) { dataOnlyInputs.add(input); } |
