diff options
24 files changed, 191 insertions, 78 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index c14a70308677..97d299a8a582 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2327,7 +2327,9 @@ public class Intent implements Parcelable, Cloneable { * party applications because a newly initialized user does not have any * third party applications installed for it.) This is sent early in * starting the user, around the time the home app is started, before - * {@link #ACTION_BOOT_COMPLETED} is sent. + * {@link #ACTION_BOOT_COMPLETED} is sent. This is sent as a foreground + * broadcast, since it is part of a visible user interaction; be as quick + * as possible when handling it. */ public static final String ACTION_USER_INITIALIZE = "android.intent.action.USER_INITIALIZE"; @@ -2337,7 +2339,9 @@ public class Intent implements Parcelable, Cloneable { * brought to the foreground. This is only sent to receivers registered * through {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) * Context.registerReceiver}. It is sent to the user that is going to the - * foreground. + * foreground. This is sent as a foreground + * broadcast, since it is part of a visible user interaction; be as quick + * as possible when handling it. */ public static final String ACTION_USER_FOREGROUND = "android.intent.action.USER_FOREGROUND"; @@ -2347,14 +2351,17 @@ public class Intent implements Parcelable, Cloneable { * sent to the background. This is only sent to receivers registered * through {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) * Context.registerReceiver}. It is sent to the user that is going to the - * background. + * background. This is sent as a foreground + * broadcast, since it is part of a visible user interaction; be as quick + * as possible when handling it. */ public static final String ACTION_USER_BACKGROUND = "android.intent.action.USER_BACKGROUND"; /** - * Broadcast sent to the system when a user is added. Carries an extra EXTRA_USER_HANDLE that has the - * userHandle of the new user. It is sent to all running users. You must hold + * Broadcast sent to the system when a user is added. Carries an extra + * EXTRA_USER_HANDLE that has the userHandle of the new user. It is sent to + * all running users. You must hold * {@link android.Manifest.permission#MANAGE_USERS} to receive this broadcast. * @hide */ @@ -2362,22 +2369,59 @@ public class Intent implements Parcelable, Cloneable { "android.intent.action.USER_ADDED"; /** - * Broadcast sent to the system when a user is started. Carries an extra EXTRA_USER_HANDLE that has - * the userHandle of the user. This is only sent to + * Broadcast sent by the system when a user is started. Carries an extra + * EXTRA_USER_HANDLE that has the userHandle of the user. This is only sent to * registered receivers, not manifest receivers. It is sent to the user - * that has been started. + * that has been started. This is sent as a foreground + * broadcast, since it is part of a visible user interaction; be as quick + * as possible when handling it. * @hide */ public static final String ACTION_USER_STARTED = "android.intent.action.USER_STARTED"; /** - * Broadcast sent to the system when a user is stopped. Carries an extra EXTRA_USER_HANDLE that has - * the userHandle of the user. This is similar to {@link #ACTION_PACKAGE_RESTARTED}, - * but for an entire user instead of a specific package. This is only sent to - * registered receivers, not manifest receivers. It is sent to all running - * users <em>except</em> the one that has just been stopped (which is no - * longer running). + * Broadcast sent when a user is in the process of starting. Carries an extra + * EXTRA_USER_HANDLE that has the userHandle of the user. This is only + * sent to registered receivers, not manifest receivers. It is sent to all + * users (including the one that is being started). You must hold + * {@link android.Manifest.permission#INTERACT_ACROSS_USERS} to receive + * this broadcast. This is sent as a background broadcast, since + * its result is not part of the primary UX flow; to safely keep track of + * started/stopped state of a user you can use this in conjunction with + * {@link #ACTION_USER_STOPPING}. It is <b>not</b> generally safe to use with + * other user state broadcasts since those are foreground broadcasts so can + * execute in a different order. + * @hide + */ + public static final String ACTION_USER_STARTING = + "android.intent.action.USER_STARTING"; + + /** + * Broadcast sent when a user is going to be stopped. Carries an extra + * EXTRA_USER_HANDLE that has the userHandle of the user. This is only + * sent to registered receivers, not manifest receivers. It is sent to all + * users (including the one that is being stopped). You must hold + * {@link android.Manifest.permission#INTERACT_ACROSS_USERS} to receive + * this broadcast. The user will not stop until all receivers have + * handled the broadcast. This is sent as a background broadcast, since + * its result is not part of the primary UX flow; to safely keep track of + * started/stopped state of a user you can use this in conjunction with + * {@link #ACTION_USER_STARTING}. It is <b>not</b> generally safe to use with + * other user state broadcasts since those are foreground broadcasts so can + * execute in a different order. + * @hide + */ + public static final String ACTION_USER_STOPPING = + "android.intent.action.USER_STOPPING"; + + /** + * Broadcast sent to the system when a user is stopped. Carries an extra + * EXTRA_USER_HANDLE that has the userHandle of the user. This is similar to + * {@link #ACTION_PACKAGE_RESTARTED}, but for an entire user instead of a + * specific package. This is only sent to registered receivers, not manifest + * receivers. It is sent to all running users <em>except</em> the one that + * has just been stopped (which is no longer running). * @hide */ public static final String ACTION_USER_STOPPED = diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java index 35e2e4adcb4a..1aab9114db85 100644 --- a/core/java/android/text/Html.java +++ b/core/java/android/text/Html.java @@ -221,10 +221,10 @@ public class Html { false /* no info */); switch(paraDir) { case Layout.DIR_RIGHT_TO_LEFT: - return "<p dir=rtl>"; + return "<p dir=\"rtl\">"; case Layout.DIR_LEFT_TO_RIGHT: default: - return "<p dir=ltr>"; + return "<p dir=\"ltr\">"; } } diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java index 549d74c226cd..f507a795172b 100644 --- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java +++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java @@ -803,12 +803,8 @@ public class GlowPadView extends View { private void handleCancel(MotionEvent event) { if (DEBUG && mDragging) Log.v(TAG, "** Handle CANCEL"); - // We should drop the active target here but it interferes with - // moving off the screen in the direction of the navigation bar. At some point we may - // want to revisit how we handle this. For now we'll allow a canceled event to - // activate the current target. - - // mActiveTarget = -1; // Drop the active target if canceled. + // Drop the active target if canceled. + mActiveTarget = -1; int actionIndex = event.findPointerIndex(mPointerId); actionIndex = actionIndex == -1 ? 0 : actionIndex; diff --git a/core/res/res/anim/wallpaper_enter.xml b/core/res/res/anim/wallpaper_enter.xml index 2993a2d9a0ed..eb826b8e0c00 100644 --- a/core/res/res/anim/wallpaper_enter.xml +++ b/core/res/res/anim/wallpaper_enter.xml @@ -19,10 +19,12 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/decelerate_quad"> + <!-- Having trouble avoiding this when switching users, so simple fade for now <scale android:fromXScale="3.0" android:toXScale="1.0" android:fromYScale="3.0" android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%" android:duration="@android:integer/config_longAnimTime" /> + --> <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_longAnimTime" /> </set>
\ No newline at end of file diff --git a/core/res/res/anim/wallpaper_exit.xml b/core/res/res/anim/wallpaper_exit.xml index 5d5b38aef63b..d675afbe495d 100644 --- a/core/res/res/anim/wallpaper_exit.xml +++ b/core/res/res/anim/wallpaper_exit.xml @@ -19,10 +19,12 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/accelerate_quad"> + <!-- Having trouble avoiding this when switching users, so simple fade for now <scale android:fromXScale="1.0" android:toXScale="3.0" android:fromYScale="1.0" android:toYScale="3.0" android:pivotX="50%" android:pivotY="50%" android:duration="@android:integer/config_longAnimTime" /> + --> <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="@android:integer/config_longAnimTime"/> </set>
\ No newline at end of file diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml index e53c05e838d7..93778a96bd1f 100644 --- a/core/res/res/values-ca/strings.xml +++ b/core/res/res/values-ca/strings.xml @@ -737,7 +737,7 @@ <string name="relationTypeSister" msgid="1735983554479076481">"Germana"</string> <string name="relationTypeSpouse" msgid="394136939428698117">"Cònjuge"</string> <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Personalitzada"</string> - <string name="sipAddressTypeHome" msgid="6093598181069359295">"Particular"</string> + <string name="sipAddressTypeHome" msgid="6093598181069359295">"Casa"</string> <string name="sipAddressTypeWork" msgid="6920725730797099047">"Feina"</string> <string name="sipAddressTypeOther" msgid="4408436162950119849">"Altres"</string> <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Introdueix el codi PIN"</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 6963bfd3b374..f5e42997a930 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -737,7 +737,7 @@ <string name="relationTypeSister" msgid="1735983554479076481">"Sestra"</string> <string name="relationTypeSpouse" msgid="394136939428698117">"Manžel(ka)"</string> <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Vlastní"</string> - <string name="sipAddressTypeHome" msgid="6093598181069359295">"Plocha"</string> + <string name="sipAddressTypeHome" msgid="6093598181069359295">"Domů"</string> <string name="sipAddressTypeWork" msgid="6920725730797099047">"Práce"</string> <string name="sipAddressTypeOther" msgid="4408436162950119849">"Jiné"</string> <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Zadejte kód PIN"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index b5c9138ac4be..a605506db865 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -501,10 +501,10 @@ <string name="permdesc_modifyPhoneState" msgid="1029877529007686732">"Ermöglicht der App, die Telefonfunktionen des Geräts zu steuern. Eine App mit dieser Berechtigung kann das Netzwerk wechseln oder das Radio des Telefons ein- und ausschalten, ohne Sie darüber zu informieren."</string> <string name="permlab_readPhoneState" msgid="9178228524507610486">"Telefonstatus und Identität abrufen"</string> <string name="permdesc_readPhoneState" msgid="1639212771826125528">"Ermöglicht der App, auf die Telefonfunktionen des Geräts zuzugreifen. Die Berechtigung erlaubt der App, die Telefonnummer und Geräte-IDs zu erfassen, festzustellen, ob gerade ein Gespräch geführt wird, und die Rufnummer verbundener Anrufer zu lesen."</string> - <string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"Standby-Modus des Tablets deaktivieren"</string> - <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"Standby-Modus deaktivieren"</string> - <string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"Ermöglicht der App, den Standby-Modus des Tablets zu deaktivieren"</string> - <string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"Ermöglicht der App, den Standby-Modus des Telefons zu deaktivieren"</string> + <string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"Ruhezustand des Tablets deaktivieren"</string> + <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"Ruhezustand deaktivieren"</string> + <string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"Ermöglicht der App, den Ruhezustand des Tablets zu deaktivieren"</string> + <string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"Ermöglicht der App, den Ruhezustand des Telefons zu deaktivieren"</string> <string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"Tablet ein- oder ausschalten"</string> <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"Gerät ein- oder ausschalten"</string> <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Ermöglicht der App, das Tablet ein- oder auszuschalten"</string> diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml index b400b97e3c70..e096e311eebb 100644 --- a/core/res/res/values-et/strings.xml +++ b/core/res/res/values-et/strings.xml @@ -1108,7 +1108,7 @@ <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Saada"</string> <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Tühista"</string> <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Jäta minu valik meelde"</string> - <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"Saate muuta jaotises Seaded > Rakend."</string> + <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"Saate muuta jaotises Seaded > Rakendused"</string> <string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"Luba alati"</string> <string name="sms_short_code_confirm_never_allow" msgid="446992765774269673">"Ära luba"</string> <string name="sim_removed_title" msgid="6227712319223226185">"SIM-kaart eemaldatud"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index 70c82372a805..d2d2b5e703f7 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -737,7 +737,7 @@ <string name="relationTypeSister" msgid="1735983554479076481">"Sœur"</string> <string name="relationTypeSpouse" msgid="394136939428698117">"Conjoint"</string> <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Personnalisée"</string> - <string name="sipAddressTypeHome" msgid="6093598181069359295">"Accueil"</string> + <string name="sipAddressTypeHome" msgid="6093598181069359295">"Domicile"</string> <string name="sipAddressTypeWork" msgid="6920725730797099047">"Professionnelle"</string> <string name="sipAddressTypeOther" msgid="4408436162950119849">"Autre"</string> <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Saisissez le code PIN."</string> @@ -1397,7 +1397,7 @@ <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Déblocage de la carte SIM en cours…"</string> <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"Le code PIN est erroné."</string> <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Veuillez saisir un code PIN comprenant entre quatre et huit chiffres."</string> - <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Le code PUK doit contenir au moins 8 chiffres"</string> + <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Le code PUK doit contenir au moins 8 chiffres."</string> <string name="kg_invalid_puk" msgid="3638289409676051243">"Veuillez saisir de nouveau le code PUK correct. Des tentatives répétées désactivent définitivement la carte SIM."</string> <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Les codes PIN ne correspondent pas."</string> <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Trop de tentatives."</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index bba6be2927e4..505e5120d67b 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -1108,7 +1108,7 @@ <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"전송"</string> <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"취소"</string> <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"내 선택사항 기억"</string> - <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"나중에 설정 > 앱에서 변경할 수 있습니다."</string> + <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"나중에 설정 > 애플리케이션에서 변경할 수 있습니다."</string> <string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"항상 허용"</string> <string name="sms_short_code_confirm_never_allow" msgid="446992765774269673">"허용 안함"</string> <string name="sim_removed_title" msgid="6227712319223226185">"SIM 카드 제거됨"</string> diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml index 3609021b9232..83499b8dabc5 100644 --- a/core/res/res/values-lt/strings.xml +++ b/core/res/res/values-lt/strings.xml @@ -1398,7 +1398,7 @@ <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"Netinkamas PIN kodas."</string> <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Įveskite PIN kodą, sudarytą iš 4–8 skaičių."</string> <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kodas turėtų būti mažiausiai 8 skaitmenų."</string> - <string name="kg_invalid_puk" msgid="3638289409676051243">"Pakartotinai įveskite tinkamą PUK kodą. Pakartotinai bandant bus visam laikui neleidžiama SIM."</string> + <string name="kg_invalid_puk" msgid="3638289409676051243">"Pakartotinai įveskite tinkamą PUK kodą. Pakartotinai bandant SIM bus neleidžiama visam laikui."</string> <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodai neatitinka"</string> <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Per daug atrakinimo piešinių bandymų"</string> <string name="kg_login_instructions" msgid="1100551261265506448">"Jei norite atrakinti, prisijunkite naudodami „Google“ paskyrą."</string> diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml index 103aded02f9b..86477c0778c2 100644 --- a/core/res/res/values-ms/strings.xml +++ b/core/res/res/values-ms/strings.xml @@ -1103,8 +1103,8 @@ <string name="sms_control_yes" msgid="3663725993855816807">"Benarkan"</string> <string name="sms_control_no" msgid="625438561395534982">"Nafikan"</string> <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ingin menghantar mesej kepada <b><xliff:g id="DEST_ADDRESS">%2$s</xliff:g></b>."</string> - <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"ini boleh menyebabkan caj dikenakan"</font>" kepada akaun mudah alih anda."</string> - <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ini akan menyebabkan caj dikenakan kepada akaun mudah alih anda."</font></string> + <string name="sms_short_code_details" msgid="3492025719868078457">"Ini akan menyebabkan akaun mudah alih anda "<font fgcolor="#ffffb060">"dikenakan caj"</font>"."</string> + <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ini akan menyebabkan akaun mudah alih anda dikenakan caj."</font></string> <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Hantar"</string> <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Batal"</string> <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Ingat pilihan saya"</string> @@ -1391,7 +1391,7 @@ <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Masukkan PIN SIM"</string> <string name="kg_pin_instructions" msgid="2377242233495111557">"Masukkan PIN"</string> <string name="kg_password_instructions" msgid="5753646556186936819">"Masukkan Kata Laluan"</string> - <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM kini dilumpuhkan. Masukkan kod PUK untuk meneruskan. Hubungi pembawa untuk butiran."</string> + <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Kini SIM dilumpuhkan. Masukkan kod PUK untuk meneruskan. Hubungi pembawa untuk butiran."</string> <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Masukkan kod PIN yang diingini"</string> <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Sahkan kod PIN yang diingini"</string> <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Membuka kunci kad SIM..."</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index f7804437c460..e579f19c1945 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -737,7 +737,7 @@ <string name="relationTypeSister" msgid="1735983554479076481">"Søster"</string> <string name="relationTypeSpouse" msgid="394136939428698117">"Ektefelle"</string> <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Egendefinert"</string> - <string name="sipAddressTypeHome" msgid="6093598181069359295">"Startside"</string> + <string name="sipAddressTypeHome" msgid="6093598181069359295">"Hjem"</string> <string name="sipAddressTypeWork" msgid="6920725730797099047">"Arbeid"</string> <string name="sipAddressTypeOther" msgid="4408436162950119849">"Annen"</string> <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Skriv inn PIN-kode"</string> @@ -1421,5 +1421,5 @@ <string name="continue_to_enable_accessibility" msgid="2184747411804432885">"Fortsett å holde nede to fingre for å aktivere tilgjengelighetstjenesten."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Tilgjengelighet er aktivert."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Tilgjengelighetstjenesten ble avbrutt."</string> - <string name="user_switched" msgid="3768006783166984410">"Gjeldene bruker: <xliff:g id="NAME">%1$s</xliff:g>."</string> + <string name="user_switched" msgid="3768006783166984410">"Gjeldende bruker: <xliff:g id="NAME">%1$s</xliff:g>."</string> </resources> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 5f040d188960..21ebe170f71c 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -737,7 +737,7 @@ <string name="relationTypeSister" msgid="1735983554479076481">"Irmã"</string> <string name="relationTypeSpouse" msgid="394136939428698117">"Cônjuge"</string> <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Personalizado"</string> - <string name="sipAddressTypeHome" msgid="6093598181069359295">"Página Inicial"</string> + <string name="sipAddressTypeHome" msgid="6093598181069359295">"Casa"</string> <string name="sipAddressTypeWork" msgid="6920725730797099047">"Emprego"</string> <string name="sipAddressTypeOther" msgid="4408436162950119849">"Outro"</string> <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Escreva o código PIN"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 9b853c340a09..c547ba56fd9c 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1398,7 +1398,7 @@ <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"Неверный PIN-код."</string> <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Введите PIN-код (от 4 до 8 цифр)."</string> <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-код должен содержать не менее 8 символов."</string> - <string name="kg_invalid_puk" msgid="3638289409676051243">"Введите правильный PUK-код. После нескольких неудачных попыток SIM-карта будет заблокирована навсегда."</string> + <string name="kg_invalid_puk" msgid="3638289409676051243">"Введите правильный PUK-код. После нескольких неудачных попыток SIM-карта будет заблокирована."</string> <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-коды не совпадают"</string> <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Слишком много попыток ввода графического ключа"</string> <string name="kg_login_instructions" msgid="1100551261265506448">"Чтобы разблокировать устройство, войдите в свой аккаунт Google."</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index d53c5e1766bc..cfa9ebe966b0 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -1108,7 +1108,7 @@ <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Odoslať"</string> <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Zrušiť"</string> <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Zapamätať si voľbu"</string> - <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"Neskôr to môžete zmeniť v sekcii Nastavenia > Aplikácie"</string> + <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"Zmena v časti Nastavenia > Aplikácie"</string> <string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"Vždy povoliť"</string> <string name="sms_short_code_confirm_never_allow" msgid="446992765774269673">"Nikdy nepovoliť"</string> <string name="sim_removed_title" msgid="6227712319223226185">"Karta SIM bola odobraná"</string> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index 8409cae52a67..39d54a6d9a36 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -810,10 +810,10 @@ <string name="lockscreen_access_pattern_cleared" msgid="5583479721001639579">"Ruwaza imefutwa"</string> <string name="lockscreen_access_pattern_cell_added" msgid="6756031208359292487">"Kiini kimeongezwa"</string> <string name="lockscreen_access_pattern_detected" msgid="4988730895554057058">"Ruwaza imekamilika"</string> - <string name="keyguard_accessibility_widget_changed" msgid="5678624624681400191">"%1$s. Wijeti %2$d ya %3$d."</string> + <string name="keyguard_accessibility_widget_changed" msgid="5678624624681400191">"%1$s. Wiji %2$d ya %3$d."</string> <string name="keyguard_accessibility_user_selector" msgid="1226798370913698896">"Kiteuzi cha mtumiaji"</string> <string name="keyguard_accessibility_status" msgid="8008264603935930611">"Hali"</string> - <string name="keygaurd_accessibility_media_controls" msgid="262209654292161806">"Vidhibiti vya midia"</string> + <string name="keygaurd_accessibility_media_controls" msgid="262209654292161806">"Vidhibiti vya media"</string> <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string> <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string> <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string> @@ -1392,13 +1392,13 @@ <string name="kg_pin_instructions" msgid="2377242233495111557">"Ingiza PIN"</string> <string name="kg_password_instructions" msgid="5753646556186936819">"Ingiza Nenosiri"</string> <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM sasa imelemazwa. Ingiza msimbo wa PUK ili kuendelea. Wasiliana na mtoa huduma kwa maelezo."</string> - <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ingiza msimbo wa PIN uliopendelewa"</string> - <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Thibitisha msimbo wa PIN uliopendelewa"</string> + <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ingiza msimbo wa PIN unaopendelewa"</string> + <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Thibitisha msimbo wa PIN unaopendelewa"</string> <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Inafungua kadi ya SIM..."</string> <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"Msimbo wa PIN usio sahihi."</string> <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Charaza PIN iliyo na tarakimu kati ya 4 na 8."</string> <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Msimbo wa PUK unafaa kuwa na nambari 8 au zaidi."</string> - <string name="kg_invalid_puk" msgid="3638289409676051243">"Ingiza upya msimbo sahihi wa PUK. Majaribio yaliyorudiwa yatalemaza kabisa SIM."</string> + <string name="kg_invalid_puk" msgid="3638289409676051243">"Ingiza upya msimbo sahihi wa PUK. Majaribio yanayorudiwa yatalemaza SIM kabisa."</string> <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Misimbo ya PIN haifanani"</string> <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Majaribio mengi mno ya mchoro"</string> <string name="kg_login_instructions" msgid="1100551261265506448">"Ili kufungua, ingia kwa Akaunti yako ya Google."</string> @@ -1418,7 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Umekosea katika kuweka mchoro wako wa kufungua mara <xliff:g id="NUMBER_0">%d</xliff:g>. Baada ya majaribio <xliff:g id="NUMBER_1">%d</xliff:g> bila kufaulu, utaombwa kufungua kompyuta yako ndogo kwa kutumia akaunti yako ya barua pepe."\n\n" Jaribu tena baada ya sekunde <xliff:g id="NUMBER_2">%d</xliff:g>."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Umekosea kuchora mchoro wako wa kufungua mara <xliff:g id="NUMBER_0">%d</xliff:g>. Baada ya majaribio <xliff:g id="NUMBER_1">%d</xliff:g> yasiyofaulu, utaombwa kufungua simu yako kwa kutumia akaunti ya barua pepe."\n\n" Jaribu tena baada ya sekunde <xliff:g id="NUMBER_2">%d</xliff:g>."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Ongeza sauti zaidi ya kiwango salama? "\n"Kusikiliza kwa sauti ya juu kwa muda mrefu kunaweza kuharibu uwezo wako wa kusikia."</string> - <string name="continue_to_enable_accessibility" msgid="2184747411804432885">"Endelea kushikilia chini vidole vyako viwili ili kuwezesha ufikivu."</string> + <string name="continue_to_enable_accessibility" msgid="2184747411804432885">"Endelea kufinyilia kwa vidole vyako viwili ili kuwezesha ufikivu."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Ufikivu umewezeshwa."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Ufikivu umeghairiwa."</string> <string name="user_switched" msgid="3768006783166984410">"Mtumiaji wa sasa <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index 4f35a57b4331..62672ae7062e 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1103,8 +1103,8 @@ <string name="sms_control_yes" msgid="3663725993855816807">"İzin ver"</string> <string name="sms_control_no" msgid="625438561395534982">"Reddet"</string> <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>, <b><xliff:g id="DEST_ADDRESS">%2$s</xliff:g></b> adresine bir mesaj göndermek istiyor."</string> - <string name="sms_short_code_details" msgid="3492025719868078457">"Bu işlem, mobil hesabınızdan "<font fgcolor="#ffffb060">"ödeme alınmasına neden olabilir"</font>"."</string> - <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Bu işlem, mobil hesabınızdan ödeme alınmasına neden olacaktır."</font></string> + <string name="sms_short_code_details" msgid="3492025719868078457">"Bu işlem, mobil hesabınızdan "<font fgcolor="#ffffb060">"ücret alınmasına neden olabilir"</font>"."</string> + <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Bu işlem, mobil hesabınızdan ücret alınmasına neden olacaktır."</font></string> <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Gönder"</string> <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"İptal"</string> <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Seçimimi hatırla"</string> @@ -1398,7 +1398,7 @@ <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"Yanlış PIN kodu."</string> <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4-8 rakamdan oluşan bir PIN girin."</string> <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kodu 8 veya daha çok basamaklı bir sayı olmalıdır."</string> - <string name="kg_invalid_puk" msgid="3638289409676051243">"PUK kodunu tekrar girin. Çok sayıda deneme yapılırsa SIM kart kalıcı olarak devre dışı bırakılır."</string> + <string name="kg_invalid_puk" msgid="3638289409676051243">"Doğru PUK kodunu tekrar girin. Çok sayıda deneme yapılırsa SIM kart kalıcı olarak devre dışı bırakılır."</string> <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodları eşleşmiyor"</string> <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Çok fazla sayıda desen denemesi yapıldı"</string> <string name="kg_login_instructions" msgid="1100551261265506448">"Kilidi açmak için Google hesabınızla oturum açın."</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 7f8ade292817..97686298ca3c 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -810,7 +810,7 @@ <string name="lockscreen_access_pattern_cleared" msgid="5583479721001639579">"图案已清除"</string> <string name="lockscreen_access_pattern_cell_added" msgid="6756031208359292487">"已添加单元格"</string> <string name="lockscreen_access_pattern_detected" msgid="4988730895554057058">"图案绘制完成"</string> - <string name="keyguard_accessibility_widget_changed" msgid="5678624624681400191">"%1$s。%3$d的窗口小部件%2$d。"</string> + <string name="keyguard_accessibility_widget_changed" msgid="5678624624681400191">"%1$s。%3$d的小部件%2$d。"</string> <string name="keyguard_accessibility_user_selector" msgid="1226798370913698896">"用户选择器"</string> <string name="keyguard_accessibility_status" msgid="8008264603935930611">"状态"</string> <string name="keygaurd_accessibility_media_controls" msgid="262209654292161806">"媒体控制"</string> @@ -1103,12 +1103,12 @@ <string name="sms_control_yes" msgid="3663725993855816807">"允许"</string> <string name="sms_control_no" msgid="625438561395534982">"拒绝"</string> <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>想要向 <b><xliff:g id="DEST_ADDRESS">%2$s</xliff:g></b> 发送一条短信。"</string> - <string name="sms_short_code_details" msgid="3492025719868078457">"这可能会"<font fgcolor="#ffffb060">"导致您的移动帐户支付费用"</font>"。"</string> - <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"这会导致您的移动帐户支付费用。"</font></string> + <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"这可能会导致您的手机号产生费用。"</font></string> + <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"这会导致您的手机号产生费用。"</font></string> <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"发送"</string> <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"取消"</string> <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"记住我的选择"</string> - <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"以后,您可以在“设置”>“应用”中更改此内容"</string> + <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"之后,您可以在“设置”>“应用”中更改此设置"</string> <string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"始终允许"</string> <string name="sms_short_code_confirm_never_allow" msgid="446992765774269673">"永不允许"</string> <string name="sim_removed_title" msgid="6227712319223226185">"已移除 SIM 卡"</string> @@ -1375,7 +1375,7 @@ <string name="media_route_button_content_description" msgid="5758553567065145276">"媒体输出线路"</string> <string name="media_route_status_scanning" msgid="7279908761758293783">"正在扫描..."</string> <string name="media_route_status_connecting" msgid="6422571716007825440">"正在连接..."</string> - <string name="media_route_status_available" msgid="6983258067194649391">"可以连接"</string> + <string name="media_route_status_available" msgid="6983258067194649391">"可连接"</string> <string name="media_route_status_not_available" msgid="6739899962681886401">"无法连接"</string> <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"内置屏幕"</string> <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI 屏幕"</string> @@ -1391,7 +1391,7 @@ <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"输入 SIM PIN"</string> <string name="kg_pin_instructions" msgid="2377242233495111557">"输入 PIN"</string> <string name="kg_password_instructions" msgid="5753646556186936819">"输入密码"</string> - <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM 卡现已停用,需要输入 PUK 码才能继续使用。有关详情,请联系您的运营商。"</string> + <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM 卡已被停用,需要输入 PUK 码才能继续使用。有关详情,请联系您的运营商。"</string> <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"请输入所需 PIN 码"</string> <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"请确认所需 PIN 码"</string> <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"正在解锁 SIM 卡..."</string> diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index b1a2a2acb303..c2aa3a5ecb00 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -3739,8 +3739,7 @@ public final class ActivityManagerService extends ActivityManagerNative private void forceStopUserLocked(int userId) { forceStopPackageLocked(null, -1, false, false, true, false, userId); Intent intent = new Intent(Intent.ACTION_USER_STOPPED); - intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY - | Intent.FLAG_RECEIVER_FOREGROUND); + intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); intent.putExtra(Intent.EXTRA_USER_HANDLE, userId); broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null, @@ -14128,6 +14127,19 @@ public final class ActivityManagerService extends ActivityManagerNative final UserStartedState uss = mStartedUsers.get(userId); + // Make sure user is in the started state. If it is currently + // stopping, we need to knock that off. + if (uss.mState == UserStartedState.STATE_STOPPING) { + // If we are stopping, we haven't sent ACTION_SHUTDOWN, + // so we can just fairly silently bring the user back from + // the almost-dead. + uss.mState = UserStartedState.STATE_RUNNING; + } else if (uss.mState == UserStartedState.STATE_SHUTDOWN) { + // This means ACTION_SHUTDOWN has been sent, so we will + // need to treat this as a new boot of the user. + uss.mState = UserStartedState.STATE_BOOTING; + } + mHandler.removeMessages(REPORT_USER_SWITCH_MSG); mHandler.removeMessages(USER_SWITCH_TIMEOUT_MSG); mHandler.sendMessage(mHandler.obtainMessage(REPORT_USER_SWITCH_MSG, @@ -14205,6 +14217,19 @@ public final class ActivityManagerService extends ActivityManagerNative null, null, 0, null, null, android.Manifest.permission.MANAGE_USERS, false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL); + intent = new Intent(Intent.ACTION_USER_STARTING); + intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); + intent.putExtra(Intent.EXTRA_USER_HANDLE, newUserId); + broadcastIntentLocked(null, null, intent, + null, new IIntentReceiver.Stub() { + @Override + public void performReceive(Intent intent, int resultCode, String data, + Bundle extras, boolean ordered, boolean sticky, int sendingUser) + throws RemoteException { + } + }, 0, null, null, + android.Manifest.permission.INTERACT_ACROSS_USERS, + false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL); } } finally { Binder.restoreCallingIdentity(ident); @@ -14293,7 +14318,8 @@ public final class ActivityManagerService extends ActivityManagerNative void finishUserSwitch(UserStartedState uss) { synchronized (this) { - if (uss.mState == UserStartedState.STATE_BOOTING + if ((uss.mState == UserStartedState.STATE_BOOTING + || uss.mState == UserStartedState.STATE_SHUTDOWN) && mStartedUsers.get(uss.mHandle.getIdentifier()) == uss) { uss.mState = UserStartedState.STATE_RUNNING; final int userId = uss.mHandle.getIdentifier(); @@ -14315,7 +14341,8 @@ public final class ActivityManagerService extends ActivityManagerNative num--; continue; } - if (oldUss.mState == UserStartedState.STATE_STOPPING) { + if (oldUss.mState == UserStartedState.STATE_STOPPING + || oldUss.mState == UserStartedState.STATE_SHUTDOWN) { // This user is already stopping, doesn't count. num--; i++; @@ -14380,23 +14407,50 @@ public final class ActivityManagerService extends ActivityManagerNative uss.mStopCallbacks.add(callback); } - if (uss.mState != UserStartedState.STATE_STOPPING) { + if (uss.mState != UserStartedState.STATE_STOPPING + && uss.mState != UserStartedState.STATE_SHUTDOWN) { uss.mState = UserStartedState.STATE_STOPPING; long ident = Binder.clearCallingIdentity(); try { - // Inform of user switch - Intent intent = new Intent(Intent.ACTION_SHUTDOWN); - final IIntentReceiver resultReceiver = new IIntentReceiver.Stub() { + // We are going to broadcast ACTION_USER_STOPPING and then + // once that is down send a final ACTION_SHUTDOWN and then + // stop the user. + final Intent stoppingIntent = new Intent(Intent.ACTION_USER_STOPPING); + stoppingIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); + stoppingIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); + final Intent shutdownIntent = new Intent(Intent.ACTION_SHUTDOWN); + // This is the result receiver for the final shutdown broadcast. + final IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() { @Override public void performReceive(Intent intent, int resultCode, String data, Bundle extras, boolean ordered, boolean sticky, int sendingUser) { finishUserStop(uss); } }; - broadcastIntentLocked(null, null, intent, - null, resultReceiver, 0, null, null, null, - true, false, MY_PID, Process.SYSTEM_UID, userId); + // This is the result receiver for the initial stopping broadcast. + final IIntentReceiver stoppingReceiver = new IIntentReceiver.Stub() { + @Override + public void performReceive(Intent intent, int resultCode, String data, + Bundle extras, boolean ordered, boolean sticky, int sendingUser) { + // On to the next. + synchronized (ActivityManagerService.this) { + if (uss.mState != UserStartedState.STATE_STOPPING) { + // Whoops, we are being started back up. Abort, abort! + return; + } + uss.mState = UserStartedState.STATE_SHUTDOWN; + } + broadcastIntentLocked(null, null, shutdownIntent, + null, shutdownReceiver, 0, null, null, null, + true, false, MY_PID, Process.SYSTEM_UID, userId); + } + }; + // Kick things off. + broadcastIntentLocked(null, null, stoppingIntent, + null, stoppingReceiver, 0, null, null, + android.Manifest.permission.INTERACT_ACROSS_USERS, + true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL); } finally { Binder.restoreCallingIdentity(ident); } @@ -14411,8 +14465,9 @@ public final class ActivityManagerService extends ActivityManagerNative ArrayList<IStopUserCallback> callbacks; synchronized (this) { callbacks = new ArrayList<IStopUserCallback>(uss.mStopCallbacks); - if (uss.mState != UserStartedState.STATE_STOPPING - || mStartedUsers.get(userId) != uss) { + if (mStartedUsers.get(userId) != uss) { + stopped = false; + } else if (uss.mState != UserStartedState.STATE_SHUTDOWN) { stopped = false; } else { stopped = true; @@ -14476,7 +14531,8 @@ public final class ActivityManagerService extends ActivityManagerNative boolean isUserRunningLocked(int userId) { UserStartedState state = mStartedUsers.get(userId); - return state != null && state.mState != UserStartedState.STATE_STOPPING; + return state != null && state.mState != UserStartedState.STATE_STOPPING + && state.mState != UserStartedState.STATE_SHUTDOWN; } @Override diff --git a/services/java/com/android/server/am/UserStartedState.java b/services/java/com/android/server/am/UserStartedState.java index 50c8553b818b..0e71f81bb43a 100644 --- a/services/java/com/android/server/am/UserStartedState.java +++ b/services/java/com/android/server/am/UserStartedState.java @@ -23,9 +23,14 @@ import android.app.IStopUserCallback; import android.os.UserHandle; public class UserStartedState { + // User is first coming up. public final static int STATE_BOOTING = 0; + // User is in the normal running state. public final static int STATE_RUNNING = 1; + // User is in the initial process of being stopped. public final static int STATE_STOPPING = 2; + // User is in the final phase of stopping, sending Intent.ACTION_SHUTDOWN. + public final static int STATE_SHUTDOWN = 3; public final UserHandle mHandle; public final ArrayList<IStopUserCallback> mStopCallbacks @@ -40,7 +45,14 @@ public class UserStartedState { } void dump(String prefix, PrintWriter pw) { - pw.print(prefix); pw.print("mState="); pw.print(mState); + pw.print(prefix); pw.print("mState="); + switch (mState) { + case STATE_BOOTING: pw.print("BOOTING"); break; + case STATE_RUNNING: pw.print("RUNNING"); break; + case STATE_STOPPING: pw.print("STOPPING"); break; + case STATE_SHUTDOWN: pw.print("SHUTDOWN"); break; + default: pw.print(mState); break; + } if (switching) pw.print(" SWITCHING"); if (initializing) pw.print(" INITIALIZING"); pw.println(); diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 4df1d71fbaee..0db9f197506c 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -1210,12 +1210,9 @@ public class WindowManagerService extends IWindowManager.Stub final WindowState curTarget = mInputMethodTarget; if (curTarget != null && w != null && curTarget.isDisplayedLw() - && curTarget.mExiting) { - if (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer) { - w = curTarget; - i = windows.indexOf(w); - if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, switching to: " + w); - } + && (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer)) { + if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, not changing"); + return windows.indexOf(curTarget) + 1; } if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Desired input method target=" @@ -4184,6 +4181,7 @@ public class WindowManagerService extends IWindowManager.Stub } } + @Override public void setAppStartingWindow(IBinder token, String pkg, int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index dee66a65cdb7..23892f6782f2 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -788,18 +788,21 @@ final class WindowState implements WindowManagerPolicy.WindowState { * Like isOnScreen, but returns false if the surface hasn't yet * been drawn. */ + @Override public boolean isDisplayedLw() { final AppWindowToken atoken = mAppToken; return isDrawnLw() && mPolicyVisibility && ((!mAttachedHidden && (atoken == null || !atoken.hiddenRequested)) - || mWinAnimator.mAnimating); + || mWinAnimator.mAnimating + || (atoken != null && atoken.mAppAnimator.animation != null)); } /** * Return true if this window (or a window it is attached to, but not * considering its app token) is currently animating. */ + @Override public boolean isAnimatingLw() { return mWinAnimator.mAnimation != null; } |