summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ActivityClient.java13
-rw-r--r--core/java/android/app/IActivityClientController.aidl1
2 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityClient.java b/core/java/android/app/ActivityClient.java
index bd4386885dd6..2efdf51612c7 100644
--- a/core/java/android/app/ActivityClient.java
+++ b/core/java/android/app/ActivityClient.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Intent;
import android.content.res.Configuration;
@@ -205,6 +206,18 @@ public class ActivityClient {
}
}
+ /**
+ * Returns the activity token below in the same task if it belongs to the same process.
+ */
+ @Nullable
+ public IBinder getActivityTokenBelow(IBinder activityToken) {
+ try {
+ return getActivityClientController().getActivityTokenBelow(activityToken);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
ComponentName getCallingActivity(IBinder token) {
try {
return getActivityClientController().getCallingActivity(token);
diff --git a/core/java/android/app/IActivityClientController.aidl b/core/java/android/app/IActivityClientController.aidl
index c6649692d848..aba6eb9229f2 100644
--- a/core/java/android/app/IActivityClientController.aidl
+++ b/core/java/android/app/IActivityClientController.aidl
@@ -70,6 +70,7 @@ interface IActivityClientController {
boolean willActivityBeVisible(in IBinder token);
int getDisplayId(in IBinder activityToken);
int getTaskForActivity(in IBinder token, in boolean onlyRoot);
+ IBinder getActivityTokenBelow(IBinder token);
ComponentName getCallingActivity(in IBinder token);
String getCallingPackage(in IBinder token);
int getLaunchedFromUid(in IBinder token);