diff options
-rw-r--r-- | core/java/android/view/ViewConfiguration.java | 24 | ||||
-rw-r--r-- | core/java/android/view/ViewRoot.java | 2 | ||||
-rw-r--r-- | core/res/res/anim/activity_close_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/activity_close_exit.xml | 5 | ||||
-rw-r--r-- | core/res/res/anim/activity_open_enter.xml | 5 | ||||
-rw-r--r-- | core/res/res/anim/activity_open_exit.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/task_open_enter.xml | 2 | ||||
-rw-r--r-- | core/res/res/anim/task_open_exit.xml | 2 | ||||
-rw-r--r-- | services/java/com/android/server/LightsService.java | 4 | ||||
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 2 | ||||
-rw-r--r-- | services/java/com/android/server/am/ActivityRecord.java | 13 | ||||
-rw-r--r-- | services/java/com/android/server/am/ActivityStack.java | 4 |
12 files changed, 42 insertions, 29 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 6b41ce5..edad494 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -17,6 +17,7 @@ package android.view; import android.content.Context; +import android.content.res.Configuration; import android.util.DisplayMetrics; import android.util.SparseArray; @@ -217,22 +218,29 @@ public class ViewConfiguration { private ViewConfiguration(Context context) { final DisplayMetrics metrics = context.getResources().getDisplayMetrics(); final float density = metrics.density; + final float sizeAndDensity; + if (context.getResources().getConfiguration().isLayoutSizeAtLeast( + Configuration.SCREENLAYOUT_SIZE_XLARGE)) { + sizeAndDensity = density * 1.5f; + } else { + sizeAndDensity = density; + } - mEdgeSlop = (int) (density * EDGE_SLOP + 0.5f); - mFadingEdgeLength = (int) (density * FADING_EDGE_LENGTH + 0.5f); + mEdgeSlop = (int) (sizeAndDensity * EDGE_SLOP + 0.5f); + mFadingEdgeLength = (int) (sizeAndDensity * FADING_EDGE_LENGTH + 0.5f); mMinimumFlingVelocity = (int) (density * MINIMUM_FLING_VELOCITY + 0.5f); mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); - mTouchSlop = (int) (density * TOUCH_SLOP + 0.5f); - mPagingTouchSlop = (int) (density * PAGING_TOUCH_SLOP + 0.5f); - mDoubleTapSlop = (int) (density * DOUBLE_TAP_SLOP + 0.5f); - mWindowTouchSlop = (int) (density * WINDOW_TOUCH_SLOP + 0.5f); + mTouchSlop = (int) (sizeAndDensity * TOUCH_SLOP + 0.5f); + mPagingTouchSlop = (int) (sizeAndDensity * PAGING_TOUCH_SLOP + 0.5f); + mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); + mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); // Size of the screen in bytes, in ARGB_8888 format mMaximumDrawingCacheSize = 4 * metrics.widthPixels * metrics.heightPixels; - mOverscrollDistance = (int) (density * OVERSCROLL_DISTANCE + 0.5f); - mOverflingDistance = (int) (density * OVERFLING_DISTANCE + 0.5f); + mOverscrollDistance = (int) (sizeAndDensity * OVERSCROLL_DISTANCE + 0.5f); + mOverflingDistance = (int) (sizeAndDensity * OVERFLING_DISTANCE + 0.5f); } /** diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index ad101f8..8a9b78b 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -1133,7 +1133,7 @@ public final class ViewRoot extends Handler implements ViewParent, if (DEBUG_LAYOUT) Log.v(TAG, "Ooops, something changed! mWidth=" + mWidth + " measuredWidth=" + host.getMeasuredWidth() + " mHeight=" + mHeight - + " measuredHeight" + host.getMeasuredHeight() + + " measuredHeight=" + host.getMeasuredHeight() + " coveredInsetsChanged=" + contentInsetsChanged); // Ask host how big it wants to be diff --git a/core/res/res/anim/activity_close_enter.xml b/core/res/res/anim/activity_close_enter.xml index d525127..4260c08 100644 --- a/core/res/res/anim/activity_close_enter.xml +++ b/core/res/res/anim/activity_close_enter.xml @@ -18,14 +18,14 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal" + android:zAdjustment="top" android:shareInterpolator="false"> <scale android:fromXScale="0.975" android:toXScale="1.0" android:fromYScale="0.975" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha=".75" android:toAlpha="1.0" + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml index ab7adcb..8c97ee8 100644 --- a/core/res/res/anim/activity_close_exit.xml +++ b/core/res/res/anim/activity_close_exit.xml @@ -18,14 +18,11 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" + android:zAdjustment="normal" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="1.075" android:fromYScale="1.0" android:toYScale="1.075" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml index 90f8520..5f6ac68 100644 --- a/core/res/res/anim/activity_open_enter.xml +++ b/core/res/res/anim/activity_open_enter.xml @@ -18,14 +18,11 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" + android:zAdjustment="normal" android:shareInterpolator="false"> <scale android:fromXScale="1.125" android:toXScale="1.0" android:fromYScale="1.125" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml index 30a1dec..08b22b9 100644 --- a/core/res/res/anim/activity_open_exit.xml +++ b/core/res/res/anim/activity_open_exit.xml @@ -18,14 +18,14 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal" + android:zAdjustment="top" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="0.975" android:fromYScale="1.0" android:toYScale="0.975" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/linear" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0.75" + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/task_open_enter.xml b/core/res/res/anim/task_open_enter.xml index e3e8585..b3b3fd1 100644 --- a/core/res/res/anim/task_open_enter.xml +++ b/core/res/res/anim/task_open_enter.xml @@ -18,7 +18,7 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:shareInterpolator="false"> + android:detachWallpaper="true" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale=".9" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" diff --git a/core/res/res/anim/task_open_exit.xml b/core/res/res/anim/task_open_exit.xml index 5f03516..763b581 100644 --- a/core/res/res/anim/task_open_exit.xml +++ b/core/res/res/anim/task_open_exit.xml @@ -18,7 +18,7 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:shareInterpolator="false"> + android:detachWallpaper="true" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale="1.0" android:toYScale="0.0" android:pivotX="50%p" android:pivotY="50%p" diff --git a/services/java/com/android/server/LightsService.java b/services/java/com/android/server/LightsService.java index 9b57735..21f2bcf 100644 --- a/services/java/com/android/server/LightsService.java +++ b/services/java/com/android/server/LightsService.java @@ -24,12 +24,12 @@ import android.os.ServiceManager; import android.os.Message; import android.util.Slog; -import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; public class LightsService { private static final String TAG = "LightsService"; + private static final boolean DEBUG = false; static final int LIGHT_ID_BACKLIGHT = 0; static final int LIGHT_ID_KEYBOARD = 1; @@ -115,6 +115,8 @@ public class LightsService { private void setLightLocked(int color, int mode, int onMS, int offMS, int brightnessMode) { if (color != mColor || mode != mMode || onMS != mOnMS || offMS != mOffMS) { + if (DEBUG) Slog.v(TAG, "setLight #" + mId + ": color=#" + + Integer.toHexString(color)); mColor = color; mMode = mode; mOnMS = onMS; diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index d2a1786..ac3b96b 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -9515,7 +9515,7 @@ public class WindowManagerService extends IWindowManager.Stub final AppWindowToken atoken = win.mAppToken; final boolean gone = win.mViewVisibility == View.GONE || !win.mRelayoutCalled - || win.mRootToken.hidden + || (atoken == null && win.mRootToken.hidden) || (atoken != null && atoken.hiddenRequested) || win.mAttachedHidden || win.mExiting || win.mDestroying; diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java index 3dc3965..0fb30ff 100644 --- a/services/java/com/android/server/am/ActivityRecord.java +++ b/services/java/com/android/server/am/ActivityRecord.java @@ -60,7 +60,8 @@ class ActivityRecord extends IApplicationToken.Stub { final String processName; // process where this component wants to run final String taskAffinity; // as per ActivityInfo.taskAffinity final boolean stateNotNeeded; // As per ActivityInfo.flags - final boolean fullscreen; // covers the full screen? + final boolean fullscreen; // covers the full screen? + final boolean noDisplay; // activity is not displayed? final boolean componentSpecified; // did caller specifiy an explicit component? final boolean isHomeActivity; // do we consider this to be a home activity? final String baseDir; // where activity source (resources etc) located @@ -165,12 +166,13 @@ class ActivityRecord extends IApplicationToken.Stub { pw.print(" finishing="); pw.println(finishing); pw.print(prefix); pw.print("keysPaused="); pw.print(keysPaused); pw.print(" inHistory="); pw.print(inHistory); - pw.print(" immersive="); pw.print(immersive); - pw.print(" launchMode="); pw.println(launchMode); - pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen); pw.print(" visible="); pw.print(visible); pw.print(" sleeping="); pw.print(sleeping); pw.print(" idle="); pw.println(idle); + pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen); + pw.print(" noDisplay="); pw.print(noDisplay); + pw.print(" immersive="); pw.print(immersive); + pw.print(" launchMode="); pw.println(launchMode); pw.print(prefix); pw.print("frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); pw.print(" thumbnailNeeded="); pw.println(thumbnailNeeded); if (launchTime != 0 || startTime != 0) { @@ -282,6 +284,8 @@ class ActivityRecord extends IApplicationToken.Stub { com.android.internal.R.styleable.Window_windowIsFloating, false) && !ent.array.getBoolean( com.android.internal.R.styleable.Window_windowIsTranslucent, false); + noDisplay = ent != null && ent.array.getBoolean( + com.android.internal.R.styleable.Window_windowNoDisplay, false); if (!_componentSpecified || _launchedFromUid == Process.myUid() || _launchedFromUid == 0) { @@ -318,6 +322,7 @@ class ActivityRecord extends IApplicationToken.Stub { processName = null; packageName = null; fullscreen = true; + noDisplay = false; isHomeActivity = false; immersive = false; } diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 3761928..2040cbd 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -750,6 +750,10 @@ public class ActivityStack { } public final Bitmap screenshotActivities(ActivityRecord who) { + if (who.noDisplay) { + return null; + } + Resources res = mService.mContext.getResources(); int w = mThumbnailWidth; int h = mThumbnailHeight; |