diff options
Diffstat (limited to 'services/java/com')
8 files changed, 156 insertions, 80 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 6d817a1..5e4855b 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -1823,6 +1823,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public void sendConnectedBroadcast(NetworkInfo info) { + enforceConnectivityInternalPermission(); sendGeneralBroadcast(info, CONNECTIVITY_ACTION_IMMEDIATE); sendGeneralBroadcast(info, CONNECTIVITY_ACTION); } @@ -2107,6 +2108,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { /** @hide */ public void captivePortalCheckComplete(NetworkInfo info) { + enforceConnectivityInternalPermission(); mNetTrackers[info.getType()].captivePortalCheckComplete(); } @@ -2365,7 +2367,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { * net.tcp.buffersize.[default|wifi|umts|edge|gprs] and set them for system * wide use */ - public void updateNetworkSettings(NetworkStateTracker nt) { + private void updateNetworkSettings(NetworkStateTracker nt) { String key = nt.getTcpBufferSizesPropName(); String bufferSizes = key == null ? null : SystemProperties.get(key); @@ -2844,7 +2846,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public int setUsbTethering(boolean enable) { - enforceTetherAccessPermission(); + enforceTetherChangePermission(); if (isTetheringSupported()) { return mTethering.setUsbTethering(enable); } else { @@ -2997,6 +2999,10 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public ProxyProperties getProxy() { + // this information is already available as a world read/writable jvm property + // so this API change wouldn't have a benifit. It also breaks the passing + // of proxy info to all the JVMs. + // enforceAccessPermission(); synchronized (mDefaultProxyLock) { return mDefaultProxyDisabled ? null : mDefaultProxy; } @@ -3048,6 +3054,10 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public ProxyProperties getGlobalProxy() { + // this information is already available as a world read/writable jvm property + // so this API change wouldn't have a benifit. It also breaks the passing + // of proxy info to all the JVMs. + // enforceAccessPermission(); synchronized (mGlobalProxyLock) { return mGlobalProxy; } diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 30a7e23..e0b8015 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -4850,44 +4850,8 @@ final class ActivityStack { * @return Returns true if the move completed, false if not. */ final boolean moveTaskToBackLocked(int task, ActivityRecord reason) { - if (!newMoveTaskToBackLocked(task, reason)) { - return false; - } - - final int N = mHistory.size(); - int bottom = 0; - int pos = 0; - - // Shift all activities with this task down to the bottom - // of the stack, keeping them in the same internal order. - while (pos < N) { - ActivityRecord r = mHistory.get(pos); - if (localLOGV) Slog.v( - TAG, "At " + pos + " ckp " + r.task + ": " + r); - if (r.task.taskId == task) { - if (localLOGV) Slog.v(TAG, "Removing and adding at " + (N-1)); - if (DEBUG_ADD_REMOVE) { - RuntimeException here = new RuntimeException("here"); - here.fillInStackTrace(); - Slog.i(TAG, "Removing and adding activity " + r + " to stack at " - + bottom, here); - } - mHistory.remove(pos); - mHistory.add(bottom, r); - bottom++; - } - pos++; - } - if (VALIDATE_TASK_REPLACE) { - verifyActivityRecords(true); - } - - return true; - } - - final boolean newMoveTaskToBackLocked(int task, ActivityRecord reason) { Slog.i(TAG, "moveTaskToBack: " + task); - + // If we have a watcher, preflight the move before committing to it. First check // for *other* available tasks, but if none are available, then try again allowing the // current task to be selected. @@ -4917,6 +4881,36 @@ final class ActivityStack { mTaskHistory.remove(tr); mTaskHistory.add(0, tr); + // BEGIN REGION TO REMOVE. + final int N = mHistory.size(); + int bottom = 0; + int pos = 0; + + // Shift all activities with this task down to the bottom + // of the stack, keeping them in the same internal order. + while (pos < N) { + ActivityRecord r = mHistory.get(pos); + if (localLOGV) Slog.v( + TAG, "At " + pos + " ckp " + r.task + ": " + r); + if (r.task.taskId == task) { + if (localLOGV) Slog.v(TAG, "Removing and adding at " + (N-1)); + if (DEBUG_ADD_REMOVE) { + RuntimeException here = new RuntimeException("here"); + here.fillInStackTrace(); + Slog.i(TAG, "Removing and adding activity " + r + " to stack at " + + bottom, here); + } + mHistory.remove(pos); + mHistory.add(bottom, r); + bottom++; + } + pos++; + } + if (VALIDATE_TASK_REPLACE) { + verifyActivityRecords(true); + } + // END REGION TO REMOVE + if (reason != null && (reason.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) { mService.mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE, false); @@ -4929,6 +4923,7 @@ final class ActivityStack { AppTransition.TRANSIT_TASK_TO_BACK, false); } mService.mWindowManager.moveTaskToBottom(task); + if (VALIDATE_TOKENS) { validateAppTokensLocked(); } diff --git a/services/java/com/android/server/connectivity/Vpn.java b/services/java/com/android/server/connectivity/Vpn.java index bb7334a..533db46 100644 --- a/services/java/com/android/server/connectivity/Vpn.java +++ b/services/java/com/android/server/connectivity/Vpn.java @@ -462,6 +462,7 @@ public class Vpn extends BaseNetworkStateTracker { * secondary thread to perform connection work, returning quickly. */ public void startLegacyVpn(VpnProfile profile, KeyStore keyStore, LinkProperties egress) { + enforceControlPermission(); if (!keyStore.isUnlocked()) { throw new IllegalStateException("KeyStore isn't unlocked"); } diff --git a/services/java/com/android/server/wifi/WifiService.java b/services/java/com/android/server/wifi/WifiService.java index 3c14e3d..94b3ed3 100644 --- a/services/java/com/android/server/wifi/WifiService.java +++ b/services/java/com/android/server/wifi/WifiService.java @@ -375,9 +375,9 @@ public final class WifiService extends IWifiManager.Stub { /** * see {@link android.net.wifi.WifiManager#startScan()} */ - public void startScan(boolean forceActive) { + public void startScan() { enforceChangePermission(); - mWifiStateMachine.startScan(forceActive); + mWifiStateMachine.startScan(); noteScanStart(); } diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java index 5d4ab56..ae110dd 100644 --- a/services/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java @@ -49,7 +49,6 @@ class ScreenRotationAnimation { BlackFrame mExitingBlackFrame; BlackFrame mEnteringBlackFrame; int mWidth, mHeight; - int mExitAnimId, mEnterAnimId; int mOriginalRotation; int mOriginalWidth, mOriginalHeight; @@ -190,12 +189,9 @@ class ScreenRotationAnimation { } public ScreenRotationAnimation(Context context, Display display, SurfaceSession session, - boolean inTransaction, int originalWidth, int originalHeight, int originalRotation, - int exitAnim, int enterAnim) { + boolean inTransaction, int originalWidth, int originalHeight, int originalRotation) { mContext = context; mDisplay = display; - mExitAnimId = exitAnim; - mEnterAnimId = enterAnim; // Screenshot does NOT include rotation! if (originalRotation == Surface.ROTATION_90 @@ -321,7 +317,7 @@ class ScreenRotationAnimation { setRotationInTransaction(rotation); if (TWO_PHASE_ANIMATION) { return startAnimation(session, maxAnimationDuration, animationScale, - finalWidth, finalHeight, false); + finalWidth, finalHeight, false, 0, 0); } // Don't start animation yet. @@ -332,7 +328,8 @@ class ScreenRotationAnimation { * Returns true if animating. */ private boolean startAnimation(SurfaceSession session, long maxAnimationDuration, - float animationScale, int finalWidth, int finalHeight, boolean dismissing) { + float animationScale, int finalWidth, int finalHeight, boolean dismissing, + int exitAnim, int enterAnim) { if (mSurfaceControl == null) { // Can't do animation. return false; @@ -375,10 +372,10 @@ class ScreenRotationAnimation { + " origWidth=" + mOriginalWidth + " origHeight=" + mOriginalHeight); final boolean customAnim; - if (mExitAnimId != 0 && mEnterAnimId != 0) { + if (exitAnim != 0 && enterAnim != 0) { customAnim = true; - mRotateExitAnimation = AnimationUtils.loadAnimation(mContext, mExitAnimId); - mRotateEnterAnimation = AnimationUtils.loadAnimation(mContext, mEnterAnimId); + mRotateExitAnimation = AnimationUtils.loadAnimation(mContext, exitAnim); + mRotateEnterAnimation = AnimationUtils.loadAnimation(mContext, enterAnim); } else { customAnim = false; switch (delta) { @@ -578,7 +575,7 @@ class ScreenRotationAnimation { * Returns true if animating. */ public boolean dismiss(SurfaceSession session, long maxAnimationDuration, - float animationScale, int finalWidth, int finalHeight) { + float animationScale, int finalWidth, int finalHeight, int exitAnim, int enterAnim) { if (DEBUG_STATE) Slog.v(TAG, "Dismiss!"); if (mSurfaceControl == null) { // Can't do animation. @@ -586,7 +583,7 @@ class ScreenRotationAnimation { } if (!mStarted) { startAnimation(session, maxAnimationDuration, animationScale, finalWidth, finalHeight, - true); + true, exitAnim, enterAnim); } if (!mStarted) { return false; diff --git a/services/java/com/android/server/wm/Session.java b/services/java/com/android/server/wm/Session.java index e82068c..3611f3e 100644 --- a/services/java/com/android/server/wm/Session.java +++ b/services/java/com/android/server/wm/Session.java @@ -182,13 +182,13 @@ final class Session extends IWindowSession.Stub public int relayout(IWindow window, int seq, WindowManager.LayoutParams attrs, int requestedWidth, int requestedHeight, int viewFlags, - int flags, Rect outFrame, Rect outContentInsets, + int flags, Rect outFrame, Rect outOverscanInsets, Rect outContentInsets, Rect outVisibleInsets, Configuration outConfig, Surface outSurface) { if (false) Slog.d(WindowManagerService.TAG, ">>>>>> ENTERED relayout from " + Binder.getCallingPid()); int res = mService.relayoutWindow(this, window, seq, attrs, requestedWidth, requestedHeight, viewFlags, flags, - outFrame, outContentInsets, outVisibleInsets, + outFrame, outOverscanInsets, outContentInsets, outVisibleInsets, outConfig, outSurface); if (false) Slog.d(WindowManagerService.TAG, "<<<<<< EXITING relayout to " + Binder.getCallingPid()); diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index c2213b3..086da37 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -544,6 +544,9 @@ public class WindowManagerService extends IWindowManager.Stub DragState mDragState = null; + // For frozen screen animations. + int mExitAnimId, mEnterAnimId; + /** Pulled out of performLayoutAndPlaceSurfacesLockedInner in order to refactor into multiple * methods. */ class LayoutFields { @@ -2637,7 +2640,7 @@ public class WindowManagerService extends IWindowManager.Stub public int relayoutWindow(Session session, IWindow client, int seq, WindowManager.LayoutParams attrs, int requestedWidth, int requestedHeight, int viewVisibility, int flags, - Rect outFrame, Rect outContentInsets, + Rect outFrame, Rect outOverscanInsets, Rect outContentInsets, Rect outVisibleInsets, Configuration outConfig, Surface outSurface) { boolean toBeDisplayed = false; boolean inTouchMode; @@ -2904,6 +2907,7 @@ public class WindowManagerService extends IWindowManager.Stub win.mAppToken.updateReportedVisibilityLocked(); } outFrame.set(win.mCompatFrame); + outOverscanInsets.set(win.mOverscanInsets); outContentInsets.set(win.mContentInsets); outVisibleInsets.set(win.mVisibleInsets); if (localLOGV) Slog.v( @@ -3158,6 +3162,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mismatch || iterator.hasNext()) { Slog.w(TAG, "validateAppTokens: Mismatch! ActivityManager=" + tasks); Slog.w(TAG, "validateAppTokens: Mismatch! WindowManager=" + iterator); + Slog.w(TAG, "validateAppTokens: Mismatch! Callers=" + Debug.getCallers(4)); } } } @@ -3505,7 +3510,13 @@ public class WindowManagerService extends IWindowManager.Stub if (currentConfig.diff(mTempConfiguration) != 0) { mWaitingForConfig = true; getDefaultDisplayContentLocked().layoutNeeded = true; - startFreezingDisplayLocked(false, 0, 0); + int anim[] = new int[2]; + if (mAnimator.isDimmingLocked(Display.DEFAULT_DISPLAY)) { + anim[0] = anim[1] = 0; + } else { + mPolicy.selectRotationAnimationLw(anim); + } + startFreezingDisplayLocked(false, anim[0], anim[1]); config = new Configuration(mTempConfiguration); } } @@ -5485,7 +5496,13 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessageDelayed(H.WINDOW_FREEZE_TIMEOUT, WINDOW_FREEZE_TIMEOUT_DURATION); mWaitingForConfig = true; getDefaultDisplayContentLocked().layoutNeeded = true; - startFreezingDisplayLocked(inTransaction, 0, 0); + final int[] anim = new int[2]; + if (mAnimator.isDimmingLocked(Display.DEFAULT_DISPLAY)) { + anim[0] = anim[1] = 0; + } else { + mPolicy.selectRotationAnimationLw(anim); + } + startFreezingDisplayLocked(inTransaction, anim[0], anim[1]); // startFreezingDisplayLocked can reset the ScreenRotationAnimation. screenRotationAnimation = mAnimator.getScreenRotationAnimationLocked(Display.DEFAULT_DISPLAY); @@ -8111,6 +8128,8 @@ public class WindowManagerService extends IWindowManager.Stub private void updateResizingWindows(final WindowState w) { final WindowStateAnimator winAnimator = w.mWinAnimator; if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) { + w.mOverscanInsetsChanged |= + !w.mLastOverscanInsets.equals(w.mOverscanInsets); w.mContentInsetsChanged |= !w.mLastContentInsets.equals(w.mContentInsets); w.mVisibleInsetsChanged |= @@ -8138,6 +8157,7 @@ public class WindowManagerService extends IWindowManager.Stub + " configChanged=" + configChanged); } + w.mLastOverscanInsets.set(w.mOverscanInsets); w.mLastContentInsets.set(w.mContentInsets); w.mLastVisibleInsets.set(w.mVisibleInsets); makeWindowFreezingScreenIfNeededLocked(w); @@ -8674,9 +8694,11 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ORIENTATION && winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING) Slog.i( TAG, "Resizing " + win + " WITH DRAW PENDING"); - win.mClient.resized(win.mFrame, win.mLastContentInsets, win.mLastVisibleInsets, + win.mClient.resized(win.mFrame, win.mLastOverscanInsets, win.mLastContentInsets, + win.mLastVisibleInsets, winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING, configChanged ? win.mConfiguration : null); + win.mOverscanInsetsChanged = false; win.mContentInsetsChanged = false; win.mVisibleInsetsChanged = false; winAnimator.mSurfaceResized = false; @@ -9246,8 +9268,7 @@ public class WindowManagerService extends IWindowManager.Stub return null; } - private void startFreezingDisplayLocked(boolean inTransaction, - int exitAnim, int enterAnim) { + private void startFreezingDisplayLocked(boolean inTransaction, int exitAnim, int enterAnim) { if (mDisplayFrozen) { return; } @@ -9279,6 +9300,8 @@ public class WindowManagerService extends IWindowManager.Stub } if (CUSTOM_SCREEN_ROTATION) { + mExitAnimId = exitAnim; + mEnterAnimId = enterAnim; final DisplayContent displayContent = getDefaultDisplayContentLocked(); final int displayId = displayContent.getDisplayId(); ScreenRotationAnimation screenRotationAnimation = @@ -9292,8 +9315,7 @@ public class WindowManagerService extends IWindowManager.Stub final DisplayInfo displayInfo = displayContent.getDisplayInfo(); screenRotationAnimation = new ScreenRotationAnimation(mContext, display, mFxSession, inTransaction, displayInfo.logicalWidth, - displayInfo.logicalHeight, display.getRotation(), - exitAnim, enterAnim); + displayInfo.logicalHeight, display.getRotation()); mAnimator.setScreenRotationAnimationLocked(displayId, screenRotationAnimation); } } @@ -9331,9 +9353,14 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ORIENTATION) Slog.i(TAG, "**** Dismissing screen rotation animation"); // TODO(multidisplay): rotation on main screen only. DisplayInfo displayInfo = displayContent.getDisplayInfo(); + // Get rotation animation again, with new top window + boolean isDimming = mAnimator.isDimmingLocked(Display.DEFAULT_DISPLAY); + if (!mPolicy.validateRotationAnimationLw(mExitAnimId, mEnterAnimId, isDimming)) { + mExitAnimId = mEnterAnimId = 0; + } if (screenRotationAnimation.dismiss(mFxSession, MAX_ANIMATION_DURATION, mTransitionAnimationScale, displayInfo.logicalWidth, - displayInfo.logicalHeight)) { + displayInfo.logicalHeight, mExitAnimId, mEnterAnimId)) { scheduleAnimationLocked(); } else { screenRotationAnimation.kill(); @@ -9635,6 +9662,18 @@ public class WindowManagerService extends IWindowManager.Stub } } + void dumpDisplayContentsLocked(PrintWriter pw, boolean dumpAll) { + pw.println("WINDOW MANAGER DISPLAY CONTENTS (dumpsys window displays)"); + if (mDisplayReady) { + DisplayContentsIterator dCIterator = new DisplayContentsIterator(); + while (dCIterator.hasNext()) { + dCIterator.next().dump(" ", pw); + } + } else { + pw.println(" NO DISPLAY"); + } + } + void dumpWindowsLocked(PrintWriter pw, boolean dumpAll, ArrayList<WindowState> windows) { pw.println("WINDOW MANAGER WINDOWS (dumpsys window windows)"); @@ -9756,15 +9795,6 @@ public class WindowManagerService extends IWindowManager.Stub } } pw.println(); - pw.println(" DisplayContents:"); - if (mDisplayReady) { - DisplayContentsIterator dCIterator = new DisplayContentsIterator(); - while (dCIterator.hasNext()) { - dCIterator.next().dump(" ", pw); - } - } else { - pw.println(" NO DISPLAY"); - } pw.print(" mCurConfiguration="); pw.println(this.mCurConfiguration); pw.print(" mCurrentFocus="); pw.println(mCurrentFocus); if (mLastFocus != mCurrentFocus) { @@ -9944,6 +9974,7 @@ public class WindowManagerService extends IWindowManager.Stub pw.println(" p[policy]: policy state"); pw.println(" a[animator]: animator state"); pw.println(" s[essions]: active sessions"); + pw.println(" d[isplays]: active display contents"); pw.println(" t[okens]: token list"); pw.println(" w[indows]: window list"); pw.println(" cmd may also be a NAME to dump windows. NAME may"); @@ -9982,6 +10013,11 @@ public class WindowManagerService extends IWindowManager.Stub dumpSessionsLocked(pw, true); } return; + } else if ("displays".equals(cmd) || "d".equals(cmd)) { + synchronized(mWindowMap) { + dumpDisplayContentsLocked(pw, true); + } + return; } else if ("tokens".equals(cmd) || "t".equals(cmd)) { synchronized(mWindowMap) { dumpTokensLocked(pw, true); @@ -10032,6 +10068,11 @@ public class WindowManagerService extends IWindowManager.Stub if (dumpAll) { pw.println("-------------------------------------------------------------------------------"); } + dumpDisplayContentsLocked(pw, dumpAll); + pw.println(); + if (dumpAll) { + pw.println("-------------------------------------------------------------------------------"); + } dumpTokensLocked(pw, dumpAll); pw.println(); if (dumpAll) { diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index f0045b1..517c4e4 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -153,6 +153,14 @@ final class WindowState implements WindowManagerPolicy.WindowState { boolean mContentInsetsChanged; /** + * Insets that determine the area covered by the display overscan region. These are in the + * application's coordinate space (without compatibility scale applied). + */ + final Rect mOverscanInsets = new Rect(); + final Rect mLastOverscanInsets = new Rect(); + boolean mOverscanInsetsChanged; + + /** * Set to true if we are waiting for this window to receive its * given internal insets before laying out other windows based on it. */ @@ -206,6 +214,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { final Rect mContainingFrame = new Rect(); final Rect mDisplayFrame = new Rect(); + final Rect mOverscanFrame = new Rect(); final Rect mContentFrame = new Rect(); final Rect mParentFrame = new Rect(); final Rect mVisibleFrame = new Rect(); @@ -401,7 +410,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } @Override - public void computeFrameLw(Rect pf, Rect df, Rect cf, Rect vf) { + public void computeFrameLw(Rect pf, Rect df, Rect of, Rect cf, Rect vf) { mHaveFrame = true; final Rect container = mContainingFrame; @@ -458,6 +467,9 @@ final class WindowState implements WindowManagerPolicy.WindowState { mContentChanged = true; } + final Rect overscan = mOverscanFrame; + overscan.set(of); + final Rect content = mContentFrame; content.set(cf); @@ -489,8 +501,12 @@ final class WindowState implements WindowManagerPolicy.WindowState { // Now make sure the window fits in the overall display. Gravity.applyDisplay(mAttrs.gravity, df, frame); - // Make sure the system, content and visible frames are inside of the + // Make sure the overscan, content and visible frames are inside of the // final window frame. + if (overscan.left < frame.left) overscan.left = frame.left; + if (overscan.top < frame.top) overscan.top = frame.top; + if (overscan.right > frame.right) overscan.right = frame.right; + if (overscan.bottom > frame.bottom) overscan.bottom = frame.bottom; if (content.left < frame.left) content.left = frame.left; if (content.top < frame.top) content.top = frame.top; if (content.right > frame.right) content.right = frame.right; @@ -500,6 +516,12 @@ final class WindowState implements WindowManagerPolicy.WindowState { if (visible.right > frame.right) visible.right = frame.right; if (visible.bottom > frame.bottom) visible.bottom = frame.bottom; + final Rect overscanInsets = mOverscanInsets; + overscanInsets.left = overscan.left-frame.left; + overscanInsets.top = overscan.top-frame.top; + overscanInsets.right = frame.right-overscan.right; + overscanInsets.bottom = frame.bottom-overscan.bottom; + final Rect contentInsets = mContentInsets; contentInsets.left = content.left-frame.left; contentInsets.top = content.top-frame.top; @@ -517,6 +539,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { // If there is a size compatibility scale being applied to the // window, we need to apply this to its insets so that they are // reported to the app in its coordinate space. + overscanInsets.scale(mInvGlobalScale); contentInsets.scale(mInvGlobalScale); visibleInsets.scale(mInvGlobalScale); @@ -560,6 +583,11 @@ final class WindowState implements WindowManagerPolicy.WindowState { } @Override + public Rect getOverscanFrameLw() { + return mOverscanFrame; + } + + @Override public Rect getContentFrameLw() { return mContentFrame; } @@ -1259,17 +1287,21 @@ final class WindowState implements WindowManagerPolicy.WindowState { pw.print(prefix); pw.print("Frames: containing="); mContainingFrame.printShortString(pw); pw.print(" parent="); mParentFrame.printShortString(pw); - pw.print(" display="); mDisplayFrame.printShortString(pw); + pw.println(); + pw.print(prefix); pw.print(" display="); mDisplayFrame.printShortString(pw); + pw.print(" overscan="); mOverscanFrame.printShortString(pw); pw.println(); pw.print(prefix); pw.print(" content="); mContentFrame.printShortString(pw); pw.print(" visible="); mVisibleFrame.printShortString(pw); pw.println(); - pw.print(prefix); pw.print("Cur insets: content="); - mContentInsets.printShortString(pw); + pw.print(prefix); pw.print("Cur insets: overscan="); + mOverscanInsets.printShortString(pw); + pw.print(" content="); mContentInsets.printShortString(pw); pw.print(" visible="); mVisibleInsets.printShortString(pw); pw.println(); - pw.print(prefix); pw.print("Lst insets: content="); - mLastContentInsets.printShortString(pw); + pw.print(prefix); pw.print("Lst insets: overscan="); + mLastOverscanInsets.printShortString(pw); + pw.print(" content="); mLastContentInsets.printShortString(pw); pw.print(" visible="); mLastVisibleInsets.printShortString(pw); pw.println(); } |