Loading core/java/android/widget/RemoteViews.java +7 −1 Original line number Diff line number Diff line Loading @@ -9216,7 +9216,13 @@ public class RemoteViews implements Parcelable, Filter { public static RemoteResponse fromFillInIntent(@NonNull Intent fillIntent) { RemoteResponse response = new RemoteResponse(); response.mFillIntent = fillIntent; if (fillIntent != null) { // Although the parameter is marked as @NonNull, it is nullable. The method that // calls it (RemoteReviews.setOnClickFillInIntent()) passes its fillInIntent // parameter to this method and it does not guarantee that the fillInIntent is // non-null. fillIntent.collectExtraIntentKeys(); } return response; } Loading core/tests/coretests/src/android/widget/RemoteViewsTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -1080,6 +1080,9 @@ public class RemoteViewsTest { rv.setOnClickFillInIntent(R.id.view, fillInIntent); assertNotEquals(0, fillInIntent.getExtendedFlags() & Intent.EXTENDED_FLAG_NESTED_INTENT_KEYS_COLLECTED); RemoteViews.RemoteResponse rr = RemoteViews.RemoteResponse.fromFillInIntent(null); assertNotNull(rr); } private static LayoutInflater.Factory2 createLayoutInflaterFactory(String viewTypeToReplace, Loading Loading
core/java/android/widget/RemoteViews.java +7 −1 Original line number Diff line number Diff line Loading @@ -9216,7 +9216,13 @@ public class RemoteViews implements Parcelable, Filter { public static RemoteResponse fromFillInIntent(@NonNull Intent fillIntent) { RemoteResponse response = new RemoteResponse(); response.mFillIntent = fillIntent; if (fillIntent != null) { // Although the parameter is marked as @NonNull, it is nullable. The method that // calls it (RemoteReviews.setOnClickFillInIntent()) passes its fillInIntent // parameter to this method and it does not guarantee that the fillInIntent is // non-null. fillIntent.collectExtraIntentKeys(); } return response; } Loading
core/tests/coretests/src/android/widget/RemoteViewsTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -1080,6 +1080,9 @@ public class RemoteViewsTest { rv.setOnClickFillInIntent(R.id.view, fillInIntent); assertNotEquals(0, fillInIntent.getExtendedFlags() & Intent.EXTENDED_FLAG_NESTED_INTENT_KEYS_COLLECTED); RemoteViews.RemoteResponse rr = RemoteViews.RemoteResponse.fromFillInIntent(null); assertNotNull(rr); } private static LayoutInflater.Factory2 createLayoutInflaterFactory(String viewTypeToReplace, Loading