Merge "Fix issue #5229575: Youtube link shared through messaging is not..."

This commit is contained in:
Dianne Hackborn
2011-09-01 15:54:43 -07:00
committed by Android (Google) Code Review
7 changed files with 34 additions and 11 deletions

View File

@@ -1291,7 +1291,8 @@ public final class ActivityThread {
public final boolean queueIdle() {
ActivityClientRecord a = mNewActivities;
boolean stopProfiling = false;
if (mBoundApplication.profileFd != null && mBoundApplication.autoStopProfiler) {
if (mBoundApplication != null && mBoundApplication.profileFd != null
&& mBoundApplication.autoStopProfiler) {
stopProfiling = true;
}
if (a != null) {

View File

@@ -871,6 +871,12 @@ public interface WindowManagerPolicy {
*/
public void systemReady();
/**
* Called when the system is done booting to the point where the
* user can start interacting with it.
*/
public void systemBooted();
/**
* Show boot time message to the user.
*/

View File

@@ -29,4 +29,7 @@
android:fillEnabled="true" android:fillAfter="true"
android:interpolator="@interpolator/decelerate_quint"
android:duration="300" />
<!-- This is needed to keep the animation running while wallpaper_close_enter completes -->
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
android:duration="600" />
</set>

View File

@@ -29,5 +29,7 @@
android:interpolator="@interpolator/accelerate_quint"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:duration="200" />
<!-- This is needed to keep the animation running while wallpaper_open_enter completes -->
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
android:duration="500" />
</set>

View File

@@ -267,6 +267,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
int mLidOpen = LID_ABSENT;
boolean mSystemReady;
boolean mSystemBooted;
boolean mHdmiPlugged;
int mUiMode = Configuration.UI_MODE_TYPE_NORMAL;
int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED;
@@ -2497,6 +2498,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mKeyguardMediator.isShowingAndNotHidden() :
mKeyguardMediator.isShowing());
if (!mSystemBooted) {
// If we have not yet booted, don't let key events do anything.
return 0;
}
if (false) {
Log.d(TAG, "interceptKeyTq keycode=" + keyCode
+ " screenIsOn=" + isScreenOn + " keyguardActive=" + keyguardActive);
@@ -3100,6 +3106,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
}
/** {@inheritDoc} */
public void systemBooted() {
synchronized (mLock) {
mSystemBooted = true;
}
}
ProgressDialog mBootMsgDialog = null;
/** {@inheritDoc} */
@@ -3492,7 +3505,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public void dump(String prefix, FileDescriptor fd, PrintWriter pw, String[] args) {
pw.print(prefix); pw.print("mSafeMode="); pw.print(mSafeMode);
pw.print(" mSystemRead="); pw.println(mSystemReady);
pw.print(" mSystemReady="); pw.print(mSystemReady);
pw.print(" mSystemBooted="); pw.println(mSystemBooted);
pw.print(prefix); pw.print("mLidOpen="); pw.print(mLidOpen);
pw.print(" mLidOpenRotation="); pw.print(mLidOpenRotation);
pw.print(" mHdmiPlugged="); pw.println(mHdmiPlugged);

View File

@@ -78,8 +78,6 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.FileObserver;
import android.os.FileUtils;
import android.os.FileUtils.FileStatus;
import android.os.Debug;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
@@ -706,6 +704,7 @@ public class PackageManagerService extends IPackageManager.Stub {
Runtime.getRuntime().gc();
}
if (msg.obj != null) {
@SuppressWarnings("unchecked")
Set<SdInstallArgs> args = (Set<SdInstallArgs>) msg.obj;
if (DEBUG_SD_INSTALL) Log.i(TAG, "Unloading all containers");
// Unload containers
@@ -3039,10 +3038,6 @@ public class PackageManagerService extends IPackageManager.Stub {
return null;
}
mScanningPath = scanFile;
if (pkg == null) {
mLastScanError = PackageManager.INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME;
return null;
}
if ((parseFlags&PackageParser.PARSE_IS_SYSTEM) != 0) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SYSTEM;

View File

@@ -4703,6 +4703,8 @@ public class WindowManagerService extends IWindowManager.Stub
mH.sendMessageDelayed(msg, 30*1000);
}
mPolicy.systemBooted();
performEnableScreen();
}
@@ -7921,13 +7923,13 @@ public class WindowManagerService extends IWindowManager.Stub
if (mWindowDetachedWallpaper != windowDetachedWallpaper) {
if (DEBUG_WALLPAPER) Slog.v(TAG,
"Detached wallpaper changed from " + mWindowDetachedWallpaper
+ windowDetachedWallpaper);
+ " to " + windowDetachedWallpaper);
mWindowDetachedWallpaper = windowDetachedWallpaper;
wallpaperMayChange = true;
}
if (windowAnimationBackgroundColor != 0) {
// If this window that wants black is the current wallpaper
// If the window that wants black is the current wallpaper
// target, then the black goes *below* the wallpaper so we
// don't cause the wallpaper to suddenly disappear.
WindowState target = windowAnimationBackground;