diff options
186 files changed, 1146 insertions, 551 deletions
@@ -28617,7 +28617,6 @@ package android.widget { method public void setHeight(int); method public void setHorizontalOffset(int); method public void setInputMethodMode(int); - method public void setLayoutDirection(int); method public void setListSelector(android.graphics.drawable.Drawable); method public void setModal(boolean); method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener); diff --git a/api/current.txt b/api/current.txt index ee9a973..d7f4e11 100644 --- a/api/current.txt +++ b/api/current.txt @@ -8263,6 +8263,7 @@ package android.graphics { method public int getScaledWidth(int); method public final int getWidth(); method public final boolean hasAlpha(); + method public final boolean hasMipMap(); method public final boolean isMutable(); method public final boolean isPremultiplied(); method public final boolean isRecycled(); @@ -8271,6 +8272,7 @@ package android.graphics { method public boolean sameAs(android.graphics.Bitmap); method public void setDensity(int); method public void setHasAlpha(boolean); + method public final void setHasMipMap(boolean); method public void setPixel(int, int, int); method public void setPixels(int[], int, int, int, int, int, int); method public void writeToParcel(android.os.Parcel, int); @@ -28617,7 +28619,6 @@ package android.widget { method public void setHeight(int); method public void setHorizontalOffset(int); method public void setInputMethodMode(int); - method public void setLayoutDirection(int); method public void setListSelector(android.graphics.drawable.Drawable); method public void setModal(boolean); method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener); diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java index 5cde65c..03e0c0f 100644 --- a/core/java/android/accounts/AccountManagerService.java +++ b/core/java/android/accounts/AccountManagerService.java @@ -247,7 +247,6 @@ public class AccountManagerService } public void systemReady() { - initUser(UserHandle.USER_OWNER); } private UserManager getUserManager() { diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java index 58df167..bb0c686 100644 --- a/core/java/android/content/SyncManager.java +++ b/core/java/android/content/SyncManager.java @@ -55,6 +55,7 @@ import android.text.format.Time; import android.util.EventLog; import android.util.Log; import android.util.Pair; +import android.util.Slog; import com.android.internal.R; import com.android.internal.util.IndentingPrintWriter; @@ -311,13 +312,10 @@ public class SyncManager { if (userId == UserHandle.USER_NULL) return; if (Intent.ACTION_USER_REMOVED.equals(action)) { - Log.i(TAG, "User removed: u" + userId); onUserRemoved(userId); } else if (Intent.ACTION_USER_STARTING.equals(action)) { - Log.i(TAG, "User starting: u" + userId); onUserStarting(userId); } else if (Intent.ACTION_USER_STOPPING.equals(action)) { - Log.i(TAG, "User stopping: u" + userId); onUserStopping(userId); } } @@ -338,6 +336,10 @@ public class SyncManager { } } + /** + * Should only be created after {@link ContentService#systemReady()} so that + * {@link PackageManager} is ready to query. + */ public SyncManager(Context context, boolean factoryTest) { // Initialize the SyncStorageEngine first, before registering observers // and creating threads and so on; it may fail if the disk is full. @@ -441,9 +443,6 @@ public class SyncManager { UserHandle.ALL, new IntentFilter(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION), null, null); - - // do this synchronously to ensure we have the accounts before this call returns - onUserStarting(UserHandle.USER_OWNER); } // Pick a random second in a day to seed all periodic syncs diff --git a/core/java/android/content/SyncQueue.java b/core/java/android/content/SyncQueue.java index 14bfc5b..c9a325e 100644 --- a/core/java/android/content/SyncQueue.java +++ b/core/java/android/content/SyncQueue.java @@ -51,8 +51,6 @@ public class SyncQueue { public SyncQueue(SyncStorageEngine syncStorageEngine, final SyncAdaptersCache syncAdapters) { mSyncStorageEngine = syncStorageEngine; mSyncAdapters = syncAdapters; - - addPendingOperations(UserHandle.USER_OWNER); } public void addPendingOperations(int userId) { diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index a0283d3..32cc7fd 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -554,6 +554,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { manageSpaceActivityName = orig.manageSpaceActivityName; descriptionRes = orig.descriptionRes; uiOptions = orig.uiOptions; + backupAgentName = orig.backupAgentName; } diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java index 69e1de9..ce5f163 100644 --- a/core/java/android/os/AsyncTask.java +++ b/core/java/android/os/AsyncTask.java @@ -110,7 +110,7 @@ import java.util.concurrent.atomic.AtomicInteger; * <h2>The 4 steps</h2> * <p>When an asynchronous task is executed, the task goes through 4 steps:</p> * <ol> - * <li>{@link #onPreExecute()}, invoked on the UI thread immediately after the task + * <li>{@link #onPreExecute()}, invoked on the UI thread before the task * is executed. This step is normally used to setup the task, for instance by * showing a progress bar in the user interface.</li> * <li>{@link #doInBackground}, invoked on the background thread diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 9ce7df9..b95e1bd 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3383,7 +3383,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } if (child.isLayoutDirectionInherited()) { - child.resetResolvedLayoutDirection(); + child.resetRtlProperties(); child.resolveRtlPropertiesIfNeeded(); } diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 91df4b5..67452ec 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -887,11 +887,13 @@ public final class ViewRootImpl implements ViewParent, // Intersect with the bounds of the window to skip // updates that lie outside of the visible region final float appScale = mAttachInfo.mApplicationScale; - localDirty.intersect(0, 0, - (int) (mWidth * appScale + 0.5f), (int) (mHeight * appScale + 0.5f)); - - if (!mWillDrawSoon) { - scheduleTraversals(); + if (localDirty.intersect(0, 0, + (int) (mWidth * appScale + 0.5f), (int) (mHeight * appScale + 0.5f))) { + if (!mWillDrawSoon) { + scheduleTraversals(); + } + } else { + localDirty.setEmpty(); } return null; @@ -1184,6 +1186,7 @@ public final class ViewRootImpl implements ViewParent, viewVisibilityChanged = false; mLastConfiguration.setTo(host.getResources().getConfiguration()); mLastSystemUiVisibility = mAttachInfo.mSystemUiVisibility; + host.setLayoutDirection(mLastConfiguration.getLayoutDirection()); host.dispatchAttachedToWindow(attachInfo, 0); mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets); host.fitSystemWindows(mFitSystemWindowsInsets); @@ -2676,7 +2679,12 @@ public final class ViewRootImpl implements ViewParent, // the one in them which may be newer. config = mView.getResources().getConfiguration(); if (force || mLastConfiguration.diff(config) != 0) { + final int lastLayoutDirection = mLastConfiguration.getLayoutDirection(); + final int currentLayoutDirection = config.getLayoutDirection(); mLastConfiguration.setTo(config); + if (lastLayoutDirection != currentLayoutDirection) { + mView.setLayoutDirection(currentLayoutDirection); + } mView.dispatchConfigurationChanged(config); } } diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 75d1471..f0eb94f 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -1093,7 +1093,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED); mPopup.setListItemExpandMax(EXPAND_MAX); } - mPopup.setLayoutDirection(getLayoutDirection()); mPopup.show(); mPopup.getListView().setOverScrollMode(View.OVER_SCROLL_ALWAYS); } diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java index 1c81d11..3d6b69e 100644 --- a/core/java/android/widget/ListPopupWindow.java +++ b/core/java/android/widget/ListPopupWindow.java @@ -1021,8 +1021,6 @@ public class ListPopupWindow { mDropDownList.setOnItemSelectedListener(mItemSelectedListener); } - mDropDownList.setLayoutDirection(mLayoutDirection); - dropDownView = mDropDownList; View hintView = mPromptView; @@ -1132,21 +1130,6 @@ public class ListPopupWindow { } /** - * Set the layout direction for this popup. Should be a resolved direction as the - * popup as no capacity to do the resolution on his own. - * - * @param layoutDirection One of {@link View#LAYOUT_DIRECTION_LTR}, - * {@link View#LAYOUT_DIRECTION_RTL}, - * - */ - public void setLayoutDirection(int layoutDirection) { - mLayoutDirection = layoutDirection; - if (mDropDownList != null) { - mDropDownList.setLayoutDirection(mLayoutDirection); - } - } - - /** * <p>Wrapper class for a ListView. This wrapper can hijack the focus to * make sure the list uses the appropriate drawables and states when * displayed on screen within a drop down. The focus is never actually diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp index fd7a6a7..f485e03 100644 --- a/core/jni/android/graphics/Bitmap.cpp +++ b/core/jni/android/graphics/Bitmap.cpp @@ -7,7 +7,7 @@ #include "SkUnPreMultiply.h"
#include <binder/Parcel.h>
-#include "android_os_Parcel.h" +#include "android_os_Parcel.h"
#include "android_util_Binder.h"
#include "android_nio_utils.h"
#include "CreateJavaOutputStreamAdaptor.h"
@@ -353,6 +353,15 @@ static void Bitmap_setHasAlpha(JNIEnv* env, jobject, SkBitmap* bitmap, bitmap->setIsOpaque(!hasAlpha);
}
+static jboolean Bitmap_hasMipMap(JNIEnv* env, jobject, SkBitmap* bitmap) {
+ return bitmap->hasHardwareMipMap();
+}
+
+static void Bitmap_setHasMipMap(JNIEnv* env, jobject, SkBitmap* bitmap,
+ jboolean hasMipMap) {
+ bitmap->setHasHardwareMipMap(hasMipMap);
+}
+
///////////////////////////////////////////////////////////////////////////////
static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) {
@@ -666,6 +675,8 @@ static JNINativeMethod gBitmapMethods[] = { { "nativeConfig", "(I)I", (void*)Bitmap_config },
{ "nativeHasAlpha", "(I)Z", (void*)Bitmap_hasAlpha },
{ "nativeSetHasAlpha", "(IZ)V", (void*)Bitmap_setHasAlpha },
+ { "nativeHasMipMap", "(I)Z", (void*)Bitmap_hasMipMap },
+ { "nativeSetHasMipMap", "(IZ)V", (void*)Bitmap_setHasMipMap },
{ "nativeCreateFromParcel",
"(Landroid/os/Parcel;)Landroid/graphics/Bitmap;",
(void*)Bitmap_createFromParcel },
diff --git a/core/jni/android/graphics/YuvToJpegEncoder.cpp b/core/jni/android/graphics/YuvToJpegEncoder.cpp index 8333e00..f386905 100644 --- a/core/jni/android/graphics/YuvToJpegEncoder.cpp +++ b/core/jni/android/graphics/YuvToJpegEncoder.cpp @@ -90,8 +90,9 @@ void Yuv420SpToJpegEncoder::compress(jpeg_compress_struct* cinfo, // process 16 lines of Y and 8 lines of U/V each time. while (cinfo->next_scanline < cinfo->image_height) { //deitnerleave u and v - deinterleave(vuPlanar, uRows, vRows, cinfo->next_scanline, width); + deinterleave(vuPlanar, uRows, vRows, cinfo->next_scanline, width, height); + // Jpeg library ignores the rows whose indices are greater than height. for (int i = 0; i < 16; i++) { // y row y[i] = yPlanar + (cinfo->next_scanline + i) * fStrides[0]; @@ -112,8 +113,10 @@ void Yuv420SpToJpegEncoder::compress(jpeg_compress_struct* cinfo, } void Yuv420SpToJpegEncoder::deinterleave(uint8_t* vuPlanar, uint8_t* uRows, - uint8_t* vRows, int rowIndex, int width) { - for (int row = 0; row < 8; ++row) { + uint8_t* vRows, int rowIndex, int width, int height) { + int numRows = (height - rowIndex) / 2; + if (numRows > 8) numRows = 8; + for (int row = 0; row < numRows; ++row) { int offset = ((rowIndex >> 1) + row) * fStrides[1]; uint8_t* vu = vuPlanar + offset; for (int i = 0; i < (width >> 1); ++i) { @@ -164,6 +167,7 @@ void Yuv422IToJpegEncoder::compress(jpeg_compress_struct* cinfo, while (cinfo->next_scanline < cinfo->image_height) { deinterleave(yuvOffset, yRows, uRows, vRows, cinfo->next_scanline, width, height); + // Jpeg library ignores the rows whose indices are greater than height. for (int i = 0; i < 16; i++) { // y row y[i] = yRows + i * width; @@ -185,7 +189,9 @@ void Yuv422IToJpegEncoder::compress(jpeg_compress_struct* cinfo, void Yuv422IToJpegEncoder::deinterleave(uint8_t* yuv, uint8_t* yRows, uint8_t* uRows, uint8_t* vRows, int rowIndex, int width, int height) { - for (int row = 0; row < 16; ++row) { + int numRows = height - rowIndex; + if (numRows > 16) numRows = 16; + for (int row = 0; row < numRows; ++row) { uint8_t* yuvSeg = yuv + (rowIndex + row) * fStrides[0]; for (int i = 0; i < (width >> 1); ++i) { int indexY = row * width + (i << 1); diff --git a/core/jni/android/graphics/YuvToJpegEncoder.h b/core/jni/android/graphics/YuvToJpegEncoder.h index 97106ce..0d418ed 100644 --- a/core/jni/android/graphics/YuvToJpegEncoder.h +++ b/core/jni/android/graphics/YuvToJpegEncoder.h @@ -55,7 +55,7 @@ private: void deinterleaveYuv(uint8_t* yuv, int width, int height, uint8_t*& yPlanar, uint8_t*& uPlanar, uint8_t*& vPlanar); void deinterleave(uint8_t* vuPlanar, uint8_t* uRows, uint8_t* vRows, - int rowIndex, int width); + int rowIndex, int width, int height); void compress(jpeg_compress_struct* cinfo, uint8_t* yuv, int* offsets); }; diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index 1b71b43..5d306d2 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -829,7 +829,6 @@ static void android_view_GLES20Canvas_clearLayerTexture(JNIEnv* env, jobject cla static void android_view_GLES20Canvas_setTextureLayerTransform(JNIEnv* env, jobject clazz, Layer* layer, SkMatrix* matrix) { - layer->getTransform().load(*matrix); } diff --git a/core/res/res/layout-port/keyguard_host_view.xml b/core/res/res/layout-port/keyguard_host_view.xml index 20726d0..981fe6d 100644 --- a/core/res/res/layout-port/keyguard_host_view.xml +++ b/core/res/res/layout-port/keyguard_host_view.xml @@ -33,7 +33,8 @@ <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" - android:layout_height="0dp" + android:layout_width="match_parent" + android:layout_height="0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_weight="1" diff --git a/core/res/res/layout-port/keyguard_status_area.xml b/core/res/res/layout-port/keyguard_status_area.xml index e0a49dc..c1f6aab 100644 --- a/core/res/res/layout-port/keyguard_status_area.xml +++ b/core/res/res/layout-port/keyguard_status_area.xml @@ -45,6 +45,8 @@ <TextView android:id="@+id/alarm_status" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_marginEnd="@dimen/kg_status_line_font_right_margin" android:singleLine="true" android:ellipsize="marquee" @@ -93,4 +95,4 @@ android:textSize="@dimen/kg_status_line_font_size" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/core/res/res/layout-sw600dp-port/keyguard_status_area.xml b/core/res/res/layout-sw600dp-port/keyguard_status_area.xml index f21254a..405ac14 100644 --- a/core/res/res/layout-sw600dp-port/keyguard_status_area.xml +++ b/core/res/res/layout-sw600dp-port/keyguard_status_area.xml @@ -78,4 +78,4 @@ android:textAppearance="?android:attr/textAppearance" android:textSize="@dimen/kg_status_line_font_size" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/core/res/res/layout/default_navigation.xml b/core/res/res/layout/default_navigation.xml index b13103c..b216ded 100644 --- a/core/res/res/layout/default_navigation.xml +++ b/core/res/res/layout/default_navigation.xml @@ -18,6 +18,8 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyguard_click_area" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:gravity="center"> <!-- message area for security screen --> diff --git a/core/res/res/layout/keyguard_password_view.xml b/core/res/res/layout/keyguard_password_view.xml index ab8aa85..81916f7 100644 --- a/core/res/res/layout/keyguard_password_view.xml +++ b/core/res/res/layout/keyguard_password_view.xml @@ -53,6 +53,7 @@ since the backspace/IME switcher looks better inside --> <LinearLayout android:layout_gravity="center_vertical|fill_horizontal" + android:layout_height="wrap_content" android:layout_width="match_parent" android:orientation="horizontal" android:background="#70000000" diff --git a/core/res/res/layout/keyguard_sim_pin_view.xml b/core/res/res/layout/keyguard_sim_pin_view.xml index 163dc15..ae59d1d 100644 --- a/core/res/res/layout/keyguard_sim_pin_view.xml +++ b/core/res/res/layout/keyguard_sim_pin_view.xml @@ -91,6 +91,7 @@ <!-- Numeric keyboard --> <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" android:layout_width="match_parent" + android:layout_height="wrap_content" android:layout_marginStart="4dip" android:layout_marginEnd="4dip" android:paddingTop="4dip" diff --git a/core/res/res/layout/keyguard_sim_puk_view.xml b/core/res/res/layout/keyguard_sim_puk_view.xml index 6e45b0b..414806f 100644 --- a/core/res/res/layout/keyguard_sim_puk_view.xml +++ b/core/res/res/layout/keyguard_sim_puk_view.xml @@ -93,6 +93,7 @@ <!-- Numeric keyboard --> <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" android:layout_width="match_parent" + android:layout_height="wrap_content" android:layout_marginStart="4dip" android:layout_marginEnd="4dip" android:paddingTop="4dip" diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml index c93008d..3e8892b 100644 --- a/core/res/res/values-af/strings.xml +++ b/core/res/res/values-af/strings.xml @@ -1418,7 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Jy het jou ontsluitpatroon <xliff:g id="NUMBER_0">%d</xliff:g> keer verkeerdelik geteken. Na nog <xliff:g id="NUMBER_1">%d</xliff:g> onsuksesvolle pogings, sal jy gevra word om jou tablet te ontsluit deur middel van \'n e-posrekening."\n\n" Probeer weer oor <xliff:g id="NUMBER_2">%d</xliff:g> sekondes."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Jy het jou ontsluitpatroon <xliff:g id="NUMBER_0">%d</xliff:g> keer verkeerdelik geteken. Na nog <xliff:g id="NUMBER_1">%d</xliff:g> onsuksesvolle pogings, sal jy gevra word om jou foon te ontsluit deur middel van \'n e-posrekening."\n\n" Probeer weer oor <xliff:g id="NUMBER_2">%d</xliff:g> sekondes."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Moet volume bo veilige vlak verhoog word?"\n"Deur vir lang tydperke op hoë volume te luister, kan jou gehoor beskadig."</string> - <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Hou twee vingers in om toeganklikheid te aktiveer."</string> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Hou aan met twee vingers inhou om toeganklikheid te aktiveer."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Toeganklikheid geaktiveer."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Toeganklikheid gekanselleer."</string> <string name="user_switched" msgid="3768006783166984410">"Huidige gebruiker <xliff:g id="NAME">%1$s</xliff:g> ."</string> diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml index dfa8834..61ec74d 100644 --- a/core/res/res/values-ar/strings.xml +++ b/core/res/res/values-ar/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%d</xliff:g> من المحاولات غير الناجحة الأخرى، ستطالَب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات حساب بريد إلكتروني."\n\n" أعد المحاولة خلال <xliff:g id="NUMBER_2">%d</xliff:g> ثانية."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف."\n\n" أعد المحاولة خلال <xliff:g id="NUMBER_2">%d</xliff:g> ثانية."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"هل تريد رفع مستوى الصوت فوق المستوى الآمن؟"\n"قد يضر سماع صوت عالٍ لفترات طويلة بسمعك."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"اضغط بإصبعين لأسفل مع الاستمرار لتمكين تسهيل الدخول."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"تم تمكين إمكانية الدخول."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"تم إلغاء تسهيل الدخول."</string> <string name="user_switched" msgid="3768006783166984410">"المستخدم الحالي <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml index 4403f97..dd16a34 100644 --- a/core/res/res/values-be/strings.xml +++ b/core/res/res/values-be/strings.xml @@ -1419,8 +1419,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Вы няправільна ўвялі графічны ключ разблакiроўкi пэўную колькасць разоў: <xliff:g id="NUMBER_0">%d</xliff:g>. Пасля яшчэ некалькiх няўдалых спроб (<xliff:g id="NUMBER_1">%d</xliff:g>) вам будзе прапанавана разблакiраваць тэлефон, увайшоўшы ў Google."\n\n" Паўтарыце спробу праз <xliff:g id="NUMBER_2">%d</xliff:g> с."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Вы няправільна ўвялі графічны ключ разблакiроўкi пэўную колькасць разоў: <xliff:g id="NUMBER_0">%d</xliff:g>. Пасля яшчэ некалькiх няўдалых спроб (<xliff:g id="NUMBER_1">%d</xliff:g>) вам будзе прапанавана разблакiраваць тэлефон, увайшоўшы ў Google."\n\n" Паўтарыце спробу праз <xliff:g id="NUMBER_2">%d</xliff:g> с."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Павялiчыць гук больш за рэкамендаваны ўзровень?"\n"Доўгае слуханне музыкi на вялiкай гучнасцi можа пашкодзiць ваш слых."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Утрымлiвайце два пальцы, каб уключыць доступ."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Даступнасць уключана."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Даступнасць адменена."</string> <string name="user_switched" msgid="3768006783166984410">"Бягучы карыстальнік <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index b46e30a..ad806db 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Начертахте неправилно фигурата си за отключване <xliff:g id="NUMBER_0">%d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%d</xliff:g> неуспешни опита ще бъдете помолени да отключите таблета посредством имейл адрес."\n\n" Опитайте отново след <xliff:g id="NUMBER_2">%d</xliff:g> секунди."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Начертахте неправилно фигурата си за отключване <xliff:g id="NUMBER_0">%d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%d</xliff:g> неуспешни опита ще бъдете помолени да отключите телефона посредством имейл адрес."\n\n" Опитайте отново след <xliff:g id="NUMBER_2">%d</xliff:g> секунди."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Да се увеличи ли силата на звука над безопасното ниво?"\n"Продължителното слушане при висока сила на звука може да увреди слуха ви."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Продължете да натискате с два пръста, за да активирате функцията за достъпност."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Достъпността е активирана."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Функцията за достъпност е анулирана."</string> <string name="user_switched" msgid="3768006783166984410">"Текущ потребител <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 7381366..5d43397 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Již <xliff:g id="NUMBER_0">%d</xliff:g>krát jste nesprávně nakreslili své heslo odemknutí. Po <xliff:g id="NUMBER_1">%d</xliff:g>dalších neúspěšných pokusech budete požádáni o odemčení tabletu pomocí e-mailového účtu."\n\n" Zkuste to znovu za <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Již <xliff:g id="NUMBER_0">%d</xliff:g>krát jste nesprávně nakreslili své heslo odemknutí. Po <xliff:g id="NUMBER_1">%d</xliff:g> dalších neúspěšných pokusech budete požádáni o odemčení telefonu pomocí e-mailového účtu."\n\n" Zkuste to znovu za <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Chcete hlasitost zvýšit nad bezpečnou úroveň?"\n"Dlouhodobý poslech hlasitého zvuku může poškodit sluch."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Usnadnění zapnete dlouhým stisknutím dvěma prsty."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Usnadnění přístupu je aktivováno."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Usnadnění zrušeno."</string> <string name="user_switched" msgid="3768006783166984410">"Aktuální uživatel je <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index c938ca5..d66665b 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Sie haben Ihr Entsperrungsmuster <xliff:g id="NUMBER_0">%d</xliff:g>-mal falsch gezeichnet. Nach <xliff:g id="NUMBER_1">%d</xliff:g> weiteren erfolglosen Versuchen werden Sie aufgefordert, Ihr Tablet mithilfe eines E-Mail-Kontos zu entsperren."\n\n" Versuchen Sie es in <xliff:g id="NUMBER_2">%d</xliff:g> Sekunden erneut."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Sie haben Ihr Entsperrungsmuster <xliff:g id="NUMBER_0">%d</xliff:g>-mal falsch gezeichnet. Nach <xliff:g id="NUMBER_1">%d</xliff:g> weiteren erfolglosen Versuchen werden Sie aufgefordert, Ihr Telefon mithilfe eines E-Mail-Kontos zu entsperren."\n\n" Versuchen Sie es in <xliff:g id="NUMBER_2">%d</xliff:g> Sekunden erneut."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Lautstärke höher als Schwellenwert stellen?"\n"Wenn Sie über längere Zeiträume hinweg Musik in hoher Lautstärke hören, kann dies Ihr Gehör schädigen."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Drücken Sie mit zwei Fingern, um die Bedienungshilfen zu aktivieren."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Bedienungshilfen aktiviert"</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Bedienungshilfen abgebrochen"</string> <string name="user_switched" msgid="3768006783166984410">"Aktueller Nutzer <xliff:g id="NAME">%1$s</xliff:g>"</string> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index d0a1cd9..ef6962f 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Dibujaste incorrectamente tu patrón de desbloqueo <xliff:g id="NUMBER_0">%d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%d</xliff:g> intentos incorrectos más, se te solicitará que desbloquees tu tableta mediante el uso de una cuenta de correo."\n\n" Vuelve a intentarlo en <xliff:g id="NUMBER_2">%d</xliff:g> segundos."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Dibujaste incorrectamente tu patrón de desbloqueo <xliff:g id="NUMBER_0">%d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%d</xliff:g> intentos incorrectos más, se te solicitará que desbloquees tu dispositivo mediante el uso de una cuenta de correo."\n\n" Vuelve a intentarlo en <xliff:g id="NUMBER_2">%d</xliff:g> segundos."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"¿Aumentar el volumen por encima del nivel seguro?"\n"Si escuchas con el volumen alto durante períodos prolongados, puedes dañar tu audición."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Mantén presionado con dos dedos para activar la accesibilidad."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Se activó la accesibilidad."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Se canceló la accesibilidad."</string> <string name="user_switched" msgid="3768006783166984410">"Usuario actual: <xliff:g id="NAME">%1$s</xliff:g>"</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index ae0ca2b..a50947c 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیدهاید. بعد از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق، از شما خواسته میشود که با استفاده از یک حساب ایمیل قفل رایانه لوحی خود را باز کنید."\n\n" لطفاً پس از <xliff:g id="NUMBER_2">%d</xliff:g> ثانیه دوباره امتحان کنید."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیدهاید. پس از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق، از شما خواسته میشود که با استفاده از یک حساب ایمیل قفل تلفن خود را باز کنید."\n\n" لطفاً پس از <xliff:g id="NUMBER_2">%d</xliff:g> ثانیه دوباره امتحان کنید."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"صدا به بالاتر از سطح ایمن افزایش یابد؟"\n"گوش دادن به صدای بلند برای زمانهای طولانی میتواند به شنوایی شما آسیب برساند."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"برای فعال کردن قابلیت دسترسی، با دو انگشت خود همچنان به طرف پایین فشار دهید."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"قابلیت دسترسی فعال شد."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"قابلیت دسترسی لغو شد."</string> <string name="user_switched" msgid="3768006783166984410">"کاربر کنونی <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml index ae2a4cb..ef2f047 100644 --- a/core/res/res/values-fi/strings.xml +++ b/core/res/res/values-fi/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Piirsit lukituksenpoistokuvion väärin <xliff:g id="NUMBER_0">%d</xliff:g> kertaa. Jos piirrät kuvion väärin vielä <xliff:g id="NUMBER_1">%d</xliff:g> kertaa, sinua pyydetään poistamaan tablet-laitteesi lukitus sähköpostitilin avulla."\n\n" Yritä uudelleen <xliff:g id="NUMBER_2">%d</xliff:g> sekunnin kuluttua."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Piirsit lukituksenpoistokuvion väärin <xliff:g id="NUMBER_0">%d</xliff:g> kertaa. Jos piirrät kuvion väärin vielä <xliff:g id="NUMBER_1">%d</xliff:g> kertaa, sinua pyydetään poistamaan puhelimesi lukitus sähköpostitilin avulla."\n\n" Yritä uudelleen <xliff:g id="NUMBER_2">%d</xliff:g> sekunnin kuluttua."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Nostetaanko äänenvoimakkuus turvallista tasoa voimakkaammaksi?"\n"Jos kuuntelet suurella äänenvoimakkuudella pitkiä aikoja, kuulosi voi vahingoittua."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Ota esteettömyystila käyttöön koskettamalla pitkään kahdella sormella."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Esteettömyystila käytössä."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Esteettömyystila peruutettu."</string> <string name="user_switched" msgid="3768006783166984410">"Nykyinen käyttäjä: <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index aa4f91e..cefc2b8 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%d</xliff:g> fois, vous devrez déverrouiller votre tablette à l\'aide d\'un compte de messagerie électronique."\n\n" Veuillez réessayer dans <xliff:g id="NUMBER_2">%d</xliff:g> secondes."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%d</xliff:g> fois, vous devrez déverrouiller votre téléphone à l\'aide d\'un compte de messagerie électronique."\n\n" Veuillez réessayer dans <xliff:g id="NUMBER_2">%d</xliff:g> secondes."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Augmenter le volume au-dessus du niveau de sécurité ?"\n"L\'écoute à un volume élevé pendant des périodes prolongées peut endommager votre audition."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Pour activer l\'accessibilité, appuyez de manière prolongée avec deux doigts."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"L\'accessibilité a bien été activée."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilité annulée."</string> <string name="user_switched" msgid="3768006783166984410">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index d0f1dc5..6bf3d09 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -1262,7 +1262,7 @@ <string name="media_shared" product="nosdcard" msgid="5830814349250834225">"USB संग्रहण का उपयोग वर्तमान में एक कंप्यूटर द्वारा किया जा रहा है."</string> <string name="media_shared" product="default" msgid="5706130568133540435">"SD कार्ड का उपयोग वर्तमान में एक कंप्यूटर द्वारा किया जा रहा है."</string> <string name="media_unknown_state" msgid="729192782197290385">"बाह्य मीडिया अज्ञात स्थिति में है."</string> - <string name="share" msgid="1778686618230011964">"शेयर करें"</string> + <string name="share" msgid="1778686618230011964">"साझा करें"</string> <string name="find" msgid="4808270900322985960">"ढूंढें"</string> <string name="websearch" msgid="4337157977400211589">"वेब खोज"</string> <string name="find_next" msgid="5742124618942193978">"अगला ढूंढें"</string> @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"आपने अपने अनलॉक प्रतिमान को <xliff:g id="NUMBER_0">%d</xliff:g> बार गलत तरीके से आरेखित किया है. <xliff:g id="NUMBER_1">%d</xliff:g> और असफल प्रयासों के बाद, आपसे अपने टेबलेट को किसी ईमेल खाते के उपयोग से अनलॉक करने के लिए कहा जाएगा."\n\n" <xliff:g id="NUMBER_2">%d</xliff:g> सेकंड में पुन: प्रयास करें."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"आपने अपने अनलॉक प्रतिमान को <xliff:g id="NUMBER_0">%d</xliff:g> बार गलत तरीके से आरेखित किया है. <xliff:g id="NUMBER_1">%d</xliff:g> और असफल प्रयासों के बाद, आपसे अपने फ़ोन को किसी ईमेल खाते का उपयोग करके अनलॉक करने के लिए कहा जाएगा."\n\n" <xliff:g id="NUMBER_2">%d</xliff:g> सेकंड में पुन: प्रयास करें."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"वॉल्यूम को सुरक्षित स्तर से अधिक करें?"\n"अधिक देर तक उच्च वॉल्यूम पर सुनने से आपकी सुनने की क्षमता को नुकसान हो सकता है."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"पहुंच-योग्यता को सक्षम करने के लिए दो अंगुलियों से नीचे दबाए रखें."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"पहुंच-योग्यता सक्षम कर दी है."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"पहुंच-योग्यता रद्द की गई."</string> <string name="user_switched" msgid="3768006783166984410">"वर्तमान उपयोगकर्ता <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index f223fa6..588960b 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Netočno ste iscrtali obrazac za otključavanje <xliff:g id="NUMBER_0">%d</xliff:g> puta. Nakon još ovoliko neuspješnih pokušaja: <xliff:g id="NUMBER_1">%d</xliff:g> morat ćete otključati tabletno računalo pomoću računa e-pošte."\n\n" Pokušajte ponovo za <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Netočno ste iscrtali obrazac za otključavanje <xliff:g id="NUMBER_0">%d</xliff:g> puta. Nakon još ovoliko neuspješnih pokušaja: <xliff:g id="NUMBER_1">%d</xliff:g> morat ćete otključati telefon pomoću računa e-pošte."\n\n" Pokušajte ponovo za <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Pojačati iznad sigurne razine?"\n"Dulje slušanje preglasne glazbe može vam oštetiti sluh."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Nastavite držati s dva prsta kako biste omogućili pristupačnost."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Dostupnost je omogućena."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Pristupačnost otkazana."</string> <string name="user_switched" msgid="3768006783166984410">"Trenutačni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index 3815c38..4645842 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"<xliff:g id="NUMBER_0">%d</xliff:g> alkalommal helytelenül rajzolta le a feloldási mintát. További <xliff:g id="NUMBER_1">%d</xliff:g> sikertelen kísérlet után egy e-mail fiók használatával kell feloldania a táblagépét."\n\n" Kérjük, próbálja újra <xliff:g id="NUMBER_2">%d</xliff:g> másodperc múlva."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"<xliff:g id="NUMBER_0">%d</xliff:g> alkalommal helytelenül rajzolta le a feloldási mintát. További <xliff:g id="NUMBER_1">%d</xliff:g> sikertelen kísérlet után egy e-mail fiók használatával kell feloldania a telefonját."\n\n" Kérjük, próbálja újra <xliff:g id="NUMBER_2">%d</xliff:g> másodperc múlva."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"A biztonságos szint fölé emeli a hangerőt?"\n"Ha hosszú ideig hangosan hallgatja a zenét, az károsíthatja a hallását."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Továbbra is tartsa lenyomva két ujját a hozzáférés engedélyezéséhez."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Hozzáférés engedélyezve"</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hozzáférés megszakítva."</string> <string name="user_switched" msgid="3768006783166984410">"<xliff:g id="NAME">%1$s</xliff:g> az aktuális felhasználó."</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index 17b4944..7b04c96 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci tablet menggunakan akun email."\n\n"Coba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> detik."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci ponsel menggunakan akun email."\n\n"Coba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> detik."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Naikkan volume di atas tingkat aman?"\n"Mendengarkan volume tinggi dalam jangka waktu yang lama dapat merusak pendengaran Anda."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Tahan terus dua jari untuk mengaktifkan aksesibilitas."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Aksesibilitas diaktifkan."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Aksesibilitas dibatalkan."</string> <string name="user_switched" msgid="3768006783166984410">"Pengguna saat ini <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index bd1ffb7..46ca017 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"שרטטת את קו ביטול הנעילה באופן שגוי <xliff:g id="NUMBER_0">%d</xliff:g> פעמים. לאחר <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות כושלים נוספים, תתבקש לבטל את נעילת הטאבלט באמצעות חשבון דוא\"ל."\n\n"נסה שוב בעוד <xliff:g id="NUMBER_2">%d</xliff:g> שניות."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"שרטטת את קו ביטול הנעילה באופן שגוי <xliff:g id="NUMBER_0">%d</xliff:g> פעמים. לאחר <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות כושלים נוספים, תתבקש לבטל את נעילת הטלפון באמצעות חשבון דוא\"ל."\n\n"נסה שוב בעוד <xliff:g id="NUMBER_2">%d</xliff:g> שניות."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"האם להעלות את עוצמת הקול מעל לרמה הבטוחה?"\n"האזנה בעוצמת קול גבוהה למשך זמן ארוך עלולה לפגוע בשמיעה."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"המשך לגעת בשתי אצבעות כדי להפעיל נגישות."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"נגישות הופעלה."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"נגישות בוטלה."</string> <string name="user_switched" msgid="3768006783166984410">"המשתמש הנוכחי <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index 97a1675..d97753b 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"ロック解除パターンの入力を<xliff:g id="NUMBER_0">%d</xliff:g>回間違えました。あと<xliff:g id="NUMBER_1">%d</xliff:g>回間違えると、タブレットのロック解除にメールアカウントが必要になります。"\n\n"<xliff:g id="NUMBER_2">%d</xliff:g>秒以内にもう一度お試しください。"</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"ロック解除パターンの入力を<xliff:g id="NUMBER_0">%d</xliff:g>回間違えました。あと<xliff:g id="NUMBER_1">%d</xliff:g>回間違えると、携帯端末のロック解除にメールアカウントが必要になります。"\n\n"<xliff:g id="NUMBER_2">%d</xliff:g>秒以内にもう一度お試しください。"</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"安全レベルを超えるまで音量を上げますか?"\n"大音量で長時間聞き続けると、聴力を損なう恐れがあります。"</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"ユーザー補助機能を有効にするには2本の指で押し続けてください。"</string> <string name="accessibility_enabled" msgid="1381972048564547685">"ユーザー補助が有効になりました。"</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ユーザー補助をキャンセルしました。"</string> <string name="user_switched" msgid="3768006783166984410">"現在のユーザーは<xliff:g id="NAME">%1$s</xliff:g>です。"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index e10fd3f..332e320 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"잠금해제 패턴을 <xliff:g id="NUMBER_0">%d</xliff:g>회 잘못 그렸습니다. <xliff:g id="NUMBER_1">%d</xliff:g>회 더 실패하면 이메일 계정을 사용하여 태블릿을 잠금해제해야 합니다."\n\n" <xliff:g id="NUMBER_2">%d</xliff:g>초 후에 다시 시도해 주세요."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"잠금해제 패턴을 <xliff:g id="NUMBER_0">%d</xliff:g>회 잘못 그렸습니다. <xliff:g id="NUMBER_1">%d</xliff:g>회 더 실패하면 이메일 계정을 사용하여 휴대전화를 잠금해제해야 합니다."\n\n" <xliff:g id="NUMBER_2">%d</xliff:g>초 후에 다시 시도해 주세요."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"안전한 수준 이상으로 볼륨을 높이시겠습니까?"\n"높은 볼륨으로 장시간 청취하면 청력에 손상이 올 수 있습니다."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"두 손가락으로 길게 누르면 접근성을 사용하도록 설정됩니다."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"접근성을 사용 설정했습니다."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"접근성이 취소되었습니다."</string> <string name="user_switched" msgid="3768006783166984410">"현재 사용자는 <xliff:g id="NAME">%1$s</xliff:g>님입니다."</string> diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml index 79eefef..920865b 100644 --- a/core/res/res/values-ms/strings.xml +++ b/core/res/res/values-ms/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Anda telah tersilap melukis corak buka kunci sebanyak <xliff:g id="NUMBER_0">%d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%d</xliff:g> lagi percubaan yang tidak berjaya, anda akan diminta membuka kunci tablet anda menggunakan log masuk Google anda."\n\n" Cuba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> saat."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Anda telah tersilap lukis corak buka kunci sebanyak <xliff:g id="NUMBER_0">%d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%d</xliff:g> lagi percubaan yang tidak berjaya, anda akan diminta membuka kunci telefon anda menggunakan log masuk Google anda."\n\n" Cuba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> saat."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Tingkatkan kelantangan di atas tahap selamat?"\n"Mendengar pada kelantangan tinggi untuk tempoh yang panjang boleh merosakkan pendengaran anda."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Teruskan menahan dengan dua jari untuk mendayakan kebolehcapaian."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Kebolehcapaian didayakan."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Kebolehcapaian dibatalkan."</string> <string name="user_switched" msgid="3768006783166984410">"Pengguna semasa <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index 7381794b..6fa3c51 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -1419,8 +1419,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Po raz <xliff:g id="NUMBER_0">%d</xliff:g> nieprawidłowo narysowałeś wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%d</xliff:g> nieudanych próbach konieczne będzie odblokowanie tabletu przy użyciu danych logowania na konto Google."\n\n" Spróbuj ponownie za <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Po raz <xliff:g id="NUMBER_0">%d</xliff:g> nieprawidłowo narysowałeś wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%d</xliff:g> nieudanych próbach konieczne będzie odblokowanie telefonu przy użyciu danych logowania na konto Google."\n\n" Spróbuj ponownie za <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Chcesz ustawić głośność powyżej bezpiecznego poziomu?"\n"Słuchanie przy dużym poziomie głośności przez dłuższy czas może doprowadzić do uszkodzenia słuchu."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Aby włączyć ułatwienia dostępu, przytrzymaj dwa palce."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Włączono ułatwienia dostępu."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Ułatwienia dostępu zostały anulowane."</string> <string name="user_switched" msgid="3768006783166984410">"Bieżący użytkownik: <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index 55f727a2..36f2ded 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear seu tablet."\n\n" Tente novamente em <xliff:g id="NUMBER_2">%d</xliff:g> segundos."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear."\n\n" Tente novamente em <xliff:g id="NUMBER_2">%d</xliff:g> segundos."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Aumentar o volume acima do nível seguro?"\n"A audição em volume elevado por períodos longos pode prejudicar sua audição."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Mantenha pressionado com dois dedos para ativar a acessibilidade."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Acessibilidade ativada."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Acessibilidade cancelada."</string> <string name="user_switched" msgid="3768006783166984410">"Usuário atual <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index 81aaaa0..263e56b 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Aţi desenat incorect modelul pentru deblocare de <xliff:g id="NUMBER_0">%d</xliff:g> ori. După încă <xliff:g id="NUMBER_1">%d</xliff:g> încercări nereuşite, vi se va solicita să deblocaţi tableta cu ajutorul unui cont de e-mail."\n\n" Încercaţi din nou peste <xliff:g id="NUMBER_2">%d</xliff:g> (de) secunde."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Aţi desenat incorect modelul pentru deblocare de <xliff:g id="NUMBER_0">%d</xliff:g> ori. După încă <xliff:g id="NUMBER_1">%d</xliff:g> încercări nereuşite, vi se va solicita să deblocaţi telefonul cu ajutorul unui cont de e-mail."\n\n" Încercaţi din nou peste <xliff:g id="NUMBER_2">%d</xliff:g> (de) secunde."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Ridicaţi volumul mai sus de nivelul sigur?"\n"Ascultarea la volum ridicat pe perioade lungi de timp vă poate afecta auzul."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Menţineţi două degete pe ecran pentru a activa accesibilitatea."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"S-a activat accesibilitatea."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accesibilitatea a fost anulată"</string> <string name="user_switched" msgid="3768006783166984410">"Utilizator curent: <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 0b3d009..f008479 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Вы <xliff:g id="NUMBER_0">%d</xliff:g> раз неверно указали графический ключ. После <xliff:g id="NUMBER_1">%d</xliff:g> неверных попыток для разблокировки планшетного ПК потребуется войти в аккаунт Google."\n\n"Повтор через <xliff:g id="NUMBER_2">%d</xliff:g> сек."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Вы <xliff:g id="NUMBER_0">%d</xliff:g> раз неверно указали графический ключ. После <xliff:g id="NUMBER_1">%d</xliff:g> неверных попыток для разблокировки телефона потребуется войти в аккаунт Google."\n\n"Повтор через <xliff:g id="NUMBER_2">%d</xliff:g> сек."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Увеличить громкость до небезопасного уровня?"\n"Долговременное прослушивание на такой громкости может повредить слух."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Чтобы включить специальные возможности, удерживайте пальцы на экране."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Специальные возможности включены."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Специальные возможности не будут включены."</string> <string name="user_switched" msgid="3768006783166984410">"Выбран аккаунт пользователя <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index e6a3b38..9be07a9 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"<xliff:g id="NUMBER_0">%d</xliff:g>-krát ste nesprávne nakreslili svoj bezpečnostný vzor. Po ďalších <xliff:g id="NUMBER_1">%d</xliff:g> neúspešných pokusoch sa zobrazí výzva na odomknutie tabletu pomocou e-mailového účtu."\n\n" Skúste to znova o <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"<xliff:g id="NUMBER_0">%d</xliff:g>-krát ste nesprávne nakreslili svoj bezpečnostný vzor. Po <xliff:g id="NUMBER_1">%d</xliff:g> ďalších neúspešných pokusoch sa zobrazí výzva na odomknutie telefónu pomocou e-mailového účtu."\n\n" Skúste to znova o <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Chcete zvýšiť hlasitosť nad bezpečnú úroveň?"\n"Dlhodobé počúvanie pri vysokej hlasitosti môže viesť k poškodeniu vášho sluchu."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Zjednodušenie ovládania povolíte dlhým stlačením dvoma prstami."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Zjednodušenie ovládania je povolené."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Zjednodušenie ovládania bolo zrušené."</string> <string name="user_switched" msgid="3768006783166984410">"Aktuálny používateľ je <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index cdd8d11..42cf0af 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Vzorec za odklepanje ste <xliff:g id="NUMBER_0">%d</xliff:g>-krat napačno vnesli. Po nadaljnjih <xliff:g id="NUMBER_1">%d</xliff:g> neuspešnih poskusih boste pozvani, da tablični računalnik odklenete z e-poštnim računom."\n\n"Poskusite znova čez <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Vzorec za odklepanje ste <xliff:g id="NUMBER_0">%d</xliff:g>-krat napačno vnesli. Po nadaljnjih <xliff:g id="NUMBER_1">%d</xliff:g> neuspešnih poskusih boste pozvani, da odklenete telefon z Googlovimi podatki za prijavo."\n\n"Poskusite znova čez <xliff:g id="NUMBER_2">%d</xliff:g> s."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Želite povečati glasnost nad varno raven?"\n"Dolgotrajna izpostavljenost glasnim tonom lahko poškoduje sluh."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Če želite omogočiti pripomočke za ljudi s posebnimi potrebami, na zaslonu pridržite z dvema prstoma."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Pripomočki za ljudi s posebnimi potrebami so omogočeni."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Omogočanje pripomočkov za ljudi s posebnimi potrebami preklicano."</string> <string name="user_switched" msgid="3768006783166984410">"Trenutni uporabnik <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index bfeb021..e69bd5d 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Нацртали сте шаблон за откључавање неисправно <xliff:g id="NUMBER_0">%d</xliff:g> пута. После још <xliff:g id="NUMBER_1">%d</xliff:g> неуспешна(их) покушаја, од вас ће бити затражено да откључате таблет помоћу налога е-поште."\n\n"Покушајте поново за <xliff:g id="NUMBER_2">%d</xliff:g> секунде(и)."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Нацртали сте шаблон за откључавање неисправно <xliff:g id="NUMBER_0">%d</xliff:g> пута. После још <xliff:g id="NUMBER_1">%d</xliff:g> неуспешна(их) покушаја, од вас ће бити затражено да откључате телефон помоћу налога е-поште."\n\n"Покушајте поново за <xliff:g id="NUMBER_2">%d</xliff:g> секунде(и)."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Желите да појачате звук изнад безбедног нивоа?"\n"Ако дуже време слушате гласну музику, може доћи до оштећења слуха."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Држите са два прста да бисте омогућили приступачност."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Приступачност је омогућена."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Приступачност је отказана."</string> <string name="user_switched" msgid="3768006783166984410">"Актуелни корисник <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index 428e3d6..e295e2d 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Du har ritat ditt grafiska lösenord fel <xliff:g id="NUMBER_0">%d</xliff:g> gånger. Efter ytterligare <xliff:g id="NUMBER_1">%d</xliff:g> försök ombeds du låsa upp surfplattan med ett e-postkonto."\n\n" Försök igen om <xliff:g id="NUMBER_2">%d</xliff:g> sekunder."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Du har ritat ditt grafiska lösenord fel <xliff:g id="NUMBER_0">%d</xliff:g> gånger. Efter ytterligare <xliff:g id="NUMBER_1">%d</xliff:g> försök ombeds du låsa upp mobilen med hjälp av ett e-postkonto."\n\n" Försök igen om <xliff:g id="NUMBER_2">%d</xliff:g> sekunder."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Vill du höja volymen över den säkra nivån?"\n"Om du lyssnar på hög volym under långa perioder kan din hörsel skadas."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Fortsätt trycka med två fingrar om du vill aktivera tillgänglighetsläget."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Tillgänglighetsläget har aktiverats."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Byte till tillgänglighetsläge avbrutet."</string> <string name="user_switched" msgid="3768006783166984410">"Nuvarande användare: <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml index a619a36..3dc4bff 100644 --- a/core/res/res/values-th/strings.xml +++ b/core/res/res/values-th/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"คุณวาดรูปแบบการปลดล็อกไม่ถูกต้อง <xliff:g id="NUMBER_0">%d</xliff:g> ครั้งแล้ว หากทำไม่สำเร็จอีก <xliff:g id="NUMBER_1">%d</xliff:g> ครั้ง ระบบจะขอให้คุณปลดล็อกแท็บเล็ตโดยใช้บัญชีอีเมล"\n\n" โปรดลองอีกครั้งใน <xliff:g id="NUMBER_2">%d</xliff:g> วินาที"</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"คุณวาดรูปแบบการปลดล็อกไม่ถูกต้อง <xliff:g id="NUMBER_0">%d</xliff:g> ครั้งแล้ว หากทำไม่สำเร็จอีก <xliff:g id="NUMBER_1">%d</xliff:g> ครั้ง ระบบจะขอให้คุณปลดล็อกโทรศัพท์โดยใช้ับัญชีอีเมล"\n\n" โปรดลองอีกครั้งในอีก <xliff:g id="NUMBER_2">%d</xliff:g> วินาที"</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"เพิ่มระดับเสียงจนเกินระดับที่ปลอดภัยหรือไม่"\n"การฟังเสียงดังเป็นเวลานานอาจทำให้การได้ยินของคุณบกพร่องได้"</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"ใช้สองนิ้วแตะค้างไว้เพื่อเปิดใช้งานการเข้าถึง"</string> <string name="accessibility_enabled" msgid="1381972048564547685">"เปิดใช้งานการเข้าถึงแล้ว"</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ยกเลิกการเข้าถึงแล้ว"</string> <string name="user_switched" msgid="3768006783166984410">"ผู้ใช้ปัจจุบัน <xliff:g id="NAME">%1$s</xliff:g>"</string> diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml index cfe58c7..201d77b 100644 --- a/core/res/res/values-tl/strings.xml +++ b/core/res/res/values-tl/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Naguhit mo nang hindi tama ang iyong pattern sa pag-unlock nang <xliff:g id="NUMBER_0">%d</xliff:g> (na) beses. Pagkatapos ng <xliff:g id="NUMBER_1">%d</xliff:g> pang hindi matagumpay na pagtatangka, hihilingin sa iyong i-unlock ang tablet mo gamit ang isang email account."\n\n" Subukang muli sa loob ng <xliff:g id="NUMBER_2">%d</xliff:g> (na) segundo."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Naguhit mo nang hindi tama ang iyong pattern sa pag-unlock nang <xliff:g id="NUMBER_0">%d</xliff:g> (na) beses. Pagkatapos ng <xliff:g id="NUMBER_1">%d</xliff:g> pang hindi matagumpay na pagtatangka, hihilingin sa iyong i-unlock ang telepono mo gamit ang isang email account."\n\n" Subukang muli sa loob ng <xliff:g id="NUMBER_2">%d</xliff:g> (na) segundo."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Lakasan ang volume nang lagpas sa ligtas na antas?"\n"Maaaring mapinsala ng pakikinig sa malakas na volume sa loob ng mahahabang panahon ang iyong pandinig."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Panatilihing nakapindot nang matagal ang iyong dalawang daliri upang paganahin ang pagiging naa-access."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Pinagana ang accessibility."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Nakansela ang pagiging naa-access."</string> <string name="user_switched" msgid="3768006783166984410">"Kasalukuyang user <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 2c9407b..fd59e41 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Kilit açma deseninizi <xliff:g id="NUMBER_0">%d</xliff:g> kez yanlış çizdiniz. <xliff:g id="NUMBER_1">%d</xliff:g> başarısız denemeden sonra, tabletinizi bir e-posta hesabı kullanarak açmanız istenir."\n\n" <xliff:g id="NUMBER_2">%d</xliff:g> saniye içinde tekrar deneyin."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Kilit açma deseninizi <xliff:g id="NUMBER_0">%d</xliff:g> kez yanlış çizdiniz. <xliff:g id="NUMBER_1">%d</xliff:g> başarısız denemeden sonra telefonunuzu bir e-posta hesabı kullanarak açmanız istenir."\n\n" <xliff:g id="NUMBER_2">%d</xliff:g> saniye içinde tekrar deneyin."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Ses düzeyi güvenli seviyenin üzerine çıkarılsın mı?"\n"Yüksek sesle uzun süre dinlemek işitme yetinize zarar verebilir."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Erişilebilirliği etkinleştirmek için iki parmağınızı basılı tutmaya devam edin."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Erişilebilirlik etkinleştirildi."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Erişilebilirlik iptal edildi."</string> <string name="user_switched" msgid="3768006783166984410">"Geçerli kullanıcı: <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml index 3072cb9..5547f56 100644 --- a/core/res/res/values-uk/strings.xml +++ b/core/res/res/values-uk/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Ключ розблокування неправильно намальовано стільки разів: <xliff:g id="NUMBER_0">%d</xliff:g>. У вас є ще стільки спроб: <xliff:g id="NUMBER_1">%d</xliff:g>. У разі невдачі з’явиться запит розблокувати планшетний ПК за допомогою облікового запису електронної пошти."\n\n" Повторіть спробу через <xliff:g id="NUMBER_2">%d</xliff:g> сек."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Ключ розблокування неправильно намальовано стільки разів: <xliff:g id="NUMBER_0">%d</xliff:g>. У вас є ще стільки спроб: <xliff:g id="NUMBER_1">%d</xliff:g>. У разі невдачі з’явиться запит розблокувати телефон за допомогою облікового запису електронної пошти."\n\n" Повторіть спробу через <xliff:g id="NUMBER_2">%d</xliff:g> сек."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Збільшити гучність понад безпечний рівень?"\n"Надто гучне прослуховування впродовж тривалого періоду може пошкодити слух."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Утримуйте двома пальцями, щоб увімкнути доступність."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Доступність увімкнено."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Доступність скасовано."</string> <string name="user_switched" msgid="3768006783166984410">"Поточний користувач: <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml index 3dbe71b..df5d184 100644 --- a/core/res/res/values-vi/strings.xml +++ b/core/res/res/values-vi/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Bạn đã <xliff:g id="NUMBER_0">%d</xliff:g> lần vẽ không chính xác hình mở khóa của mình. Sau <xliff:g id="NUMBER_1">%d</xliff:g> lần thử không thành công nữa, bạn sẽ được yêu cầu mở khóa máy tính bảng bằng tài khoản email."\n\n" Vui lòng thử lại sau <xliff:g id="NUMBER_2">%d</xliff:g> giây."</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Bạn đã <xliff:g id="NUMBER_0">%d</xliff:g> lần vẽ không chính xác hình mở khóa của mình. Sau <xliff:g id="NUMBER_1">%d</xliff:g> lần thử không thành công nữa, bạn sẽ được yêu cầu mở khóa điện thoại bằng tài khoản email."\n\n" Vui lòng thử lại sau <xliff:g id="NUMBER_2">%d</xliff:g> giây."</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"Tăng âm lượng trên mức an toàn?"\n"Nghe ở âm lượng cao trong thời gian dài có thể gây hại cho thính giác của bạn."</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"Tiếp tục giữ hai ngón tay để bật trợ năng."</string> <string name="accessibility_enabled" msgid="1381972048564547685">"Trợ năng đã được bật."</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Đã hủy trợ năng."</string> <string name="user_switched" msgid="3768006783166984410">"Người dùng hiện tại <xliff:g id="NAME">%1$s</xliff:g>."</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index ea55480..d4c8ac0 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -777,7 +777,7 @@ <string name="lockscreen_transport_pause_description" msgid="7659088786780128001">"“暂停”按钮"</string> <string name="lockscreen_transport_play_description" msgid="5888422938351019426">"“播放”按钮"</string> <string name="lockscreen_transport_stop_description" msgid="4562318378766987601">"“停止”按钮"</string> - <string name="emergency_calls_only" msgid="6733978304386365407">"只能使用紧急呼救"</string> + <string name="emergency_calls_only" msgid="6733978304386365407">"只能拨打紧急呼救电话"</string> <string name="lockscreen_network_locked_message" msgid="143389224986028501">"网络已锁定"</string> <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM 卡已用 PUK 码锁定"</string> <string name="lockscreen_sim_puk_locked_instructions" msgid="8127916255245181063">"请参阅《用户指南》或与客服人员联系。"</string> @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次错误地绘制了解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐户解锁平板电脑。"\n\n"请在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒后重试。"</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次错误地绘制了解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐户解锁手机。"\n\n"请在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒后重试。"</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"将音量调高到安全级别以上?"\n"长时间聆听高音量可能会损伤听力。"</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"持续按住双指即可启用辅助功能。"</string> <string name="accessibility_enabled" msgid="1381972048564547685">"辅助功能已启用。"</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"已取消辅助功能。"</string> <string name="user_switched" msgid="3768006783166984410">"当前用户是<xliff:g id="NAME">%1$s</xliff:g>。"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index 3301945..12c7f41 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -1418,8 +1418,7 @@ <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"您的解鎖圖形已畫錯 <xliff:g id="NUMBER_0">%d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%d</xliff:g> 次仍未成功,系統就會要求您透過電子郵件帳戶解除平板電腦的鎖定狀態。"\n\n"請在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒後再試一次。"</string> <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"您的解鎖圖形已畫錯 <xliff:g id="NUMBER_0">%d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%d</xliff:g> 次仍未成功,系統就會要求您透過電子郵件帳戶解除手機的鎖定狀態。"\n\n"請在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒後再試一次。"</string> <string name="safe_media_volume_warning" product="default" msgid="7382971871993371648">"要將音量調高到安全等級以上嗎?"\n"長時間聆聽偏高音量可能會損害您的聽力。"</string> - <!-- no translation found for continue_to_enable_accessibility (1626427372316070258) --> - <skip /> + <string name="continue_to_enable_accessibility" msgid="1626427372316070258">"持續用兩指按住即可啟用協助工具。"</string> <string name="accessibility_enabled" msgid="1381972048564547685">"協助工具已啟用。"</string> <string name="enable_accessibility_canceled" msgid="3833923257966635673">"協助工具已取消。"</string> <string name="user_switched" msgid="3768006783166984410">"目前的使用者是 <xliff:g id="NAME">%1$s</xliff:g>。"</string> diff --git a/core/tests/ConnectivityManagerTest/AndroidManifest.xml b/core/tests/ConnectivityManagerTest/AndroidManifest.xml index 05f8b39..1bbc7df 100644 --- a/core/tests/ConnectivityManagerTest/AndroidManifest.xml +++ b/core/tests/ConnectivityManagerTest/AndroidManifest.xml @@ -72,5 +72,6 @@ <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.DEVICE_POWER" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - + <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> + <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" /> </manifest> diff --git a/data/fonts/DroidNaskh-Bold.ttf b/data/fonts/DroidNaskh-Bold.ttf Binary files differindex 692b796..14d8768 100644 --- a/data/fonts/DroidNaskh-Bold.ttf +++ b/data/fonts/DroidNaskh-Bold.ttf diff --git a/data/fonts/DroidNaskh-Regular.ttf b/data/fonts/DroidNaskh-Regular.ttf Binary files differindex da9a45f..03662f2 100644 --- a/data/fonts/DroidNaskh-Regular.ttf +++ b/data/fonts/DroidNaskh-Regular.ttf diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 6238edb..22ecc61 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -1030,6 +1030,51 @@ public final class Bitmap implements Parcelable { } /** + * Indicates whether the renderer responsible for drawing this + * bitmap should attempt to use mipmaps when this bitmap is drawn + * scaled down. + * + * If you know that you are going to draw this bitmap at less than + * 50% of its original size, you may be able to obtain a higher + * quality + * + * This property is only a suggestion that can be ignored by the + * renderer. It is not guaranteed to have any effect. + * + * @return true if the renderer should attempt to use mipmaps, + * false otherwise + * + * @see #setHasMipMap(boolean) + */ + public final boolean hasMipMap() { + return nativeHasMipMap(mNativeBitmap); + } + + /** + * Set a hint for the renderer responsible for drawing this bitmap + * indicating that it should attempt to use mipmaps when this bitmap + * is drawn scaled down. + * + * If you know that you are going to draw this bitmap at less than + * 50% of its original size, you may be able to obtain a higher + * quality by turning this property on. + * + * Note that if the renderer respects this hint it might have to + * allocate extra memory to hold the mipmap levels for this bitmap. + * + * This property is only a suggestion that can be ignored by the + * renderer. It is not guaranteed to have any effect. + * + * @param hasMipMap indicates whether the renderer should attempt + * to use mipmaps + * + * @see #hasMipMap() + */ + public final void setHasMipMap(boolean hasMipMap) { + nativeSetHasMipMap(mNativeBitmap, hasMipMap); + } + + /** * Fills the bitmap's pixels with the specified {@link Color}. * * @throws IllegalStateException if the bitmap is not mutable. @@ -1356,7 +1401,6 @@ public final class Bitmap implements Parcelable { private static native int nativeHeight(int nativeBitmap); private static native int nativeRowBytes(int nativeBitmap); private static native int nativeConfig(int nativeBitmap); - private static native boolean nativeHasAlpha(int nativeBitmap); private static native int nativeGetPixel(int nativeBitmap, int x, int y); private static native void nativeGetPixels(int nativeBitmap, int[] pixels, @@ -1385,7 +1429,10 @@ public final class Bitmap implements Parcelable { int[] offsetXY); private static native void nativePrepareToDraw(int nativeBitmap); + private static native boolean nativeHasAlpha(int nativeBitmap); private static native void nativeSetHasAlpha(int nBitmap, boolean hasAlpha); + private static native boolean nativeHasMipMap(int nativeBitmap); + private static native void nativeSetHasMipMap(int nBitmap, boolean hasMipMap); private static native boolean nativeSameAs(int nb0, int nb1); /* package */ final int ni() { diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index d18a5b0..e7085b0 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -399,9 +399,20 @@ bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { if (scissorEnabled && (x != mScissorX || y != mScissorY || width != mScissorWidth || height != mScissorHeight)) { - if (x < 0) x = 0; - if (y < 0) y = 0; - + if (x < 0) { + width += x; + x = 0; + } + if (y < 0) { + height += y; + y = 0; + } + if (width < 0) { + width = 0; + } + if (height < 0) { + height = 0; + } glScissor(x, y, width, height); mScissorX = x; diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h index 69be317..448e3da 100644 --- a/libs/hwui/Layer.h +++ b/libs/hwui/Layer.h @@ -209,6 +209,9 @@ struct Layer { } inline void allocateTexture(GLenum format, GLenum storage) { +#if DEBUG_LAYERS + ALOGD(" Allocate layer: %dx%d", getWidth(), getHeight()); +#endif glTexImage2D(renderTarget, 0, format, getWidth(), getHeight(), 0, format, storage, NULL); } diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 89cefe0..b6be5b3 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -49,7 +49,7 @@ namespace uirenderer { #define ALPHA_THRESHOLD 0 -#define FILTER(paint) (paint && paint->isFilterBitmap() ? GL_LINEAR : GL_NEAREST) +#define FILTER(paint) (!paint || paint->isFilterBitmap() ? GL_LINEAR : GL_NEAREST) /////////////////////////////////////////////////////////////////////////////// // Globals @@ -895,12 +895,6 @@ void OpenGLRenderer::composeLayer(sp<Snapshot> current, sp<Snapshot> previous) { void OpenGLRenderer::drawTextureLayer(Layer* layer, const Rect& rect) { float alpha = layer->getAlpha() / 255.0f; - mat4& transform = layer->getTransform(); - if (!transform.isIdentity()) { - save(0); - mSnapshot->transform->multiply(transform); - } - setupDraw(); if (layer->getRenderTarget() == GL_TEXTURE_2D) { setupDrawWithTexture(); @@ -937,10 +931,6 @@ void OpenGLRenderer::drawTextureLayer(Layer* layer, const Rect& rect) { glDrawArrays(GL_TRIANGLE_STRIP, 0, gMeshCount); finishDrawTexture(); - - if (!transform.isIdentity()) { - restore(); - } } void OpenGLRenderer::composeLayerRect(Layer* layer, const Rect& rect, bool swap) { @@ -2792,12 +2782,24 @@ status_t OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* pain return DrawGlInfo::kStatusDone; } + mat4* transform = NULL; + if (layer->isTextureLayer()) { + transform = &layer->getTransform(); + if (!transform->isIdentity()) { + save(0); + mSnapshot->transform->multiply(*transform); + } + } + Rect transformed; Rect clip; const bool rejected = quickRejectNoScissor(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight(), transformed, clip); if (rejected) { + if (transform && !transform->isIdentity()) { + restore(); + } return DrawGlInfo::kStatusDone; } @@ -2858,6 +2860,10 @@ status_t OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* pain } } + if (transform && !transform->isIdentity()) { + restore(); + } + return DrawGlInfo::kStatusDrew; } diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h index 03e2172..8d88bdc 100644 --- a/libs/hwui/Texture.h +++ b/libs/hwui/Texture.h @@ -36,6 +36,8 @@ struct Texture { minFilter = GL_NEAREST; magFilter = GL_NEAREST; + mipMap = false; + firstFilter = true; firstWrap = true; @@ -83,6 +85,8 @@ struct Texture { glBindTexture(renderTarget, id); } + if (mipMap && min == GL_LINEAR) min = GL_LINEAR_MIPMAP_LINEAR; + glTexParameteri(renderTarget, GL_TEXTURE_MIN_FILTER, min); glTexParameteri(renderTarget, GL_TEXTURE_MAG_FILTER, mag); } @@ -116,7 +120,12 @@ struct Texture { * Optional, size of the original bitmap. */ uint32_t bitmapSize; + /** + * Indicates whether this texture will use trilinear filtering. + */ + bool mipMap; +private: /** * Last wrap modes set on this texture. Defaults to GL_CLAMP_TO_EDGE. */ @@ -129,7 +138,6 @@ struct Texture { GLenum minFilter; GLenum magFilter; -private: bool firstFilter; bool firstWrap; }; // struct Texture diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 4d16bb4..10d112a 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -22,6 +22,7 @@ #include <utils/threads.h> +#include "Caches.h" #include "TextureCache.h" #include "Properties.h" @@ -216,8 +217,15 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege return; } + // We could also enable mipmapping if both bitmap dimensions are powers + // of 2 but we'd have to deal with size changes. Let's keep this simple + const bool canMipMap = Caches::getInstance().extensions.hasNPot(); + + // If the texture had mipmap enabled but not anymore, + // force a glTexImage2D to discard the mipmap levels const bool resize = !regenerate || bitmap->width() != int(texture->width) || - bitmap->height() != int(texture->height); + bitmap->height() != int(texture->height) || + (regenerate && canMipMap && texture->mipMap && !bitmap->hasHardwareMipMap()); if (!regenerate) { glGenTextures(1, &texture->id); @@ -261,6 +269,13 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege break; } + if (canMipMap) { + texture->mipMap = bitmap->hasHardwareMipMap(); + if (texture->mipMap) { + glGenerateMipmap(GL_TEXTURE_2D); + } + } + if (!regenerate) { texture->setFilter(GL_NEAREST); texture->setWrap(GL_CLAMP_TO_EDGE); diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java index 9b1098e..1c60401 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java @@ -114,10 +114,10 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med mProcMemWriter = new BufferedWriter(new FileWriter (new File(MEDIA_PROCMEM_OUTPUT), true)); mProcMemWriter.write(this.getName() + "\n"); - mMemWriter = new BufferedWriter(new FileWriter - (new File(MEDIA_MEMORY_OUTPUT), true)); } - + mMemWriter = new BufferedWriter(new FileWriter + (new File(MEDIA_MEMORY_OUTPUT), true)); + mMemWriter.write(this.getName() + "\n"); } @Override @@ -126,10 +126,10 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med MediaTestUtil.getNativeHeapDump(this.getName() + "_after"); if (MediaFrameworkPerfTestRunner.mGetProcmem) { - mMemWriter.write("\n"); mProcMemWriter.close(); - mMemWriter.close(); } + mMemWriter.write("\n"); + mMemWriter.close(); super.tearDown(); } diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notifications.png b/packages/SystemUI/res/drawable-hdpi/ic_notifications.png Binary files differdeleted file mode 100644 index 612ab72..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_notifications.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notifications2.png b/packages/SystemUI/res/drawable-hdpi/ic_notifications2.png Binary files differdeleted file mode 100644 index 315c488..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_notifications2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notifications_normal.png b/packages/SystemUI/res/drawable-hdpi/ic_notifications_normal.png Binary files differnew file mode 100644 index 0000000..62afe76 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/ic_notifications_normal.png diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png Binary files differindex a54761f..ead184d 100644 --- a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png +++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png Binary files differindex f3f336c..203e232 100644 --- a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png +++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_open_normal.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_open_normal.png Binary files differnew file mode 100644 index 0000000..2adafea --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_open_normal.png diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_open_pressed.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_open_pressed.png Binary files differnew file mode 100644 index 0000000..8521ffc --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_open_pressed.png diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_normal.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_normal.png Binary files differindex 172fd55..4436359 100644 --- a/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_normal.png +++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_normal.png diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_pressed.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_pressed.png Binary files differindex 5318a6e..c86710d 100644 --- a/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_pressed.png +++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_quicksettings_pressed.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notifications.png b/packages/SystemUI/res/drawable-mdpi/ic_notifications.png Binary files differdeleted file mode 100644 index 612ab72..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_notifications.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notifications2.png b/packages/SystemUI/res/drawable-mdpi/ic_notifications2.png Binary files differdeleted file mode 100644 index 1d07cbf..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_notifications2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notifications_normal.png b/packages/SystemUI/res/drawable-mdpi/ic_notifications_normal.png Binary files differnew file mode 100644 index 0000000..62afe76 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/ic_notifications_normal.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png Binary files differindex b44b527..5dacccb 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png Binary files differindex 94c8165..f1f6b00 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_open_normal.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_open_normal.png Binary files differnew file mode 100644 index 0000000..2ab0cd7 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_open_normal.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_open_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_open_pressed.png Binary files differnew file mode 100644 index 0000000..49ac94b --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_open_pressed.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_normal.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_normal.png Binary files differindex 6104424..09d2c55 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_normal.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_normal.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_pressed.png Binary files differindex 625da59..322d1a7 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_pressed.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_quicksettings_pressed.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notifications.png b/packages/SystemUI/res/drawable-xhdpi/ic_notifications.png Binary files differdeleted file mode 100644 index 28a902c..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_notifications.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notifications2.png b/packages/SystemUI/res/drawable-xhdpi/ic_notifications2.png Binary files differdeleted file mode 100644 index b02e7a1..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_notifications2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notifications_normal.png b/packages/SystemUI/res/drawable-xhdpi/ic_notifications_normal.png Binary files differnew file mode 100644 index 0000000..983302c --- /dev/null +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notifications_normal.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png Binary files differindex 870beb4..c882e9a 100644 --- a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png Binary files differindex 94a4646..992b50d 100644 --- a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_open_normal.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_open_normal.png Binary files differnew file mode 100644 index 0000000..b0e35a1 --- /dev/null +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_open_normal.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_open_pressed.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_open_pressed.png Binary files differnew file mode 100644 index 0000000..42bbbbc --- /dev/null +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_open_pressed.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_normal.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_normal.png Binary files differindex 477c067..2d445279 100644 --- a/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_normal.png +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_normal.png diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_pressed.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_pressed.png Binary files differindex 6e5c4af..ddf2c7a 100644 --- a/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_pressed.png +++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_quicksettings_pressed.png diff --git a/packages/SystemUI/res/drawable/ic_notifications.xml b/packages/SystemUI/res/drawable/ic_notifications.xml index 2c8012e..68c4774 100644 --- a/packages/SystemUI/res/drawable/ic_notifications.xml +++ b/packages/SystemUI/res/drawable/ic_notifications.xml @@ -16,8 +16,8 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/ic_notifications" /> + android:drawable="@drawable/ic_notifications_normal" /> <item - android:drawable="@drawable/ic_notifications" /> + android:drawable="@drawable/ic_notifications_normal" /> </selector> diff --git a/packages/SystemUI/res/drawable/ic_notify_quicksettings.xml b/packages/SystemUI/res/drawable/ic_notify_quicksettings.xml index d8ea524..7cf3175 100644 --- a/packages/SystemUI/res/drawable/ic_notify_quicksettings.xml +++ b/packages/SystemUI/res/drawable/ic_notify_quicksettings.xml @@ -16,7 +16,7 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/ic_notify_quicksettings_pressed" /> + android:drawable="@drawable/ic_notify_quicksettings_normal" /> <item android:drawable="@drawable/ic_notify_quicksettings_normal" /> </selector> diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml index 5408f76..b71025e 100644 --- a/packages/SystemUI/res/layout/status_bar_expanded.xml +++ b/packages/SystemUI/res/layout/status_bar_expanded.xml @@ -63,7 +63,7 @@ android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:layout_height="wrap_content" android:layout_width="match_parent" - android:paddingBottom="4dp" + android:padding="4dp" android:gravity="center" android:visibility="gone" /> diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml index c13405a..03f03e2 100644 --- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml +++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml @@ -20,37 +20,40 @@ xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui" android:id="@+id/header" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="@dimen/notification_panel_header_height" android:background="@drawable/notification_header_bg" android:orientation="horizontal" android:gravity="center_vertical" android:baselineAligned="false" > - <LinearLayout + <RelativeLayout + android:id="@+id/datetime" android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" + android:layout_height="match_parent" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:background="@drawable/ic_notify_button_bg" + android:enabled="false" > <com.android.systemui.statusbar.policy.Clock android:id="@+id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" android:singleLine="true" android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" - android:gravity="bottom" + android:layout_centerVertical="true" /> <com.android.systemui.statusbar.policy.DateView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" android:singleLine="true" android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" - android:gravity="bottom" + android:layout_toRightOf="@id/clock" + android:layout_alignBaseline="@id/clock" /> - </LinearLayout> + </RelativeLayout> <Space android:layout_width="0dp" diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml index 07aca6c..2b56618 100644 --- a/packages/SystemUI/res/layout/super_status_bar.xml +++ b/packages/SystemUI/res/layout/super_status_bar.xml @@ -36,7 +36,6 @@ android:id="@+id/panel_holder" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="@*android:dimen/status_bar_height" > <include layout="@layout/status_bar_expanded" android:layout_width="match_parent" diff --git a/packages/SystemUI/res/layout/system_bar_notification_panel_title.xml b/packages/SystemUI/res/layout/system_bar_notification_panel_title.xml index 2d1bda4..59544f4 100644 --- a/packages/SystemUI/res/layout/system_bar_notification_panel_title.xml +++ b/packages/SystemUI/res/layout/system_bar_notification_panel_title.xml @@ -170,7 +170,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_sysbar_quicksettings" - android:contentDescription="@string/accessibility_settings_button" + android:contentDescription="@string/accessibility_desc_quick_settings" /> <ImageView diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml index f7f963e..da78d29 100644 --- a/packages/SystemUI/res/values-ar/strings.xml +++ b/packages/SystemUI/res/values-ar/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"تم تجاهل الإشعار."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"مركز الإشعارات."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"الإعدادات السريعة."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"التطبيقات الحديثة"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"المستخدم <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"الجوال <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml index 4b8aad2..79bc53a 100644 --- a/packages/SystemUI/res/values-be/strings.xml +++ b/packages/SystemUI/res/values-be/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Апавяшчэнне прапушчана."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Цень апавяшчэння.."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Хуткія налады."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Апошнія прыкладанні."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Карыстальнік: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Мабiльны сiгнал: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml index c05fc59..59ba693 100644 --- a/packages/SystemUI/res/values-bg/strings.xml +++ b/packages/SystemUI/res/values-bg/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Известието е отхвърлено."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Падащ панел с известия."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Бързи настройки."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Скорошни приложения."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Потребител: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Мобилно устройство: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml index 72fe18e..5e632fa 100644 --- a/packages/SystemUI/res/values-cs/strings.xml +++ b/packages/SystemUI/res/values-cs/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Oznámení je zavřeno."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Panel oznámení."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Rychlé nastavení."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Naposledy použité aplikace"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Uživatel <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobil: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml index 2575d2c..3e767a0 100644 --- a/packages/SystemUI/res/values-de/strings.xml +++ b/packages/SystemUI/res/values-de/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Benachrichtigung geschlossen"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Benachrichtigungsleiste"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Schnelleinstellungen"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Kürzlich geöffnete Apps"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Nutzer: <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>, <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobilfunkverbindung: <xliff:g id="SIGNAL">%1$s</xliff:g>, <xliff:g id="TYPE">%2$s</xliff:g>, <xliff:g id="NETWORK">%3$s</xliff:g>"</string> diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml index 1460996..9bbd5d7 100644 --- a/packages/SystemUI/res/values-es-rUS/strings.xml +++ b/packages/SystemUI/res/values-es-rUS/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Notificación ignorada"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Pantalla de notificaciones"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Configuración rápida"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Aplicaciones recientes"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Usuario <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Móvil <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml index d984bf8..6accc9f 100644 --- a/packages/SystemUI/res/values-fa/strings.xml +++ b/packages/SystemUI/res/values-fa/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"اعلان ردشد."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"مجموعه اعلان."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"تنظیمات سریع."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"برنامههای اخیر"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"کاربر <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"تلفن همراه <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml index 9d28900..3bc0371 100644 --- a/packages/SystemUI/res/values-fi/strings.xml +++ b/packages/SystemUI/res/values-fi/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Ilmoitus hylätty."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Ilmoitusalue."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Pika-asetukset."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Viimeaikaiset sovellukset"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Käyttäjä: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobiiliverkkoyhteys: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml index ab98d24..02eb529 100644 --- a/packages/SystemUI/res/values-fr/strings.xml +++ b/packages/SystemUI/res/values-fr/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Notification masquée"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Volet des notifications"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Paramètres rapides"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Applications récentes"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Utilisateur <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>, <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Signal mobile : <xliff:g id="SIGNAL">%1$s</xliff:g>, <xliff:g id="TYPE">%2$s</xliff:g>, <xliff:g id="NETWORK">%3$s</xliff:g>"</string> diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml index 718d267..e2bc2c3 100644 --- a/packages/SystemUI/res/values-hi/strings.xml +++ b/packages/SystemUI/res/values-hi/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"सूचना खारिज की गई."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"सूचना शेड."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"त्वरित सेटिंग."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"हाल ही के एप्लिकेशन."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"उपयोगकर्ता <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"मोबाइल <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml index bd19a44..e318120 100644 --- a/packages/SystemUI/res/values-hr/strings.xml +++ b/packages/SystemUI/res/values-hr/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Obavijest je odbačena."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Zaslon obavijesti."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Brze postavke."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Nedavne aplikacije."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Korisnik <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobitel <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml index 96bb897..3dafd2b 100644 --- a/packages/SystemUI/res/values-hu/strings.xml +++ b/packages/SystemUI/res/values-hu/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Értesítés elvetve."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Értesítési felület."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Gyorsbeállítások."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Legutóbbi alkalmazások"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Felhasználó: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobil <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml index dce8076..c26cdce 100644 --- a/packages/SystemUI/res/values-in/strings.xml +++ b/packages/SystemUI/res/values-in/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Pemberitahuan disingkirkan."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Bayangan pemberitahuan."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Setelan cepat."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Aplikasi terkini."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Pengguna <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Seluler <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml index a1e7aba..0481d63 100644 --- a/packages/SystemUI/res/values-iw/strings.xml +++ b/packages/SystemUI/res/values-iw/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"הודעה נדחתה."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"תריס התראות."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"הגדרות מהירות."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"יישומים אחרונים"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"משתמש <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"נייד <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml index 23babd0..1b89e13 100644 --- a/packages/SystemUI/res/values-ja/strings.xml +++ b/packages/SystemUI/res/values-ja/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"通知が削除されました。"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"通知シェード"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"クイック設定"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"最近使ったアプリです。"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"ユーザー: <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>、<xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"モバイル: <xliff:g id="SIGNAL">%1$s</xliff:g>、<xliff:g id="TYPE">%2$s</xliff:g>、<xliff:g id="NETWORK">%3$s</xliff:g>"</string> diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml index f01d7eb..71d305f 100644 --- a/packages/SystemUI/res/values-ko/strings.xml +++ b/packages/SystemUI/res/values-ko/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"알림이 제거되었습니다."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"알림 세부정보"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"빠른 설정"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"최근 앱"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"사용자 <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"모바일 <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml index a70c12e..01751b0 100644 --- a/packages/SystemUI/res/values-ms/strings.xml +++ b/packages/SystemUI/res/values-ms/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Pemberitahuan diketepikan."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Bidai pemberitahuan."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Tetapan pantas."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Apl terbaru."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Pengguna <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mudah Alih <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml index d3df443..98f13c7 100644 --- a/packages/SystemUI/res/values-pl/strings.xml +++ b/packages/SystemUI/res/values-pl/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Zamknięto powiadomienie."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Obszar powiadomień."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Szybkie ustawienia."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Ostatnii używane aplikacje."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Użytkownik: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Sieć komórkowa: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml index a4a871e..9eeb01b 100644 --- a/packages/SystemUI/res/values-pt/strings.xml +++ b/packages/SystemUI/res/values-pt/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Notificação dispensada."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Aba de notificações."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Configurações rápidas."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Aplicativos recentes."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Usuário <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Celular <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml index a73ad1a..616ddb7 100644 --- a/packages/SystemUI/res/values-ro/strings.xml +++ b/packages/SystemUI/res/values-ro/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Notificarea a fost închisă."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Fereastră pentru notificări."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Setări rapide."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Aplicaţii recente"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Utilizatorul <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Semnal mobil: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml index a04d732..6e10de4 100644 --- a/packages/SystemUI/res/values-ru/strings.xml +++ b/packages/SystemUI/res/values-ru/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Уведомление закрыто"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Панель уведомлений"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Быстрые настройки"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Недавние приложения"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Пользователь <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="NETWORK">%2$s</xliff:g>: <xliff:g id="SIGNAL">%1$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Мобильная сеть: <xliff:g id="NETWORK">%3$s</xliff:g> (<xliff:g id="TYPE">%2$s</xliff:g>, <xliff:g id="SIGNAL">%1$s</xliff:g>)"</string> diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml index 6d126b1..9151512 100644 --- a/packages/SystemUI/res/values-sk/strings.xml +++ b/packages/SystemUI/res/values-sk/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Upozornenie bolo zrušené."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Panel upozornení."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Rýchle nastavenia."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Nedávne aplikácie"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Používateľ: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobil: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml index 2d4006b..7be851c 100644 --- a/packages/SystemUI/res/values-sl/strings.xml +++ b/packages/SystemUI/res/values-sl/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Obvestilo je bilo odstranjeno."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Zaslon z obvestili."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Hitre nastavitve."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Nedavne aplikacije."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Uporabnik: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobilni telefon: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml index fce2c57..9d9da87 100644 --- a/packages/SystemUI/res/values-sr/strings.xml +++ b/packages/SystemUI/res/values-sr/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Обавештење је одбачено."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Прозор са обавештењима."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Брза подешавања."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Недавне апликације."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Корисник: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Мобилна мрежа: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml index 16b8316..bae649d 100644 --- a/packages/SystemUI/res/values-sv/strings.xml +++ b/packages/SystemUI/res/values-sv/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Meddelandet ignorerades."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Meddelandepanel."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Snabbinställningar."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Senaste apparna"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Användare <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobil <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index df6ed19..fc80f5c 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -47,4 +47,8 @@ <!-- Minimum fraction of the screen that should be taken up by the notification panel. --> <item type="dimen" name="notification_panel_min_height_frac">40%</item> + + <!-- How far to slide the panel out when you touch it --> + <!-- On tablets this is just the close_handle_height --> + <dimen name="peek_height">@dimen/close_handle_height</dimen> </resources> diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml index 646225d..668504e 100644 --- a/packages/SystemUI/res/values-th/strings.xml +++ b/packages/SystemUI/res/values-th/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"ปิดการแจ้งเตือนแล้ว"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"หน้าต่างแจ้งเตือน"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"การตั้งค่าด่วน"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"แอปพลิเคชันล่าสุด"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"ผู้ใช้ <xliff:g id="USER">%s</xliff:g>"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g> <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"มือถือ <xliff:g id="SIGNAL">%1$s</xliff:g> <xliff:g id="TYPE">%2$s</xliff:g> <xliff:g id="NETWORK">%3$s</xliff:g>"</string> diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml index 7baad61..312d8fd 100644 --- a/packages/SystemUI/res/values-tl/strings.xml +++ b/packages/SystemUI/res/values-tl/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Na-dismiss ang notification."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Notification shade."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Mga mabilisang setting."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Kamakailang apps."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"User na si <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobile <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml index c6ba738..5012bc5 100644 --- a/packages/SystemUI/res/values-tr/strings.xml +++ b/packages/SystemUI/res/values-tr/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Bildirim kapatıldı."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Bildirim gölgesi."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Hızlı ayarlar."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Son uygulamalar."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Kullanıcı: <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobil <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml index 26ae34b..ba36be6 100644 --- a/packages/SystemUI/res/values-uk/strings.xml +++ b/packages/SystemUI/res/values-uk/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Сповіщення відхилено."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Панель сповіщень."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Швидке налаштування."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Нещодавні програми."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Користувач <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>, <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Мобільне передавання даних: <xliff:g id="SIGNAL">%1$s</xliff:g>, <xliff:g id="TYPE">%2$s</xliff:g>, <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml index 468375f..ce90afc 100644 --- a/packages/SystemUI/res/values-vi/strings.xml +++ b/packages/SystemUI/res/values-vi/strings.xml @@ -147,8 +147,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"Đã loại bỏ thông báo."</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"Bóng thông báo."</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"Cài đặt nhanh."</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"Ứng dụng gần đây."</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"Người dùng <xliff:g id="USER">%s</xliff:g>."</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Di động <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml index 4cfb7d0..ba0d9c8 100644 --- a/packages/SystemUI/res/values-zh-rCN/strings.xml +++ b/packages/SystemUI/res/values-zh-rCN/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"已关闭通知。"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"通知栏。"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"快速设置。"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"最近使用的应用。"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"用户:<xliff:g id="USER">%s</xliff:g>。"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>,<xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"移动数据连接:<xliff:g id="SIGNAL">%1$s</xliff:g>,<xliff:g id="TYPE">%2$s</xliff:g>,<xliff:g id="NETWORK">%3$s</xliff:g>。"</string> diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml index d0323f0..a77dd8c 100644 --- a/packages/SystemUI/res/values-zh-rTW/strings.xml +++ b/packages/SystemUI/res/values-zh-rTW/strings.xml @@ -149,8 +149,7 @@ <string name="accessibility_notification_dismissed" msgid="854211387186306927">"已關閉通知。"</string> <string name="accessibility_desc_notification_shade" msgid="4690274844447504208">"通知欄。"</string> <string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"快速設定。"</string> - <!-- no translation found for accessibility_desc_recent_apps (9014032916410590027) --> - <skip /> + <string name="accessibility_desc_recent_apps" msgid="9014032916410590027">"最近使用的應用程式。"</string> <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"使用者:<xliff:g id="USER">%s</xliff:g>。"</string> <string name="accessibility_quick_settings_wifi" msgid="6099781031669728709">"<xliff:g id="SIGNAL">%1$s</xliff:g>,<xliff:g id="NETWORK">%2$s</xliff:g>"</string> <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"行動數據連線:<xliff:g id="SIGNAL">%1$s</xliff:g>,<xliff:g id="TYPE">%2$s</xliff:g>,<xliff:g id="NETWORK">%3$s</xliff:g>。"</string> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 4de0891..ed08115 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -201,4 +201,8 @@ <!-- The size of the gesture span needed to activate the "pull" notification expansion --> <dimen name="pull_span_min">25dp</dimen> + + <!-- How far to slide the panel out when you touch it --> + <!-- For phones, this is close_handle_height + header_height --> + <dimen name="peek_height">84dp</dimen> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index c832fb8..248a516 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -21,6 +21,8 @@ import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.util.AttributeSet; +import android.util.Slog; +import android.view.MotionEvent; import android.view.View; import com.android.systemui.R; @@ -31,11 +33,18 @@ public class NotificationPanelView extends PanelView { Drawable mHandleBar; float mHandleBarHeight; View mHandleView; + int mFingers; + PhoneStatusBar mStatusBar; + boolean mOkToFlip; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); } + public void setStatusBar(PhoneStatusBar bar) { + mStatusBar = bar; + } + @Override protected void onFinishInflate() { super.onFinishInflate(); @@ -79,4 +88,35 @@ public class NotificationPanelView extends PanelView { mHandleBar.draw(canvas); canvas.translate(0, -off); } + + @Override + public boolean onTouchEvent(MotionEvent event) { + if (PhoneStatusBar.SETTINGS_DRAG_SHORTCUT && mStatusBar.mHasFlipSettings) { + switch (event.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + mOkToFlip = getExpandedHeight() == 0; + break; + case MotionEvent.ACTION_POINTER_DOWN: + if (mOkToFlip) { + float miny = event.getY(0); + float maxy = miny; + for (int i=1; i<event.getPointerCount(); i++) { + final float y = event.getY(i); + if (y < miny) miny = y; + if (y > maxy) maxy = y; + } + if (maxy - miny < mHandleBarHeight) { + if (getMeasuredHeight() < mHandleBarHeight) { + mStatusBar.switchToSettings(); + } else { + mStatusBar.flipToSettings(); + } + mOkToFlip = false; + } + } + break; + } + } + return mHandleView.dispatchTouchEvent(event); + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java index d0fc340..c9a137c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java @@ -102,7 +102,7 @@ public class PanelBar extends FrameLayout { startOpeningPanel(panel); } final boolean result = mTouchingPanel != null - ? mTouchingPanel.getHandle().dispatchTouchEvent(event) + ? mTouchingPanel.onTouchEvent(event) : true; return result; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index 7eb84e1..6184e30 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -98,7 +98,7 @@ public class PanelView extends FrameLayout { if (mPeekAnimator == null) { mPeekAnimator = ObjectAnimator.ofFloat(this, "expandedHeight", mPeekHeight) - .setDuration(300); + .setDuration(250); } mPeekAnimator.start(); } @@ -206,7 +206,7 @@ public class PanelView extends FrameLayout { mFlingGestureMaxOutputVelocityPx = res.getDimension(R.dimen.fling_gesture_max_output_velocity); - mPeekHeight = res.getDimension(R.dimen.close_handle_height) + mPeekHeight = res.getDimension(R.dimen.peek_height) + getPaddingBottom() // our window might have a dropshadow - (mHandleView == null ? 0 : mHandleView.getPaddingTop()); // the handle might have a topshadow } @@ -250,6 +250,7 @@ public class PanelView extends FrameLayout { case MotionEvent.ACTION_DOWN: mTracking = true; mHandleView.setPressed(true); + postInvalidate(); // catch the press state change mInitialTouchY = y; mVelocityTracker = VelocityTracker.obtain(); trackMovement(event); @@ -283,6 +284,7 @@ public class PanelView extends FrameLayout { mFinalTouchY = y; mTracking = false; mHandleView.setPressed(false); + postInvalidate(); // catch the press state change mBar.onTrackingStopped(PanelView.this); trackMovement(event); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index d4ccf96..27a4db5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -110,6 +110,8 @@ public class PhoneStatusBar extends BaseStatusBar { public static final boolean ENABLE_NOTIFICATION_PANEL_CLING = false; + public static final boolean SETTINGS_DRAG_SHORTCUT = true; + // additional instrumentation for testing purposes; intended to be left on during development public static final boolean CHATTY = DEBUG; @@ -180,7 +182,7 @@ public class PhoneStatusBar extends BaseStatusBar { View mMoreIcon; // expanded notifications - PanelView mNotificationPanel; // the sliding/resizing panel within the notification window + NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window ScrollView mScrollView; View mExpandedContents; int mNotificationPanelGravity; @@ -198,6 +200,8 @@ public class PhoneStatusBar extends BaseStatusBar { int mSettingsPanelGravity; // top bar + View mNotificationPanelHeader; + View mDateTimeView; View mClearButton; ImageView mSettingsButton, mNotificationButton; @@ -295,7 +299,7 @@ public class PhoneStatusBar extends BaseStatusBar { if (MULTIUSER_DEBUG) Slog.d(TAG, String.format("User setup changed: " + "selfChange=%s userSetup=%s mUserSetup=%s", selfChange, userSetup, mUserSetup)); - if (mSettingsButton != null) { + if (mSettingsButton != null && !mHasSettingsPanel) { mSettingsButton.setVisibility(userSetup ? View.VISIBLE : View.INVISIBLE); } if (mSettingsPanel != null) { @@ -361,7 +365,8 @@ public class PhoneStatusBar extends BaseStatusBar { PanelHolder holder = (PanelHolder) mStatusBarWindow.findViewById(R.id.panel_holder); mStatusBarView.setPanelHolder(holder); - mNotificationPanel = (PanelView) mStatusBarWindow.findViewById(R.id.notification_panel); + mNotificationPanel = (NotificationPanelView) mStatusBarWindow.findViewById(R.id.notification_panel); + mNotificationPanel.setStatusBar(this); mNotificationPanelIsFullScreenWidth = (mNotificationPanel.getLayoutParams().width == ViewGroup.LayoutParams.MATCH_PARENT); @@ -420,6 +425,8 @@ public class PhoneStatusBar extends BaseStatusBar { mPile.setLongPressListener(getNotificationLongClicker()); mExpandedContents = mPile; // was: expanded.findViewById(R.id.notificationLinearLayout); + mNotificationPanelHeader = mStatusBarWindow.findViewById(R.id.header); + mClearButton = mStatusBarWindow.findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); mClearButton.setAlpha(0f); @@ -430,6 +437,12 @@ public class PhoneStatusBar extends BaseStatusBar { mHasSettingsPanel = res.getBoolean(R.bool.config_hasSettingsPanel); mHasFlipSettings = res.getBoolean(R.bool.config_hasFlipSettingsPanel); + mDateTimeView = mNotificationPanelHeader.findViewById(R.id.datetime); + if (mHasFlipSettings) { + mDateTimeView.setOnClickListener(mClockClickListener); + mDateTimeView.setEnabled(true); + } + mSettingsButton = (ImageView) mStatusBarWindow.findViewById(R.id.settings_button); if (mSettingsButton != null) { mSettingsButton.setOnClickListener(mSettingsButtonListener); @@ -457,10 +470,12 @@ public class PhoneStatusBar extends BaseStatusBar { mScrollView = (ScrollView)mStatusBarWindow.findViewById(R.id.scroll); mScrollView.setVerticalScrollBarEnabled(false); // less drawing during pulldowns - mScrollView.setSystemUiVisibility( - View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER | - View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS | - View.STATUS_BAR_DISABLE_CLOCK); + if (!mNotificationPanelIsFullScreenWidth) { + mScrollView.setSystemUiVisibility( + View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER | + View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS | + View.STATUS_BAR_DISABLE_CLOCK); + } mTicker = new MyTicker(context, mStatusBarView); @@ -488,6 +503,8 @@ public class PhoneStatusBar extends BaseStatusBar { mEmergencyCallLabel = (TextView)mStatusBarWindow.findViewById(R.id.emergency_calls_only); if (mEmergencyCallLabel != null) { mNetworkController.addEmergencyLabelView(mEmergencyCallLabel); + mEmergencyCallLabel.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { }}); mEmergencyCallLabel.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, @@ -553,10 +570,11 @@ public class PhoneStatusBar extends BaseStatusBar { mStatusBarWindow.findViewById(R.id.quick_settings_container); if (mSettingsContainer != null) { mQS = new QuickSettings(mContext, mSettingsContainer); - mSettingsContainer.setSystemUiVisibility( - View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER - | View.STATUS_BAR_DISABLE_SYSTEM_INFO); - + if (!mNotificationPanelIsFullScreenWidth) { + mSettingsContainer.setSystemUiVisibility( + View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER + | View.STATUS_BAR_DISABLE_SYSTEM_INFO); + } if (mSettingsPanel != null) { mSettingsPanel.setQuickSettings(mQS); } @@ -1064,7 +1082,13 @@ public class PhoneStatusBar extends BaseStatusBar { + " any=" + any + " clearable=" + clearable); } - if (mClearButton.isShown()) { + if (mHasFlipSettings + && mFlipSettingsView != null + && mFlipSettingsView.getVisibility() == View.VISIBLE + && mScrollView.getVisibility() != View.VISIBLE) { + // the flip settings panel is unequivocally showing; we should not be shown + mClearButton.setVisibility(View.INVISIBLE); + } else if (mClearButton.isShown()) { if (clearable != (mClearButton.getAlpha() == 1.0f)) { ObjectAnimator clearAnimation = ObjectAnimator.ofFloat( mClearButton, "alpha", clearable ? 1.0f : 0.0f).setDuration(250); @@ -1265,6 +1289,10 @@ public class PhoneStatusBar extends BaseStatusBar { } } + public Handler getHandler() { + return mHandler; + } + View.OnFocusChangeListener mFocusChangeListener = new View.OnFocusChangeListener() { public void onFocusChange(View v, boolean hasFocus) { // Because 'v' is a ViewGroup, all its children will be (un)selected @@ -1279,17 +1307,6 @@ public class PhoneStatusBar extends BaseStatusBar { return; } - if (mHasFlipSettings && !mExpandedVisible) { - // reset things to their proper state - mScrollView.setScaleX(1f); - mScrollView.setVisibility(View.VISIBLE); - mSettingsButton.setAlpha(1f); - mSettingsButton.setVisibility(View.VISIBLE); - mNotificationPanel.setVisibility(View.GONE); - mFlipSettingsView.setVisibility(View.GONE); - mNotificationButton.setVisibility(View.GONE); - } - mExpandedVisible = true; mPile.setLayoutTransitionsEnabled(true); if (mNavigationBarView != null) @@ -1399,51 +1416,53 @@ public class PhoneStatusBar extends BaseStatusBar { } mNotificationPanel.expand(); - if (mHasFlipSettings) { - if (mScrollView.getVisibility() != View.VISIBLE) { - if (mFlipSettingsViewAnim != null) mFlipSettingsViewAnim.cancel(); - if (mScrollViewAnim != null) mScrollViewAnim.cancel(); - if (mSettingsButtonAnim != null) mSettingsButtonAnim.cancel(); - if (mNotificationButtonAnim != null) mNotificationButtonAnim.cancel(); - if (mClearButtonAnim != null) mClearButtonAnim.cancel(); - - mScrollView.setVisibility(View.VISIBLE); - mScrollViewAnim = start( - startDelay(FLIP_DURATION_OUT, - interpolator(mDecelerateInterpolator, - ObjectAnimator.ofFloat(mScrollView, View.SCALE_X, 0f, 1f) - .setDuration(FLIP_DURATION_IN) - ))); - mFlipSettingsViewAnim = start( - setVisibilityWhenDone( - interpolator(mAccelerateInterpolator, - ObjectAnimator.ofFloat(mFlipSettingsView, View.SCALE_X, 1f, 0f) - ) - .setDuration(FLIP_DURATION_OUT), - mFlipSettingsView, View.INVISIBLE)); - mNotificationButtonAnim = start( - setVisibilityWhenDone( - ObjectAnimator.ofFloat(mNotificationButton, View.ALPHA, 0f) - .setDuration(FLIP_DURATION), - mNotificationButton, View.INVISIBLE)); - mSettingsButton.setVisibility(View.VISIBLE); - mSettingsButtonAnim = start( - ObjectAnimator.ofFloat(mSettingsButton, View.ALPHA, 1f) - .setDuration(FLIP_DURATION)); - mClearButton.setVisibility(View.VISIBLE); - mClearButton.setAlpha(0f); - setAreThereNotifications(); // this will show/hide the button as necessary - mNotificationPanel.postDelayed(new Runnable() { - public void run() { - updateCarrierLabelVisibility(false); - } - }, FLIP_DURATION - 150); - } + if (mHasFlipSettings && mScrollView.getVisibility() != View.VISIBLE) { + flipToNotifications(); } if (false) postStartTracing(); } + public void flipToNotifications() { + if (mFlipSettingsViewAnim != null) mFlipSettingsViewAnim.cancel(); + if (mScrollViewAnim != null) mScrollViewAnim.cancel(); + if (mSettingsButtonAnim != null) mSettingsButtonAnim.cancel(); + if (mNotificationButtonAnim != null) mNotificationButtonAnim.cancel(); + if (mClearButtonAnim != null) mClearButtonAnim.cancel(); + + mScrollView.setVisibility(View.VISIBLE); + mScrollViewAnim = start( + startDelay(FLIP_DURATION_OUT, + interpolator(mDecelerateInterpolator, + ObjectAnimator.ofFloat(mScrollView, View.SCALE_X, 0f, 1f) + .setDuration(FLIP_DURATION_IN) + ))); + mFlipSettingsViewAnim = start( + setVisibilityWhenDone( + interpolator(mAccelerateInterpolator, + ObjectAnimator.ofFloat(mFlipSettingsView, View.SCALE_X, 1f, 0f) + ) + .setDuration(FLIP_DURATION_OUT), + mFlipSettingsView, View.INVISIBLE)); + mNotificationButtonAnim = start( + setVisibilityWhenDone( + ObjectAnimator.ofFloat(mNotificationButton, View.ALPHA, 0f) + .setDuration(FLIP_DURATION), + mNotificationButton, View.INVISIBLE)); + mSettingsButton.setVisibility(View.VISIBLE); + mSettingsButtonAnim = start( + ObjectAnimator.ofFloat(mSettingsButton, View.ALPHA, 1f) + .setDuration(FLIP_DURATION)); + mClearButton.setVisibility(View.VISIBLE); + mClearButton.setAlpha(0f); + setAreThereNotifications(); // this will show/hide the button as necessary + mNotificationPanel.postDelayed(new Runnable() { + public void run() { + updateCarrierLabelVisibility(false); + } + }, FLIP_DURATION - 150); + } + @Override public void animateExpandSettingsPanel() { if (SPEW) Slog.d(TAG, "animateExpand: mExpandedVisible=" + mExpandedVisible); @@ -1454,46 +1473,7 @@ public class PhoneStatusBar extends BaseStatusBar { if (mHasFlipSettings) { mNotificationPanel.expand(); if (mFlipSettingsView.getVisibility() != View.VISIBLE) { - if (mFlipSettingsViewAnim != null) mFlipSettingsViewAnim.cancel(); - if (mScrollViewAnim != null) mScrollViewAnim.cancel(); - if (mSettingsButtonAnim != null) mSettingsButtonAnim.cancel(); - if (mNotificationButtonAnim != null) mNotificationButtonAnim.cancel(); - if (mClearButtonAnim != null) mClearButtonAnim.cancel(); - - mFlipSettingsView.setVisibility(View.VISIBLE); - mFlipSettingsView.setScaleX(0f); - mFlipSettingsViewAnim = start( - startDelay(FLIP_DURATION_OUT, - interpolator(mDecelerateInterpolator, - ObjectAnimator.ofFloat(mFlipSettingsView, View.SCALE_X, 0f, 1f) - .setDuration(FLIP_DURATION_IN) - ))); - mScrollViewAnim = start( - setVisibilityWhenDone( - interpolator(mAccelerateInterpolator, - ObjectAnimator.ofFloat(mScrollView, View.SCALE_X, 1f, 0f) - ) - .setDuration(FLIP_DURATION_OUT), - mScrollView, View.INVISIBLE)); - mSettingsButtonAnim = start( - setVisibilityWhenDone( - ObjectAnimator.ofFloat(mSettingsButton, View.ALPHA, 0f) - .setDuration(FLIP_DURATION), - mScrollView, View.INVISIBLE)); - mNotificationButton.setVisibility(View.VISIBLE); - mNotificationButtonAnim = start( - ObjectAnimator.ofFloat(mNotificationButton, View.ALPHA, 1f) - .setDuration(FLIP_DURATION)); - mClearButtonAnim = start( - setVisibilityWhenDone( - ObjectAnimator.ofFloat(mClearButton, View.ALPHA, 0f) - .setDuration(FLIP_DURATION), - mClearButton, View.INVISIBLE)); - mNotificationPanel.postDelayed(new Runnable() { - public void run() { - updateCarrierLabelVisibility(false); - } - }, FLIP_DURATION - 150); + flipToSettings(); } } else if (mSettingsPanel != null) { mSettingsPanel.expand(); @@ -1502,10 +1482,77 @@ public class PhoneStatusBar extends BaseStatusBar { if (false) postStartTracing(); } + public void switchToSettings() { + mFlipSettingsView.setScaleX(1f); + mFlipSettingsView.setVisibility(View.VISIBLE); + mSettingsButton.setVisibility(View.GONE); + mScrollView.setVisibility(View.GONE); + mNotificationButton.setVisibility(View.VISIBLE); + mNotificationButton.setAlpha(1f); + mClearButton.setVisibility(View.GONE); + } + + public void flipToSettings() { + if (mFlipSettingsViewAnim != null) mFlipSettingsViewAnim.cancel(); + if (mScrollViewAnim != null) mScrollViewAnim.cancel(); + if (mSettingsButtonAnim != null) mSettingsButtonAnim.cancel(); + if (mNotificationButtonAnim != null) mNotificationButtonAnim.cancel(); + if (mClearButtonAnim != null) mClearButtonAnim.cancel(); + + mFlipSettingsView.setVisibility(View.VISIBLE); + mFlipSettingsView.setScaleX(0f); + mFlipSettingsViewAnim = start( + startDelay(FLIP_DURATION_OUT, + interpolator(mDecelerateInterpolator, + ObjectAnimator.ofFloat(mFlipSettingsView, View.SCALE_X, 0f, 1f) + .setDuration(FLIP_DURATION_IN) + ))); + mScrollViewAnim = start( + setVisibilityWhenDone( + interpolator(mAccelerateInterpolator, + ObjectAnimator.ofFloat(mScrollView, View.SCALE_X, 1f, 0f) + ) + .setDuration(FLIP_DURATION_OUT), + mScrollView, View.INVISIBLE)); + mSettingsButtonAnim = start( + setVisibilityWhenDone( + ObjectAnimator.ofFloat(mSettingsButton, View.ALPHA, 0f) + .setDuration(FLIP_DURATION), + mScrollView, View.INVISIBLE)); + mNotificationButton.setVisibility(View.VISIBLE); + mNotificationButtonAnim = start( + ObjectAnimator.ofFloat(mNotificationButton, View.ALPHA, 1f) + .setDuration(FLIP_DURATION)); + mClearButtonAnim = start( + setVisibilityWhenDone( + ObjectAnimator.ofFloat(mClearButton, View.ALPHA, 0f) + .setDuration(FLIP_DURATION), + mClearButton, View.INVISIBLE)); + mNotificationPanel.postDelayed(new Runnable() { + public void run() { + updateCarrierLabelVisibility(false); + } + }, FLIP_DURATION - 150); + } + + public void flipPanels() { + if (mHasFlipSettings) { + if (mFlipSettingsView.getVisibility() != View.VISIBLE) { + flipToSettings(); + } else { + flipToNotifications(); + } + } + } + public void animateCollapseQuickSettings() { mStatusBarView.collapseAllPanels(true); } + void makeExpandedInvisibleSoon() { + mHandler.postDelayed(new Runnable() { public void run() { makeExpandedInvisible(); }}, 50); + } + void makeExpandedInvisible() { if (SPEW) Slog.d(TAG, "makeExpandedInvisible: mExpandedVisible=" + mExpandedVisible + " mExpandedVisible=" + mExpandedVisible); @@ -1517,6 +1564,18 @@ public class PhoneStatusBar extends BaseStatusBar { // Ensure the panel is fully collapsed (just in case; bug 6765842, 7260868) mStatusBarView.collapseAllPanels(/*animate=*/ false); + if (mHasFlipSettings) { + // reset things to their proper state + mScrollView.setScaleX(1f); + mScrollView.setVisibility(View.VISIBLE); + mSettingsButton.setAlpha(1f); + mSettingsButton.setVisibility(View.VISIBLE); + mNotificationPanel.setVisibility(View.GONE); + mFlipSettingsView.setVisibility(View.GONE); + mNotificationButton.setVisibility(View.GONE); + setAreThereNotifications(); // show the clear button + } + mExpandedVisible = false; mPile.setLayoutTransitionsEnabled(false); if (mNavigationBarView != null) @@ -2127,24 +2186,36 @@ public class PhoneStatusBar extends BaseStatusBar { } }; + public void startActivityDismissingKeyguard(Intent intent, boolean onlyProvisioned) { + if (onlyProvisioned && !isDeviceProvisioned()) return; + try { + // Dismiss the lock screen when Settings starts. + ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity(); + } catch (RemoteException e) { + } + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + mContext.startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT)); + animateCollapsePanels(); + } + private View.OnClickListener mSettingsButtonListener = new View.OnClickListener() { public void onClick(View v) { if (mHasSettingsPanel) { animateExpandSettingsPanel(); } else { - try { - // Dismiss the lock screen when Settings starts. - ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity(); - } catch (RemoteException e) { - } - Intent intent = new Intent(android.provider.Settings.ACTION_SETTINGS); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); - mContext.startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT)); - animateCollapsePanels(); + startActivityDismissingKeyguard( + new Intent(android.provider.Settings.ACTION_SETTINGS), true); } } }; + private View.OnClickListener mClockClickListener = new View.OnClickListener() { + public void onClick(View v) { + startActivityDismissingKeyguard( + new Intent(Intent.ACTION_QUICK_CLOCK), true); // have fun, everyone + } + }; + private View.OnClickListener mNotificationButtonListener = new View.OnClickListener() { public void onClick(View v) { animateExpandNotificationsPanel(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 3c2f0e6..af6a149 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -154,7 +154,8 @@ public class PhoneStatusBarView extends PanelBar { @Override public void onAllPanelsCollapsed() { super.onAllPanelsCollapsed(); - mBar.makeExpandedInvisible(); + // give animations time to settle + mBar.makeExpandedInvisibleSoon(); mFadingPanel = null; mLastFullyOpenedPanel = null; } @@ -191,14 +192,34 @@ public class PhoneStatusBarView extends PanelBar { if (panel == mFadingPanel && mScrimColor != 0 && ActivityManager.isHighEndGfx()) { if (mShouldFade) { frac = mPanelExpandedFractionSum; // don't judge me - // woo, special effects - final float k = (float)(1f-0.5f*(1f-Math.cos(3.14159f * Math.pow(1f-frac, 2.2f)))); - // attenuate background color alpha by k - final int color = (int) ((mScrimColor >>> 24) * k) << 24 | (mScrimColor & 0xFFFFFF); - mBar.mStatusBarWindow.setBackgroundColor(color); + // let's start this 20% of the way down the screen + frac = frac * 1.2f - 0.2f; + if (frac <= 0) { + mBar.mStatusBarWindow.setBackgroundColor(0); + } else { + // woo, special effects + final float k = (float)(1f-0.5f*(1f-Math.cos(3.14159f * Math.pow(1f-frac, 2f)))); + // attenuate background color alpha by k + final int color = (int) ((mScrimColor >>> 24) * k) << 24 | (mScrimColor & 0xFFFFFF); + mBar.mStatusBarWindow.setBackgroundColor(color); + } } } + // fade out the panel as it gets buried into the status bar to avoid overdrawing the + // status bar on the last frame of a close animation + final int H = mBar.getStatusBarHeight(); + final float ph = panel.getExpandedHeight() + panel.getPaddingBottom(); + float alpha = 1f; + if (ph < 2*H) { + if (ph < H) alpha = 0f; + else alpha = (ph - H) / H; + alpha = alpha * alpha; // get there faster + } + if (panel.getAlpha() != alpha) { + panel.setAlpha(alpha); + } + mBar.updateCarrierLabelVisibility(false); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java index 5b550c2..58e3a57 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java @@ -145,6 +145,7 @@ class QuickSettings { IntentFilter filter = new IntentFilter(); filter.addAction(DisplayManager.ACTION_WIFI_DISPLAY_STATUS_CHANGED); filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED); + filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); filter.addAction(Intent.ACTION_USER_SWITCHED); mContext.registerReceiver(mReceiver, filter); @@ -321,7 +322,31 @@ class QuickSettings { parent.addView(userTile); mDynamicSpannedTiles.add(userTile); + // Brightness + QuickSettingsTileView brightnessTile = (QuickSettingsTileView) + inflater.inflate(R.layout.quick_settings_tile, parent, false); + brightnessTile.setContent(R.layout.quick_settings_tile_brightness, inflater); + brightnessTile.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + mBar.collapseAllPanels(true); + showBrightnessDialog(); + } + }); + mModel.addBrightnessTile(brightnessTile, new QuickSettingsModel.RefreshCallback() { + @Override + public void refreshView(QuickSettingsTileView view, State state) { + TextView tv = (TextView) view.findViewById(R.id.brightness_textview); + tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0); + tv.setText(state.label); + dismissBrightnessDialog(mBrightnessDialogShortTimeout); + } + }); + parent.addView(brightnessTile); + mDynamicSpannedTiles.add(brightnessTile); + // Time tile + /* QuickSettingsTileView timeTile = (QuickSettingsTileView) inflater.inflate(R.layout.quick_settings_tile, parent, false); timeTile.setContent(R.layout.quick_settings_tile_time, inflater); @@ -338,6 +363,7 @@ class QuickSettings { }); parent.addView(timeTile); mDynamicSpannedTiles.add(timeTile); + */ // Settings tile QuickSettingsTileView settingsTile = (QuickSettingsTileView) @@ -549,27 +575,6 @@ class QuickSettings { parent.addView(bluetoothTile); } - // Brightness - QuickSettingsTileView brightnessTile = (QuickSettingsTileView) - inflater.inflate(R.layout.quick_settings_tile, parent, false); - brightnessTile.setContent(R.layout.quick_settings_tile_brightness, inflater); - brightnessTile.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - mBar.collapseAllPanels(true); - showBrightnessDialog(); - } - }); - mModel.addBrightnessTile(brightnessTile, new QuickSettingsModel.RefreshCallback() { - @Override - public void refreshView(QuickSettingsTileView view, State state) { - TextView tv = (TextView) view.findViewById(R.id.brightness_textview); - tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0); - tv.setText(state.label); - dismissBrightnessDialog(mBrightnessDialogShortTimeout); - } - }); - parent.addView(brightnessTile); } private void addTemporaryTiles(final ViewGroup parent, final LayoutInflater inflater) { @@ -850,6 +855,11 @@ class QuickSettings { DisplayManager.EXTRA_WIFI_DISPLAY_STATUS); mWifiDisplayStatus = status; applyWifiDisplayStatus(); + } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) { + int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, + BluetoothAdapter.ERROR); + mBluetoothState.enabled = (state == BluetoothAdapter.STATE_ON); + applyBluetoothStatus(); } else if (BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED.equals(action)) { int status = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, BluetoothAdapter.STATE_DISCONNECTED); diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java index 9ea47f9..c215f1b 100644 --- a/policy/src/com/android/internal/policy/impl/GlobalActions.java +++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java @@ -290,7 +290,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac } }); AlertDialog dialog = builder.create(); - dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG); + dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); dialog.show(); } @@ -339,7 +339,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac return mAdapter.getItem(position).onLongPress(); } }); - dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG); + dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); dialog.setOnDismissListener(this); @@ -390,11 +390,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac refreshSilentMode(); mAirplaneModeOn.updateState(mAirplaneState); mAdapter.notifyDataSetChanged(); - if (mKeyguardShowing) { - mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); - } else { - mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG); - } + mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); if (SHOW_SILENT_TOGGLE) { IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION); mContext.registerReceiver(mRingerModeReceiver, filter); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 72cb1dd..41d67bc 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -2867,8 +2867,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mDecor = generateDecor(); mDecor.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS); mDecor.setIsRootNamespace(true); - mDecor.setLayoutDirection( - getContext().getResources().getConfiguration().getLayoutDirection()); if (!mInvalidatePanelMenuPosted && mInvalidatePanelMenuFeatures != 0) { mDecor.postOnAnimation(mInvalidatePanelMenuRunnable); } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java index 78fdda3..04ab871 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java @@ -75,7 +75,7 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu public void onDetachedFromWindow() { if (DEBUG) Log.d(TAG, "onDetachedFromWindow()"); if (mBiometricUnlock != null) { - mBiometricUnlock.stopAndShowBackup(); + mBiometricUnlock.stop(); } } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index ebc54b3..b86e5b8 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -611,6 +611,7 @@ public class KeyguardHostView extends KeyguardViewBase { int layoutId = getLayoutIdFor(securityMode); if (view == null && layoutId != 0) { final LayoutInflater inflater = LayoutInflater.from(mContext); + if (DEBUG) Log.v(TAG, "inflating id = " + layoutId); View v = inflater.inflate(layoutId, this, false); mSecurityViewContainer.addView(v); updateSecurityView(v); diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java index 0ad2404..b66c883 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java @@ -43,7 +43,7 @@ import com.android.internal.widget.LockPatternUtils; /** * Manages creating, showing, hiding and resetting the keyguard. Calls back - * via {@link com.android.internal.policy.impl.KeyguardViewCallback} to poke + * via {@link KeyguardViewMediator.ViewMediatorCallback} to poke * the wake lock and report that the keyguard is done, which is in turn, * reported to this class by the current {@link KeyguardViewBase}. */ @@ -233,6 +233,7 @@ public class KeyguardViewManager { if (mScreenOn) { mKeyguardView.show(); + mKeyguardView.requestFocus(); } } @@ -314,22 +315,25 @@ public class KeyguardViewManager { // Caller should wait for this window to be shown before turning // on the screen. - if (mKeyguardHost.getVisibility() == View.VISIBLE) { - // Keyguard may be in the process of being shown, but not yet - // updated with the window manager... give it a chance to do so. - mKeyguardHost.post(new Runnable() { - public void run() { - if (mKeyguardHost.getVisibility() == View.VISIBLE) { - showListener.onShown(mKeyguardHost.getWindowToken()); - } else { - showListener.onShown(null); + if (showListener != null) { + if (mKeyguardHost.getVisibility() == View.VISIBLE) { + // Keyguard may be in the process of being shown, but not yet + // updated with the window manager... give it a chance to do so. + mKeyguardHost.post(new Runnable() { + @Override + public void run() { + if (mKeyguardHost.getVisibility() == View.VISIBLE) { + showListener.onShown(mKeyguardHost.getWindowToken()); + } else { + showListener.onShown(null); + } } - } - }); - } else { - showListener.onShown(null); + }); + } else { + showListener.onShown(null); + } } - } else { + } else if (showListener != null) { showListener.onShown(null); } } @@ -356,10 +360,9 @@ public class KeyguardViewManager { if (mKeyguardView != null) { mKeyguardView.wakeWhenReadyTq(keyCode); return true; - } else { - Log.w(TAG, "mKeyguardView is null in wakeWhenReadyTq"); - return false; } + Log.w(TAG, "mKeyguardView is null in wakeWhenReadyTq"); + return false; } /** @@ -382,6 +385,7 @@ public class KeyguardViewManager { final KeyguardViewBase lastView = mKeyguardView; mKeyguardView = null; mKeyguardHost.postDelayed(new Runnable() { + @Override public void run() { synchronized (KeyguardViewManager.this) { lastView.cleanUp(); diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java index 92f9dfd..ceb0325 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java @@ -629,9 +629,7 @@ public class KeyguardViewMediator { mScreenOn = true; cancelDoKeyguardLaterLocked(); if (DEBUG) Log.d(TAG, "onScreenTurnedOn, seq = " + mDelayedShowingSequence); - if (showListener != null) { - notifyScreenOnLocked(showListener); - } + notifyScreenOnLocked(showListener); } maybeSendUserPresentBroadcast(); } @@ -1365,7 +1363,7 @@ public class KeyguardViewMediator { /** * Handle message sent by {@link #verifyUnlock} - * @see #RESET + * @see #VERIFY_UNLOCK */ private void handleVerifyUnlock() { synchronized (KeyguardViewMediator.this) { diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java index e7e4f87..06d37dc 100644 --- a/services/java/com/android/server/AppWidgetService.java +++ b/services/java/com/android/server/AppWidgetService.java @@ -98,21 +98,19 @@ class AppWidgetService extends IAppWidgetService.Stub IntentFilter userFilter = new IntentFilter(); userFilter.addAction(Intent.ACTION_USER_REMOVED); + userFilter.addAction(Intent.ACTION_USER_STOPPING); mContext.registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - onUserRemoved(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1)); + if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) { + onUserRemoved(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, + UserHandle.USER_NULL)); + } else if (Intent.ACTION_USER_STOPPING.equals(intent.getAction())) { + onUserStopping(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, + UserHandle.USER_NULL)); + } } }, userFilter); - - IntentFilter userStopFilter = new IntentFilter(); - userStopFilter.addAction(Intent.ACTION_USER_STOPPED); - mContext.registerReceiverAsUser(new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - onUserStopped(getSendingUserId()); - } - }, UserHandle.ALL, userFilter, null, null); } /** @@ -203,7 +201,7 @@ class AppWidgetService extends IAppWidgetService.Stub synchronized (mAppWidgetServices) { AppWidgetServiceImpl impl = mAppWidgetServices.get(userId); mAppWidgetServices.remove(userId); - + if (impl == null) { AppWidgetServiceImpl.getSettingsFile(userId).delete(); } else { @@ -212,7 +210,15 @@ class AppWidgetService extends IAppWidgetService.Stub } } - public void onUserStopped(int userId) { + public void onUserStopping(int userId) { + if (userId < 1) return; + synchronized (mAppWidgetServices) { + AppWidgetServiceImpl impl = mAppWidgetServices.get(userId); + if (impl != null) { + mAppWidgetServices.remove(userId); + impl.onUserStopping(); + } + } } private AppWidgetServiceImpl getImplForUser(int userId) { @@ -324,11 +330,11 @@ class AppWidgetService extends IAppWidgetService.Stub String action = intent.getAction(); // Slog.d(TAG, "received " + action); if (Intent.ACTION_BOOT_COMPLETED.equals(action)) { - int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); + int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL); if (userId >= 0) { getImplForUser(userId).sendInitialBroadcasts(); } else { - Slog.w(TAG, "Not user handle supplied in " + intent); + Slog.w(TAG, "Incorrect user handle supplied in " + intent); } } else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) { for (int i = 0; i < mAppWidgetServices.size(); i++) { diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java index 9fea6f3..6a313a0 100644 --- a/services/java/com/android/server/AppWidgetServiceImpl.java +++ b/services/java/com/android/server/AppWidgetServiceImpl.java @@ -1778,13 +1778,16 @@ class AppWidgetServiceImpl { return new AtomicFile(settingsFile); } - void onUserRemoved() { + void onUserStopping() { // prune the ones we don't want to keep int N = mInstalledProviders.size(); for (int i = N - 1; i >= 0; i--) { Provider p = mInstalledProviders.get(i); cancelBroadcasts(p); } + } + + void onUserRemoved() { getSettingsFile(mUserId).delete(); } diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java index e0f3814..a02fc8d 100644 --- a/services/java/com/android/server/WallpaperManagerService.java +++ b/services/java/com/android/server/WallpaperManagerService.java @@ -458,15 +458,21 @@ class WallpaperManagerService extends IWallpaperManager.Stub { IntentFilter userFilter = new IntentFilter(); userFilter.addAction(Intent.ACTION_USER_REMOVED); + userFilter.addAction(Intent.ACTION_USER_STOPPING); mContext.registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Intent.ACTION_USER_REMOVED.equals(action)) { - removeUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0)); + onRemoveUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, + UserHandle.USER_NULL)); + } else if (Intent.ACTION_USER_STOPPING.equals(action)) { + onStoppingUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, + UserHandle.USER_NULL)); } } }, userFilter); + try { ActivityManagerNative.getDefault().registerUserSwitchObserver( new IUserSwitchObserver.Stub() { @@ -491,13 +497,24 @@ class WallpaperManagerService extends IWallpaperManager.Stub { } } - void removeUser(int userId) { + void onStoppingUser(int userId) { + if (userId < 1) return; synchronized (mLock) { WallpaperData wallpaper = mWallpaperMap.get(userId); if (wallpaper != null) { - wallpaper.wallpaperObserver.stopWatching(); + if (wallpaper.wallpaperObserver != null) { + wallpaper.wallpaperObserver.stopWatching(); + wallpaper.wallpaperObserver = null; + } mWallpaperMap.remove(userId); } + } + } + + void onRemoveUser(int userId) { + if (userId < 1) return; + synchronized (mLock) { + onStoppingUser(userId); File wallpaperFile = new File(getWallpaperDir(userId), WALLPAPER); wallpaperFile.delete(); File wallpaperInfoFile = new File(getWallpaperDir(userId), WALLPAPER_INFO); diff --git a/services/java/com/android/server/accessibility/ScreenMagnifier.java b/services/java/com/android/server/accessibility/ScreenMagnifier.java index d5a8537..caf37b7 100644 --- a/services/java/com/android/server/accessibility/ScreenMagnifier.java +++ b/services/java/com/android/server/accessibility/ScreenMagnifier.java @@ -38,6 +38,7 @@ import android.os.Handler; import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.SystemClock; import android.provider.Settings; import android.util.Property; import android.util.Slog; @@ -662,12 +663,33 @@ public final class ScreenMagnifier implements EventStreamTransformation { while (mDelayedEventQueue != null) { MotionEventInfo info = mDelayedEventQueue; mDelayedEventQueue = info.mNext; - ScreenMagnifier.this.onMotionEvent(info.mEvent, info.mRawEvent, - info.mPolicyFlags); + final long offset = SystemClock.uptimeMillis() - info.mCachedTimeMillis; + MotionEvent event = obtainEventWithOffsetTimeAndDownTime(info.mEvent, offset); + MotionEvent rawEvent = obtainEventWithOffsetTimeAndDownTime(info.mRawEvent, offset); + ScreenMagnifier.this.onMotionEvent(event, rawEvent, info.mPolicyFlags); + event.recycle(); + rawEvent.recycle(); info.recycle(); } } + private MotionEvent obtainEventWithOffsetTimeAndDownTime(MotionEvent event, long offset) { + final int pointerCount = event.getPointerCount(); + PointerCoords[] coords = getTempPointerCoordsWithMinSize(pointerCount); + PointerProperties[] properties = getTempPointerPropertiesWithMinSize(pointerCount); + for (int i = 0; i < pointerCount; i++) { + event.getPointerCoords(i, coords[i]); + event.getPointerProperties(i, properties[i]); + } + final long downTime = event.getDownTime() + offset; + final long eventTime = event.getEventTime() + offset; + return MotionEvent.obtain(downTime, eventTime, + event.getAction(), pointerCount, properties, coords, + event.getMetaState(), event.getButtonState(), + 1.0f, 1.0f, event.getDeviceId(), event.getEdgeFlags(), + event.getSource(), event.getFlags()); + } + private void clearDelayedMotionEvents() { while (mDelayedEventQueue != null) { MotionEventInfo info = mDelayedEventQueue; @@ -746,6 +768,7 @@ public final class ScreenMagnifier implements EventStreamTransformation { public MotionEvent mEvent; public MotionEvent mRawEvent; public int mPolicyFlags; + public long mCachedTimeMillis; public static MotionEventInfo obtain(MotionEvent event, MotionEvent rawEvent, int policyFlags) { @@ -770,6 +793,7 @@ public final class ScreenMagnifier implements EventStreamTransformation { mEvent = MotionEvent.obtain(event); mRawEvent = MotionEvent.obtain(rawEvent); mPolicyFlags = policyFlags; + mCachedTimeMillis = SystemClock.uptimeMillis(); } public void recycle() { @@ -793,6 +817,7 @@ public final class ScreenMagnifier implements EventStreamTransformation { mRawEvent.recycle(); mRawEvent = null; mPolicyFlags = 0; + mCachedTimeMillis = 0; } } diff --git a/services/java/com/android/server/pm/UserManagerService.java b/services/java/com/android/server/pm/UserManagerService.java index 4f9375a..77e6c03 100644 --- a/services/java/com/android/server/pm/UserManagerService.java +++ b/services/java/com/android/server/pm/UserManagerService.java @@ -149,7 +149,7 @@ public class UserManagerService extends IUserManager.Stub { -1, -1); mUserListFile = new File(mUsersDir, USER_LIST_FILENAME); readUserListLocked(); - // Prune out any partially created users. + // Prune out any partially created/partially removed users. ArrayList<UserInfo> partials = new ArrayList<UserInfo>(); for (int i = 0; i < mUsers.size(); i++) { UserInfo ui = mUsers.valueAt(i); @@ -459,7 +459,7 @@ public class UserManagerService extends IUserManager.Stub { private void fallbackToSingleUserLocked() { // Create the primary user UserInfo primary = new UserInfo(0, "Primary", null, - UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY); + UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY | UserInfo.FLAG_INITIALIZED); mUsers.put(0, primary); mNextSerialNumber = MIN_USER_ID; updateUserIdsLocked(); @@ -703,6 +703,11 @@ public class UserManagerService extends IUserManager.Stub { return false; } mRemovingUserIds.add(userHandle); + // Set this to a partially created user, so that the user will be purged + // on next startup, in case the runtime stops now before stopping and + // removing the user completely. + user.partial = true; + writeUserLocked(user); } int res; diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index feb29b1..c195f45 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -1038,18 +1038,26 @@ final class WindowState implements WindowManagerPolicy.WindowState { } boolean isHiddenFromUserLocked() { - // Save some cycles by not calling getDisplayInfo unless it is an application - // window intended for all users. - if (mAttrs.type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW - && mAppToken != null && mAppToken.showWhenLocked) { - final DisplayInfo displayInfo = mDisplayContent.getDisplayInfo(); - if (isFullscreen(displayInfo.appWidth, displayInfo.appHeight)) { + // Attached windows are evaluated based on the window that they are attached to. + WindowState win = this; + while (win.mAttachedWindow != null) { + win = win.mAttachedWindow; + } + if (win.mAttrs.type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW + && win.mAppToken != null && win.mAppToken.showWhenLocked) { + // Save some cycles by not calling getDisplayInfo unless it is an application + // window intended for all users. + final DisplayInfo displayInfo = win.mDisplayContent.getDisplayInfo(); + if (win.mFrame.left <= 0 && win.mFrame.top <= 0 + && win.mFrame.right >= displayInfo.appWidth + && win.mFrame.bottom >= displayInfo.appHeight) { // Is a fullscreen window, like the clock alarm. Show to everyone. return false; } } - return mShowToOwnerOnly && UserHandle.getUserId(mOwnerUid) != mService.mCurrentUserId; + return win.mShowToOwnerOnly + && UserHandle.getUserId(win.mOwnerUid) != mService.mCurrentUserId; } private static void applyInsets(Region outRegion, Rect frame, Rect inset) { diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/HwAccelerationTest/AndroidManifest.xml index 4cb409d..9118aea 100644 --- a/tests/HwAccelerationTest/AndroidManifest.xml +++ b/tests/HwAccelerationTest/AndroidManifest.xml @@ -33,6 +33,15 @@ <meta-data android:name="android.graphics.renderThread" android:value="true" /> <activity + android:name="MipMapActivity" + android:label="_MipMap"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + <activity android:name="PathOffsetActivity" android:label="_PathOffset"> <intent-filter> diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg b/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg Binary files differnew file mode 100644 index 0000000..7f047b1 --- /dev/null +++ b/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java new file mode 100644 index 0000000..1034649 --- /dev/null +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.test.hwui; + +import android.app.Activity; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffXfermode; +import android.os.Bundle; +import android.util.Log; +import android.view.Gravity; +import android.view.View; +import android.view.animation.Animation; +import android.view.animation.ScaleAnimation; +import android.widget.FrameLayout; + +@SuppressWarnings({"UnusedDeclaration"}) +public class MipMapActivity extends Activity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + final BitmapsView view = new BitmapsView(this); + setContentView(view); + } + + static class BitmapsView extends View { + private Paint mBitmapPaint; + private final Bitmap mBitmap1; + private final Bitmap mBitmap2; + + BitmapsView(Context c) { + super(c); + + mBitmap1 = BitmapFactory.decodeResource(c.getResources(), R.drawable.very_large_photo); + mBitmap2 = BitmapFactory.decodeResource(c.getResources(), R.drawable.very_large_photo); + + mBitmap1.setHasMipMap(true); + + mBitmapPaint = new Paint(); + mBitmapPaint.setFilterBitmap(true); + } + + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + + canvas.save(); + canvas.scale(0.3f, 0.3f); + canvas.drawBitmap(mBitmap1, 0, 0, mBitmapPaint); + canvas.restore(); + + canvas.save(); + canvas.translate(mBitmap1.getWidth() * 0.3f + 96.0f, 0.0f); + canvas.scale(0.3f, 0.3f); + canvas.drawBitmap(mBitmap2, 0, 0, mBitmapPaint); + canvas.restore(); + } + } +} diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png Binary files differnew file mode 100644 index 0000000..84e6bc8 --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back_default.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back_default.png Binary files differdeleted file mode 100644 index ac5a97b..0000000 --- a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png Binary files differnew file mode 100644 index 0000000..38e4f45 --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home_default.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home_default.png Binary files differdeleted file mode 100644 index a90dc9b..0000000 --- a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png Binary files differnew file mode 100644 index 0000000..bf9f300 --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent_default.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent_default.png Binary files differdeleted file mode 100644 index cb3c433..0000000 --- a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png Binary files differnew file mode 100644 index 0000000..a00bc5b --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back_default.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back_default.png Binary files differdeleted file mode 100644 index 5ab09f0..0000000 --- a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png Binary files differnew file mode 100644 index 0000000..dc3183b --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home_default.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home_default.png Binary files differdeleted file mode 100644 index 62ca427..0000000 --- a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png Binary files differnew file mode 100644 index 0000000..b07f611 --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent_default.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent_default.png Binary files differdeleted file mode 100644 index ff698fb..0000000 --- a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/tablet_system_bar.xml b/tools/layoutlib/bridge/resources/bars/navigation_bar.xml index c5acddb..599ca08 100644 --- a/tools/layoutlib/bridge/resources/bars/tablet_system_bar.xml +++ b/tools/layoutlib/bridge/resources/bars/navigation_bar.xml @@ -1,5 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1"/> <ImageView android:layout_height="wrap_content" android:layout_width="wrap_content"/> @@ -13,12 +17,4 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/> - <ImageView - android:layout_height="wrap_content" - android:layout_width="wrap_content"/> - <ImageView - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_marginLeft="3dip" - android:layout_marginRight="15dip"/> </merge> diff --git a/tools/layoutlib/bridge/resources/bars/phone_system_bar.xml b/tools/layoutlib/bridge/resources/bars/status_bar.xml index d3c492e..d3c492e 100644 --- a/tools/layoutlib/bridge/resources/bars/phone_system_bar.xml +++ b/tools/layoutlib/bridge/resources/bars/status_bar.xml diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png Binary files differnew file mode 100644 index 0000000..bd60cd6 --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back_default.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back_default.png Binary files differdeleted file mode 100644 index 4cb305d..0000000 --- a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png Binary files differnew file mode 100644 index 0000000..c5bc5c9 --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home_default.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home_default.png Binary files differdeleted file mode 100644 index 31d35c8..0000000 --- a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png Binary files differnew file mode 100644 index 0000000..f621d9c --- /dev/null +++ b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent_default.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent_default.png Binary files differdeleted file mode 100644 index f0cc341..0000000 --- a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent_default.png +++ /dev/null diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index daf520b..bf8658e 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -210,7 +210,8 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { Capability.PLAY_ANIMATION, Capability.ANIMATED_VIEW_MANIPULATION, Capability.ADAPTER_BINDING, - Capability.EXTENDED_VIEWINFO); + Capability.EXTENDED_VIEWINFO, + Capability.FIXED_SCALABLE_NINE_PATCH); BridgeAssetManager.initSystem(); diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java index 62c886b..ea9d8d9 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java @@ -60,11 +60,15 @@ abstract class CustomBar extends LinearLayout { protected abstract TextView getStyleableTextView(); - protected CustomBar(Context context, Density density, String layoutPath, String name) - throws XmlPullParserException { + protected CustomBar(Context context, Density density, int orientation, String layoutPath, + String name) throws XmlPullParserException { super(context); - setOrientation(LinearLayout.HORIZONTAL); - setGravity(Gravity.CENTER_VERTICAL); + setOrientation(orientation); + if (orientation == LinearLayout.HORIZONTAL) { + setGravity(Gravity.CENTER_VERTICAL); + } else { + setGravity(Gravity.CENTER_HORIZONTAL); + } LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java index 68f5aba..226649d 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java @@ -21,6 +21,7 @@ import com.android.resources.Density; import org.xmlpull.v1.XmlPullParserException; import android.content.Context; +import android.widget.LinearLayout; import android.widget.TextView; public class FakeActionBar extends CustomBar { @@ -29,7 +30,7 @@ public class FakeActionBar extends CustomBar { public FakeActionBar(Context context, Density density, String label, String icon) throws XmlPullParserException { - super(context, density, "/bars/action_bar.xml", "action_bar.xml"); + super(context, density, LinearLayout.HORIZONTAL, "/bars/action_bar.xml", "action_bar.xml"); // Cannot access the inside items through id because no R.id values have been // created for them. diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TabletSystemBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/NavigationBar.java index 456ddb4..cc90d6b 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TabletSystemBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/NavigationBar.java @@ -17,34 +17,34 @@ package com.android.layoutlib.bridge.bars; import com.android.resources.Density; -import com.android.resources.ResourceType; import org.xmlpull.v1.XmlPullParserException; import android.content.Context; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.LevelListDrawable; +import android.widget.LinearLayout; import android.widget.TextView; -public class TabletSystemBar extends CustomBar { +public class NavigationBar extends CustomBar { - public TabletSystemBar(Context context, Density density) throws XmlPullParserException { - super(context, density, "/bars/tablet_system_bar.xml", "tablet_system_bar.xml"); + public NavigationBar(Context context, Density density, int orientation) throws XmlPullParserException { + super(context, density, orientation, "/bars/navigation_bar.xml", "navigation_bar.xml"); setBackgroundColor(0xFF000000); // Cannot access the inside items through id because no R.id values have been // created for them. // We do know the order though. - loadIcon(0, "ic_sysbar_back_default.png", density); - loadIcon(1, "ic_sysbar_home_default.png", density); - loadIcon(2, "ic_sysbar_recent_default.png", density); - // 3 is the spacer - loadIcon(4, "stat_sys_wifi_signal_4_fully.png", density); - Drawable drawable = loadIcon(5, ResourceType.DRAWABLE, "stat_sys_battery_charge"); - if (drawable instanceof LevelListDrawable) { - ((LevelListDrawable) drawable).setLevel(100); + // 0 is a spacer. + int back = 1; + int recent = 3; + if (orientation == LinearLayout.VERTICAL) { + back = 3; + recent = 1; } + + loadIcon(back, "ic_sysbar_back.png", density); + loadIcon(2, "ic_sysbar_home.png", density); + loadIcon(recent, "ic_sysbar_recent.png", density); } @Override diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/PhoneSystemBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/StatusBar.java index 7521011..5c08412 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/PhoneSystemBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/StatusBar.java @@ -25,12 +25,13 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.graphics.drawable.LevelListDrawable; import android.view.Gravity; +import android.widget.LinearLayout; import android.widget.TextView; -public class PhoneSystemBar extends CustomBar { +public class StatusBar extends CustomBar { - public PhoneSystemBar(Context context, Density density) throws XmlPullParserException { - super(context, density, "/bars/phone_system_bar.xml", "phone_system_bar.xml"); + public StatusBar(Context context, Density density) throws XmlPullParserException { + super(context, density, LinearLayout.HORIZONTAL, "/bars/status_bar.xml", "status_bar.xml"); // FIXME: use FILL_H? setGravity(Gravity.START | Gravity.TOP | Gravity.RIGHT); diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java index 5f5ebc4..c27859f 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java @@ -21,6 +21,7 @@ import com.android.resources.Density; import org.xmlpull.v1.XmlPullParserException; import android.content.Context; +import android.widget.LinearLayout; import android.widget.TextView; public class TitleBar extends CustomBar { @@ -29,7 +30,7 @@ public class TitleBar extends CustomBar { public TitleBar(Context context, Density density, String label) throws XmlPullParserException { - super(context, density, "/bars/title_bar.xml", "title_bar.xml"); + super(context, density, LinearLayout.HORIZONTAL, "/bars/title_bar.xml", "title_bar.xml"); // Cannot access the inside items through id because no R.id values have been // created for them. diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java index de65fd4..f109e39 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java @@ -20,11 +20,12 @@ import static com.android.ide.common.rendering.api.Result.Status.ERROR_LOCK_INTE import static com.android.ide.common.rendering.api.Result.Status.ERROR_TIMEOUT; import static com.android.ide.common.rendering.api.Result.Status.SUCCESS; +import com.android.ide.common.rendering.api.HardwareConfig; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.RenderParams; import com.android.ide.common.rendering.api.RenderResources; -import com.android.ide.common.rendering.api.Result; import com.android.ide.common.rendering.api.RenderResources.FrameworkResourceIdProvider; +import com.android.ide.common.rendering.api.Result; import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.android.BridgeContext; import com.android.resources.Density; @@ -98,19 +99,22 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso return result; } + HardwareConfig hardwareConfig = mParams.getHardwareConfig(); + // setup the display Metrics. DisplayMetrics metrics = new DisplayMetrics(); - metrics.densityDpi = metrics.noncompatDensityDpi = mParams.getDensity().getDpiValue(); + metrics.densityDpi = metrics.noncompatDensityDpi = + hardwareConfig.getDensity().getDpiValue(); metrics.density = metrics.noncompatDensity = metrics.densityDpi / (float) DisplayMetrics.DENSITY_DEFAULT; metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; - metrics.widthPixels = metrics.noncompatWidthPixels = mParams.getScreenWidth(); - metrics.heightPixels = metrics.noncompatHeightPixels = mParams.getScreenHeight(); - metrics.xdpi = metrics.noncompatXdpi = mParams.getXdpi(); - metrics.ydpi = metrics.noncompatYdpi = mParams.getYdpi(); + metrics.widthPixels = metrics.noncompatWidthPixels = hardwareConfig.getScreenWidth(); + metrics.heightPixels = metrics.noncompatHeightPixels = hardwareConfig.getScreenHeight(); + metrics.xdpi = metrics.noncompatXdpi = hardwareConfig.getXdpi(); + metrics.ydpi = metrics.noncompatYdpi = hardwareConfig.getYdpi(); RenderResources resources = mParams.getResources(); @@ -305,7 +309,9 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso private Configuration getConfiguration() { Configuration config = new Configuration(); - ScreenSize screenSize = mParams.getConfigScreenSize(); + HardwareConfig hardwareConfig = mParams.getHardwareConfig(); + + ScreenSize screenSize = hardwareConfig.getScreenSize(); if (screenSize != null) { switch (screenSize) { case SMALL: @@ -323,13 +329,13 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso } } - Density density = mParams.getDensity(); + Density density = hardwareConfig.getDensity(); if (density == null) { density = Density.MEDIUM; } - config.screenWidthDp = mParams.getScreenWidth() / density.getDpiValue(); - config.screenHeightDp = mParams.getScreenHeight() / density.getDpiValue(); + config.screenWidthDp = hardwareConfig.getScreenWidth() / density.getDpiValue(); + config.screenHeightDp = hardwareConfig.getScreenHeight() / density.getDpiValue(); if (config.screenHeightDp < config.screenWidthDp) { config.smallestScreenWidthDp = config.screenHeightDp; } else { diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderDrawable.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderDrawable.java index 8133210..b677131 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderDrawable.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderDrawable.java @@ -19,6 +19,7 @@ package com.android.layoutlib.bridge.impl; import static com.android.ide.common.rendering.api.Result.Status.ERROR_UNKNOWN; import com.android.ide.common.rendering.api.DrawableParams; +import com.android.ide.common.rendering.api.HardwareConfig; import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.Result; import com.android.ide.common.rendering.api.Result.Status; @@ -59,6 +60,7 @@ public class RenderDrawable extends RenderAction<DrawableParams> { try { // get the drawable resource value DrawableParams params = getParams(); + HardwareConfig hardwareConfig = params.getHardwareConfig(); ResourceValue drawableResource = params.getDrawable(); // resolve it @@ -75,15 +77,15 @@ public class RenderDrawable extends RenderAction<DrawableParams> { // get the actual Drawable object to draw Drawable d = ResourceHelper.getDrawable(drawableResource, context); - content.setBackgroundDrawable(d); + content.setBackground(d); // set the AttachInfo on the root view. AttachInfo_Accessor.setAttachInfo(content); // measure - int w = params.getScreenWidth(); - int h = params.getScreenHeight(); + int w = hardwareConfig.getScreenWidth(); + int h = hardwareConfig.getScreenHeight(); int w_spec = MeasureSpec.makeMeasureSpec(w, MeasureSpec.EXACTLY); int h_spec = MeasureSpec.makeMeasureSpec(h, MeasureSpec.EXACTLY); content.measure(w_spec, h_spec); @@ -99,11 +101,11 @@ public class RenderDrawable extends RenderAction<DrawableParams> { // create an Android bitmap around the BufferedImage Bitmap bitmap = Bitmap_Delegate.createBitmap(image, - true /*isMutable*/, params.getDensity()); + true /*isMutable*/, hardwareConfig.getDensity()); // create a Canvas around the Android bitmap Canvas canvas = new Canvas(bitmap); - canvas.setDensity(params.getDensity().getDpiValue()); + canvas.setDensity(hardwareConfig.getDensity().getDpiValue()); // and draw content.draw(canvas); diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java index cc0f077..c14af4a 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java @@ -24,6 +24,7 @@ import static com.android.ide.common.rendering.api.Result.Status.ERROR_VIEWGROUP import static com.android.ide.common.rendering.api.Result.Status.SUCCESS; import com.android.ide.common.rendering.api.AdapterBinding; +import com.android.ide.common.rendering.api.HardwareConfig; import com.android.ide.common.rendering.api.IAnimationListener; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.IProjectCallback; @@ -43,13 +44,13 @@ import com.android.layoutlib.bridge.android.BridgeContext; import com.android.layoutlib.bridge.android.BridgeLayoutParamsMapAttributes; import com.android.layoutlib.bridge.android.BridgeXmlBlockParser; import com.android.layoutlib.bridge.bars.FakeActionBar; -import com.android.layoutlib.bridge.bars.PhoneSystemBar; -import com.android.layoutlib.bridge.bars.TabletSystemBar; +import com.android.layoutlib.bridge.bars.NavigationBar; +import com.android.layoutlib.bridge.bars.StatusBar; import com.android.layoutlib.bridge.bars.TitleBar; import com.android.layoutlib.bridge.impl.binding.FakeAdapter; import com.android.layoutlib.bridge.impl.binding.FakeExpandableAdapter; import com.android.resources.ResourceType; -import com.android.resources.ScreenSize; +import com.android.resources.ScreenOrientation; import com.android.util.Pair; import org.xmlpull.v1.XmlPullParserException; @@ -68,8 +69,8 @@ import android.util.DisplayMetrics; import android.util.TypedValue; import android.view.AttachInfo_Accessor; import android.view.BridgeInflater; -import android.view.IWindowManagerImpl; import android.view.IWindowManager; +import android.view.IWindowManagerImpl; import android.view.Surface; import android.view.View; import android.view.View.MeasureSpec; @@ -124,7 +125,8 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { private boolean mWindowIsFloating; private int mStatusBarSize; - private int mSystemBarSize; + private int mNavigationBarSize; + private int mNavigationBarOrientation = LinearLayout.HORIZONTAL; private int mTitleBarSize; private int mActionBarSize; @@ -187,7 +189,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { findBackground(resources); findStatusBar(resources, metrics); findActionBar(resources, metrics); - findSystemBar(resources, metrics); + findNavigationBar(resources, metrics); // FIXME: find those out, and possibly add them to the render params boolean hasSystemNavBar = true; @@ -221,19 +223,57 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { try { SessionParams params = getParams(); + HardwareConfig hardwareConfig = params.getHardwareConfig(); BridgeContext context = getContext(); + // the view group that receives the window background. ViewGroup backgroundView = null; if (mWindowIsFloating || params.isForceNoDecor()) { backgroundView = mViewRoot = mContentRoot = new FrameLayout(context); } else { + if (hasSoftwareButtons() && mNavigationBarOrientation == LinearLayout.VERTICAL) { + /* + * This is a special case where the navigation bar is on the right. + +-------------------------------------------------+---+ + | Status bar (always) | | + +-------------------------------------------------+ | + | (Layout with background drawable) | | + | +---------------------------------------------+ | | + | | Title/Action bar (optional) | | | + | +---------------------------------------------+ | | + | | Content, vertical extending | | | + | | | | | + | +---------------------------------------------+ | | + +-------------------------------------------------+---+ + + So we create a horizontal layout, with the nav bar on the right, + and the left part is the normal layout below without the nav bar at + the bottom + */ + LinearLayout topLayout = new LinearLayout(context); + mViewRoot = topLayout; + topLayout.setOrientation(LinearLayout.HORIZONTAL); + + try { + NavigationBar navigationBar = new NavigationBar(context, + hardwareConfig.getDensity(), LinearLayout.VERTICAL); + navigationBar.setLayoutParams( + new LinearLayout.LayoutParams( + mNavigationBarSize, + LayoutParams.MATCH_PARENT)); + topLayout.addView(navigationBar); + } catch (XmlPullParserException e) { + + } + } + /* * we're creating the following layout * +-------------------------------------------------+ - | System bar (only in phone UI) | + | Status bar (always) | +-------------------------------------------------+ | (Layout with background drawable) | | +---------------------------------------------+ | @@ -243,20 +283,31 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { | | | | | +---------------------------------------------+ | +-------------------------------------------------+ - | System bar (only in tablet UI) | + | Navigation bar for soft buttons, maybe see above| +-------------------------------------------------+ */ LinearLayout topLayout = new LinearLayout(context); - mViewRoot = topLayout; topLayout.setOrientation(LinearLayout.VERTICAL); + // if we don't already have a view root this is it + if (mViewRoot == null) { + mViewRoot = topLayout; + } else { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams( + LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + layoutParams.weight = 1; + topLayout.setLayoutParams(layoutParams); + + // this is the case of soft buttons + vertical bar. + // this top layout is the first layout in the horizontal layout. see above) + mViewRoot.addView(topLayout, 0); + } if (mStatusBarSize > 0) { // system bar try { - PhoneSystemBar systemBar = new PhoneSystemBar(context, - params.getDensity()); + StatusBar systemBar = new StatusBar(context, hardwareConfig.getDensity()); systemBar.setLayoutParams( new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, mStatusBarSize)); @@ -280,7 +331,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { if (mActionBarSize > 0) { try { FakeActionBar actionBar = new FakeActionBar(context, - params.getDensity(), + hardwareConfig.getDensity(), params.getAppLabel(), params.getAppIcon()); actionBar.setLayoutParams( new LinearLayout.LayoutParams( @@ -292,7 +343,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { } else if (mTitleBarSize > 0) { try { TitleBar titleBar = new TitleBar(context, - params.getDensity(), params.getAppLabel()); + hardwareConfig.getDensity(), params.getAppLabel()); titleBar.setLayoutParams( new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, mTitleBarSize)); @@ -310,15 +361,16 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { mContentRoot.setLayoutParams(layoutParams); backgroundLayout.addView(mContentRoot); - if (mSystemBarSize > 0) { + if (mNavigationBarOrientation == LinearLayout.HORIZONTAL && + mNavigationBarSize > 0) { // system bar try { - TabletSystemBar systemBar = new TabletSystemBar(context, - params.getDensity()); - systemBar.setLayoutParams( + NavigationBar navigationBar = new NavigationBar(context, + hardwareConfig.getDensity(), LinearLayout.HORIZONTAL); + navigationBar.setLayoutParams( new LinearLayout.LayoutParams( - LayoutParams.MATCH_PARENT, mSystemBarSize)); - topLayout.addView(systemBar); + LayoutParams.MATCH_PARENT, mNavigationBarSize)); + topLayout.addView(navigationBar); } catch (XmlPullParserException e) { } @@ -346,7 +398,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { // get the background drawable if (mWindowBackground != null && backgroundView != null) { Drawable d = ResourceHelper.getDrawable(mWindowBackground, context); - backgroundView.setBackgroundDrawable(d); + backgroundView.setBackground(d); } return SUCCESS.createResult(); @@ -389,13 +441,14 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { } RenderingMode renderingMode = params.getRenderingMode(); + HardwareConfig hardwareConfig = params.getHardwareConfig(); // only do the screen measure when needed. boolean newRenderSize = false; if (mMeasuredScreenWidth == -1) { newRenderSize = true; - mMeasuredScreenWidth = params.getScreenWidth(); - mMeasuredScreenHeight = params.getScreenHeight(); + mMeasuredScreenWidth = hardwareConfig.getScreenWidth(); + mMeasuredScreenHeight = hardwareConfig.getScreenHeight(); if (renderingMode != RenderingMode.NORMAL) { int widthMeasureSpecMode = renderingMode.isHorizExpand() ? @@ -495,11 +548,11 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { // create an Android bitmap around the BufferedImage Bitmap bitmap = Bitmap_Delegate.createBitmap(mImage, - true /*isMutable*/, params.getDensity()); + true /*isMutable*/, hardwareConfig.getDensity()); // create a Canvas around the Android bitmap mCanvas = new Canvas(bitmap); - mCanvas.setDensity(params.getDensity().getDpiValue()); + mCanvas.setDensity(hardwareConfig.getDensity().getDpiValue()); } if (freshRender && newImage == false) { @@ -972,30 +1025,28 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { } } - private boolean isTabletUi() { - return getParams().getConfigScreenSize() == ScreenSize.XLARGE; + private boolean hasSoftwareButtons() { + return getParams().getHardwareConfig().hasSoftwareButtons(); } private void findStatusBar(RenderResources resources, DisplayMetrics metrics) { - if (isTabletUi() == false) { - boolean windowFullscreen = getBooleanThemeValue(resources, - "windowFullscreen", false /*defaultValue*/); + boolean windowFullscreen = getBooleanThemeValue(resources, + "windowFullscreen", false /*defaultValue*/); - if (windowFullscreen == false && mWindowIsFloating == false) { - // default value - mStatusBarSize = DEFAULT_STATUS_BAR_HEIGHT; + if (windowFullscreen == false && mWindowIsFloating == false) { + // default value + mStatusBarSize = DEFAULT_STATUS_BAR_HEIGHT; - // get the real value - ResourceValue value = resources.getFrameworkResource(ResourceType.DIMEN, - "status_bar_height"); + // get the real value + ResourceValue value = resources.getFrameworkResource(ResourceType.DIMEN, + "status_bar_height"); - if (value != null) { - TypedValue typedValue = ResourceHelper.getValue("status_bar_height", - value.getValue(), true /*requireUnit*/); - if (typedValue != null) { - // compute the pixel value based on the display metrics - mStatusBarSize = (int)typedValue.getDimension(metrics); - } + if (value != null) { + TypedValue typedValue = ResourceHelper.getValue("status_bar_height", + value.getValue(), true /*requireUnit*/); + if (typedValue != null) { + // compute the pixel value based on the display metrics + mStatusBarSize = (int)typedValue.getDimension(metrics); } } } @@ -1062,22 +1113,48 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { } } - private void findSystemBar(RenderResources resources, DisplayMetrics metrics) { - if (isTabletUi() && mWindowIsFloating == false) { + private void findNavigationBar(RenderResources resources, DisplayMetrics metrics) { + if (hasSoftwareButtons() && mWindowIsFloating == false) { // default value - mSystemBarSize = 48; // ?? + mNavigationBarSize = 48; // ?? + + HardwareConfig hardwareConfig = getParams().getHardwareConfig(); + + boolean barOnBottom = true; + + if (hardwareConfig.getOrientation() == ScreenOrientation.LANDSCAPE) { + // compute the dp of the screen. + int shortSize = hardwareConfig.getScreenHeight(); + + // compute in dp + int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / hardwareConfig.getDensity().getDpiValue(); + + if (shortSizeDp < 600) { + // 0-599dp: "phone" UI with bar on the side + barOnBottom = false; + } else { + // 600+dp: "tablet" UI with bar on the bottom + barOnBottom = true; + } + } + + if (barOnBottom) { + mNavigationBarOrientation = LinearLayout.HORIZONTAL; + } else { + mNavigationBarOrientation = LinearLayout.VERTICAL; + } // get the real value ResourceValue value = resources.getFrameworkResource(ResourceType.DIMEN, - "status_bar_height"); + barOnBottom ? "navigation_bar_height" : "navigation_bar_width"); if (value != null) { - TypedValue typedValue = ResourceHelper.getValue("status_bar_height", + TypedValue typedValue = ResourceHelper.getValue("navigation_bar_height", value.getValue(), true /*requireUnit*/); if (typedValue != null) { // compute the pixel value based on the display metrics - mSystemBarSize = (int)typedValue.getDimension(metrics); + mNavigationBarSize = (int)typedValue.getDimension(metrics); } } } diff --git a/wifi/java/android/net/wifi/WifiMonitor.java b/wifi/java/android/net/wifi/WifiMonitor.java index 93ab4a4..0b0d738 100644 --- a/wifi/java/android/net/wifi/WifiMonitor.java +++ b/wifi/java/android/net/wifi/WifiMonitor.java @@ -178,6 +178,7 @@ public class WifiMonitor { private static final String P2P_GO_NEG_SUCCESS_STR = "P2P-GO-NEG-SUCCESS"; + /* P2P-GO-NEG-FAILURE status=x */ private static final String P2P_GO_NEG_FAILURE_STR = "P2P-GO-NEG-FAILURE"; private static final String P2P_GROUP_FORMATION_SUCCESS_STR = @@ -566,6 +567,26 @@ public class WifiMonitor { WifiManager.ERROR, 0)); } + /* <event> status=<err> and the special case of <event> reason=FREQ_CONFLICT */ + private P2pStatus p2pError(String dataString) { + P2pStatus err = P2pStatus.UNKNOWN; + String[] tokens = dataString.split(" "); + if (tokens.length < 2) return err; + String[] nameValue = tokens[1].split("="); + if (nameValue.length != 2) return err; + + /* Handle the special case of reason=FREQ+CONFLICT */ + if (nameValue[1].equals("FREQ_CONFLICT")) { + return P2pStatus.NO_COMMON_CHANNEL; + } + try { + err = P2pStatus.valueOf(Integer.parseInt(nameValue[1])); + } catch (NumberFormatException e) { + e.printStackTrace(); + } + return err; + } + /** * Handle p2p events */ @@ -582,11 +603,11 @@ public class WifiMonitor { } else if (dataString.startsWith(P2P_GO_NEG_SUCCESS_STR)) { mStateMachine.sendMessage(P2P_GO_NEGOTIATION_SUCCESS_EVENT); } else if (dataString.startsWith(P2P_GO_NEG_FAILURE_STR)) { - mStateMachine.sendMessage(P2P_GO_NEGOTIATION_FAILURE_EVENT); + mStateMachine.sendMessage(P2P_GO_NEGOTIATION_FAILURE_EVENT, p2pError(dataString)); } else if (dataString.startsWith(P2P_GROUP_FORMATION_SUCCESS_STR)) { mStateMachine.sendMessage(P2P_GROUP_FORMATION_SUCCESS_EVENT); } else if (dataString.startsWith(P2P_GROUP_FORMATION_FAILURE_STR)) { - mStateMachine.sendMessage(P2P_GROUP_FORMATION_FAILURE_EVENT); + mStateMachine.sendMessage(P2P_GROUP_FORMATION_FAILURE_EVENT, p2pError(dataString)); } else if (dataString.startsWith(P2P_GROUP_STARTED_STR)) { mStateMachine.sendMessage(P2P_GROUP_STARTED_EVENT, new WifiP2pGroup(dataString)); } else if (dataString.startsWith(P2P_GROUP_REMOVED_STR)) { @@ -595,17 +616,7 @@ public class WifiMonitor { mStateMachine.sendMessage(P2P_INVITATION_RECEIVED_EVENT, new WifiP2pGroup(dataString)); } else if (dataString.startsWith(P2P_INVITATION_RESULT_STR)) { - String[] tokens = dataString.split(" "); - if (tokens.length != 2) return; - String[] nameValue = tokens[1].split("="); - if (nameValue.length != 2) return; - P2pStatus err = P2pStatus.UNKNOWN; - try { - err = P2pStatus.valueOf(Integer.parseInt(nameValue[1])); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - mStateMachine.sendMessage(P2P_INVITATION_RESULT_EVENT, err); + mStateMachine.sendMessage(P2P_INVITATION_RESULT_EVENT, p2pError(dataString)); } else if (dataString.startsWith(P2P_PROV_DISC_PBC_REQ_STR)) { mStateMachine.sendMessage(P2P_PROV_DISC_PBC_REQ_EVENT, new WifiP2pProvDiscEvent(dataString)); diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index db539e4..196bf2e 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -114,6 +114,7 @@ public class WifiStateMachine extends StateMachine { private final boolean mP2pSupported; private final AtomicBoolean mP2pConnected = new AtomicBoolean(false); + private boolean mTemporarilyDisconnectWifi = false; private final String mPrimaryDeviceType; /* Scan results handling */ @@ -2017,6 +2018,10 @@ public class WifiStateMachine extends StateMachine { NetworkInfo info = (NetworkInfo) message.obj; mP2pConnected.set(info.isConnected()); break; + case WifiP2pService.DISCONNECT_WIFI_REQUEST: + mTemporarilyDisconnectWifi = (message.arg1 == 1); + replyToMessage(message, WifiP2pService.DISCONNECT_WIFI_RESPONSE); + break; default: loge("Error! unhandled message" + message); break; @@ -3030,6 +3035,15 @@ public class WifiStateMachine extends StateMachine { transitionTo(mDisconnectedState); } break; + case WifiP2pService.DISCONNECT_WIFI_REQUEST: + if (message.arg1 == 1) { + mWifiNative.disconnect(); + mTemporarilyDisconnectWifi = true; + } else { + mWifiNative.reconnect(); + mTemporarilyDisconnectWifi = false; + } + break; /* Do a redundant disconnect without transition */ case CMD_DISCONNECT: mWifiNative.disconnect(); @@ -3159,6 +3173,13 @@ public class WifiStateMachine extends StateMachine { mWifiNative.disconnect(); transitionTo(mDisconnectingState); break; + case WifiP2pService.DISCONNECT_WIFI_REQUEST: + if (message.arg1 == 1) { + mWifiNative.disconnect(); + mTemporarilyDisconnectWifi = true; + transitionTo(mDisconnectingState); + } + break; case CMD_SET_SCAN_MODE: if (message.arg1 == SCAN_ONLY_MODE) { sendMessage(CMD_DISCONNECT); @@ -3465,6 +3486,13 @@ public class WifiStateMachine extends StateMachine { if (DBG) log(getName() + "\n"); EventLog.writeEvent(EVENTLOG_WIFI_STATE_CHANGED, getName()); + // We dont scan frequently if this is a temporary disconnect + // due to p2p + if (mTemporarilyDisconnectWifi) { + mWifiP2pChannel.sendMessage(WifiP2pService.DISCONNECT_WIFI_RESPONSE); + return; + } + mFrameworkScanIntervalMs = Settings.Global.getLong(mContext.getContentResolver(), Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS, mDefaultFrameworkScanIntervalMs); @@ -3579,6 +3607,12 @@ public class WifiStateMachine extends StateMachine { sendMessageDelayed(obtainMessage(CMD_NO_NETWORKS_PERIODIC_SCAN, ++mPeriodicScanToken, 0), mSupplicantScanIntervalMs); } + case CMD_RECONNECT: + case CMD_REASSOCIATE: + // Drop a third party reconnect/reassociate if we are + // tempoarily disconnected for p2p + if (mTemporarilyDisconnectWifi) ret = NOT_HANDLED; + break; default: ret = NOT_HANDLED; } diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java index 9c727f9..c8f0712 100644 --- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java +++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java @@ -556,8 +556,8 @@ public class WifiWatchdogStateMachine extends StateMachine { mLinkProperties = (LinkProperties) intent.getParcelableExtra( WifiManager.EXTRA_LINK_PROPERTIES); if (mPoorNetworkDetectionEnabled) { - if (mWifiInfo == null) { - if (DBG) logd("Ignoring link verification, mWifiInfo is NULL"); + if (mWifiInfo == null || mCurrentBssid == null) { + loge("Ignore, wifiinfo " + mWifiInfo +" bssid " + mCurrentBssid); sendLinkStatusNotification(true); } else { transitionTo(mVerifyingLinkState); @@ -726,7 +726,7 @@ public class WifiWatchdogStateMachine extends StateMachine { } private void handleRssiChange() { - if (mCurrentSignalLevel <= LINK_MONITOR_LEVEL_THRESHOLD) { + if (mCurrentSignalLevel <= LINK_MONITOR_LEVEL_THRESHOLD && mCurrentBssid != null) { transitionTo(mLinkMonitoringState); } else { // stay here @@ -920,11 +920,15 @@ public class WifiWatchdogStateMachine extends StateMachine { if (DBG) logd("########################################"); if (isGood) { mWsmChannel.sendMessage(GOOD_LINK_DETECTED); - mCurrentBssid.mLastTimeGood = SystemClock.elapsedRealtime(); - logd("Good link notification is sent"); + if (mCurrentBssid != null) { + mCurrentBssid.mLastTimeGood = SystemClock.elapsedRealtime(); + } + if (DBG) logd("Good link notification is sent"); } else { mWsmChannel.sendMessage(POOR_LINK_DETECTED); - mCurrentBssid.mLastTimePoor = SystemClock.elapsedRealtime(); + if (mCurrentBssid != null) { + mCurrentBssid.mLastTimePoor = SystemClock.elapsedRealtime(); + } logd("Poor link notification is sent"); } } diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 70baf13..4b90901 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -149,9 +149,28 @@ public class WifiP2pService extends IWifiP2pManager.Stub { private static final int PEER_CONNECTION_USER_ACCEPT = BASE + 2; /* User rejected a peer request */ private static final int PEER_CONNECTION_USER_REJECT = BASE + 3; + /* User wants to disconnect wifi in favour of p2p */ + private static final int DROP_WIFI_USER_ACCEPT = BASE + 4; + /* User wants to keep his wifi connection and drop p2p */ + private static final int DROP_WIFI_USER_REJECT = BASE + 5; + /* Commands to the WifiStateMachine */ - public static final int P2P_CONNECTION_CHANGED = BASE + 11; + public static final int P2P_CONNECTION_CHANGED = BASE + 11; + + /* These commands are used to tempoarily disconnect wifi when we detect + * a frequency conflict which would make it impossible to have with p2p + * and wifi active at the same time. + * + * If the user chooses to disable wifi tempoarily, we keep wifi disconnected + * until the p2p connection is done and terminated at which point we will + * bring back wifi up + * + * DISCONNECT_WIFI_REQUEST + * msg.arg1 = 1 enables temporary disconnect and 0 disables it. + */ + public static final int DISCONNECT_WIFI_REQUEST = BASE + 12; + public static final int DISCONNECT_WIFI_RESPONSE = BASE + 13; private final boolean mP2pSupported; @@ -172,6 +191,8 @@ public class WifiP2pService extends IWifiP2pManager.Stub { private NetworkInfo mNetworkInfo; + private boolean mTempoarilyDisconnectedWifi = false; + /* The transaction Id of service discovery request */ private byte mServiceTransactionId = 0; @@ -222,7 +243,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { PREVIOUS_PROTOCOL_ERROR, /* There is no common channels the both devices can use. */ - NO_COMMON_CHANNE, + NO_COMMON_CHANNEL, /* Unknown p2p group. For example, Device A tries to invoke the previous persistent group, * but device B has removed the specified credential already. */ @@ -257,7 +278,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { case 6: return PREVIOUS_PROTOCOL_ERROR; case 7: - return NO_COMMON_CHANNE; + return NO_COMMON_CHANNEL; case 8: return UNKNOWN_P2P_GROUP; case 9: @@ -346,6 +367,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { = new UserAuthorizingInvitationState(); private ProvisionDiscoveryState mProvisionDiscoveryState = new ProvisionDiscoveryState(); private GroupNegotiationState mGroupNegotiationState = new GroupNegotiationState(); + private FrequencyConflictState mFrequencyConflictState =new FrequencyConflictState(); private GroupCreatedState mGroupCreatedState = new GroupCreatedState(); private UserAuthorizingJoinState mUserAuthorizingJoinState = new UserAuthorizingJoinState(); @@ -400,6 +422,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { addState(mUserAuthorizingInvitationState, mGroupCreatingState); addState(mProvisionDiscoveryState, mGroupCreatingState); addState(mGroupNegotiationState, mGroupCreatingState); + addState(mFrequencyConflictState, mGroupCreatingState); addState(mGroupCreatedState, mP2pEnabledState); addState(mUserAuthorizingJoinState, mGroupCreatedState); addState(mOngoingGroupRemovalState, mGroupCreatedState); @@ -555,6 +578,9 @@ public class WifiP2pService extends IWifiP2pManager.Stub { case WifiStateMachine.CMD_DISABLE_P2P: case PEER_CONNECTION_USER_ACCEPT: case PEER_CONNECTION_USER_REJECT: + case DISCONNECT_WIFI_RESPONSE: + case DROP_WIFI_USER_ACCEPT: + case DROP_WIFI_USER_REJECT: case GROUP_CREATING_TIMED_OUT: case DhcpStateMachine.CMD_PRE_DHCP_ACTION: case DhcpStateMachine.CMD_POST_DHCP_ACTION: @@ -1027,20 +1053,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { // remain at this state. } break; - case WifiMonitor.P2P_GROUP_STARTED_EVENT: - mGroup = (WifiP2pGroup) message.obj; - if (DBG) logd(getName() + " group started"); - - if (mGroup.getNetworkId() == WifiP2pGroup.PERSISTENT_NET_ID) { - // This is an invocation case. - mAutonomousGroup = false; - deferMessage(message); - transitionTo(mGroupNegotiationState); - } else { - return NOT_HANDLED; - } - break; - default: + default: return NOT_HANDLED; } return HANDLED; @@ -1074,6 +1087,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub { // mSavedPeerConfig can be empty if (mSavedPeerConfig != null && !mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) { + if (DBG) { + logd("mSavedPeerConfig " + mSavedPeerConfig.deviceAddress + + "device " + device.deviceAddress); + } // Do the regular device lost handling ret = NOT_HANDLED; break; @@ -1269,6 +1286,12 @@ public class WifiP2pService extends IWifiP2pManager.Stub { transitionTo(mGroupCreatedState); break; case WifiMonitor.P2P_GO_NEGOTIATION_FAILURE_EVENT: + P2pStatus status = (P2pStatus) message.obj; + if (status == P2pStatus.NO_COMMON_CHANNEL) { + transitionTo(mFrequencyConflictState); + break; + } + /* continue with group removal handling */ case WifiMonitor.P2P_GROUP_REMOVED_EVENT: if (DBG) logd(getName() + " go failure"); handleGroupCreationFailure(); @@ -1278,9 +1301,14 @@ public class WifiP2pService extends IWifiP2pManager.Stub { // a group removed event. Flushing things at group formation // failure causes supplicant issues. Ignore right now. case WifiMonitor.P2P_GROUP_FORMATION_FAILURE_EVENT: + status = (P2pStatus) message.obj; + if (status == P2pStatus.NO_COMMON_CHANNEL) { + transitionTo(mFrequencyConflictState); + break; + } break; case WifiMonitor.P2P_INVITATION_RESULT_EVENT: - P2pStatus status = (P2pStatus)message.obj; + status = (P2pStatus)message.obj; if (status == P2pStatus.SUCCESS) { // invocation was succeeded. // wait P2P_GROUP_STARTED_EVENT. @@ -1300,6 +1328,8 @@ public class WifiP2pService extends IWifiP2pManager.Stub { handleGroupCreationFailure(); transitionTo(mInactiveState); } + } else if (status == P2pStatus.NO_COMMON_CHANNEL) { + transitionTo(mFrequencyConflictState); } else { handleGroupCreationFailure(); transitionTo(mInactiveState); @@ -1312,7 +1342,90 @@ public class WifiP2pService extends IWifiP2pManager.Stub { } } + class FrequencyConflictState extends State { + private AlertDialog mFrequencyConflictDialog; + @Override + public void enter() { + if (DBG) logd(getName()); + notifyFrequencyConflict(); + } + + private void notifyFrequencyConflict() { + logd("Notify frequency conflict"); + Resources r = Resources.getSystem(); + + AlertDialog dialog = new AlertDialog.Builder(mContext) + .setMessage(r.getString(R.string.wifi_p2p_frequency_conflict_message, + getDeviceName(mSavedPeerConfig.deviceAddress))) + .setPositiveButton(r.getString(R.string.dlg_ok), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + sendMessage(DROP_WIFI_USER_ACCEPT); + } + }) + .setNegativeButton(r.getString(R.string.decline), new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + sendMessage(DROP_WIFI_USER_REJECT); + } + }) + .setOnCancelListener(new DialogInterface.OnCancelListener() { + @Override + public void onCancel(DialogInterface arg0) { + sendMessage(DROP_WIFI_USER_REJECT); + } + }) + .create(); + + dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); + dialog.show(); + mFrequencyConflictDialog = dialog; + } + @Override + public boolean processMessage(Message message) { + if (DBG) logd(getName() + message.toString()); + switch (message.what) { + case WifiMonitor.P2P_GO_NEGOTIATION_SUCCESS_EVENT: + case WifiMonitor.P2P_GROUP_FORMATION_SUCCESS_EVENT: + loge(getName() + "group sucess during freq conflict!"); + break; + case WifiMonitor.P2P_GROUP_STARTED_EVENT: + loge(getName() + "group started after freq conflict, handle anyway"); + deferMessage(message); + transitionTo(mGroupNegotiationState); + break; + case WifiMonitor.P2P_GO_NEGOTIATION_FAILURE_EVENT: + case WifiMonitor.P2P_GROUP_REMOVED_EVENT: + case WifiMonitor.P2P_GROUP_FORMATION_FAILURE_EVENT: + // Ignore failures since we retry again + break; + case DROP_WIFI_USER_REJECT: + // User rejected dropping wifi in favour of p2p + handleGroupCreationFailure(); + transitionTo(mInactiveState); + break; + case DROP_WIFI_USER_ACCEPT: + // User accepted dropping wifi in favour of p2p + mWifiChannel.sendMessage(WifiP2pService.DISCONNECT_WIFI_REQUEST, 1); + mTempoarilyDisconnectedWifi = true; + break; + case DISCONNECT_WIFI_RESPONSE: + // Got a response from wifistatemachine, retry p2p + if (DBG) logd(getName() + "Wifi disconnected, retry p2p"); + transitionTo(mInactiveState); + sendMessage(WifiP2pManager.CONNECT, mSavedPeerConfig); + break; + default: + return NOT_HANDLED; + } + return HANDLED; + } + + public void exit() { + if (mFrequencyConflictDialog != null) mFrequencyConflictDialog.dismiss(); + } + } class GroupCreatedState extends State { @Override @@ -2195,6 +2308,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mPeersLostDuringConnection.clear(); mServiceDiscReqId = null; if (changed) sendP2pPeersChangedBroadcast(); + + if (mTempoarilyDisconnectedWifi) { + mWifiChannel.sendMessage(WifiP2pService.DISCONNECT_WIFI_REQUEST, 0); + mTempoarilyDisconnectedWifi = false; + } } //State machine initiated requests can have replyTo set to null indicating |
