summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/LoadedApk.java2
-rw-r--r--core/res/res/anim/wallpaper_close_enter.xml2
-rw-r--r--core/res/res/anim/wallpaper_intra_close_enter.xml2
-rw-r--r--core/res/res/anim/wallpaper_intra_open_exit.xml2
-rw-r--r--core/res/res/anim/wallpaper_open_exit.xml2
-rw-r--r--services/java/com/android/server/AlarmManagerService.java3
-rw-r--r--services/java/com/android/server/WindowManagerService.java72
7 files changed, 51 insertions, 34 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 03a98d1..60213f8 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -696,7 +696,7 @@ final class LoadedApk {
final Intent intent = mCurIntent;
mCurIntent = null;
- if (receiver == null) {
+ if (receiver == null || !mRegistered) {
if (mRegistered && ordered) {
if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
"Finishing null broadcast to " + mReceiver);
diff --git a/core/res/res/anim/wallpaper_close_enter.xml b/core/res/res/anim/wallpaper_close_enter.xml
index 42a9d38..e05345d 100644
--- a/core/res/res/anim/wallpaper_close_enter.xml
+++ b/core/res/res/anim/wallpaper_close_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/wallpaper_intra_close_enter.xml b/core/res/res/anim/wallpaper_intra_close_enter.xml
index 42a9d38..e05345d 100644
--- a/core/res/res/anim/wallpaper_intra_close_enter.xml
+++ b/core/res/res/anim/wallpaper_intra_close_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/wallpaper_intra_open_exit.xml b/core/res/res/anim/wallpaper_intra_open_exit.xml
index c750047..47ea0b4 100644
--- a/core/res/res/anim/wallpaper_intra_open_exit.xml
+++ b/core/res/res/anim/wallpaper_intra_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/core/res/res/anim/wallpaper_open_exit.xml b/core/res/res/anim/wallpaper_open_exit.xml
index c750047..47ea0b4 100644
--- a/core/res/res/anim/wallpaper_open_exit.xml
+++ b/core/res/res/anim/wallpaper_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/AlarmManagerService.java b/services/java/com/android/server/AlarmManagerService.java
index 4931cc7..5a36417 100644
--- a/services/java/com/android/server/AlarmManagerService.java
+++ b/services/java/com/android/server/AlarmManagerService.java
@@ -661,7 +661,8 @@ class AlarmManagerService extends IAlarmManager.Stub {
remove(mTimeTickSender);
mClockReceiver.scheduleTimeTickEvent();
Intent intent = new Intent(Intent.ACTION_TIME_CHANGED);
- intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
+ intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
+ | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
mContext.sendBroadcast(intent);
}
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 8b235cf..a2abec2 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -396,6 +396,8 @@ public class WindowManagerService extends IWindowManager.Stub
int mLastRotationFlags;
ArrayList<IRotationWatcher> mRotationWatchers
= new ArrayList<IRotationWatcher>();
+ int mDeferredRotation;
+ int mDeferredRotationAnimFlags;
boolean mLayoutNeeded = true;
boolean mAnimationPending = false;
@@ -516,10 +518,6 @@ public class WindowManagerService extends IWindowManager.Stub
ArrayList<WindowState> mNotifiedWindows;
boolean mDragInProgress;
- boolean mPerformDeferredRotation;
- int mRotation;
- int mAnimFlags;
-
private final Region mTmpRegion = new Region();
DragState(IBinder token, Surface surface, int flags, IBinder localWin) {
@@ -541,7 +539,6 @@ public class WindowManagerService extends IWindowManager.Stub
mData = null;
mThumbOffsetX = mThumbOffsetY = 0;
mNotifiedWindows = null;
- mPerformDeferredRotation = false;
}
void register() {
@@ -683,24 +680,15 @@ public class WindowManagerService extends IWindowManager.Stub
mInputMonitor.setUpdateInputWindowsNeededLw();
mInputMonitor.updateInputWindowsLw();
- // Retain the parameters of any deferred rotation operation so
- // that we can perform it after the reset / unref of the drag state
- final boolean performRotation = mPerformDeferredRotation;
- final int rotation = mRotation;
- final int animFlags = mAnimFlags;
-
// free our resources and drop all the object references
mDragState.reset();
mDragState = null;
- // Now that we've officially ended the drag, execute any
- // deferred rotation
- if (performRotation) {
- if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-drag rotation");
- boolean changed = setRotationUncheckedLocked(rotation, animFlags, false);
- if (changed) {
- sendNewConfiguration();
- }
+ if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-drag rotation");
+ boolean changed = setRotationUncheckedLocked(
+ WindowManagerPolicy.USE_LAST_ROTATION, 0, false);
+ if (changed) {
+ sendNewConfiguration();
}
}
@@ -836,12 +824,6 @@ public class WindowManagerService extends IWindowManager.Stub
return touchedWin;
}
-
- void setDeferredRotation(int rotation, int animFlags) {
- mRotation = rotation;
- mAnimFlags = animFlags;
- mPerformDeferredRotation = true;
- }
}
DragState mDragState = null;
@@ -5168,21 +5150,30 @@ public class WindowManagerService extends IWindowManager.Stub
* MUST CALL setNewConfiguration() TO UNFREEZE THE SCREEN.
*/
public boolean setRotationUncheckedLocked(int rotation, int animFlags, boolean inTransaction) {
- if (mDragState != null) {
+ if (mDragState != null || mScreenRotationAnimation != null) {
// Potential rotation during a drag. Don't do the rotation now, but make
// a note to perform the rotation later.
- if (DEBUG_ORIENTATION) Slog.v(TAG, "Deferring rotation during drag");
- mDragState.setDeferredRotation(rotation, animFlags);
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Deferring rotation.");
+ if (rotation != WindowManagerPolicy.USE_LAST_ROTATION) {
+ mDeferredRotation = rotation;
+ mDeferredRotationAnimFlags = animFlags;
+ }
return false;
}
boolean changed;
if (rotation == WindowManagerPolicy.USE_LAST_ROTATION) {
+ if (mDeferredRotation != WindowManagerPolicy.USE_LAST_ROTATION) {
+ rotation = mDeferredRotation;
+ mRequestedRotation = rotation;
+ mLastRotationFlags = mDeferredRotationAnimFlags;
+ }
rotation = mRequestedRotation;
} else {
mRequestedRotation = rotation;
mLastRotationFlags = animFlags;
}
+ mDeferredRotation = WindowManagerPolicy.USE_LAST_ROTATION;
if (DEBUG_ORIENTATION) Slog.v(TAG, "Overwriting rotation value from " + rotation);
rotation = mPolicy.rotationForOrientationLw(mForcedAppOrientation,
mRotation, mDisplayEnabled);
@@ -9634,6 +9625,7 @@ public class WindowManagerService extends IWindowManager.Stub
boolean focusDisplayed = false;
boolean animating = false;
boolean createWatermark = false;
+ boolean updateRotation = false;
if (mFxSession == null) {
mFxSession = new SurfaceSession();
@@ -9731,6 +9723,7 @@ public class WindowManagerService extends IWindowManager.Stub
animating = true;
} else {
mScreenRotationAnimation = null;
+ updateRotation = true;
}
}
}
@@ -10892,6 +10885,15 @@ public class WindowManagerService extends IWindowManager.Stub
mTurnOnScreen = false;
}
+ if (updateRotation) {
+ if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-rotate rotation");
+ boolean changed = setRotationUncheckedLocked(
+ WindowManagerPolicy.USE_LAST_ROTATION, 0, false);
+ if (changed) {
+ sendNewConfiguration();
+ }
+ }
+
// Check to see if we are now in a state where the screen should
// be enabled, because the window obscured flags have changed.
enableScreenIfNeededLocked();
@@ -11218,6 +11220,8 @@ public class WindowManagerService extends IWindowManager.Stub
Debug.stopMethodTracing();
}
+ boolean updateRotation = false;
+
if (CUSTOM_SCREEN_ROTATION) {
if (mScreenRotationAnimation != null) {
if (mScreenRotationAnimation.dismiss(MAX_ANIMATION_DURATION,
@@ -11225,6 +11229,7 @@ public class WindowManagerService extends IWindowManager.Stub
requestAnimationLocked(0);
} else {
mScreenRotationAnimation = null;
+ updateRotation = true;
}
}
} else {
@@ -11251,6 +11256,15 @@ public class WindowManagerService extends IWindowManager.Stub
2000);
mScreenFrozenLock.release();
+
+ if (updateRotation) {
+ if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-rotate rotation");
+ boolean changed = setRotationUncheckedLocked(
+ WindowManagerPolicy.USE_LAST_ROTATION, 0, false);
+ if (changed) {
+ sendNewConfiguration();
+ }
+ }
}
static int getPropertyInt(String[] tokens, int index, int defUnits, int defDps,
@@ -11629,6 +11643,8 @@ public class WindowManagerService extends IWindowManager.Stub
pw.print(" mRotation="); pw.print(mRotation);
pw.print(", mForcedAppOrientation="); pw.print(mForcedAppOrientation);
pw.print(", mRequestedRotation="); pw.println(mRequestedRotation);
+ pw.print(" mDeferredRotation="); pw.print(mDeferredRotation);
+ pw.print(", mDeferredRotationAnimFlags="); pw.print(mDeferredRotationAnimFlags);
pw.print(" mAnimationPending="); pw.print(mAnimationPending);
pw.print(" mWindowAnimationScale="); pw.print(mWindowAnimationScale);
pw.print(" mTransitionWindowAnimationScale="); pw.println(mTransitionAnimationScale);