| Index: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
|
| index 88f64bda1a6cb1e0746abc7bd904cc7b1bebef03..eed08f65bf245058e1baa4216c31be5cd9b98c94 100644
|
| --- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
|
| +++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
|
| @@ -17,6 +17,7 @@ import android.content.Intent;
|
| import android.content.pm.PackageManager;
|
| import android.os.Build;
|
| import android.os.Bundle;
|
| +import android.os.IBinder;
|
| import android.os.Process;
|
| import android.util.Log;
|
| import android.util.SparseArray;
|
| @@ -715,6 +716,20 @@ public class WindowAndroid {
|
| }
|
|
|
| /**
|
| + * Return the current window token, or null.
|
| + */
|
| + @CalledByNative
|
| + private IBinder getWindowToken() {
|
| + Context context = mContextRef.get();
|
| + if (context == null) return null;
|
| + Activity activity = activityFromContext(context);
|
| + if (activity == null) return null;
|
| + View decorView = activity.getWindow().peekDecorView();
|
| + if (decorView == null) return null;
|
| + return decorView.getWindowToken();
|
| + }
|
| +
|
| + /**
|
| * Update whether the placeholder is 'drawn' based on whether an animation is running
|
| * or touch exploration is enabled - if either of those are true, we call
|
| * setWillNotDraw(false) to ensure that the animation is drawn over the SurfaceView,
|
|
|