Merge "Add a default Dreams component." into ics-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
f52a4482dd
@@ -741,4 +741,7 @@
|
||||
<string name="config_wimaxServiceClassname"></string>
|
||||
<!-- Name of the wimax state tracker clas -->
|
||||
<string name="config_wimaxStateTrackerClassname"></string>
|
||||
|
||||
<!-- Name of screensaver components to look for if none has been chosen by the user -->
|
||||
<string name="config_defaultDreamComponent">com.google.android.deskclock/com.android.deskclock.Screensaver</string>
|
||||
</resources>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
<!-- handle dock insertion, launch screensaver instead -->
|
||||
<activity android:name=".DreamsDockLauncher"
|
||||
android:theme="@android:style/Theme.Dialog"
|
||||
android:label="@string/dreams_dock_launcher">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -124,7 +125,7 @@
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DREAM" />
|
||||
<!-- <category android:name="android.intent.category.DREAM" />-->
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
@@ -18,6 +18,9 @@ public class DreamsDockLauncher extends Activity {
|
||||
try {
|
||||
String component = Settings.Secure.getString(
|
||||
getContentResolver(), Settings.Secure.DREAM_COMPONENT);
|
||||
if (component == null) {
|
||||
component = getResources().getString(com.android.internal.R.string.config_defaultDreamComponent);
|
||||
}
|
||||
if (component != null) {
|
||||
ComponentName cn = ComponentName.unflattenFromString(component);
|
||||
Intent zzz = new Intent(Intent.ACTION_MAIN)
|
||||
|
||||
@@ -3420,6 +3420,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
try {
|
||||
String component = Settings.Secure.getString(
|
||||
mContext.getContentResolver(), Settings.Secure.DREAM_COMPONENT);
|
||||
if (component == null) {
|
||||
component = mContext.getResources().getString(R.string.config_defaultDreamComponent);
|
||||
}
|
||||
if (component != null) {
|
||||
ComponentName cn = ComponentName.unflattenFromString(component);
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN)
|
||||
|
||||
Reference in New Issue
Block a user