summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk4
-rw-r--r--core/java/android/app/AlertDialog.java6
-rw-r--r--core/java/android/app/Dialog.java11
-rw-r--r--core/java/android/app/Notification.java9
-rw-r--r--core/java/android/app/NotificationManager.java7
-rw-r--r--core/java/android/content/ContentProvider.java9
-rw-r--r--core/java/android/content/ContentResolver.java6
-rw-r--r--core/java/android/nfc/NfcActivityManager.java1
-rw-r--r--core/java/android/os/storage/IMountService.java26
-rw-r--r--core/java/android/view/ContextMenu.java6
-rw-r--r--core/java/android/view/DragEvent.java6
-rw-r--r--core/java/android/view/Menu.java6
-rw-r--r--core/java/android/view/MenuItem.java6
-rw-r--r--core/java/android/view/SubMenu.java6
-rw-r--r--core/java/android/view/View.java18
-rw-r--r--core/java/android/view/ViewGroup.java14
-rw-r--r--core/java/android/view/VolumePanel.java107
-rw-r--r--core/java/android/webkit/WebView.java30
-rw-r--r--core/java/android/widget/TextView.java5
-rw-r--r--core/java/android/widget/Toast.java7
-rw-r--r--core/java/com/android/internal/widget/LockScreenWidgetCallback.java3
-rw-r--r--core/java/com/android/internal/widget/TransportControlView.java98
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.pngbin1731 -> 1724 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.pngbin1695 -> 1689 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.pngbin1172 -> 1169 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.pngbin1146 -> 1143 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.pngbin2332 -> 2334 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.pngbin2367 -> 2366 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_holo.pngbin2336 -> 2342 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_holo_dark.pngbin2132 -> 2133 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_holo_light.pngbin2186 -> 2186 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.pngbin2952 -> 2945 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.pngbin2831 -> 2820 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_code_lock_default_holo.pngbin697 -> 697 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_dark.pngbin2576 -> 2582 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_light.pngbin2762 -> 2767 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_disabled_holo_dark.pngbin1159 -> 1158 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_disabled_holo_light.pngbin1209 -> 1207 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_focused_holo_dark.pngbin2734 -> 2734 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_focused_holo_light.pngbin2943 -> 2942 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_normal_holo_dark.pngbin1317 -> 1318 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_normal_holo_light.pngbin1326 -> 1322 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_pressed_holo_dark.pngbin3162 -> 3159 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_off_pressed_holo_light.pngbin3282 -> 3279 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_dark.pngbin2601 -> 2598 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_light.pngbin2743 -> 2746 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_disabled_holo_dark.pngbin1848 -> 1848 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_disabled_holo_light.pngbin1864 -> 1860 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_focused_holo_dark.pngbin2764 -> 2768 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_focused_holo_light.pngbin2913 -> 2910 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_normal_holo_light.pngbin2002 -> 2006 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_pressed_holo_dark.pngbin3226 -> 3224 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_star_on_pressed_holo_light.pngbin3252 -> 3250 bytes
-rw-r--r--core/res/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.pngbin1774 -> 1755 bytes
-rw-r--r--core/res/res/drawable-hdpi/fastscroll_label_left_holo_light.9.pngbin1763 -> 1737 bytes
-rw-r--r--core/res/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.pngbin1737 -> 1726 bytes
-rw-r--r--core/res/res/drawable-hdpi/fastscroll_label_right_holo_light.9.pngbin1683 -> 1677 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_bullet_key_permission.pngbin865 -> 538 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_answer_active.pngbin9066 -> 9066 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.pngbin17982 -> 17978 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.pngbin6412 -> 6413 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.pngbin16563 -> 16551 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.pngbin5387 -> 5387 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.pngbin7896 -> 7894 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.pngbin8378 -> 8363 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.pngbin12968 -> 12977 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.pngbin5716 -> 5708 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.pngbin12774 -> 12771 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.pngbin5172 -> 5176 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.pngbin9620 -> 9616 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.pngbin6727 -> 6729 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_next.pngbin1094 -> 931 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_previous.pngbin1088 -> 915 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.pngbin697 -> 697 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.pngbin7367 -> 7373 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.pngbin7343 -> 7356 bytes
-rw-r--r--core/res/res/drawable-hdpi/list_selector_background_disabled.9.pngbin231 -> 215 bytes
-rw-r--r--core/res/res/drawable-hdpi/presence_away.pngbin1278 -> 1280 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_big_half_holo_dark.pngbin2444 -> 2442 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_big_half_holo_light.pngbin2503 -> 2502 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_big_off_holo_dark.pngbin1570 -> 1570 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_big_off_holo_light.pngbin1620 -> 1620 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_big_on_holo_dark.pngbin2448 -> 2447 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_big_on_holo_light.pngbin2463 -> 2455 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_med_half_holo_light.pngbin1746 -> 1745 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_med_off_holo_light.pngbin1159 -> 1157 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_med_on_holo_light.pngbin1727 -> 1723 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_small_half_holo_dark.pngbin1126 -> 1128 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_small_half_holo_light.pngbin1157 -> 1157 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_small_off_holo_dark.pngbin783 -> 783 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_small_off_holo_light.pngbin799 -> 800 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_small_on_holo_dark.pngbin1126 -> 1129 bytes
-rw-r--r--core/res/res/drawable-hdpi/rate_star_small_on_holo_light.pngbin1143 -> 1144 bytes
-rw-r--r--core/res/res/drawable-hdpi/scrubber_control_focused_holo.pngbin1594 -> 1604 bytes
-rw-r--r--core/res/res/drawable-hdpi/scrubber_control_normal_holo.pngbin1770 -> 1771 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_16_inner_holo.pngbin755 -> 755 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_20_inner_holo.pngbin879 -> 879 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_20_outer_holo.pngbin759 -> 759 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_48_inner_holo.pngbin2081 -> 2079 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_48_outer_holo.pngbin1811 -> 1812 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_76_inner_holo.pngbin3374 -> 3366 bytes
-rw-r--r--core/res/res/drawable-hdpi/spinner_76_outer_holo.pngbin2876 -> 2859 bytes
-rw-r--r--core/res/res/drawable-hdpi/stat_notify_call_mute.pngbin1031 -> 832 bytes
-rw-r--r--core/res/res/drawable-hdpi/stat_sys_speakerphone.pngbin1084 -> 930 bytes
-rw-r--r--core/res/res/drawable-hdpi/text_select_handle_left.pngbin1667 -> 1661 bytes
-rw-r--r--core/res/res/drawable-hdpi/text_select_handle_middle.pngbin1800 -> 1809 bytes
-rw-r--r--core/res/res/drawable-hdpi/text_select_handle_right.pngbin1762 -> 1754 bytes
-rw-r--r--core/res/res/drawable-mdpi/ab_share_pack_holo_light.9.pngbin2838 -> 122 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.pngbin1737 -> 1738 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_code_lock_touched.pngbin827 -> 826 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.pngbin2286 -> 2282 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.pngbin1575 -> 1572 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.pngbin2361 -> 2367 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.pngbin1661 -> 1656 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.pngbin2664 -> 2668 bytes
-rw-r--r--core/res/res/drawable-mdpi/fastscroll_label_left_holo_light.9.pngbin1152 -> 1136 bytes
-rw-r--r--core/res/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.pngbin1128 -> 1112 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_bullet_key_permission.pngbin476 -> 449 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_next.pngbin864 -> 540 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_previous.pngbin858 -> 541 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.pngbin4025 -> 4022 bytes
-rw-r--r--core/res/res/drawable-mdpi/list_selector_background_disabled.9.pngbin201 -> 182 bytes
-rw-r--r--core/res/res/drawable-mdpi/scrubber_control_pressed_holo.pngbin1361 -> 1360 bytes
-rw-r--r--core/res/res/drawable-mdpi/stat_notify_call_mute.pngbin751 -> 591 bytes
-rw-r--r--core/res/res/drawable-mdpi/stat_sys_speakerphone.pngbin754 -> 634 bytes
-rw-r--r--core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.pngbin0 -> 70 bytes
-rw-r--r--core/res/res/drawable-sw600dp-hdpi/stat_notify_call_mute.pngbin0 -> 1050 bytes
-rw-r--r--core/res/res/drawable-sw600dp-hdpi/stat_sys_speakerphone.pngbin0 -> 1246 bytes
-rw-r--r--core/res/res/drawable-sw600dp-mdpi/stat_notify_call_mute.pngbin0 -> 736 bytes
-rw-r--r--core/res/res/drawable-sw600dp-mdpi/stat_sys_speakerphone.pngbin0 -> 847 bytes
-rw-r--r--core/res/res/drawable-sw600dp-mdpi/unlock_halo.pngbin4500 -> 4502 bytes
-rw-r--r--core/res/res/drawable-sw600dp-xhdpi/stat_notify_call_mute.pngbin0 -> 1465 bytes
-rw-r--r--core/res/res/drawable-sw600dp-xhdpi/stat_sys_speakerphone.pngbin0 -> 1772 bytes
-rw-r--r--core/res/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.pngbin2406 -> 2391 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_bullet_key_permission.pngbin1166 -> 641 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_next.pngbin1385 -> 921 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_previous.pngbin1393 -> 916 bytes
-rw-r--r--core/res/res/drawable-xhdpi/list_selector_background_disabled.9.pngbin280 -> 266 bytes
-rw-r--r--core/res/res/drawable-xhdpi/spinner_16_inner_holo.pngbin938 -> 938 bytes
-rw-r--r--core/res/res/drawable-xhdpi/stat_notify_call_mute.pngbin1331 -> 1091 bytes
-rw-r--r--core/res/res/drawable-xhdpi/stat_sys_speakerphone.pngbin1436 -> 1306 bytes
-rw-r--r--core/res/res/layout/keyguard_transport_control.xml4
-rw-r--r--docs/html/resources/resources-data.js6
-rw-r--r--docs/html/sdk/android-4.0.jd8
-rw-r--r--docs/html/sdk/eclipse-adt.jd3
-rw-r--r--docs/html/sdk/tools-notes.jd3
-rw-r--r--libs/gui/tests/Surface_test.cpp27
-rw-r--r--media/java/android/media/AudioService.java9
-rw-r--r--packages/BackupRestoreConfirmation/res/values/strings.xml6
-rw-r--r--packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java38
-rw-r--r--packages/SystemUI/res/layout/status_bar.xml21
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded.xml2
-rw-r--r--packages/SystemUI/res/values/styles.xml13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java9
-rw-r--r--policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java48
-rw-r--r--services/java/com/android/server/BackupManagerService.java61
-rw-r--r--services/java/com/android/server/MountService.java47
157 files changed, 547 insertions, 149 deletions
diff --git a/Android.mk b/Android.mk
index a38723a30b56..f41130b3066b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -402,8 +402,8 @@ web_docs_sample_code_flags := \
resources/samples/AccelerometerPlay "Accelerometer Play" \
-samplecode $(sample_dir)/ActionBarCompat \
resources/samples/ActionBarCompat "Action Bar Compatibility" \
- -samplecode $(sample_dir)/AndroidBeam \
- resources/samples/AndroidBeam "Android Beam" \
+ -samplecode $(sample_dir)/AndroidBeamDemo \
+ resources/samples/AndroidBeamDemo "Android Beam Demo" \
-samplecode $(sample_dir)/ApiDemos \
resources/samples/ApiDemos "API Demos" \
-samplecode $(sample_dir)/Support4Demos \
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index c09e87fc0f9a..e37b3faae054 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -54,6 +54,12 @@ import android.widget.ListView;
* without text editors, so that it will be placed on top of the current
* input method UI. You can modify this behavior by forcing the flag to your
* desired mode after calling {@link #onCreate}.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about creating dialogs, read the
+ * <a href="{@docRoot}guide/topics/ui/dialogs.html">Dialogs</a> developer guide.</p>
+ * </div>
*/
public class AlertDialog extends Dialog implements DialogInterface {
private AlertController mAlert;
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 82186dd36d40..7a6941924f03 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -66,9 +66,14 @@ import java.lang.ref.WeakReference;
* your Dialog takes input focus, as it the default) with the following code:
*
* <pre>
- * getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
- * WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
- * </pre>
+ * getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+ * WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);</pre>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about creating dialogs, read the
+ * <a href="{@docRoot}guide/topics/ui/dialogs.html">Dialogs</a> developer guide.</p>
+ * </div>
*/
public class Dialog implements DialogInterface, Window.Callback,
KeyEvent.Callback, OnCreateContextMenuListener {
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 9490b96b4f8d..f5add25162c4 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -38,9 +38,12 @@ import java.text.NumberFormat;
* <p>The {@link Notification.Builder Notification.Builder} has been added to make it
* easier to construct Notifications.</p>
*
- * <p>For a guide to creating notifications, see the
- * <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Creating Status
- * Bar Notifications</a> document in the Dev Guide.</p>
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For a guide to creating notifications, read the
+ * <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Status Bar Notifications</a>
+ * developer guide.</p>
+ * </div>
*/
public class Notification implements Parcelable
{
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index 4913e7895fe9..bf83f5edc1bc 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -55,6 +55,13 @@ import android.util.Log;
* You do not instantiate this class directly; instead, retrieve it through
* {@link android.content.Context#getSystemService}.
*
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For a guide to creating notifications, read the
+ * <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Status Bar Notifications</a>
+ * developer guide.</p>
+ * </div>
+ *
* @see android.app.Notification
* @see android.content.Context#getSystemService
*/
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index e452f1fa3162..092a0c854f72 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -45,9 +45,6 @@ import java.util.ArrayList;
* multiple applications you can use a database directly via
* {@link android.database.sqlite.SQLiteDatabase}.
*
- * <p>For more information, read <a href="{@docRoot}guide/topics/providers/content-providers.html">Content
- * Providers</a>.</p>
- *
* <p>When a request is made via
* a {@link ContentResolver} the system inspects the authority of the given URI and passes the
* request to the content provider registered with the authority. The content provider can interpret
@@ -73,6 +70,12 @@ import java.util.ArrayList;
* <p>Requests to {@link ContentResolver} are automatically forwarded to the appropriate
* ContentProvider instance, so subclasses don't have to worry about the details of
* cross-process calls.</p>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about using content providers, read the
+ * <a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>
+ * developer guide.</p>
*/
public abstract class ContentProvider implements ComponentCallbacks2 {
private static final String TAG = "ContentProvider";
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 0d25926265fc..e92334909847 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -54,6 +54,12 @@ import java.util.Random;
/**
* This class provides applications access to the content model.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about using a ContentResolver with content providers, read the
+ * <a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>
+ * developer guide.</p>
*/
public abstract class ContentResolver {
/**
diff --git a/core/java/android/nfc/NfcActivityManager.java b/core/java/android/nfc/NfcActivityManager.java
index da878d4f2228..5fe58e902f82 100644
--- a/core/java/android/nfc/NfcActivityManager.java
+++ b/core/java/android/nfc/NfcActivityManager.java
@@ -162,6 +162,7 @@ public final class NfcActivityManager extends INdefPushCallback.Stub {
synchronized void maybeRemoveState(Activity activity, NfcActivityState state) {
if (state.ndefMessage == null && state.ndefMessageCallback == null &&
state.onNdefPushCompleteCallback == null) {
+ NfcFragment.remove(activity);
mNfcState.remove(activity);
}
}
diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java
index d1dc6e578b82..0640d7e9852b 100644
--- a/core/java/android/os/storage/IMountService.java
+++ b/core/java/android/os/storage/IMountService.java
@@ -658,6 +658,24 @@ public interface IMountService extends IInterface {
return _result;
}
+ @Override
+ public int verifyEncryptionPassword(String password) throws RemoteException {
+ Parcel _data = Parcel.obtain();
+ Parcel _reply = Parcel.obtain();
+ int _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ _data.writeString(password);
+ mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0);
+ _reply.readException();
+ _result = _reply.readInt();
+ } finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
+
public Parcelable[] getVolumeList() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
@@ -761,6 +779,8 @@ public interface IMountService extends IInterface {
static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31;
+ static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32;
+
/**
* Cast an IBinder object into an IMountService interface, generating a
* proxy if needed.
@@ -1286,6 +1306,12 @@ public interface IMountService extends IInterface {
public int changeEncryptionPassword(String password) throws RemoteException;
/**
+ * Verify the encryption password against the stored volume. This method
+ * may only be called by the system process.
+ */
+ public int verifyEncryptionPassword(String password) throws RemoteException;
+
+ /**
* Returns list of all mountable volumes.
*/
public Parcelable[] getVolumeList() throws RemoteException;
diff --git a/core/java/android/view/ContextMenu.java b/core/java/android/view/ContextMenu.java
index dd1d7db0e7a0..decabcbcc54c 100644
--- a/core/java/android/view/ContextMenu.java
+++ b/core/java/android/view/ContextMenu.java
@@ -29,6 +29,12 @@ import android.widget.AdapterView;
* To show a context menu on long click, most clients will want to call
* {@link Activity#registerForContextMenu} and override
* {@link Activity#onCreateContextMenu}.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
*/
public interface ContextMenu extends Menu {
/**
diff --git a/core/java/android/view/DragEvent.java b/core/java/android/view/DragEvent.java
index 8f491ef61a0f..f559e21f661e 100644
--- a/core/java/android/view/DragEvent.java
+++ b/core/java/android/view/DragEvent.java
@@ -114,6 +114,12 @@ import android.os.Parcelable;
* {@link android.view.DragEvent#writeToParcel(Parcel,int)}, and
* {@link android.view.DragEvent#toString()} methods always return valid data.
* </p>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For a guide to implementing drag and drop features, read the
+ * <a href="{@docRoot}guide/topics/ui/drag-drop.html">Drag and Drop</a> developer guide.</p>
+ * </div>
*/
public class DragEvent implements Parcelable {
private static final boolean TRACK_RECYCLED_LOCATION = false;
diff --git a/core/java/android/view/Menu.java b/core/java/android/view/Menu.java
index 97825e678a74..7157bc54a33f 100644
--- a/core/java/android/view/Menu.java
+++ b/core/java/android/view/Menu.java
@@ -41,6 +41,12 @@ import android.content.Intent;
* item check marks are discouraged.
* <li><b>Sub menus</b>: Do not support item icons, or nested sub menus.
* </ol>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
*/
public interface Menu {
diff --git a/core/java/android/view/MenuItem.java b/core/java/android/view/MenuItem.java
index ccd835378ffb..2dfbcb5c10fd 100644
--- a/core/java/android/view/MenuItem.java
+++ b/core/java/android/view/MenuItem.java
@@ -29,6 +29,12 @@ import android.view.View.OnCreateContextMenuListener;
* methods.
* <p>
* For a feature set of specific menu types, see {@link Menu}.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
*/
public interface MenuItem {
/*
diff --git a/core/java/android/view/SubMenu.java b/core/java/android/view/SubMenu.java
index e98148616819..196a183c5839 100644
--- a/core/java/android/view/SubMenu.java
+++ b/core/java/android/view/SubMenu.java
@@ -22,6 +22,12 @@ import android.graphics.drawable.Drawable;
* Subclass of {@link Menu} for sub menus.
* <p>
* Sub menus do not support item icons, or nested sub menus.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
*/
public interface SubMenu extends Menu {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 73e5026df6f5..d5f18cc2f58a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -418,7 +418,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
* <h3>Drawing</h3>
* <p>
* Drawing is handled by walking the tree and rendering each view that
- * intersects the the invalid region. Because the tree is traversed in-order,
+ * intersects the invalid region. Because the tree is traversed in-order,
* this means that parents will draw before (i.e., behind) their children, with
* siblings drawn in the order they appear in the tree.
* If you set a background drawable for a View, then the View will draw it for you
@@ -8364,7 +8364,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
!((ViewGroup) mParent).isViewTransitioning(this));
}
/**
- * Mark the the area defined by dirty as needing to be drawn. If the view is
+ * Mark the area defined by dirty as needing to be drawn. If the view is
* visible, {@link #onDraw(android.graphics.Canvas)} will be called at some point
* in the future. This must be called from a UI thread. To call from a non-UI
* thread, call {@link #postInvalidate()}.
@@ -8409,7 +8409,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
}
/**
- * Mark the the area defined by the rect (l,t,r,b) as needing to be drawn.
+ * Mark the area defined by the rect (l,t,r,b) as needing to be drawn.
* The coordinates of the dirty rect are relative to the view.
* If the view is visible, {@link #onDraw(android.graphics.Canvas)}
* will be called at some point in the future. This must be called from
@@ -13095,6 +13095,12 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* {@link android.graphics.Canvas} object, then it calls {@link #onDrawShadow(Canvas) onDrawShadow()}
* so that your application can draw the shadow image in the Canvas.
* </p>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For a guide to implementing drag and drop features, read the
+ * <a href="{@docRoot}guide/topics/ui/drag-drop.html">Drag and Drop</a> developer guide.</p>
+ * </div>
*/
public static class DragShadowBuilder {
private final WeakReference<View> mView;
@@ -14086,6 +14092,12 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* to this view. The callback will be invoked before the hosting view's own
* onDrag(event) method. If the listener wants to fall back to the hosting view's
* onDrag(event) behavior, it should return 'false' from this callback.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For a guide to implementing drag and drop features, read the
+ * <a href="{@docRoot}guide/topics/ui/drag-drop.html">Drag and Drop</a> developer guide.</p>
+ * </div>
*/
public interface OnDragListener {
/**
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 9266ae25bcdd..62b20b3196ed 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -60,6 +60,12 @@ import java.util.HashSet;
* Also see {@link LayoutParams} for layout attributes.
* </p>
*
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about creating user interface layouts, read the
+ * <a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> developer
+ * guide.</p></div>
+ *
* @attr ref android.R.styleable#ViewGroup_clipChildren
* @attr ref android.R.styleable#ViewGroup_clipToPadding
* @attr ref android.R.styleable#ViewGroup_layoutAnimation
@@ -5158,7 +5164,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* </ul>
* There are subclasses of LayoutParams for different subclasses of
* ViewGroup. For example, AbsoluteLayout has its own subclass of
- * LayoutParams which adds an X and Y value.
+ * LayoutParams which adds an X and Y value.</p>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about creating user interface layouts, read the
+ * <a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> developer
+ * guide.</p></div>
*
* @attr ref android.R.styleable#ViewGroup_Layout_layout_height
* @attr ref android.R.styleable#ViewGroup_Layout_layout_width
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java
index 122865e1e4cf..cdf1f8df3f54 100644
--- a/core/java/android/view/VolumePanel.java
+++ b/core/java/android/view/VolumePanel.java
@@ -97,6 +97,7 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
protected AudioService mAudioService;
private boolean mRingIsSilent;
private boolean mShowCombinedVolumes;
+ private boolean mVoiceCapable;
/** Dialog containing all the sliders */
private final Dialog mDialog;
@@ -117,40 +118,56 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
/** All the slider controls mapped by stream type */
private HashMap<Integer,StreamControl> mStreamControls;
- // List of stream types and their order
- // RING, VOICE_CALL & BLUETOOTH_SCO are hidden unless explicitly requested
- private static final int [] STREAM_TYPES = {
- AudioManager.STREAM_BLUETOOTH_SCO,
- AudioManager.STREAM_RING,
- AudioManager.STREAM_VOICE_CALL,
- AudioManager.STREAM_MUSIC,
- AudioManager.STREAM_NOTIFICATION
- };
+ private enum StreamResources {
+ BluetoothSCOStream(AudioManager.STREAM_BLUETOOTH_SCO,
+ R.string.volume_icon_description_bluetooth,
+ R.drawable.ic_audio_bt,
+ R.drawable.ic_audio_bt,
+ false),
+ RingerStream(AudioManager.STREAM_RING,
+ R.string.volume_icon_description_ringer,
+ R.drawable.ic_audio_ring_notif,
+ R.drawable.ic_audio_ring_notif_mute,
+ false),
+ VoiceStream(AudioManager.STREAM_VOICE_CALL,
+ R.string.volume_icon_description_incall,
+ R.drawable.ic_audio_phone,
+ R.drawable.ic_audio_phone,
+ false),
+ MediaStream(AudioManager.STREAM_MUSIC,
+ R.string.volume_icon_description_media,
+ R.drawable.ic_audio_vol,
+ R.drawable.ic_audio_vol_mute,
+ true),
+ NotificationStream(AudioManager.STREAM_NOTIFICATION,
+ R.string.volume_icon_description_notification,
+ R.drawable.ic_audio_notification,
+ R.drawable.ic_audio_notification_mute,
+ true);
- private static final int [] CONTENT_DESCRIPTIONS = {
- R.string.volume_icon_description_bluetooth,
- R.string.volume_icon_description_ringer,
- R.string.volume_icon_description_incall,
- R.string.volume_icon_description_media,
- R.string.volume_icon_description_notification
- };
-
- // These icons need to correspond to the ones above.
- private static final int [] STREAM_ICONS_NORMAL = {
- R.drawable.ic_audio_bt,
- R.drawable.ic_audio_ring_notif,
- R.drawable.ic_audio_phone,
- R.drawable.ic_audio_vol,
- R.drawable.ic_audio_notification,
+ int streamType;
+ int descRes;
+ int iconRes;
+ int iconMuteRes;
+ // RING, VOICE_CALL & BLUETOOTH_SCO are hidden unless explicitly requested
+ boolean show;
+
+ StreamResources(int streamType, int descRes, int iconRes, int iconMuteRes, boolean show) {
+ this.streamType = streamType;
+ this.descRes = descRes;
+ this.iconRes = iconRes;
+ this.iconMuteRes = iconMuteRes;
+ this.show = show;
+ }
};
- // These icons need to correspond to the ones above.
- private static final int [] STREAM_ICONS_MUTED = {
- R.drawable.ic_audio_bt,
- R.drawable.ic_audio_ring_notif_mute,
- R.drawable.ic_audio_phone,
- R.drawable.ic_audio_vol_mute,
- R.drawable.ic_audio_notification_mute,
+ // List of stream types and their order
+ private static final StreamResources[] STREAMS = {
+ StreamResources.BluetoothSCOStream,
+ StreamResources.RingerStream,
+ StreamResources.VoiceStream,
+ StreamResources.MediaStream,
+ StreamResources.NotificationStream
};
/** Object that contains data for each slider */
@@ -221,7 +238,8 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
mToneGenerators = new ToneGenerator[AudioSystem.getNumStreamTypes()];
mVibrator = new Vibrator();
- mShowCombinedVolumes = !context.getResources().getBoolean(R.bool.config_voice_capable);
+ mVoiceCapable = context.getResources().getBoolean(R.bool.config_voice_capable);
+ mShowCombinedVolumes = !mVoiceCapable;
// If we don't want to show multiple volumes, hide the settings button and divider
if (!mShowCombinedVolumes) {
mMoreButton.setVisibility(View.GONE);
@@ -260,10 +278,14 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
LayoutInflater inflater = (LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- mStreamControls = new HashMap<Integer,StreamControl>(STREAM_TYPES.length);
+ mStreamControls = new HashMap<Integer, StreamControl>(STREAMS.length);
Resources res = mContext.getResources();
- for (int i = 0; i < STREAM_TYPES.length; i++) {
- final int streamType = STREAM_TYPES[i];
+ for (int i = 0; i < STREAMS.length; i++) {
+ StreamResources streamRes = STREAMS[i];
+ int streamType = streamRes.streamType;
+ if (mVoiceCapable && streamRes == StreamResources.NotificationStream) {
+ streamRes = StreamResources.RingerStream;
+ }
StreamControl sc = new StreamControl();
sc.streamType = streamType;
sc.group = (ViewGroup) inflater.inflate(R.layout.volume_adjust_item, null);
@@ -273,9 +295,9 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
sc.icon.setOnClickListener(this);
}
sc.icon.setTag(sc);
- sc.icon.setContentDescription(res.getString(CONTENT_DESCRIPTIONS[i]));
- sc.iconRes = STREAM_ICONS_NORMAL[i];
- sc.iconMuteRes = STREAM_ICONS_MUTED[i];
+ sc.icon.setContentDescription(res.getString(streamRes.descRes));
+ sc.iconRes = streamRes.iconRes;
+ sc.iconMuteRes = streamRes.iconMuteRes;
sc.icon.setImageResource(sc.iconRes);
sc.seekbarView = (SeekBar) sc.group.findViewById(R.id.seekbar);
int plusOne = (streamType == AudioSystem.STREAM_BLUETOOTH_SCO ||
@@ -307,13 +329,10 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
private void addOtherVolumes() {
if (!mShowCombinedVolumes) return;
- for (int i = 0; i < STREAM_TYPES.length; i++) {
+ for (int i = 0; i < STREAMS.length; i++) {
// Skip the phone specific ones and the active one
- final int streamType = STREAM_TYPES[i];
- if (streamType == AudioManager.STREAM_RING
- || streamType == AudioManager.STREAM_VOICE_CALL
- || streamType == AudioManager.STREAM_BLUETOOTH_SCO
- || streamType == mActiveStreamType) {
+ final int streamType = STREAMS[i].streamType;
+ if (!STREAMS[i].show || streamType == mActiveStreamType) {
continue;
}
StreamControl sc = mStreamControls.get(streamType);
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 1c22a0b733f0..48615bdd4d3e 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -4514,7 +4514,7 @@ public class WebView extends AbsoluteLayout
boolean UIAnimationsRunning = false;
// Currently for each draw we compute the animation values;
// We may in the future decide to do that independently.
- if (mNativeClass != 0 && nativeEvaluateLayersAnimations()) {
+ if (mNativeClass != 0 && nativeEvaluateLayersAnimations(mNativeClass)) {
UIAnimationsRunning = true;
// If we have unfinished (or unstarted) animations,
// we ask for a repaint. We only need to do this in software
@@ -4530,9 +4530,9 @@ public class WebView extends AbsoluteLayout
extras = DRAW_EXTRAS_FIND;
} else if (mSelectingText && !USE_JAVA_TEXT_SELECTION) {
extras = DRAW_EXTRAS_SELECTION;
- nativeSetSelectionPointer(mDrawSelectionPointer,
- mZoomManager.getInvScale(),
- mSelectX, mSelectY - getTitleHeight());
+ nativeSetSelectionPointer(mNativeClass,
+ mDrawSelectionPointer,
+ mZoomManager.getInvScale(), mSelectX, mSelectY - getTitleHeight());
} else if (drawCursorRing) {
extras = DRAW_EXTRAS_CURSOR_RING;
}
@@ -4546,8 +4546,8 @@ public class WebView extends AbsoluteLayout
}
if (canvas.isHardwareAccelerated()) {
- int functor = nativeGetDrawGLFunction(mGLViewportEmpty ? null : mGLRectViewport,
- mGLViewportEmpty ? null : mViewRectViewport, getScale(), extras);
+ int functor = nativeGetDrawGLFunction(mNativeClass,
+ mGLViewportEmpty ? null : mGLRectViewport, mGLViewportEmpty ? null : mViewRectViewport, getScale(), extras);
((HardwareCanvas) canvas).callDrawGLFunction(functor);
if (mHardwareAccelSkia != getSettings().getHardwareAccelSkiaEnabled()) {
@@ -9416,9 +9416,9 @@ public class WebView extends AbsoluteLayout
// We never want to change button state if we are hardware accelerated,
// but we DO want to invalidate as necessary so that the GL ring
// can be drawn
- nativeRecordButtons(false, false, inval);
+ nativeRecordButtons(mNativeClass, false, false, inval);
} else {
- nativeRecordButtons(focus, pressed, inval);
+ nativeRecordButtons(mNativeClass, focus, pressed, inval);
}
}
@@ -9453,9 +9453,9 @@ public class WebView extends AbsoluteLayout
private native int nativeDraw(Canvas canvas, int color, int extra,
boolean splitIfNeeded);
private native void nativeDumpDisplayTree(String urlOrNull);
- private native boolean nativeEvaluateLayersAnimations();
- private native int nativeGetDrawGLFunction(Rect rect, Rect viewRect,
- float scale, int extras);
+ private native boolean nativeEvaluateLayersAnimations(int nativeInstance);
+ private native int nativeGetDrawGLFunction(int nativeInstance, Rect rect,
+ Rect viewRect, float scale, int extras);
private native void nativeUpdateDrawGLFunction(Rect rect, Rect viewRect);
private native void nativeExtendSelection(int x, int y);
private native int nativeFindAll(String findLower, String findUpper,
@@ -9518,8 +9518,8 @@ public class WebView extends AbsoluteLayout
private native boolean nativePointInNavCache(int x, int y, int slop);
// Like many other of our native methods, you must make sure that
// mNativeClass is not null before calling this method.
- private native void nativeRecordButtons(boolean focused,
- boolean pressed, boolean invalidate);
+ private native void nativeRecordButtons(int nativeInstance,
+ boolean focused, boolean pressed, boolean invalidate);
private native void nativeResetSelection();
private native Point nativeSelectableText();
private native void nativeSelectAll();
@@ -9540,8 +9540,8 @@ public class WebView extends AbsoluteLayout
private native void nativeReplaceBaseContent(int content);
private native void nativeCopyBaseContentToPicture(Picture pict);
private native boolean nativeHasContent();
- private native void nativeSetSelectionPointer(boolean set,
- float scale, int x, int y);
+ private native void nativeSetSelectionPointer(int nativeInstance,
+ boolean set, float scale, int x, int y);
private native boolean nativeStartSelection(int x, int y);
private native void nativeStopGL();
private native Rect nativeSubtractLayers(Rect content);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 041e8a498efb..a21a087ef672 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -7683,8 +7683,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
}
- if (what instanceof UpdateAppearance ||
- what instanceof ParagraphStyle) {
+ if (what instanceof UpdateAppearance || what instanceof ParagraphStyle
+ || (what instanceof SuggestionSpan && (((SuggestionSpan)what).getFlags()
+ & SuggestionSpan.FLAG_AUTO_CORRECTION) != 0)) {
if (ims == null || ims.mBatchEditNesting == 0) {
invalidate();
mHighlightPathBogus = true;
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java
index bb23173ae003..88d7e05dd1b3 100644
--- a/core/java/android/widget/Toast.java
+++ b/core/java/android/widget/Toast.java
@@ -48,6 +48,13 @@ import android.view.accessibility.AccessibilityManager;
* <p>
* The easiest way to use this class is to call one of the static methods that constructs
* everything you need and returns a new Toast object.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about creating Toast notifications, read the
+ * <a href="{@docRoot}guide/topics/ui/notifiers/toasts.html">Toast Notifications</a> developer
+ * guide.</p>
+ * </div>
*/
public class Toast {
static final String TAG = "Toast";
diff --git a/core/java/com/android/internal/widget/LockScreenWidgetCallback.java b/core/java/com/android/internal/widget/LockScreenWidgetCallback.java
index d6403e9fa9cb..d7ad6c096dde 100644
--- a/core/java/com/android/internal/widget/LockScreenWidgetCallback.java
+++ b/core/java/com/android/internal/widget/LockScreenWidgetCallback.java
@@ -29,6 +29,9 @@ public interface LockScreenWidgetCallback {
// Sends a message to lock screen requesting the view to be hidden.
public void requestHide(View self);
+ // Whether or not this view is currently visible on LockScreen
+ public boolean isVisible(View self);
+
// Sends a message to lock screen that user has interacted with widget. This should be used
// exclusively in response to user activity, i.e. user hits a button in the view.
public void userActivity(View self);
diff --git a/core/java/com/android/internal/widget/TransportControlView.java b/core/java/com/android/internal/widget/TransportControlView.java
index 73d9f10104f4..63a3aa5cd560 100644
--- a/core/java/com/android/internal/widget/TransportControlView.java
+++ b/core/java/com/android/internal/widget/TransportControlView.java
@@ -34,6 +34,8 @@ import android.media.IRemoteControlDisplay;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.os.Parcel;
+import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;
import android.text.Spannable;
@@ -61,7 +63,7 @@ public class TransportControlView extends FrameLayout implements OnClickListener
private static final int MSG_SET_GENERATION_ID = 104;
private static final int MAXDIM = 512;
private static final int DISPLAY_TIMEOUT_MS = 5000; // 5s
- protected static final boolean DEBUG = true;
+ protected static final boolean DEBUG = false;
protected static final String TAG = "TransportControlView";
private ImageView mAlbumArt;
@@ -74,7 +76,7 @@ public class TransportControlView extends FrameLayout implements OnClickListener
private boolean mAttached;
private PendingIntent mClientIntent;
private int mTransportControlFlags;
- private int mPlayState;
+ private int mCurrentPlayState;
private AudioManager mAudioManager;
private LockScreenWidgetCallback mWidgetCallbacks;
private IRemoteControlDisplayWeak mIRCD;
@@ -84,6 +86,11 @@ public class TransportControlView extends FrameLayout implements OnClickListener
*/
private Bundle mPopulateMetadataWhenAttached = null;
+ /**
+ * Whether to clear the interface next time it is shown (i.e. the generation id changed)
+ */
+ private boolean mClearOnNextShow;
+
// This handler is required to ensure messages from IRCD are handled in sequence and on
// the UI thread.
private Handler mHandler = new Handler() {
@@ -113,15 +120,10 @@ public class TransportControlView extends FrameLayout implements OnClickListener
break;
case MSG_SET_GENERATION_ID:
- if (mWidgetCallbacks != null) {
- boolean clearing = msg.arg2 != 0;
- if (DEBUG) Log.v(TAG, "New genId = " + msg.arg1 + ", clearing = " + clearing);
- if (!clearing) {
- mWidgetCallbacks.requestShow(TransportControlView.this);
- } else {
- mWidgetCallbacks.requestHide(TransportControlView.this);
- }
+ if (msg.arg2 != 0) {
+ mClearOnNextShow = true; // TODO: handle this
}
+ if (DEBUG) Log.v(TAG, "New genId = " + msg.arg1 + ", clearing = " + msg.arg2);
mClientGeneration = msg.arg1;
mClientIntent = (PendingIntent) msg.obj;
break;
@@ -195,6 +197,7 @@ public class TransportControlView extends FrameLayout implements OnClickListener
super(context, attrs);
Log.v(TAG, "Create TCV " + this);
mAudioManager = new AudioManager(mContext);
+ mCurrentPlayState = RemoteControlClient.PLAYSTATE_NONE; // until we get a callback
mIRCD = new IRemoteControlDisplayWeak(mHandler);
}
@@ -319,7 +322,7 @@ public class TransportControlView extends FrameLayout implements OnClickListener
| RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE
| RemoteControlClient.FLAG_KEY_MEDIA_STOP);
- updatePlayPauseState(mPlayState);
+ updatePlayPauseState(mCurrentPlayState);
}
private static void setVisibilityBasedOnFlag(View view, int flags, int flag) {
@@ -332,32 +335,99 @@ public class TransportControlView extends FrameLayout implements OnClickListener
private void updatePlayPauseState(int state) {
if (DEBUG) Log.v(TAG,
- "updatePlayPauseState(), old=" + mPlayState + ", state=" + state);
- if (state == mPlayState) {
+ "updatePlayPauseState(), old=" + mCurrentPlayState + ", state=" + state);
+ if (state == mCurrentPlayState) {
return;
}
final int imageResId;
final int imageDescId;
+ boolean showIfHidden = false;
switch (state) {
+ case RemoteControlClient.PLAYSTATE_ERROR:
+ imageResId = com.android.internal.R.drawable.stat_sys_warning;
+ // TODO use more specific image description string for warning, but here the "play"
+ // message is still valid because this button triggers a play command.
+ imageDescId = com.android.internal.R.string.lockscreen_transport_play_description;
+ break;
+
case RemoteControlClient.PLAYSTATE_PLAYING:
imageResId = com.android.internal.R.drawable.ic_media_pause;
imageDescId = com.android.internal.R.string.lockscreen_transport_pause_description;
+ showIfHidden = true;
break;
case RemoteControlClient.PLAYSTATE_BUFFERING:
imageResId = com.android.internal.R.drawable.ic_media_stop;
imageDescId = com.android.internal.R.string.lockscreen_transport_stop_description;
+ showIfHidden = true;
break;
case RemoteControlClient.PLAYSTATE_PAUSED:
default:
imageResId = com.android.internal.R.drawable.ic_media_play;
imageDescId = com.android.internal.R.string.lockscreen_transport_play_description;
+ showIfHidden = false;
break;
}
mBtnPlay.setImageResource(imageResId);
mBtnPlay.setContentDescription(getResources().getString(imageDescId));
- mPlayState = state;
+ if (showIfHidden && mWidgetCallbacks != null && !mWidgetCallbacks.isVisible(this)) {
+ mWidgetCallbacks.requestShow(this);
+ }
+ mCurrentPlayState = state;
+ }
+
+ static class SavedState extends BaseSavedState {
+ boolean wasShowing;
+
+ SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ private SavedState(Parcel in) {
+ super(in);
+ this.wasShowing = in.readInt() != 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeInt(this.wasShowing ? 1 : 0);
+ }
+
+ public static final Parcelable.Creator<SavedState> CREATOR
+ = new Parcelable.Creator<SavedState>() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ if (DEBUG) Log.v(TAG, "onSaveInstanceState()");
+ Parcelable superState = super.onSaveInstanceState();
+ SavedState ss = new SavedState(superState);
+ ss.wasShowing = mWidgetCallbacks.isVisible(this);
+ return ss;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ if (DEBUG) Log.v(TAG, "onRestoreInstanceState()");
+ if (!(state instanceof SavedState)) {
+ super.onRestoreInstanceState(state);
+ return;
+ }
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+ if (ss.wasShowing) {
+ mWidgetCallbacks.requestShow(this);
+ }
}
public void onClick(View v) {
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png
index 52a9800130a6..a7b5cd693b03 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png
index 49a2aeb42313..f96d123f6691 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png
index e6ebb43fbcec..b614b186ec21 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png
index 7069fc5b5623..e4f72f6f648d 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png
index ec2a7e30f014..7c1dd9d246d8 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png
index 486334f7c8a6..0569e087adb5 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_holo.png b/core/res/res/drawable-hdpi/btn_check_on_holo.png
index 1f11a7867580..3d9afa8e1e82 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_holo.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png
index a17100cf5007..206e43f10d8e 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_holo_light.png
index 130ab4f24596..58103c835b76 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png
index 96abcda92024..2ffe7a66b677 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png
index 0a22f02a9cd4..7a92c9a2d210 100644
--- a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
index 28b25781b7da..e77921cdf942 100644
--- a/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
+++ b/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_dark.png
index 8906c4d86c15..45a8d86157f6 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_light.png
index 2bcb98ede035..94a0c125f396 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_dark.png
index 2e36821d5300..70a6e9008b42 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_light.png
index 6a50bd82dada..4b76e289093c 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_off_focused_holo_dark.png
index 8595dd0025f5..bc2f69677aef 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_star_off_focused_holo_light.png
index 1dda090f8afd..6f83c051aa4a 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_normal_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_off_normal_holo_dark.png
index 942722e29582..86d42bb1b33f 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_normal_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_normal_holo_light.png b/core/res/res/drawable-hdpi/btn_star_off_normal_holo_light.png
index e46f035313ad..9e3b006a38f6 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_normal_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_dark.png
index 5cfe146716ae..17292282ee07 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_light.png
index 20d0eb3c0bec..ff78fc5055fe 100644
--- a/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_off_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_dark.png
index 3b478d63375d..9a136d9feff3 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_light.png
index 52a9f442ea9b..d49952b48b35 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_dark.png
index 9810029e50f1..20144225d572 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_light.png
index 445af7bd35a0..80885d1abf56 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_on_focused_holo_dark.png
index d3884f618b96..35239da70d9d 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_star_on_focused_holo_light.png
index eea174aacd86..09aecf4c10bf 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_normal_holo_light.png b/core/res/res/drawable-hdpi/btn_star_on_normal_holo_light.png
index 58b2b0989364..b667738b2ab0 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_normal_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_dark.png
index a39a6200b7ed..392f8523a85f 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_dark.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_light.png
index 1ffe7fe2c5a6..b36bc53250a9 100644
--- a/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_light.png
+++ b/core/res/res/drawable-hdpi/btn_star_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png b/core/res/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png
index 769cb125f4b1..e0f8260637d9 100644
--- a/core/res/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png b/core/res/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png
index c5372a81f280..5fb6e9627fd4 100644
--- a/core/res/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png b/core/res/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png
index 1dee51b5c385..8c80ea1796db 100644
--- a/core/res/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png b/core/res/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png
index 3c1e25adc194..80e1fba219c2 100644
--- a/core/res/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_bullet_key_permission.png b/core/res/res/drawable-hdpi/ic_bullet_key_permission.png
index a7eaec5ad1a3..4b9bf5329212 100644
--- a/core/res/res/drawable-hdpi/ic_bullet_key_permission.png
+++ b/core/res/res/drawable-hdpi/ic_bullet_key_permission.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png
index 683a57510e91..d2ced313e09c 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png
index bdece9fc942f..4ec450813884 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png
index 6a8ab241718d..7b8168c9a501 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png
index f2fceaabc6d1..22783c90d62c 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png
index e005ffc18c03..c6a2e1757f0b 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png
index f41ad95abb58..5805ce17e52c 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
index 98ab6e919c6a..6429517a44f0 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png
index 651b83709aa4..c995c8780012 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png
index babab1d22381..c75363b943e4 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png
index d000866c8502..69885eab984a 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png
index 82133d02a259..8cf2b4b4ca44 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png b/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png
index 26df6b2a87a2..60873dd77021 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png
index 9e36918974d6..374a62ae82b8 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_unlock_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_next.png b/core/res/res/drawable-hdpi/ic_media_next.png
index c74703eea93c..f5ba824c1943 100644
--- a/core/res/res/drawable-hdpi/ic_media_next.png
+++ b/core/res/res/drawable-hdpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_previous.png b/core/res/res/drawable-hdpi/ic_media_previous.png
index 15dc3903bf3f..40ecb00f469f 100644
--- a/core/res/res/drawable-hdpi/ic_media_previous.png
+++ b/core/res/res/drawable-hdpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
index 28b25781b7da..e77921cdf942 100644
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
index 545cc09c036d..b5e714aa8758 100644
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
index 9176b3372c4c..c659d943087b 100644
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png b/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png
index f8092ea3d40c..05b141940987 100644
--- a/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png
+++ b/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/presence_away.png b/core/res/res/drawable-hdpi/presence_away.png
index fe5b880f49af..455fec188618 100644
--- a/core/res/res/drawable-hdpi/presence_away.png
+++ b/core/res/res/drawable-hdpi/presence_away.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_big_half_holo_dark.png b/core/res/res/drawable-hdpi/rate_star_big_half_holo_dark.png
index e3131b115503..c6d1cd112c1c 100644
--- a/core/res/res/drawable-hdpi/rate_star_big_half_holo_dark.png
+++ b/core/res/res/drawable-hdpi/rate_star_big_half_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_big_half_holo_light.png b/core/res/res/drawable-hdpi/rate_star_big_half_holo_light.png
index cdc94a135bec..89afee8e70d0 100644
--- a/core/res/res/drawable-hdpi/rate_star_big_half_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_big_half_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_big_off_holo_dark.png b/core/res/res/drawable-hdpi/rate_star_big_off_holo_dark.png
index d83522ac67bc..58a2d40a985e 100644
--- a/core/res/res/drawable-hdpi/rate_star_big_off_holo_dark.png
+++ b/core/res/res/drawable-hdpi/rate_star_big_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_big_off_holo_light.png b/core/res/res/drawable-hdpi/rate_star_big_off_holo_light.png
index 2af7814d1aef..fdbc011caea5 100644
--- a/core/res/res/drawable-hdpi/rate_star_big_off_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_big_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_big_on_holo_dark.png b/core/res/res/drawable-hdpi/rate_star_big_on_holo_dark.png
index e4b766d72456..ec3394ea0866 100644
--- a/core/res/res/drawable-hdpi/rate_star_big_on_holo_dark.png
+++ b/core/res/res/drawable-hdpi/rate_star_big_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_big_on_holo_light.png b/core/res/res/drawable-hdpi/rate_star_big_on_holo_light.png
index edd264a37281..3e90f352b4c4 100644
--- a/core/res/res/drawable-hdpi/rate_star_big_on_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_big_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_med_half_holo_light.png b/core/res/res/drawable-hdpi/rate_star_med_half_holo_light.png
index 3ff3bbd60410..ae5e49b156c8 100644
--- a/core/res/res/drawable-hdpi/rate_star_med_half_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_med_half_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_med_off_holo_light.png b/core/res/res/drawable-hdpi/rate_star_med_off_holo_light.png
index ce9fc2502714..73183ad97042 100644
--- a/core/res/res/drawable-hdpi/rate_star_med_off_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_med_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_med_on_holo_light.png b/core/res/res/drawable-hdpi/rate_star_med_on_holo_light.png
index a6fdcff49c2f..279427bd175a 100644
--- a/core/res/res/drawable-hdpi/rate_star_med_on_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_med_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_small_half_holo_dark.png b/core/res/res/drawable-hdpi/rate_star_small_half_holo_dark.png
index 4fb14f934afd..e0edec982d29 100644
--- a/core/res/res/drawable-hdpi/rate_star_small_half_holo_dark.png
+++ b/core/res/res/drawable-hdpi/rate_star_small_half_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_small_half_holo_light.png b/core/res/res/drawable-hdpi/rate_star_small_half_holo_light.png
index 667b8e280789..d61b61329ccf 100644
--- a/core/res/res/drawable-hdpi/rate_star_small_half_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_small_half_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_small_off_holo_dark.png b/core/res/res/drawable-hdpi/rate_star_small_off_holo_dark.png
index e19cf7aa4e9c..0bba5ba886c5 100644
--- a/core/res/res/drawable-hdpi/rate_star_small_off_holo_dark.png
+++ b/core/res/res/drawable-hdpi/rate_star_small_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_small_off_holo_light.png b/core/res/res/drawable-hdpi/rate_star_small_off_holo_light.png
index 8886006d0176..f8d978a5c17d 100644
--- a/core/res/res/drawable-hdpi/rate_star_small_off_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_small_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_small_on_holo_dark.png b/core/res/res/drawable-hdpi/rate_star_small_on_holo_dark.png
index bc5d3dba0d12..b7f8e6207cd2 100644
--- a/core/res/res/drawable-hdpi/rate_star_small_on_holo_dark.png
+++ b/core/res/res/drawable-hdpi/rate_star_small_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/rate_star_small_on_holo_light.png b/core/res/res/drawable-hdpi/rate_star_small_on_holo_light.png
index 104100844c75..d8cdd19d7cd7 100644
--- a/core/res/res/drawable-hdpi/rate_star_small_on_holo_light.png
+++ b/core/res/res/drawable-hdpi/rate_star_small_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png b/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png
index 4048260c76a8..f830a03ec6f9 100644
--- a/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png
+++ b/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png b/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png
index 90e9c9c9142f..03f030b717e7 100644
--- a/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png
+++ b/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_16_inner_holo.png b/core/res/res/drawable-hdpi/spinner_16_inner_holo.png
index 01669381af25..604490dbe869 100644
--- a/core/res/res/drawable-hdpi/spinner_16_inner_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_16_inner_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_20_inner_holo.png b/core/res/res/drawable-hdpi/spinner_20_inner_holo.png
index ffad7209e470..2705a0634cef 100644
--- a/core/res/res/drawable-hdpi/spinner_20_inner_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_20_inner_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_20_outer_holo.png b/core/res/res/drawable-hdpi/spinner_20_outer_holo.png
index f2523f4b0c17..1954c8caefa0 100644
--- a/core/res/res/drawable-hdpi/spinner_20_outer_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_20_outer_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_48_inner_holo.png b/core/res/res/drawable-hdpi/spinner_48_inner_holo.png
index f8e3fef633cc..df1573b89703 100644
--- a/core/res/res/drawable-hdpi/spinner_48_inner_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_48_inner_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_48_outer_holo.png b/core/res/res/drawable-hdpi/spinner_48_outer_holo.png
index 04c5fb5a26ee..8dcdc17dfb08 100644
--- a/core/res/res/drawable-hdpi/spinner_48_outer_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_48_outer_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_76_inner_holo.png b/core/res/res/drawable-hdpi/spinner_76_inner_holo.png
index a28a6d1607c8..eff711785484 100644
--- a/core/res/res/drawable-hdpi/spinner_76_inner_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_76_inner_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_76_outer_holo.png b/core/res/res/drawable-hdpi/spinner_76_outer_holo.png
index 3d5aa46b7f58..50461b5a91bf 100644
--- a/core/res/res/drawable-hdpi/spinner_76_outer_holo.png
+++ b/core/res/res/drawable-hdpi/spinner_76_outer_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_call_mute.png b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
index 1446fa72921d..7f87ee734615 100644
--- a/core/res/res/drawable-hdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
index c63ca94db2ab..765be617efb7 100644
--- a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_left.png b/core/res/res/drawable-hdpi/text_select_handle_left.png
index 5adc2e119fd6..eead92ced16b 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_left.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_left.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_middle.png b/core/res/res/drawable-hdpi/text_select_handle_middle.png
index b7a472a76fa9..185d83932d95 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_middle.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_middle.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_right.png b/core/res/res/drawable-hdpi/text_select_handle_right.png
index cf94179ef0e3..e9fceec72121 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_right.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_right.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ab_share_pack_holo_light.9.png b/core/res/res/drawable-mdpi/ab_share_pack_holo_light.9.png
index 1983c68e9baf..8f10bd522223 100644
--- a/core/res/res/drawable-mdpi/ab_share_pack_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png
index b70db89b26a2..9835b0fbf986 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
index 98a3b6d5a928..2dfe0f68acad 100644
--- a/core/res/res/drawable-mdpi/btn_code_lock_touched.png
+++ b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
index 816e14615bde..26841bdb4f19 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
index 4f4eff2270e8..4fe7483a60a7 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
index afaa8ca8d666..ec3b84d46c92 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
index b7d90791e841..537f4f0bf8ef 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
index 994eb0c90afb..0409d4b35c20 100644
--- a/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
+++ b/core/res/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png b/core/res/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png
index 987c097065c0..cee85bbdb001 100644
--- a/core/res/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png b/core/res/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png
index 8d87032affe1..bd496f80c3c3 100644
--- a/core/res/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_bullet_key_permission.png b/core/res/res/drawable-mdpi/ic_bullet_key_permission.png
index 47913f66595a..22f25ca84904 100644
--- a/core/res/res/drawable-mdpi/ic_bullet_key_permission.png
+++ b/core/res/res/drawable-mdpi/ic_bullet_key_permission.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_next.png b/core/res/res/drawable-mdpi/ic_media_next.png
index a6feed0e9e38..acef506ba7ad 100644
--- a/core/res/res/drawable-mdpi/ic_media_next.png
+++ b/core/res/res/drawable-mdpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_previous.png b/core/res/res/drawable-mdpi/ic_media_previous.png
index 0163d094596d..940d6a46fa09 100644
--- a/core/res/res/drawable-mdpi/ic_media_previous.png
+++ b/core/res/res/drawable-mdpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
index 843474124846..989e76b70983 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png b/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png
index dbe395377615..8ad0b329bb29 100644
--- a/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png
+++ b/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png b/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png
index ba53c0b8923b..cb99fa340b45 100644
--- a/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png
+++ b/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_call_mute.png b/core/res/res/drawable-mdpi/stat_notify_call_mute.png
index 8797a09874e1..58e0cbc33e14 100644
--- a/core/res/res/drawable-mdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-mdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
index ec7ef0cf4f22..d82704ed66a3 100644
--- a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png
new file mode 100644
index 000000000000..cc46f19b19b2
--- /dev/null
+++ b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-hdpi/stat_notify_call_mute.png b/core/res/res/drawable-sw600dp-hdpi/stat_notify_call_mute.png
new file mode 100644
index 000000000000..b7537642e417
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-hdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-hdpi/stat_sys_speakerphone.png b/core/res/res/drawable-sw600dp-hdpi/stat_sys_speakerphone.png
new file mode 100644
index 000000000000..b47a9f69006e
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-hdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-mdpi/stat_notify_call_mute.png b/core/res/res/drawable-sw600dp-mdpi/stat_notify_call_mute.png
new file mode 100644
index 000000000000..951197c69aa4
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-mdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-mdpi/stat_sys_speakerphone.png b/core/res/res/drawable-sw600dp-mdpi/stat_sys_speakerphone.png
new file mode 100644
index 000000000000..5893db92b126
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-mdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png b/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png
index c9ed4c7830d2..5ad26b8a6295 100644
--- a/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png
+++ b/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-xhdpi/stat_notify_call_mute.png b/core/res/res/drawable-sw600dp-xhdpi/stat_notify_call_mute.png
new file mode 100644
index 000000000000..1d72243f1cb4
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-xhdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-xhdpi/stat_sys_speakerphone.png b/core/res/res/drawable-sw600dp-xhdpi/stat_sys_speakerphone.png
new file mode 100644
index 000000000000..76dee9e29f4f
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-xhdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png b/core/res/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png
index 6e0244f79eaa..6a82a6469d70 100644
--- a/core/res/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png b/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png
index b2db65c04df3..ccbdcc3cf532 100644
--- a/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png
+++ b/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_next.png b/core/res/res/drawable-xhdpi/ic_media_next.png
index 9835c635faa9..726fee7af47b 100644
--- a/core/res/res/drawable-xhdpi/ic_media_next.png
+++ b/core/res/res/drawable-xhdpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_previous.png b/core/res/res/drawable-xhdpi/ic_media_previous.png
index 5df5987daafa..59f994d0fe53 100644
--- a/core/res/res/drawable-xhdpi/ic_media_previous.png
+++ b/core/res/res/drawable-xhdpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png b/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png
index 980bbd73775c..f03908150cbd 100644
--- a/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png
+++ b/core/res/res/drawable-xhdpi/list_selector_background_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png b/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png
index 9afd52fae827..830aa272c922 100644
--- a/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png
+++ b/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_notify_call_mute.png b/core/res/res/drawable-xhdpi/stat_notify_call_mute.png
index 4135feaed94b..adbd7b15e206 100644
--- a/core/res/res/drawable-xhdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-xhdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png b/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png
index 6938ab4de18a..51e648cc1865 100644
--- a/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-xhdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/layout/keyguard_transport_control.xml b/core/res/res/layout/keyguard_transport_control.xml
index 6e24ce249f5b..c951c45a0fc2 100644
--- a/core/res/res/layout/keyguard_transport_control.xml
+++ b/core/res/res/layout/keyguard_transport_control.xml
@@ -63,7 +63,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:src="@drawable/ic_media_rew"
+ android:src="@drawable/ic_media_previous"
android:clickable="true"
android:background="?android:attr/selectableItemBackground"
android:padding="10dip"
@@ -94,7 +94,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="true"
- android:src="@drawable/ic_media_ff"
+ android:src="@drawable/ic_media_next"
android:background="?android:attr/selectableItemBackground"
android:padding="10dip"
android:contentDescription="@string/lockscreen_transport_next_description"/>
diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js
index b15e8474a353..310310e062a8 100644
--- a/docs/html/resources/resources-data.js
+++ b/docs/html/resources/resources-data.js
@@ -419,16 +419,16 @@ var ANDROID_RESOURCES = [
},
{
tags: ['sample', 'new'],
- path: 'samples/AndroidBeam/index.html',
+ path: 'samples/AndroidBeamDemo/index.html',
title: {
- en: 'Android Beam'
+ en: 'Android Beam Demo'
},
description: {
en: 'An example of how to use the Android Beam feature to send messages between two Android-powered devices (API level 14 or later) that support NFC.'
}
},
{
- tags: ['sample', 'layout', 'ui'],
+ tags: ['sample', 'layout', 'ui', 'updated'],
path: 'samples/ApiDemos/index.html',
title: {
en: 'API Demos'
diff --git a/docs/html/sdk/android-4.0.jd b/docs/html/sdk/android-4.0.jd
index b4fbe724979b..b8cd947755f4 100644
--- a/docs/html/sdk/android-4.0.jd
+++ b/docs/html/sdk/android-4.0.jd
@@ -100,8 +100,8 @@ class="toggle-content-img" alt="" />
<li><a href="#Multimedia">Multimedia</a></li>
<li><a href="#Bluetooth">Bluetooth</a></li>
<li><a href="#AndroidBeam">Android Beam (NDEF Push with NFC)</a></li>
- <li><a href="#P2pWiFi">Peer-to-peer Wi-Fi</a></li>
- <li><a href="#NetworkData">Network Data</a></li>
+ <li><a href="#WiFiDirect">Wi-Fi Direct</a></li>
+ <li><a href="#NetworkUsage">Network Usage</a></li>
<li><a href="#RenderScript">RenderScript</a></li>
<li><a href="#A11y">Accessibility</a></li>
<li><a href="#Enterprise">Enterprise</a></li>
@@ -653,7 +653,7 @@ Beam Demo</a> sample app.</p>
-<h3 id="P2pWiFi">Peer-to-peer Wi-Fi</h3>
+<h3 id="WiFiDirect">Wi-Fi Direct</h3>
<p>Android now supports Wi-Fi Direct for peer-to-peer (P2P) connections between Android-powered
devices and other device types without a hotspot or Internet connection. The Android framework
@@ -739,7 +739,7 @@ sample application.</p>
-<h3 id="NetworkData">Network Data</h3>
+<h3 id="NetworkUsage">Network Usage</h3>
<p>Android 4.0 gives users precise visibility of how much network data their applications are using.
The Settings app provides controls that allow users to manage set limits for network data usage and
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index dab5b29feac5..0d14f792cf7d 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -66,6 +66,9 @@ document.</p>
<p>The sections below provide notes about successive releases of
the ADT Plugin, as denoted by revision number. </p>
+<p>For a summary of all known issues in ADT, see <a
+href="http://tools.android.com/release/knownissues">http://tools.android.com/release/knownissues</a>.</p>
+
<script type="text/javascript">
function toggleDiv(link) {
var toggleable = $(link).parent();
diff --git a/docs/html/sdk/tools-notes.jd b/docs/html/sdk/tools-notes.jd
index 6cb246cbf407..f5b61ee13bdf 100644
--- a/docs/html/sdk/tools-notes.jd
+++ b/docs/html/sdk/tools-notes.jd
@@ -23,6 +23,9 @@ the SDK Tools, as denoted by revision number. To determine what revision of the
Tools you are using, refer to the "Installed Packages" listing in the Android SDK
and AVD Manager. </p>
+<p>For a summary of all known issues in SDK Tools, see <a
+href="http://tools.android.com/release/knownissues">http://tools.android.com/release/knownissues</a>.</p>
+
<script type="text/javascript">
function toggleDiv(link) {
var toggleable = $(link).parent();
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index ce587b3ccdd8..693b7b82480d 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -75,7 +75,7 @@ TEST_F(SurfaceTest, QueuesToWindowComposerIsTrueWhenPurgatorized) {
}
// This test probably doesn't belong here.
-TEST_F(SurfaceTest, ScreenshotsOfProtectedBuffersFail) {
+TEST_F(SurfaceTest, ScreenshotsOfProtectedBuffersSucceed) {
sp<ANativeWindow> anw(mSurface);
// Verify the screenshot works with no protected buffers.
@@ -114,31 +114,8 @@ TEST_F(SurfaceTest, ScreenshotsOfProtectedBuffersFail) {
}
heap = 0;
w = h = fmt = 0;
- ASSERT_EQ(INVALID_OPERATION, sf->captureScreen(0, &heap, &w, &h, &fmt,
+ ASSERT_EQ(NO_ERROR, sf->captureScreen(0, &heap, &w, &h, &fmt,
64, 64, 0, 0x7fffffff));
- ASSERT_TRUE(heap == NULL);
-
- // XXX: This should not be needed, but it seems that the new buffers don't
- // correctly show up after the upcoming dequeue/lock/queue loop without it.
- // We should look into this at some point.
- ASSERT_EQ(NO_ERROR, native_window_set_buffer_count(anw.get(), 3));
-
- // Un-set the PROTECTED usage bit and verify that the screenshot works
- // again. Note that we have to change the buffers geometry to ensure that
- // the buffers get reallocated, as the new usage bits are a subset of the
- // old.
- ASSERT_EQ(NO_ERROR, native_window_set_usage(anw.get(), 0));
- ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(anw.get(), 32, 32, 0));
- for (int i = 0; i < 4; i++) {
- // Loop to make sure SurfaceFlinger has retired a protected buffer.
- ASSERT_EQ(NO_ERROR, anw->dequeueBuffer(anw.get(), &buf));
- ASSERT_EQ(NO_ERROR, anw->lockBuffer(anw.get(), buf));
- ASSERT_EQ(NO_ERROR, anw->queueBuffer(anw.get(), buf));
- }
- heap = 0;
- w = h = fmt = 0;
- ASSERT_EQ(NO_ERROR, sf->captureScreen(0, &heap, &w, &h, &fmt, 64, 64, 0,
- 0x7fffffff));
ASSERT_TRUE(heap != NULL);
}
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 4f4f9297e614..e0c2b3b9d7bb 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -85,8 +85,7 @@ public class AudioService extends IAudioService.Stub {
private static final String TAG = "AudioService";
/** Debug remote control client/display feature */
- // TODO set to false before release
- protected static final boolean DEBUG_RC = true;
+ protected static final boolean DEBUG_RC = false;
/** How long to delay before persisting a change in volume/ringer mode. */
private static final int PERSIST_DELAY = 3000;
@@ -369,6 +368,8 @@ public class AudioService extends IAudioService.Stub {
intentFilter.addAction(Intent.ACTION_USB_DGTL_HEADSET_PLUG);
intentFilter.addAction(Intent.ACTION_HDMI_AUDIO_PLUG);
intentFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
+ intentFilter.addAction(Intent.ACTION_SCREEN_ON);
+ intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
context.registerReceiver(mReceiver, intentFilter);
// Register for package removal intent broadcasts for media button receiver persistence
@@ -2566,6 +2567,10 @@ public class AudioService extends IAudioService.Stub {
removeMediaButtonReceiverForPackage(packageName);
}
}
+ } else if (action.equals(Intent.ACTION_SCREEN_ON)) {
+ AudioSystem.setParameters("screen_state=on");
+ } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
+ AudioSystem.setParameters("screen_state=off");
}
}
}
diff --git a/packages/BackupRestoreConfirmation/res/values/strings.xml b/packages/BackupRestoreConfirmation/res/values/strings.xml
index e91c6e224434..5c90fd019cd8 100644
--- a/packages/BackupRestoreConfirmation/res/values/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values/strings.xml
@@ -35,8 +35,12 @@
<!-- Text for message to user that they must enter their predefined backup password in order to perform this operation. -->
<string name="current_password_text">Please enter your current backup password below:</string>
+ <!-- Text for message to user that they must enter their device encryption password in order to perform this restore operation. -->
+ <string name="device_encryption_restore_text">Please enter your device encryption password below.</string>
+ <!-- Text for message to user that they must enter their device encryption password in order to perform this backup operation. -->
+ <string name="device_encryption_backup_text">Please enter your device encryption password below. This will also be used to encrypt the backup archive.</string>
- <!-- Text for message to user that they can must enter an encryption password to use for the full backup operation. -->
+ <!-- Text for message to user that they must enter an encryption password to use for the full backup operation. -->
<string name="backup_enc_password_text">Please enter a password to use for encrypting the full backup data. If this is left blank, your current backup password will be used:</string>
<!-- Text for message to user that they may optionally supply an encryption password to use for a full backup operation. -->
<string name="backup_enc_password_optional">If you wish to encrypt the full backup data, enter a password below:</string>
diff --git a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java
index fbdf3ccfffd4..7f1d05951e95 100644
--- a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java
+++ b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java
@@ -27,6 +27,8 @@ import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.storage.IMountService;
+import android.util.Log;
import android.util.Slog;
import android.view.View;
import android.widget.Button;
@@ -60,8 +62,10 @@ public class BackupRestoreConfirmation extends Activity {
Handler mHandler;
IBackupManager mBackupManager;
+ IMountService mMountService;
FullObserver mObserver;
int mToken;
+ boolean mIsEncrypted;
boolean mDidAcknowledge;
TextView mStatusView;
@@ -152,6 +156,7 @@ public class BackupRestoreConfirmation extends Activity {
}
mBackupManager = IBackupManager.Stub.asInterface(ServiceManager.getService(Context.BACKUP_SERVICE));
+ mMountService = IMountService.Stub.asInterface(ServiceManager.getService("mount"));
mHandler = new ObserverHandler(getApplicationContext());
final Object oldObserver = getLastNonConfigurationInstance();
@@ -174,8 +179,23 @@ public class BackupRestoreConfirmation extends Activity {
mEncPassword = (TextView) findViewById(R.id.enc_password);
TextView curPwDesc = (TextView) findViewById(R.id.password_desc);
- // We vary the password prompt depending on whether one is predefined
- if (!haveBackupPassword()) {
+ // We vary the password prompt depending on whether one is predefined, and whether
+ // the device is encrypted.
+ mIsEncrypted = deviceIsEncrypted();
+ if (mIsEncrypted) {
+ Log.d(TAG, "Device is encrypted: requiring encryption pw");
+ TextView pwPrompt = (TextView) findViewById(R.id.password_desc);
+ // this password is mandatory; we hide the other options during backup
+ if (layoutId == R.layout.confirm_backup) {
+ pwPrompt.setText(R.string.device_encryption_backup_text);
+ TextView tv = (TextView) findViewById(R.id.enc_password);
+ tv.setVisibility(View.GONE);
+ tv = (TextView) findViewById(R.id.enc_password_desc);
+ tv.setVisibility(View.GONE);
+ } else {
+ pwPrompt.setText(R.string.device_encryption_restore_text);
+ }
+ } else if (!haveBackupPassword()) {
curPwDesc.setVisibility(View.GONE);
mCurPassword.setVisibility(View.GONE);
if (layoutId == R.layout.confirm_backup) {
@@ -226,10 +246,12 @@ public class BackupRestoreConfirmation extends Activity {
mDidAcknowledge = true;
try {
+ CharSequence encPassword = (mIsEncrypted)
+ ? mCurPassword.getText() : mEncPassword.getText();
mBackupManager.acknowledgeFullBackupOrRestore(mToken,
allow,
String.valueOf(mCurPassword.getText()),
- String.valueOf(mEncPassword.getText()),
+ String.valueOf(encPassword),
mObserver);
} catch (RemoteException e) {
// TODO: bail gracefully if we can't contact the backup manager
@@ -237,6 +259,16 @@ public class BackupRestoreConfirmation extends Activity {
}
}
+ boolean deviceIsEncrypted() {
+ try {
+ return (mMountService.getEncryptionState() != IMountService.ENCRYPTION_STATE_NONE);
+ } catch (Exception e) {
+ // If we can't talk to the mount service we have a serious problem; fail
+ // "secure" i.e. assuming that the device is encrypted.
+ return true;
+ }
+ }
+
boolean haveBackupPassword() {
try {
return mBackupManager.hasBackupPassword();
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index a63893e636e9..af2c93c19f5a 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -77,7 +77,6 @@
android:layout_height="match_parent"
android:singleLine="true"
android:paddingRight="6dip"
- android:textSize="16sp"
android:gravity="center_vertical|left"
/>
</LinearLayout>
@@ -89,17 +88,19 @@
android:animationCache="false"
android:orientation="horizontal" >
<ImageSwitcher android:id="@+id/tickerIcon"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginRight="8dip"
+ android:layout_width="@dimen/status_bar_icon_size"
+ android:layout_height="@dimen/status_bar_icon_size"
+ android:layout_marginRight="4dip"
>
<com.android.systemui.statusbar.AnimatedImageView
- android:layout_width="25dip"
- android:layout_height="25dip"
+ android:layout_width="@dimen/status_bar_icon_size"
+ android:layout_height="@dimen/status_bar_icon_size"
+ android:scaleType="center"
/>
<com.android.systemui.statusbar.AnimatedImageView
- android:layout_width="25dip"
- android:layout_height="25dip"
+ android:layout_width="@dimen/status_bar_icon_size"
+ android:layout_height="@dimen/status_bar_icon_size"
+ android:scaleType="center"
/>
</ImageSwitcher>
<com.android.systemui.statusbar.phone.TickerView android:id="@+id/tickerText"
@@ -109,13 +110,13 @@
android:paddingTop="2dip"
android:paddingRight="10dip">
<TextView
- android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker"
+ android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
/>
<TextView
- android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker"
+ android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 3e2def53d6df..cd4e37c28583 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -35,7 +35,7 @@
android:background="@drawable/notification_header_bg"
>
<com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
+ android:textAppearance="@style/TextAppearance.StatusBar.Date"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 3d49cd15e224..dc5c540afbd2 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -41,6 +41,13 @@
</style>
<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
+ <!-- Note: must be dp to fit in status bar -->
+ <item name="android:textSize">16dp</item>
+ <item name="android:textStyle">normal</item>
+ <item name="android:textColor">@android:color/holo_blue_light</item>
+ </style>
+
+ <style name="TextAppearance.StatusBar.Date" parent="@*android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@android:color/holo_blue_light</item>
@@ -69,4 +76,10 @@
<item name="android:windowExitAnimation">@anim/priority_alert_exit</item>
</style>
+ <style name="TextAppearance.StatusBar.PhoneTicker"
+ parent="@*android:style/TextAppearance.StatusBar.Ticker">
+ <!-- Note: must be dp to fit in status bar -->
+ <item name="android:textSize">14dp</item>
+ </style>
+
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
index e76fe517e0e2..f5ceed0369b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.text.StaticLayout;
@@ -50,6 +51,7 @@ public abstract class Ticker {
private View mTickerView;
private ImageSwitcher mIconSwitcher;
private TextSwitcher mTextSwitcher;
+ private float mIconScale;
private final class Segment {
StatusBarNotification notification;
@@ -145,6 +147,11 @@ public abstract class Ticker {
public Ticker(Context context, View sb) {
mContext = context;
+ final Resources res = context.getResources();
+ final int outerBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_size);
+ final int imageBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_drawing_size);
+ mIconScale = (float)imageBounds / (float)outerBounds;
+
mTickerView = sb.findViewById(R.id.ticker);
mIconSwitcher = (ImageSwitcher)sb.findViewById(R.id.tickerIcon);
@@ -152,6 +159,8 @@ public abstract class Ticker {
AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_in));
mIconSwitcher.setOutAnimation(
AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_out));
+ mIconSwitcher.setScaleX(mIconScale);
+ mIconSwitcher.setScaleY(mIconScale);
mTextSwitcher = (TextSwitcher)sb.findViewById(R.id.tickerText);
mTextSwitcher.setInAnimation(
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
index 80275b127c18..155f6fdbbeb4 100644
--- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -49,6 +49,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.IBinder;
+import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
@@ -221,6 +222,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
private Runnable mRecreateRunnable = new Runnable() {
public void run() {
updateScreen(mMode, true);
+ restoreWidgetState();
}
};
@@ -244,8 +246,20 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
// TODO: examine all widgets to derive clock status
mUpdateMonitor.reportClockVisible(true);
}
+
+ public boolean isVisible(View self) {
+ // TODO: this should be up to the lockscreen to determine if the view
+ // is currently showing. The idea is it can be used for the widget to
+ // avoid doing work if it's not visible. For now just returns the view's
+ // actual visibility.
+ return self.getVisibility() == View.VISIBLE;
+ }
};
+ private TransportControlView mTransportControlView;
+
+ private Parcelable mSavedState;
+
/**
* @return Whether we are stuck on the lock screen because the sim is
* missing.
@@ -365,6 +379,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
public void keyguardDone(boolean authenticated) {
getCallback().keyguardDone(authenticated);
+ mSavedState = null; // clear state so we re-establish when locked again
}
public void keyguardDoneDrawing() {
@@ -528,6 +543,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
((KeyguardScreen) mUnlockScreen).onPause();
}
+ saveWidgetState();
+
// When screen is turned off, need to unbind from FaceLock service if using FaceLock
stopAndUnbindFromFaceLock();
}
@@ -558,8 +575,28 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
mScreenOn = true;
runFaceLock = mWindowFocused;
}
+
show();
- if(runFaceLock) activateFaceLockIfAble();
+
+ restoreWidgetState();
+
+ if (runFaceLock) activateFaceLockIfAble();
+ }
+
+ private void saveWidgetState() {
+ if (mTransportControlView != null) {
+ if (DEBUG) Log.v(TAG, "Saving widget state");
+ mSavedState = mTransportControlView.onSaveInstanceState();
+ }
+ }
+
+ private void restoreWidgetState() {
+ if (mTransportControlView != null) {
+ if (DEBUG) Log.v(TAG, "Restoring widget state");
+ if (mSavedState != null) {
+ mTransportControlView.onRestoreInstanceState(mSavedState);
+ }
+ }
}
/** Unbind from facelock if something covers this window (such as an alarm)
@@ -643,6 +680,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
mShowLockBeforeUnlock = resources.getBoolean(R.bool.config_enableLockBeforeUnlockScreen);
mConfiguration = newConfig;
if (DEBUG_CONFIGURATION) Log.v(TAG, "**** re-creating lock screen since config changed");
+ saveWidgetState();
removeCallbacks(mRecreateRunnable);
post(mRecreateRunnable);
}
@@ -895,13 +933,13 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
}
private void initializeTransportControlView(View view) {
- TransportControlView tcv = (TransportControlView) view.findViewById(R.id.transport);
- if (tcv == null) {
+ mTransportControlView = (TransportControlView) view.findViewById(R.id.transport);
+ if (mTransportControlView == null) {
if (DEBUG) Log.w(TAG, "Couldn't find transport control widget");
} else {
mUpdateMonitor.reportClockVisible(true);
- tcv.setVisibility(View.GONE); // hide until it requests being shown.
- tcv.setCallback(mWidgetCallback);
+ mTransportControlView.setVisibility(View.GONE); // hide until it requests being shown.
+ mTransportControlView.setCallback(mWidgetCallback);
}
}
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index f9f5458122ff..4ef883747b0c 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -62,14 +62,15 @@ import android.os.ParcelFileDescriptor;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.WorkSource;
+import android.os.storage.IMountService;
import android.provider.Settings;
import android.util.EventLog;
import android.util.Log;
import android.util.Slog;
import android.util.SparseArray;
-import android.util.SparseIntArray;
import android.util.StringBuilderPrinter;
import com.android.internal.backup.BackupConstants;
@@ -187,6 +188,7 @@ class BackupManagerService extends IBackupManager.Stub {
private IActivityManager mActivityManager;
private PowerManager mPowerManager;
private AlarmManager mAlarmManager;
+ private IMountService mMountService;
IBackupManager mBackupManagerBinder;
boolean mEnabled; // access to this is synchronized on 'this'
@@ -660,6 +662,7 @@ class BackupManagerService extends IBackupManager.Stub {
mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
+ mMountService = IMountService.Stub.asInterface(ServiceManager.getService("mount"));
mBackupManagerBinder = asInterface(asBinder());
@@ -1037,6 +1040,40 @@ class BackupManagerService extends IBackupManager.Stub {
// Backup password management
boolean passwordMatchesSaved(String candidatePw, int rounds) {
+ // First, on an encrypted device we require matching the device pw
+ final boolean isEncrypted;
+ try {
+ isEncrypted = (mMountService.getEncryptionState() != MountService.ENCRYPTION_STATE_NONE);
+ if (isEncrypted) {
+ if (DEBUG) {
+ Slog.i(TAG, "Device encrypted; verifying against device data pw");
+ }
+ // 0 means the password validated
+ // -2 means device not encrypted
+ // Any other result is either password failure or an error condition,
+ // so we refuse the match
+ final int result = mMountService.verifyEncryptionPassword(candidatePw);
+ if (result == 0) {
+ if (MORE_DEBUG) Slog.d(TAG, "Pw verifies");
+ return true;
+ } else if (result != -2) {
+ if (MORE_DEBUG) Slog.d(TAG, "Pw mismatch");
+ return false;
+ } else {
+ // ...else the device is supposedly not encrypted. HOWEVER, the
+ // query about the encryption state said that the device *is*
+ // encrypted, so ... we may have a problem. Log it and refuse
+ // the backup.
+ Slog.e(TAG, "verified encryption state mismatch against query; no match allowed");
+ return false;
+ }
+ }
+ } catch (Exception e) {
+ // Something went wrong talking to the mount service. This is very bad;
+ // assume that we fail password validation.
+ return false;
+ }
+
if (mPasswordHash == null) {
// no current password case -- require that 'currentPw' be null or empty
if (candidatePw == null || "".equals(candidatePw)) {
@@ -1114,7 +1151,15 @@ class BackupManagerService extends IBackupManager.Stub {
public boolean hasBackupPassword() {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"hasBackupPassword");
- return (mPasswordHash != null && mPasswordHash.length() > 0);
+
+ try {
+ return (mMountService.getEncryptionState() != IMountService.ENCRYPTION_STATE_NONE)
+ || (mPasswordHash != null && mPasswordHash.length() > 0);
+ } catch (Exception e) {
+ // If we can't talk to the mount service we have a serious problem; fail
+ // "secure" i.e. assuming that we require a password
+ return true;
+ }
}
// Maintain persistent state around whether need to do an initialize operation.
@@ -5007,7 +5052,17 @@ class BackupManagerService extends IBackupManager.Stub {
params.observer = observer;
params.curPassword = curPassword;
- params.encryptPassword = encPpassword;
+
+ boolean isEncrypted;
+ try {
+ isEncrypted = (mMountService.getEncryptionState() != MountService.ENCRYPTION_STATE_NONE);
+ if (isEncrypted) Slog.w(TAG, "Device is encrypted; forcing enc password");
+ } catch (RemoteException e) {
+ // couldn't contact the mount service; fail "safe" and assume encryption
+ Slog.e(TAG, "Unable to contact mount service!");
+ isEncrypted = true;
+ }
+ params.encryptPassword = (isEncrypted) ? curPassword : encPpassword;
if (DEBUG) Slog.d(TAG, "Sending conf message with verb " + verb);
mWakelock.acquire();
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 582f0ede6c63..5425813dedf2 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -1897,6 +1897,53 @@ class MountService extends IMountService.Stub
}
}
+ /**
+ * Validate a user-supplied password string with cryptfs
+ */
+ @Override
+ public int verifyEncryptionPassword(String password) throws RemoteException {
+ // Only the system process is permitted to validate passwords
+ if (Binder.getCallingUid() != android.os.Process.SYSTEM_UID) {
+ throw new SecurityException("no permission to access the crypt keeper");
+ }
+
+ mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
+ "no permission to access the crypt keeper");
+
+ if (TextUtils.isEmpty(password)) {
+ throw new IllegalArgumentException("password cannot be empty");
+ }
+
+ waitForReady();
+
+ if (DEBUG_EVENTS) {
+ Slog.i(TAG, "validating encryption password...");
+ }
+
+ try {
+ ArrayList<String> response = mConnector.doCommand("cryptfs verifypw " + password);
+ String[] tokens = response.get(0).split(" ");
+
+ if (tokens == null || tokens.length != 2) {
+ String msg = "Unexpected result from cryptfs verifypw: {";
+ if (tokens == null) msg += "null";
+ else for (int i = 0; i < tokens.length; i++) {
+ if (i != 0) msg += ',';
+ msg += tokens[i];
+ }
+ msg += '}';
+ Slog.e(TAG, msg);
+ return -1;
+ }
+
+ Slog.i(TAG, "cryptfs verifypw => " + tokens[1]);
+ return Integer.parseInt(tokens[1]);
+ } catch (NativeDaemonConnectorException e) {
+ // Encryption failed
+ return e.getCode();
+ }
+ }
+
public Parcelable[] getVolumeList() {
synchronized(mVolumes) {
int size = mVolumes.size();