diff options
| author | Mathew Inwood <mathewi@google.com> | 2018-08-21 09:31:16 +0100 |
|---|---|---|
| committer | Mathew Inwood <mathewi@google.com> | 2018-08-21 09:31:16 +0100 |
| commit | ec73e7514f60bc8b7273eb0e5cae68480599ac27 (patch) | |
| tree | 5df3ed4df7d9dd057e36dccffadf137450eb5acc /core/java/android/view/ViewRootImpl.java | |
| parent | 1c287376918012f99081fd7d4900fceab36e1455 (diff) | |
| parent | 597229d681ac1794e2b31ef9a2883337f5b652e2 (diff) | |
resolve merge conflicts of 597229d681ac1794e2b31ef9a2883337f5b652e2 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I0807ae67e0ed3e84f17af962dc8b7a3152f8103f
Merged-In: I4147b038ed7adf0311ee9918b44766f82a057eaf
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 6df0173d9684..fd11ef13f9ac 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -30,6 +30,7 @@ import android.Manifest; import android.animation.LayoutTransition; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.UnsupportedAppUsage; import android.app.ActivityManager; import android.app.ActivityThread; import android.app.ResourcesManager; @@ -170,6 +171,7 @@ public final class ViewRootImpl implements ViewParent, */ static final int MAX_TRACKBALL_DELAY = 250; + @UnsupportedAppUsage static final ThreadLocal<HandlerActionQueue> sRunQueues = new ThreadLocal<HandlerActionQueue>(); static final ArrayList<Runnable> sFirstDrawHandlers = new ArrayList(); @@ -233,7 +235,9 @@ public final class ViewRootImpl implements ViewParent, */ @GuardedBy("mWindowCallbacks") final ArrayList<WindowCallbacks> mWindowCallbacks = new ArrayList<>(); + @UnsupportedAppUsage final Context mContext; + @UnsupportedAppUsage final IWindowSession mWindowSession; @NonNull Display mDisplay; final DisplayManager mDisplayManager; @@ -255,6 +259,7 @@ public final class ViewRootImpl implements ViewParent, int mSeq; + @UnsupportedAppUsage View mView; View mAccessibilityFocusedHost; @@ -287,6 +292,7 @@ public final class ViewRootImpl implements ViewParent, // Set to true if the owner of this window is in the stopped state, // so the window should no longer be active. + @UnsupportedAppUsage boolean mStopped = false; // Set to true if the owner of this window is in ambient mode, @@ -306,8 +312,11 @@ public final class ViewRootImpl implements ViewParent, final Region mTransparentRegion; final Region mPreviousTransparentRegion; + @UnsupportedAppUsage int mWidth; + @UnsupportedAppUsage int mHeight; + @UnsupportedAppUsage Rect mDirty; public boolean mIsAnimating; @@ -321,10 +330,12 @@ public final class ViewRootImpl implements ViewParent, CompatibilityInfo.Translator mTranslator; + @UnsupportedAppUsage final View.AttachInfo mAttachInfo; InputChannel mInputChannel; InputQueue.Callback mInputQueueCallback; InputQueue mInputQueue; + @UnsupportedAppUsage FallbackEventHandler mFallbackEventHandler; Choreographer mChoreographer; @@ -389,8 +400,10 @@ public final class ViewRootImpl implements ViewParent, // These can be accessed by any thread, must be protected with a lock. // Surface can never be reassigned or cleared (use Surface.clear()). + @UnsupportedAppUsage public final Surface mSurface = new Surface(); + @UnsupportedAppUsage boolean mAdded; boolean mAddedTouchMode; @@ -425,6 +438,7 @@ public final class ViewRootImpl implements ViewParent, boolean mScrollMayChange; @SoftInputModeFlags int mSoftInputMode; + @UnsupportedAppUsage WeakReference<View> mLastScrolledFocus; int mScrollY; int mCurScrollY; @@ -555,6 +569,7 @@ public final class ViewRootImpl implements ViewParent, } /** Add static config callback to be notified about global config changes. */ + @UnsupportedAppUsage public static void addConfigCallback(ConfigChangedCallback callback) { synchronized (sConfigCallbacks) { sConfigCallbacks.add(callback); @@ -891,6 +906,7 @@ public final class ViewRootImpl implements ViewParent, return (mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE) != 0; } + @UnsupportedAppUsage public int getWindowFlags() { return mWindowAttributes.flags; } @@ -930,6 +946,7 @@ public final class ViewRootImpl implements ViewParent, } } + @UnsupportedAppUsage public void detachFunctor(long functor) { if (mAttachInfo.mThreadedRenderer != null) { // Fence so that any pending invokeFunctor() messages will be processed @@ -947,6 +964,7 @@ public final class ViewRootImpl implements ViewParent, * has invoked. If false, the functor may be invoked * asynchronously. */ + @UnsupportedAppUsage public static void invokeFunctor(long functor, boolean waitForCompletion) { ThreadedRenderer.invokeFunctor(functor, waitForCompletion); } @@ -980,6 +998,7 @@ public final class ViewRootImpl implements ViewParent, mNextRtFrameCallback = callback; } + @UnsupportedAppUsage private void enableHardwareAcceleration(WindowManager.LayoutParams attrs) { mAttachInfo.mHardwareAccelerated = false; mAttachInfo.mHardwareAccelerationRequested = false; @@ -1040,6 +1059,7 @@ public final class ViewRootImpl implements ViewParent, } } + @UnsupportedAppUsage public View getView() { return mView; } @@ -1241,6 +1261,7 @@ public final class ViewRootImpl implements ViewParent, invalidate(); } + @UnsupportedAppUsage void invalidate() { mDirty.set(0, 0, mWidth, mHeight); if (!mWillDrawSoon) { @@ -1425,6 +1446,7 @@ public final class ViewRootImpl implements ViewParent, } } + @UnsupportedAppUsage void scheduleTraversals() { if (!mTraversalScheduled) { mTraversalScheduled = true; @@ -3664,6 +3686,7 @@ public final class ViewRootImpl implements ViewParent, /** * @hide */ + @UnsupportedAppUsage public View getAccessibilityFocusedHost() { return mAccessibilityFocusedHost; } @@ -3671,6 +3694,7 @@ public final class ViewRootImpl implements ViewParent, /** * @hide */ + @UnsupportedAppUsage public AccessibilityNodeInfo getAccessibilityFocusedVirtualView() { return mAccessibilityFocusedVirtualView; } @@ -4288,6 +4312,7 @@ public final class ViewRootImpl implements ViewParent, * @param inTouchMode Whether we want to be in touch mode. * @return True if the touch mode changed and focus changed was changed as a result */ + @UnsupportedAppUsage boolean ensureTouchMode(boolean inTouchMode) { if (DBG) Log.d("touchmode", "ensureTouchMode(" + inTouchMode + "), current " + "touch mode is " + mAttachInfo.mInTouchMode); @@ -6283,6 +6308,7 @@ public final class ViewRootImpl implements ViewParent, } /* drag/drop */ + @UnsupportedAppUsage void setLocalDragState(Object obj) { mLocalDragState = obj; } @@ -6430,6 +6456,7 @@ public final class ViewRootImpl implements ViewParent, } } + @UnsupportedAppUsage public void getLastTouchPoint(Point outLocation) { outLocation.x = (int) mLastTouchPoint.x; outLocation.y = (int) mLastTouchPoint.y; @@ -6828,6 +6855,7 @@ public final class ViewRootImpl implements ViewParent, } } + @UnsupportedAppUsage private void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, MergedConfiguration mergedConfiguration, Rect backDropFrame, boolean forceLayout, @@ -6992,10 +7020,12 @@ public final class ViewRootImpl implements ViewParent, } } + @UnsupportedAppUsage void enqueueInputEvent(InputEvent event) { enqueueInputEvent(event, null, 0, false); } + @UnsupportedAppUsage void enqueueInputEvent(InputEvent event, InputEventReceiver receiver, int flags, boolean processImmediately) { adjustInputEventForCompatibility(event); @@ -7336,6 +7366,7 @@ public final class ViewRootImpl implements ViewParent, mInvalidateOnAnimationRunnable.addViewRect(info); } + @UnsupportedAppUsage public void cancelInvalidate(View view) { mHandler.removeMessages(MSG_INVALIDATE, view); // fixme: might leak the AttachInfo.InvalidateInfo objects instead of returning @@ -7344,10 +7375,12 @@ public final class ViewRootImpl implements ViewParent, mInvalidateOnAnimationRunnable.removeView(view); } + @UnsupportedAppUsage public void dispatchInputEvent(InputEvent event) { dispatchInputEvent(event, null); } + @UnsupportedAppUsage public void dispatchInputEvent(InputEvent event, InputEventReceiver receiver) { SomeArgs args = SomeArgs.obtain(); args.arg1 = event; @@ -7363,6 +7396,7 @@ public final class ViewRootImpl implements ViewParent, mHandler.sendMessage(msg); } + @UnsupportedAppUsage public void dispatchKeyFromIme(KeyEvent event) { Message msg = mHandler.obtainMessage(MSG_DISPATCH_KEY_FROM_IME, event); msg.setAsynchronous(true); @@ -7381,6 +7415,7 @@ public final class ViewRootImpl implements ViewParent, * Note that it is the responsibility of the caller of this API to recycle the InputEvent it * passes in. */ + @UnsupportedAppUsage public void dispatchUnhandledInputEvent(InputEvent event) { if (event instanceof MotionEvent) { event = MotionEvent.obtain((MotionEvent) event); @@ -8083,6 +8118,7 @@ public final class ViewRootImpl implements ViewParent, } public static final class CalledFromWrongThreadException extends AndroidRuntimeException { + @UnsupportedAppUsage public CalledFromWrongThreadException(String msg) { super(msg); } |
