summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2019-04-10 14:10:07 -0700
committer Winson Chung <winsonc@google.com> 2019-04-15 12:46:35 -0700
commitad43a5039d798608cfca0315078b9fd7c32edf56 (patch)
tree6c61d4c41eeeddc17e246a5e15156c5262bbe336
parent43e9ec2354f33b3e023329ff3b28cb9f076f539c (diff)
Add nullable annotations
Bug: 126700764 Test: None Change-Id: If0a8904033bc8c7204450b058a307be9b51b2605
-rw-r--r--api/current.txt10
-rw-r--r--core/java/android/app/TaskInfo.java9
2 files changed, 14 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt
index 03648ea01c78..60b980f102af 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6230,14 +6230,14 @@ package android.app {
}
public class TaskInfo {
- field public android.content.ComponentName baseActivity;
- field public android.content.Intent baseIntent;
+ field @Nullable public android.content.ComponentName baseActivity;
+ field @NonNull public android.content.Intent baseIntent;
field public boolean isRunning;
field public int numActivities;
- field public android.content.ComponentName origActivity;
- field public android.app.ActivityManager.TaskDescription taskDescription;
+ field @Nullable public android.content.ComponentName origActivity;
+ field @Nullable public android.app.ActivityManager.TaskDescription taskDescription;
field public int taskId;
- field public android.content.ComponentName topActivity;
+ field @Nullable public android.content.ComponentName topActivity;
}
public class TaskStackBuilder {
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java
index dd00e5a74382..de64db9def64 100644
--- a/core/java/android/app/TaskInfo.java
+++ b/core/java/android/app/TaskInfo.java
@@ -16,6 +16,8 @@
package android.app;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Intent;
@@ -58,23 +60,27 @@ public class TaskInfo {
* The base intent of the task (generally the intent that launched the task). This intent can
* be used to relaunch the task (if it is no longer running) or brought to the front if it is.
*/
+ @NonNull
public Intent baseIntent;
/**
* The component of the first activity in the task, can be considered the "application" of this
* task.
*/
+ @Nullable
public ComponentName baseActivity;
/**
* The component of the top activity in the task, currently showing to the user.
*/
+ @Nullable
public ComponentName topActivity;
/**
* The component of the target activity if this task was started from an activity alias.
* Otherwise, this is null.
*/
+ @Nullable
public ComponentName origActivity;
/**
@@ -82,6 +88,7 @@ public class TaskInfo {
* alias).
* @hide
*/
+ @Nullable
public ComponentName realActivity;
/**
@@ -106,6 +113,7 @@ public class TaskInfo {
* The recent activity values for the highest activity in the stack to have set the values.
* {@link Activity#setTaskDescription(android.app.ActivityManager.TaskDescription)}.
*/
+ @Nullable
public ActivityManager.TaskDescription taskDescription;
/**
@@ -126,6 +134,7 @@ public class TaskInfo {
* The current configuration of the task.
* @hide
*/
+ @NonNull
@UnsupportedAppUsage
public final Configuration configuration = new Configuration();