summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/appwidget/AppWidgetManager.java4
-rw-r--r--services/java/com/android/server/SystemServer.java2
-rwxr-xr-xservices/java/com/android/server/wm/WindowManagerService.java36
3 files changed, 30 insertions, 12 deletions
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 3aa5181..810e790 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -323,7 +323,7 @@ public class AppWidgetManager {
*
* <p>
* The total Bitmap memory used by the RemoteViews object cannot exceed that required to
- * fill the screen once, ie. (screen width x screen height x 4) bytes.
+ * fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
*
* @param appWidgetIds The AppWidget instances for which to set the RemoteViews.
* @param views The RemoteViews object to show.
@@ -391,7 +391,7 @@ public class AppWidgetManager {
*
* <p>
* The total Bitmap memory used by the RemoteViews object cannot exceed that required to
- * fill the screen once, ie. (screen width x screen height x 4) bytes.
+ * fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
*
* @param appWidgetId The AppWidget instance for which to set the RemoteViews.
* @param views The RemoteViews object to show.
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index eaecd4c..9dd4a91 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -229,7 +229,7 @@ class ServerThread extends Thread {
Slog.i(TAG, "Window Manager");
wm = WindowManagerService.main(context, power,
factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL,
- !firstBoot);
+ !firstBoot, onlyCore);
ServiceManager.addService(Context.WINDOW_SERVICE, wm);
inputManager = wm.getInputManagerService();
ServiceManager.addService(Context.INPUT_SERVICE, inputManager);
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 73bfe8e..6906ed9 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -758,9 +758,15 @@ public class WindowManagerService extends IWindowManager.Stub
// The desired scaling factor for compatible apps.
float mCompatibleScreenScale;
+ // If true, only the core apps and services are being launched because the device
+ // is in a special boot mode, such as being encrypted or waiting for a decryption password.
+ // For example, when this flag is true, there will be no wallpaper service.
+ final boolean mOnlyCore;
+
public static WindowManagerService main(Context context,
- PowerManagerService pm, boolean haveInputMethods, boolean allowBootMsgs) {
- WMThread thr = new WMThread(context, pm, haveInputMethods, allowBootMsgs);
+ PowerManagerService pm, boolean haveInputMethods, boolean allowBootMsgs,
+ boolean onlyCore) {
+ WMThread thr = new WMThread(context, pm, haveInputMethods, allowBootMsgs, onlyCore);
thr.start();
synchronized (thr) {
@@ -781,21 +787,23 @@ public class WindowManagerService extends IWindowManager.Stub
private final PowerManagerService mPM;
private final boolean mHaveInputMethods;
private final boolean mAllowBootMessages;
+ private final boolean mOnlyCore;
public WMThread(Context context, PowerManagerService pm,
- boolean haveInputMethods, boolean allowBootMsgs) {
+ boolean haveInputMethods, boolean allowBootMsgs, boolean onlyCore) {
super("WindowManager");
mContext = context;
mPM = pm;
mHaveInputMethods = haveInputMethods;
mAllowBootMessages = allowBootMsgs;
+ mOnlyCore = onlyCore;
}
@Override
public void run() {
Looper.prepare();
WindowManagerService s = new WindowManagerService(mContext, mPM,
- mHaveInputMethods, mAllowBootMessages);
+ mHaveInputMethods, mAllowBootMessages, mOnlyCore);
android.os.Process.setThreadPriority(
android.os.Process.THREAD_PRIORITY_DISPLAY);
android.os.Process.setCanSelfBackground(false);
@@ -858,10 +866,11 @@ public class WindowManagerService extends IWindowManager.Stub
}
private WindowManagerService(Context context, PowerManagerService pm,
- boolean haveInputMethods, boolean showBootMsgs) {
+ boolean haveInputMethods, boolean showBootMsgs, boolean onlyCore) {
mContext = context;
mHaveInputMethods = haveInputMethods;
mAllowBootMessages = showBootMsgs;
+ mOnlyCore = onlyCore;
mLimitedAlphaCompositing = context.getResources().getBoolean(
com.android.internal.R.bool.config_sf_limitedAlpha);
mHeadless = "1".equals(SystemProperties.get(SYSTEM_HEADLESS, "0"));
@@ -5191,7 +5200,8 @@ public class WindowManagerService extends IWindowManager.Stub
Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled
+ " mForceDisplayEnabled=" + mForceDisplayEnabled
+ " mShowingBootMessages=" + mShowingBootMessages
- + " mSystemBooted=" + mSystemBooted, here);
+ + " mSystemBooted=" + mSystemBooted
+ + " mOnlyCore=" + mOnlyCore, here);
}
if (mDisplayEnabled) {
return;
@@ -5209,7 +5219,8 @@ public class WindowManagerService extends IWindowManager.Stub
// wallpaper, don't bother waiting for it
boolean haveWallpaper = false;
boolean wallpaperEnabled = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_enableWallpaperService);
+ com.android.internal.R.bool.config_enableWallpaperService)
+ && !mOnlyCore;
boolean haveKeyguard = true;
final int N = mWindows.size();
for (int i=0; i<N; i++) {
@@ -5285,6 +5296,9 @@ public class WindowManagerService extends IWindowManager.Stub
} catch (RemoteException ex) {
Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
}
+
+ // Enable input dispatch.
+ mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
}
mPolicy.enableScreenAfterBoot();
@@ -6636,7 +6650,8 @@ public class WindowManagerService extends IWindowManager.Stub
// -------------------------------------------------------------
final InputMonitor mInputMonitor = new InputMonitor(this);
-
+ private boolean mEventDispatchingEnabled;
+
public void pauseKeyDispatching(IBinder _token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"pauseKeyDispatching()")) {
@@ -6672,7 +6687,10 @@ public class WindowManagerService extends IWindowManager.Stub
}
synchronized (mWindowMap) {
- mInputMonitor.setEventDispatchingLw(enabled);
+ mEventDispatchingEnabled = enabled;
+ if (mDisplayEnabled) {
+ mInputMonitor.setEventDispatchingLw(enabled);
+ }
sendScreenStatusToClientsLocked();
}
}