summaryrefslogtreecommitdiff
path: root/core/java/android/view/SurfaceControl.java
diff options
context:
space:
mode:
authorVishnu Nair <vishnun@google.com>2021-01-15 12:54:56 -0800
committerVishnu Nair <vishnun@google.com>2021-01-15 14:24:03 -0800
commit0c3269ea1f74e8d2cca22387f6b85683a14dc605 (patch)
tree3d1cdfcbd2ca88868a073610921d5b62cdbe2dae /core/java/android/view/SurfaceControl.java
parentb1dc062e3a18109d9e1d5b423834057316316a29 (diff)
Pass in window name along with focus request
Used for generating focus event logs and debug logs. Test: go/wm-smoke, check event logs and logcat Change-Id: Ib5bdf8693212388c1f0db397458b45eef4db8a51
Diffstat (limited to 'core/java/android/view/SurfaceControl.java')
-rw-r--r--core/java/android/view/SurfaceControl.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 63ee927ded3d..aa05787359eb 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -225,7 +225,7 @@ public final class SurfaceControl implements Parcelable {
private static native void nativeSetFixedTransformHint(long transactionObj, long nativeObject,
int transformHint);
private static native void nativeSetFocusedWindow(long transactionObj, IBinder toToken,
- IBinder focusedToken, int displayId);
+ String windowName, IBinder focusedToken, String focusedWindowName, int displayId);
private static native void nativeSetFrameTimelineVsync(long transactionObj,
long frameTimelineVsyncId);
private static native void nativeAddJankDataListener(long nativeListener,
@@ -3282,8 +3282,10 @@ public final class SurfaceControl implements Parcelable {
*
* @hide
*/
- public Transaction setFocusedWindow(@NonNull IBinder token, int displayId) {
- nativeSetFocusedWindow(mNativeObject, token, null /* focusedToken */, displayId);
+ public Transaction setFocusedWindow(@NonNull IBinder token, String windowName,
+ int displayId) {
+ nativeSetFocusedWindow(mNativeObject, token, windowName,
+ null /* focusedToken */, null /* focusedWindowName */, displayId);
return this;
}
@@ -3298,9 +3300,12 @@ public final class SurfaceControl implements Parcelable {
* @hide
*/
public Transaction requestFocusTransfer(@NonNull IBinder token,
+ String windowName,
@NonNull IBinder focusedToken,
+ String focusedWindowName,
int displayId) {
- nativeSetFocusedWindow(mNativeObject, token, focusedToken, displayId);
+ nativeSetFocusedWindow(mNativeObject, token, windowName, focusedToken,
+ focusedWindowName, displayId);
return this;
}