Get rid of the extended themes.

We now decide whether to use a bitmap background based on whether the
window's drawing is hardware accelerated.  To do this, there is a new
"state_accelerated" that state list drawables can be parameterized on,
and the standard window background uses this to select a solid color
or bitmap drawable as appropriate.

Introduces a little hackery to have wm preview windows pretend like
they are hardware accelerated even if they aren't, so the preview looks
closer to the actual app.

Also Add a DialogWhenLarge variation for the light theme.

Change-Id: I215a79d5df65ba3eed52ab363cade9d8218a6588
This commit is contained in:
Dianne Hackborn
2010-11-12 18:03:47 -08:00
parent 7c2ae65703
commit 7eec10e6c9
20 changed files with 176 additions and 40 deletions

View File

@ -3729,7 +3729,7 @@ public class WindowManagerService extends IWindowManager.Stub
public void setAppStartingWindow(IBinder token, String pkg,
int theme, CharSequence nonLocalizedLabel, int labelRes, int icon,
IBinder transferFrom, boolean createIfNeeded) {
int windowFlags, IBinder transferFrom, boolean createIfNeeded) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppStartingIcon()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
@ -3877,7 +3877,7 @@ public class WindowManagerService extends IWindowManager.Stub
mStartingIconInTransition = true;
wtoken.startingData = new StartingData(
pkg, theme, nonLocalizedLabel,
labelRes, icon);
labelRes, icon, windowFlags);
Message m = mH.obtainMessage(H.ADD_STARTING, wtoken);
// Note: we really want to do sendMessageAtFrontOfQueue() because we
// want to process the message ASAP, before any other queued
@ -8440,14 +8440,16 @@ public class WindowManagerService extends IWindowManager.Stub
final CharSequence nonLocalizedLabel;
final int labelRes;
final int icon;
final int windowFlags;
StartingData(String _pkg, int _theme, CharSequence _nonLocalizedLabel,
int _labelRes, int _icon) {
int _labelRes, int _icon, int _windowFlags) {
pkg = _pkg;
theme = _theme;
nonLocalizedLabel = _nonLocalizedLabel;
labelRes = _labelRes;
icon = _icon;
windowFlags = _windowFlags;
}
}
@ -8568,7 +8570,7 @@ public class WindowManagerService extends IWindowManager.Stub
view = mPolicy.addStartingWindow(
wtoken.token, sd.pkg,
sd.theme, sd.nonLocalizedLabel, sd.labelRes,
sd.icon);
sd.icon, sd.windowFlags);
} catch (Exception e) {
Slog.w(TAG, "Exception when adding starting window", e);
}