summaryrefslogtreecommitdiff
path: root/core/java/android/widget/RemoteViews.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-03-01 11:46:44 -0800
committerSunny Goyal <sunnygoyal@google.com>2019-03-01 11:55:26 -0800
commit40635d7091d1282eee6f6f56a1260c7c20195dde (patch)
tree3e5be3a8e12316aeece6591c5961482658148e64 /core/java/android/widget/RemoteViews.java
parent72f3872b362151c212a8532b9a70cf17902494e8 (diff)
Adding some missing annotations as per API review
Bug: 126702868 Bug: 126699296 Test: N/A Change-Id: Iedfec694e30c77e0190842542e4e38641306cda5
Diffstat (limited to 'core/java/android/widget/RemoteViews.java')
-rw-r--r--core/java/android/widget/RemoteViews.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 516c48e6a6c5..564d972ac26d 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -2803,7 +2803,7 @@ public class RemoteViews implements Parcelable, Filter {
* @param viewId The id of the view that will trigger the {@link RemoteResponse} when clicked
* @param response The {@link RemoteResponse} to send when user clicks
*/
- public void setOnClickResponse(int viewId, RemoteResponse response) {
+ public void setOnClickResponse(int viewId, @NonNull RemoteResponse response) {
addAction(new SetOnClickResponse(viewId, response));
}
@@ -3926,7 +3926,8 @@ public class RemoteViews implements Parcelable, Filter {
*
* @param pendingIntent The {@link PendingIntent} to send as part of the response
*/
- public static RemoteResponse fromPendingIntent(PendingIntent pendingIntent) {
+ @NonNull
+ public static RemoteResponse fromPendingIntent(@NonNull PendingIntent pendingIntent) {
RemoteResponse response = new RemoteResponse();
response.mPendingIntent = pendingIntent;
return response;
@@ -3957,7 +3958,8 @@ public class RemoteViews implements Parcelable, Filter {
* @see RemoteViews#setOnClickFillInIntent(int, Intent)
* @return
*/
- public static RemoteResponse fromFillInIntent(Intent fillIntent) {
+ @NonNull
+ public static RemoteResponse fromFillInIntent(@NonNull Intent fillIntent) {
RemoteResponse response = new RemoteResponse();
response.mFillIntent = fillIntent;
return response;
@@ -3974,7 +3976,8 @@ public class RemoteViews implements Parcelable, Filter {
*
* @see ActivityOptions#makeSceneTransitionAnimation(Activity, Pair[])
*/
- public RemoteResponse addSharedElement(int viewId, String sharedElementName) {
+ @NonNull
+ public RemoteResponse addSharedElement(int viewId, @NonNull String sharedElementName) {
if (mViewIds == null) {
mViewIds = new IntArray();
mElementNames = new ArrayList<>();