diff options
| author | Dianne Hackborn <hackbod@google.com> | 2015-05-22 16:34:44 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2015-05-22 16:34:44 -0700 |
| commit | 4bb6b751fbbb218e8a298db4aa008472a0aa8d31 (patch) | |
| tree | ba7bccf0a758da93655db357c6fe5a8f60f8e90b /core/java/android | |
| parent | 4cb03fa059d0145e81e624fddc4b57cb471bd786 (diff) | |
Revert "resolved conflicts for merge of 47249f2a to mnc-dev"
This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 34 | ||||
| -rw-r--r-- | core/java/android/view/IWindow.aidl | 2 | ||||
| -rw-r--r-- | core/java/android/view/IWindowSession.aidl | 6 | ||||
| -rw-r--r-- | core/java/android/view/SurfaceView.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/View.java | 15 | ||||
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 27 | ||||
| -rw-r--r-- | core/java/android/view/WindowManagerPolicy.java | 4 |
7 files changed, 19 insertions, 75 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 8952807f9a02..b93a4a541552 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -18,6 +18,7 @@ package android.service.wallpaper; import android.content.res.TypedArray; import android.graphics.Canvas; +import android.os.SystemProperties; import android.view.WindowInsets; import com.android.internal.R; @@ -160,11 +161,9 @@ public abstract class WallpaperService extends Service { final Rect mOverscanInsets = new Rect(); final Rect mContentInsets = new Rect(); final Rect mStableInsets = new Rect(); - final Rect mOutsets = new Rect(); final Rect mDispatchedOverscanInsets = new Rect(); final Rect mDispatchedContentInsets = new Rect(); final Rect mDispatchedStableInsets = new Rect(); - final Rect mDispatchedOutsets = new Rect(); final Rect mFinalSystemInsets = new Rect(); final Rect mFinalStableInsets = new Rect(); final Configuration mConfiguration = new Configuration(); @@ -269,7 +268,7 @@ public abstract class WallpaperService extends Service { final BaseIWindow mWindow = new BaseIWindow() { @Override public void resized(Rect frame, Rect overscanInsets, Rect contentInsets, - Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, + Rect visibleInsets, Rect stableInsets, boolean reportDraw, Configuration newConfig) { Message msg = mCaller.obtainMessageI(MSG_WINDOW_RESIZED, reportDraw ? 1 : 0); @@ -659,35 +658,30 @@ public abstract class WallpaperService extends Service { mInputEventReceiver = new WallpaperInputEventReceiver( mInputChannel, Looper.myLooper()); } - + mSurfaceHolder.mSurfaceLock.lock(); mDrawingAllowed = true; if (!fixedSize) { mLayout.surfaceInsets.set(mIWallpaperEngine.mDisplayPadding); - mLayout.surfaceInsets.left += mOutsets.left; - mLayout.surfaceInsets.top += mOutsets.top; - mLayout.surfaceInsets.right += mOutsets.right; - mLayout.surfaceInsets.bottom += mOutsets.bottom; } else { mLayout.surfaceInsets.set(0, 0, 0, 0); } final int relayoutResult = mSession.relayout( mWindow, mWindow.mSeq, mLayout, mWidth, mHeight, View.VISIBLE, 0, mWinFrame, mOverscanInsets, mContentInsets, - mVisibleInsets, mStableInsets, mOutsets, mConfiguration, - mSurfaceHolder.mSurface); + mVisibleInsets, mStableInsets, mConfiguration, mSurfaceHolder.mSurface); if (DEBUG) Log.v(TAG, "New surface: " + mSurfaceHolder.mSurface + ", frame=" + mWinFrame); - + int w = mWinFrame.width(); int h = mWinFrame.height(); if (!fixedSize) { final Rect padding = mIWallpaperEngine.mDisplayPadding; - w += padding.left + padding.right + mOutsets.left + mOutsets.right; - h += padding.top + padding.bottom + mOutsets.top + mOutsets.bottom; + w += padding.left + padding.right; + h += padding.top + padding.bottom; mOverscanInsets.left += padding.left; mOverscanInsets.top += padding.top; mOverscanInsets.right += padding.right; @@ -711,14 +705,9 @@ public abstract class WallpaperService extends Service { mCurHeight = h; } - if (DEBUG) { - Log.v(TAG, "Wallpaper size has changed: (" + mCurWidth + ", " + mCurHeight); - } - insetsChanged |= !mDispatchedOverscanInsets.equals(mOverscanInsets); insetsChanged |= !mDispatchedContentInsets.equals(mContentInsets); insetsChanged |= !mDispatchedStableInsets.equals(mStableInsets); - insetsChanged |= !mDispatchedOutsets.equals(mOutsets); mSurfaceHolder.setSurfaceFrameSize(w, h); mSurfaceHolder.mSurfaceLock.unlock(); @@ -778,21 +767,14 @@ public abstract class WallpaperService extends Service { if (insetsChanged) { mDispatchedOverscanInsets.set(mOverscanInsets); - mDispatchedOverscanInsets.left += mOutsets.left; - mDispatchedOverscanInsets.top += mOutsets.top; - mDispatchedOverscanInsets.right += mOutsets.right; - mDispatchedOverscanInsets.bottom += mOutsets.bottom; mDispatchedContentInsets.set(mContentInsets); mDispatchedStableInsets.set(mStableInsets); - mDispatchedOutsets.set(mOutsets); mFinalSystemInsets.set(mDispatchedOverscanInsets); mFinalStableInsets.set(mDispatchedStableInsets); + mFinalSystemInsets.bottom = mIWallpaperEngine.mDisplayPadding.bottom; WindowInsets insets = new WindowInsets(mFinalSystemInsets, null, mFinalStableInsets, getResources().getConfiguration().isScreenRound()); - if (DEBUG) { - Log.v(TAG, "dispatching insets=" + insets); - } onApplyWindowInsets(insets); } diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl index 9cf37595c2ec..0fefdc77367a 100644 --- a/core/java/android/view/IWindow.aidl +++ b/core/java/android/view/IWindow.aidl @@ -46,7 +46,7 @@ oneway interface IWindow { void executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor); void resized(in Rect frame, in Rect overscanInsets, in Rect contentInsets, - in Rect visibleInsets, in Rect stableInsets, in Rect outsets, boolean reportDraw, + in Rect visibleInsets, in Rect stableInsets, boolean reportDraw, in Configuration newConfig); void moved(int newX, int newY); void dispatchAppVisibility(boolean visible); diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl index 19253dd47f49..fc0148f4b3c6 100644 --- a/core/java/android/view/IWindowSession.aidl +++ b/core/java/android/view/IWindowSession.aidl @@ -79,13 +79,11 @@ interface IWindowSession { * contents to make sure the user can see it. This is different than * <var>outContentInsets</var> in that these insets change transiently, * so complex relayout of the window should not happen based on them. - * @param outOutsets Rect in which is placed the dead area of the screen that we would like to - * treat as real display. Example of such area is a chin in some models of wearable devices. * @param outConfiguration New configuration of window, if it is now * becoming visible and the global configuration has changed since it * was last displayed. * @param outSurface Object in which is placed the new display surface. - * + * * @return int Result flags: {@link WindowManagerGlobal#RELAYOUT_SHOW_FOCUS}, * {@link WindowManagerGlobal#RELAYOUT_FIRST_TIME}. */ @@ -93,7 +91,7 @@ interface IWindowSession { int requestedWidth, int requestedHeight, int viewVisibility, int flags, out Rect outFrame, out Rect outOverscanInsets, out Rect outContentInsets, out Rect outVisibleInsets, out Rect outStableInsets, - out Rect outOutsets, out Configuration outConfig, out Surface outSurface); + out Configuration outConfig, out Surface outSurface); /** * If a call to relayout() asked to have the surface destroy deferred, diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 160c66208e7f..49be57d1bc0a 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -106,7 +106,6 @@ public class SurfaceView extends View { final Rect mOverscanInsets = new Rect(); final Rect mContentInsets = new Rect(); final Rect mStableInsets = new Rect(); - final Rect mOutsets = new Rect(); final Configuration mConfiguration = new Configuration(); static final int KEEP_SCREEN_ON_MSG = 1; @@ -520,8 +519,7 @@ public class SurfaceView extends View { visible ? VISIBLE : GONE, WindowManagerGlobal.RELAYOUT_DEFER_SURFACE_DESTROY, mWinFrame, mOverscanInsets, mContentInsets, - mVisibleInsets, mStableInsets, mOutsets, mConfiguration, - mNewSurface); + mVisibleInsets, mStableInsets, mConfiguration, mNewSurface); if ((relayoutResult & WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME) != 0) { mReportDrawNeeded = true; } @@ -656,7 +654,7 @@ public class SurfaceView extends View { @Override public void resized(Rect frame, Rect overscanInsets, Rect contentInsets, - Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, + Rect visibleInsets, Rect stableInsets, boolean reportDraw, Configuration newConfig) { SurfaceView surfaceView = mSurfaceView.get(); if (surfaceView != null) { diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 4e3c3f158cde..3962b70dfe38 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -7363,15 +7363,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * Returns the outsets, which areas of the device that aren't a surface, but we would like to - * treat them as such. - * @hide - */ - public void getOutsets(Rect outOutsetRect) { - outOutsetRect.set(mAttachInfo.mOutsets); - } - - /** * Returns the visibility status for this view. * * @return One of {@link #VISIBLE}, {@link #INVISIBLE}, or {@link #GONE}. @@ -21557,12 +21548,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final Rect mStableInsets = new Rect(); /** - * For windows that include areas that are not covered by real surface these are the outsets - * for real surface. - */ - final Rect mOutsets = new Rect(); - - /** * The internal insets given by this window. This value is * supplied by the client (through * {@link ViewTreeObserver.OnComputeInternalInsetsListener}) and will diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 7aae572b30b2..41f906aeae16 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -267,7 +267,6 @@ public final class ViewRootImpl implements ViewParent, final Rect mPendingVisibleInsets = new Rect(); final Rect mPendingStableInsets = new Rect(); final Rect mPendingContentInsets = new Rect(); - final Rect mPendingOutsets = new Rect(); final ViewTreeObserver.InternalInsetsInfo mLastGivenInsets = new ViewTreeObserver.InternalInsetsInfo(); @@ -1267,12 +1266,6 @@ public final class ViewRootImpl implements ViewParent, contentInsets = mPendingContentInsets; stableInsets = mPendingStableInsets; } - Rect outsets = mAttachInfo.mOutsets; - if (outsets.left > 0 || outsets.top > 0 || outsets.right > 0 || outsets.bottom > 0) { - contentInsets = new Rect(contentInsets.left + outsets.left, - contentInsets.top + outsets.top, contentInsets.right + outsets.right, - contentInsets.bottom + outsets.bottom); - } mLastWindowInsets = new WindowInsets(contentInsets, null /* windowDecorInsets */, stableInsets, mContext.getResources().getConfiguration().isScreenRound()); @@ -1431,9 +1424,6 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.v(TAG, "Visible insets changing to: " + mAttachInfo.mVisibleInsets); } - if (!mPendingOutsets.equals(mAttachInfo.mOutsets)) { - insetsChanged = true; - } if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) { windowSizeMayChange = true; @@ -1607,7 +1597,6 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mVisibleInsets); final boolean stableInsetsChanged = !mPendingStableInsets.equals( mAttachInfo.mStableInsets); - final boolean outsetsChanged = !mPendingOutsets.equals(mAttachInfo.mOutsets); if (contentInsetsChanged) { if (mWidth > 0 && mHeight > 0 && lp != null && ((lp.systemUiVisibility|lp.subtreeSystemUiVisibility) @@ -1691,11 +1680,9 @@ public final class ViewRootImpl implements ViewParent, } if (contentInsetsChanged || mLastSystemUiVisibility != mAttachInfo.mSystemUiVisibility || mApplyInsetsRequested - || mLastOverscanRequested != mAttachInfo.mOverscanRequested - || outsetsChanged) { + || mLastOverscanRequested != mAttachInfo.mOverscanRequested) { mLastSystemUiVisibility = mAttachInfo.mSystemUiVisibility; mLastOverscanRequested = mAttachInfo.mOverscanRequested; - mAttachInfo.mOutsets.set(mPendingOutsets); mApplyInsetsRequested = false; dispatchApplyInsets(host); } @@ -3269,7 +3256,6 @@ public final class ViewRootImpl implements ViewParent, && mPendingContentInsets.equals(args.arg2) && mPendingStableInsets.equals(args.arg6) && mPendingVisibleInsets.equals(args.arg3) - && mPendingOutsets.equals(args.arg7) && args.arg4 == null) { break; } @@ -3288,7 +3274,6 @@ public final class ViewRootImpl implements ViewParent, mPendingContentInsets.set((Rect) args.arg2); mPendingStableInsets.set((Rect) args.arg6); mPendingVisibleInsets.set((Rect) args.arg3); - mPendingOutsets.set((Rect) args.arg7); args.recycle(); @@ -5399,7 +5384,7 @@ public final class ViewRootImpl implements ViewParent, (int) (mView.getMeasuredHeight() * appScale + 0.5f), viewVisibility, insetsPending ? WindowManagerGlobal.RELAYOUT_INSETS_PENDING : 0, mWinFrame, mPendingOverscanInsets, mPendingContentInsets, mPendingVisibleInsets, - mPendingStableInsets, mPendingOutsets, mPendingConfiguration, mSurface); + mPendingStableInsets, mPendingConfiguration, mSurface); //Log.d(TAG, "<<<<<< BACK FROM relayout"); if (restore) { params.restore(); @@ -5668,8 +5653,7 @@ public final class ViewRootImpl implements ViewParent, } public void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets, - Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, - Configuration newConfig) { + Rect visibleInsets, Rect stableInsets, boolean reportDraw, Configuration newConfig) { if (DEBUG_LAYOUT) Log.v(TAG, "Resizing " + this + ": frame=" + frame.toShortString() + " contentInsets=" + contentInsets.toShortString() + " visibleInsets=" + visibleInsets.toShortString() @@ -5689,7 +5673,6 @@ public final class ViewRootImpl implements ViewParent, args.arg4 = sameProcessCall && newConfig != null ? new Configuration(newConfig) : newConfig; args.arg5 = sameProcessCall ? new Rect(overscanInsets) : overscanInsets; args.arg6 = sameProcessCall ? new Rect(stableInsets) : stableInsets; - args.arg7 = sameProcessCall ? new Rect(outsets) : outsets; msg.obj = args; mHandler.sendMessage(msg); } @@ -6649,12 +6632,12 @@ public final class ViewRootImpl implements ViewParent, @Override public void resized(Rect frame, Rect overscanInsets, Rect contentInsets, - Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, + Rect visibleInsets, Rect stableInsets, boolean reportDraw, Configuration newConfig) { final ViewRootImpl viewAncestor = mViewAncestor.get(); if (viewAncestor != null) { viewAncestor.dispatchResized(frame, overscanInsets, contentInsets, - visibleInsets, stableInsets, outsets, reportDraw, newConfig); + visibleInsets, stableInsets, reportDraw, newConfig); } } diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 463e6c188129..1b759a33de56 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -158,12 +158,10 @@ public interface WindowManagerPolicy { * @param decorFrame The decor frame specified by policy specific to this window, * to use for proper cropping during animation. * @param stableFrame The frame around which stable system decoration is positioned. - * @param outsetFrame The frame that includes areas that aren't part of the surface but we - * want to treat them as such. */ public void computeFrameLw(Rect parentFrame, Rect displayFrame, Rect overlayFrame, Rect contentFrame, Rect visibleFrame, Rect decorFrame, - Rect stableFrame, Rect outsetFrame); + Rect stableFrame); /** * Retrieve the current frame of the window that has been assigned by |
