summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/AndroidManifest.xml20
-rw-r--r--packages/SystemUI/res/drawable-hdpi/stat_notify_image.pngbin720 -> 716 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/stat_notify_image_error.pngbin972 -> 969 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/stat_notify_image.pngbin613 -> 583 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/stat_notify_image_error.pngbin731 -> 726 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/stat_notify_image.pngbin894 -> 907 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/stat_notify_image_error.pngbin1252 -> 1248 bytes
-rw-r--r--packages/SystemUI/res/values-be/strings.xml8
-rw-r--r--packages/SystemUI/res/values-et/strings.xml8
-rw-r--r--packages/SystemUI/res/values/strings.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java78
11 files changed, 103 insertions, 14 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index ec08e6c..e937587 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -46,6 +46,26 @@
</intent-filter>
</receiver>
+ <!-- should you need to launch the screensaver, this is a good way to do it -->
+ <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" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ <!-- launch screensaver on (desk) dock event -->
+ <receiver android:name=".DreamsDockLauncher$DockEventReceiver"
+ android:exported="true"
+ >
+ <intent-filter>
+ <action android:name="android.intent.action.DOCK_EVENT" />
+ </intent-filter>
+ </receiver>
+
+
<activity android:name=".usb.UsbStorageActivity"
android:label="@*android:string/usb_storage_activity_title"
android:excludeFromRecents="true">
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_image.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_image.png
index 5d2112a..3f36546 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_image.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_notify_image.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_image_error.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_image_error.png
index 355f02b..2b116bf 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_image_error.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_notify_image_error.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_image.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_image.png
index 87b0297..f345ca7 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_image.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_image.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_image_error.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_image_error.png
index 35ea65a..d95480d 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_image_error.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_image_error.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_notify_image.png b/packages/SystemUI/res/drawable-xhdpi/stat_notify_image.png
index 6afd2d0..4931304 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_notify_image.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_notify_image.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_notify_image_error.png b/packages/SystemUI/res/drawable-xhdpi/stat_notify_image_error.png
index a104cc2..5ba83b6 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_notify_image_error.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_notify_image_error.png
Binary files differ
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index d083467..a6c64ad 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -101,12 +101,7 @@
<string name="accessibility_wifi_one_bar" msgid="6854947280074467207">"Wi-Fi, адзiн слупок."</string>
<string name="accessibility_wifi_two_bars" msgid="3344340012058984348">"Wi-Fi, два слупкi."</string>
<string name="accessibility_wifi_three_bars" msgid="928322805193265041">"Wi-Fi, тры слупкi."</string>
- <string name="accessibility_wifi_signal_full" msgid="1275764416228473932">"Поўны сігнал Wi-Fi."</string>
- <string name="accessibility_no_wimax" msgid="4329180129727630368">"Няма сiгналу WiMAX."</string>
- <string name="accessibility_wimax_one_bar" msgid="4170994299011863648">"Адзiн слупок сiгналу WiMAX."</string>
- <string name="accessibility_wimax_two_bars" msgid="9176236858336502288">"Два слупкi сiгналу WiMAX."</string>
- <string name="accessibility_wimax_three_bars" msgid="6116551636752103927">"Тры слупкi сiгналу WiMAX."</string>
- <string name="accessibility_wimax_signal_full" msgid="2768089986795579558">"Моцны сiгнал WiMAX."</string>
+ <string name="accessibility_wifi_signal_full" msgid="4826278754383492058">"Моцны сiгнал Wi-Fi."</string>
<string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
<string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
<string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
@@ -140,5 +135,4 @@
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Пошук GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Месца задана праз GPS"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Выдалiць усе апавяшчэннi."</string>
- <string name="dreams_dock_launcher" msgid="3541196417659166245">"Актывацыя экраннай застаўкі"</string>
</resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index a5bfb4a..943b8ca 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -101,12 +101,7 @@
<string name="accessibility_wifi_one_bar" msgid="6854947280074467207">"WiFi signaal: üks post."</string>
<string name="accessibility_wifi_two_bars" msgid="3344340012058984348">"WiFi signaal: kaks posti."</string>
<string name="accessibility_wifi_three_bars" msgid="928322805193265041">"WiFi signaal: kolm posti."</string>
- <string name="accessibility_wifi_signal_full" msgid="1275764416228473932">"WiFi-signaal on tugev."</string>
- <string name="accessibility_no_wimax" msgid="4329180129727630368">"WiMAX-i pole."</string>
- <string name="accessibility_wimax_one_bar" msgid="4170994299011863648">"WiMAX-i on üks riba."</string>
- <string name="accessibility_wimax_two_bars" msgid="9176236858336502288">"WiMAX-i on kaks riba."</string>
- <string name="accessibility_wimax_three_bars" msgid="6116551636752103927">"WiMAX-i on kolm riba."</string>
- <string name="accessibility_wimax_signal_full" msgid="2768089986795579558">"WiMAX-i signaal on tugev."</string>
+ <string name="accessibility_wifi_signal_full" msgid="4826278754383492058">"WiFi signaal on täis."</string>
<string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
<string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
<string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
@@ -138,5 +133,4 @@
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS-i otsimine"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS-i määratud asukoht"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Kustuta kõik teatised."</string>
- <string name="dreams_dock_launcher" msgid="3541196417659166245">"Aktiveeri ekraanisäästja"</string>
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 2c1473b..fc81f8e 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -362,4 +362,7 @@
<!-- Content description of the clear button in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_clear_all">Clear all notifications.</string>
+
+ <!-- Description of the desk dock action that invokes the Android Dreams screen saver feature -->
+ <string name="dreams_dock_launcher">Activate screen saver</string>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java b/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java
new file mode 100644
index 0000000..1db2a7f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java
@@ -0,0 +1,78 @@
+package com.android.systemui;
+
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.provider.Settings;
+import android.util.Slog;
+
+public class DreamsDockLauncher extends Activity {
+ private static final String TAG = "DreamsDockLauncher";
+
+ // Launch the screen saver if started as an activity.
+ @Override
+ protected void onCreate (Bundle icicle) {
+ super.onCreate(icicle);
+ launchDream(this);
+ finish();
+ }
+
+ private static void launchDream(Context context) {
+ try {
+ String component = Settings.Secure.getString(
+ context.getContentResolver(), Settings.Secure.SCREENSAVER_COMPONENT);
+ if (component == null) {
+ component = context.getResources().getString(
+ com.android.internal.R.string.config_defaultDreamComponent);
+ }
+ if (component != null) {
+ // dismiss the notification shade, recents, etc.
+ context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+
+ ComponentName cn = ComponentName.unflattenFromString(component);
+ Intent zzz = new Intent(Intent.ACTION_MAIN)
+ .setComponent(cn)
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
+ | Intent.FLAG_ACTIVITY_NO_USER_ACTION
+ | Intent.FLAG_FROM_BACKGROUND
+ | Intent.FLAG_ACTIVITY_NO_HISTORY
+ );
+ Slog.v(TAG, "Starting screen saver on dock event: " + component);
+ context.startActivity(zzz);
+ } else {
+ Slog.e(TAG, "Couldn't start screen saver: none selected");
+ }
+ } catch (android.content.ActivityNotFoundException exc) {
+ // no screensaver? give up
+ Slog.e(TAG, "Couldn't start screen saver: none installed");
+ }
+ }
+
+ // Trap low-level dock events and launch the screensaver.
+ public static class DockEventReceiver extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final boolean activateOnDock = 0 != Settings.Secure.getInt(
+ context.getContentResolver(),
+ Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK, 1);
+
+ if (!activateOnDock) return;
+
+ if (Intent.ACTION_DOCK_EVENT.equals(intent.getAction())) {
+ Bundle extras = intent.getExtras();
+ int state = extras
+ .getInt(Intent.EXTRA_DOCK_STATE, Intent.EXTRA_DOCK_STATE_UNDOCKED);
+ if (state == Intent.EXTRA_DOCK_STATE_DESK
+ || state == Intent.EXTRA_DOCK_STATE_LE_DESK
+ || state == Intent.EXTRA_DOCK_STATE_HE_DESK) {
+ launchDream(context);
+ }
+ }
+ }
+ }
+}