diff options
143 files changed, 610 insertions, 227 deletions
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java index c5ee48d967ab..7863102857ed 100644 --- a/core/java/android/app/StatusBarManager.java +++ b/core/java/android/app/StatusBarManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ - + package android.app; import android.content.Context; @@ -71,7 +71,9 @@ public class StatusBarManager { */ public void disable(int what) { try { - mService.disable(what, mToken, mContext.getPackageName()); + if (mService != null) { + mService.disable(what, mToken, mContext.getPackageName()); + } } catch (RemoteException ex) { // system process is dead anyway. throw new RuntimeException(ex); diff --git a/core/java/android/service/textservice/SpellCheckerService.java b/core/java/android/service/textservice/SpellCheckerService.java index b96099e52b39..2ecf307bad82 100644 --- a/core/java/android/service/textservice/SpellCheckerService.java +++ b/core/java/android/service/textservice/SpellCheckerService.java @@ -35,6 +35,28 @@ import java.lang.ref.WeakReference; * SpellCheckerService provides an abstract base class for a spell checker. * This class combines a service to the system with the spell checker service interface that * spell checker must implement. + * + * <p>In addition to the normal Service lifecycle methods, this class + * introduces a new specific callback that subclasses should override + * {@link #createSession()} to provide a spell checker session that is corresponding + * to requested language and so on. The spell checker session returned by this method + * should extend {@link SpellCheckerService.Session}. + * </p> + * + * <h3>Returning spell check results</h3> + * + * <p>{@link SpellCheckerService.Session#onGetSuggestions(TextInfo, int)} + * should return spell check results. + * It receives {@link android.view.textservice.TextInfo} and returns + * {@link android.view.textservice.SuggestionsInfo} for the input. + * You may want to override + * {@link SpellCheckerService.Session#onGetSuggestionsMultiple(TextInfo[], int, boolean)} for + * better performance and quality. + * </p> + * + * <p>Please note that {@link SpellCheckerService.Session#getLocale()} does not return a valid + * locale before {@link SpellCheckerService.Session#onCreate()} </p> + * */ public abstract class SpellCheckerService extends Service { private static final String TAG = SpellCheckerService.class.getSimpleName(); @@ -89,7 +111,7 @@ public abstract class SpellCheckerService extends Service { * but will be called in series on another thread. * @param textInfo the text metadata * @param suggestionsLimit the number of limit of suggestions returned - * @return SuggestionInfo which contains suggestions for textInfo + * @return SuggestionsInfo which contains suggestions for textInfo */ public abstract SuggestionsInfo onGetSuggestions(TextInfo textInfo, int suggestionsLimit); @@ -101,7 +123,7 @@ public abstract class SpellCheckerService extends Service { * @param textInfos an array of the text metadata * @param suggestionsLimit the number of limit of suggestions returned * @param sequentialWords true if textInfos can be treated as sequential words. - * @return an array of SuggestionInfo of onGetSuggestions + * @return an array of SuggestionsInfo of onGetSuggestions */ public SuggestionsInfo[] onGetSuggestionsMultiple(TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords) { diff --git a/core/java/android/view/inputmethod/InputMethodSubtype.java b/core/java/android/view/inputmethod/InputMethodSubtype.java index 34c9c2958a71..93caabe4cdc3 100644 --- a/core/java/android/view/inputmethod/InputMethodSubtype.java +++ b/core/java/android/view/inputmethod/InputMethodSubtype.java @@ -35,6 +35,13 @@ import java.util.Locale; * Subtype can describe locale (e.g. en_US, fr_FR...) and mode (e.g. voice, keyboard...), and is * used for IME switch and settings. The input method subtype allows the system to bring up the * specified subtype of the designated input method directly. + * + * <p>It should be defined in an XML resource file of the input method + * with the <code><subtype></code> element. + * For more information, see the guide to + * <a href="{@docRoot}resources/articles/creating-input-method.html"> + * Creating an Input Method</a>.</p> + * */ public final class InputMethodSubtype implements Parcelable { private static final String TAG = InputMethodSubtype.class.getSimpleName(); diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java index b940b80e8919..793f514fbe77 100644 --- a/core/java/android/view/textservice/SpellCheckerSession.java +++ b/core/java/android/view/textservice/SpellCheckerSession.java @@ -34,6 +34,51 @@ import java.util.Queue; /** * The SpellCheckerSession interface provides the per client functionality of SpellCheckerService. + * + * + * <a name="Applications"></a> + * <h3>Applications</h3> + * + * <p>In most cases, applications that are using the standard + * {@link android.widget.TextView} or its subclasses will have little they need + * to do to work well with spell checker services. The main things you need to + * be aware of are:</p> + * + * <ul> + * <li> Properly set the {@link android.R.attr#inputType} in your editable + * text views, so that the spell checker will have enough context to help the + * user in editing text in them. + * </ul> + * + * <p>For the rare people amongst us writing client applications that use the spell checker service + * directly, you will need to use {@link #getSuggestions(TextInfo, int)} or + * {@link #getSuggestions(TextInfo[], int, boolean)} for obtaining results from the spell checker + * service by yourself.</p> + * + * <h3>Security</h3> + * + * <p>There are a lot of security issues associated with spell checkers, + * since they could monitor all the text being sent to them + * through, for instance, {@link android.widget.TextView}. + * The Android spell checker framework also allows + * arbitrary third party spell checkers, so care must be taken to restrict their + * selection and interactions.</p> + * + * <p>Here are some key points about the security architecture behind the + * spell checker framework:</p> + * + * <ul> + * <li>Only the system is allowed to directly access a spell checker framework's + * {@link android.service.textservice.SpellCheckerService} interface, via the + * {@link android.Manifest.permission#BIND_TEXT_SERVICE} permission. This is + * enforced in the system by not binding to a spell checker service that does + * not require this permission. + * + * <li>The user must explicitly enable a new spell checker in settings before + * they can be enabled, to confirm with the system that they know about it + * and want to make it available for use. + * </ul> + * */ public class SpellCheckerSession { private static final String TAG = SpellCheckerSession.class.getSimpleName(); diff --git a/core/java/android/view/textservice/TextServicesManager.java b/core/java/android/view/textservice/TextServicesManager.java index b06c112cdf54..69f88a5e1532 100644 --- a/core/java/android/view/textservice/TextServicesManager.java +++ b/core/java/android/view/textservice/TextServicesManager.java @@ -35,6 +35,31 @@ import java.util.Locale; * * The user can change the current text services in Settings. And also applications can specify * the target text services. + * + * <h3>Architecture Overview</h3> + * + * <p>There are three primary parties involved in the text services + * framework (TSF) architecture:</p> + * + * <ul> + * <li> The <strong>text services manager</strong> as expressed by this class + * is the central point of the system that manages interaction between all + * other parts. It is expressed as the client-side API here which exists + * in each application context and communicates with a global system service + * that manages the interaction across all processes. + * <li> A <strong>text service</strong> implements a particular + * interaction model allowing the client application to retrieve information of text. + * The system binds to the current text service that is in use, causing it to be created and run. + * <li> Multiple <strong>client applications</strong> arbitrate with the text service + * manager for connections to text services. + * </ul> + * + * <h3>Text services sessions</h3> + * <ul> + * <li>The <strong>spell checker session</strong> is one of the text services. + * {@link android.view.textservice.SpellCheckerSession}</li> + * </ul> + * */ public final class TextServicesManager { private static final String TAG = TextServicesManager.class.getSimpleName(); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 48615bdd4d3e..6e81530396cd 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1917,6 +1917,7 @@ public class WebView extends AbsoluteLayout mLoadedPicture = ViewStateSerializer.deserializeViewState(stream, this); mBlockWebkitViewMessages = true; setNewPicture(mLoadedPicture, true); + mLoadedPicture.mViewState = null; return true; } catch (IOException e) { Log.w(LOGTAG, "Failed to loadViewState", e); @@ -4355,7 +4356,9 @@ public class WebView extends AbsoluteLayout selectionDone(); } mOrientation = newConfig.orientation; - mWebViewCore.sendMessage(EventHub.CLEAR_CONTENT); + if (mWebViewCore != null && !mBlockWebkitViewMessages) { + mWebViewCore.sendMessage(EventHub.CLEAR_CONTENT); + } } /** 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 Binary files differindex a7b5cd693b03..bf2cf8d8a8ea 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 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 Binary files differindex f96d123f6691..00427a1cea37 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 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 Binary files differindex b614b186ec21..0ee10acd85c6 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 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 Binary files differindex e4f72f6f648d..e07be7cd7578 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 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 Binary files differindex 7c1dd9d246d8..fcea3b423105 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 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 Binary files differindex 0569e087adb5..4006bd40f74a 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 diff --git a/core/res/res/drawable-hdpi/btn_check_on_holo.png b/core/res/res/drawable-hdpi/btn_check_on_holo.png Binary files differindex 3d9afa8e1e82..7c1bab005e1d 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_holo.png +++ b/core/res/res/drawable-hdpi/btn_check_on_holo.png 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 Binary files differindex 206e43f10d8e..c69bcf8131e9 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 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 Binary files differindex 58103c835b76..a8cedd1eb5c0 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 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 Binary files differindex 2ffe7a66b677..bc57f7af7a4a 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 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 Binary files differindex 7a92c9a2d210..34209c062aaa 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 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 Binary files differindex 45a8d86157f6..61f9e6b56116 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 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 Binary files differindex 94a0c125f396..62ac7f9cf868 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 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 Binary files differindex 70a6e9008b42..e10d5d17ef68 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 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 Binary files differindex 4b76e289093c..685f8b503303 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 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 Binary files differindex bc2f69677aef..d7ef1a62c8b3 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 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 Binary files differindex 6f83c051aa4a..fcf4623d1eea 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 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 Binary files differindex 86d42bb1b33f..9a6fc4d2cbf4 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 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 Binary files differindex 9e3b006a38f6..3875ac329c31 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 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 Binary files differindex 17292282ee07..a929e09e47f1 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 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 Binary files differindex ff78fc5055fe..013ca85ac22b 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 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 Binary files differindex 9a136d9feff3..57cfa4d2d0af 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 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 Binary files differindex d49952b48b35..1a379930f939 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 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 Binary files differindex 20144225d572..5694cf7394fa 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 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 Binary files differindex 80885d1abf56..6406c06dce32 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 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 Binary files differindex 35239da70d9d..c50efaf7500c 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 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 Binary files differindex 09aecf4c10bf..1a899c9eb459 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 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 Binary files differindex b667738b2ab0..37547d25d873 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 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 Binary files differindex 392f8523a85f..7b0e089cbbe6 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 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 Binary files differindex b36bc53250a9..692d705bd661 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 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 Binary files differindex e0f8260637d9..769cb125f4b1 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 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 Binary files differindex 5fb6e9627fd4..c5372a81f280 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 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 Binary files differindex 8c80ea1796db..1dee51b5c385 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 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 Binary files differindex 80e1fba219c2..3c1e25adc194 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 diff --git a/core/res/res/drawable-hdpi/ic_bullet_key_permission.png b/core/res/res/drawable-hdpi/ic_bullet_key_permission.png Binary files differindex 4b9bf5329212..4cf50ade1039 100644 --- a/core/res/res/drawable-hdpi/ic_bullet_key_permission.png +++ b/core/res/res/drawable-hdpi/ic_bullet_key_permission.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png Binary files differindex d2ced313e09c..d201bfb7542f 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_active.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png Binary files differindex 4ec450813884..efb29f1e1b04 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_focused.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png Binary files differindex 7b8168c9a501..176d4489685a 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_answer_normal.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png Binary files differindex 22783c90d62c..f37b16a95ce9 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_decline_focused.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png Binary files differindex c6a2e1757f0b..d88087b44a37 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_decline_normal.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png Binary files differindex 5805ce17e52c..1780ec059a6c 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_normal.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png Binary files differindex 6429517a44f0..58a5f16dfb42 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png Binary files differindex c995c8780012..f9a8c7caeda3 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_focused.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png Binary files differindex c75363b943e4..b47cd08f2138 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_silent_normal.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png Binary files differindex 69885eab984a..6e16e40379ce 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_focused.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png Binary files differindex 8cf2b4b4ca44..0dd81c021791 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_soundon_normal.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png b/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png Binary files differindex 60873dd77021..5f1b88167b12 100644 --- a/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png +++ b/core/res/res/drawable-hdpi/ic_lockscreen_text_focusde.png diff --git a/core/res/res/drawable-hdpi/ic_text_dot.png b/core/res/res/drawable-hdpi/ic_text_dot.png Binary files differindex a7eaec5ad1a3..fa69c69adbb8 100644 --- a/core/res/res/drawable-hdpi/ic_text_dot.png +++ b/core/res/res/drawable-hdpi/ic_text_dot.png 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 Binary files differindex e77921cdf942..449d4272acd6 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 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 Binary files differindex b5e714aa8758..14f4ff8f3566 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 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 Binary files differindex c659d943087b..5cf908658cc2 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 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 Binary files differindex c6d1cd112c1c..67890f093a55 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 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 Binary files differindex 89afee8e70d0..e9ffa5bfe2c2 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 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 Binary files differindex 58a2d40a985e..cc08f88f4c30 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 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 Binary files differindex fdbc011caea5..ebdb47bd675d 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 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 Binary files differindex ec3394ea0866..d594c466aba2 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 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 Binary files differindex 3e90f352b4c4..b4fd29b135ad 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 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 Binary files differindex ae5e49b156c8..d1756c7188aa 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 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 Binary files differindex 73183ad97042..4605a420fc5e 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 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 Binary files differindex 279427bd175a..41f33a84609f 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 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 Binary files differindex e0edec982d29..6cd59ea75bde 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 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 Binary files differindex d61b61329ccf..e03711e7a29a 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 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 Binary files differindex 0bba5ba886c5..a5ee1719f399 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 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 Binary files differindex f8d978a5c17d..c7fb673048c0 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 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 Binary files differindex b7f8e6207cd2..134a38b8252f 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 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 Binary files differindex d8cdd19d7cd7..0e7c8a97d1d9 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 diff --git a/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png b/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png Binary files differindex f830a03ec6f9..4048260c76a8 100644 --- a/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png +++ b/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png diff --git a/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png b/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png Binary files differindex 03f030b717e7..90e9c9c9142f 100644 --- a/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png +++ b/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_16_inner_holo.png b/core/res/res/drawable-hdpi/spinner_16_inner_holo.png Binary files differindex 604490dbe869..383543a0fb28 100644 --- a/core/res/res/drawable-hdpi/spinner_16_inner_holo.png +++ b/core/res/res/drawable-hdpi/spinner_16_inner_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_20_inner_holo.png b/core/res/res/drawable-hdpi/spinner_20_inner_holo.png Binary files differindex 2705a0634cef..49841ea0cc16 100644 --- a/core/res/res/drawable-hdpi/spinner_20_inner_holo.png +++ b/core/res/res/drawable-hdpi/spinner_20_inner_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_20_outer_holo.png b/core/res/res/drawable-hdpi/spinner_20_outer_holo.png Binary files differindex 1954c8caefa0..69f007047123 100644 --- a/core/res/res/drawable-hdpi/spinner_20_outer_holo.png +++ b/core/res/res/drawable-hdpi/spinner_20_outer_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_48_inner_holo.png b/core/res/res/drawable-hdpi/spinner_48_inner_holo.png Binary files differindex df1573b89703..c8358e9cefce 100644 --- a/core/res/res/drawable-hdpi/spinner_48_inner_holo.png +++ b/core/res/res/drawable-hdpi/spinner_48_inner_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_48_outer_holo.png b/core/res/res/drawable-hdpi/spinner_48_outer_holo.png Binary files differindex 8dcdc17dfb08..f62f74bb38e8 100644 --- a/core/res/res/drawable-hdpi/spinner_48_outer_holo.png +++ b/core/res/res/drawable-hdpi/spinner_48_outer_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_76_inner_holo.png b/core/res/res/drawable-hdpi/spinner_76_inner_holo.png Binary files differindex eff711785484..c29ab0783df4 100644 --- a/core/res/res/drawable-hdpi/spinner_76_inner_holo.png +++ b/core/res/res/drawable-hdpi/spinner_76_inner_holo.png diff --git a/core/res/res/drawable-hdpi/spinner_76_outer_holo.png b/core/res/res/drawable-hdpi/spinner_76_outer_holo.png Binary files differindex 50461b5a91bf..287afc65b458 100644 --- a/core/res/res/drawable-hdpi/spinner_76_outer_holo.png +++ b/core/res/res/drawable-hdpi/spinner_76_outer_holo.png diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png Binary files differindex ff29bbfe8a42..0b1aa3488cb5 100644 --- a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png +++ b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png diff --git a/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png b/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png Binary files differindex e0bd38bdd177..7d4df504edfe 100644 --- a/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png +++ b/core/res/res/drawable-hdpi/stat_sys_tether_wifi.png diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png Binary files differindex fff81d7e7240..39d2c95ffab2 100644 --- a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png +++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png Binary files differindex cabdc39e8f64..937720fcf624 100644 --- a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png +++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png diff --git a/core/res/res/drawable-hdpi/sym_def_app_icon.png b/core/res/res/drawable-hdpi/sym_def_app_icon.png Binary files differindex c8a38ed5d57e..96a442e5b8e9 100644 --- a/core/res/res/drawable-hdpi/sym_def_app_icon.png +++ b/core/res/res/drawable-hdpi/sym_def_app_icon.png diff --git a/core/res/res/drawable-hdpi/text_select_handle_left.png b/core/res/res/drawable-hdpi/text_select_handle_left.png Binary files differindex eead92ced16b..d2ed06dd5a17 100644 --- a/core/res/res/drawable-hdpi/text_select_handle_left.png +++ b/core/res/res/drawable-hdpi/text_select_handle_left.png diff --git a/core/res/res/drawable-hdpi/text_select_handle_middle.png b/core/res/res/drawable-hdpi/text_select_handle_middle.png Binary files differindex 185d83932d95..be2dc6811148 100644 --- a/core/res/res/drawable-hdpi/text_select_handle_middle.png +++ b/core/res/res/drawable-hdpi/text_select_handle_middle.png diff --git a/core/res/res/drawable-hdpi/text_select_handle_right.png b/core/res/res/drawable-hdpi/text_select_handle_right.png Binary files differindex e9fceec72121..e4192499b95b 100644 --- a/core/res/res/drawable-hdpi/text_select_handle_right.png +++ b/core/res/res/drawable-hdpi/text_select_handle_right.png 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 Binary files differindex 9835b0fbf986..06f0518f746d 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 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 Binary files differindex cee85bbdb001..987c097065c0 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 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 Binary files differindex bd496f80c3c3..8d87032affe1 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 diff --git a/core/res/res/drawable-mdpi/ic_bullet_key_permission.png b/core/res/res/drawable-mdpi/ic_bullet_key_permission.png Binary files differindex 22f25ca84904..7fee560242de 100644 --- a/core/res/res/drawable-mdpi/ic_bullet_key_permission.png +++ b/core/res/res/drawable-mdpi/ic_bullet_key_permission.png diff --git a/core/res/res/drawable-mdpi/ic_text_dot.png b/core/res/res/drawable-mdpi/ic_text_dot.png Binary files differindex 47913f66595a..2225bd581425 100644 --- a/core/res/res/drawable-mdpi/ic_text_dot.png +++ b/core/res/res/drawable-mdpi/ic_text_dot.png 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 Binary files differindex 989e76b70983..52c9e3a8e992 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 diff --git a/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png b/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png Binary files differindex cb99fa340b45..ba53c0b8923b 100644 --- a/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png +++ b/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png diff --git a/core/res/res/drawable-mdpi/sym_def_app_icon.png b/core/res/res/drawable-mdpi/sym_def_app_icon.png Binary files differindex b3e10f62685a..359047dfa4ed 100644 --- a/core/res/res/drawable-mdpi/sym_def_app_icon.png +++ b/core/res/res/drawable-mdpi/sym_def_app_icon.png diff --git a/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png b/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png Binary files differindex 5ad26b8a6295..96891cefb0d6 100644 --- a/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png +++ b/core/res/res/drawable-sw600dp-mdpi/unlock_halo.png 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 Binary files differindex 6a82a6469d70..6e0244f79eaa 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 diff --git a/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png b/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png Binary files differindex ccbdcc3cf532..6a0bdfcb1b43 100644 --- a/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png +++ b/core/res/res/drawable-xhdpi/ic_bullet_key_permission.png diff --git a/core/res/res/drawable-xhdpi/ic_text_dot.png b/core/res/res/drawable-xhdpi/ic_text_dot.png Binary files differindex d316f9ac8b1f..869dd95beace 100644 --- a/core/res/res/drawable-xhdpi/ic_text_dot.png +++ b/core/res/res/drawable-xhdpi/ic_text_dot.png diff --git a/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png b/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png Binary files differindex 830aa272c922..55e2329bb38c 100644 --- a/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png +++ b/core/res/res/drawable-xhdpi/spinner_16_inner_holo.png diff --git a/core/res/res/drawable-xhdpi/sym_def_app_icon.png b/core/res/res/drawable-xhdpi/sym_def_app_icon.png Binary files differindex f381f86b7d9b..71c6d760f051 100644 --- a/core/res/res/drawable-xhdpi/sym_def_app_icon.png +++ b/core/res/res/drawable-xhdpi/sym_def_app_icon.png diff --git a/core/res/res/layout/grant_credentials_permission.xml b/core/res/res/layout/grant_credentials_permission.xml index 3313590dfee4..dd85b33b814d 100644 --- a/core/res/res/layout/grant_credentials_permission.xml +++ b/core/res/res/layout/grant_credentials_permission.xml @@ -77,7 +77,7 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/perms_dangerous_perm_color" android:textStyle="bold" - android:paddingLeft="6dip" + android:paddingLeft="16dip" android:layout_toRightOf="@id/permission_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" /> @@ -88,7 +88,7 @@ android:textColor="@color/perms_dangerous_perm_color" android:layout_marginTop="-4dip" android:paddingBottom="8dip" - android:paddingLeft="6dip" + android:paddingLeft="16dip" android:layout_below="@id/account_type" android:layout_toRightOf="@id/permission_icon" android:layout_width="wrap_content" @@ -101,7 +101,7 @@ android:textStyle="bold" android:layout_marginTop="-4dip" android:paddingBottom="8dip" - android:paddingLeft="6dip" + android:paddingLeft="16dip" android:layout_below="@id/account_name" android:layout_toRightOf="@id/permission_icon" android:layout_width="wrap_content" diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml index a9c603f03c79..c37871bfca78 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -85,8 +85,8 @@ <color name="darker_gray">#aaa</color> <!-- For security permissions --> - <color name="perms_dangerous_grp_color">#dd6826</color> - <color name="perms_dangerous_perm_color">#dd6826</color> + <color name="perms_dangerous_grp_color">#33b5e5</color> + <color name="perms_dangerous_perm_color">#33b5e5</color> <color name="shadow">#cc222222</color> <!-- For search-related UIs --> diff --git a/data/sounds/AudioPackage7.mk b/data/sounds/AudioPackage7.mk index 66edb7a745d5..8d92b057cd64 100755 --- a/data/sounds/AudioPackage7.mk +++ b/data/sounds/AudioPackage7.mk @@ -62,6 +62,6 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/ringtones/ogg/Scarabaeus.ogg:system/media/audio/ringtones/Scarabaeus.ogg \ $(LOCAL_PATH)/ringtones/ogg/Sceptrum.ogg:system/media/audio/ringtones/Sceptrum.ogg \ $(LOCAL_PATH)/ringtones/ogg/Solarium.ogg:system/media/audio/ringtones/Solarium.ogg \ - $(LOCAL_PATH)/ringtones/ogg/Testudo.ogg:system/media/audio/ringtones/Testudo.ogg \ + $(LOCAL_PATH)/ringtones/ogg/Themos.ogg:system/media/audio/ringtones/Themos.ogg \ $(LOCAL_PATH)/ringtones/ogg/UrsaMinor.ogg:system/media/audio/ringtones/UrsaMinor.ogg \ $(LOCAL_PATH)/ringtones/ogg/Zeta.ogg:system/media/audio/ringtones/Zeta.ogg diff --git a/data/sounds/ringtones/ogg/Themos.ogg b/data/sounds/ringtones/ogg/Themos.ogg Binary files differnew file mode 100644 index 000000000000..bc850b86f161 --- /dev/null +++ b/data/sounds/ringtones/ogg/Themos.ogg diff --git a/data/sounds/ringtones/wav/Themos.wav b/data/sounds/ringtones/wav/Themos.wav Binary files differnew file mode 100644 index 000000000000..d4d5c6e6ea6c --- /dev/null +++ b/data/sounds/ringtones/wav/Themos.wav diff --git a/docs/html/sdk/android-4.0.jd b/docs/html/sdk/android-4.0.jd index b8cd947755f4..9a9f02a37cfd 100644 --- a/docs/html/sdk/android-4.0.jd +++ b/docs/html/sdk/android-4.0.jd @@ -200,15 +200,14 @@ method associated with each person and provide better suggestions for contacting <h3 id="Calendar">Calendar Provider</h3> -<p>The new calendar APIs allow you to access and modify the user’s calendars and events using the -Calendar Provider. You can read, add, modify and delete calendars, events, attendees, reminders and -alerts.</p> +<p>The new calendar APIs allow you to read, add, modify and delete calendars, events, attendees, +reminders and alerts, which are stored in the Calendar Provider.</p> <p>A variety of apps and widgets can use these APIs to read and modify calendar events. However, some of the most compelling use cases are sync adapters that synchronize the user's calendar from -other calendar services with the Calendar Provider, in order to offer a unified location for -all the user's events. Google Calendar, for example, uses a sync adapter to synchronize Google -Calendar events with the Calendar Provider, which can then be viewed with Android's built-in +other calendar services with the Calendar Provider, in order to offer a unified location for all the +user's events. Google Calendar events, for example, are synchronized with the Calendar Provider by +the Google Calendar Sync Adapter, allowing these events to be viewed with Android's built-in Calendar app.</p> <p>The data model for calendars and event-related information in the Calendar Provider is @@ -303,7 +302,7 @@ read voicemails from other services).</p> voicemail APIs. The subclasses {@link android.provider.VoicemailContract.Voicemails} and {@link android.provider.VoicemailContract.Status} provide tables in which the Voicemail Providers can insert voicemail data for storage on the device. For an example of a voicemail provider app, see the -<a href=”{@docRoot}resources/samples/VoicemailProviderDemo/index.html”>Voicemail Provider +<a href="{@docRoot}resources/samples/VoicemailProviderDemo/index.html">Voicemail Provider Demo</a>.</p> @@ -337,13 +336,19 @@ the face detected, including:</p> <ul> <li>A {@link android.graphics.Rect} that specifies the bounds of the face, relative to the camera's current field of view</li> -<li>An integer betwen 0 and 100 that indicates how confident the system is that the object is a +<li>An integer betwen 1 and 100 that indicates how confident the system is that the object is a human face</li> <li>A unique ID so you can track multiple faces</li> <li>Several {@link android.graphics.Point} objects that indicate where the eyes and mouth are located</li> </ul> +<p class="note"><strong>Note:</strong> Face detection may not be supported on some +devices, so you should check by calling {@link +android.hardware.Camera.Parameters#getMaxNumDetectedFaces()} and ensure the return +value is greater than zero. Also, some devices may not support identification of eyes and mouth, +in which case, those fields in the {@link android.hardware.Camera.Face} object will be null.</p> + <h4>Focus and metering areas</h4> @@ -370,18 +375,37 @@ android.hardware.Camera.Area} object and request that the camera focus on that a The focus or exposure in that area will continually update as the scene in the area changes.</p> +<h4>Continuous auto focus for photos</h4> + +<p>You can now enable continuous auto focusing (CAF) when taking photos. To enable CAF in your +camera app, pass {@link android.hardware.Camera.Parameters#FOCUS_MODE_CONTINUOUS_PICTURE} +to {@link android.hardware.Camera.Parameters#setFocusMode setFocusMode()}. When ready to capture +a photo, call {@link android.hardware.Camera#autoFocus autoFocus()}. Your {@link +android.hardware.Camera.AutoFocusCallback} immediately receives a callback to indicate whether +focus was acheived. To resume CAF after receiving the callback, you must call {@link +android.hardware.Camera#cancelAutoFocus()}.</p> + +<p class="note"><strong>Note:</strong> Continuous auto focus is also supported when capturing +video, using {@link android.hardware.Camera.Parameters#FOCUS_MODE_CONTINUOUS_VIDEO}, which was +added in API level 9.</p> + + <h4>Other camera features</h4> -<ul> +<ul> <li>While recording video, you can now call {@link android.hardware.Camera#takePicture takePicture()} to save a photo without interrupting the video session. Before doing so, you should call {@link android.hardware.Camera.Parameters#isVideoSnapshotSupported} to be sure the hardware supports it.</li> -<li>Lock auto exposure and white balance with {@link +<li>You can now lock auto exposure and white balance with {@link android.hardware.Camera.Parameters#setAutoExposureLock setAutoExposureLock()} and {@link -android.hardware.Camera.Parameters#setAutoWhiteBalanceLock setAutoWhiteBalanceLock()}, to prevent +android.hardware.Camera.Parameters#setAutoWhiteBalanceLock setAutoWhiteBalanceLock()} to prevent these properties from changing.</li> + +<li>You can now call {@link android.hardware.Camera#setDisplayOrientation +setDisplayOrientation()} while the camera preview is running. Previously, you could call this +only before beginning the preview, but you can now change the orientation at any time.</li> </ul> @@ -436,7 +460,7 @@ send additional HTTP headers with your request, which can be useful for HTTP(S) <li>WEBP images</li> <li>Matroska video</li> </ul> -<p>For more info, see <a href=”{@docRoot}guide/appendix/media-formats.html”>Supported Media +<p>For more info, see <a href="{@docRoot}guide/appendix/media-formats.html">Supported Media Formats</a>.</p> @@ -477,7 +501,7 @@ information on available keys see the {@code METADATA_KEY_*} flags in {@link android.media.MediaMetadataRetriever}.</p> <p>For a sample implementation, see the <a -href=”{@docRoot}resources/samples/RandomMusicPlayer/index.html”>Random Music Player</a>, which +href="{@docRoot}resources/samples/RandomMusicPlayer/index.html">Random Music Player</a>, which provides compatibility logic such that it enables the remote control client on Android 4.0 devices while continuing to support devices back to Android 2.1.</p> @@ -485,9 +509,9 @@ devices while continuing to support devices back to Android 2.1.</p> <h4>Media Effects</h4> <p>A new media effects framework allows you to apply a variety of visual effects to images and -videos. The system performs all effects processing on the GPU to obtain maximum performance. -New applications for Android 4.0 such as Google Talk and the Gallery editor make use of the -effects API to apply real-time effects to video and photos.</p> +videos. For example, image effects allow you to easily fix red-eye, convert an image to grayscale, +adjust brightness, adjust saturation, rotate an image, apply a fisheye effect, and much more. The +system performs all effects processing on the GPU to obtain maximum performance.</p> <p>For maximum performance, effects are applied directly to OpenGL textures, so your application must have a valid OpenGL context before it can use the effects APIs. The textures to which you apply @@ -572,7 +596,7 @@ android.bluetooth.BluetoothHealth}.</p> <h3 id="AndroidBeam">Android Beam (NDEF Push with NFC)</h3> <p>Android Beam is a new NFC feature that allows you to send NDEF messages from one device to -another (a process also known as “NDEF Push”). The data transfer is initiated when two +another (a process also known as “NDEF Push"). The data transfer is initiated when two Android-powered devices that support Android Beam are in close proximity (about 4 cm), usually with their backs touching. The data inside the NDEF message can contain any data that you wish to share between devices. For example, the People app shares contacts, YouTube shares videos, and Browser @@ -619,7 +643,7 @@ action to start an activity, with either a URL or a MIME type set according to t android.nfc.NdefRecord} in the {@link android.nfc.NdefMessage}. For the activity you want to respond, you can declare intent filters for the URLs or MIME types your app cares about. For more information about Tag Dispatch see the <a -href=”{@docRoot}guide/topics/nfc/index.html#dispatch”>NFC</a> developer guide.</p> +href="{@docRoot}guide/topics/nfc/index.html#dispatch">NFC</a> developer guide.</p> <p>If you want your {@link android.nfc.NdefMessage} to carry a URI, you can now use the convenience method {@link android.nfc.NdefRecord#createUri createUri} to construct a new {@link @@ -628,7 +652,7 @@ a special format that you want your application to also receive during an Androi should create an intent filter for your activity using the same URI scheme in order to receive the incoming NDEF message.</p> -<p>You should also pass an “Android application record” with your {@link android.nfc.NdefMessage} in +<p>You should also pass an “Android application record" with your {@link android.nfc.NdefMessage} in order to guarantee that your application handles the incoming NDEF message, even if other applications filter for the same intent action. You can create an Android application record by calling {@link android.nfc.NdefRecord#createApplicationRecord createApplicationRecord()}, passing it @@ -705,8 +729,8 @@ formed and who is the group owner.</li> <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE}</li> <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE}</li> <li>{@link android.Manifest.permission#INTERNET} (although your app doesn’t technically connect -to the Internet, the WiFi Direct implementation uses sockets that do require Internet -permission to work).</li> +to the Internet, communicating to Wi-Fi Direct peers with standard java sockets requires Internet +permission).</li> </ul> <p>The Android system also broadcasts several different actions during certain Wi-Fi P2P events:</p> @@ -732,7 +756,7 @@ this device have changed.</li> </ul> <p>See the {@link android.net.wifi.p2p.WifiP2pManager} documentation for more information. Also -look at the <a href=”{@docRoot}resources/samples/WiFiDirectDemo/index.html”>Wi-Fi Direct Demo</a> +look at the <a href="{@docRoot}resources/samples/WiFiDirectDemo/index.html">Wi-Fi Direct Demo</a> sample application.</p> @@ -767,7 +791,7 @@ action. For example:</p> <p>This intent filter indicates to the system that this is the activity that controls your application’s data usage. Thus, when the user inspects how much data your app is using from the -Settings app, a “View application settings” button is available that launches your +Settings app, a “View application settings" button is available that launches your preference activity so the user can refine how much data your app uses.</p> <p>Also beware that {@link android.net.ConnectivityManager#getBackgroundDataSetting()} is now @@ -1102,7 +1126,7 @@ implementation has been removed. Look for a blog post about a compatibility laye that you can use to convert your old TTS engines to the new framework.</p> <p>For an example TTS engine using the new APIs, see the <a -href=”{@docRoot}resources/samples/TtsEngine/index.html”>Text To Speech Engine</a> sample app.</p> +href="{@docRoot}resources/samples/TtsEngine/index.html">Text To Speech Engine</a> sample app.</p> @@ -1141,8 +1165,8 @@ checker. </p> importantly, the system gracefully manages the action bar’s size and configuration when running on smaller screens in order to provide an optimal user experience on all screen sizes. For example, when the screen is narrow (such as when a handset is in portrait orientation), the action bar’s -navigation tabs appear in a “stacked bar,” which appears directly below the main action bar. You can -also opt-in to a “split action bar,” which places all action items in a separate bar at the bottom +navigation tabs appear in a “stacked bar," which appears directly below the main action bar. You can +also opt-in to a “split action bar," which places all action items in a separate bar at the bottom of the screen when the screen is narrow.</p> @@ -1150,9 +1174,9 @@ of the screen when the screen is narrow.</p> <p>If your action bar includes several action items, not all of them will fit into the action bar on a narrow screen, so the system will place more of them into the overflow menu. However, Android 4.0 -allows you to enable “split action bar” so that more action items can appear on the screen in a +allows you to enable “split action bar" so that more action items can appear on the screen in a separate bar at the bottom of the screen. To enable split action bar, add {@link -android.R.attr#uiOptions android:uiOptions} with {@code ”splitActionBarWhenNarrow”} to either your +android.R.attr#uiOptions android:uiOptions} with {@code "splitActionBarWhenNarrow"} to either your <a href="guide/topics/manifest/application-element.html">{@code <application>}</a> tag or individual <a href="guide/topics/manifest/activity-element.html">{@code <activity>}</a> tags in your manifest file. When enabled, the system will add an additional bar at the bottom of the @@ -1188,7 +1212,7 @@ android.view.ActionProvider} is a good solution in order to create a reusable co handling the various action item transformations in your fragment or activity.</p> <p>For example, the {@link android.widget.ShareActionProvider} is an extension of {@link -android.view.ActionProvider} that facilitates a “share” action from the action bar. Instead of using +android.view.ActionProvider} that facilitates a “share" action from the action bar. Instead of using traditional action item that invokes the {@link android.content.Intent#ACTION_SEND} intent, you can use this action provider to present an action view with a drop-down list of applications that handle the {@link android.content.Intent#ACTION_SEND} intent. When the user selects an application to use @@ -1224,7 +1248,8 @@ public boolean onCreateOptionsMenu(Menu menu) { </pre> <p>For an example using the {@link android.widget.ShareActionProvider}, see the <a -href=”{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/ActionBarActionProviderActivity.html”>ActionBarActionProviderActivity</a> +href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/ +ActionBarActionProviderActivity.html">ActionBarActionProviderActivity</a> class in ApiDemos.</p> @@ -1237,7 +1262,7 @@ switch between the expanded state (action view is visible) and collapsed state ( visible).</p> <p>To declare that an action item that contains an action view be collapsible, include the {@code -“collapseActionView”} flag in the {@code android:showAsAction} attribute for the <a +“collapseActionView"} flag in the {@code android:showAsAction} attribute for the <a href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code <item>}</a> element in the menu’s XML file.</p> @@ -1259,7 +1284,7 @@ collapsed.</p> <h4>Other APIs for action bar</h4> <ul> <li>{@link android.app.ActionBar#setHomeButtonEnabled setHomeButtonEnabled()} allows you to specify -whether the icon/logo behaves as a button to navigate home or “up” (pass “true” to make it behave as +whether the icon/logo behaves as a button to navigate home or “up" (pass “true" to make it behave as a button).</li> <li>{@link android.app.ActionBar#setIcon setIcon()} and {@link android.app.ActionBar#setLogo @@ -1307,7 +1332,7 @@ the system bar’s visibility have been updated to better reflect the behavior o and navigation bar:</p> <ul> <li>The {@link android.view.View#SYSTEM_UI_FLAG_LOW_PROFILE} flag replaces View.STATUS_BAR_HIDDEN -flag. When set, this flag enables “low profile” mode for the system bar or +flag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide.</li> <li>The {@link android.view.View#SYSTEM_UI_FLAG_VISIBLE} flag replaces the {@code @@ -1334,7 +1359,7 @@ example, hide the action bar or other UI controls when the system UI hides), you of the system bar or navigation bar changes.</p> <p>See the <a -href=”{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/OverscanActivity.html”> +href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/OverscanActivity.html"> OverscanActivity</a> class for a demonstration of different system UI options.</p> @@ -1351,7 +1376,8 @@ instances of the new {@link android.widget.Space} view or by setting the relevan on children.</p> <p>See <a -href=”{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/index.html”>ApiDemos</a> +href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/index.html">ApiDemos</a +> for samples using {@link android.widget.GridLayout}.</p> @@ -1380,9 +1406,9 @@ to appear on the switch when in the on and off setting. The {@code android:text} allows you to place a label alongside the switch.</p> <p>For a sample using switches, see the <a -href=”{@docRoot}resources/samples/ApiDemos/res/layout/switches.html”>switches.xml</a> layout file +href="{@docRoot}resources/samples/ApiDemos/res/layout/switches.html">switches.xml</a> layout file and respective <a -href=”{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/Switches.html”>Switches +href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/Switches.html">Switches </a> activity.</p> @@ -1393,7 +1419,7 @@ up at an anchor point you specify (usually at the point of the item selected). A the {@link android.widget.PopupMenu} with a couple useful features:</p> <ul> <li>You can now easily inflate the contents of a popup menu from an XML <a -href=”{@docRoot}guide/topics/resources/menu-resource.html”>menu resource</a> with {@link +href="{@docRoot}guide/topics/resources/menu-resource.html">menu resource</a> with {@link android.widget.PopupMenu#inflate inflate()}, passing it the menu resource ID.</li> <li>You can also now create a {@link android.widget.PopupMenu.OnDismissListener} that receives a callback when the menu is dismissed.</li> @@ -1413,7 +1439,7 @@ android.preference.SwitchPreference} for the Wi-Fi and Bluetooth settings.</p> <h4>Hover events</h4> -<p>The {@link android.view.View} class now supports “hover” events to enable richer interactions +<p>The {@link android.view.View} class now supports “hover" events to enable richer interactions through the use of pointer devices (such as a mouse or other devices that drive an on-screen cursor).</p> @@ -1435,11 +1461,11 @@ listener returns false, then the hover event will be dispatched to the parent vi <p>If your application uses buttons or other widgets that change their appearance based on the current state, you can now use the {@code android:state_hovered} attribute in a <a -href=”{@docRoot}guide/topics/resources/drawable-resource.html#StateList”>state list drawable</a> to +href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList">state list drawable</a> to provide a different background drawable when a cursor hovers over the view.</p> <p>For a demonstration of the new hover events, see the <a -href=”{@docRoot}samples/ApiDemos/src/com/example/android/apis/view/Hover.html”>Hover</a> class in +href="{@docRoot}samples/ApiDemos/src/com/example/android/apis/view/Hover.html">Hover</a> class in ApiDemos.</p> @@ -1455,7 +1481,7 @@ events just like they would when a mouse pointer was being moved across the disp are pressed.</p> <p>Your application can distinguish between finger, mouse, stylus and eraser input by querying the -“tool type” associated with each pointer in a {@link android.view.MotionEvent} using {@link +“tool type" associated with each pointer in a {@link android.view.MotionEvent} using {@link android.view.MotionEvent#getToolType getToolType()}. The currently defined tool types are: {@link android.view.MotionEvent#TOOL_TYPE_UNKNOWN}, {@link android.view.MotionEvent#TOOL_TYPE_FINGER}, {@link android.view.MotionEvent#TOOL_TYPE_MOUSE}, {@link android.view.MotionEvent#TOOL_TYPE_STYLUS}, @@ -1463,7 +1489,7 @@ and {@link android.view.MotionEvent#TOOL_TYPE_ERASER}. By querying the tool typ can choose to handle stylus input in different ways from finger or mouse input.</p> <p>Your application can also query which mouse or stylus buttons are pressed by querying the “button -state” of a {@link android.view.MotionEvent} using {@link android.view.MotionEvent#getButtonState +state" of a {@link android.view.MotionEvent} using {@link android.view.MotionEvent#getButtonState getButtonState()}. The currently defined button states are: {@link android.view.MotionEvent#BUTTON_PRIMARY}, {@link android.view.MotionEvent#BUTTON_SECONDARY}, {@link android.view.MotionEvent#BUTTON_TERTIARY}, {@link android.view.MotionEvent#BUTTON_BACK}, and {@link @@ -1480,7 +1506,7 @@ android.view.MotionEvent#AXIS_DISTANCE}, {@link android.view.MotionEvent#AXIS_TI android.view.MotionEvent#AXIS_ORIENTATION}.</p> <p>For a demonstration of tool types, button states and the new axis codes, see the <a -href=”{@docRoot}samples/ApiDemos/src/com/example/android/apis/graphics/TouchPaint.html”>TouchPaint +href="{@docRoot}samples/ApiDemos/src/com/example/android/apis/graphics/TouchPaint.html">TouchPaint </a> class in ApiDemos.</p> @@ -1538,11 +1564,11 @@ approach.</p> application has set either <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> or <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> to -{@code “14”} or higher. Hardware acceleration generally results in smoother animations, smoother +{@code “14"} or higher. Hardware acceleration generally results in smoother animations, smoother scrolling, and overall better performance and response to user interaction.</p> <p>If necessary, you can manually disable hardware acceleration with the <a -href=”{@docRoot}guide/topics/manifest/activity-element.html#hwaccel”>{@code hardwareAccelerated}</a> +href="{@docRoot}guide/topics/manifest/activity-element.html#hwaccel">{@code hardwareAccelerated}</a> attribute for individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> elements or the <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a> @@ -1562,17 +1588,17 @@ direct pointers. This wasn't a problem as long as the garbage collector didn't m seemed to work because it made it possible to write buggy code. In Android 4.0, the system now uses indirect references in order to detect these bugs.</p> -<p>The ins and outs of JNI local references are described in “Local and Global References” in <a +<p>The ins and outs of JNI local references are described in “Local and Global References" in <a href="{@docRoot}guide/practices/design/jni.html">JNI Tips</a>. In Android 4.0, <a href="http://android-developers.blogspot.com/2011/07/debugging-android-jni-with-checkjni.html"> CheckJNI</a> has been enhanced to detect these errors. Watch the <a -href=”http://android-developers.blogspot.com/”>Android Developers Blog</a> for an upcoming post +href="http://android-developers.blogspot.com/">Android Developers Blog</a> for an upcoming post about common errors with JNI references and how you can fix them.</p> <p>This change in the JNI implementation only affects apps that target Android 4.0 by setting either the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> or <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code -minSdkVersion}</a> to {@code “14”} or higher. If you’ve set these attributes to any lower value, +minSdkVersion}</a> to {@code “14"} or higher. If you’ve set these attributes to any lower value, then JNI local references behave the same as in previous versions.</p> @@ -1598,7 +1624,7 @@ it easier for you to test apps that use {@link android.webkit.WebView}</li> <ul> <li>Updated V8 JavaScript compiler for faster performance</li> <li>Plus other notable enhancements carried over from <a -href=”{@docRoot}sdk/android-3.0.html”>Android +href="{@docRoot}sdk/android-3.0.html">Android 3.0</a> are now available for handsets: <ul> <li>Support for fixed position elements on all pages</li> diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd index 0d14f792cf7d..59675a8e8975 100644 --- a/docs/html/sdk/eclipse-adt.jd +++ b/docs/html/sdk/eclipse-adt.jd @@ -1,8 +1,8 @@ page.title=ADT Plugin for Eclipse adt.zip.version=14.0.0 adt.zip.download=ADT-14.0.0.zip -adt.zip.bytes=6745047 -adt.zip.checksum=014312e1553e3b8da55cb6a24e33e432 +adt.zip.bytes=6747816 +adt.zip.checksum=3883973cd229dc4336911117af949509 @jd:body diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd index 67be5c9650da..82db803eb0ce 100644 --- a/docs/html/sdk/index.jd +++ b/docs/html/sdk/index.jd @@ -2,20 +2,20 @@ page.title=Android SDK sdk.redirect=0 sdk.win_installer=installer_r14-windows.exe -sdk.win_installer_bytes=33860326 -sdk.win_installer_checksum=6d4f76385daaee766ad901699cdae6cc +sdk.win_installer_bytes=33853391 +sdk.win_installer_checksum=4f1cb329a41328c2cee2908b31ae6f6b sdk.win_download=android-sdk_r14-windows.zip -sdk.win_bytes=33853090 -sdk.win_checksum=0c39628e296d6176ed928cc64498ba04 +sdk.win_bytes=33846273 +sdk.win_checksum=48d44ae4cfcadede68621acb53caee80 sdk.mac_download=android-sdk_r14-macosx.zip -sdk.mac_bytes=30426431 -sdk.mac_checksum=189ce3e26dfb46298a7def21d3bdf271 +sdk.mac_bytes=30428734 +sdk.mac_checksum=812887018435382de8486f3bb26a5db4 sdk.linux_download=android-sdk_r14-linux.tgz -sdk.linux_bytes=26082867 -sdk.linux_checksum=500483f8acd0d3cae94c68c3dcefbb98 +sdk.linux_bytes=26075938 +sdk.linux_checksum=35c989ff67184766dc4960813ede8ab5 @jd:body diff --git a/include/gui/SensorManager.h b/include/gui/SensorManager.h index e1b1a7be45fb..3176462db622 100644 --- a/include/gui/SensorManager.h +++ b/include/gui/SensorManager.h @@ -20,6 +20,8 @@ #include <stdint.h> #include <sys/types.h> +#include <binder/IBinder.h> + #include <utils/Errors.h> #include <utils/RefBase.h> #include <utils/Singleton.h> @@ -41,7 +43,9 @@ class SensorEventQueue; // ---------------------------------------------------------------------------- -class SensorManager : public ASensorManager, public Singleton<SensorManager> +class SensorManager : + public ASensorManager, + public Singleton<SensorManager> { public: SensorManager(); @@ -52,9 +56,17 @@ public: sp<SensorEventQueue> createEventQueue(); private: - sp<ISensorServer> mSensorServer; - Sensor const** mSensorList; - Vector<Sensor> mSensors; + // DeathRecipient interface + void sensorManagerDied(); + + status_t assertStateLocked() const; + +private: + mutable Mutex mLock; + mutable sp<ISensorServer> mSensorServer; + mutable Sensor const** mSensorList; + mutable Vector<Sensor> mSensors; + mutable sp<IBinder::DeathRecipient> mDeathObserver; }; // ---------------------------------------------------------------------------- diff --git a/libs/gui/ISurfaceTexture.cpp b/libs/gui/ISurfaceTexture.cpp index babd2c07bc63..d2e562771412 100644 --- a/libs/gui/ISurfaceTexture.cpp +++ b/libs/gui/ISurfaceTexture.cpp @@ -58,13 +58,16 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(bufferIdx); - remote()->transact(REQUEST_BUFFER, data, &reply); + status_t result =remote()->transact(REQUEST_BUFFER, data, &reply); + if (result != NO_ERROR) { + return result; + } bool nonNull = reply.readInt32(); if (nonNull) { *buf = new GraphicBuffer(); reply.read(**buf); } - status_t result = reply.readInt32(); + result = reply.readInt32(); return result; } @@ -73,9 +76,12 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(bufferCount); - remote()->transact(SET_BUFFER_COUNT, data, &reply); - status_t err = reply.readInt32(); - return err; + status_t result =remote()->transact(SET_BUFFER_COUNT, data, &reply); + if (result != NO_ERROR) { + return result; + } + result = reply.readInt32(); + return result; } virtual status_t dequeueBuffer(int *buf, uint32_t w, uint32_t h, @@ -86,9 +92,12 @@ public: data.writeInt32(h); data.writeInt32(format); data.writeInt32(usage); - remote()->transact(DEQUEUE_BUFFER, data, &reply); + status_t result = remote()->transact(DEQUEUE_BUFFER, data, &reply); + if (result != NO_ERROR) { + return result; + } *buf = reply.readInt32(); - int result = reply.readInt32(); + result = reply.readInt32(); return result; } @@ -98,11 +107,14 @@ public: data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(buf); data.writeInt64(timestamp); - remote()->transact(QUEUE_BUFFER, data, &reply); + status_t result = remote()->transact(QUEUE_BUFFER, data, &reply); + if (result != NO_ERROR) { + return result; + } *outWidth = reply.readInt32(); *outHeight = reply.readInt32(); *outTransform = reply.readInt32(); - status_t result = reply.readInt32(); + result = reply.readInt32(); return result; } @@ -120,8 +132,11 @@ public: data.writeFloat(reg.top); data.writeFloat(reg.right); data.writeFloat(reg.bottom); - remote()->transact(SET_CROP, data, &reply); - status_t result = reply.readInt32(); + status_t result = remote()->transact(SET_CROP, data, &reply); + if (result != NO_ERROR) { + return result; + } + result = reply.readInt32(); return result; } @@ -129,8 +144,11 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(transform); - remote()->transact(SET_TRANSFORM, data, &reply); - status_t result = reply.readInt32(); + status_t result = remote()->transact(SET_TRANSFORM, data, &reply); + if (result != NO_ERROR) { + return result; + } + result = reply.readInt32(); return result; } @@ -138,8 +156,11 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(mode); - remote()->transact(SET_SCALING_MODE, data, &reply); - status_t result = reply.readInt32(); + status_t result = remote()->transact(SET_SCALING_MODE, data, &reply); + if (result != NO_ERROR) { + return result; + } + result = reply.readInt32(); return result; } @@ -147,9 +168,12 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(what); - remote()->transact(QUERY, data, &reply); + status_t result = remote()->transact(QUERY, data, &reply); + if (result != NO_ERROR) { + return result; + } value[0] = reply.readInt32(); - status_t result = reply.readInt32(); + result = reply.readInt32(); return result; } @@ -157,8 +181,11 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(enabled); - remote()->transact(SET_SYNCHRONOUS_MODE, data, &reply); - status_t result = reply.readInt32(); + status_t result = remote()->transact(SET_SYNCHRONOUS_MODE, data, &reply); + if (result != NO_ERROR) { + return result; + } + result = reply.readInt32(); return result; } @@ -167,11 +194,14 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(api); - remote()->transact(CONNECT, data, &reply); + status_t result = remote()->transact(CONNECT, data, &reply); + if (result != NO_ERROR) { + return result; + } *outWidth = reply.readInt32(); *outHeight = reply.readInt32(); *outTransform = reply.readInt32(); - status_t result = reply.readInt32(); + result = reply.readInt32(); return result; } @@ -179,8 +209,11 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); data.writeInt32(api); - remote()->transact(DISCONNECT, data, &reply); - status_t result = reply.readInt32(); + status_t result =remote()->transact(DISCONNECT, data, &reply); + if (result != NO_ERROR) { + return result; + } + result = reply.readInt32(); return result; } }; diff --git a/libs/gui/SensorManager.cpp b/libs/gui/SensorManager.cpp index 4774a58b3a0e..dafcdea2331e 100644 --- a/libs/gui/SensorManager.cpp +++ b/libs/gui/SensorManager.cpp @@ -23,6 +23,7 @@ #include <utils/RefBase.h> #include <utils/Singleton.h> +#include <binder/IBinder.h> #include <binder/IServiceManager.h> #include <gui/ISensorServer.h> @@ -40,17 +41,8 @@ ANDROID_SINGLETON_STATIC_INSTANCE(SensorManager) SensorManager::SensorManager() : mSensorList(0) { - const String16 name("sensorservice"); - while (getService(name, &mSensorServer) != NO_ERROR) { - usleep(250000); - } - - mSensors = mSensorServer->getSensorList(); - size_t count = mSensors.size(); - mSensorList = (Sensor const**)malloc(count * sizeof(Sensor*)); - for (size_t i=0 ; i<count ; i++) { - mSensorList[i] = mSensors.array() + i; - } + // okay we're not locked here, but it's not needed during construction + assertStateLocked(); } SensorManager::~SensorManager() @@ -58,20 +50,79 @@ SensorManager::~SensorManager() free(mSensorList); } +void SensorManager::sensorManagerDied() +{ + Mutex::Autolock _l(mLock); + mSensorServer.clear(); + free(mSensorList); + mSensorList = NULL; + mSensors.clear(); +} + +status_t SensorManager::assertStateLocked() const { + if (mSensorServer == NULL) { + // try for one second + const String16 name("sensorservice"); + for (int i=0 ; i<4 ; i++) { + status_t err = getService(name, &mSensorServer); + if (err == NAME_NOT_FOUND) { + usleep(250000); + continue; + } + if (err != NO_ERROR) { + return err; + } + break; + } + + class DeathObserver : public IBinder::DeathRecipient { + SensorManager& mSensorManger; + virtual void binderDied(const wp<IBinder>& who) { + LOGW("sensorservice died [%p]", who.unsafe_get()); + mSensorManger.sensorManagerDied(); + } + public: + DeathObserver(SensorManager& mgr) : mSensorManger(mgr) { } + }; + + mDeathObserver = new DeathObserver(*const_cast<SensorManager *>(this)); + mSensorServer->asBinder()->linkToDeath(mDeathObserver); + + mSensors = mSensorServer->getSensorList(); + size_t count = mSensors.size(); + mSensorList = (Sensor const**)malloc(count * sizeof(Sensor*)); + for (size_t i=0 ; i<count ; i++) { + mSensorList[i] = mSensors.array() + i; + } + } + + return NO_ERROR; +} + + + ssize_t SensorManager::getSensorList(Sensor const* const** list) const { + Mutex::Autolock _l(mLock); + status_t err = assertStateLocked(); + if (err < 0) { + return ssize_t(err); + } *list = mSensorList; return mSensors.size(); } Sensor const* SensorManager::getDefaultSensor(int type) { - // For now we just return the first sensor of that type we find. - // in the future it will make sense to let the SensorService make - // that decision. - for (size_t i=0 ; i<mSensors.size() ; i++) { - if (mSensorList[i]->getType() == type) - return mSensorList[i]; + Mutex::Autolock _l(mLock); + if (assertStateLocked() == NO_ERROR) { + // For now we just return the first sensor of that type we find. + // in the future it will make sense to let the SensorService make + // that decision. + for (size_t i=0 ; i<mSensors.size() ; i++) { + if (mSensorList[i]->getType() == type) + return mSensorList[i]; + } } return NULL; } @@ -80,20 +131,18 @@ sp<SensorEventQueue> SensorManager::createEventQueue() { sp<SensorEventQueue> queue; - if (mSensorServer == NULL) { - LOGE("createEventQueue: mSensorSever is NULL"); - return queue; - } - - sp<ISensorEventConnection> connection = - mSensorServer->createSensorEventConnection(); - if (connection == NULL) { - LOGE("createEventQueue: connection is NULL"); - return queue; + Mutex::Autolock _l(mLock); + while (assertStateLocked() == NO_ERROR) { + sp<ISensorEventConnection> connection = + mSensorServer->createSensorEventConnection(); + if (connection == NULL) { + // SensorService just died. + LOGE("createEventQueue: connection is NULL. SensorService died."); + continue; + } + queue = new SensorEventQueue(connection); + break; } - - queue = new SensorEventQueue(connection); - return queue; } diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index e0c2b3b9d7bb..1d20e248ed66 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -517,8 +517,8 @@ public class AudioService extends IAudioService.Stub { ensureValidDirection(direction); ensureValidStreamType(streamType); - - VolumeStreamState streamState = mStreamStates[STREAM_VOLUME_ALIAS[streamType]]; + int streamTypeAlias = STREAM_VOLUME_ALIAS[streamType]; + VolumeStreamState streamState = mStreamStates[streamTypeAlias]; final int oldIndex = (streamState.muteCount() != 0) ? streamState.mLastAudibleIndex : streamState.mIndex; boolean adjustVolume = true; @@ -527,14 +527,14 @@ public class AudioService extends IAudioService.Stub { if (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) || (!mVoiceCapable && streamType != AudioSystem.STREAM_VOICE_CALL && streamType != AudioSystem.STREAM_BLUETOOTH_SCO) || - (mVoiceCapable && streamType == AudioSystem.STREAM_RING)) { + (mVoiceCapable && streamTypeAlias == AudioSystem.STREAM_RING)) { // do not vibrate if already in silent mode if (mRingerMode != AudioManager.RINGER_MODE_NORMAL) { flags &= ~AudioManager.FLAG_VIBRATE; } // Check if the ringer mode changes with this volume adjustment. If // it does, it will handle adjusting the volume, so we won't below - adjustVolume = checkForRingerModeChange(oldIndex, direction); + adjustVolume = checkForRingerModeChange(oldIndex, direction, streamTypeAlias); } // If stream is muted, adjust last audible index only @@ -551,7 +551,7 @@ public class AudioService extends IAudioService.Stub { if (adjustVolume && streamState.adjustIndex(direction)) { // Post message to set system volume (it in turn will post a message // to persist). Do not change volume if stream is muted. - sendMsg(mAudioHandler, MSG_SET_SYSTEM_VOLUME, STREAM_VOLUME_ALIAS[streamType], SENDMSG_NOOP, 0, 0, + sendMsg(mAudioHandler, MSG_SET_SYSTEM_VOLUME, streamTypeAlias, SENDMSG_NOOP, 0, 0, streamState, 0); } index = streamState.mIndex; @@ -567,6 +567,23 @@ public class AudioService extends IAudioService.Stub { final int oldIndex = (streamState.muteCount() != 0) ? streamState.mLastAudibleIndex : streamState.mIndex; + // setting ring or notifications volume to 0 on voice capable devices enters silent mode + if (mVoiceCapable && (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) || + (STREAM_VOLUME_ALIAS[streamType] == AudioSystem.STREAM_RING))) { + int newRingerMode = mRingerMode; + if (index == 0) { + newRingerMode = System.getInt(mContentResolver, System.VIBRATE_IN_SILENT, 1) == 1 + ? AudioManager.RINGER_MODE_VIBRATE + : AudioManager.RINGER_MODE_SILENT; + setStreamVolumeInt(STREAM_VOLUME_ALIAS[streamType], index, false, true); + } else { + newRingerMode = AudioManager.RINGER_MODE_NORMAL; + } + if (newRingerMode != mRingerMode) { + setRingerMode(newRingerMode); + } + } + index = rescaleIndex(index * 10, streamType, STREAM_VOLUME_ALIAS[streamType]); setStreamVolumeInt(STREAM_VOLUME_ALIAS[streamType], index, false, true); @@ -692,6 +709,13 @@ public class AudioService extends IAudioService.Stub { if (isStreamMutedByRingerMode(streamType)) { if (!isStreamAffectedByRingerMode(streamType) || mRingerMode == AudioManager.RINGER_MODE_NORMAL) { + // ring and notifications volume should never be 0 when not silenced + // on voice capable devices + if (mVoiceCapable && + STREAM_VOLUME_ALIAS[streamType] == AudioSystem.STREAM_RING && + mStreamStates[streamType].mLastAudibleIndex == 0) { + mStreamStates[streamType].mLastAudibleIndex = 10; + } mStreamStates[streamType].mute(null, false); mRingerModeMutedStreams &= ~(1 << streamType); } @@ -1593,7 +1617,7 @@ public class AudioService extends IAudioService.Stub { * adjusting volume. If so, this will set the proper ringer mode and volume * indices on the stream states. */ - private boolean checkForRingerModeChange(int oldIndex, int direction) { + private boolean checkForRingerModeChange(int oldIndex, int direction, int streamType) { boolean adjustVolumeIndex = true; int newRingerMode = mRingerMode; int uiIndex = (oldIndex + 5) / 10; @@ -1608,7 +1632,8 @@ public class AudioService extends IAudioService.Stub { ? AudioManager.RINGER_MODE_VIBRATE : AudioManager.RINGER_MODE_SILENT; } - if (uiIndex == 0) { + if (uiIndex == 0 || (mPrevVolDirection == AudioManager.ADJUST_LOWER && + mVoiceCapable && streamType == AudioSystem.STREAM_RING)) { adjustVolumeIndex = false; } } @@ -1616,13 +1641,8 @@ public class AudioService extends IAudioService.Stub { if (direction == AudioManager.ADJUST_RAISE) { // exiting silent mode newRingerMode = AudioManager.RINGER_MODE_NORMAL; - if (uiIndex != 0) { - adjustVolumeIndex = false; - } - } else { - // prevent last audible index to reach 0 - adjustVolumeIndex = false; } + adjustVolumeIndex = false; } if (newRingerMode != mRingerMode) { diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp index f3174fef2666..63cbf5e076b2 100644 --- a/media/jni/android_media_MediaPlayer.cpp +++ b/media/jni/android_media_MediaPlayer.cpp @@ -274,8 +274,14 @@ setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface, jboolean mediaPlaye sp<ISurfaceTexture> new_st; if (jsurface) { sp<Surface> surface(Surface_getSurface(env, jsurface)); - new_st = surface->getSurfaceTexture(); - new_st->incStrong(thiz); + if (surface != NULL) { + new_st = surface->getSurfaceTexture(); + new_st->incStrong(thiz); + } else { + jniThrowException(env, "java/lang/IllegalArgumentException", + "The surface has been released"); + return; + } } env->SetIntField(thiz, fields.surface_texture, (int)new_st.get()); diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp index 4f183f57bb64..1e1de04c8976 100644 --- a/media/libstagefright/NuCachedSource2.cpp +++ b/media/libstagefright/NuCachedSource2.cpp @@ -279,6 +279,8 @@ void NuCachedSource2::onMessageReceived(const sp<AMessage> &msg) { void NuCachedSource2::fetchInternal() { LOGV("fetchInternal"); + bool reconnect = false; + { Mutex::Autolock autoLock(mLock); CHECK(mFinalStatus == OK || mNumRetriesLeft > 0); @@ -286,18 +288,24 @@ void NuCachedSource2::fetchInternal() { if (mFinalStatus != OK) { --mNumRetriesLeft; - status_t err = - mSource->reconnectAtOffset(mCacheOffset + mCache->totalSize()); + reconnect = true; + } + } - if (err == ERROR_UNSUPPORTED) { - mNumRetriesLeft = 0; - return; - } else if (err != OK) { - LOGI("The attempt to reconnect failed, %d retries remaining", - mNumRetriesLeft); + if (reconnect) { + status_t err = + mSource->reconnectAtOffset(mCacheOffset + mCache->totalSize()); - return; - } + Mutex::Autolock autoLock(mLock); + + if (err == ERROR_UNSUPPORTED) { + mNumRetriesLeft = 0; + return; + } else if (err != OK) { + LOGI("The attempt to reconnect failed, %d retries remaining", + mNumRetriesLeft); + + return; } } diff --git a/packages/SettingsProvider/res/drawable-hdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/drawable-hdpi/ic_launcher_settings.png Binary files differindex ff34a7ffcc4f..8a5a2f704bb5 100644 --- a/packages/SettingsProvider/res/drawable-hdpi/ic_launcher_settings.png +++ b/packages/SettingsProvider/res/drawable-hdpi/ic_launcher_settings.png diff --git a/packages/SettingsProvider/res/drawable-mdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/drawable-mdpi/ic_launcher_settings.png Binary files differindex b08ad3bd494b..803439ff4ae0 100644 --- a/packages/SettingsProvider/res/drawable-mdpi/ic_launcher_settings.png +++ b/packages/SettingsProvider/res/drawable-mdpi/ic_launcher_settings.png diff --git a/packages/SettingsProvider/res/drawable-xhdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/drawable-xhdpi/ic_launcher_settings.png Binary files differnew file mode 100644 index 000000000000..ec3c8ea3e14e --- /dev/null +++ b/packages/SettingsProvider/res/drawable-xhdpi/ic_launcher_settings.png diff --git a/packages/SystemUI/res/drawable-hdpi/recents_callout_line.9.png b/packages/SystemUI/res/drawable-hdpi/recents_callout_line.9.png Binary files differdeleted file mode 100644 index 335d5a8171d5..000000000000 --- a/packages/SystemUI/res/drawable-hdpi/recents_callout_line.9.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/recents_thumbnail_bg_normal.9.png b/packages/SystemUI/res/drawable-hdpi/recents_thumbnail_bg_normal.9.png Binary files differnew file mode 100644 index 000000000000..d000f7e314ca --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/recents_thumbnail_bg_normal.9.png diff --git a/packages/SystemUI/res/drawable-mdpi/recents_callout_line.9.png b/packages/SystemUI/res/drawable-mdpi/recents_callout_line.9.png Binary files differdeleted file mode 100644 index 724a5cd73b6a..000000000000 --- a/packages/SystemUI/res/drawable-mdpi/recents_callout_line.9.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/recents_thumbnail_bg_normal.9.png b/packages/SystemUI/res/drawable-mdpi/recents_thumbnail_bg_normal.9.png Binary files differnew file mode 100644 index 000000000000..f19dc9387223 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/recents_thumbnail_bg_normal.9.png diff --git a/packages/SystemUI/res/drawable-xhdpi/recents_callout_line.9.png b/packages/SystemUI/res/drawable-xhdpi/recents_callout_line.9.png Binary files differdeleted file mode 100644 index 1bd018ace35b..000000000000 --- a/packages/SystemUI/res/drawable-xhdpi/recents_callout_line.9.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/recents_thumbnail_bg_normal.9.png b/packages/SystemUI/res/drawable-xhdpi/recents_thumbnail_bg_normal.9.png Binary files differnew file mode 100644 index 000000000000..80fc8499cee9 --- /dev/null +++ b/packages/SystemUI/res/drawable-xhdpi/recents_thumbnail_bg_normal.9.png diff --git a/packages/SystemUI/res/layout-land/status_bar_recent_item.xml b/packages/SystemUI/res/layout-land/status_bar_recent_item.xml index 58355bdb5548..83c4faf237aa 100644 --- a/packages/SystemUI/res/layout-land/status_bar_recent_item.xml +++ b/packages/SystemUI/res/layout-land/status_bar_recent_item.xml @@ -26,16 +26,17 @@ android:paddingRight="@dimen/status_bar_recents_item_padding"> <RelativeLayout android:id="@+id/recent_item" - android:layout_gravity="bottom" + android:layout_gravity="center_vertical" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:paddingBottom="@*android:dimen/status_bar_height"> + android:paddingTop="@*android:dimen/status_bar_height"> <FrameLayout android:id="@+id/app_thumbnail" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" + android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin" android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" android:background="@drawable/recents_thumbnail_bg" android:foreground="@drawable/recents_thumbnail_fg"> @@ -44,19 +45,22 @@ android:layout_height="@dimen/status_bar_recents_thumbnail_height" android:visibility="invisible" /> - - <ImageView android:id="@+id/app_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" - android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" - android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" - android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" - android:adjustViewBounds="true" - android:visibility="invisible" - /> </FrameLayout> + <ImageView android:id="@+id/app_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" + android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" + android:layout_alignParentLeft="true" + android:layout_alignParentTop="true" + android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" + android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" + android:scaleType="centerInside" + android:adjustViewBounds="true" + android:visibility="invisible" + /> + <TextView android:id="@+id/app_label" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" @@ -67,6 +71,7 @@ android:layout_alignLeft="@id/app_thumbnail" android:layout_below="@id/app_thumbnail" android:layout_marginTop="@dimen/status_bar_recents_text_description_padding" + android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:singleLine="true" android:ellipsize="marquee" android:visibility="invisible" diff --git a/packages/SystemUI/res/layout-port/status_bar_recent_item.xml b/packages/SystemUI/res/layout-port/status_bar_recent_item.xml index 8c82eb15568a..3d8b9d634d24 100644 --- a/packages/SystemUI/res/layout-port/status_bar_recent_item.xml +++ b/packages/SystemUI/res/layout-port/status_bar_recent_item.xml @@ -26,32 +26,10 @@ android:paddingBottom="@dimen/status_bar_recents_item_padding"> <RelativeLayout android:id="@+id/recent_item" + android:layout_gravity="center_horizontal" android:layout_height="wrap_content" - android:layout_width="match_parent"> + android:layout_width="wrap_content"> - <FrameLayout android:id="@+id/app_thumbnail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" - android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" - android:background="@drawable/recents_thumbnail_bg" - android:foreground="@drawable/recents_thumbnail_fg"> - <ImageView android:id="@+id/app_thumbnail_image" - android:layout_width="@dimen/status_bar_recents_thumbnail_width" - android:layout_height="@dimen/status_bar_recents_thumbnail_height" - android:visibility="invisible" - /> - <ImageView android:id="@+id/app_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" - android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" - android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" - android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" - android:adjustViewBounds="true" - /> - </FrameLayout> <TextView android:id="@+id/app_label" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" @@ -61,12 +39,26 @@ android:scrollHorizontally="true" android:layout_alignParentLeft="true" android:layout_alignTop="@id/app_icon" + android:paddingTop="2dp" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:singleLine="true" android:ellipsize="marquee" android:textColor="@color/status_bar_recents_app_label_color" /> - + <FrameLayout android:id="@+id/app_thumbnail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_toRightOf="@id/app_label" + android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" + android:background="@drawable/recents_thumbnail_bg" + android:foreground="@drawable/recents_thumbnail_fg"> + <ImageView android:id="@+id/app_thumbnail_image" + android:layout_width="@dimen/status_bar_recents_thumbnail_width" + android:layout_height="@dimen/status_bar_recents_thumbnail_height" + android:visibility="invisible" + /> + </FrameLayout> <View android:id="@+id/recents_callout_line" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="1dip" @@ -79,6 +71,18 @@ android:background="@drawable/recents_callout_line" /> + <ImageView android:id="@+id/app_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/app_label" + android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" + android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" + android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" + android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" + android:scaleType="centerInside" + android:adjustViewBounds="true" + /> + <TextView android:id="@+id/app_description" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" diff --git a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml index 47ffb83d07ef..16757732cfc7 100644 --- a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml +++ b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml @@ -27,8 +27,8 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="24dp" - android:textColor="#ffffffff" + android:textSize="20dp" + android:textColor="@android:color/holo_blue_light" android:text="@string/status_bar_no_recent_apps" android:gravity="center_horizontal" android:layout_gravity="center" diff --git a/packages/SystemUI/res/values-land/dimens.xml b/packages/SystemUI/res/values-land/dimens.xml index 32ebc808a115..e7c8b1f191a2 100644 --- a/packages/SystemUI/res/values-land/dimens.xml +++ b/packages/SystemUI/res/values-land/dimens.xml @@ -23,15 +23,18 @@ <!-- How far the thumbnail for a recent app appears from left edge --> <dimen name="status_bar_recents_thumbnail_left_margin">0dp</dimen> <!-- How far the thumbnail for a recent app appears from top edge --> - <dimen name="status_bar_recents_thumbnail_top_margin">12dp</dimen> + <dimen name="status_bar_recents_thumbnail_top_margin">28dp</dimen> <!-- Padding for text descriptions --> <dimen name="status_bar_recents_text_description_padding">8dp</dimen> <!-- Width of application label text --> <dimen name="status_bar_recents_app_label_width">156dip</dimen> <!-- Left margin of application label text --> - <dimen name="status_bar_recents_app_label_left_margin">16dip</dimen> + <dimen name="status_bar_recents_app_label_left_margin">12dip</dimen> <!-- Margin between recents container and glow on the right --> <dimen name="status_bar_recents_right_glow_margin">0dip</dimen> <!-- Padding between recents items --> <dimen name="status_bar_recents_item_padding">2dip</dimen> + <!-- Where to place the app icon over the thumbnail --> + <dimen name="status_bar_recents_app_icon_left_margin">8dp</dimen> + <dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen> </resources> diff --git a/packages/SystemUI/res/values-port/dimens.xml b/packages/SystemUI/res/values-port/dimens.xml index 2bafd3079832..de7b836ce3f9 100644 --- a/packages/SystemUI/res/values-port/dimens.xml +++ b/packages/SystemUI/res/values-port/dimens.xml @@ -18,15 +18,18 @@ <resources> <!-- Recent Applications parameters --> <!-- How far the thumbnail for a recent app appears from left edge --> - <dimen name="status_bar_recents_thumbnail_left_margin">110dp</dimen> + <dimen name="status_bar_recents_thumbnail_left_margin">20dp</dimen> <!-- Padding for text descriptions --> <dimen name="status_bar_recents_text_description_padding">8dp</dimen> <!-- Width of application label text --> <dimen name="status_bar_recents_app_label_width">88dip</dimen> <!-- Left margin of application label text --> - <dimen name="status_bar_recents_app_label_left_margin">16dip</dimen> + <dimen name="status_bar_recents_app_label_left_margin">0dip</dimen> <!-- Margin between recents container and glow on the right --> <dimen name="status_bar_recents_right_glow_margin">100dip</dimen> <!-- Padding between recents items --> <dimen name="status_bar_recents_item_padding">0dip</dimen> + <!-- Where to place the app icon over the thumbnail --> + <dimen name="status_bar_recents_app_icon_left_margin">0dp</dimen> + <dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen> </resources> diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index c88d65134b50..555baa2c8e0c 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -29,4 +29,5 @@ <drawable name="notification_header_bg">#d8000000</drawable> <drawable name="notification_tracking_bg">#d8000000</drawable> <color name="notification_list_shadow_top">#80000000</color> + <drawable name="recents_callout_line">#66ffffff</drawable> </resources> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 830506c0bb9d..bbc66cf41028 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -21,21 +21,18 @@ <!-- Recent Applications parameters --> <!-- Upper width limit for application icon --> - <dimen name="status_bar_recents_app_icon_max_width">64dp</dimen> + <dimen name="status_bar_recents_app_icon_max_width">48dp</dimen> <!-- Upper height limit for application icon --> - <dimen name="status_bar_recents_app_icon_max_height">64dp</dimen> - <!-- Where to place the app icon over the thumbnail --> - <dimen name="status_bar_recents_app_icon_left_margin">13dp</dimen> - <dimen name="status_bar_recents_app_icon_top_margin">13dp</dimen> + <dimen name="status_bar_recents_app_icon_max_height">48dp</dimen> <!-- Size of application thumbnail --> <dimen name="status_bar_recents_thumbnail_width">164dp</dimen> <dimen name="status_bar_recents_thumbnail_height">145dp</dimen> <!-- Size of application label text --> - <dimen name="status_bar_recents_app_label_text_size">16dip</dimen> + <dimen name="status_bar_recents_app_label_text_size">14dip</dimen> <!-- Size of application description text --> - <dimen name="status_bar_recents_app_description_text_size">16dip</dimen> + <dimen name="status_bar_recents_app_description_text_size">14dip</dimen> <!-- Size of fading edge for scroll effect --> <dimen name="status_bar_recents_fading_edge_length">20dip</dimen> <!-- Margin between recents container and glow on the right --> diff --git a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java index 2d8185b4f33c..008f5d8fd4ad 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java @@ -524,6 +524,7 @@ public class KeyguardUpdateMonitor { callback.onRingerModeChanged(mRingMode); callback.onPhoneStateChanged(mPhoneState); callback.onRefreshCarrierInfo(mTelephonyPlmn, mTelephonySpn); + callback.onClockVisibilityChanged(); } else { if (DEBUG) Log.e(TAG, "Object tried to add another INFO callback", new Exception("Whoops")); diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java index 2fd165a93695..0499cfa2ba99 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java @@ -178,7 +178,6 @@ public class KeyguardViewManager implements KeyguardWindowController { int visFlags = ( View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_HOME - | View.STATUS_BAR_DISABLE_CLOCK ); mKeyguardHost.setSystemUiVisibility(visFlags); diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index ebf380a1f9fe..96998afa8f6c 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -709,8 +709,14 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {} @Override public void onRingerModeChanged(int state) {} + @Override - public void onClockVisibilityChanged() {} + public void onClockVisibilityChanged() { + int visFlags = getSystemUiVisibility() & ~View.STATUS_BAR_DISABLE_CLOCK; + setSystemUiVisibility(visFlags + | (mUpdateMonitor.isClockVisible() ? View.STATUS_BAR_DISABLE_CLOCK : 0)); + } + @Override public void onDeviceProvisioned() {} diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 48172fa3aeee..8b09e0073657 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1834,7 +1834,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { pf.right = df.right = vf.right = mDockRight; pf.bottom = df.bottom = vf.bottom = mDockBottom; - final boolean navVisible = mNavigationBar != null && mNavigationBar.isVisibleLw() && + final boolean navVisible = (mNavigationBar == null || mNavigationBar.isVisibleLw()) && (mLastSystemUiFlags&View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0; // When the navigation bar isn't visible, we put up a fake diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index f306e4a9ee58..171710a13c09 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -97,6 +97,16 @@ void CameraService::onFirstRef() setCameraFree(i); } } + + // Read the system property to determine if we have to use the + // AUDIO_STREAM_ENFORCED_AUDIBLE type. + char value[PROPERTY_VALUE_MAX]; + property_get("ro.camera.sound.forced", value, "0"); + if (strcmp(value, "0") != 0) { + mAudioStreamType = AUDIO_STREAM_ENFORCED_AUDIBLE; + } else { + mAudioStreamType = AUDIO_STREAM_MUSIC; + } } CameraService::~CameraService() { @@ -282,21 +292,10 @@ void CameraService::setCameraFree(int cameraId) { // A reference count is kept to determine when we will actually release the // media players. -static MediaPlayer* newMediaPlayer(const char *file) { - // Read the system property to determine if we have need to use the - // AUDIO_STREAM_ENFORCED_AUDIBLE type. - char value[PROPERTY_VALUE_MAX]; - property_get("ro.camera.sound.forced", value, "0"); - int audioStreamType; - if (strcmp(value, "0") != 0) { - audioStreamType = AUDIO_STREAM_ENFORCED_AUDIBLE; - } else { - audioStreamType = AUDIO_STREAM_MUSIC; - } - +MediaPlayer* CameraService::newMediaPlayer(const char *file) { MediaPlayer* mp = new MediaPlayer(); if (mp->setDataSource(file, NULL) == NO_ERROR) { - mp->setAudioStreamType(audioStreamType); + mp->setAudioStreamType(mAudioStreamType); mp->prepare(); } else { LOGE("Failed to load CameraService sounds: %s", file); @@ -335,7 +334,7 @@ void CameraService::playSound(sound_kind kind) { // do not play the sound if stream volume is 0 // (typically because ringer mode is silent). int index; - AudioSystem::getStreamVolumeIndex(AUDIO_STREAM_ENFORCED_AUDIBLE, &index); + AudioSystem::getStreamVolumeIndex(mAudioStreamType, &index); if (index != 0) { player->seekTo(0); player->start(); diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h index 57abf835e76e..cdfbc566f188 100644 --- a/services/camera/libcameraservice/CameraService.h +++ b/services/camera/libcameraservice/CameraService.h @@ -76,6 +76,9 @@ private: void setCameraFree(int cameraId); // sounds + audio_stream_type_t mAudioStreamType; + MediaPlayer* newMediaPlayer(const char *file); + Mutex mSoundLock; sp<MediaPlayer> mSoundPlayer[NUM_SOUNDS]; int mSoundRef; // reference count (release all MediaPlayer when 0) diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java index 43d938cea3d8..28013bd7b35b 100644 --- a/services/java/com/android/server/NativeDaemonConnector.java +++ b/services/java/com/android/server/NativeDaemonConnector.java @@ -207,6 +207,13 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo */ private void sendCommandLocked(String command, String argument) throws NativeDaemonConnectorException { + if (command != null && command.indexOf('\0') >= 0) { + throw new IllegalArgumentException("unexpected command: " + command); + } + if (argument != null && argument.indexOf('\0') >= 0) { + throw new IllegalArgumentException("unexpected argument: " + argument); + } + if (LOCAL_LOGD) Slog.d(TAG, String.format("SND -> {%s} {%s}", command, argument)); if (mOutputStream == null) { Slog.e(TAG, "No connection to daemon", new IllegalStateException()); diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java index b05705eb1224..fb13b755eb48 100644 --- a/services/java/com/android/server/NetworkManagementService.java +++ b/services/java/com/android/server/NetworkManagementService.java @@ -16,6 +16,8 @@ package com.android.server; +import static android.Manifest.permission.ACCESS_NETWORK_STATE; +import static android.Manifest.permission.CHANGE_NETWORK_STATE; import static android.Manifest.permission.DUMP; import static android.Manifest.permission.MANAGE_NETWORK_POLICY; import static android.net.NetworkStats.SET_DEFAULT; @@ -350,6 +352,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub } public InterfaceConfiguration getInterfaceConfig(String iface) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG); String rsp; try { rsp = mConnector.doCommand("interface getcfg " + iface).get(0); @@ -404,6 +407,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub public void setInterfaceConfig( String iface, InterfaceConfiguration cfg) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); LinkAddress linkAddr = cfg.addr; if (linkAddr == null || linkAddr.getAddress() == null) { throw new IllegalStateException("Null LinkAddress given"); @@ -421,6 +425,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub } public void setInterfaceDown(String iface) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); try { InterfaceConfiguration ifcg = getInterfaceConfig(iface); ifcg.interfaceFlags = ifcg.interfaceFlags.replace("up", "down"); @@ -432,6 +437,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub } public void setInterfaceUp(String iface) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); try { InterfaceConfiguration ifcg = getInterfaceConfig(iface); ifcg.interfaceFlags = ifcg.interfaceFlags.replace("down", "up"); @@ -444,6 +450,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub public void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); String cmd = String.format("interface ipv6privacyextensions %s %s", iface, enable ? "enable" : "disable"); try { @@ -459,7 +466,8 @@ public class NetworkManagementService extends INetworkManagementService.Stub /* TODO: This is right now a IPv4 only function. Works for wifi which loses its IPv6 addresses on interface down, but we need to do full clean up here */ public void clearInterfaceAddresses(String iface) throws IllegalStateException { - String cmd = String.format("interface clearaddrs %s", iface); + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); + String cmd = String.format("interface clearaddrs %s", iface); try { mConnector.doCommand(cmd); } catch (NativeDaemonConnectorException e) { @@ -491,10 +499,12 @@ public class NetworkManagementService extends INetworkManagementService.Stub } public void addRoute(String interfaceName, RouteInfo route) { + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); modifyRoute(interfaceName, ADD, route); } public void removeRoute(String interfaceName, RouteInfo route) { + mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG); modifyRoute(interfaceName, REMOVE, route); } @@ -578,6 +588,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub } public RouteInfo[] getRoutes(String interfaceName) { + mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG); ArrayList<RouteInfo> routes = new ArrayList<RouteInfo>(); // v4 routes listed as: diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java index ef48b9e2bc30..788ecda647c0 100644 --- a/services/java/com/android/server/TextServicesManagerService.java +++ b/services/java/com/android/server/TextServicesManagerService.java @@ -43,10 +43,13 @@ import android.util.Slog; import android.view.textservice.SpellCheckerInfo; import android.view.textservice.SpellCheckerSubtype; +import java.io.FileDescriptor; import java.io.IOException; +import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Map; public class TextServicesManagerService extends ITextServicesManager.Stub { private static final String TAG = TextServicesManagerService.class.getSimpleName(); @@ -480,6 +483,66 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { } } + @Override + protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) + != PackageManager.PERMISSION_GRANTED) { + + pw.println("Permission Denial: can't dump TextServicesManagerService from from pid=" + + Binder.getCallingPid() + + ", uid=" + Binder.getCallingUid()); + return; + } + + synchronized(mSpellCheckerMap) { + pw.println("Current Text Services Manager state:"); + pw.println(" Spell Checker Map:"); + for (Map.Entry<String, SpellCheckerInfo> ent : mSpellCheckerMap.entrySet()) { + pw.print(" "); pw.print(ent.getKey()); pw.println(":"); + SpellCheckerInfo info = ent.getValue(); + pw.print(" "); pw.print("id="); pw.println(info.getId()); + pw.print(" "); pw.print("comp="); + pw.println(info.getComponent().toShortString()); + int NS = info.getSubtypeCount(); + for (int i=0; i<NS; i++) { + SpellCheckerSubtype st = info.getSubtypeAt(i); + pw.print(" "); pw.print("Subtype #"); pw.print(i); pw.println(":"); + pw.print(" "); pw.print("locale="); pw.println(st.getLocale()); + pw.print(" "); pw.print("extraValue="); + pw.println(st.getExtraValue()); + } + } + pw.println(""); + pw.println(" Spell Checker Bind Groups:"); + for (Map.Entry<String, SpellCheckerBindGroup> ent + : mSpellCheckerBindGroups.entrySet()) { + SpellCheckerBindGroup grp = ent.getValue(); + pw.print(" "); pw.print(ent.getKey()); pw.print(" "); + pw.print(grp); pw.println(":"); + pw.print(" "); pw.print("mInternalConnection="); + pw.println(grp.mInternalConnection); + pw.print(" "); pw.print("mSpellChecker="); + pw.println(grp.mSpellChecker); + pw.print(" "); pw.print("mBound="); pw.print(grp.mBound); + pw.print(" mConnected="); pw.println(grp.mConnected); + int NL = grp.mListeners.size(); + for (int i=0; i<NL; i++) { + InternalDeathRecipient listener = grp.mListeners.get(i); + pw.print(" "); pw.print("Listener #"); pw.print(i); pw.println(":"); + pw.print(" "); pw.print("mTsListener="); + pw.println(listener.mTsListener); + pw.print(" "); pw.print("mScListener="); + pw.println(listener.mScListener); + pw.print(" "); pw.print("mGroup="); + pw.println(listener.mGroup); + pw.print(" "); pw.print("mScLocale="); + pw.print(listener.mScLocale); + pw.print(" mUid="); pw.println(listener.mUid); + } + } + } + } + // SpellCheckerBindGroup contains active text service session listeners. // If there are no listeners anymore, the SpellCheckerBindGroup instance will be removed from // mSpellCheckerBindGroups @@ -488,6 +551,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { private final InternalServiceConnection mInternalConnection; private final ArrayList<InternalDeathRecipient> mListeners = new ArrayList<InternalDeathRecipient>(); + public boolean mBound; public ISpellCheckerService mSpellChecker; public boolean mConnected; @@ -495,6 +559,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { ITextServicesSessionListener listener, String locale, ISpellCheckerSessionListener scListener, int uid, Bundle bundle) { mInternalConnection = connection; + mBound = true; mConnected = false; addListener(listener, locale, scListener, uid, bundle); } @@ -580,15 +645,18 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { if (DBG) { Slog.d(TAG, "cleanLocked"); } - if (mListeners.isEmpty()) { + // If there are no more active listeners, clean up. Only do this + // once. + if (mBound && mListeners.isEmpty()) { + mBound = false; final String sciId = mInternalConnection.mSciId; - if (mSpellCheckerBindGroups.containsKey(sciId)) { + SpellCheckerBindGroup cur = mSpellCheckerBindGroups.get(sciId); + if (cur == this) { if (DBG) { Slog.d(TAG, "Remove bind group."); } mSpellCheckerBindGroups.remove(sciId); } - // Unbind service when there is no active clients. mContext.unbindService(mInternalConnection); } } @@ -623,7 +691,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { } ISpellCheckerService spellChecker = ISpellCheckerService.Stub.asInterface(service); final SpellCheckerBindGroup group = mSpellCheckerBindGroups.get(mSciId); - if (group != null) { + if (this == group.mInternalConnection) { group.onServiceConnected(spellChecker); } } @@ -631,7 +699,12 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { @Override public void onServiceDisconnected(ComponentName name) { - mSpellCheckerBindGroups.remove(mSciId); + synchronized(mSpellCheckerMap) { + final SpellCheckerBindGroup group = mSpellCheckerBindGroups.get(mSciId); + if (this == group.mInternalConnection) { + mSpellCheckerBindGroups.remove(mSciId); + } + } } } diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 55e958709fac..b76f8b9ee341 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -2698,6 +2698,19 @@ public class WifiStateMachine extends StateMachine { handleNetworkDisconnect(); } transitionTo(mDriverStoppedState); + break; + } + + // Supplicant can fail to report a NETWORK_DISCONNECTION_EVENT + // when authentication times out after a successful connection, + // we can figure this from the supplicant state. If supplicant + // state is DISCONNECTED, but the mNetworkInfo says we are not + // disconnected, we need to handle a disconnection + if (state == SupplicantState.DISCONNECTED && + mNetworkInfo.getState() != NetworkInfo.State.DISCONNECTED) { + if (DBG) log("Missed CTRL-EVENT-DISCONNECTED, disconnect"); + handleNetworkDisconnect(); + transitionTo(mDisconnectedState); } break; /* Do a redundant disconnect without transition */ |