Merge change 25192 into eclair

* changes:
  Some improvements for wallpaper configuration.
This commit is contained in:
Android (Google) Code Review
2009-09-15 22:06:24 -04:00
8 changed files with 149 additions and 8 deletions

View File

@@ -10659,6 +10659,17 @@
visibility="public"
>
</field>
<field name="screen_background_light_transparent"
type="int"
transient="false"
volatile="false"
value="17301674"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="spinner_background"
type="int"
transient="false"
@@ -12714,6 +12725,17 @@
visibility="public"
>
</field>
<field name="Theme_Light_WallpaperSettings"
type="int"
transient="false"
volatile="false"
value="16973922"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="Theme_NoDisplay"
type="int"
transient="false"
@@ -12802,6 +12824,17 @@
visibility="public"
>
</field>
<field name="Theme_WallpaperSettings"
type="int"
transient="false"
volatile="false"
value="16973921"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="Theme_Wallpaper_NoTitleBar"
type="int"
transient="false"
@@ -117496,6 +117529,37 @@
</implements>
</interface>
</package>
<package name="android.service.wallpaper"
>
<class name="WallpaperSettingsActivity"
extends="android.preference.PreferenceActivity"
abstract="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<constructor name="WallpaperSettingsActivity"
type="android.service.wallpaper.WallpaperSettingsActivity"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
</constructor>
<field name="EXTRA_PREVIEW_MODE"
type="java.lang.String"
transient="false"
volatile="false"
value="&quot;android.service.wallpaper.PREVIEW_MODE&quot;"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
</class>
</package>
<package name="android.speech"
>
<class name="RecognizerIntent"

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package android.service.wallpaper;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceActivity;
/**
* Base class for activities that will be used to configure the settings of
* a wallpaper. You should derive from this class to allow it to select the
* proper theme of the activity depending on how it is being used.
*/
public class WallpaperSettingsActivity extends PreferenceActivity {
/**
* This boolean extra in the launch intent indicates that the settings
* are being used while the wallpaper is in preview mode.
*/
final public static String EXTRA_PREVIEW_MODE
= "android.service.wallpaper.PREVIEW_MODE";
@Override
protected void onCreate(Bundle icicle) {
if (false) {
Resources.Theme theme = getTheme();
if (getIntent().getBooleanExtra(EXTRA_PREVIEW_MODE, false)) {
theme.applyStyle(com.android.internal.R.style.PreviewWallpaperSettings, true);
} else {
theme.applyStyle(com.android.internal.R.style.ActiveWallpaperSettings, true);
}
}
super.onCreate(icicle);
}
}

View File

@@ -249,7 +249,7 @@ public class ZoomButtonsController implements View.OnTouchListener {
lp.height = LayoutParams.WRAP_CONTENT;
lp.width = LayoutParams.FILL_PARENT;
lp.type = LayoutParams.TYPE_APPLICATION_PANEL;
lp.format = PixelFormat.TRANSPARENT;
lp.format = PixelFormat.TRANSLUCENT;
lp.windowAnimations = com.android.internal.R.style.Animation_ZoomButtons;
mContainerLayoutParams = lp;

View File

@@ -24,7 +24,14 @@
<drawable name="status_bar_opened_default_background">#ff000000</drawable>
<drawable name="search_bar_default_color">#ff000000</drawable>
<drawable name="safe_mode_background">#60000000</drawable>
<!-- Background drawable that can be used for a transparent activity to
be able to display a dark UI: this darkens its background to make
a dark (default theme) UI more visible. -->
<drawable name="screen_background_dark_transparent">#80000000</drawable>
<!-- Background drawable that can be used for a transparent activity to
be able to display a light UI: this lightens its background to make
a light UI more visible. -->
<drawable name="screen_background_light_transparent">#80ffffff</drawable>
<color name="safe_mode_text">#80ffffff</color>
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>

View File

@@ -1168,10 +1168,13 @@
<public type="style" name="Theme.Wallpaper" />
<public type="style" name="Theme.Wallpaper.NoTitleBar" />
<public type="style" name="Theme.Wallpaper.NoTitleBar.Fullscreen" />
<public type="style" name="Theme.WallpaperSettings" />
<public type="style" name="Theme.Light.WallpaperSettings" />
<!-- Semi-transparent background that can be used when placing a dark
themed UI on top of some arbitrary background (such as the
wallpaper). This darkens the background sufficiently that the UI
can be seen. -->
<public type="drawable" name="screen_background_dark_transparent" />
<public type="drawable" name="screen_background_light_transparent" />
</resources>

View File

@@ -458,7 +458,6 @@
<style name="Widget.ListView.White" parent="Widget.AbsListView">
<item name="android:listSelector">@android:drawable/list_selector_background</item>
<item name="android:background">@android:color/white</item>
<item name="android:divider">@android:drawable/divider_horizontal_bright_opaque</item>
</style>

View File

@@ -303,6 +303,32 @@
<item name="android:windowContentOverlay">@null</item>
</style>
<!-- Theme for a wallpaper's setting activity that is designed to be on
top of a dark background. -->
<style name="Theme.WallpaperSettings">
<item name="android:windowBackground">@android:drawable/screen_background_dark_transparent</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
</style>
<!-- Theme for a wallpaper's setting activity that is designed to be on
top of a light background. -->
<style name="Theme.Light.WallpaperSettings">
<item name="android:windowBackground">@android:drawable/screen_background_light_transparent</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
</style>
<!-- Style to apply on top of a wallpaper settings theme when it is being
shown on top of the real wallpaper -->
<style name="ActiveWallpaperSettings">
</style>
<!-- Style to apply on top of a wallpaper settings theme when it is being
shown on top of the real wallpaper -->
<style name="PreviewWallpaperSettings">
</style>
<!-- Default theme for translucent activities, that is windows that allow you
to see through them to the windows behind. This sets up the translucent
flag and appropriate animations for your windows. -->

View File

@@ -1244,12 +1244,6 @@ public class WindowManagerService extends IWindowManager.Stub
"Skipping hidden or animating token: " + w);
continue;
}
// If this window's app token is ot fullscreen, also irrelevant.
if (!w.mAppToken.appFullscreen) {
if (DEBUG_WALLPAPER) Log.v(TAG,
"Skipping non-fullscreen token: " + w);
continue;
}
}
if (DEBUG_WALLPAPER) Log.v(TAG, "Win " + w + ": readyfordisplay="
+ w.isReadyForDisplay() + " drawpending=" + w.mDrawPending