Skip to content

Commit f52a448

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Add a default Dreams component." into ics-mr1
2 parents 5311917 + c224f76 commit f52a448

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

core/res/res/values/config.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,4 +741,7 @@
741741
<string name="config_wimaxServiceClassname"></string>
742742
<!-- Name of the wimax state tracker clas -->
743743
<string name="config_wimaxStateTrackerClassname"></string>
744+
745+
<!-- Name of screensaver components to look for if none has been chosen by the user -->
746+
<string name="config_defaultDreamComponent">com.google.android.deskclock/com.android.deskclock.Screensaver</string>
744747
</resources>

packages/SystemUI/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
<!-- handle dock insertion, launch screensaver instead -->
5050
<activity android:name=".DreamsDockLauncher"
51+
android:theme="@android:style/Theme.Dialog"
5152
android:label="@string/dreams_dock_launcher">
5253
<intent-filter>
5354
<action android:name="android.intent.action.MAIN" />
@@ -124,7 +125,7 @@
124125
<intent-filter>
125126
<action android:name="android.intent.action.MAIN" />
126127
<category android:name="android.intent.category.DEFAULT" />
127-
<category android:name="android.intent.category.DREAM" />
128+
<!-- <category android:name="android.intent.category.DREAM" />-->
128129
</intent-filter>
129130
</activity>
130131
</application>

packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ protected void onCreate (Bundle icicle) {
1818
try {
1919
String component = Settings.Secure.getString(
2020
getContentResolver(), Settings.Secure.DREAM_COMPONENT);
21+
if (component == null) {
22+
component = getResources().getString(com.android.internal.R.string.config_defaultDreamComponent);
23+
}
2124
if (component != null) {
2225
ComponentName cn = ComponentName.unflattenFromString(component);
2326
Intent zzz = new Intent(Intent.ACTION_MAIN)

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,9 @@ public void run() {
34203420
try {
34213421
String component = Settings.Secure.getString(
34223422
mContext.getContentResolver(), Settings.Secure.DREAM_COMPONENT);
3423+
if (component == null) {
3424+
component = mContext.getResources().getString(R.string.config_defaultDreamComponent);
3425+
}
34233426
if (component != null) {
34243427
ComponentName cn = ComponentName.unflattenFromString(component);
34253428
Intent intent = new Intent(Intent.ACTION_MAIN)

0 commit comments

Comments
 (0)