Merge "Remove "excessive sync" icon." into ics-factoryrom
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 7bab945..6ae887b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -112,6 +112,7 @@
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/wifi/java)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/fonts/Lohit_Hindi.ttf)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d680f36..e1f94ac 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -9879,6 +9879,8 @@
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ hide();
+
if (view instanceof TextView) {
TextView textView = (TextView) view;
Editable editable = (Editable) mText;
@@ -9886,6 +9888,7 @@
SuggestionInfo suggestionInfo = mSuggestionInfos[position];
final int spanStart = editable.getSpanStart(suggestionInfo.suggestionSpan);
final int spanEnd = editable.getSpanEnd(suggestionInfo.suggestionSpan);
+ if (spanStart < 0 || spanEnd < 0) return; // Span has been removed
final String originalText = mText.subSequence(spanStart, spanEnd).toString();
if (suggestionInfo.suggestionIndex < 0) {
@@ -9947,7 +9950,6 @@
Selection.setSelection(editable, spanEnd + lengthDifference);
}
}
- hide();
}
}
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index e3a4df9..c6b2cc7 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -936,10 +936,15 @@
*
* If there's currently a call in progress, the button will take them to the call
* @param button the button to update
+ * @param the phone state:
+ * {@link TelephonyManager#CALL_STATE_IDLE}
+ * {@link TelephonyManager#CALL_STATE_RINGING}
+ * {@link TelephonyManager#CALL_STATE_OFFHOOK}
* @param showIfCapable indicates whether the button should be shown if emergency calls are
* possible on the device
*/
- public void updateEmergencyCallButtonState(Button button, boolean showIfCapable) {
+ public void updateEmergencyCallButtonState(Button button, int phoneState,
+ boolean showIfCapable) {
if (isEmergencyCallCapable() && showIfCapable) {
button.setVisibility(View.VISIBLE);
} else {
@@ -947,9 +952,8 @@
return;
}
- int newState = TelephonyManager.getDefault().getCallState();
int textId;
- if (newState == TelephonyManager.CALL_STATE_OFFHOOK) {
+ if (phoneState == TelephonyManager.CALL_STATE_OFFHOOK) {
// show "return to call" text and show phone icon
textId = R.string.lockscreen_return_to_call;
int phoneCallIcon = R.drawable.stat_sys_phone_call;
@@ -979,22 +983,4 @@
}
return false;
}
-
- /**
- * Performs concentenation of PLMN/SPN
- * @param plmn
- * @param spn
- * @return
- */
- public static CharSequence getCarrierString(CharSequence plmn, CharSequence spn) {
- if (plmn != null && spn == null) {
- return plmn;
- } else if (plmn != null && spn != null) {
- return plmn + "|" + spn;
- } else if (plmn == null && spn != null) {
- return spn;
- } else {
- return "";
- }
- }
}
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 4470d47..b1a6aa4 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1109,12 +1109,9 @@
<string name="sync_undo_deletes" msgid="8610996708225006328">"Отмяна на изтриванията."</string>
<string name="sync_do_nothing" msgid="8717589462945226869">"Да не се прави нищо засега."</string>
<string name="choose_account_label" msgid="4191313562041125787">"Избор на профил"</string>
- <!-- no translation found for add_account_label (2935267344849993553) -->
- <skip />
- <!-- no translation found for choose_account_text (6891230675141555481) -->
- <skip />
- <!-- no translation found for add_account_button_label (3611982894853435874) -->
- <skip />
+ <string name="add_account_label" msgid="2935267344849993553">"Добавяне на профил"</string>
+ <string name="choose_account_text" msgid="6891230675141555481">"Кой профил искате да използвате?"</string>
+ <string name="add_account_button_label" msgid="3611982894853435874">"Добавяне на профил"</string>
<string name="number_picker_increment_button" msgid="4830170763103463443">"Увеличаване"</string>
<string name="number_picker_decrement_button" msgid="2576606679160067262">"Намаляване"</string>
<string name="number_picker_increment_scroll_mode" msgid="1343063395404990189">"Докоснете <xliff:g id="VALUE">%s</xliff:g> път/и и задръжте."</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 181910c..02ad8fd 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1109,12 +1109,9 @@
<string name="sync_undo_deletes" msgid="8610996708225006328">"בטל את המחיקות."</string>
<string name="sync_do_nothing" msgid="8717589462945226869">"אל תעשה דבר בינתיים."</string>
<string name="choose_account_label" msgid="4191313562041125787">"בחר חשבון"</string>
- <!-- no translation found for add_account_label (2935267344849993553) -->
- <skip />
- <!-- no translation found for choose_account_text (6891230675141555481) -->
- <skip />
- <!-- no translation found for add_account_button_label (3611982894853435874) -->
- <skip />
+ <string name="add_account_label" msgid="2935267344849993553">"הוסף חשבון"</string>
+ <string name="choose_account_text" msgid="6891230675141555481">"באיזה חשבון ברצונך להשתמש?"</string>
+ <string name="add_account_button_label" msgid="3611982894853435874">"הוסף חשבון"</string>
<string name="number_picker_increment_button" msgid="4830170763103463443">"הגדל"</string>
<string name="number_picker_decrement_button" msgid="2576606679160067262">"הפחת"</string>
<string name="number_picker_increment_scroll_mode" msgid="1343063395404990189">"<xliff:g id="VALUE">%s</xliff:g> הקש והחזק."</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index c4adc10..53c361f 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1109,12 +1109,9 @@
<string name="sync_undo_deletes" msgid="8610996708225006328">"削除を元に戻す"</string>
<string name="sync_do_nothing" msgid="8717589462945226869">"今は何もしない"</string>
<string name="choose_account_label" msgid="4191313562041125787">"アカウントを選択"</string>
- <!-- no translation found for add_account_label (2935267344849993553) -->
- <skip />
- <!-- no translation found for choose_account_text (6891230675141555481) -->
- <skip />
- <!-- no translation found for add_account_button_label (3611982894853435874) -->
- <skip />
+ <string name="add_account_label" msgid="2935267344849993553">"アカウントを追加"</string>
+ <string name="choose_account_text" msgid="6891230675141555481">"どのアカウントを使用しますか?"</string>
+ <string name="add_account_button_label" msgid="3611982894853435874">"アカウントを追加"</string>
<string name="number_picker_increment_button" msgid="4830170763103463443">"増やす"</string>
<string name="number_picker_decrement_button" msgid="2576606679160067262">"減らす"</string>
<string name="number_picker_increment_scroll_mode" msgid="1343063395404990189">"<xliff:g id="VALUE">%s</xliff:g>回タップして押し続けます。"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 16bccb2..ec49be7 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -859,10 +859,7 @@
<string name="copyUrl" msgid="2538211579596067402">"Salin URL"</string>
<string name="selectTextMode" msgid="6738556348861347240">"Pilih teks..."</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Pemilihan teks"</string>
- <!-- unknown placeholder WORD in addToDictionary -->
- <skip />
- <!-- no translation found for addToDictionary (9090375111134433012) -->
- <skip />
+ <!-- outdated translation 2839899368418071843 --> <string name="addToDictionary" msgid="9090375111134433012">"+ tambah ke kamus"</string>
<!-- no translation found for deleteText (7070985395199629156) -->
<skip />
<string name="inputMethod" msgid="1653630062304567879">"Kaedah input"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index ff0f310..47acf80 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1109,12 +1109,9 @@
<string name="sync_undo_deletes" msgid="8610996708225006328">"Anulaţi aceste ştergeri."</string>
<string name="sync_do_nothing" msgid="8717589462945226869">"Pentru moment, nu efectuaţi nicio acţiune."</string>
<string name="choose_account_label" msgid="4191313562041125787">"Selectaţi un cont"</string>
- <!-- no translation found for add_account_label (2935267344849993553) -->
- <skip />
- <!-- no translation found for choose_account_text (6891230675141555481) -->
- <skip />
- <!-- no translation found for add_account_button_label (3611982894853435874) -->
- <skip />
+ <string name="add_account_label" msgid="2935267344849993553">"Adăugaţi un cont"</string>
+ <string name="choose_account_text" msgid="6891230675141555481">"Ce cont doriţi să utilizaţi?"</string>
+ <string name="add_account_button_label" msgid="3611982894853435874">"Adăugaţi un cont"</string>
<string name="number_picker_increment_button" msgid="4830170763103463443">"Incrementaţi"</string>
<string name="number_picker_decrement_button" msgid="2576606679160067262">"Decrementaţi"</string>
<string name="number_picker_increment_scroll_mode" msgid="1343063395404990189">"Apăsaţi şi ţineţi apăsat <xliff:g id="VALUE">%s</xliff:g>."</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 66cd839..46eb1ed 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1109,12 +1109,9 @@
<string name="sync_undo_deletes" msgid="8610996708225006328">"Silme işlemlerini geri alın."</string>
<string name="sync_do_nothing" msgid="8717589462945226869">"Şimdilik bir şey yapma."</string>
<string name="choose_account_label" msgid="4191313562041125787">"Bir hesap seçin"</string>
- <!-- no translation found for add_account_label (2935267344849993553) -->
- <skip />
- <!-- no translation found for choose_account_text (6891230675141555481) -->
- <skip />
- <!-- no translation found for add_account_button_label (3611982894853435874) -->
- <skip />
+ <string name="add_account_label" msgid="2935267344849993553">"Hesap ekleyin"</string>
+ <string name="choose_account_text" msgid="6891230675141555481">"Hangi hesabı kullanmak istersiniz?"</string>
+ <string name="add_account_button_label" msgid="3611982894853435874">"Hesap ekle"</string>
<string name="number_picker_increment_button" msgid="4830170763103463443">"Artır"</string>
<string name="number_picker_decrement_button" msgid="2576606679160067262">"Azalt"</string>
<string name="number_picker_increment_scroll_mode" msgid="1343063395404990189">"<xliff:g id="VALUE">%s</xliff:g> hafifçe vurun ve basılı tutun."</string>
diff --git a/data/sounds/effects/ogg/Effect_Tick.ogg b/data/sounds/effects/ogg/Effect_Tick.ogg
index b379019..c8a5c36 100644
--- a/data/sounds/effects/ogg/Effect_Tick.ogg
+++ b/data/sounds/effects/ogg/Effect_Tick.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressDelete_14.ogg b/data/sounds/effects/ogg/KeypressDelete_14.ogg
index aa4349d..0baea25 100644
--- a/data/sounds/effects/ogg/KeypressDelete_14.ogg
+++ b/data/sounds/effects/ogg/KeypressDelete_14.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressDelete_49.ogg b/data/sounds/effects/ogg/KeypressDelete_49.ogg
index aa4349d..f5e9deb 100644
--- a/data/sounds/effects/ogg/KeypressDelete_49.ogg
+++ b/data/sounds/effects/ogg/KeypressDelete_49.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressReturn_14.ogg b/data/sounds/effects/ogg/KeypressReturn_14.ogg
index 2244a42..86a5a0e 100644
--- a/data/sounds/effects/ogg/KeypressReturn_14.ogg
+++ b/data/sounds/effects/ogg/KeypressReturn_14.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressReturn_49.ogg b/data/sounds/effects/ogg/KeypressReturn_49.ogg
index 2244a42..b0ddee5 100644
--- a/data/sounds/effects/ogg/KeypressReturn_49.ogg
+++ b/data/sounds/effects/ogg/KeypressReturn_49.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressSpacebar_14.ogg b/data/sounds/effects/ogg/KeypressSpacebar_14.ogg
index 56ea15e..058534a 100644
--- a/data/sounds/effects/ogg/KeypressSpacebar_14.ogg
+++ b/data/sounds/effects/ogg/KeypressSpacebar_14.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressSpacebar_49.ogg b/data/sounds/effects/ogg/KeypressSpacebar_49.ogg
index 56ea15e..3866e0e9 100644
--- a/data/sounds/effects/ogg/KeypressSpacebar_49.ogg
+++ b/data/sounds/effects/ogg/KeypressSpacebar_49.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressStandard_14.ogg b/data/sounds/effects/ogg/KeypressStandard_14.ogg
index 8df7214..317c8f3 100644
--- a/data/sounds/effects/ogg/KeypressStandard_14.ogg
+++ b/data/sounds/effects/ogg/KeypressStandard_14.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/KeypressStandard_49.ogg b/data/sounds/effects/ogg/KeypressStandard_49.ogg
index 8df7214..893bb52 100644
--- a/data/sounds/effects/ogg/KeypressStandard_49.ogg
+++ b/data/sounds/effects/ogg/KeypressStandard_49.ogg
Binary files differ
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index a060a5f..5656088 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -479,6 +479,12 @@
const Region& lhs,
const Rect& rhs, int dx, int dy)
{
+ if (!rhs.isValid()) {
+ LOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
+ op, rhs.left, rhs.top, rhs.right, rhs.bottom);
+ return;
+ }
+
#if VALIDATE_WITH_CORECG || VALIDATE_REGIONS
boolean_operation(op, dst, lhs, Region(rhs), dx, dy);
#else
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_alarm.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_alarm.png
index ffffb2d..fc8dee1 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_alarm.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
index 2117705..4a5d001 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_sync.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_sync.png
index ba2d78a..ed31e8e 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_sync.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_sync.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_sync_error.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_sync_error.png
index 1102846..6583878 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_sync_error.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_sync_error.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_alarm.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_alarm.png
index 4931b66..4b0a74f 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_alarm.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png
index f288d9f..53a7364 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_sync.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_sync.png
index 6649031..06b3913 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_sync.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_sync.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_sync_error.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_sync_error.png
index 1b57936..4f23dae 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_sync_error.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_sync_error.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_alarm.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_alarm.png
index 6abc7c8..19ad300 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_alarm.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_bluetooth.png
index 738bd21..524b31b 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_bluetooth.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync.png
index fb691fc..fdd640c 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync_error.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync_error.png
index 0c7ba35..a1a0646 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync_error.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_sync_error.png
Binary files differ
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index b017205..586b976 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -25,8 +25,7 @@
<string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Показване на известията"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Премахване от списъка"</string>
<string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Информация за приложението"</string>
- <!-- no translation found for status_bar_no_recent_apps (6576392951053994640) -->
- <skip />
+ <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Няма скорошни приложения"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Няма известия"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"В момента"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"Известия"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 567f2b9..8194542 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -25,8 +25,7 @@
<string name="status_bar_please_disturb_button" msgid="3345398298841572813">"הצג התראות"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"הסר מהרשימה"</string>
<string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"פרטי יישום"</string>
- <!-- no translation found for status_bar_no_recent_apps (6576392951053994640) -->
- <skip />
+ <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"אין יישומים אחרונים"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"אין התראות"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"מתמשך"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"התראות"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index ffb0227..f2fb58b 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -25,8 +25,7 @@
<string name="status_bar_please_disturb_button" msgid="3345398298841572813">"通知を表示"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"リストから削除"</string>
<string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"アプリ情報"</string>
- <!-- no translation found for status_bar_no_recent_apps (6576392951053994640) -->
- <skip />
+ <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"最近使ったアプリはありません"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"通知なし"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"実行中"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"通知"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 191007a..cfdd68a 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -25,7 +25,7 @@
<string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Tunjukkan pemberitahuan"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Alih keluar dari senarai"</string>
<string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Maklumat aplikasi"</string>
- <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Tiada aplikasi terbaru"</string>
+ <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Tiada aplikasi terbaharu"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Tiada pemberitahuan"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"Sedang berlangsung"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"Pemberitahuan"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 33dc26c..cdb7c26 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -25,8 +25,7 @@
<string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Afişaţi notificări"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Eliminaţi din listă"</string>
<string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informaţii despre aplicaţie"</string>
- <!-- no translation found for status_bar_no_recent_apps (6576392951053994640) -->
- <skip />
+ <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nu există aplicaţii recente"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Nicio notificare"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"În desfăşurare"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"Notificări"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 4dae911..2383cbb 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -25,8 +25,7 @@
<string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Bildirimleri göster"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Listeden kaldır"</string>
<string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Uygulama bilgileri"</string>
- <!-- no translation found for status_bar_no_recent_apps (6576392951053994640) -->
- <skip />
+ <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Son uygulama yok"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Bildirim yok"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"Sürüyor"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"Bildirimler"</string>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
index 37c77f6..5959537 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
@@ -118,7 +118,7 @@
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
- PixelFormat.RGBX_8888);
+ PixelFormat.OPAQUE);
// the status bar should be in an overlay if possible
final Display defaultDisplay
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index a90eb3f..6997837 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -29,6 +29,7 @@
import android.util.Log;
import android.view.ViewDebug;
import android.view.accessibility.AccessibilityEvent;
+import android.widget.ImageView;
import java.text.NumberFormat;
@@ -70,6 +71,8 @@
final float alpha = res.getFraction(R.dimen.status_bar_icon_drawing_alpha, 1, 1);
setAlpha(alpha);
}
+
+ setScaleType(ImageView.ScaleType.CENTER);
}
private static boolean streq(String a, String b) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index da6bcd2..c4e87d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -316,12 +316,7 @@
}
// figure out which pixel-format to use for the status bar.
- mPixelFormat = PixelFormat.TRANSLUCENT;
- Drawable bg = sb.getBackground();
- if (bg != null) {
- mPixelFormat = bg.getOpacity();
- }
-
+ mPixelFormat = PixelFormat.OPAQUE;
mStatusIcons = (LinearLayout)sb.findViewById(R.id.statusIcons);
mNotificationIcons = (IconMerger)sb.findViewById(R.id.notificationIcons);
mIcons = (LinearLayout)sb.findViewById(R.id.icons);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index fdb4548..4baf1afe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -719,28 +719,19 @@
Slog.d(TAG, "updateConnectivity: connectionStatus=" + connectionStatus);
}
- int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
+ mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
- switch (info.getType()) {
- case ConnectivityManager.TYPE_MOBILE:
- mInetCondition = inetCondition;
- updateDataNetType();
- updateDataIcon();
- updateTelephonySignalStrength(); // apply any change in connectionStatus
- break;
- case ConnectivityManager.TYPE_WIFI:
- mInetCondition = inetCondition;
- updateWifiIcons();
- break;
- case ConnectivityManager.TYPE_BLUETOOTH:
- mInetCondition = inetCondition;
- if (info != null) {
- mBluetoothTethered = info.isConnected() ? true: false;
- } else {
- mBluetoothTethered = false;
- }
- break;
+ if (info != null && info.getType() == ConnectivityManager.TYPE_BLUETOOTH) {
+ mBluetoothTethered = info.isConnected() ? true: false;
+ } else {
+ mBluetoothTethered = false;
}
+
+ // We want to update all the icons, all at once, for any condition change
+ updateDataNetType();
+ updateDataIcon();
+ updateTelephonySignalStrength();
+ updateWifiIcons();
}
@@ -1033,8 +1024,8 @@
pw.println(mWifiLevel);
pw.print(" mWifiSsid=");
pw.println(mWifiSsid);
- pw.print(" mWifiIconId=");
- pw.println(mWifiIconId);
+ pw.print(String.format(" mWifiIconId=0x%08x/%s",
+ mWifiIconId, getResourceName(mWifiIconId)));
pw.print(" mWifiActivity=");
pw.println(mWifiActivity);
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
index 61e30bf..24dce1a 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
@@ -58,6 +58,7 @@
private static final int CARRIER_HELP_TEXT = 12;
private static final int HELP_MESSAGE_TEXT = 13;
private static final int OWNER_INFO = 14;
+ private static final int BATTERY_INFO = 15;
private StatusMode mStatus;
private String mDateFormatString;
@@ -84,6 +85,9 @@
// last known battery level
private int mBatteryLevel = 100;
+ // last known SIM state
+ protected State mSimState;
+
private LockPatternUtils mLockPatternUtils;
private KeyguardUpdateMonitor mUpdateMonitor;
private Button mEmergencyCallButton;
@@ -98,6 +102,8 @@
private boolean mShowingStatus;
private KeyguardScreenCallback mCallback;
private final boolean mShowEmergencyButtonByDefault;
+ private CharSequence mPlmn;
+ private CharSequence mSpn;
private class TransientTextManager {
private TextView mTextView;
@@ -151,6 +157,7 @@
public KeyguardStatusViewManager(View view, KeyguardUpdateMonitor updateMonitor,
LockPatternUtils lockPatternUtils, KeyguardScreenCallback callback,
boolean showEmergencyButtonByDefault) {
+ if (DEBUG) Log.v(TAG, "KeyguardStatusViewManager()");
mContainer = view;
mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
mLockPatternUtils = lockPatternUtils;
@@ -165,6 +172,12 @@
mTransportView = (TransportControlView) findViewById(R.id.transport);
mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
mShowEmergencyButtonByDefault = showEmergencyButtonByDefault;
+
+ // Hide transport control view until we know we need to show it.
+ if (mTransportView != null) {
+ mTransportView.setVisibility(View.GONE);
+ }
+
if (mEmergencyCallButton != null) {
mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
mEmergencyCallButton.setOnClickListener(this);
@@ -173,8 +186,6 @@
mTransientTextManager = new TransientTextManager(mCarrierView);
- updateEmergencyCallButtonState();
-
resetStatusInfo();
refreshDate();
updateOwnerInfo();
@@ -187,10 +198,6 @@
v.setSelected(true);
}
}
-
- // until we get an update...
- setCarrierText(LockPatternUtils.getCarrierString(
- mUpdateMonitor.getTelephonyPlmn(), mUpdateMonitor.getTelephonySpn()));
}
private boolean inWidgetMode() {
@@ -248,6 +255,7 @@
case INSTRUCTION_TEXT:
case CARRIER_HELP_TEXT:
case HELP_MESSAGE_TEXT:
+ case BATTERY_INFO:
mTransientTextManager.post(string, 0, INSTRUCTION_RESET_DELAY);
break;
@@ -262,15 +270,16 @@
}
public void onPause() {
+ if (DEBUG) Log.v(TAG, "onPause()");
mUpdateMonitor.removeCallback(mInfoCallback);
mUpdateMonitor.removeCallback(mSimStateCallback);
}
/** {@inheritDoc} */
public void onResume() {
+ if (DEBUG) Log.v(TAG, "onResume()");
mUpdateMonitor.registerInfoCallback(mInfoCallback);
mUpdateMonitor.registerSimStateCallback(mSimStateCallback);
- updateEmergencyCallButtonState();
resetStatusInfo();
}
@@ -399,7 +408,12 @@
* Determine the current status of the lock screen given the sim state and other stuff.
*/
public StatusMode getStatusForIccState(IccCard.State simState) {
- boolean missingAndNotProvisioned = (!mUpdateMonitor.isDeviceProvisioned()
+ // Since reading the SIM may take a while, we assume it is present until told otherwise.
+ if (simState == null) {
+ return StatusMode.Normal;
+ }
+
+ final boolean missingAndNotProvisioned = (!mUpdateMonitor.isDeviceProvisioned()
&& (simState == IccCard.State.ABSENT || simState == IccCard.State.PERM_DISABLED));
// Assume we're NETWORK_LOCKED if not provisioned
@@ -435,22 +449,21 @@
*
* @param simState
*/
- private void updateWithSimStatus(State simState) {
- // The emergency call button no longer appears on this screen.
- if (DEBUG) Log.d(TAG, "updateLayout: status=" + mStatus);
+ private void updateCarrierTextWithSimStatus(State simState) {
+ if (DEBUG) Log.d(TAG, "updateCarrierTextWithSimStatus(), simState = " + simState);
CharSequence carrierText = null;
int carrierHelpTextId = 0;
mUnlockDisabledDueToSimState = false;
mStatus = getStatusForIccState(simState);
+ mSimState = simState;
switch (mStatus) {
case Normal:
- carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
- mUpdateMonitor.getTelephonySpn());
+ carrierText = makeCarierString(mPlmn, mSpn);
break;
case NetworkLocked:
- carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
+ carrierText = makeCarierString(mPlmn,
getContext().getText(R.string.lockscreen_network_locked_message));
carrierHelpTextId = R.string.lockscreen_instructions_when_pattern_disabled;
break;
@@ -467,19 +480,19 @@
break;
case SimMissingLocked:
- carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
+ carrierText = makeCarierString(mPlmn,
getContext().getText(R.string.lockscreen_missing_sim_message_short));
carrierHelpTextId = R.string.lockscreen_missing_sim_instructions;
mUnlockDisabledDueToSimState = true;
break;
case SimLocked:
- carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
+ carrierText = makeCarierString(mPlmn,
getContext().getText(R.string.lockscreen_sim_locked_message));
break;
case SimPukLocked:
- carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
+ carrierText = makeCarierString(mPlmn,
getContext().getText(R.string.lockscreen_sim_puk_locked_message));
if (!mLockPatternUtils.isPukUnlockScreenEnable()) {
mUnlockDisabledDueToSimState = true;
@@ -489,7 +502,6 @@
setCarrierText(carrierText);
setCarrierHelpText(carrierHelpTextId);
- updateEmergencyCallButtonState();
}
private View findViewById(int id) {
@@ -552,10 +564,11 @@
}
}
- private void updateEmergencyCallButtonState() {
+ private void updateEmergencyCallButtonState(int phoneState) {
if (mEmergencyCallButton != null) {
boolean showIfCapable = mShowEmergencyButtonByDefault || mUnlockDisabledDueToSimState;
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton, showIfCapable);
+ mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton,
+ phoneState, showIfCapable);
}
}
@@ -567,7 +580,8 @@
mShowingBatteryInfo = showBatteryInfo;
mPluggedIn = pluggedIn;
mBatteryLevel = batteryLevel;
- updateStatusLines(true);
+ final MutableInt tmpIcon = new MutableInt(0);
+ update(BATTERY_INFO, getAltTextMessage(tmpIcon));
}
public void onTimeChanged() {
@@ -575,15 +589,17 @@
}
public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
- setCarrierText(LockPatternUtils.getCarrierString(plmn, spn));
+ mPlmn = plmn;
+ mSpn = spn;
+ updateCarrierTextWithSimStatus(mSimState);
}
public void onRingerModeChanged(int state) {
}
- public void onPhoneStateChanged(String newState) {
- updateEmergencyCallButtonState();
+ public void onPhoneStateChanged(int phoneState) {
+ updateEmergencyCallButtonState(phoneState);
}
/** {@inheritDoc} */
@@ -595,7 +611,7 @@
private SimStateCallback mSimStateCallback = new SimStateCallback() {
public void onSimStateChanged(State simState) {
- updateWithSimStatus(simState);
+ updateCarrierTextWithSimStatus(simState);
}
};
@@ -604,4 +620,22 @@
mCallback.takeEmergencyCallAction();
}
}
+
+ /**
+ * Performs concentenation of PLMN/SPN
+ * @param plmn
+ * @param spn
+ * @return
+ */
+ private static CharSequence makeCarierString(CharSequence plmn, CharSequence spn) {
+ if (plmn != null && spn == null) {
+ return plmn;
+ } else if (plmn != null && spn != null) {
+ return plmn + "|" + spn;
+ } else if (plmn == null && spn != null) {
+ return spn;
+ } else {
+ return "";
+ }
+ }
}
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
index 2a23709..ec24f97 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
@@ -88,6 +88,8 @@
private ArrayList<InfoCallback> mInfoCallbacks = Lists.newArrayList();
private ArrayList<SimStateCallback> mSimStateCallbacks = Lists.newArrayList();
private ContentObserver mContentObserver;
+ private int mRingMode;
+ private int mPhoneState;
// messages for the handler
private static final int MSG_TIME_UPDATE = 301;
@@ -271,13 +273,21 @@
protected void handlePhoneStateChanged(String newState) {
if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")");
+ if (TelephonyManager.EXTRA_STATE_IDLE.equals(newState)) {
+ mPhoneState = TelephonyManager.CALL_STATE_IDLE;
+ } else if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(newState)) {
+ mPhoneState = TelephonyManager.CALL_STATE_OFFHOOK;
+ } else if (TelephonyManager.EXTRA_STATE_RINGING.equals(newState)) {
+ mPhoneState = TelephonyManager.CALL_STATE_RINGING;
+ }
for (int i = 0; i < mInfoCallbacks.size(); i++) {
- mInfoCallbacks.get(i).onPhoneStateChanged(newState);
+ mInfoCallbacks.get(i).onPhoneStateChanged(mPhoneState);
}
}
protected void handleRingerModeChange(int mode) {
if (DEBUG) Log.d(TAG, "handleRingerModeChange(" + mode + ")");
+ mRingMode = mode;
for (int i = 0; i < mInfoCallbacks.size(); i++) {
mInfoCallbacks.get(i).onRingerModeChanged(mode);
}
@@ -459,7 +469,7 @@
* {@link TelephonyManager@EXTRA_STATE_RINGING}
* {@link TelephonyManager#EXTRA_STATE_OFFHOOK
*/
- void onPhoneStateChanged(String newState);
+ void onPhoneStateChanged(int phoneState);
/**
* Called when visibility of lockscreen clock changes, such as when
@@ -484,8 +494,12 @@
public void registerInfoCallback(InfoCallback callback) {
if (!mInfoCallbacks.contains(callback)) {
mInfoCallbacks.add(callback);
- // notify the register the current state right away
- // TODO: need call other callback methods
+ // Notify listener of the current state
+ callback.onRefreshBatteryInfo(shouldShowBatteryInfo(), isPluggedIn(mBatteryStatus),
+ mBatteryLevel);
+ callback.onTimeChanged();
+ callback.onRingerModeChanged(mRingMode);
+ callback.onPhoneStateChanged(mPhoneState);
callback.onRefreshCarrierInfo(mTelephonyPlmn, mTelephonySpn);
} else {
if (DEBUG) Log.e(TAG, "Object tried to add another INFO callback",
@@ -500,9 +514,7 @@
public void registerSimStateCallback(SimStateCallback callback) {
if (!mSimStateCallbacks.contains(callback)) {
mSimStateCallbacks.add(callback);
- // notify the register the current sim state right away,
- // otherwise the register won't receive any state until
- // sim state gets changed again.
+ // Notify listener of the current state
callback.onSimStateChanged(mSimState);
} else {
if (DEBUG) Log.e(TAG, "Object tried to add another SIM callback",
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
index 64a9677..ab81875 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -782,7 +782,7 @@
// Don't play lockscreen SFX if the screen went off due to
// timeout.
mSuppressNextLockSound = true;
-
+
doKeyguardLocked();
}
}
@@ -793,7 +793,7 @@
if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState) // call ending
&& !mScreenOn // screen off
&& mExternallyEnabled) { // not disabled by any app
-
+
// note: this is a way to gracefully reenable the keyguard when the call
// ends and the screen is off without always reenabling the keyguard
// each time the screen turns off while in call (and having an occasional ugly
@@ -1297,7 +1297,7 @@
}
/** {@inheritDoc} */
- public void onPhoneStateChanged(String newState) {
+ public void onPhoneStateChanged(int phoneState) {
// ignored
}
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index 2938c45..2d24f99 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -4372,8 +4372,13 @@
ParcelFileDescriptor.MODE_TRUNCATE);
if (mTransport.getRestoreData(mBackupData) != BackupConstants.TRANSPORT_OK) {
+ // Transport-level failure, so we wind everything up and
+ // terminate the restore operation.
Slog.e(TAG, "Error getting restore data for " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
+ mBackupData.close();
+ mBackupDataName.delete();
+ executeNextState(RestoreState.FINAL);
return;
}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 977dd6f..cdefa00 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -65,6 +65,7 @@
class ServerThread extends Thread {
private static final String TAG = "SystemServer";
private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
+ private static final String ENCRYPTED_STATE = "1";
ContentResolver mContentResolver;
@@ -150,10 +151,15 @@
Slog.i(TAG, "Package Manager");
// Only run "core" apps if we're encrypting the device.
String cryptState = SystemProperties.get("vold.decrypt");
- boolean onlyCore = ENCRYPTING_STATE.equals(cryptState);
- if (onlyCore) {
+ boolean onlyCore = false;
+ if (ENCRYPTING_STATE.equals(cryptState)) {
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
+ onlyCore = true;
+ } else if (ENCRYPTED_STATE.equals(cryptState)) {
+ Slog.w(TAG, "Device encrypted - only parsing core apps");
+ onlyCore = true;
}
+
pm = PackageManagerService.main(context,
factoryTest != SystemServer.FACTORY_TEST_OFF,
onlyCore);
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 0ee3f17..93722e0 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -636,7 +636,7 @@
final boolean isHwAccelerated = (mAttrs.flags &
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0;
final int format = isHwAccelerated ? PixelFormat.TRANSLUCENT : mAttrs.format;
- if (isHwAccelerated && mAttrs.format == PixelFormat.OPAQUE) {
+ if (!PixelFormat.formatHasAlpha(mAttrs.format)) {
flags |= Surface.OPAQUE;
}
mSurface = new Surface(
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index edbc7b0..1361fd6 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -371,11 +371,12 @@
Layer::State& editDraw(mDrawingState);
editDraw.requested_w = temp.requested_w;
editDraw.requested_h = temp.requested_h;
-
- // record the new size, form this point on, when the client request
- // a buffer, it'll get the new size.
- mSurfaceTexture->setDefaultBufferSize(temp.requested_w, temp.requested_h);
}
+
+ // record the new size, form this point on, when the client request
+ // a buffer, it'll get the new size.
+ mSurfaceTexture->setDefaultBufferSize(temp.requested_w,
+ temp.requested_h);
}
if (temp.sequence != front.sequence) {
@@ -404,7 +405,9 @@
void Layer::lockPageFlip(bool& recomputeVisibleRegions)
{
if (mQueuedFrames > 0) {
+ // Capture the old state of the layer for comparisons later
const bool oldOpacity = isOpaque();
+ sp<GraphicBuffer> oldActiveBuffer = mActiveBuffer;
// signal another event if we have more frames pending
if (android_atomic_dec(&mQueuedFrames) > 1) {
@@ -417,7 +420,8 @@
return;
}
- sp<GraphicBuffer> newFrontBuffer(mSurfaceTexture->getCurrentBuffer());
+ // update the active buffer
+ mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
const Rect crop(mSurfaceTexture->getCurrentCrop());
const uint32_t transform(mSurfaceTexture->getCurrentTransform());
@@ -439,16 +443,16 @@
mFlinger->invalidateHwcGeometry();
}
- uint32_t bufWidth = newFrontBuffer->getWidth();
- uint32_t bufHeight = newFrontBuffer->getHeight();
- if (mActiveBuffer != NULL) {
- if (bufWidth != uint32_t(mActiveBuffer->width) ||
- bufHeight != uint32_t(mActiveBuffer->height)) {
+ uint32_t bufWidth = mActiveBuffer->getWidth();
+ uint32_t bufHeight = mActiveBuffer->getHeight();
+ if (oldActiveBuffer != NULL) {
+ if (bufWidth != uint32_t(oldActiveBuffer->width) ||
+ bufHeight != uint32_t(oldActiveBuffer->height)) {
mFlinger->invalidateHwcGeometry();
}
}
- mCurrentOpacity = getOpacityForFormat(newFrontBuffer->format);
+ mCurrentOpacity = getOpacityForFormat(mActiveBuffer->format);
if (oldOpacity != isOpaque()) {
recomputeVisibleRegions = true;
}
@@ -462,9 +466,6 @@
// FIXME: mPostedDirtyRegion = dirty & bounds
mPostedDirtyRegion.set(front.w, front.h);
- // update active buffer
- mActiveBuffer = newFrontBuffer;
-
if ((front.w != front.requested_w) ||
(front.h != front.requested_h))
{
@@ -578,7 +579,7 @@
uint32_t Layer::getTransformHint() const {
uint32_t orientation = 0;
if (!mFlinger->mDebugDisableTransformHint) {
- orientation = getOrientation();
+ orientation = getPlaneOrientation();
if (orientation & Transform::ROT_INVALID) {
orientation = 0;
}
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index e5ce814..7a47f62 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -45,6 +45,7 @@
mFlinger(flinger), mFiltering(false),
mNeedsFiltering(false), mInOverlay(false),
mOrientation(0),
+ mPlaneOrientation(0),
mTransactionFlags(0),
mPremultipliedAlpha(true), mName("unnamed"), mDebug(false),
mInvalidate(0)
@@ -256,6 +257,7 @@
// cache a few things...
mOrientation = tr.getOrientation();
+ mPlaneOrientation = planeTransform.getOrientation();
mTransform = tr;
mTransformedBounds = tr.makeBounds(w, h);
}
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index a14b397..268ba2d 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -221,6 +221,7 @@
inline State& currentState() { return mCurrentState; }
int32_t getOrientation() const { return mOrientation; }
+ int32_t getPlaneOrientation() const { return mPlaneOrientation; }
protected:
const GraphicPlane& graphicPlane(int dpy) const;
@@ -254,6 +255,7 @@
protected:
// cached during validateVisibility()
int32_t mOrientation;
+ int32_t mPlaneOrientation;
Transform mTransform;
GLfloat mVertices[4][2];
Rect mTransformedBounds;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 0ef03bb..2be6d18 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -986,19 +986,20 @@
void SurfaceFlinger::composeSurfaces(const Region& dirty)
{
- if (UNLIKELY(!mWormholeRegion.isEmpty())) {
+ const DisplayHardware& hw(graphicPlane(0).displayHardware());
+ HWComposer& hwc(hw.getHwComposer());
+
+ const size_t fbLayerCount = hwc.getLayerCount(HWC_FRAMEBUFFER);
+ if (UNLIKELY(fbLayerCount && !mWormholeRegion.isEmpty())) {
// should never happen unless the window manager has a bug
// draw something...
drawWormhole();
}
- const DisplayHardware& hw(graphicPlane(0).displayHardware());
- HWComposer& hwc(hw.getHwComposer());
- hwc_layer_t* const cur(hwc.getLayers());
-
/*
* and then, render the layers targeted at the framebuffer
*/
+ hwc_layer_t* const cur(hwc.getLayers());
const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
size_t count = layers.size();
for (size_t i=0 ; i<count ; i++) {
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index 101dd55..abb4523 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -182,9 +182,4 @@
* in commercial configuration.
*/
static final String PROPERTY_TEST_CSIM = "persist.radio.test-csim";
-
- /**
- * Set to true to indicate a test ims registration required.
- */
- static final String PROPERTY_IMS_REG_REQUIRED = "persist.radio.imsregrequired";
}