summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--core/java/android/animation/AnimatorInflater.java3
-rw-r--r--core/java/android/app/ActionBar.java25
-rw-r--r--core/java/android/app/Activity.java14
-rw-r--r--core/java/android/app/ActivityManagerNative.java29
-rw-r--r--core/java/android/app/ActivityThread.java7
-rw-r--r--core/java/android/app/AlertDialog.java30
-rw-r--r--core/java/android/app/ApplicationPackageManager.java9
-rw-r--r--core/java/android/app/Dialog.java12
-rw-r--r--core/java/android/app/Fragment.java7
-rw-r--r--core/java/android/app/FragmentManager.java3
-rw-r--r--core/java/android/app/IActivityManager.java5
-rw-r--r--core/java/android/app/Notification.java6
-rw-r--r--core/java/android/app/ResourcesManager.java5
-rw-r--r--core/java/android/app/SearchableInfo.java4
-rw-r--r--core/java/android/app/WallpaperManager.java5
-rw-r--r--core/java/android/content/Context.java13
-rw-r--r--core/java/android/content/Intent.java7
-rw-r--r--core/java/android/content/RestrictionEntry.java5
-rw-r--r--core/java/android/content/pm/PackageManager.java9
-rw-r--r--core/java/android/content/res/Resources.java103
-rw-r--r--core/java/android/content/res/TypedArray.java2
-rw-r--r--core/java/android/gesture/GestureLibraries.java3
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java3
-rw-r--r--core/java/android/inputmethodservice/Keyboard.java6
-rw-r--r--core/java/android/os/AsyncTask.java2
-rw-r--r--core/java/android/os/IUserManager.aidl3
-rw-r--r--core/java/android/os/UserManager.java16
-rw-r--r--core/java/android/preference/DialogPreference.java8
-rw-r--r--core/java/android/preference/GenericInflater.java6
-rw-r--r--core/java/android/preference/ListPreference.java5
-rw-r--r--core/java/android/preference/MultiCheckPreference.java5
-rw-r--r--core/java/android/preference/MultiSelectListPreference.java5
-rw-r--r--core/java/android/preference/Preference.java16
-rw-r--r--core/java/android/preference/PreferenceActivity.java17
-rw-r--r--core/java/android/preference/PreferenceManager.java5
-rw-r--r--core/java/android/preference/SwitchPreference.java5
-rw-r--r--core/java/android/preference/TwoStatePreference.java5
-rw-r--r--core/java/android/provider/MediaStore.java23
-rw-r--r--core/java/android/provider/Settings.java31
-rw-r--r--core/java/android/service/dreams/DreamService.java6
-rw-r--r--core/java/android/speech/tts/TextToSpeech.java5
-rw-r--r--core/java/android/text/style/ImageSpan.java5
-rw-r--r--core/java/android/util/TypedValue.java3
-rw-r--r--core/java/android/view/ActionMode.java6
-rw-r--r--core/java/android/view/ContextMenu.java6
-rw-r--r--core/java/android/view/LayoutInflater.java5
-rw-r--r--core/java/android/view/Menu.java9
-rw-r--r--core/java/android/view/MenuInflater.java3
-rw-r--r--core/java/android/view/MenuItem.java9
-rw-r--r--core/java/android/view/PointerIcon.java5
-rw-r--r--core/java/android/view/SubMenu.java8
-rw-r--r--core/java/android/view/View.java14
-rw-r--r--core/java/android/view/ViewGroup.java3
-rw-r--r--core/java/android/view/ViewStub.java10
-rw-r--r--core/java/android/view/Window.java21
-rw-r--r--core/java/android/view/animation/AnimationUtils.java9
-rw-r--r--core/java/android/widget/AbsListView.java3
-rw-r--r--core/java/android/widget/ActivityChooserView.java5
-rw-r--r--core/java/android/widget/ArrayAdapter.java17
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java3
-rw-r--r--core/java/android/widget/CalendarView.java3
-rw-r--r--core/java/android/widget/CheckedTextView.java4
-rw-r--r--core/java/android/widget/CompoundButton.java1
-rw-r--r--core/java/android/widget/DatePickerCalendarDelegate.java1
-rw-r--r--core/java/android/widget/ImageSwitcher.java4
-rw-r--r--core/java/android/widget/ImageView.java3
-rw-r--r--core/java/android/widget/ListView.java3
-rw-r--r--core/java/android/widget/PopupMenu.java3
-rw-r--r--core/java/android/widget/ProgressBar.java3
-rw-r--r--core/java/android/widget/RadioGroup.java8
-rw-r--r--core/java/android/widget/Spinner.java4
-rw-r--r--core/java/android/widget/Switch.java8
-rw-r--r--core/java/android/widget/TabWidget.java7
-rw-r--r--core/java/android/widget/TextView.java21
-rw-r--r--core/java/android/widget/Toast.java5
-rw-r--r--core/jni/android_server_FingerprintManager.cpp17
-rw-r--r--core/res/res/values-ka-rGE/strings.xml4
-rw-r--r--core/res/res/values-tr/strings.xml2
-rw-r--r--core/res/res/values/colors_material.xml1
-rw-r--r--core/res/res/values/public.xml1
-rw-r--r--core/res/res/values/themes_material.xml7
-rw-r--r--docs/html/design/style/iconography.jd28
-rw-r--r--docs/html/google/play/billing/billing_integrate.jd12
-rw-r--r--docs/html/google/play/billing/billing_reference.jd7
-rw-r--r--docs/html/guide/practices/screens_support.jd50
-rw-r--r--docs/html/guide/topics/media/exoplayer.jd56
-rw-r--r--docs/html/guide/topics/resources/available-resources.jd1
-rw-r--r--docs/html/guide/topics/resources/providing-resources.jd18
-rw-r--r--docs/html/images/exoplayer/adaptive-streaming.pngbin40791 -> 40489 bytes
-rw-r--r--docs/html/images/tools/projectview-p1.pngbin0 -> 30780 bytes
-rw-r--r--docs/html/images/tools/projectview-p2.pngbin0 -> 33649 bytes
-rw-r--r--docs/html/images/tools/studio-mipmap-folders.pngbin0 -> 8430 bytes
-rw-r--r--docs/html/images/tools/studio-project-layout.pngbin47374 -> 18344 bytes
-rw-r--r--docs/html/sdk/installing/adding-packages.jd2
-rw-r--r--docs/html/sdk/installing/create-project.jd41
-rw-r--r--docs/html/sdk/installing/index.jd7
-rw-r--r--docs/html/tools/help/sdk-manager.jd2
-rw-r--r--docs/html/tools/projects/index.jd59
-rw-r--r--docs/html/tools/revisions/gradle-plugin.jd153
-rw-r--r--docs/html/tools/revisions/studio.jd29
-rw-r--r--docs/html/tools/studio/index.jd166
-rw-r--r--docs/html/tools/tools_toc.cs3
-rw-r--r--docs/html/training/basics/firstapp/creating-project.jd27
-rw-r--r--docs/html/training/basics/firstapp/running-app.jd101
-rw-r--r--docs/html/training/basics/fragments/support-lib.jd83
-rw-r--r--docs/html/training/multiscreen/screendensities.jd23
-rw-r--r--libs/hwui/FloatColor.h16
-rw-r--r--libs/hwui/Glop.h10
-rw-r--r--libs/hwui/GlopBuilder.cpp79
-rw-r--r--libs/hwui/GlopBuilder.h10
-rw-r--r--libs/hwui/OpenGLRenderer.cpp121
-rw-r--r--libs/hwui/SkiaShader.cpp301
-rw-r--r--libs/hwui/SkiaShader.h66
-rw-r--r--libs/hwui/Vertex.h2
-rw-r--r--libs/hwui/renderstate/RenderState.cpp5
-rw-r--r--libs/hwui/utils/Macros.h2
-rw-r--r--media/java/android/media/MediaRouter.java5
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java67
-rw-r--r--packages/Keyguard/src/com/android/keyguard/NumPadKey.java23
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java1
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java66
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java15
-rw-r--r--packages/SystemUI/res/values-af/strings.xml15
-rw-r--r--packages/SystemUI/res/values-am/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ar/strings.xml15
-rw-r--r--packages/SystemUI/res/values-bg/strings.xml15
-rw-r--r--packages/SystemUI/res/values-bn-rBD/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ca/strings.xml15
-rw-r--r--packages/SystemUI/res/values-cs/strings.xml15
-rw-r--r--packages/SystemUI/res/values-da/strings.xml15
-rw-r--r--packages/SystemUI/res/values-de/strings.xml15
-rw-r--r--packages/SystemUI/res/values-el/strings.xml15
-rw-r--r--packages/SystemUI/res/values-en-rGB/strings.xml15
-rw-r--r--packages/SystemUI/res/values-en-rIN/strings.xml15
-rw-r--r--packages/SystemUI/res/values-es-rUS/strings.xml15
-rw-r--r--packages/SystemUI/res/values-es/strings.xml15
-rw-r--r--packages/SystemUI/res/values-et-rEE/strings.xml15
-rw-r--r--packages/SystemUI/res/values-eu-rES/strings.xml15
-rw-r--r--packages/SystemUI/res/values-fa/strings.xml15
-rw-r--r--packages/SystemUI/res/values-fi/strings.xml15
-rw-r--r--packages/SystemUI/res/values-fr-rCA/strings.xml15
-rw-r--r--packages/SystemUI/res/values-fr/strings.xml15
-rw-r--r--packages/SystemUI/res/values-gl-rES/strings.xml15
-rw-r--r--packages/SystemUI/res/values-hi/strings.xml15
-rw-r--r--packages/SystemUI/res/values-hr/strings.xml15
-rw-r--r--packages/SystemUI/res/values-hu/strings.xml15
-rw-r--r--packages/SystemUI/res/values-hy-rAM/strings.xml15
-rw-r--r--packages/SystemUI/res/values-in/strings.xml15
-rw-r--r--packages/SystemUI/res/values-is-rIS/strings.xml15
-rw-r--r--packages/SystemUI/res/values-it/strings.xml15
-rw-r--r--packages/SystemUI/res/values-iw/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ja/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ka-rGE/strings.xml19
-rw-r--r--packages/SystemUI/res/values-kk-rKZ/strings.xml15
-rw-r--r--packages/SystemUI/res/values-km-rKH/strings.xml15
-rw-r--r--packages/SystemUI/res/values-kn-rIN/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ky-rKG/strings.xml15
-rw-r--r--packages/SystemUI/res/values-lt/strings.xml15
-rw-r--r--packages/SystemUI/res/values-lv/strings.xml15
-rw-r--r--packages/SystemUI/res/values-mk-rMK/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ml-rIN/strings.xml15
-rw-r--r--packages/SystemUI/res/values-mr-rIN/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ms-rMY/strings.xml15
-rw-r--r--packages/SystemUI/res/values-my-rMM/strings.xml15
-rw-r--r--packages/SystemUI/res/values-nb/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ne-rNP/strings.xml15
-rw-r--r--packages/SystemUI/res/values-nl/strings.xml15
-rw-r--r--packages/SystemUI/res/values-pl/strings.xml15
-rw-r--r--packages/SystemUI/res/values-pt-rPT/strings.xml15
-rw-r--r--packages/SystemUI/res/values-pt/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ro/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ru/strings.xml15
-rw-r--r--packages/SystemUI/res/values-si-rLK/strings.xml15
-rw-r--r--packages/SystemUI/res/values-sk/strings.xml15
-rw-r--r--packages/SystemUI/res/values-sl/strings.xml15
-rw-r--r--packages/SystemUI/res/values-sr/strings.xml15
-rw-r--r--packages/SystemUI/res/values-sv/strings.xml15
-rw-r--r--packages/SystemUI/res/values-sw/strings.xml15
-rw-r--r--packages/SystemUI/res/values-ta-rIN/strings.xml15
-rw-r--r--packages/SystemUI/res/values-te-rIN/strings.xml15
-rw-r--r--packages/SystemUI/res/values-th/strings.xml15
-rw-r--r--packages/SystemUI/res/values-tl/strings.xml15
-rw-r--r--packages/SystemUI/res/values-uk/strings.xml15
-rw-r--r--packages/SystemUI/res/values-uz-rUZ/strings.xml15
-rw-r--r--packages/SystemUI/res/values-vi/strings.xml15
-rw-r--r--packages/SystemUI/res/values-zh-rHK/strings.xml15
-rw-r--r--packages/SystemUI/res/values-zh-rTW/strings.xml15
-rw-r--r--packages/SystemUI/res/values-zu/strings.xml15
-rw-r--r--packages/SystemUI/res/values/strings.xml12
-rw-r--r--rs/java/android/renderscript/RenderScript.java49
-rw-r--r--rs/java/android/renderscript/ScriptIntrinsicBLAS.java1489
-rw-r--r--rs/jni/android_renderscript_RenderScript.cpp142
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java32
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java10
-rw-r--r--services/core/java/com/android/server/media/MediaSessionService.java14
-rw-r--r--services/core/java/com/android/server/pm/UserManagerService.java24
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java4
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java191
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java12
-rw-r--r--tests/HwAccelerationTest/res/layout/projection_clipping.xml6
-rw-r--r--tools/apilint/apilint.py124
-rw-r--r--tools/layoutlib/.idea/codeStyleSettings.xml4
-rw-r--r--tools/layoutlib/.idea/misc.xml3
-rw-r--r--tools/layoutlib/bridge/src/android/content/res/BridgeAssetManager.java15
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java101
-rw-r--r--tools/layoutlib/bridge/src/android/view/ViewGroup_Delegate.java9
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java11
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java19
210 files changed, 4125 insertions, 1531 deletions
diff --git a/api/current.txt b/api/current.txt
index 5fffbb0..7d8b892 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -2120,6 +2120,7 @@ package android {
field public static final int Theme_Material_Light_Dialog_NoActionBar = 16974396; // 0x103023c
field public static final int Theme_Material_Light_Dialog_NoActionBar_MinWidth = 16974397; // 0x103023d
field public static final int Theme_Material_Light_Dialog_Presentation = 16974398; // 0x103023e
+ field public static final int Theme_Material_Light_LightStatusBar = 16974563; // 0x10302e3
field public static final int Theme_Material_Light_NoActionBar = 16974401; // 0x1030241
field public static final int Theme_Material_Light_NoActionBar_Fullscreen = 16974402; // 0x1030242
field public static final int Theme_Material_Light_NoActionBar_Overscan = 16974403; // 0x1030243
diff --git a/api/system-current.txt b/api/system-current.txt
index c43f2c7..6968896 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -2199,6 +2199,7 @@ package android {
field public static final int Theme_Material_Light_Dialog_NoActionBar = 16974396; // 0x103023c
field public static final int Theme_Material_Light_Dialog_NoActionBar_MinWidth = 16974397; // 0x103023d
field public static final int Theme_Material_Light_Dialog_Presentation = 16974398; // 0x103023e
+ field public static final int Theme_Material_Light_LightStatusBar = 16974563; // 0x10302e3
field public static final int Theme_Material_Light_NoActionBar = 16974401; // 0x1030241
field public static final int Theme_Material_Light_NoActionBar_Fullscreen = 16974402; // 0x1030242
field public static final int Theme_Material_Light_NoActionBar_Overscan = 16974403; // 0x1030243
diff --git a/core/java/android/animation/AnimatorInflater.java b/core/java/android/animation/AnimatorInflater.java
index 6ef3da8..d5ae6c6 100644
--- a/core/java/android/animation/AnimatorInflater.java
+++ b/core/java/android/animation/AnimatorInflater.java
@@ -15,6 +15,7 @@
*/
package android.animation;
+import android.annotation.AnimatorRes;
import android.content.Context;
import android.content.res.ConfigurationBoundResourceCache;
import android.content.res.ConstantState;
@@ -82,7 +83,7 @@ public class AnimatorInflater {
* @return The animator object reference by the specified id
* @throws android.content.res.Resources.NotFoundException when the animation cannot be loaded
*/
- public static Animator loadAnimator(Context context, int id)
+ public static Animator loadAnimator(Context context, @AnimatorRes int id)
throws NotFoundException {
return loadAnimator(context.getResources(), context.getTheme(), id);
}
diff --git a/core/java/android/app/ActionBar.java b/core/java/android/app/ActionBar.java
index 014a7af..4cdd397 100644
--- a/core/java/android/app/ActionBar.java
+++ b/core/java/android/app/ActionBar.java
@@ -16,9 +16,12 @@
package android.app;
+import android.annotation.DrawableRes;
import android.annotation.IntDef;
+import android.annotation.LayoutRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.StringRes;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -256,7 +259,7 @@ public abstract class ActionBar {
*
* @see #setDisplayOptions(int, int)
*/
- public abstract void setCustomView(int resId);
+ public abstract void setCustomView(@LayoutRes int resId);
/**
* Set the icon to display in the 'home' section of the action bar.
@@ -271,7 +274,7 @@ public abstract class ActionBar {
* @see #setDisplayUseLogoEnabled(boolean)
* @see #setDisplayShowHomeEnabled(boolean)
*/
- public abstract void setIcon(int resId);
+ public abstract void setIcon(@DrawableRes int resId);
/**
* Set the icon to display in the 'home' section of the action bar.
@@ -301,7 +304,7 @@ public abstract class ActionBar {
* @see #setDisplayUseLogoEnabled(boolean)
* @see #setDisplayShowHomeEnabled(boolean)
*/
- public abstract void setLogo(int resId);
+ public abstract void setLogo(@DrawableRes int resId);
/**
* Set the logo to display in the 'home' section of the action bar.
@@ -397,7 +400,7 @@ public abstract class ActionBar {
* @see #setTitle(CharSequence)
* @see #setDisplayOptions(int, int)
*/
- public abstract void setTitle(int resId);
+ public abstract void setTitle(@StringRes int resId);
/**
* Set the action bar's subtitle. This will only be displayed if
@@ -420,7 +423,7 @@ public abstract class ActionBar {
* @see #setSubtitle(CharSequence)
* @see #setDisplayOptions(int, int)
*/
- public abstract void setSubtitle(int resId);
+ public abstract void setSubtitle(@StringRes int resId);
/**
* Set display options. This changes all display option bits at once. To change
@@ -892,7 +895,7 @@ public abstract class ActionBar {
* @see #setDisplayHomeAsUpEnabled(boolean)
* @see #setHomeActionContentDescription(int)
*/
- public void setHomeAsUpIndicator(int resId) { }
+ public void setHomeAsUpIndicator(@DrawableRes int resId) { }
/**
* Set an alternate description for the Home/Up action, when enabled.
@@ -931,7 +934,7 @@ public abstract class ActionBar {
* @see #setHomeAsUpIndicator(int)
* @see #setHomeAsUpIndicator(android.graphics.drawable.Drawable)
*/
- public void setHomeActionContentDescription(int resId) { }
+ public void setHomeActionContentDescription(@StringRes int resId) { }
/**
* Enable hiding the action bar on content scroll.
@@ -1154,7 +1157,7 @@ public abstract class ActionBar {
* @param resId Resource ID referring to the drawable to use as an icon
* @return The current instance for call chaining
*/
- public abstract Tab setIcon(int resId);
+ public abstract Tab setIcon(@DrawableRes int resId);
/**
* Set the text displayed on this tab. Text may be truncated if there is not
@@ -1172,7 +1175,7 @@ public abstract class ActionBar {
* @param resId A resource ID referring to the text that should be displayed
* @return The current instance for call chaining
*/
- public abstract Tab setText(int resId);
+ public abstract Tab setText(@StringRes int resId);
/**
* Set a custom view to be used for this tab. This overrides values set by
@@ -1190,7 +1193,7 @@ public abstract class ActionBar {
* @param layoutResId A layout resource to inflate and use as a custom tab view
* @return The current instance for call chaining
*/
- public abstract Tab setCustomView(int layoutResId);
+ public abstract Tab setCustomView(@LayoutRes int layoutResId);
/**
* Retrieve a previously set custom view for this tab.
@@ -1235,7 +1238,7 @@ public abstract class ActionBar {
* @see #setContentDescription(CharSequence)
* @see #getContentDescription()
*/
- public abstract Tab setContentDescription(int resId);
+ public abstract Tab setContentDescription(@StringRes int resId);
/**
* Set a description of this tab's content for use in accessibility support.
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index aa1c70e..f0d98f8 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -16,7 +16,13 @@
package android.app;
+import android.annotation.DrawableRes;
+import android.annotation.IdRes;
+import android.annotation.IntDef;
+import android.annotation.LayoutRes;
import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.StyleRes;
import android.os.PersistableBundle;
import android.transition.Scene;
import android.transition.TransitionManager;
@@ -2070,7 +2076,7 @@ public class Activity extends ContextThemeWrapper
* @return The view if found or null otherwise.
*/
@Nullable
- public View findViewById(int id) {
+ public View findViewById(@IdRes int id) {
return getWindow().findViewById(id);
}
@@ -2143,7 +2149,7 @@ public class Activity extends ContextThemeWrapper
* @see #setContentView(android.view.View)
* @see #setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
*/
- public void setContentView(int layoutResID) {
+ public void setContentView(@LayoutRes int layoutResID) {
getWindow().setContentView(layoutResID);
initWindowDecorActionBar();
}
@@ -3611,7 +3617,7 @@ public class Activity extends ContextThemeWrapper
* Convenience for calling
* {@link android.view.Window#setFeatureDrawableResource}.
*/
- public final void setFeatureDrawableResource(int featureId, int resId) {
+ public final void setFeatureDrawableResource(int featureId, @DrawableRes int resId) {
getWindow().setFeatureDrawableResource(featureId, resId);
}
@@ -3666,7 +3672,7 @@ public class Activity extends ContextThemeWrapper
}
@Override
- protected void onApplyThemeResource(Resources.Theme theme, int resid,
+ protected void onApplyThemeResource(Resources.Theme theme, @StyleRes int resid,
boolean first) {
if (mParent == null) {
super.onApplyThemeResource(theme, resid, first);
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index fa10893..005b1d9 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -17,7 +17,6 @@
package android.app;
import android.app.ActivityManager.StackInfo;
-import android.app.ProfilerInfo;
import android.content.ComponentName;
import android.content.IIntentReceiver;
import android.content.IIntentSender;
@@ -2233,17 +2232,12 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
return true;
}
- case GET_ACTIVITY_CONTAINER_TRANSACTION: {
+ case GET_ACTIVITY_DISPLAY_ID_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder activityToken = data.readStrongBinder();
- IActivityContainer activityContainer = getEnclosingActivityContainer(activityToken);
+ int displayId = getActivityDisplayId(activityToken);
reply.writeNoException();
- if (activityContainer != null) {
- reply.writeInt(1);
- reply.writeStrongBinder(activityContainer.asBinder());
- } else {
- reply.writeInt(0);
- }
+ reply.writeInt(displayId);
return true;
}
@@ -5298,6 +5292,7 @@ class ActivityManagerProxy implements IActivityManager
reply.recycle();
}
+ @Override
public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
@@ -5317,26 +5312,22 @@ class ActivityManagerProxy implements IActivityManager
return res;
}
- public IActivityContainer getEnclosingActivityContainer(IBinder activityToken)
+ @Override
+ public int getActivityDisplayId(IBinder activityToken)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(activityToken);
- mRemote.transact(GET_ACTIVITY_CONTAINER_TRANSACTION, data, reply, 0);
+ mRemote.transact(GET_ACTIVITY_DISPLAY_ID_TRANSACTION, data, reply, 0);
reply.readException();
- final int result = reply.readInt();
- final IActivityContainer res;
- if (result == 1) {
- res = IActivityContainer.Stub.asInterface(reply.readStrongBinder());
- } else {
- res = null;
- }
+ final int displayId = reply.readInt();
data.recycle();
reply.recycle();
- return res;
+ return displayId;
}
+ @Override
public IBinder getHomeActivityToken() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 0289e48..a8eb076 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2375,11 +2375,7 @@ public final class ActivityThread {
private Context createBaseContextForActivity(ActivityClientRecord r, final Activity activity) {
int displayId = Display.DEFAULT_DISPLAY;
try {
- IActivityContainer container =
- ActivityManagerNative.getDefault().getEnclosingActivityContainer(r.token);
- if (container != null) {
- displayId = container.getDisplayId();
- }
+ displayId = ActivityManagerNative.getDefault().getActivityDisplayId(r.token);
} catch (RemoteException e) {
}
@@ -3867,6 +3863,7 @@ public final class ActivityThread {
ActivityClientRecord existing = mActivities.get(token);
if (existing != null) {
target.startsNotResumed = existing.paused;
+ target.overrideConfig = existing.overrideConfig;
}
target.onlyLocalRequest = true;
}
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 3c6458f..c8f58c6 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -18,6 +18,10 @@ package android.app;
import com.android.internal.app.AlertController;
+import android.annotation.ArrayRes;
+import android.annotation.AttrRes;
+import android.annotation.DrawableRes;
+import android.annotation.StringRes;
import android.content.Context;
import android.content.DialogInterface;
import android.database.Cursor;
@@ -117,7 +121,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
* or one of the constants {@link #THEME_TRADITIONAL},
* {@link #THEME_HOLO_DARK}, or {@link #THEME_HOLO_LIGHT}.
*/
- protected AlertDialog(Context context, int theme) {
+ protected AlertDialog(Context context, @AttrRes int theme) {
this(context, theme, true);
}
@@ -327,7 +331,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
* @param resId the resourceId of the drawable to use as the icon or 0
* if you don't want an icon.
*/
- public void setIcon(int resId) {
+ public void setIcon(@DrawableRes int resId) {
mAlert.setIcon(resId);
}
@@ -340,7 +344,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @param attrId ID of a theme attribute that points to a drawable resource.
*/
- public void setIconAttribute(int attrId) {
+ public void setIconAttribute(@AttrRes int attrId) {
TypedValue out = new TypedValue();
mContext.getTheme().resolveAttribute(attrId, out, true);
mAlert.setIcon(out.resourceId);
@@ -413,7 +417,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setTitle(int titleId) {
+ public Builder setTitle(@StringRes int titleId) {
P.mTitle = P.mContext.getText(titleId);
return this;
}
@@ -449,7 +453,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setMessage(int messageId) {
+ public Builder setMessage(@StringRes int messageId) {
P.mMessage = P.mContext.getText(messageId);
return this;
}
@@ -471,7 +475,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setIcon(int iconId) {
+ public Builder setIcon(@DrawableRes int iconId) {
P.mIconId = iconId;
return this;
}
@@ -495,7 +499,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @param attrId ID of a theme attribute that points to a drawable resource.
*/
- public Builder setIconAttribute(int attrId) {
+ public Builder setIconAttribute(@AttrRes int attrId) {
TypedValue out = new TypedValue();
P.mContext.getTheme().resolveAttribute(attrId, out, true);
P.mIconId = out.resourceId;
@@ -509,7 +513,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setPositiveButton(int textId, final OnClickListener listener) {
+ public Builder setPositiveButton(@StringRes int textId, final OnClickListener listener) {
P.mPositiveButtonText = P.mContext.getText(textId);
P.mPositiveButtonListener = listener;
return this;
@@ -535,7 +539,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setNegativeButton(int textId, final OnClickListener listener) {
+ public Builder setNegativeButton(@StringRes int textId, final OnClickListener listener) {
P.mNegativeButtonText = P.mContext.getText(textId);
P.mNegativeButtonListener = listener;
return this;
@@ -561,7 +565,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setNeutralButton(int textId, final OnClickListener listener) {
+ public Builder setNeutralButton(@StringRes int textId, final OnClickListener listener) {
P.mNeutralButtonText = P.mContext.getText(textId);
P.mNeutralButtonListener = listener;
return this;
@@ -634,7 +638,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setItems(int itemsId, final OnClickListener listener) {
+ public Builder setItems(@ArrayRes int itemsId, final OnClickListener listener) {
P.mItems = P.mContext.getResources().getTextArray(itemsId);
P.mOnClickListener = listener;
return this;
@@ -706,7 +710,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setMultiChoiceItems(int itemsId, boolean[] checkedItems,
+ public Builder setMultiChoiceItems(@ArrayRes int itemsId, boolean[] checkedItems,
final OnMultiChoiceClickListener listener) {
P.mItems = P.mContext.getResources().getTextArray(itemsId);
P.mOnCheckboxClickListener = listener;
@@ -785,7 +789,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
*
* @return This Builder object to allow for chaining of calls to set methods
*/
- public Builder setSingleChoiceItems(int itemsId, int checkedItem,
+ public Builder setSingleChoiceItems(@ArrayRes int itemsId, int checkedItem,
final OnClickListener listener) {
P.mItems = P.mContext.getResources().getTextArray(itemsId);
P.mOnClickListener = listener;
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index d808c8b..f35e746 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -16,6 +16,9 @@
package android.app;
+import android.annotation.DrawableRes;
+import android.annotation.StringRes;
+import android.annotation.XmlRes;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Intent;
@@ -730,7 +733,7 @@ final class ApplicationPackageManager extends PackageManager {
}
}
- @Override public Drawable getDrawable(String packageName, int resid,
+ @Override public Drawable getDrawable(String packageName, @DrawableRes int resid,
ApplicationInfo appInfo) {
ResourceName name = new ResourceName(packageName, resid);
Drawable dr = getCachedIcon(name);
@@ -1137,7 +1140,7 @@ final class ApplicationPackageManager extends PackageManager {
}
@Override
- public CharSequence getText(String packageName, int resid,
+ public CharSequence getText(String packageName, @StringRes int resid,
ApplicationInfo appInfo) {
ResourceName name = new ResourceName(packageName, resid);
CharSequence text = getCachedString(name);
@@ -1170,7 +1173,7 @@ final class ApplicationPackageManager extends PackageManager {
}
@Override
- public XmlResourceParser getXml(String packageName, int resid,
+ public XmlResourceParser getXml(String packageName, @XmlRes int resid,
ApplicationInfo appInfo) {
if (appInfo == null) {
try {
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index a3662b2..e465d57 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -16,6 +16,10 @@
package android.app;
+import android.annotation.DrawableRes;
+import android.annotation.IdRes;
+import android.annotation.LayoutRes;
+import android.annotation.StringRes;
import com.android.internal.app.WindowDecorActionBar;
import android.annotation.Nullable;
@@ -478,7 +482,7 @@ public class Dialog implements DialogInterface, Window.Callback,
* @return The view with the given id or null.
*/
@Nullable
- public View findViewById(int id) {
+ public View findViewById(@IdRes int id) {
return mWindow.findViewById(id);
}
@@ -488,7 +492,7 @@ public class Dialog implements DialogInterface, Window.Callback,
*
* @param layoutResID Resource ID to be inflated.
*/
- public void setContentView(int layoutResID) {
+ public void setContentView(@LayoutRes int layoutResID) {
mWindow.setContentView(layoutResID);
}
@@ -542,7 +546,7 @@ public class Dialog implements DialogInterface, Window.Callback,
*
* @param titleId the title's text resource identifier
*/
- public void setTitle(int titleId) {
+ public void setTitle(@StringRes int titleId) {
setTitle(mContext.getText(titleId));
}
@@ -1072,7 +1076,7 @@ public class Dialog implements DialogInterface, Window.Callback,
* Convenience for calling
* {@link android.view.Window#setFeatureDrawableResource}.
*/
- public final void setFeatureDrawableResource(int featureId, int resId) {
+ public final void setFeatureDrawableResource(int featureId, @DrawableRes int resId) {
getWindow().setFeatureDrawableResource(featureId, resId);
}
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index f319309..c5f534c 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -18,6 +18,7 @@ package android.app;
import android.animation.Animator;
import android.annotation.Nullable;
+import android.annotation.StringRes;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.Intent;
@@ -795,7 +796,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
*
* @param resId Resource id for the CharSequence text
*/
- public final CharSequence getText(int resId) {
+ public final CharSequence getText(@StringRes int resId) {
return getResources().getText(resId);
}
@@ -805,7 +806,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
*
* @param resId Resource id for the string
*/
- public final String getString(int resId) {
+ public final String getString(@StringRes int resId) {
return getResources().getString(resId);
}
@@ -818,7 +819,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
* @param formatArgs The format arguments that will be used for substitution.
*/
- public final String getString(int resId, Object... formatArgs) {
+ public final String getString(@StringRes int resId, Object... formatArgs) {
return getResources().getString(resId, formatArgs);
}
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index afdc917..975b20d 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -21,6 +21,7 @@ import android.animation.AnimatorInflater;
import android.animation.AnimatorListenerAdapter;
import android.annotation.Nullable;
import android.content.Context;
+import android.annotation.IdRes;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
@@ -396,7 +397,7 @@ final class FragmentManagerState implements Parcelable {
*/
interface FragmentContainer {
@Nullable
- public View findViewById(int id);
+ public View findViewById(@IdRes int id);
public boolean hasView();
}
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 341a2d7..1f5a1a0 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -445,8 +445,7 @@ public interface IActivityManager extends IInterface {
public void deleteActivityContainer(IActivityContainer container) throws RemoteException;
- public IActivityContainer getEnclosingActivityContainer(IBinder activityToken)
- throws RemoteException;
+ public int getActivityDisplayId(IBinder activityToken) throws RemoteException;
public IBinder getHomeActivityToken() throws RemoteException;
@@ -763,7 +762,7 @@ public interface IActivityManager extends IInterface {
int GET_PERSISTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+181;
int APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+182;
int GET_HOME_ACTIVITY_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+183;
- int GET_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184;
+ int GET_ACTIVITY_DISPLAY_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184;
int DELETE_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+185;
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 87e744c..9c00e1c 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.DrawableRes;
import android.annotation.IntDef;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
@@ -165,6 +166,7 @@ public class Notification implements Parcelable
* The resource id of a drawable to use as the icon in the status bar.
* This is required; notifications with an invalid icon resource will not be shown.
*/
+ @DrawableRes
public int icon;
/**
@@ -2128,7 +2130,7 @@ public class Notification implements Parcelable
* A resource ID in the application's package of the drawable to use.
* @see Notification#icon
*/
- public Builder setSmallIcon(int icon) {
+ public Builder setSmallIcon(@DrawableRes int icon) {
mSmallIcon = icon;
return this;
}
@@ -2144,7 +2146,7 @@ public class Notification implements Parcelable
* @see Notification#icon
* @see Notification#iconLevel
*/
- public Builder setSmallIcon(int icon, int level) {
+ public Builder setSmallIcon(@DrawableRes int icon, int level) {
mSmallIcon = icon;
mSmallIconLevel = level;
return this;
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index 17885a2..75ccb23 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -117,8 +117,9 @@ public class ResourcesManager {
* @param overrideConfiguration override configurations.
*/
public Display getAdjustedDisplay(final int displayId, Configuration overrideConfiguration) {
- final Pair<Integer, Configuration> key =
- Pair.create(displayId, new Configuration(overrideConfiguration));
+ final Configuration configCopy = (overrideConfiguration != null)
+ ? new Configuration(overrideConfiguration) : new Configuration();
+ final Pair<Integer, Configuration> key = Pair.create(displayId, configCopy);
synchronized (this) {
WeakReference<Display> wd = mDisplays.get(key);
if (wd != null) {
diff --git a/core/java/android/app/SearchableInfo.java b/core/java/android/app/SearchableInfo.java
index 922ebdd..c7d2140 100644
--- a/core/java/android/app/SearchableInfo.java
+++ b/core/java/android/app/SearchableInfo.java
@@ -19,6 +19,7 @@ package android.app;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.StringRes;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
@@ -682,6 +683,7 @@ public final class SearchableInfo implements Parcelable {
* @return A resource id, or {@code 0} if no language model was specified.
* @see android.R.styleable#Searchable_voiceLanguageModel
*/
+ @StringRes
public int getVoiceLanguageModeId() {
return mVoiceLanguageModeId;
}
@@ -692,6 +694,7 @@ public final class SearchableInfo implements Parcelable {
* @return A resource id, or {@code 0} if no voice prompt text was specified.
* @see android.R.styleable#Searchable_voicePromptText
*/
+ @StringRes
public int getVoicePromptTextId() {
return mVoicePromptTextId;
}
@@ -702,6 +705,7 @@ public final class SearchableInfo implements Parcelable {
* @return A resource id, or {@code 0} if no language was specified.
* @see android.R.styleable#Searchable_voiceLanguage
*/
+ @StringRes
public int getVoiceLanguageId() {
return mVoiceLanguageId;
}
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index 90d84ee..dcbd669 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.RawRes;
import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -707,7 +708,7 @@ public class WallpaperManager {
* @throws IOException If an error occurs reverting to the built-in
* wallpaper.
*/
- public void setResource(int resid) throws IOException {
+ public void setResource(@RawRes int resid) throws IOException {
if (sGlobals.mService == null) {
Log.w(TAG, "WallpaperService not running");
return;
@@ -823,7 +824,7 @@ public class WallpaperManager {
* with the given resource ID. That is, their wallpaper has been
* set through {@link #setResource(int)} with the same resource id.
*/
- public boolean hasResourceWallpaper(int resid) {
+ public boolean hasResourceWallpaper(@RawRes int resid) {
if (sGlobals.mService == null) {
Log.w(TAG, "WallpaperService not running");
return false;
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index df620d0..eabe297 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -20,6 +20,9 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringDef;
+import android.annotation.StringRes;
+import android.annotation.StyleRes;
+import android.annotation.StyleableRes;
import android.annotation.SystemApi;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
@@ -365,7 +368,7 @@ public abstract class Context {
*
* @param resId Resource id for the CharSequence text
*/
- public final CharSequence getText(int resId) {
+ public final CharSequence getText(@StringRes int resId) {
return getResources().getText(resId);
}
@@ -375,7 +378,7 @@ public abstract class Context {
*
* @param resId Resource id for the string
*/
- public final String getString(int resId) {
+ public final String getString(@StringRes int resId) {
return getResources().getString(resId);
}
@@ -388,7 +391,7 @@ public abstract class Context {
* @param formatArgs The format arguments that will be used for substitution.
*/
- public final String getString(int resId, Object... formatArgs) {
+ public final String getString(@StringRes int resId, Object... formatArgs) {
return getResources().getString(resId, formatArgs);
}
@@ -450,7 +453,7 @@ public abstract class Context {
*
* @param resid The style resource describing the theme.
*/
- public abstract void setTheme(int resid);
+ public abstract void setTheme(@StyleRes int resid);
/** @hide Needed for some internal implementation... not public because
* you can't assume this actually means anything. */
@@ -484,7 +487,7 @@ public abstract class Context {
* @see Resources.Theme#obtainStyledAttributes(int, int[])
*/
public final TypedArray obtainStyledAttributes(
- int resid, int[] attrs) throws Resources.NotFoundException {
+ @StyleableRes int resid, int[] attrs) throws Resources.NotFoundException {
return getTheme().obtainStyledAttributes(resid, attrs);
}
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 582802b..3222b2b 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -23,6 +23,7 @@ import android.util.ArraySet;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.AnyRes;
import android.annotation.IntDef;
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
@@ -762,11 +763,11 @@ public class Intent implements Parcelable, Cloneable {
* identifier.
*
* @param context The context of the application.
- * @param resourceId The resource idenfitier for the icon.
+ * @param resourceId The resource identifier for the icon.
* @return A new ShortcutIconResource with the specified's context package name
- * and icon resource idenfitier.
+ * and icon resource identifier.``
*/
- public static ShortcutIconResource fromContext(Context context, int resourceId) {
+ public static ShortcutIconResource fromContext(Context context, @AnyRes int resourceId) {
ShortcutIconResource icon = new ShortcutIconResource();
icon.packageName = context.getPackageName();
icon.resourceName = context.getResources().getResourceName(resourceId);
diff --git a/core/java/android/content/RestrictionEntry.java b/core/java/android/content/RestrictionEntry.java
index 5341ea8..6d79626 100644
--- a/core/java/android/content/RestrictionEntry.java
+++ b/core/java/android/content/RestrictionEntry.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.ArrayRes;
import android.os.Parcel;
import android.os.Parcelable;
@@ -277,7 +278,7 @@ public class RestrictionEntry implements Parcelable {
* @param stringArrayResId the resource id for a string array containing the possible values.
* @see #setChoiceValues(String[])
*/
- public void setChoiceValues(Context context, int stringArrayResId) {
+ public void setChoiceValues(Context context, @ArrayRes int stringArrayResId) {
mChoiceValues = context.getResources().getStringArray(stringArrayResId);
}
@@ -307,7 +308,7 @@ public class RestrictionEntry implements Parcelable {
* @param context the application context, used for retrieving the resources.
* @param stringArrayResId the resource id of a string array containing the possible entries.
*/
- public void setChoiceEntries(Context context, int stringArrayResId) {
+ public void setChoiceEntries(Context context, @ArrayRes int stringArrayResId) {
mChoiceEntries = context.getResources().getStringArray(stringArrayResId);
}
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index e9f7c50..ebc8e1e 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -16,11 +16,14 @@
package android.content.pm;
+import android.annotation.DrawableRes;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.StringRes;
import android.annotation.SystemApi;
+import android.annotation.XmlRes;
import android.app.PackageDeleteObserver;
import android.app.PackageInstallObserver;
import android.app.admin.DevicePolicyManager;
@@ -2710,7 +2713,7 @@ public abstract class PackageManager {
* @return Returns a Drawable holding the requested image. Returns null if
* an image could not be found for any reason.
*/
- public abstract Drawable getDrawable(String packageName, int resid,
+ public abstract Drawable getDrawable(String packageName, @DrawableRes int resid,
ApplicationInfo appInfo);
/**
@@ -3012,7 +3015,7 @@ public abstract class PackageManager {
* @return Returns a CharSequence holding the requested text. Returns null
* if the text could not be found for any reason.
*/
- public abstract CharSequence getText(String packageName, int resid,
+ public abstract CharSequence getText(String packageName, @StringRes int resid,
ApplicationInfo appInfo);
/**
@@ -3031,7 +3034,7 @@ public abstract class PackageManager {
* data. Returns null if the xml resource could not be found for any
* reason.
*/
- public abstract XmlResourceParser getXml(String packageName, int resid,
+ public abstract XmlResourceParser getXml(String packageName, @XmlRes int resid,
ApplicationInfo appInfo);
/**
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index 6fb7299..3e922f2 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -23,8 +23,22 @@ import org.xmlpull.v1.XmlPullParserException;
import android.animation.Animator;
import android.animation.StateListAnimator;
+import android.annotation.AnimRes;
+import android.annotation.AnyRes;
+import android.annotation.ArrayRes;
+import android.annotation.BoolRes;
+import android.annotation.ColorRes;
+import android.annotation.DimenRes;
+import android.annotation.DrawableRes;
+import android.annotation.FractionRes;
+import android.annotation.IntegerRes;
+import android.annotation.LayoutRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.PluralsRes;
+import android.annotation.RawRes;
+import android.annotation.StringRes;
+import android.annotation.XmlRes;
import android.content.pm.ActivityInfo;
import android.content.res.ColorStateList.ColorStateListFactory;
import android.graphics.Movie;
@@ -287,7 +301,7 @@ public class Resources {
* @return CharSequence The string data associated with the resource, plus
* possibly styled text information.
*/
- public CharSequence getText(int id) throws NotFoundException {
+ public CharSequence getText(@StringRes int id) throws NotFoundException {
CharSequence res = mAssets.getResourceText(id);
if (res != null) {
return res;
@@ -316,7 +330,8 @@ public class Resources {
* @return CharSequence The string data associated with the resource, plus
* possibly styled text information.
*/
- public CharSequence getQuantityText(int id, int quantity) throws NotFoundException {
+ public CharSequence getQuantityText(@PluralsRes int id, int quantity)
+ throws NotFoundException {
NativePluralRules rule = getPluralRule();
CharSequence res = mAssets.getResourceBagText(id,
attrForQuantityCode(rule.quantityForInt(quantity)));
@@ -377,7 +392,7 @@ public class Resources {
* @return String The string data associated with the resource,
* stripped of styled text information.
*/
- public String getString(int id) throws NotFoundException {
+ public String getString(@StringRes int id) throws NotFoundException {
CharSequence res = getText(id);
if (res != null) {
return res.toString();
@@ -405,7 +420,8 @@ public class Resources {
* @return String The string data associated with the resource,
* stripped of styled text information.
*/
- public String getString(int id, Object... formatArgs) throws NotFoundException {
+ public String getString(@StringRes int id, Object... formatArgs)
+ throws NotFoundException {
String raw = getString(id);
return String.format(mConfiguration.locale, raw, formatArgs);
}
@@ -435,7 +451,7 @@ public class Resources {
* @return String The string data associated with the resource,
* stripped of styled text information.
*/
- public String getQuantityString(int id, int quantity, Object... formatArgs)
+ public String getQuantityString(@PluralsRes int id, int quantity, Object... formatArgs)
throws NotFoundException {
String raw = getQuantityText(id, quantity).toString();
return String.format(mConfiguration.locale, raw, formatArgs);
@@ -461,7 +477,8 @@ public class Resources {
* @return String The string data associated with the resource,
* stripped of styled text information.
*/
- public String getQuantityString(int id, int quantity) throws NotFoundException {
+ public String getQuantityString(@PluralsRes int id, int quantity)
+ throws NotFoundException {
return getQuantityText(id, quantity).toString();
}
@@ -479,7 +496,7 @@ public class Resources {
* @return CharSequence The string data associated with the resource, plus
* possibly styled text information, or def if id is 0 or not found.
*/
- public CharSequence getText(int id, CharSequence def) {
+ public CharSequence getText(@StringRes int id, CharSequence def) {
CharSequence res = id != 0 ? mAssets.getResourceText(id) : null;
return res != null ? res : def;
}
@@ -495,7 +512,7 @@ public class Resources {
*
* @return The styled text array associated with the resource.
*/
- public CharSequence[] getTextArray(int id) throws NotFoundException {
+ public CharSequence[] getTextArray(@ArrayRes int id) throws NotFoundException {
CharSequence[] res = mAssets.getResourceTextArray(id);
if (res != null) {
return res;
@@ -515,7 +532,8 @@ public class Resources {
*
* @return The string array associated with the resource.
*/
- public String[] getStringArray(int id) throws NotFoundException {
+ public String[] getStringArray(@ArrayRes int id)
+ throws NotFoundException {
String[] res = mAssets.getResourceStringArray(id);
if (res != null) {
return res;
@@ -535,7 +553,7 @@ public class Resources {
*
* @return The int array associated with the resource.
*/
- public int[] getIntArray(int id) throws NotFoundException {
+ public int[] getIntArray(@ArrayRes int id) throws NotFoundException {
int[] res = mAssets.getArrayIntResource(id);
if (res != null) {
return res;
@@ -557,7 +575,8 @@ public class Resources {
* Be sure to call {@link TypedArray#recycle() TypedArray.recycle()}
* when done with it.
*/
- public TypedArray obtainTypedArray(int id) throws NotFoundException {
+ public TypedArray obtainTypedArray(@ArrayRes int id)
+ throws NotFoundException {
int len = mAssets.getArraySize(id);
if (len < 0) {
throw new NotFoundException("Array resource ID #0x"
@@ -588,7 +607,7 @@ public class Resources {
* @see #getDimensionPixelOffset
* @see #getDimensionPixelSize
*/
- public float getDimension(int id) throws NotFoundException {
+ public float getDimension(@DimenRes int id) throws NotFoundException {
synchronized (mAccessLock) {
TypedValue value = mTmpValue;
if (value == null) {
@@ -623,7 +642,7 @@ public class Resources {
* @see #getDimension
* @see #getDimensionPixelSize
*/
- public int getDimensionPixelOffset(int id) throws NotFoundException {
+ public int getDimensionPixelOffset(@DimenRes int id) throws NotFoundException {
synchronized (mAccessLock) {
TypedValue value = mTmpValue;
if (value == null) {
@@ -660,7 +679,7 @@ public class Resources {
* @see #getDimension
* @see #getDimensionPixelOffset
*/
- public int getDimensionPixelSize(int id) throws NotFoundException {
+ public int getDimensionPixelSize(@DimenRes int id) throws NotFoundException {
synchronized (mAccessLock) {
TypedValue value = mTmpValue;
if (value == null) {
@@ -694,7 +713,7 @@ public class Resources {
*
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*/
- public float getFraction(int id, int base, int pbase) {
+ public float getFraction(@FractionRes int id, int base, int pbase) {
synchronized (mAccessLock) {
TypedValue value = mTmpValue;
if (value == null) {
@@ -744,7 +763,7 @@ public class Resources {
*/
@Deprecated
@Nullable
- public Drawable getDrawable(int id) throws NotFoundException {
+ public Drawable getDrawable(@DrawableRes int id) throws NotFoundException {
final Drawable d = getDrawable(id, null);
if (d != null && d.canApplyTheme()) {
Log.w(TAG, "Drawable " + getResourceName(id) + " has unresolved theme "
@@ -769,7 +788,7 @@ public class Resources {
* not exist.
*/
@Nullable
- public Drawable getDrawable(int id, @Nullable Theme theme) throws NotFoundException {
+ public Drawable getDrawable(@DrawableRes int id, @Nullable Theme theme) throws NotFoundException {
TypedValue value;
synchronized (mAccessLock) {
value = mTmpValue;
@@ -817,7 +836,7 @@ public class Resources {
*/
@Deprecated
@Nullable
- public Drawable getDrawableForDensity(int id, int density) throws NotFoundException {
+ public Drawable getDrawableForDensity(@DrawableRes int id, int density) throws NotFoundException {
return getDrawableForDensity(id, density, null);
}
@@ -836,7 +855,7 @@ public class Resources {
* not exist.
*/
@Nullable
- public Drawable getDrawableForDensity(int id, int density, @Nullable Theme theme) {
+ public Drawable getDrawableForDensity(@DrawableRes int id, int density, @Nullable Theme theme) {
TypedValue value;
synchronized (mAccessLock) {
value = mTmpValue;
@@ -880,7 +899,7 @@ public class Resources {
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*
*/
- public Movie getMovie(int id) throws NotFoundException {
+ public Movie getMovie(@RawRes int id) throws NotFoundException {
InputStream is = openRawResource(id);
Movie movie = Movie.decodeStream(is);
try {
@@ -907,7 +926,7 @@ public class Resources {
* @return A single color value in the form 0xAARRGGBB.
* @deprecated Use {@link #getColor(int, Theme)} instead.
*/
- public int getColor(int id) throws NotFoundException {
+ public int getColor(@ColorRes int id) throws NotFoundException {
return getColor(id, null);
}
@@ -927,7 +946,7 @@ public class Resources {
*
* @return A single color value in the form 0xAARRGGBB.
*/
- public int getColor(int id, @Nullable Theme theme) throws NotFoundException {
+ public int getColor(@ColorRes int id, @Nullable Theme theme) throws NotFoundException {
TypedValue value;
synchronized (mAccessLock) {
value = mTmpValue;
@@ -975,7 +994,7 @@ public class Resources {
* @deprecated Use {@link #getColorStateList(int, Theme)} instead.
*/
@Nullable
- public ColorStateList getColorStateList(int id) throws NotFoundException {
+ public ColorStateList getColorStateList(@ColorRes int id) throws NotFoundException {
final ColorStateList csl = getColorStateList(id, null);
if (csl != null && csl.canApplyTheme()) {
Log.w(TAG, "ColorStateList " + getResourceName(id) + " has "
@@ -1005,7 +1024,7 @@ public class Resources {
* color or multiple colors that can be selected based on a state.
*/
@Nullable
- public ColorStateList getColorStateList(int id, @Nullable Theme theme)
+ public ColorStateList getColorStateList(@ColorRes int id, @Nullable Theme theme)
throws NotFoundException {
TypedValue value;
synchronized (mAccessLock) {
@@ -1043,7 +1062,7 @@ public class Resources {
*
* @return Returns the boolean value contained in the resource.
*/
- public boolean getBoolean(int id) throws NotFoundException {
+ public boolean getBoolean(@BoolRes int id) throws NotFoundException {
synchronized (mAccessLock) {
TypedValue value = mTmpValue;
if (value == null) {
@@ -1071,7 +1090,7 @@ public class Resources {
*
* @return Returns the integer value contained in the resource.
*/
- public int getInteger(int id) throws NotFoundException {
+ public int getInteger(@IntegerRes int id) throws NotFoundException {
synchronized (mAccessLock) {
TypedValue value = mTmpValue;
if (value == null) {
@@ -1136,7 +1155,7 @@ public class Resources {
*
* @see #getXml
*/
- public XmlResourceParser getLayout(int id) throws NotFoundException {
+ public XmlResourceParser getLayout(@LayoutRes int id) throws NotFoundException {
return loadXmlResourceParser(id, "layout");
}
@@ -1160,7 +1179,7 @@ public class Resources {
*
* @see #getXml
*/
- public XmlResourceParser getAnimation(int id) throws NotFoundException {
+ public XmlResourceParser getAnimation(@AnimRes int id) throws NotFoundException {
return loadXmlResourceParser(id, "anim");
}
@@ -1185,7 +1204,7 @@ public class Resources {
*
* @see android.util.AttributeSet
*/
- public XmlResourceParser getXml(int id) throws NotFoundException {
+ public XmlResourceParser getXml(@XmlRes int id) throws NotFoundException {
return loadXmlResourceParser(id, "xml");
}
@@ -1203,7 +1222,7 @@ public class Resources {
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*
*/
- public InputStream openRawResource(int id) throws NotFoundException {
+ public InputStream openRawResource(@RawRes int id) throws NotFoundException {
TypedValue value;
synchronized (mAccessLock) {
value = mTmpValue;
@@ -1235,7 +1254,8 @@ public class Resources {
*
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*/
- public InputStream openRawResource(int id, TypedValue value) throws NotFoundException {
+ public InputStream openRawResource(@RawRes int id, TypedValue value)
+ throws NotFoundException {
getValue(id, value, true);
try {
@@ -1270,7 +1290,8 @@ public class Resources {
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*
*/
- public AssetFileDescriptor openRawResourceFd(int id) throws NotFoundException {
+ public AssetFileDescriptor openRawResourceFd(@RawRes int id)
+ throws NotFoundException {
TypedValue value;
synchronized (mAccessLock) {
value = mTmpValue;
@@ -1315,7 +1336,7 @@ public class Resources {
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*
*/
- public void getValue(int id, TypedValue outValue, boolean resolveRefs)
+ public void getValue(@AnyRes int id, TypedValue outValue, boolean resolveRefs)
throws NotFoundException {
boolean found = mAssets.getResourceValue(id, 0, outValue, resolveRefs);
if (found) {
@@ -1338,8 +1359,8 @@ public class Resources {
* not exist.
* @see #getValue(String, TypedValue, boolean)
*/
- public void getValueForDensity(int id, int density, TypedValue outValue, boolean resolveRefs)
- throws NotFoundException {
+ public void getValueForDensity(@AnyRes int id, int density, TypedValue outValue,
+ boolean resolveRefs) throws NotFoundException {
boolean found = mAssets.getResourceValue(id, density, outValue, resolveRefs);
if (found) {
return;
@@ -1698,7 +1719,7 @@ public class Resources {
* @throws NotFoundException Throws NotFoundException if the given ID
* does not exist.
*/
- public Drawable getDrawable(int id) throws NotFoundException {
+ public Drawable getDrawable(@DrawableRes int id) throws NotFoundException {
return Resources.this.getDrawable(id, this);
}
@@ -2103,7 +2124,7 @@ public class Resources {
*
* @hide
*/
- public static boolean resourceHasPackage(int resid) {
+ public static boolean resourceHasPackage(@AnyRes int resid) {
return (resid >>> 24) != 0;
}
@@ -2121,7 +2142,7 @@ public class Resources {
* @see #getResourceTypeName
* @see #getResourceEntryName
*/
- public String getResourceName(int resid) throws NotFoundException {
+ public String getResourceName(@AnyRes int resid) throws NotFoundException {
String str = mAssets.getResourceName(resid);
if (str != null) return str;
throw new NotFoundException("Unable to find resource ID #0x"
@@ -2140,7 +2161,7 @@ public class Resources {
*
* @see #getResourceName
*/
- public String getResourcePackageName(int resid) throws NotFoundException {
+ public String getResourcePackageName(@AnyRes int resid) throws NotFoundException {
String str = mAssets.getResourcePackageName(resid);
if (str != null) return str;
throw new NotFoundException("Unable to find resource ID #0x"
@@ -2159,7 +2180,7 @@ public class Resources {
*
* @see #getResourceName
*/
- public String getResourceTypeName(int resid) throws NotFoundException {
+ public String getResourceTypeName(@AnyRes int resid) throws NotFoundException {
String str = mAssets.getResourceTypeName(resid);
if (str != null) return str;
throw new NotFoundException("Unable to find resource ID #0x"
@@ -2178,7 +2199,7 @@ public class Resources {
*
* @see #getResourceName
*/
- public String getResourceEntryName(int resid) throws NotFoundException {
+ public String getResourceEntryName(@AnyRes int resid) throws NotFoundException {
String str = mAssets.getResourceEntryName(resid);
if (str != null) return str;
throw new NotFoundException("Unable to find resource ID #0x"
diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java
index f15b6b9..3d43304 100644
--- a/core/java/android/content/res/TypedArray.java
+++ b/core/java/android/content/res/TypedArray.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.AnyRes;
import android.annotation.Nullable;
import android.graphics.drawable.Drawable;
import android.os.StrictMode;
@@ -786,6 +787,7 @@ public class TypedArray {
* @return Attribute resource identifier, or defValue if not defined.
* @throws RuntimeException if the TypedArray has already been recycled.
*/
+ @AnyRes
public int getResourceId(int index, int defValue) {
if (mRecycled) {
throw new RuntimeException("Cannot make calls to a recycled instance!");
diff --git a/core/java/android/gesture/GestureLibraries.java b/core/java/android/gesture/GestureLibraries.java
index 6d6c156..611d9ab 100644
--- a/core/java/android/gesture/GestureLibraries.java
+++ b/core/java/android/gesture/GestureLibraries.java
@@ -16,6 +16,7 @@
package android.gesture;
+import android.annotation.RawRes;
import android.util.Log;
import static android.gesture.GestureConstants.*;
import android.content.Context;
@@ -44,7 +45,7 @@ public final class GestureLibraries {
return fromFile(context.getFileStreamPath(name));
}
- public static GestureLibrary fromRawResource(Context context, int resourceId) {
+ public static GestureLibrary fromRawResource(Context context, @RawRes int resourceId) {
return new ResourceGestureLibrary(context, resourceId);
}
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index f218b65..481fc2f 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -19,6 +19,7 @@ package android.inputmethodservice;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+import android.annotation.DrawableRes;
import android.app.ActivityManager;
import android.app.Dialog;
import android.content.Context;
@@ -1178,7 +1179,7 @@ public class InputMethodService extends AbstractInputMethodService {
return isExtractViewShown() ? View.GONE : View.INVISIBLE;
}
- public void showStatusIcon(int iconResId) {
+ public void showStatusIcon(@DrawableRes int iconResId) {
mStatusIcon = iconResId;
mImm.showStatusIcon(mToken, getPackageName(), iconResId);
}
diff --git a/core/java/android/inputmethodservice/Keyboard.java b/core/java/android/inputmethodservice/Keyboard.java
index 4fe54c0..45f1889 100644
--- a/core/java/android/inputmethodservice/Keyboard.java
+++ b/core/java/android/inputmethodservice/Keyboard.java
@@ -18,6 +18,7 @@ package android.inputmethodservice;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.XmlRes;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -519,7 +520,8 @@ public class Keyboard {
* @param width sets width of keyboard
* @param height sets height of keyboard
*/
- public Keyboard(Context context, int xmlLayoutResId, int modeId, int width, int height) {
+ public Keyboard(Context context, @XmlRes int xmlLayoutResId, int modeId, int width,
+ int height) {
mDisplayWidth = width;
mDisplayHeight = height;
@@ -540,7 +542,7 @@ public class Keyboard {
* @param xmlLayoutResId the resource file that contains the keyboard layout and keys.
* @param modeId keyboard mode identifier
*/
- public Keyboard(Context context, int xmlLayoutResId, int modeId) {
+ public Keyboard(Context context, @XmlRes int xmlLayoutResId, int modeId) {
DisplayMetrics dm = context.getResources().getDisplayMetrics();
mDisplayWidth = dm.widthPixels;
mDisplayHeight = dm.heightPixels;
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index 7785f2b..47e8e69 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -301,7 +301,7 @@ public abstract class AsyncTask<Params, Progress, Result> {
} catch (InterruptedException e) {
android.util.Log.w(LOG_TAG, e);
} catch (ExecutionException e) {
- throw new RuntimeException("An error occured while executing doInBackground()",
+ throw new RuntimeException("An error occurred while executing doInBackground()",
e.getCause());
} catch (CancellationException e) {
postResultIfNotInvoked(null);
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index b5295fb..236003b 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -21,6 +21,7 @@ import android.os.Bundle;
import android.content.pm.UserInfo;
import android.content.RestrictionEntry;
import android.graphics.Bitmap;
+import android.os.ParcelFileDescriptor;
/**
* {@hide}
@@ -32,7 +33,7 @@ interface IUserManager {
boolean removeUser(int userHandle);
void setUserName(int userHandle, String name);
void setUserIcon(int userHandle, in Bitmap icon);
- Bitmap getUserIcon(int userHandle);
+ ParcelFileDescriptor getUserIcon(int userHandle);
List<UserInfo> getUsers(boolean excludeDying);
List<UserInfo> getProfiles(int userHandle, boolean enabledOnly);
UserInfo getProfileParent(int userHandle);
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index d124a49..60ab05c 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.provider.Settings;
@@ -30,6 +31,7 @@ import android.view.WindowManager.LayoutParams;
import com.android.internal.R;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -1083,11 +1085,21 @@ public class UserManager {
*/
public Bitmap getUserIcon(int userHandle) {
try {
- return mService.getUserIcon(userHandle);
+ ParcelFileDescriptor fd = mService.getUserIcon(userHandle);
+ if (fd != null) {
+ try {
+ return BitmapFactory.decodeFileDescriptor(fd.getFileDescriptor());
+ } finally {
+ try {
+ fd.close();
+ } catch (IOException e) {
+ }
+ }
+ }
} catch (RemoteException re) {
Log.w(TAG, "Could not get the user icon ", re);
- return null;
}
+ return null;
}
/**
diff --git a/core/java/android/preference/DialogPreference.java b/core/java/android/preference/DialogPreference.java
index b65eac7..1b226c1 100644
--- a/core/java/android/preference/DialogPreference.java
+++ b/core/java/android/preference/DialogPreference.java
@@ -17,6 +17,8 @@
package android.preference;
+import android.annotation.DrawableRes;
+import android.annotation.StringRes;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
@@ -168,7 +170,7 @@ public abstract class DialogPreference extends Preference implements
*
* @param dialogIconRes The icon, as a resource ID.
*/
- public void setDialogIcon(int dialogIconRes) {
+ public void setDialogIcon(@DrawableRes int dialogIconRes) {
mDialogIcon = getContext().getDrawable(dialogIconRes);
}
@@ -194,7 +196,7 @@ public abstract class DialogPreference extends Preference implements
* @see #setPositiveButtonText(CharSequence)
* @param positiveButtonTextResId The positive button text as a resource.
*/
- public void setPositiveButtonText(int positiveButtonTextResId) {
+ public void setPositiveButtonText(@StringRes int positiveButtonTextResId) {
setPositiveButtonText(getContext().getString(positiveButtonTextResId));
}
@@ -222,7 +224,7 @@ public abstract class DialogPreference extends Preference implements
* @see #setNegativeButtonText(CharSequence)
* @param negativeButtonTextResId The negative button text as a resource.
*/
- public void setNegativeButtonText(int negativeButtonTextResId) {
+ public void setNegativeButtonText(@StringRes int negativeButtonTextResId) {
setNegativeButtonText(getContext().getString(negativeButtonTextResId));
}
diff --git a/core/java/android/preference/GenericInflater.java b/core/java/android/preference/GenericInflater.java
index 7de7d1c..c84dbf1 100644
--- a/core/java/android/preference/GenericInflater.java
+++ b/core/java/android/preference/GenericInflater.java
@@ -23,6 +23,8 @@ import java.util.HashMap;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.AnyRes;
+import android.annotation.XmlRes;
import android.content.Context;
import android.content.res.XmlResourceParser;
import android.util.AttributeSet;
@@ -216,7 +218,7 @@ abstract class GenericInflater<T, P extends GenericInflater.Parent> {
* this is the root item; otherwise it is the root of the inflated
* XML file.
*/
- public T inflate(int resource, P root) {
+ public T inflate(@XmlRes int resource, P root) {
return inflate(resource, root, root != null);
}
@@ -256,7 +258,7 @@ abstract class GenericInflater<T, P extends GenericInflater.Parent> {
* attachToRoot is true, this is root; otherwise it is the root of
* the inflated XML file.
*/
- public T inflate(int resource, P root, boolean attachToRoot) {
+ public T inflate(@XmlRes int resource, P root, boolean attachToRoot) {
if (DEBUG) System.out.println("INFLATING from resource: " + resource);
XmlResourceParser parser = getContext().getResources().getXml(resource);
try {
diff --git a/core/java/android/preference/ListPreference.java b/core/java/android/preference/ListPreference.java
index 9482a72..2700373 100644
--- a/core/java/android/preference/ListPreference.java
+++ b/core/java/android/preference/ListPreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.ArrayRes;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
@@ -91,7 +92,7 @@ public class ListPreference extends DialogPreference {
* @see #setEntries(CharSequence[])
* @param entriesResId The entries array as a resource.
*/
- public void setEntries(int entriesResId) {
+ public void setEntries(@ArrayRes int entriesResId) {
setEntries(getContext().getResources().getTextArray(entriesResId));
}
@@ -119,7 +120,7 @@ public class ListPreference extends DialogPreference {
* @see #setEntryValues(CharSequence[])
* @param entryValuesResId The entry values array as a resource.
*/
- public void setEntryValues(int entryValuesResId) {
+ public void setEntryValues(@ArrayRes int entryValuesResId) {
setEntryValues(getContext().getResources().getTextArray(entryValuesResId));
}
diff --git a/core/java/android/preference/MultiCheckPreference.java b/core/java/android/preference/MultiCheckPreference.java
index 57c906d..c1260a4 100644
--- a/core/java/android/preference/MultiCheckPreference.java
+++ b/core/java/android/preference/MultiCheckPreference.java
@@ -18,6 +18,7 @@ package android.preference;
import java.util.Arrays;
+import android.annotation.ArrayRes;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
@@ -96,7 +97,7 @@ public class MultiCheckPreference extends DialogPreference {
* @see #setEntries(CharSequence[])
* @param entriesResId The entries array as a resource.
*/
- public void setEntries(int entriesResId) {
+ public void setEntries(@ArrayRes int entriesResId) {
setEntries(getContext().getResources().getTextArray(entriesResId));
}
@@ -126,7 +127,7 @@ public class MultiCheckPreference extends DialogPreference {
* @see #setEntryValues(CharSequence[])
* @param entryValuesResId The entry values array as a resource.
*/
- public void setEntryValues(int entryValuesResId) {
+ public void setEntryValues(@ArrayRes int entryValuesResId) {
setEntryValuesCS(getContext().getResources().getTextArray(entryValuesResId));
}
diff --git a/core/java/android/preference/MultiSelectListPreference.java b/core/java/android/preference/MultiSelectListPreference.java
index 6c4c20f..138bd87 100644
--- a/core/java/android/preference/MultiSelectListPreference.java
+++ b/core/java/android/preference/MultiSelectListPreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.ArrayRes;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
@@ -87,7 +88,7 @@ public class MultiSelectListPreference extends DialogPreference {
* @see #setEntries(CharSequence[])
* @param entriesResId The entries array as a resource.
*/
- public void setEntries(int entriesResId) {
+ public void setEntries(@ArrayRes int entriesResId) {
setEntries(getContext().getResources().getTextArray(entriesResId));
}
@@ -115,7 +116,7 @@ public class MultiSelectListPreference extends DialogPreference {
* @see #setEntryValues(CharSequence[])
* @param entryValuesResId The entry values array as a resource.
*/
- public void setEntryValues(int entryValuesResId) {
+ public void setEntryValues(@ArrayRes int entryValuesResId) {
setEntryValues(getContext().getResources().getTextArray(entryValuesResId));
}
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java
index 0224c73..78928b2 100644
--- a/core/java/android/preference/Preference.java
+++ b/core/java/android/preference/Preference.java
@@ -18,6 +18,9 @@ package android.preference;
import com.android.internal.util.CharSequences;
+import android.annotation.DrawableRes;
+import android.annotation.LayoutRes;
+import android.annotation.StringRes;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -424,7 +427,7 @@ public class Preference implements Comparable<Preference> {
* a {@link View}.
* @see #setWidgetLayoutResource(int)
*/
- public void setLayoutResource(int layoutResId) {
+ public void setLayoutResource(@LayoutRes int layoutResId) {
if (layoutResId != mLayoutResId) {
// Layout changed
mCanRecycleLayout = false;
@@ -438,6 +441,7 @@ public class Preference implements Comparable<Preference> {
*
* @return The layout resource ID.
*/
+ @LayoutRes
public int getLayoutResource() {
return mLayoutResId;
}
@@ -452,7 +456,7 @@ public class Preference implements Comparable<Preference> {
* main layout.
* @see #setLayoutResource(int)
*/
- public void setWidgetLayoutResource(int widgetLayoutResId) {
+ public void setWidgetLayoutResource(@LayoutRes int widgetLayoutResId) {
if (widgetLayoutResId != mWidgetLayoutResId) {
// Layout changed
mCanRecycleLayout = false;
@@ -465,6 +469,7 @@ public class Preference implements Comparable<Preference> {
*
* @return The layout resource ID.
*/
+ @LayoutRes
public int getWidgetLayoutResource() {
return mWidgetLayoutResId;
}
@@ -648,7 +653,7 @@ public class Preference implements Comparable<Preference> {
* @see #setTitle(CharSequence)
* @param titleResId The title as a resource ID.
*/
- public void setTitle(int titleResId) {
+ public void setTitle(@StringRes int titleResId) {
setTitle(mContext.getString(titleResId));
mTitleRes = titleResId;
}
@@ -660,6 +665,7 @@ public class Preference implements Comparable<Preference> {
* @return The title resource.
* @see #setTitle(int)
*/
+ @StringRes
public int getTitleRes() {
return mTitleRes;
}
@@ -696,7 +702,7 @@ public class Preference implements Comparable<Preference> {
* @see #setIcon(Drawable)
* @param iconResId The icon as a resource ID.
*/
- public void setIcon(int iconResId) {
+ public void setIcon(@DrawableRes int iconResId) {
mIconResId = iconResId;
setIcon(mContext.getDrawable(iconResId));
}
@@ -739,7 +745,7 @@ public class Preference implements Comparable<Preference> {
* @see #setSummary(CharSequence)
* @param summaryResId The summary as a resource.
*/
- public void setSummary(int summaryResId) {
+ public void setSummary(@StringRes int summaryResId) {
setSummary(mContext.getString(summaryResId));
}
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index 04cd7d5..0d80c0d 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -16,6 +16,8 @@
package android.preference;
+import android.annotation.StringRes;
+import android.annotation.XmlRes;
import android.app.Fragment;
import android.app.FragmentBreadCrumbs;
import android.app.FragmentManager;
@@ -337,6 +339,7 @@ public abstract class PreferenceActivity extends ListActivity implements
* Resource ID of title of the header that is shown to the user.
* @attr ref android.R.styleable#PreferenceHeader_title
*/
+ @StringRes
public int titleRes;
/**
@@ -349,6 +352,7 @@ public abstract class PreferenceActivity extends ListActivity implements
* Resource ID of optional summary describing what this header controls.
* @attr ref android.R.styleable#PreferenceHeader_summary
*/
+ @StringRes
public int summaryRes;
/**
@@ -361,6 +365,7 @@ public abstract class PreferenceActivity extends ListActivity implements
* Resource ID of optional text to show as the title in the bread crumb.
* @attr ref android.R.styleable#PreferenceHeader_breadCrumbTitle
*/
+ @StringRes
public int breadCrumbTitleRes;
/**
@@ -373,6 +378,7 @@ public abstract class PreferenceActivity extends ListActivity implements
* Resource ID of optional text to show as the short title in the bread crumb.
* @attr ref android.R.styleable#PreferenceHeader_breadCrumbShortTitle
*/
+ @StringRes
public int breadCrumbShortTitleRes;
/**
@@ -797,7 +803,7 @@ public abstract class PreferenceActivity extends ListActivity implements
* @param resid The XML resource to load and parse.
* @param target The list in which the parsed headers should be placed.
*/
- public void loadHeadersFromResource(int resid, List<Header> target) {
+ public void loadHeadersFromResource(@XmlRes int resid, List<Header> target) {
XmlResourceParser parser = null;
try {
parser = getResources().getXml(resid);
@@ -1086,7 +1092,7 @@ public abstract class PreferenceActivity extends ListActivity implements
* fragment.
*/
public Intent onBuildStartFragmentIntent(String fragmentName, Bundle args,
- int titleRes, int shortTitleRes) {
+ @StringRes int titleRes, int shortTitleRes) {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClass(this, getClass());
intent.putExtra(EXTRA_SHOW_FRAGMENT, fragmentName);
@@ -1124,7 +1130,8 @@ public abstract class PreferenceActivity extends ListActivity implements
* this set of preferences.
*/
public void startWithFragment(String fragmentName, Bundle args,
- Fragment resultTo, int resultRequestCode, int titleRes, int shortTitleRes) {
+ Fragment resultTo, int resultRequestCode, @StringRes int titleRes,
+ @StringRes int shortTitleRes) {
Intent intent = onBuildStartFragmentIntent(fragmentName, args, titleRes, shortTitleRes);
if (resultTo == null) {
startActivity(intent);
@@ -1343,9 +1350,9 @@ public abstract class PreferenceActivity extends ListActivity implements
* preference panel is done. The launched panel must use
* {@link #finishPreferencePanel(Fragment, int, Intent)} when done.
* @param resultRequestCode If resultTo is non-null, this is the caller's
- * request code to be received with the resut.
+ * request code to be received with the result.
*/
- public void startPreferencePanel(String fragmentClass, Bundle args, int titleRes,
+ public void startPreferencePanel(String fragmentClass, Bundle args, @StringRes int titleRes,
CharSequence titleText, Fragment resultTo, int resultRequestCode) {
if (mSinglePane) {
startWithFragment(fragmentClass, args, resultTo, resultRequestCode, titleRes, 0);
diff --git a/core/java/android/preference/PreferenceManager.java b/core/java/android/preference/PreferenceManager.java
index 0a0e625..55ee77a 100644
--- a/core/java/android/preference/PreferenceManager.java
+++ b/core/java/android/preference/PreferenceManager.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.XmlRes;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
@@ -263,7 +264,7 @@ public class PreferenceManager {
* root).
* @hide
*/
- public PreferenceScreen inflateFromResource(Context context, int resId,
+ public PreferenceScreen inflateFromResource(Context context, @XmlRes int resId,
PreferenceScreen rootPreferences) {
// Block commits
setNoCommit(true);
@@ -438,7 +439,7 @@ public class PreferenceManager {
* and clear it followed by a call to this method with this
* parameter set to true.
*/
- public static void setDefaultValues(Context context, int resId, boolean readAgain) {
+ public static void setDefaultValues(Context context, @XmlRes int resId, boolean readAgain) {
// Use the default shared preferences name and mode
setDefaultValues(context, getDefaultSharedPreferencesName(context),
diff --git a/core/java/android/preference/SwitchPreference.java b/core/java/android/preference/SwitchPreference.java
index 53b5aad..9c3cefc 100644
--- a/core/java/android/preference/SwitchPreference.java
+++ b/core/java/android/preference/SwitchPreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.StringRes;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
@@ -169,7 +170,7 @@ public class SwitchPreference extends TwoStatePreference {
*
* @param resId The text as a string resource ID
*/
- public void setSwitchTextOn(int resId) {
+ public void setSwitchTextOn(@StringRes int resId) {
setSwitchTextOn(getContext().getString(resId));
}
@@ -179,7 +180,7 @@ public class SwitchPreference extends TwoStatePreference {
*
* @param resId The text as a string resource ID
*/
- public void setSwitchTextOff(int resId) {
+ public void setSwitchTextOff(@StringRes int resId) {
setSwitchTextOff(getContext().getString(resId));
}
diff --git a/core/java/android/preference/TwoStatePreference.java b/core/java/android/preference/TwoStatePreference.java
index 3823b27..7037aca 100644
--- a/core/java/android/preference/TwoStatePreference.java
+++ b/core/java/android/preference/TwoStatePreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.StringRes;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
@@ -116,7 +117,7 @@ public abstract class TwoStatePreference extends Preference {
* @see #setSummaryOn(CharSequence)
* @param summaryResId The summary as a resource.
*/
- public void setSummaryOn(int summaryResId) {
+ public void setSummaryOn(@StringRes int summaryResId) {
setSummaryOn(getContext().getString(summaryResId));
}
@@ -144,7 +145,7 @@ public abstract class TwoStatePreference extends Preference {
* @see #setSummaryOff(CharSequence)
* @param summaryResId The summary as a resource.
*/
- public void setSummaryOff(int summaryResId) {
+ public void setSummaryOff(@StringRes int summaryResId) {
setSummaryOff(getContext().getString(summaryResId));
}
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index 736ec54..5afbd6d 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -638,7 +638,6 @@ public final class MediaStore {
static Bitmap getThumbnail(ContentResolver cr, long origId, long groupId, int kind,
BitmapFactory.Options options, Uri baseUri, boolean isVideo) {
Bitmap bitmap = null;
- String filePath = null;
// Log.v(TAG, "getThumbnail: origId="+origId+", kind="+kind+", isVideo="+isVideo);
// If the magic is non-zero, we simply return thumbnail if it does exist.
// querying MediaProvider and simply return thumbnail.
@@ -710,18 +709,18 @@ public final class MediaStore {
Uri uri = Uri.parse(
baseUri.buildUpon().appendPath(String.valueOf(origId))
.toString().replaceFirst("thumbnails", "media"));
- if (filePath == null) {
- if (c != null) c.close();
- c = cr.query(uri, PROJECTION, null, null, null);
- if (c == null || !c.moveToFirst()) {
- return null;
- }
- filePath = c.getString(1);
+ if (c != null) c.close();
+ c = cr.query(uri, PROJECTION, null, null, null);
+ if (c == null || !c.moveToFirst()) {
+ return null;
}
- if (isVideo) {
- bitmap = ThumbnailUtils.createVideoThumbnail(filePath, kind);
- } else {
- bitmap = ThumbnailUtils.createImageThumbnail(filePath, kind);
+ String filePath = c.getString(1);
+ if (filePath != null) {
+ if (isVideo) {
+ bitmap = ThumbnailUtils.createVideoThumbnail(filePath, kind);
+ } else {
+ bitmap = ThumbnailUtils.createImageThumbnail(filePath, kind);
+ }
}
}
} catch (SQLiteException ex) {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 15acaad..f084263 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1320,9 +1320,6 @@ public final class Settings {
}
};
- private static final Validator sVolumeValidator =
- new InclusiveFloatRangeValidator(0, 1);
-
private static final Validator sUriValidator = new Validator() {
@Override
public boolean validate(String value) {
@@ -1785,6 +1782,7 @@ public final class Settings {
mValues = values;
}
+ @Override
public boolean validate(String value) {
return ArrayUtils.contains(mValues, value);
}
@@ -1799,6 +1797,7 @@ public final class Settings {
mMax = max;
}
+ @Override
public boolean validate(String value) {
try {
final int intValue = Integer.parseInt(value);
@@ -1818,6 +1817,7 @@ public final class Settings {
mMax = max;
}
+ @Override
public boolean validate(String value) {
try {
final float floatValue = Float.parseFloat(value);
@@ -2095,6 +2095,7 @@ public final class Settings {
private static final Validator NEXT_ALARM_FORMATTED_VALIDATOR = new Validator() {
private static final int MAX_LENGTH = 1000;
+
@Override
public boolean validate(String value) {
// TODO: No idea what the correct format is.
@@ -2257,63 +2258,50 @@ public final class Settings {
*/
public static final String VOLUME_RING = "volume_ring";
- private static final Validator VOLUME_RING_VALIDATOR = sVolumeValidator;
-
/**
* System/notifications volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_SYSTEM = "volume_system";
- private static final Validator VOLUME_SYSTEM_VALIDATOR = sVolumeValidator;
-
/**
* Voice call volume. This is used internally, changing this value will
* not change the volume. See AudioManager.
*/
public static final String VOLUME_VOICE = "volume_voice";
- private static final Validator VOLUME_VOICE_VALIDATOR = sVolumeValidator;
-
/**
* Music/media/gaming volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_MUSIC = "volume_music";
- private static final Validator VOLUME_MUSIC_VALIDATOR = sVolumeValidator;
-
/**
* Alarm volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_ALARM = "volume_alarm";
- private static final Validator VOLUME_ALARM_VALIDATOR = sVolumeValidator;
-
/**
* Notification volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_NOTIFICATION = "volume_notification";
- private static final Validator VOLUME_NOTIFICATION_VALIDATOR = sVolumeValidator;
-
/**
* Bluetooth Headset volume. This is used internally, changing this value will
* not change the volume. See AudioManager.
*/
public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
- private static final Validator VOLUME_BLUETOOTH_SCO_VALIDATOR = sVolumeValidator;
-
/**
* Master volume (float in the range 0.0f to 1.0f).
* @hide
*/
public static final String VOLUME_MASTER = "volume_master";
- private static final Validator VOLUME_MASTER_VALIDATOR = sVolumeValidator;
+ private static final Validator VOLUME_MASTER_VALIDATOR =
+ new InclusiveFloatRangeValidator(0, 1);
/**
* Master volume mute (int 1 = mute, 0 = not muted).
@@ -3157,13 +3145,6 @@ public final class Settings {
VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR);
VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR);
VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR);
- VALIDATORS.put(VOLUME_RING, VOLUME_RING_VALIDATOR);
- VALIDATORS.put(VOLUME_SYSTEM, VOLUME_SYSTEM_VALIDATOR);
- VALIDATORS.put(VOLUME_VOICE, VOLUME_VOICE_VALIDATOR);
- VALIDATORS.put(VOLUME_MUSIC, VOLUME_MUSIC_VALIDATOR);
- VALIDATORS.put(VOLUME_ALARM, VOLUME_ALARM_VALIDATOR);
- VALIDATORS.put(VOLUME_NOTIFICATION, VOLUME_NOTIFICATION_VALIDATOR);
- VALIDATORS.put(VOLUME_BLUETOOTH_SCO, VOLUME_BLUETOOTH_SCO_VALIDATOR);
VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR);
VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR);
VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR);
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index d410622..df4d7e0 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -18,6 +18,8 @@ package android.service.dreams;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import android.annotation.IdRes;
+import android.annotation.LayoutRes;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
@@ -383,7 +385,7 @@ public class DreamService extends Service implements Window.Callback {
* @see #setContentView(android.view.View)
* @see #setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
*/
- public void setContentView(int layoutResID) {
+ public void setContentView(@LayoutRes int layoutResID) {
getWindow().setContentView(layoutResID);
}
@@ -444,7 +446,7 @@ public class DreamService extends Service implements Window.Callback {
* @return The view if found or null otherwise.
*/
@Nullable
- public View findViewById(int id) {
+ public View findViewById(@IdRes int id) {
return getWindow().findViewById(id);
}
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 06e9ce0..f0ad951 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -15,6 +15,7 @@
*/
package android.speech.tts;
+import android.annotation.RawRes;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.ComponentName;
@@ -884,7 +885,7 @@ public class TextToSpeech {
*
* @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
*/
- public int addSpeech(String text, String packagename, int resourceId) {
+ public int addSpeech(String text, String packagename, @RawRes int resourceId) {
synchronized (mStartLock) {
mUtterances.put(text, makeResourceUri(packagename, resourceId));
return SUCCESS;
@@ -993,7 +994,7 @@ public class TextToSpeech {
*
* @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
*/
- public int addEarcon(String earcon, String packagename, int resourceId) {
+ public int addEarcon(String earcon, String packagename, @RawRes int resourceId) {
synchronized(mStartLock) {
mEarcons.put(earcon, makeResourceUri(packagename, resourceId));
return SUCCESS;
diff --git a/core/java/android/text/style/ImageSpan.java b/core/java/android/text/style/ImageSpan.java
index 3d6f8e6..856dd0b 100644
--- a/core/java/android/text/style/ImageSpan.java
+++ b/core/java/android/text/style/ImageSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.annotation.DrawableRes;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -110,7 +111,7 @@ public class ImageSpan extends DynamicDrawableSpan {
mSource = uri.toString();
}
- public ImageSpan(Context context, int resourceId) {
+ public ImageSpan(Context context, @DrawableRes int resourceId) {
this(context, resourceId, ALIGN_BOTTOM);
}
@@ -118,7 +119,7 @@ public class ImageSpan extends DynamicDrawableSpan {
* @param verticalAlignment one of {@link DynamicDrawableSpan#ALIGN_BOTTOM} or
* {@link DynamicDrawableSpan#ALIGN_BASELINE}.
*/
- public ImageSpan(Context context, int resourceId, int verticalAlignment) {
+ public ImageSpan(Context context, @DrawableRes int resourceId, int verticalAlignment) {
super(verticalAlignment);
mContext = context;
mResourceId = resourceId;
diff --git a/core/java/android/util/TypedValue.java b/core/java/android/util/TypedValue.java
index 74d4245..98aaa81 100644
--- a/core/java/android/util/TypedValue.java
+++ b/core/java/android/util/TypedValue.java
@@ -16,6 +16,8 @@
package android.util;
+import android.annotation.AnyRes;
+
/**
* Container for a dynamically typed data value. Primarily used with
* {@link android.content.res.Resources} for holding resource values.
@@ -178,6 +180,7 @@ public class TypedValue {
public int assetCookie;
/** If Value came from a resource, this holds the corresponding resource id. */
+ @AnyRes
public int resourceId;
/** If Value came from a resource, these are the configurations for which
diff --git a/core/java/android/view/ActionMode.java b/core/java/android/view/ActionMode.java
index ae4b60f..a018138 100644
--- a/core/java/android/view/ActionMode.java
+++ b/core/java/android/view/ActionMode.java
@@ -17,6 +17,8 @@
package android.view;
+import android.annotation.StringRes;
+
/**
* Represents a contextual mode of the user interface. Action modes can be used to provide
* alternative interaction modes and replace parts of the normal UI until finished.
@@ -93,7 +95,7 @@ public abstract class ActionMode {
* @see #setTitle(CharSequence)
* @see #setCustomView(View)
*/
- public abstract void setTitle(int resId);
+ public abstract void setTitle(@StringRes int resId);
/**
* Set the subtitle of the action mode. This method will have no visible effect if
@@ -115,7 +117,7 @@ public abstract class ActionMode {
* @see #setSubtitle(CharSequence)
* @see #setCustomView(View)
*/
- public abstract void setSubtitle(int resId);
+ public abstract void setSubtitle(@StringRes int resId);
/**
* Set whether or not the title/subtitle display for this action mode
diff --git a/core/java/android/view/ContextMenu.java b/core/java/android/view/ContextMenu.java
index decabcb..85fe421 100644
--- a/core/java/android/view/ContextMenu.java
+++ b/core/java/android/view/ContextMenu.java
@@ -16,6 +16,8 @@
package android.view;
+import android.annotation.DrawableRes;
+import android.annotation.StringRes;
import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.widget.AdapterView;
@@ -44,7 +46,7 @@ public interface ContextMenu extends Menu {
* @param titleRes The string resource identifier used for the title.
* @return This ContextMenu so additional setters can be called.
*/
- public ContextMenu setHeaderTitle(int titleRes);
+ public ContextMenu setHeaderTitle(@StringRes int titleRes);
/**
* Sets the context menu header's title to the title given in <var>title</var>.
@@ -61,7 +63,7 @@ public interface ContextMenu extends Menu {
* @param iconRes The resource identifier used for the icon.
* @return This ContextMenu so additional setters can be called.
*/
- public ContextMenu setHeaderIcon(int iconRes);
+ public ContextMenu setHeaderIcon(@DrawableRes int iconRes);
/**
* Sets the context menu header's icon to the icon given in <var>icon</var>
diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java
index a5225cb..1014573 100644
--- a/core/java/android/view/LayoutInflater.java
+++ b/core/java/android/view/LayoutInflater.java
@@ -21,6 +21,7 @@ import com.android.internal.R;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.LayoutRes;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Resources;
@@ -369,7 +370,7 @@ public abstract class LayoutInflater {
* this is the root View; otherwise it is the root of the inflated
* XML file.
*/
- public View inflate(int resource, @Nullable ViewGroup root) {
+ public View inflate(@LayoutRes int resource, @Nullable ViewGroup root) {
return inflate(resource, root, root != null);
}
@@ -410,7 +411,7 @@ public abstract class LayoutInflater {
* attachToRoot is true, this is root; otherwise it is the root of
* the inflated XML file.
*/
- public View inflate(int resource, @Nullable ViewGroup root, boolean attachToRoot) {
+ public View inflate(@LayoutRes int resource, @Nullable ViewGroup root, boolean attachToRoot) {
final Resources res = getContext().getResources();
if (DEBUG) {
Log.d(TAG, "INFLATING from resource: \"" + res.getResourceName(resource) + "\" ("
diff --git a/core/java/android/view/Menu.java b/core/java/android/view/Menu.java
index 7157bc5..0c2e9cf 100644
--- a/core/java/android/view/Menu.java
+++ b/core/java/android/view/Menu.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.StringRes;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
@@ -148,7 +149,7 @@ public interface Menu {
* @param titleRes Resource identifier of title string.
* @return The newly added menu item.
*/
- public MenuItem add(int titleRes);
+ public MenuItem add(@StringRes int titleRes);
/**
* Add a new item to the menu. This item displays the given title for its
@@ -182,7 +183,7 @@ public interface Menu {
* @param titleRes Resource identifier of title string.
* @return The newly added menu item.
*/
- public MenuItem add(int groupId, int itemId, int order, int titleRes);
+ public MenuItem add(int groupId, int itemId, int order, @StringRes int titleRes);
/**
* Add a new sub-menu to the menu. This item displays the given title for
@@ -202,7 +203,7 @@ public interface Menu {
* @param titleRes Resource identifier of title string.
* @return The newly added sub-menu
*/
- SubMenu addSubMenu(final int titleRes);
+ SubMenu addSubMenu(@StringRes final int titleRes);
/**
* Add a new sub-menu to the menu. This item displays the given
@@ -239,7 +240,7 @@ public interface Menu {
* @param titleRes Resource identifier of title string.
* @return The newly added sub-menu
*/
- SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes);
+ SubMenu addSubMenu(int groupId, int itemId, int order, @StringRes int titleRes);
/**
* Add a group of menu items corresponding to actions that can be performed
diff --git a/core/java/android/view/MenuInflater.java b/core/java/android/view/MenuInflater.java
index 5811c17..3492aa0 100644
--- a/core/java/android/view/MenuInflater.java
+++ b/core/java/android/view/MenuInflater.java
@@ -21,6 +21,7 @@ import com.android.internal.view.menu.MenuItemImpl;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.MenuRes;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
@@ -101,7 +102,7 @@ public class MenuInflater {
* @param menu The Menu to inflate into. The items and submenus will be
* added to this Menu.
*/
- public void inflate(int menuRes, Menu menu) {
+ public void inflate(@MenuRes int menuRes, Menu menu) {
XmlResourceParser parser = null;
try {
parser = mContext.getResources().getLayout(menuRes);
diff --git a/core/java/android/view/MenuItem.java b/core/java/android/view/MenuItem.java
index e706c9c..9e8b97e 100644
--- a/core/java/android/view/MenuItem.java
+++ b/core/java/android/view/MenuItem.java
@@ -16,6 +16,9 @@
package android.view;
+import android.annotation.DrawableRes;
+import android.annotation.LayoutRes;
+import android.annotation.StringRes;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
@@ -165,7 +168,7 @@ public interface MenuItem {
* @see #setTitleCondensed(CharSequence)
*/
- public MenuItem setTitle(int title);
+ public MenuItem setTitle(@StringRes int title);
/**
* Retrieve the current title of the item.
@@ -214,7 +217,7 @@ public interface MenuItem {
* @param iconRes The new icon (as a resource ID) to be displayed.
* @return This Item so additional setters can be called.
*/
- public MenuItem setIcon(int iconRes);
+ public MenuItem setIcon(@DrawableRes int iconRes);
/**
* Returns the icon for this item as a Drawable (getting it from resources if it hasn't been
@@ -511,7 +514,7 @@ public interface MenuItem {
*
* @see #setShowAsAction(int)
*/
- public MenuItem setActionView(int resId);
+ public MenuItem setActionView(@LayoutRes int resId);
/**
* Returns the currently set action view for this menu item.
diff --git a/core/java/android/view/PointerIcon.java b/core/java/android/view/PointerIcon.java
index 7dcad68..cf35ce5 100644
--- a/core/java/android/view/PointerIcon.java
+++ b/core/java/android/view/PointerIcon.java
@@ -18,6 +18,7 @@ package android.view;
import com.android.internal.util.XmlUtils;
+import android.annotation.XmlRes;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -192,7 +193,7 @@ public final class PointerIcon implements Parcelable {
* @throws Resources.NotFoundException if the resource was not found or the drawable
* linked in the resource was not found.
*/
- public static PointerIcon loadCustomIcon(Resources resources, int resourceId) {
+ public static PointerIcon loadCustomIcon(Resources resources, @XmlRes int resourceId) {
if (resources == null) {
throw new IllegalArgumentException("resources must not be null");
}
@@ -373,7 +374,7 @@ public final class PointerIcon implements Parcelable {
return true;
}
- private void loadResource(Context context, Resources resources, int resourceId) {
+ private void loadResource(Context context, Resources resources, @XmlRes int resourceId) {
final XmlResourceParser parser = resources.getXml(resourceId);
final int bitmapRes;
final float hotSpotX;
diff --git a/core/java/android/view/SubMenu.java b/core/java/android/view/SubMenu.java
index 196a183..38662b0 100644
--- a/core/java/android/view/SubMenu.java
+++ b/core/java/android/view/SubMenu.java
@@ -16,6 +16,8 @@
package android.view;
+import android.annotation.DrawableRes;
+import android.annotation.StringRes;
import android.graphics.drawable.Drawable;
/**
@@ -38,7 +40,7 @@ public interface SubMenu extends Menu {
* @param titleRes The string resource identifier used for the title.
* @return This SubMenu so additional setters can be called.
*/
- public SubMenu setHeaderTitle(int titleRes);
+ public SubMenu setHeaderTitle(@StringRes int titleRes);
/**
* Sets the submenu header's title to the title given in <var>title</var>.
@@ -55,7 +57,7 @@ public interface SubMenu extends Menu {
* @param iconRes The resource identifier used for the icon.
* @return This SubMenu so additional setters can be called.
*/
- public SubMenu setHeaderIcon(int iconRes);
+ public SubMenu setHeaderIcon(@DrawableRes int iconRes);
/**
* Sets the submenu header's icon to the icon given in <var>icon</var>
@@ -88,7 +90,7 @@ public interface SubMenu extends Menu {
* @param iconRes The new icon (as a resource ID) to be displayed.
* @return This SubMenu so additional setters can be called.
*/
- public SubMenu setIcon(int iconRes);
+ public SubMenu setIcon(@DrawableRes int iconRes);
/**
* Change the icon associated with this submenu's item in its parent menu.
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index ad5d651..f99d2d5 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -18,6 +18,8 @@ package android.view;
import android.animation.AnimatorInflater;
import android.animation.StateListAnimator;
+import android.annotation.DrawableRes;
+import android.annotation.IdRes;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -1593,6 +1595,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @see #setId(int)
* @see #getId()
*/
+ @IdRes
@ViewDebug.ExportedProperty(resolveId = true)
int mID = NO_ID;
@@ -6062,7 +6065,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @param id The labeled view id.
*/
@RemotableViewMethod
- public void setLabelFor(int id) {
+ public void setLabelFor(@IdRes int id) {
if (mLabelForId == id) {
return;
}
@@ -16242,7 +16245,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @attr ref android.R.styleable#View_background
*/
@RemotableViewMethod
- public void setBackgroundResource(int resid) {
+ public void setBackgroundResource(@DrawableRes int resid) {
if (resid != 0 && resid == mBackgroundResource) {
return;
}
@@ -17070,7 +17073,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @param id the id of the view to be found
* @return the view of the specified id, null if cannot be found
*/
- protected View findViewTraversal(int id) {
+ protected View findViewTraversal(@IdRes int id) {
if (id == mID) {
return this;
}
@@ -17110,7 +17113,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @return The view that has the given id in the hierarchy or null
*/
@Nullable
- public final View findViewById(int id) {
+ public final View findViewById(@IdRes int id) {
if (id < 0) {
return null;
}
@@ -17225,7 +17228,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*
* @attr ref android.R.styleable#View_id
*/
- public void setId(int id) {
+ public void setId(@IdRes int id) {
mID = id;
if (mID == View.NO_ID && mLabelForId != View.NO_ID) {
mID = generateViewId();
@@ -17265,6 +17268,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @see #findViewById(int)
* @attr ref android.R.styleable#View_id
*/
+ @IdRes
@ViewDebug.CapturedViewProperty
public int getId() {
return mID;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 504a758..a49d8c3 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -17,6 +17,7 @@
package android.view;
import android.animation.LayoutTransition;
+import android.annotation.IdRes;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
@@ -3612,7 +3613,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* {@hide}
*/
@Override
- protected View findViewTraversal(int id) {
+ protected View findViewTraversal(@IdRes int id) {
if (id == mID) {
return this;
}
diff --git a/core/java/android/view/ViewStub.java b/core/java/android/view/ViewStub.java
index 9f9ed5b..ec852e8 100644
--- a/core/java/android/view/ViewStub.java
+++ b/core/java/android/view/ViewStub.java
@@ -16,6 +16,8 @@
package android.view;
+import android.annotation.IdRes;
+import android.annotation.LayoutRes;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -87,7 +89,7 @@ public final class ViewStub extends View {
* @param context The application's environment.
* @param layoutResource The reference to a layout resource that will be inflated.
*/
- public ViewStub(Context context, int layoutResource) {
+ public ViewStub(Context context, @LayoutRes int layoutResource) {
this(context, null);
mLayoutResource = layoutResource;
@@ -125,6 +127,7 @@ public final class ViewStub extends View {
* @see #setInflatedId(int)
* @attr ref android.R.styleable#ViewStub_inflatedId
*/
+ @IdRes
public int getInflatedId() {
return mInflatedId;
}
@@ -140,7 +143,7 @@ public final class ViewStub extends View {
* @attr ref android.R.styleable#ViewStub_inflatedId
*/
@android.view.RemotableViewMethod
- public void setInflatedId(int inflatedId) {
+ public void setInflatedId(@IdRes int inflatedId) {
mInflatedId = inflatedId;
}
@@ -156,6 +159,7 @@ public final class ViewStub extends View {
* @see #inflate()
* @attr ref android.R.styleable#ViewStub_layout
*/
+ @LayoutRes
public int getLayoutResource() {
return mLayoutResource;
}
@@ -173,7 +177,7 @@ public final class ViewStub extends View {
* @attr ref android.R.styleable#ViewStub_layout
*/
@android.view.RemotableViewMethod
- public void setLayoutResource(int layoutResource) {
+ public void setLayoutResource(@LayoutRes int layoutResource) {
mLayoutResource = layoutResource;
}
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 8964862..e332135 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -16,6 +16,9 @@
package android.view;
+import android.annotation.DrawableRes;
+import android.annotation.IdRes;
+import android.annotation.LayoutRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -985,7 +988,7 @@ public abstract class Window {
* @return The view if found or null otherwise.
*/
@Nullable
- public View findViewById(int id) {
+ public View findViewById(@IdRes int id) {
return getDecorView().findViewById(id);
}
@@ -998,7 +1001,7 @@ public abstract class Window {
* @param layoutResID Resource ID to be inflated.
* @see #setContentView(View, android.view.ViewGroup.LayoutParams)
*/
- public abstract void setContentView(int layoutResID);
+ public abstract void setContentView(@LayoutRes int layoutResID);
/**
* Convenience for
@@ -1128,7 +1131,7 @@ public abstract class Window {
* @param resId The resource identifier of a drawable resource which will
* be installed as the new background.
*/
- public void setBackgroundDrawableResource(int resId) {
+ public void setBackgroundDrawableResource(@DrawableRes int resId) {
setBackgroundDrawable(mContext.getDrawable(resId));
}
@@ -1144,7 +1147,7 @@ public abstract class Window {
/**
* Set the value for a drawable feature of this window, from a resource
- * identifier. You must have called requestFeauture(featureId) before
+ * identifier. You must have called requestFeature(featureId) before
* calling this function.
*
* @see android.content.res.Resources#getDrawable(int)
@@ -1153,7 +1156,7 @@ public abstract class Window {
* constant by Window.
* @param resId Resource identifier of the desired image.
*/
- public abstract void setFeatureDrawableResource(int featureId, int resId);
+ public abstract void setFeatureDrawableResource(int featureId, @DrawableRes int resId);
/**
* Set the value for a drawable feature of this window, from a URI. You
@@ -1423,7 +1426,7 @@ public abstract class Window {
*
* @param resId resource ID of a drawable to set
*/
- public void setIcon(int resId) { }
+ public void setIcon(@DrawableRes int resId) { }
/**
* Set the default icon for this window.
@@ -1432,7 +1435,7 @@ public abstract class Window {
*
* @hide
*/
- public void setDefaultIcon(int resId) { }
+ public void setDefaultIcon(@DrawableRes int resId) { }
/**
* Set the logo for this window. A logo is often shown in place of an
@@ -1441,7 +1444,7 @@ public abstract class Window {
*
* @param resId resource ID of a drawable to set
*/
- public void setLogo(int resId) { }
+ public void setLogo(@DrawableRes int resId) { }
/**
* Set the default logo for this window.
@@ -1450,7 +1453,7 @@ public abstract class Window {
*
* @hide
*/
- public void setDefaultLogo(int resId) { }
+ public void setDefaultLogo(@DrawableRes int resId) { }
/**
* Set focus locally. The window should have the
diff --git a/core/java/android/view/animation/AnimationUtils.java b/core/java/android/view/animation/AnimationUtils.java
index 606c83e..4d1209a 100644
--- a/core/java/android/view/animation/AnimationUtils.java
+++ b/core/java/android/view/animation/AnimationUtils.java
@@ -19,6 +19,8 @@ package android.view.animation;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.AnimRes;
+import android.annotation.InterpolatorRes;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
@@ -65,7 +67,7 @@ public class AnimationUtils {
* @return The animation object reference by the specified id
* @throws NotFoundException when the animation cannot be loaded
*/
- public static Animation loadAnimation(Context context, int id)
+ public static Animation loadAnimation(Context context, @AnimRes int id)
throws NotFoundException {
XmlResourceParser parser = null;
@@ -143,7 +145,7 @@ public class AnimationUtils {
* @return The animation object reference by the specified id
* @throws NotFoundException when the layout animation controller cannot be loaded
*/
- public static LayoutAnimationController loadLayoutAnimation(Context context, int id)
+ public static LayoutAnimationController loadLayoutAnimation(Context context, @AnimRes int id)
throws NotFoundException {
XmlResourceParser parser = null;
@@ -266,7 +268,8 @@ public class AnimationUtils {
* @return The animation object reference by the specified id
* @throws NotFoundException
*/
- public static Interpolator loadInterpolator(Context context, int id) throws NotFoundException {
+ public static Interpolator loadInterpolator(Context context, @InterpolatorRes int id)
+ throws NotFoundException {
XmlResourceParser parser = null;
try {
parser = context.getResources().getAnimation(id);
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index e87a117..164283d 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.DrawableRes;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -2712,7 +2713,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
*
* @attr ref android.R.styleable#AbsListView_listSelector
*/
- public void setSelector(int resID) {
+ public void setSelector(@DrawableRes int resID) {
setSelector(getContext().getDrawable(resID));
}
diff --git a/core/java/android/widget/ActivityChooserView.java b/core/java/android/widget/ActivityChooserView.java
index f9af2f9..f34ad71 100644
--- a/core/java/android/widget/ActivityChooserView.java
+++ b/core/java/android/widget/ActivityChooserView.java
@@ -18,6 +18,7 @@ package android.widget;
import com.android.internal.R;
+import android.annotation.StringRes;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -334,7 +335,7 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
*
* @param resourceId The content description resource id.
*/
- public void setExpandActivityOverflowButtonContentDescription(int resourceId) {
+ public void setExpandActivityOverflowButtonContentDescription(@StringRes int resourceId) {
CharSequence contentDescription = mContext.getString(resourceId);
mExpandActivityOverflowButtonImage.setContentDescription(contentDescription);
}
@@ -514,7 +515,7 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
*
* @param resourceId The resource id.
*/
- public void setDefaultActionButtonContentDescription(int resourceId) {
+ public void setDefaultActionButtonContentDescription(@StringRes int resourceId) {
mDefaultActionButtonContentDescription = resourceId;
}
diff --git a/core/java/android/widget/ArrayAdapter.java b/core/java/android/widget/ArrayAdapter.java
index aff5e29..89e508f 100644
--- a/core/java/android/widget/ArrayAdapter.java
+++ b/core/java/android/widget/ArrayAdapter.java
@@ -16,6 +16,9 @@
package android.widget;
+import android.annotation.ArrayRes;
+import android.annotation.IdRes;
+import android.annotation.LayoutRes;
import android.content.Context;
import android.content.res.Resources;
import android.util.Log;
@@ -106,7 +109,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* @param resource The resource ID for a layout file containing a TextView to use when
* instantiating views.
*/
- public ArrayAdapter(Context context, int resource) {
+ public ArrayAdapter(Context context, @LayoutRes int resource) {
this(context, resource, 0, new ArrayList<T>());
}
@@ -118,7 +121,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* instantiating views.
* @param textViewResourceId The id of the TextView within the layout resource to be populated
*/
- public ArrayAdapter(Context context, int resource, int textViewResourceId) {
+ public ArrayAdapter(Context context, @LayoutRes int resource, @IdRes int textViewResourceId) {
this(context, resource, textViewResourceId, new ArrayList<T>());
}
@@ -130,7 +133,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* instantiating views.
* @param objects The objects to represent in the ListView.
*/
- public ArrayAdapter(Context context, int resource, T[] objects) {
+ public ArrayAdapter(Context context, @LayoutRes int resource, T[] objects) {
this(context, resource, 0, Arrays.asList(objects));
}
@@ -143,7 +146,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* @param textViewResourceId The id of the TextView within the layout resource to be populated
* @param objects The objects to represent in the ListView.
*/
- public ArrayAdapter(Context context, int resource, int textViewResourceId, T[] objects) {
+ public ArrayAdapter(Context context, @LayoutRes int resource, @IdRes int textViewResourceId, T[] objects) {
this(context, resource, textViewResourceId, Arrays.asList(objects));
}
@@ -155,7 +158,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* instantiating views.
* @param objects The objects to represent in the ListView.
*/
- public ArrayAdapter(Context context, int resource, List<T> objects) {
+ public ArrayAdapter(Context context, @LayoutRes int resource, List<T> objects) {
this(context, resource, 0, objects);
}
@@ -405,7 +408,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* @param resource the layout resource defining the drop down views
* @see #getDropDownView(int, android.view.View, android.view.ViewGroup)
*/
- public void setDropDownViewResource(int resource) {
+ public void setDropDownViewResource(@LayoutRes int resource) {
this.mDropDownResource = resource;
}
@@ -457,7 +460,7 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable,
* @return An ArrayAdapter<CharSequence>.
*/
public static ArrayAdapter<CharSequence> createFromResource(Context context,
- int textArrayResId, int textViewResId) {
+ @ArrayRes int textArrayResId, @LayoutRes int textViewResId) {
CharSequence[] strings = context.getResources().getTextArray(textArrayResId);
return new ArrayAdapter<CharSequence>(context, textViewResId, strings);
}
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index e6392b9..01767d5 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.DrawableRes;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
@@ -356,7 +357,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
*
* @attr ref android.R.styleable#PopupWindow_popupBackground
*/
- public void setDropDownBackgroundResource(int id) {
+ public void setDropDownBackgroundResource(@DrawableRes int id) {
mPopup.setBackgroundDrawable(getContext().getDrawable(id));
}
diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java
index 5e43916..47fb8a7 100644
--- a/core/java/android/widget/CalendarView.java
+++ b/core/java/android/widget/CalendarView.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.DrawableRes;
import android.annotation.Widget;
import android.content.Context;
import android.content.res.Configuration;
@@ -253,7 +254,7 @@ public class CalendarView extends FrameLayout {
*
* @attr ref android.R.styleable#CalendarView_selectedDateVerticalBar
*/
- public void setSelectedDateVerticalBar(int resourceId) {
+ public void setSelectedDateVerticalBar(@DrawableRes int resourceId) {
mDelegate.setSelectedDateVerticalBar(resourceId);
}
diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java
index 344d00a..84f0ee5 100644
--- a/core/java/android/widget/CheckedTextView.java
+++ b/core/java/android/widget/CheckedTextView.java
@@ -18,6 +18,7 @@ package android.widget;
import com.android.internal.R;
+import android.annotation.DrawableRes;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -32,7 +33,6 @@ import android.view.ViewDebug;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
-
/**
* An extension to TextView that supports the {@link android.widget.Checkable} interface.
* This is useful when used in a {@link android.widget.ListView ListView} where the it's
@@ -141,7 +141,7 @@ public class CheckedTextView extends TextView implements Checkable {
*
* @attr ref android.R.styleable#CheckedTextView_checkMark
*/
- public void setCheckMarkDrawable(int resid) {
+ public void setCheckMarkDrawable(@DrawableRes int resid) {
if (resid != 0 && resid == mCheckMarkResource) {
return;
}
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index f2afeeb..dbf82b6 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.graphics.PorterDuff;
import com.android.internal.R;
+import android.annotation.DrawableRes;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
diff --git a/core/java/android/widget/DatePickerCalendarDelegate.java b/core/java/android/widget/DatePickerCalendarDelegate.java
index 85b4d30..a053901 100644
--- a/core/java/android/widget/DatePickerCalendarDelegate.java
+++ b/core/java/android/widget/DatePickerCalendarDelegate.java
@@ -192,6 +192,7 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate i
mYearPickerView = new YearPickerView(mContext);
mYearPickerView.init(this);
+ mYearPickerView.setRange(mMinDate, mMaxDate);
final ColorStateList yearBackgroundColor = a.getColorStateList(
R.styleable.DatePicker_yearListSelectorColor);
diff --git a/core/java/android/widget/ImageSwitcher.java b/core/java/android/widget/ImageSwitcher.java
index 80e908a..81636a7 100644
--- a/core/java/android/widget/ImageSwitcher.java
+++ b/core/java/android/widget/ImageSwitcher.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.DrawableRes;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.net.Uri;
@@ -23,7 +24,6 @@ import android.util.AttributeSet;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
-
public class ImageSwitcher extends ViewSwitcher
{
public ImageSwitcher(Context context)
@@ -35,7 +35,7 @@ public class ImageSwitcher extends ViewSwitcher
super(context, attrs);
}
- public void setImageResource(int resid)
+ public void setImageResource(@DrawableRes int resid)
{
ImageView image = (ImageView)this.getNextView();
image.setImageResource(resid);
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java
index dd9bdb6..9831dca 100644
--- a/core/java/android/widget/ImageView.java
+++ b/core/java/android/widget/ImageView.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.DrawableRes;
import android.annotation.Nullable;
import android.content.ContentResolver;
import android.content.Context;
@@ -387,7 +388,7 @@ public class ImageView extends View {
* @attr ref android.R.styleable#ImageView_src
*/
@android.view.RemotableViewMethod
- public void setImageResource(int resId) {
+ public void setImageResource(@DrawableRes int resId) {
// The resource configuration may have changed, so we should always
// try to load the resource even if the resId hasn't changed.
final int oldWidth = mDrawableWidth;
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 0aaef6d..f9c7faa 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -21,6 +21,7 @@ import com.android.internal.R;
import com.android.internal.util.Predicate;
import com.google.android.collect.Lists;
+import android.annotation.IdRes;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -3630,7 +3631,7 @@ public class ListView extends AbsListView {
* First look in our children, then in any header and footer views that may be scrolled off.
*/
@Override
- protected View findViewTraversal(int id) {
+ protected View findViewTraversal(@IdRes int id) {
View v;
v = super.findViewTraversal(id);
if (v == null) {
diff --git a/core/java/android/widget/PopupMenu.java b/core/java/android/widget/PopupMenu.java
index 06ac1c3..1507dfb 100644
--- a/core/java/android/widget/PopupMenu.java
+++ b/core/java/android/widget/PopupMenu.java
@@ -22,6 +22,7 @@ import com.android.internal.view.menu.MenuPopupHelper;
import com.android.internal.view.menu.MenuPresenter;
import com.android.internal.view.menu.SubMenuBuilder;
+import android.annotation.MenuRes;
import android.content.Context;
import android.view.Gravity;
import android.view.Menu;
@@ -205,7 +206,7 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback {
* popupMenu.getMenuInflater().inflate(menuRes, popupMenu.getMenu()).
* @param menuRes Menu resource to inflate
*/
- public void inflate(int menuRes) {
+ public void inflate(@MenuRes int menuRes) {
getMenuInflater().inflate(menuRes, mMenu);
}
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 5b0745e..406a274 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -21,6 +21,7 @@ import android.graphics.PorterDuff;
import com.android.internal.R;
+import android.annotation.InterpolatorRes;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -1508,7 +1509,7 @@ public class ProgressBar extends View {
* @param context The application environment
* @param resID The resource identifier of the interpolator to load
*/
- public void setInterpolator(Context context, int resID) {
+ public void setInterpolator(Context context, @InterpolatorRes int resID) {
setInterpolator(AnimationUtils.loadInterpolator(context, resID));
}
diff --git a/core/java/android/widget/RadioGroup.java b/core/java/android/widget/RadioGroup.java
index f04bb3d..6586d11 100644
--- a/core/java/android/widget/RadioGroup.java
+++ b/core/java/android/widget/RadioGroup.java
@@ -18,6 +18,7 @@ package android.widget;
import com.android.internal.R;
+import android.annotation.IdRes;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
@@ -151,7 +152,7 @@ public class RadioGroup extends LinearLayout {
* @see #getCheckedRadioButtonId()
* @see #clearCheck()
*/
- public void check(int id) {
+ public void check(@IdRes int id) {
// don't even bother
if (id != -1 && (id == mCheckedId)) {
return;
@@ -168,7 +169,7 @@ public class RadioGroup extends LinearLayout {
setCheckedId(id);
}
- private void setCheckedId(int id) {
+ private void setCheckedId(@IdRes int id) {
mCheckedId = id;
if (mOnCheckedChangeListener != null) {
mOnCheckedChangeListener.onCheckedChanged(this, mCheckedId);
@@ -193,6 +194,7 @@ public class RadioGroup extends LinearLayout {
*
* @attr ref android.R.styleable#RadioGroup_checkedButton
*/
+ @IdRes
public int getCheckedRadioButtonId() {
return mCheckedId;
}
@@ -331,7 +333,7 @@ public class RadioGroup extends LinearLayout {
* @param group the group in which the checked radio button has changed
* @param checkedId the unique identifier of the newly checked radio button
*/
- public void onCheckedChanged(RadioGroup group, int checkedId);
+ public void onCheckedChanged(RadioGroup group, @IdRes int checkedId);
}
private class CheckedStateTracker implements CompoundButton.OnCheckedChangeListener {
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index 6ee2b4c..f0bc303 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -18,6 +18,7 @@ package android.widget;
import com.android.internal.R;
+import android.annotation.DrawableRes;
import android.annotation.Nullable;
import android.annotation.Widget;
import android.app.AlertDialog;
@@ -46,7 +47,6 @@ import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ListPopupWindow.ForwardingListener;
import android.widget.PopupWindow.OnDismissListener;
-
/**
* A view that displays one child at a time and lets the user pick among them.
* The items in the Spinner come from the {@link Adapter} associated with
@@ -331,7 +331,7 @@ public class Spinner extends AbsSpinner implements OnClickListener {
*
* @attr ref android.R.styleable#Spinner_popupBackground
*/
- public void setPopupBackgroundResource(int resId) {
+ public void setPopupBackgroundResource(@DrawableRes int resId) {
setPopupBackgroundDrawable(getPopupContext().getDrawable(resId));
}
diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java
index b959ddc..ce1834e 100644
--- a/core/java/android/widget/Switch.java
+++ b/core/java/android/widget/Switch.java
@@ -17,7 +17,9 @@
package android.widget;
import android.animation.ObjectAnimator;
+import android.annotation.DrawableRes;
import android.annotation.Nullable;
+import android.annotation.StyleRes;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
@@ -263,7 +265,7 @@ public class Switch extends CompoundButton {
*
* @attr ref android.R.styleable#Switch_switchTextAppearance
*/
- public void setSwitchTextAppearance(Context context, int resid) {
+ public void setSwitchTextAppearance(Context context, @StyleRes int resid) {
TypedArray appearance =
context.obtainStyledAttributes(resid,
com.android.internal.R.styleable.TextAppearance);
@@ -471,7 +473,7 @@ public class Switch extends CompoundButton {
*
* @attr ref android.R.styleable#Switch_track
*/
- public void setTrackResource(int resId) {
+ public void setTrackResource(@DrawableRes int resId) {
setTrackDrawable(getContext().getDrawable(resId));
}
@@ -593,7 +595,7 @@ public class Switch extends CompoundButton {
*
* @attr ref android.R.styleable#Switch_thumb
*/
- public void setThumbResource(int resId) {
+ public void setThumbResource(@DrawableRes int resId) {
setThumbDrawable(getContext().getDrawable(resId));
}
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index 88ecb13..f90a0a7 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -17,6 +17,7 @@
package android.widget;
import android.R;
+import android.annotation.DrawableRes;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -244,7 +245,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
* @param resId the resource identifier of the drawable to use as a
* divider.
*/
- public void setDividerDrawable(int resId) {
+ public void setDividerDrawable(@DrawableRes int resId) {
setDividerDrawable(mContext.getDrawable(resId));
}
@@ -265,7 +266,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
* @param resId the resource identifier of the drawable to use as the
* left strip drawable
*/
- public void setLeftStripDrawable(int resId) {
+ public void setLeftStripDrawable(@DrawableRes int resId) {
setLeftStripDrawable(mContext.getDrawable(resId));
}
@@ -286,7 +287,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
* @param resId the resource identifier of the drawable to use as the
* right strip drawable
*/
- public void setRightStripDrawable(int resId) {
+ public void setRightStripDrawable(@DrawableRes int resId) {
setRightStripDrawable(mContext.getDrawable(resId));
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 848c1c0..f33ef75 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -17,8 +17,12 @@
package android.widget;
import android.R;
+import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.StringRes;
+import android.annotation.StyleRes;
+import android.annotation.XmlRes;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
@@ -2173,7 +2177,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_drawableBottom
*/
@android.view.RemotableViewMethod
- public void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom) {
+ public void setCompoundDrawablesWithIntrinsicBounds(@DrawableRes int left,
+ @DrawableRes int top, @DrawableRes int right, @DrawableRes int bottom) {
final Context context = getContext();
setCompoundDrawablesWithIntrinsicBounds(left != 0 ? context.getDrawable(left) : null,
top != 0 ? context.getDrawable(top) : null,
@@ -2374,8 +2379,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_drawableBottom
*/
@android.view.RemotableViewMethod
- public void setCompoundDrawablesRelativeWithIntrinsicBounds(int start, int top, int end,
- int bottom) {
+ public void setCompoundDrawablesRelativeWithIntrinsicBounds(@DrawableRes int start,
+ @DrawableRes int top, @DrawableRes int end, @DrawableRes int bottom) {
final Context context = getContext();
setCompoundDrawablesRelativeWithIntrinsicBounds(
start != 0 ? context.getDrawable(start) : null,
@@ -2643,7 +2648,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* Sets the text color, size, style, hint color, and highlight color
* from the specified TextAppearance resource.
*/
- public void setTextAppearance(Context context, int resid) {
+ public void setTextAppearance(Context context, @StyleRes int resid) {
TypedArray appearance =
context.obtainStyledAttributes(resid,
com.android.internal.R.styleable.TextAppearance);
@@ -4267,11 +4272,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
@android.view.RemotableViewMethod
- public final void setText(int resid) {
+ public final void setText(@StringRes int resid) {
setText(getContext().getResources().getText(resid));
}
- public final void setText(int resid, BufferType type) {
+ public final void setText(@StringRes int resid, BufferType type) {
setText(getContext().getResources().getText(resid), type);
}
@@ -4307,7 +4312,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_hint
*/
@android.view.RemotableViewMethod
- public final void setHint(int resid) {
+ public final void setHint(@StringRes int resid) {
setHint(getContext().getResources().getText(resid));
}
@@ -4711,7 +4716,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @see EditorInfo#extras
* @attr ref android.R.styleable#TextView_editorExtras
*/
- public void setInputExtras(int xmlResId) throws XmlPullParserException, IOException {
+ public void setInputExtras(@XmlRes int xmlResId) throws XmlPullParserException, IOException {
createEditorIfNeeded();
XmlResourceParser parser = getResources().getXml(xmlResId);
mEditor.createInputContentTypeIfNeeded();
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java
index be4cdc1..207f675 100644
--- a/core/java/android/widget/Toast.java
+++ b/core/java/android/widget/Toast.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.IntDef;
+import android.annotation.StringRes;
import android.app.INotificationManager;
import android.app.ITransientNotification;
import android.content.Context;
@@ -280,7 +281,7 @@ public class Toast {
*
* @throws Resources.NotFoundException if the resource can't be found.
*/
- public static Toast makeText(Context context, int resId, @Duration int duration)
+ public static Toast makeText(Context context, @StringRes int resId, @Duration int duration)
throws Resources.NotFoundException {
return makeText(context, context.getResources().getText(resId), duration);
}
@@ -289,7 +290,7 @@ public class Toast {
* Update the text in a Toast that was previously created using one of the makeText() methods.
* @param resId The new text for the Toast.
*/
- public void setText(int resId) {
+ public void setText(@StringRes int resId) {
setText(mContext.getText(resId));
}
diff --git a/core/jni/android_server_FingerprintManager.cpp b/core/jni/android_server_FingerprintManager.cpp
index c8aa22f..24f8f67 100644
--- a/core/jni/android_server_FingerprintManager.cpp
+++ b/core/jni/android_server_FingerprintManager.cpp
@@ -28,7 +28,7 @@
namespace android {
-static const uint16_t kVersion = HARDWARE_MODULE_API_VERSION(1, 0);
+static const uint16_t kVersion = HARDWARE_MODULE_API_VERSION(2, 0);
static const char* FINGERPRINT_SERVICE = "com/android/server/fingerprint/FingerprintService";
static struct {
@@ -55,15 +55,15 @@ static void hal_notify_callback(fingerprint_msg_t msg) {
arg1 = msg.data.acquired.acquired_info;
break;
case FINGERPRINT_PROCESSED:
- arg1 = msg.data.processed.id;
+ arg1 = msg.data.processed.finger.fid;
break;
case FINGERPRINT_TEMPLATE_ENROLLING:
- arg1 = msg.data.enroll.id;
+ arg1 = msg.data.enroll.finger.fid;
arg2 = msg.data.enroll.samples_remaining;
- arg3 = msg.data.enroll.data_collected_bmp;
+ arg3 = 0;
break;
case FINGERPRINT_TEMPLATE_REMOVED:
- arg1 = msg.data.removed.id;
+ arg1 = msg.data.removed.finger.fid;
break;
default:
ALOGE("fingerprint: invalid msg: %d", msg.type);
@@ -99,7 +99,7 @@ static void nativeInit(JNIEnv *env, jobject clazz, jobject callbackObj) {
static jint nativeEnroll(JNIEnv* env, jobject clazz, jint timeout) {
ALOG(LOG_VERBOSE, LOG_TAG, "nativeEnroll()\n");
- int ret = gContext.device->enroll(gContext.device, timeout);
+ int ret = gContext.device->enroll(gContext.device, 0, timeout);
return reinterpret_cast<jint>(ret);
}
@@ -111,7 +111,10 @@ static jint nativeEnrollCancel(JNIEnv* env, jobject clazz) {
static jint nativeRemove(JNIEnv* env, jobject clazz, jint fingerprintId) {
ALOG(LOG_VERBOSE, LOG_TAG, "nativeRemove(%d)\n", fingerprintId);
- int ret = gContext.device->remove(gContext.device, fingerprintId);
+ fingerprint_finger_id_t finger;
+ finger.gid = 0;
+ finger.fid = fingerprintId;
+ int ret = gContext.device->remove(gContext.device, finger);
return reinterpret_cast<jint>(ret);
}
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index 8165ab6..f1b4b13 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -1777,8 +1777,8 @@
<string name="item_is_selected" msgid="949687401682476608">"არჩეულია <xliff:g id="ITEM">%1$s</xliff:g>"</string>
<string name="deleted_key" msgid="7659477886625566590">"<xliff:g id="KEY">%1$s</xliff:g> წაიშალა"</string>
<string name="managed_profile_label_badge" msgid="2355652472854327647">"სამსახური <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <string name="lock_to_app_toast" msgid="7570091317001980053">"მიმაგრების გასაუქმებლად ერთდროულად შეეხეთ და არ აუშვათ ღილაკებს „უკან“ და „გადახედვა“."</string>
- <string name="lock_to_app_toast_accessible" msgid="8239120109365070664">"ამ ეკრანისთვის მიმაგრების გასაუქმებლად შეეხეთ და არ აუშვათ ღილაკებს „გადახედვა“."</string>
+ <string name="lock_to_app_toast" msgid="7570091317001980053">"მიმაგრების გასაუქმებლად ერთდროულად შეეხეთ და არ აუშვათ ღილაკებს „უკან“ და „მიმოხილვა“."</string>
+ <string name="lock_to_app_toast_accessible" msgid="8239120109365070664">"ამ ეკრანისთვის მიმაგრების გასაუქმებლად, შეეხეთ და არ აუშვათ „მიმოხილვა“-ს."</string>
<string name="lock_to_app_toast_locked" msgid="8739004135132606329">"ეკრანი დაფიქსირებული. ფიქსაციის მოხსნა თქვენო ორგანიზაციის მიერ ნებადართული არ არის."</string>
<string name="lock_to_app_start" msgid="6643342070839862795">"ეკრანი დაფიქსირდა"</string>
<string name="lock_to_app_exit" msgid="8598219838213787430">"ეკრანს ფიქსაცია მოეხსნა"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index c9aa316..0fe8006 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -200,7 +200,7 @@
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Uçak modu AÇIK"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Uçak modu KAPALI"</string>
<string name="global_action_settings" msgid="1756531602592545966">"Ayarlar"</string>
- <string name="global_action_voice_assist" msgid="7751191495200504480">"Ses Yardımı"</string>
+ <string name="global_action_voice_assist" msgid="7751191495200504480">"Sesli Yardım"</string>
<string name="global_action_lockdown" msgid="8751542514724332873">"Şimdi kilitle"</string>
<string name="status_bar_notification_info_overflow" msgid="5301981741705354993">"999+"</string>
<string name="safeMode" msgid="2788228061547930246">"Güvenli mod"</string>
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index 80fad63..93f58cba 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -25,6 +25,7 @@
<color name="primary_material_light">#ffefefef</color>
<color name="primary_dark_material_dark">#ff000000</color>
<color name="primary_dark_material_light">#ff757575</color>
+ <color name="primary_dark_material_light_light_status_bar">#ffe0e0e0</color>
<!-- 26% white (foreground) -->
<color name="ripple_material_dark">#42ffffff</color>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 3ac7374..cfff420 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2632,5 +2632,6 @@
<public type="style" name="Theme.Material.DayNight.NoActionBar.Overscan" />
<public type="style" name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" />
<public type="style" name="Theme.Material.DayNight.Panel" />
+ <public type="style" name="Theme.Material.Light.LightStatusBar" />
</resources>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 701afee..0107356 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -754,6 +754,13 @@ please see themes_device_defaults.xml.
<item name="colorPrimary">@color/primary_material_dark</item>
</style>
+ <!-- Variant of the material (light) theme that has a light status bar background with dark
+ status bar contents. -->
+ <style name="Theme.Material.Light.LightStatusBar">
+ <item name="colorPrimaryDark">@color/primary_dark_material_light_light_status_bar</item>
+ <item name="windowHasLightStatusBar">true</item>
+ </style>
+
<style name="ThemeOverlay" />
<style name="ThemeOverlay.Material" />
diff --git a/docs/html/design/style/iconography.jd b/docs/html/design/style/iconography.jd
index d212b06..1a92753 100644
--- a/docs/html/design/style/iconography.jd
+++ b/docs/html/design/style/iconography.jd
@@ -516,23 +516,41 @@ application: </p>
<em>finished_asset</em>.png
drawable-xxhdpi/...
<em>finished_asset</em>.png
+
+ mipmap-ldpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-mdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-hdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-xhdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-xxhdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-xxxhdpi/...
+ <em>finished_launcher_asset</em>.png
</pre>
<p>For more information about how to save resources in the application project,
see <a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a>.
</p>
+<p> For more information about using the mipmap folders, see
+<a href="{@docRoot}tools/project/index.html#mipmap">Managing Projects Overview</a>.</p>
<h3 id="xxxhdpi-launcher">Provide an xxx-high-density launcher icon</h3>
-<p>Some devices scale-up the launcher icon by as much as 25%. For example, if your highest density
+<p>Some devices scale-up the launcher icon by as much as 25%. For example, if your highest density
launcher icon image is already extra-extra-high density, the scaling process will make it appear
-less crisp. So you should provide a higher density launcher icon in the <code>drawable-xxxhdpi
+less crisp. So you should provide a higher density launcher icon in the <code>mipmap-xxxhdpi
</code> directory, which the system uses instead of scaling up a smaller version of the icon.</p>
-<p class="note"><strong>Note:</strong> the <code>drawable-xxxhdpi</code> qualifier is necessary only
-to provide a launcher icon that can appear larger than usual on an xxhdpi device. You do not need to
-provide xxxhdpi assets for all your app's images.</p>
+<p class="note"><strong>Note:</strong> The <code>mipmap-xxxhdpi</code> qualifier is necessary
+only to provide a launcher icon that can appear larger than usual on an xxhdpi device. It is best
+practice to place all your launcher icons in the <code>res/mipmap-[density]/</code> folders. This
+enables your app to display launcher icons that have a higher density than the device, without
+scaling up a lower density version of the icon. You do not need to provide xxxhdpi assets for all
+your app's images.</p>
<p>See <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a> for
more information.</p>
diff --git a/docs/html/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd
index 052cf75..e3cacf9 100644
--- a/docs/html/google/play/billing/billing_integrate.jd
+++ b/docs/html/google/play/billing/billing_integrate.jd
@@ -232,7 +232,7 @@ startIntentSenderForResult(pendingIntent.getIntentSender(),
1001, new Intent(), Integer.valueOf(0), Integer.valueOf(0),
Integer.valueOf(0));
</pre>
-<p>Google Plays sends a response to your {@link android.app.PendingIntent} to the {@link android.app.Activity#onActivityResult onActivityResult} method of your application. The {@link android.app.Activity#onActivityResult onActivityResult} method will have a result code of {@code Activity.RESULT_OK} (1) or {@code Activity.RESULT_CANCELED} (0). To see the types of order information that is returned in the response {@link android.content.Intent}, see <a href="{@docRoot}google/play/billing/billing_reference.html#getBuyIntent">In-app Billing Reference</a>.</p>
+<p>Google Play sends a response to your {@link android.app.PendingIntent} to the {@link android.app.Activity#onActivityResult onActivityResult} method of your application. The {@link android.app.Activity#onActivityResult onActivityResult} method will have a result code of {@code Activity.RESULT_OK} (1) or {@code Activity.RESULT_CANCELED} (0). To see the types of order information that is returned in the response {@link android.content.Intent}, see <a href="{@docRoot}google/play/billing/billing_reference.html#getBuyIntent">In-app Billing Reference</a>.</p>
<p>The purchase data for the order is a String in JSON format that is mapped to the {@code INAPP_PURCHASE_DATA} key in the response {@link android.content.Intent}, for example:
<pre>
@@ -243,11 +243,19 @@ startIntentSenderForResult(pendingIntent.getIntentSender(),
"purchaseTime":1345678900000,
"purchaseState":0,
"developerPayload":"bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ",
- "purchaseToken":"rojeslcdyyiapnqcynkjyyjh"
+ "purchaseToken":<em>"opaque-token-up-to-1000-characters"</em>
}'
</pre>
</p>
+<p class="note"><strong>Note:</strong> Google Play generates a token for the
+purchase. This token is an opaque character sequence that may be up to 1,000
+characters long. Pass this entire token to other methods, such as when you
+consume the purchase, as described in
+<a href="{@docRoot}training/in-app-billing/purchase-iab-products.html#Consume">Consume
+a Purchase</a>. Do not abbreviate or truncate this token; you must save and
+return the entire token.</p>
+
<p>Continuing from the previous example, you get the response code, purchase data, and signature from the response {@link android.content.Intent}.</p>
<pre>
&#64;Override
diff --git a/docs/html/google/play/billing/billing_reference.jd b/docs/html/google/play/billing/billing_reference.jd
index 902c2c6..da9178d 100644
--- a/docs/html/google/play/billing/billing_reference.jd
+++ b/docs/html/google/play/billing/billing_reference.jd
@@ -202,7 +202,12 @@ RSASSA-PKCS1-v1_5 scheme.</td>
</tr>
<tr>
<td>{@code purchaseToken}</td>
- <td>A token that uniquely identifies a purchase for a given item and user pair. </td>
+ <td>A token that uniquely identifies a purchase for a given item and user
+ pair. This token may be up to 1,000 characters long.
+ Pass this entire token to other methods, such as when you consume the
+ purchase (as described in
+<a href="{@docRoot}training/in-app-billing/purchase-iab-products.html#Consume">Consume
+ a Purchase</a>). Do not abbreviate or truncate this token.</td>
</tr>
</table>
</p>
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index 7ebda53..7c963dd 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -1,5 +1,5 @@
page.title=Supporting Multiple Screens
-page.metaDescription=Nanaging UIs for the best display on multiple screen sizes.
+page.metaDescription=Managing UIs for the best display on multiple screen sizes.
meta.tags="multiple screens"
@jd:body
@@ -348,13 +348,13 @@ can use for density-specific resources are <code>ldpi</code> (low), <code>mdpi</
<code>hdpi</code> (high), <code>xhdpi</code> extra-high), <code>xxhdpi</code>
(extra-extra-high), and <code>xxxhdpi</code> (extra-extra-extra-high). For example, bitmaps
for high-density screens should go in {@code drawable-hdpi/}.</p>
- <p class="note" id="xxxhdpi-note"><strong>Note:</strong> the <code>drawable-xxxhdpi</code>
+ <p class="note" id="xxxhdpi-note"><strong>Note:</strong> The <code>mipmap-xxxhdpi</code>
qualifier is necessary only to provide a launcher icon that can appear larger than usual on an
xxhdpi device. You do not need to provide xxxhdpi assets for all your app's images.</p>
<p>Some devices scale-up the launcher icon by as much as 25%. For example, if your highest
density launcher icon image is already extra-extra-high-density, the scaling process will make it
appear less crisp. So you should provide a higher density launcher icon in the
-<code>drawable-xxxhdpi</code> directory, which the system uses instead of scaling up a smaller
+<code>mipmap-xxxhdpi</code> directory, which the system uses instead of scaling up a smaller
version of the icon.</p>
<p>See <a href="{@docRoot}design/style/iconography.html#xxxhdpi-launcher">Provide an
xxx-high-density launcher icon</a> for more information. You should not use the
@@ -362,6 +362,16 @@ xxx-high-density launcher icon</a> for more information. You should not use the
</li>
</ul>
+<p class="note"><strong>Note:</strong> Place all your launcher icons in the
+<code>res/mipmap-[density]/</code> folders, rather than the <code>res/drawable-[density]/</code>
+folders. The Android system retains the resources in these density-specific folders, such as
+mipmap-xxxhdpi, regardless of the screen resolution of the device where your app is installed. This
+behavior allows launcher apps to pick the best resolution icon for your app to display on the home
+screen. For more information about using the mipmap folders, see
+<a href="{@docRoot}tools/project/index.html#mipmap">Managing Projects Overview</a>.
+</p>
+
+
<p>The size and density configuration qualifiers correspond to the generalized sizes and densities
described in <a href="#range">Range of screens supported</a>, above.</p>
@@ -538,9 +548,9 @@ screen sizes (instead of using the size qualifiers in table 1).</p></p>
sizes and densities, see <a href="#range">Range of Screens Supported</a>, earlier in this
document.</p>
-<p>For example, the following is a list of resource directories in an application that
-provides different layout designs for different screen sizes and different bitmap drawables
-for medium, high, and extra-high-density screens.</p>
+<p>For example, the following application resource directories provide different layout designs
+for different screen sizes and different drawables. Use the <code>mipmap/</code> folders for
+launcher icons.</p>
<pre class="classic">
res/layout/my_layout.xml // layout for normal screen size ("default")
@@ -548,10 +558,16 @@ res/layout-large/my_layout.xml // layout for large screen size
res/layout-xlarge/my_layout.xml // layout for extra-large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra-large in landscape orientation
-res/drawable-mdpi/my_icon.png // bitmap for medium-density
-res/drawable-hdpi/my_icon.png // bitmap for high-density
-res/drawable-xhdpi/my_icon.png // bitmap for extra-high-density
-res/drawable-xxhdpi/my_icon.png // bitmap for extra-extra-high-density
+res/drawable-mdpi/graphic.png // bitmap for medium-density
+res/drawable-hdpi/graphic.png // bitmap for high-density
+res/drawable-xhdpi/graphic.png // bitmap for extra-high-density
+res/drawable-xxhdpi/graphic.png // bitmap for extra-extra-high-density
+
+res/mipmap-mdpi/my_icon.png // launcher icon for medium-density
+res/mipmap-hdpi/my_icon.png // launcher icon for high-density
+res/mipmap-xhdpi/my_icon.png // launcher icon for extra-high-density
+res/mipmap-xxhdpi/my_icon.png // launcher icon for extra-extra-high-density
+res/mipmap-xxxhdpi/my_icon.png // launcher icon for extra-extra-extra-high-density
</pre>
<p>For more information about how to use alternative resources and a complete list of
@@ -560,7 +576,7 @@ configuration qualifiers (not just for screen configurations), see
Providing Alternative Resources</a>.</p>
<p>Be aware that, when the Android system picks which resources to use at runtime, it uses
-certain logic to determing the "best matching" resources. That is, the qualifiers you use don't
+certain logic to determine the "best matching" resources. That is, the qualifiers you use don't
have to exactly match the current screen configuration in all cases in order for the system to
use them. Specifically, when selecting resources based on the size qualifiers, the system will
use resources designed for a screen smaller than the current screen if there are no resources
@@ -703,10 +719,10 @@ such, you can now specify that these layout resources should be used only when t
smallest width your layout supports once it's complete.</p>
<p class="note"><strong>Note:</strong> Remember that all the figures used with these new size APIs
-are density-indpendent pixel (dp) values and your layout dimensions should also always be defined
+are density-independent pixel (dp) values and your layout dimensions should also always be defined
using dp units, because what you care about is the amount of screen space available after the system
accounts for screen density (as opposed to using raw pixel resolution). For more information about
-density-indpendent pixels, read <a href="#terms">Terms and concepts</a>, earlier in this
+density-independent pixels, read <a href="#terms">Terms and concepts</a>, earlier in this
document.</p>
@@ -728,7 +744,7 @@ Also beware that the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action B
a part of your application's window space, although your layout does not declare it, so it reduces
the space available for your layout and you must account for it in your design.</p>
-<p class="table-caption"><strong>Table 2.</strong> New configuration qualifers for screen size
+<p class="table-caption"><strong>Table 2.</strong> New configuration qualifiers for screen size
(introduced in Android 3.2).</p>
<table>
<tr><th>Screen configuration</th><th>Qualifier values</th><th>Description</th></tr>
@@ -745,7 +761,7 @@ height and width (you may also think of it as the "smallest possible width" for
use this qualifier to ensure that, regardless of the screen's current orientation, your
application's has at least {@code &lt;N&gt;} dps of width available for its UI.</p>
<p>For example, if your layout requires that its smallest dimension of screen area be at
-least 600 dp at all times, then you can use this qualifer to create the layout resources, {@code
+least 600 dp at all times, then you can use this qualifier to create the layout resources, {@code
res/layout-sw600dp/}. The system will use these resources only when the smallest dimension of
available screen is at least 600dp, regardless of whether the 600dp side is the user-perceived
height or width. The smallestWidth is a fixed screen size characteristic of the device; <strong>the
@@ -851,7 +867,7 @@ res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
</pre>
-<p>Notice that the previous two sets of example resources use the "smallest width" qualifer, {@code
+<p>Notice that the previous two sets of example resources use the "smallest width" qualifier, {@code
sw&lt;N&gt;dp}, which specifies the smallest of the screen's two sides, regardless of the
device's current orientation. Thus, using {@code sw&lt;N&gt;dp} is a simple way to specify the
overall screen size available for your layout by ignoring the screen's orientation.</p>
@@ -1392,4 +1408,4 @@ between 0.1 and 3 that represents the desired scaling factor.</p>
<p>For more information about creating AVDs from the command line, see <a
href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from the
-Command Line</a>.</p> \ No newline at end of file
+Command Line</a>.</p>
diff --git a/docs/html/guide/topics/media/exoplayer.jd b/docs/html/guide/topics/media/exoplayer.jd
index 17b4669..1e8601f 100644
--- a/docs/html/guide/topics/media/exoplayer.jd
+++ b/docs/html/guide/topics/media/exoplayer.jd
@@ -72,10 +72,8 @@ page.tags="audio","video","adaptive","streaming","DASH","smoothstreaming"
<ul>
<li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/library">
ExoPlayer Library</a> &mdash; This part of the project contains the core library classes.</li>
- <li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/demo/src/main/java/com/google/android/exoplayer/demo/simple">
- Simple Demo</a> &mdash; This part of the app demonstrates a basic use of ExoPlayer.</li>
- <li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/demo/src/main/java/com/google/android/exoplayer/demo/full">
- Full Demo</a> &mdash; This part of the app demonstrates more advanced features,
+ <li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/demo">
+ Demo App</a> &mdash; This part of the project demonstrates usage of ExoPlayer,
including the ability to select between multiple audio tracks, a background audio mode,
event logging and DRM protected playback. </li>
</ul>
@@ -137,9 +135,10 @@ player.setPlayWhenReady(true);
player.release(); // Don’t forget to release when done!
</pre>
-<p>For a complete example, see the {@code SimplePlayerActivity} in the ExoPlayer demo app, which
- correctly manages an ExoPlayer instance with respect to both the {@link android.app.Activity} and
- {@link android.view.Surface} lifecycles.</p>
+<p>For a complete example, see {@code PlayerActivity} and {@code DemoPlayer} in the ExoPlayer demo
+ app. Between them these classes correctly manage an ExoPlayer instance with respect to both the
+ {@link android.app.Activity} and {@link android.view.Surface} lifecycles.
+</p>
<h2 id="samplesource">SampleSource</h2>
@@ -187,7 +186,7 @@ MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
</pre>
<p>The ExoPlayer demo app provides a complete implementation of this code in
- {@code DefaultRendererBuilder}. The {@code SimplePlaybackActivity} class uses it to play one
+ {@code DefaultRendererBuilder}. The {@code PlayerActivity} class uses it to play one
of the videos available in the demo app. Note that in the example, video and audio
are muxed, meaning they are streamed together from a single URI. The {@code FrameworkSampleSource}
instance provides video samples to the {@code videoRenderer} object and audio samples to the
@@ -211,9 +210,9 @@ MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
which loads chunks of media data from which individual samples can be extracted. Each {@code
ChunkSampleSource} requires a {@code ChunkSource} object to be injected through its constructor,
which is responsible for providing media chunks from which to load and read samples. The {@code
- DashMp4ChunkSource} and {@code SmoothStreamingChunkSource} classes provide DASH and SmoothStreaming
- playback using the FMP4 container format. The {@code DashWebMChunkSource} class uses the WebM
- container format to provide DASH playback.</p>
+ DashChunkSource} class provides DASH playback using the FMP4 and WebM container formats. The
+ {@code SmoothStreamingChunkSource} class provides SmoothStreaming playback using the FMP4
+ container format.</p>
<p>All of the standard {@code ChunkSource} implementations require a {@code FormatEvaluator} and
a {@code DataSource} to be injected through their constructors. The {@code FormatEvaluator}
@@ -242,7 +241,7 @@ BandwidthMeter bandwidthMeter = new BandwidthMeter();
// Build the video renderer.
DataSource videoDataSource = new HttpDataSource(userAgent,
HttpDataSource.REJECT_PAYWALL_TYPES, bandwidthMeter);
-ChunkSource videoChunkSource = new DashMp4ChunkSource(videoDataSource,
+ChunkSource videoChunkSource = new DashChunkSource(videoDataSource,
new AdaptiveEvaluator(bandwidthMeter), videoRepresentations);
ChunkSampleSource videoSampleSource = new ChunkSampleSource(videoChunkSource,
loadControl, VIDEO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
@@ -253,7 +252,7 @@ MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(
// Build the audio renderer.
DataSource audioDataSource = new HttpDataSource(userAgent,
HttpDataSource.REJECT_PAYWALL_TYPES, bandwidthMeter);
-ChunkSource audioChunkSource = new DashMp4ChunkSource(audioDataSource,
+ChunkSource audioChunkSource = new DashChunkSource(audioDataSource,
new FormatEvaluator.FixedEvaluator(), audioRepresentation);
SampleSource audioSampleSource = new ChunkSampleSource(audioChunkSource,
loadControl, AUDIO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
@@ -273,9 +272,8 @@ MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
</p>
<p>The ExoPlayer demo app provides complete implementation of this code in
- {@code DashVodRendererBuilder}. The {@code SimplePlaybackActivity} class uses this builder to
- construct renderers for playing DASH sample videos in the demo app. It asynchronously fetches a
- specified MPD file in order to construct the required {@code Representation} objects. For an
+ {@code DashRendererBuilder}. The {@code PlayerActivity} class uses this builder to
+ construct renderers for playing DASH sample videos in the demo app. For an
equivalent SmoothStreaming example, see the {@code SmoothStreamingRendererBuilder} class in the
demo app.</p>
@@ -313,7 +311,7 @@ if (format.width * format.height &lt;= maxDecodableFrameSize) {
}
</pre>
-<p>This approach is used to filter {@code Representations} in the {@code DashVodRendererBuilder}
+<p>This approach is used to filter {@code Representations} in the {@code DashRendererBuilder}
class of the ExoPlayer demo app, and similarly to filter track indices in {@code
SmoothStreamingRendererBuilder}.</p>
@@ -372,24 +370,26 @@ boolean isAdaptive = MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_H264).adaptiv
<p>In addition to high level listeners, many of the individual components provided by the
ExoPlayer library allow their own event listeners. For example, {@code
MediaCodecVideoTrackRenderer} has constructors that take a {@code
- MediaCodecVideoTrackRenderer.EventListener}. In the ExoPlayer demo app, {@code SimplePlayerActivity}
- acts as a listener so that it can adjust the dimensions of the target surface to have the correct
- height and width ratio for the video being played:</p>
+ MediaCodecVideoTrackRenderer.EventListener}. In the ExoPlayer demo app, {@code DemoPlayer}
+ acts as the listener to multiple individual components, forwarding events to {@code PlayerActivity}.
+ This approach allows {@code PlayerActivity} to adjust the dimensions of the target surface
+ to have the correct height and width ratio for the video being played:</p>
<pre>
&#64;Override
-public void onVideoSizeChanged(int width, int height) {
- surfaceView.setVideoWidthHeightRatio(height == 0 ? 1 : (float) width / height);
+public void onVideoSizeChanged(int width, int height, float pixelWidthAspectRatio) {
+ surfaceView.setVideoWidthHeightRatio(
+ height == 0 ? 1 : (width * pixelWidthAspectRatio) / height);
}
</pre>
-<p>The {@code RendererBuilder} classes in the ExoPlayer demo app inject the activity as the
- listener, for example in the {@code DashVodRendererBuilder} class:</p>
+<p>The {@code RendererBuilder} classes in the ExoPlayer demo app inject the {@code DemoPlayer} as
+ the listener to each component, for example in the {@code DashRendererBuilder} class:</p>
<pre>
MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(
- videoSampleSource, null, true, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT,
- 0, <strong>mainHandler, playerActivity</strong>, 50);
+ sampleSource, null, true, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT, 5000,
+ null, <strong>player.getMainHandler(), player</strong>, 50);
</pre>
<p>Note that you must pass a {@link android.os.Handler} object to the renderer, which determines
@@ -441,9 +441,7 @@ player.blockingSendMessage(videoRenderer,
<p>You must use a blocking message because the contract of {@link
android.view.SurfaceHolder.Callback#surfaceDestroyed surfaceDestroyed()} requires that the
- app does not attempt to access the surface after the method returns. The {@code
- SimplePlayerActivity} class in the demo app demonstrates how the surface should be set and
- cleared.</p>
+ app does not attempt to access the surface after the method returns.</p>
<h2 id="customizing">Customizing ExoPlayer</h2>
diff --git a/docs/html/guide/topics/resources/available-resources.jd b/docs/html/guide/topics/resources/available-resources.jd
index 19babee..db1bf8d 100644
--- a/docs/html/guide/topics/resources/available-resources.jd
+++ b/docs/html/guide/topics/resources/available-resources.jd
@@ -29,6 +29,7 @@ Saved in {@code res/color/} and accessed from the {@code R.color} class.</dd>
<dt><a href="{@docRoot}guide/topics/resources/drawable-resource.html">Drawable Resources</a></dt>
<dd>Define various graphics with bitmaps or XML.<br/>
Saved in {@code res/drawable/} and accessed from the {@code R.drawable} class.</dd>
+
<dt><a href="{@docRoot}guide/topics/resources/layout-resource.html">Layout Resource</a></dt>
<dd>Define the layout for your application UI.<br/>
Saved in {@code res/layout/} and accessed from the {@code R.layout} class.</dd>
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 6d9527f..98e7c96 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -60,18 +60,24 @@ MyProject/
MyActivity.java </span>
res/
drawable/ <span style="color:black">
- icon.png </span>
+ graphic.png </span>
layout/ <span style="color:black">
main.xml
info.xml</span>
+ mipmap/ <span style="color:black">
+ icon.png </span>
values/ <span style="color:black">
strings.xml </span>
</pre>
<p>As you can see in this example, the {@code res/} directory contains all the resources (in
-subdirectories): an image resource, two layout resources, and a string resource file. The resource
+subdirectories): an image resource, two layout resources, {@code mipmap/} directories for launcher
+icons, and a string resource file. The resource
directory names are important and are described in table 1.</p>
+<p class="note"><strong>Note:</strong> For more information about using the mipmap folders, see
+<a href="{@docRoot}tools/project/index.html#mipmap">Managing Projects Overview</a>.</p>
+
<p class="table-caption" id="table1"><strong>Table 1.</strong> Resource directories
supported inside project {@code res/} directory.</p>
@@ -104,6 +110,7 @@ State List Resource</a></td>
<tr>
<td><code>drawable/</code></td>
+
<td><p>Bitmap files ({@code .png}, {@code .9.png}, {@code .jpg}, {@code .gif}) or XML files that
are compiled into the following drawable resource subtypes:</p>
<ul>
@@ -119,6 +126,13 @@ are compiled into the following drawable resource subtypes:</p>
</tr>
<tr>
+ <td><code>mipmap/</code></td>
+ <td>Drawable files for different launcher icon densities. For more information on managing
+ launcher icons with {@code mipmap/} folders, see
+ <a href="{@docRoot}tools/project/index.html#mipmap">Managing Projects Overview</a>.</td>
+ </tr>
+
+ <tr>
<td><code>layout/</code></td>
<td>XML files that define a user interface layout.
See <a href="layout-resource.html">Layout Resource</a>.</td>
diff --git a/docs/html/images/exoplayer/adaptive-streaming.png b/docs/html/images/exoplayer/adaptive-streaming.png
index 9fc650c..50eee70 100644
--- a/docs/html/images/exoplayer/adaptive-streaming.png
+++ b/docs/html/images/exoplayer/adaptive-streaming.png
Binary files differ
diff --git a/docs/html/images/tools/projectview-p1.png b/docs/html/images/tools/projectview-p1.png
new file mode 100644
index 0000000..f5fae63
--- /dev/null
+++ b/docs/html/images/tools/projectview-p1.png
Binary files differ
diff --git a/docs/html/images/tools/projectview-p2.png b/docs/html/images/tools/projectview-p2.png
new file mode 100644
index 0000000..9e52540
--- /dev/null
+++ b/docs/html/images/tools/projectview-p2.png
Binary files differ
diff --git a/docs/html/images/tools/studio-mipmap-folders.png b/docs/html/images/tools/studio-mipmap-folders.png
new file mode 100644
index 0000000..3e99180
--- /dev/null
+++ b/docs/html/images/tools/studio-mipmap-folders.png
Binary files differ
diff --git a/docs/html/images/tools/studio-project-layout.png b/docs/html/images/tools/studio-project-layout.png
index 880c233..7339c3f 100644
--- a/docs/html/images/tools/studio-project-layout.png
+++ b/docs/html/images/tools/studio-project-layout.png
Binary files differ
diff --git a/docs/html/sdk/installing/adding-packages.jd b/docs/html/sdk/installing/adding-packages.jd
index b8d8925..58a8065 100644
--- a/docs/html/sdk/installing/adding-packages.jd
+++ b/docs/html/sdk/installing/adding-packages.jd
@@ -72,7 +72,7 @@ style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
<li>Windows: Double-click the <code>SDK Manager.exe</code> file at the root of the Android
SDK directory.</li>
<li>Mac/Linux: Open a terminal and navigate to the <code>tools/</code> directory in the
- Android SDK, then execute <code>android sdk</code>.</li>
+ location where the Android SDK was installed, then execute <code>android sdk</code>.</li>
</ul>
</li>
</ul>
diff --git a/docs/html/sdk/installing/create-project.jd b/docs/html/sdk/installing/create-project.jd
index 5082537..68fd572 100644
--- a/docs/html/sdk/installing/create-project.jd
+++ b/docs/html/sdk/installing/create-project.jd
@@ -71,7 +71,7 @@ of your project.</p>
<h3 id="Step2SelectFormFactor">Step 2: Select Form Factors and API Level</h2>
<p>The next window lets you select the form factors supported by your app, such as phone, tablet,
-TV, Wear, and Google Glass. The selected form factors become the application modules witin the
+TV, Wear, and Google Glass. The selected form factors become the application modules within the
project. For each form factor, you can also select the API Level for that app. To get more information,
click <strong>Help me choose</strong>.</p>
@@ -220,7 +220,7 @@ with complete source files for each of them as shown in figure 6.</p>
along with the other modules. </p>
<p> You can easily change an existing application module to a library module by changing the
- plugin assignment in the <strong>build.gradle</strong> file to <em>com.android.libary</em>.</p>
+ plugin assignment in the <strong>build.gradle</strong> file to <em>com.android.library</em>.</p>
<pre>
apply plugin: 'com.android.application'
@@ -287,7 +287,7 @@ file will override any shared library resources declared in the manifest file.</
<ol>
<li>Make sure that both the module library and the application module that depends on it are
- in your proejct. If one of the modules is missing, import it into your project.</li>
+ in your project. If one of the modules is missing, import it into your project.</li>
<li>In the project view, right-click the dependent module and select
<strong>Open</strong> > <strong>Module Settings</strong>.</li>
@@ -359,39 +359,38 @@ Android project view:</p>
per resource type.</li>
</ul>
-<div style="float:right;margin-left:30px;width:240px">
-<img src="{@docRoot}images/tools/projectview01.png" alt="" width="220" height="264"/>
-<p class="img-caption"><strong>Figure 9:</strong> Show the Android project view.</p>
-</div>
-<h2 id="enable-view">Enable and use the Android Project View</h2>
+<h2 id="enable-view">Use the Android Project View</h2>
-<p>The Android project view is not yet enabled by default. To show the Android project view,
-click <strong>Project</strong> and select <strong>Android</strong>, as shown in figure 9.</p>
-
-<p>The Android project view shows all the build files at the top level of the project hierarchy
-under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the top
-level of the project hierarchy and contains these three elements at the top level:</p>
+<p>The <em>Android</em> project view is enabled by default and shows all the build files at
+the top level of the project hierarchy under <strong>Gradle Scripts</strong>. The project module
+appears as a folder at the top level of the project hierarchy and contains these three elements
+at the top level:</p>
<ul>
-<li><code>java/</code> - Source files for the module.</li>
<li><code>manifests/</code> - Manifest files for the module.</li>
+<li><code>java/</code> - Source files for the module.</li>
<li><code>res/</code> - Resource files for the module.</li>
</ul>
-<p>Figure 10 shows how the Android project view groups all the instances of the
+<p>Notice how the Android project view groups all instances of the
<code>ic_launcher.png</code> resource for different screen densities under the same element.</p>
<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you
work with Android projects by providing a flattened structure that highlights the most commonly
used files while developing Android applications. However, the project structure on disk differs
-from this representation.</p>
+from this representation and maintains the traditional project structure.</p>
+
+<img src="{@docRoot}images/tools/projectview-p1.png" alt="" style="width:240px" "/>
+&nbsp;&nbsp;&nbsp;
+<img src="{@docRoot}images/tools/projectview-p2.png" alt="" style="width:240px" " />
+<p class="img-caption"><strong>Figure 10:</strong> Android and Traditional project view </p>
+
+
+
+
-<img src="{@docRoot}images/tools/projectview03.png" alt=""
- style="margin-top:10px" width="650" height="508"/>
-<p class="img-caption"><strong>Figure 10:</strong> The traditional project view (left) and the
-Android project view (right).</p>
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
index ee3bd95..d899ef3 100644
--- a/docs/html/sdk/installing/index.jd
+++ b/docs/html/sdk/installing/index.jd
@@ -121,7 +121,12 @@ where they are installed. For example:</p>
<p>You may want to add {@code android-studio/bin/} to your PATH environmental
variable so that you can start Android Studio from any directory.</p>
</li>
- <li>Follow the setup wizard to install any necessary SDK tools.</li>
+ <li>If the SDK is not already installed, follow the setup wizard to install the SDK and any
+ necessary SDK tools.
+ <p class="note"><strong>Note:</strong> You may also need to install the ia32-libs,
+ lib32ncurses5-dev, and lib32stc++6 packages. These packages are required to support 32-bit apps
+ on a 64-bit machine. </p>
+ </li>
</ol>
</div><!-- end linux -->
diff --git a/docs/html/tools/help/sdk-manager.jd b/docs/html/tools/help/sdk-manager.jd
index b084237..0c77395 100644
--- a/docs/html/tools/help/sdk-manager.jd
+++ b/docs/html/tools/help/sdk-manager.jd
@@ -16,7 +16,7 @@ your environment.</p>
<li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
SDK directory.</li>
<li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
-Android SDK, then execute <code>android sdk</code>.</li>
+location where the Android SDK is installed, then execute <code>android sdk</code>.</li>
</ul>
<p>You can select which packages you want to download by toggling the checkboxes on the left, then
diff --git a/docs/html/tools/projects/index.jd b/docs/html/tools/projects/index.jd
index 5f4f2cc..8665479 100644
--- a/docs/html/tools/projects/index.jd
+++ b/docs/html/tools/projects/index.jd
@@ -1,4 +1,6 @@
page.title=Managing Projects Overview
+meta.tags="project, mipmap"
+page.tags="project", "mipmap"
@jd:body
<div id="qv-wrapper">
@@ -8,7 +10,9 @@ page.title=Managing Projects Overview
<ol>
<li><a href="#ProjectFiles">Android Project Files</a></li>
<li><a href="#ApplicationModules">Android Application Modules</a></li>
-
+ <ol>
+ <li><a href="#mipmap">Managing Launcher Icons as mipmap Resources</a></li>
+ </ol>
<li><a href="#LibraryModules">Library Modules</a>
<ol>
<li><a href="#considerations">Development considerations</a></li>
@@ -230,7 +234,18 @@ project and override similar module file settings.</p>
focused). See the <a href=
"{@docRoot}guide/topics/resources/drawable-resource.html">Drawable</a> resource type.</dd>
- <dt><code>layout/</code></dt>
+
+ <dt><code>mipmap/</code></dt>
+
+ <dd>For app launcher icons. The Android system retains the resources in this folder
+ (and density-specific folders such as mipmap-xxxhdpi) regardless of the screen resolution
+ of the device where your app is installed. This behavior allows launcher apps to pick
+ the best resolution icon for your app to display on the home screen. For more information
+ about using the <code>mipmap</code> folders, see
+ <a href="#mipmap">Managing Launcher Icons as mipmap Resources</a>. </p>
+
+
+ <dt><code>layout/</code></dt>
<dd>XML files that are compiled into screen layouts (or part of a screen). See the <a href=
"{@docRoot}guide/topics/resources/layout-resource.html">Layout</a> resource type.</dd>
@@ -304,6 +319,46 @@ project and override similar module file settings.</p>
+<h2 id="mipmap">Managing Launcher Icons as mipmap Resources</h2>
+
+<p>Different home screen launcher apps on different devices show app launcher icons at various
+resolutions. When app resource optimization techniques remove resources for unused
+screen densities, launcher icons can wind up looking fuzzy because the launcher app has to upscale
+a lower-resolution icon for display. To avoid these display issues, apps should use the
+<code>mipmap/</code> resource folders for launcher icons. The Android system
+preserves these resources regardless of density stripping, and ensures that launcher apps can
+pick icons with the best resolution for display. </p>
+
+<p>Make sure launcher apps show a high-resolution icon for your app by moving all densities of your
+launcher icons to density-specific <code>res/mipmap/</code> folders
+(for example <code>res/mipmap-mdpi/</code> and <code>res/mipmap-xxxhdpi/</code>). The
+<code>mipmap/</code> folders replace the <code>drawable/</code> folders for launcher icons. For
+xxhpdi launcher icons, be sure to add the higher resolution xxxhdpi versions of the
+icons to enhance the visual experience of the icons on higher resolution devices.</p>
+
+<p class="note"><strong>Note:</strong> Even if you build a single APK for all devices, it is still
+best practice to move your launcher icons to the <code>mipmap/</code> folders.</p>
+
+
+<h3>Manifest update</h3>
+
+<p>When you move your launcher icons to the <code>mipmap-[density]</code> folders, change the
+launcher icon references in the <code>AndroidManifest.xml</code> file so your manifest references
+the <code>mipmap/</code> location. This example changes the manifest file to reference the
+<code>ic_launcher</code> icon in the <code>mipmap/</code> folder. </p>
+
+<pre>
+...
+&lt;application android:name="ApplicationTitle"
+ android:label="@string/app_label"
+ android:icon="@mipmap/ic_launcher" &gt;
+ ...
+</pre>
+
+
+
+
+
<h2 id="LibraryModules">Library Module</h2>
<div class="sidebox-wrapper">
diff --git a/docs/html/tools/revisions/gradle-plugin.jd b/docs/html/tools/revisions/gradle-plugin.jd
new file mode 100644
index 0000000..23170e1
--- /dev/null
+++ b/docs/html/tools/revisions/gradle-plugin.jd
@@ -0,0 +1,153 @@
+page.title=Android Plugin for Gradle Release Notes
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a></li>
+ <li><a href="{@docRoot}tools/building/plugin-for-gradle.html">Android Plugin for Gradle</a></li>
+ </ol>
+
+</div>
+</div>
+
+
+<p>The Android build system uses the Android Plugin for Gradle to support building Android
+applications with the <a href="http://www.gradle.org/">Gradle</a> build toolkit. The plugin runs
+independent of Android Studio so the plugin and the Gradle build system can be updated
+independently of Android Studio.</p>
+
+<p class="note"><strong>Note:</strong> When you update Android Studio or open a project in a
+previous version of Android Studio, Android Studio prompts you to automatically update the plugin
+and Gradle to the latest available versions. You can choose to accept these updates based
+on your project's build requirements. </p>
+
+
+<h2 id="revisions">Revisions</h2>
+
+<p>The sections below provide notes about successive releases of
+the Android Plugin for Gradle, as denoted by revision number. To determine what revision of the
+plugin you are using, check the version declaration in the project-level
+<strong>build.gradle</strong> file. </p>
+
+<p>For a summary of known issues in Android Plugin for Gradle, see <a
+href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
+
+
+<div class="toggle-content opened">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+ alt=""/>Android Plugin for Gradle, Revision 1.1</a> <em>(February 2015)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+
+ <dl>
+ <dt>Dependencies:</dt>
+
+ <dd>
+ <ul>
+ <li>Gradle 2.2.1 or higher.</li>
+ <li>Build Tools 21.1.1 or higher.</li>
+ </ul>
+ </dd>
+
+ <dt>General Notes:</dt>
+ <dd>
+ <ul>
+ <li>Fixed issue with Gradle build failure when accessing the
+ <code>extractReleaseAnnotations</code> module.
+ (<a href="http://b.android.com/81638">Issue 81638</a>).</li>
+ <li>Fixed debugging issue when displaying method input parameters at breakpoints.
+ (<a href="http://b.android.com/82031">Issue 82031</a>).</li>
+ <li>Fixed manifest merger issues when importing libraries with a <code>targetSdkVersion</code>
+ less than 16.</li>
+ <li>Fixed density ordering issue when using Android Studio with JDK 8.</li>
+ </ul>
+ </dd>
+ </div>
+</div>
+
+
+
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>Android Plugin for Gradle, Revision 1.0</a> <em>(December 2014)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+
+ <dl>
+ <dt>Dependencies:</dt>
+
+ <dd>
+ <ul>
+ <li>Gradle 2.2.1 or higher.</li>
+ <li>Build Tools 21.1.1 or higher.</li>
+ </ul>
+ </dd>
+
+ <dt>General Notes:</dt>
+ <dd>
+ <ul>
+ <li>Initial plugin release.</li>
+ </ul>
+ </dd>
+ </div>
+</div>
+
+
+
+
+<h2>Updating the Android Plugin for Gradle Version</h2>
+<p>The Android Plugin for Gradle version is specified in the
+<strong>File &gt; Project Structure</strong> menu or the project-level
+<code>build.gradle</code> file. The plugin version applies to all modules built in that
+Android Studio project. This example updates the Android Plugin for Gradle to version 1.1:
+<pre>
+...
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.1'
+ }
+...
+</pre>
+
+
+<p class="caution"><strong>Caution:</strong> You should not use dynamic dependencies (+) in
+version numbers. Using this feature can cause unexpected version updates and difficulty
+resolving version differences.
+</p>
+
+<p>If you're building with Gradle but using not Android Studio, the build process downloads the
+latest Android Plugin for Gradle plugin when it runs. </p>
+
+
+
+<h2>Updating the Gradle Version </h2>
+
+<p>Android Studio requires Gradle version 2.2.1 or later. To view and
+update the Gradle version, edit the Gradle distribution reference in the
+<code>gradle/wrapper/gradle-wrapper.properties</code> file. This example shows the
+Android Plugin for Gradle version set to 2.2.1.</p>
+
+<pre>
+...
+distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
+...
+</pre>
+
+
+
+
+<p>For more details about the supported Android Plugin for Gradle properties and syntax, click
+the link to the
+<a href="{@docRoot}tools/building/plugin-for-gradle.html">Plugin Language Reference</a>.</p>
+
+
+
+
+
diff --git a/docs/html/tools/revisions/studio.jd b/docs/html/tools/revisions/studio.jd
index 3806933..af25d9c 100644
--- a/docs/html/tools/revisions/studio.jd
+++ b/docs/html/tools/revisions/studio.jd
@@ -29,7 +29,7 @@ everything you need to begin developing Android apps:</p>
<p>For an introduction to Android Studio, read the
<a href="{@docRoot}tools/studio/index.html">Android Studio</a> guide.</p>
-<p>Periodic updates are pushed to Android Studio without requiring you to update from here. To
+<p>Periodic updates are pushed to Android Studio without requiring you to update. To
manually check for updates, select <strong>Help > Check for updates</strong> (on Mac, select
<strong>Android Studio > Check for updates</strong>).</p>
@@ -43,6 +43,33 @@ Android Studio, as denoted by revision number. </p>
<div class="toggle-content opened">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+ alt=""/>Android Studio v1.1</a> <em>(February 2015)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+ <p>Various fixes and enhancements:</p>
+ <ul>
+ <li>Added support for the <a href="{@docRoot}design/wear/index.html">Android Wear</a> watch
+ template. </li>
+ <li>Modified new project and module creation to include
+ <a href="{@docRoot}tools/projects/index.html#mipmap"><code>res/mipmap</code></a> folders for
+ density-specific launcher icons. These <code>res/mipmap</code> folders replace the
+ <a href="{@docRoot}guide/topics/resources/drawable-resource.html"><code>res/drawable</code></a>
+ folders for launcher icons. </li>
+ <li>Updated launcher icons to have a
+ <a href="{@docRoot}design/material/index.html">Material Design</a> look and added an
+ <code>xxxhdpi</code> launcher icon. </li>
+ <li>Added and enhanced <a href="{@docRoot}tools/help/lint.html"><code>lint</code></a> checks
+ for region and language combinations, launcher icons, resource names, and other common
+ code problems.</li>
+ <li>Added support for Best Current Practice (BCP) language tag 47. </li>
+ </div>
+</div>
+
+
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt=""/>Android Studio v1.0.1</a> <em>(December 2014)</em>
</p>
diff --git a/docs/html/tools/studio/index.jd b/docs/html/tools/studio/index.jd
index 9f24008..26fe3cd 100644
--- a/docs/html/tools/studio/index.jd
+++ b/docs/html/tools/studio/index.jd
@@ -10,6 +10,7 @@ page.title=Android Studio Overview
<li><a href="#build-system">Android Build System</a></li>
<li><a href="#debug-perf">Debug and Performance</a></li>
<li><a href="#install-updates">Installation, Setup, and Update Management</a></li>
+ <li><a href="#proxy">HTTP Proxy Settings</a></li>
<li><a href="#other">Other Highlights</a></li>
@@ -64,8 +65,8 @@ Studio</a>.</p>
<h3 id="project-view"><em>Android</em> Project View</h3>
<p>By default, Android Studio displays your profile files in the <em>Android</em> project view. This
view shows a flattened version of your project's structure that provides quick access to the key
-source files of Android projects and helps you work with the new
-<a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>.
+source files of Android projects and helps you work with the
+<a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>.
The Android project view:</p>
<ul>
@@ -101,7 +102,7 @@ the <strong>Project</strong drop-down. </p>
-<h3>New Project and Directory Structure</h3>
+<h3>Android Studio Project and Directory Structure</h3>
<p>When you use the <em>Project</em> view of a new project in Android Studio, you
should notice that the project structure appears different than you may be used to in Eclipse. Each
instance of Android Studio contains a project with one or more application modules. Each
@@ -119,6 +120,7 @@ specification and the files under {@code src/androidTest} directory for test cas
<a href="{@docRoot}tools/projects/index.html">Managing Projects</a>.</p>
+
<h3>Creating new files</h3>
<p>You can quickly add new code and resource files by clicking the appropriate directory in the
<strong>Project</strong> pane and pressing <code>ALT + INSERT</code> on Windows and Linux or
@@ -249,23 +251,15 @@ memory the connected device is using. With your app running on a device or emula
<strong>Memory Monitor</strong> tab in the lower right corner to launch the memory monitor. </p>
<img src="{@docRoot}images/tools/studio-memory-monitor.png" />
- <p class="img-caption"><strong>Figure 4.</strong> Memory Monitor</p>
+ <p class="img-caption"><strong>Figure 5.</strong> Memory Monitor</p>
-<h3> New Lint inspections</h3>
-<p>Lint has several new checks to ensure:
-<ul>
- <li><code> Cipher.getInstance()</code> is used with safe values</li>
- <li>In custom Views, the associated declare-styleable for the custom view uses the same
- base name as the class name.</li>
- <li>Security check for fragment injection.</li>
- <li>Where ever property assignment no longer works as expected.</li>
- <li>Gradle plugin version is compatible with the SDK.</li>
- <li>Right to left validation </li>
- <li>Required API version</li>
- <li>many others</li>
-</ul>
+<h3> Lint inspections</h3>
+<p>The Android {@code lint} tool is a static code analysis tool that checks your Android project
+source files for potential bugs and optimization improvements. Choose the <strong>Analyze &gt;
+Inspect Code</strong> to manually run the inspections. The {@code lint} settings icon in the
+Inspection display provides a complete list of the current inspections.</p>
<p>Hovering over a Lint error displays the full issue explanation inline for easy error
resolution. There is also a helpful hyperlink at the end of the error message for additional
@@ -294,17 +288,17 @@ build.gradle file. </p>
<p>Android Studio allows you to work with layouts in both a <em>Design View</em> </p>
<p><img src="{@docRoot}images/tools/studio-helloworld-design.png" alt="" />
</p>
- <p class="img-caption"><strong>Figure 5.</strong> Hello World App with Design View</p>
+ <p class="img-caption"><strong>Figure 6.</strong> Hello World App with Design View</p>
<p>and a <em>Text View</em>. </p>
<p><img src="{@docRoot}images/tools/studio-helloworld-text.png" alt="" />
- <pclass="img-caption"><strong>Figure 6.</strong> Hello World App with Text View</p>
+ <pclass="img-caption"><strong>Figure 7.</strong> Hello World App with Text View</p>
<p>Easily select and preview layout changes for different device images, display
densities, UI modes, locales, and Android versions (multi-API version rendering).
<p><img src="{@docRoot}images/tools/studio-api-version-rendering.png" /></p>
- <p class="img-caption"><strong>Figure 7.</strong> API Version Rendering</p>
+ <p class="img-caption"><strong>Figure 8.</strong> API Version Rendering</p>
<p>From the Design View, you can drag and drop elements from the Palette to the Preview or
@@ -341,18 +335,18 @@ the wizard updates your system image and emulation requirements, such GPU, and t
an optimized default Android Virtual Device (AVD) based on Android 5 (Lollipop) for speedy and
reliable emulation. </p>
<p><img src="{@docRoot}images/tools/studio-setup-wizard.png" /></p>
-<p class="img-caption"><strong>Figure 8.</strong> Setup Wizard</p>
+<p class="img-caption"><strong>Figure 9.</strong> Setup Wizard</p>
<h3>Expanded template and form factor support</h3>
-<p>Android Studio supports new templates for Google Services and expands the available device
+<p>Android Studio supports templates for Google Services and expands the available device
types. </p>
<h4> Android Wear and TV support</h4>
<p>For easy cross-platform development, the Project Wizard provides new templates for
creating your apps for Android Wear and TV. </p>
<p><img src="{@docRoot}images/tools/studio-tvwearsupport.png" />
- <p class="img-caption"><strong>Figure 9.</strong> New Form Factors</p>
+ <p class="img-caption"><strong>Figure 10.</strong> Supported Form Factors</p>
<p>During app creation, the Project Wizard also displays an API Level dialog to help you choose
the best <em>minSdkVersion</em> for your project.</p>
@@ -362,7 +356,7 @@ types. </p>
and create a cloud end-point is as easy as selecting <em>File > New Module > App Engine Java
Servlet Module</em> and specifying the module, package, and client names. </p>
<p><img src="{@docRoot}images/tools/studio-cloudmodule.png" /></p>
- <p class="img-caption"><strong>Figure 10.</strong> Setup Wizard</p>
+ <p class="img-caption"><strong>Figure 11.</strong> Setup Wizard</p>
@@ -386,6 +380,120 @@ code-level preference:
+<h2 id="proxy">Proxy Settings</h2>
+<p>Proxies serve as intermediary connection points between HTTP clients and web servers that add
+security and privacy to internet connections.</p>
+
+<p>To support running Android Studio behind a firewall, set the proxy settings for the
+Android Studio IDE and the SDK Manager. Use the Android Studio IDE HTTP Proxy settings page to set
+the HTTP proxy settings for Android Studio. The SDK Manager has a separate HTTP Proxy settings
+page.</p>
+
+<p>When running the Android Plugin for Gradle from the command line or on machines where
+Android Studio is not installed, such as continuous integration servers, set the proxy settings
+in the Gradle build file.</p>
+
+<p class="note"><strong>Note:</strong> After the initial installation of the Android Studio bundle,
+Android Studio can run with internet access or off-line. However, Android Studio requires an
+internet connection for Setup Wizard synchronization, 3rd-party library access, access to remote
+repositories, Gradle initialization and synchronization, and Android Studio version updates.</p>
+
+
+<h3>Setting up the Android Studio Proxy</h3>
+<p>Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or
+secure network. To set the HTTP proxy settings in Android Studio:</p>
+<ol>
+ <li>From the main menu choose <strong>File &gt; Settings &gt; IDE Setting -- HTTP Proxy</strong>.
+
+<li>In Android Studio, open the IDE Settings dialog.
+ <ul>
+ <li>On Windows and Linux, choose
+ <strong>File &gt; Settings &gt; IDE Setting -- HTTP Proxy</strong>. </li>
+ <li>On Mac, choose
+ <strong>Android Studio &gt; Preferences &gt; IDE Setting -- HTTP Proxy</strong>. </li>
+ </ul>
+ The HTTP Proxy page appears.</li>
+ <li>Select <strong>auto-detection</strong> to use an auto-configuration URL to configure the
+ proxy settings or <strong>manual</strong> to enter each of the settings. For a detailed explanation
+ of these settings, see
+ <a href="https://www.jetbrains.com/idea/help/http-proxy.html">HTTP Proxy</a>. </li>
+ <li>Click <strong>Apply</strong> to enable the proxy settings. </li>
+</ol>
+
+<h3>Android Plugin for Gradle HTTP proxy settings</h3>
+When running the Android Plugin from the command line or on machines where Android Studio is not
+installed, set the Android Plugin for Gradle proxy settings in the Gradle build file.</p>
+
+<p>For application-specific HTTP proxy settings, set the proxy settings in the
+<strong>build.gradle</strong> file as required for each application module.</p>
+<pre>
+apply plugin: 'com.android.application'
+
+android {
+ ...
+
+ defaultConfig {
+ ...
+ systemProp.http.proxyHost=proxy.company.com
+ systemProp.http.proxyPort=443
+ systemProp.http.proxyUser=userid
+ systemProp.http.proxyPassword=password
+ systemProp.http.auth.ntlm.domain=domain
+ }
+ ...
+}
+</pre>
+
+
+
+<p>For project-wide HTTP proxy settings, set the proxy settings in the
+<code>gradle/gradle.properties</code> file. </p>
+
+<pre>
+# Project-wide Gradle settings.
+...
+
+systemProp.http.proxyHost=proxy.company.com
+systemProp.http.proxyPort=443
+systemProp.http.proxyUser=username
+systemProp.http.proxyPassword=password
+systemProp.http.auth.ntlm.domain=domain
+
+systemProp.https.proxyHost=proxy.company.com
+systemProp.https.proxyPort=443
+systemProp.https.proxyUser=username
+systemProp.https.proxyPassword=password
+systemProp.https.auth.ntlm.domain=domain
+
+...
+</pre>
+
+
+<p>For information about using Gradle properties for proxy settings, see the
+ <a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Gradle User Guide</a>.</p>
+
+<p class="note"><strong>Note:</strong> When using Android Studio, the settings in the Android
+Studio IDE HTTP proxy settings page override the HTTP proxy settings in the
+<strong>gradle.properties</strong> file.</p>
+
+
+
+<h3>SDK Manager HTTP Proxy Settings </h3>
+<p>SDK Manager proxy settings enable proxy internet access for Android package and library
+updates from SDK Manager packages. </p>
+
+<p>To set the SDK Manager settings for proxy internet access, start the SDK Manager and open the
+SDK Manager page. </p>
+
+<ul>
+ <li>On Windows, select <strong>Tools &gt; Options</strong> from the menu bar. </li>
+ <li>On Mac and Linux, choose <strong>Tools &gt; Options</strong> from the system menu bar. </li>
+ </ul>
+
+<p>The Android SDK Manager page appears. Enter the settings and click <strong>Apply</strong>. </p>
+
+
+
<h2 id="other">Other Highlights</h2>
<h3> Translation Editor</h3>
@@ -399,14 +507,14 @@ into your project. </p>
<strong>Open Editor</strong> link. </p>
<img src="{@docRoot}images/tools/studio-translationeditoropen.png" />
- <p class="img-caption"><strong>Figure 11.</strong> Translation Editor</p>
+ <p class="img-caption"><strong>Figure 12.</strong> Translation Editor</p>
<h3> Editor support for the latest Android APIs</h3>
-<p>Android Studio supports the new
+<p>Android Studio supports the
<a href="{@docRoot}design/material/index.html">Material Design</a></li> themes, widgets, and
graphics, such as shadow layers and API version rendering (showing the layout across different
-UI versions). Also, the new drawable XML tags and attributes, such as &lt;ripple&gt;
+UI versions). Also, the drawable XML tags and attributes, such as &lt;ripple&gt;
and &lt;animated-selector&gt;, are supported.</p>
@@ -414,9 +522,9 @@ and &lt;animated-selector&gt;, are supported.</p>
<p>Clicking <strong>Import Samples</strong> from the <strong>File</strong> menu or Welcome page
provides seamless access to Google code samples on GitHub.</p>
<p><img src="{@docRoot}images/tools/studio-samples-githubaccess.png" /></p>
- <p class="img-caption"><strong>Figure 12.</strong> Code Sample Access</p>
+ <p class="img-caption"><strong>Figure 13.</strong> Code Sample Access</p>
<p><img src="{@docRoot}images/tools/studio-sample-in-editor.png" /></p>
- <p class="img-caption"><strong>Figure 13.</strong> Imported Code Sample</p>
+ <p class="img-caption"><strong>Figure 14.</strong> Imported Code Sample</p>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index 073e81c..fa6328e 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -249,6 +249,9 @@ class="en">Support Library</span></a></div>
<li><a href="<?cs var:toroot ?>tools/revisions/build-tools.html">
<span class="en">SDK Build Tools</span>
</a></li>
+ <li><a href="<?cs var:toroot ?>tools/revisions/gradle-plugin.html">
+ <span class="en">Android Plugin for Gradle</span>
+ </a></li>
<li><a href="<?cs var:toroot ?>tools/revisions/platforms.html">
<span class="en">SDK Platforms</span></a></li>
<li><a href="<?cs var:toroot ?>tools/sdk/eclipse-adt.html">
diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd
index 71b93c0..79268a0 100644
--- a/docs/html/training/basics/firstapp/creating-project.jd
+++ b/docs/html/training/basics/firstapp/creating-project.jd
@@ -103,10 +103,13 @@ lesson.</p>
Activities</a> for more information.</p>
</div>
</div>
- <li>Under <strong>Add an activity to your project</strong>, select <strong>Blank Activity</strong>
- and click <strong>Next</strong>.</li>
- <li>Under <strong>Describe the new activity for your project</strong>, leave the fields as they
- are and click <strong>Finish</strong>.</li>
+ <li>Under <strong>Add an activity to &lt;<em>template</em>&gt;</strong>, select <strong>Blank
+ Activity</strong> and click <strong>Next</strong>.</li>
+ <li>Under <strong>Choose options for your new file</strong>, change the
+ <strong>Activity Name</strong> to <em>MyActivity</em>. The <strong>Layout Name</strong> changes
+ to <em>activity_my</em>, and the <strong>Title</strong> to <em>MyActivity</em>. The
+ <strong>Menu Resource Name</strong> is <em>menu_my</em>.
+ <li>Click the <strong>Finish</strong> button to create the project.</li>
</ol>
<p>Your Android project is now a basic "Hello World" app that contains some default files. Take a
@@ -123,7 +126,7 @@ moment to review the most important of these:</p>
select the file you see the class definition for the activity you created. When you build and
run the app, the {@link android.app.Activity} class starts the activity and loads the layout file
that says "Hello World!"</dd>
- <dt><code>app/src/res/AndroidManifest.xml</code></dt>
+ <dt><code>app/src/main/AndroidManifest.xml</code></dt>
<dd>The <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest file</a> describes
the fundamental characteristics of the app and defines each of its components. You'll revisit
this file as you follow these lessons and add more components to your app.</dd>
@@ -159,13 +162,16 @@ moment to review the most important of these:</p>
<p>Note also the <code>/res</code> subdirectories that contain the
<a href="{@docRoot}guide/topics/resources/overview.html">resources</a> for your application:</p>
<dl>
- <dt><code>drawable-hdpi/</code></dt>
- <dd>Directory for drawable objects (such as bitmaps) that are designed for high-density
- (hdpi) screens. Other drawable directories contain assets designed for other screen densities.
+ <dt><code>drawable<em>&lt;density&gt;</em>/</code></dt>
+ <dd>Directories for drawable objects (such as bitmaps) that are designed for various densities,
+ such as medium-density (mdpi) and high-density (hdpi) screens. Other drawable directories
+ contain assets designed for other screen densities.
Here you'll find the ic_launcher.png that appears when you run the default app.</dd>
<dt><code>layout/</code></dt>
<dd>Directory for files that define your app's user interface like activity_my.xml,
discussed above, which describes a basic layout for the MyActivity class.</dd>
+ <dt><code>menu/</code></dt>
+ <dd>Directory for files that define your app's menu items.</dd>
<dt><code>values/</code></dt>
<dd>Directory for other XML files that contain a collection of resources, such as
string and color definitions. The strings.xml file defines the "Hello world!" string that
@@ -180,9 +186,9 @@ moment to review the most important of these:</p>
using the SDK tools from a command line:</p>
<ol>
- <li>Change directories into the Android SDK’s <code>tools/</code> path.</li>
+ <li>Change directories into the Android SDK’s <code>sdk/</code> path.</li>
<li>Execute:
-<pre class="no-pretty-print">android list targets</pre>
+<pre class="no-pretty-print">tools/android list targets</pre>
<p>This prints a list of the available Android platforms that you’ve downloaded for your SDK. Find
the platform against which you want to compile your app. Make a note of the target ID. We
recommend that you select the highest version possible. You can still build your app to
@@ -212,4 +218,3 @@ To run the app, continue to the <a href="running-app.html">next lesson</a>.</p>
-
diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd
index c09669f..fdf0d1f 100644
--- a/docs/html/training/basics/firstapp/running-app.jd
+++ b/docs/html/training/basics/firstapp/running-app.jd
@@ -83,14 +83,37 @@ from the toolbar.</li>
<h3>Run the app from a command line</h3>
-<ol>
- <li>Change directories to the root of your Android project and execute:
-<pre class="no-pretty-print">ant debug</pre></li>
- <li>Make sure the Android SDK <code>platform-tools/</code> directory is included in your
-<code>PATH</code> environment variable, then execute:
-<pre class="no-pretty-print">adb install bin/MyFirstApp-debug.apk</pre></li>
- <li>On your device, locate <em>MyFirstApp</em> and open it.</li>
-</ol>
+<p>Open a command-line and navigate to the root of your project directory.
+ Use Gradle to build your project in debug mode, invoke the <code>assembleDebug</code> build task
+ using the Gradle wrapper script (<code>gradlew assembleRelease</code>).
+
+ <p>This creates your debug <code>.apk</code> file inside the module <code>build/</code>
+ directory, named <code>MyFirstApp-debug.apk</code>. </p>
+
+ <p>On Windows platforms, type this command:</p>
+
+<pre>
+> gradlew.bat assembleDebug
+</pre>
+
+<p>On Mac OS and Linux platforms, type these commands:</p>
+
+<pre>
+$ chmod +x gradlew
+$ ./gradlew assembleDebug
+</pre>
+
+ <p>After you build the project, the output APK for the app module is located in
+ <code>app/build/outputs/apk/</code>
+
+ <p class="note"><strong>Note:</strong> The first command (<code>chmod</code>) adds the execution
+ permission to the Gradle wrapper script and is only necessary the first time you build this
+ project from the command line.</p>
+
+ <p>Make sure the Android SDK <code>platform-tools/</code> directory is included in your
+ <code>PATH</code> environment variable, then execute:
+ <pre class="no-pretty-print">adb install app/build/outputs/MyFirstApp-debug.apk</pre><p>
+ <p>On your device, locate <em>MyFirstApp</em> and open it.</p>
<p>That's how you build and run your Android app on a device!
To start developing, continue to the <a href="building-ui.html">next
@@ -114,12 +137,29 @@ device.</p>
<ol>
<li>Launch the Android Virtual Device Manager:
<ul>
- <li>In the Android Studio tool bar, click the Android Virtual Device Manager icon
- <img src="{@docRoot}images/tools/avd-manager-studio.png"
- style="vertical-align:baseline;margin:0; max-height:1em" />.</li>
- <li>From the command line, change directories to <code>&lt;sdk>/tools/</code> and execute:
- <pre class="no-pretty-print">android avd</pre></li>
+ <li>In Android Studio, select <strong>Tools &gt; Android &gt; AVD Manager</strong>, or click
+ the AVD Manager icon <img src="{@docRoot}images/tools/avd-manager-studio.png" style="vertical-align:bottom;margin:0;height:19px"> in the toolbar.</li>
+ <li>Or, from the command line, change directories to
+ <code>sdk/</code> and execute:
+ <pre class="no-pretty-print">tools/android avd</pre>
+ <p class="note"><strong>Note:</strong> The AVD Manager that appears
+ when launched from the command line is different from the version in
+ Android Studio, so the following instructions may not all apply.</p>
+ </li>
</ul>
+
+ <img src="{@docRoot}images/studio-avdmgr-firstscreen.png" alt=""
+ style="margin-top:1em">
+ <p class="img-caption"><strong>Figure 1.</strong> The AVD Manager main screen shows your current virtual devices.</p>
+
+ </li>
+ <li>On the AVD Manager main screen (figure 1), click <strong>Create Virtual Device</strong>.</li>
+ <li>In the Select Hardware window, select a device configuration, such as Nexus 6,
+ then click <strong>Next</strong>.
+ </li>
+ <li>Select the desired system version for the AVD and click <strong>Next</strong>.
+ </li>
+ <li>Verify the configuration settings, then click <strong>Finish</strong>.
</li>
<li>In the <strong>Android Virtual Device Manager</strong> window, click <strong>Create</strong>.</li>
<li>Enter an <strong>AVD Name</strong>.</li>
@@ -137,40 +177,33 @@ device.</p>
<h3>Run the app from Android Studio</h3>
<ol>
<li>In <strong>Android Studio</strong>, select your project and click <strong>Run</strong>
- <img src="{@docRoot}images/tools/as-run.png" style="vertical-align:baseline;margin:0; max-height:1em" />
- from the toolbar.</li>
+ <img src="{@docRoot}images/tools/as-run.png" style="vertical-align:baseline;margin:0; max-height:1em" /> from the toolbar.</li>
<li>In the <strong>Choose Device</strong> window, click the <strong>Launch emulator</strong> radio
button.</li>
<li>From the <strong>Android virtual device</strong> pull-down menu, select the emulator
you created, and click <strong>OK</strong>.</li>
</ol>
<p>It can take a few minutes for the emulator to load itself. You may have to unlock the screen.
- When you do, My First App appears on the emulator screen.</p>
+When you do, <em>My First App</em> appears on the emulator screen.</p>
<h3>Run your app from the command line</h3>
-
-<ol>
- <li>Change directories to the root of your Android project and execute:
- <pre class="no-pretty-print">ant debug</pre></li>
+ <ol>
+ <li>Build the project from the command line. The output APK for the app module is located in
+ <code>app/build/outputs/apk/</code>.</li>
<li>Make sure the Android SDK <code>platform-tools/</code> directory is included in your
- <code>PATH</code> environment variable, then execute:
- <pre class="no-pretty-print">adb install bin/MyFirstApp-debug.apk</pre></li>
+ <code>PATH</code> environment variable.</li>
+ <li>Execute this command:
+ <p>
+ <pre class="no-pretty-print">adb install app/build/outputs/MyFirstApp-debug.apk</pre>
+ </p>
+ </li>
<li>On the emulator, locate <em>MyFirstApp</em> and open it.</li>
-</ol>
+ </ol>
-<p>That's how you build and run your Android app on the emulator!
+ <p>That's how you build and run your Android app on the emulator!
To start developing, continue to the <a href="building-ui.html">next
-lesson</a>.</p>
-
-
-
-
-
-
-
-
-
+ lesson</a>.</p>
diff --git a/docs/html/training/basics/fragments/support-lib.jd b/docs/html/training/basics/fragments/support-lib.jd
deleted file mode 100644
index a1d781b..0000000
--- a/docs/html/training/basics/fragments/support-lib.jd
+++ /dev/null
@@ -1,83 +0,0 @@
-page.title=Using the Support Library
-page.tags=support library
-helpoutsWidget=true
-
-trainingnavtop=true
-
-@jd:body
-
-<div id="tb-wrapper">
- <div id="tb">
- <h2>This lesson teaches you to</h2>
- <ol>
- <li><a href="#Setup">Set Up Your Project with the Support Library</a></li>
- <li><a href="#Apis">Import the Support Library APIs</a></li>
- </ol>
- <h2>You should also read</h2>
- <ul>
- <li><a href="{@docRoot}tools/support-library/index.html">Support Library</a></li>
- </ul>
- </div>
-</div>
-
-<p>The Android <a href="{@docRoot}tools/support-library/index.html">Support Library</a> provides a JAR
-file with an API library that allows you to use some of the more recent Android APIs in your app
-while running on earlier versions of Android. For instance, the Support Library provides a version
-of the {@link android.app.Fragment} APIs that you can use on Android 1.6 (API level 4) and
-higher.</p>
-
-<p>This lesson shows how to set up your app to use the Support Library in order to use fragments
-to build a dynamic app UI.</p>
-
-
-<h2 id="Setup">Set Up Your Project with the Support Library</h2>
-
-<div class="figure" style="width:527px">
-<img src="{@docRoot}images/training/basics/sdk-manager.png" alt="" />
-<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager with the
-Android Support package selected.</p>
-</div>
-
-<p>To set up your project:</p>
-
-<ol>
- <li>Download the Android Support package using the SDK Manager.</li>
-
- <li>Create a <code>libs</code> directory at the top level of your Android project.</li>
- <li>Locate the JAR file for the library you want to use and copy it into the <code>libs/</code>
-directory.
-<p>For example, the library that supports API level 4 and up is located at
-<code>&lt;sdk>/extras/android/support/v4/android-support-v4.jar</code>.</p></li>
- <li>Update your manifest file to set the minimum API level to <code>4</code> and the target
-API level to the latest release:
- <pre>&lt;uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" /></pre>
- </li>
-</ol>
-
-
-<h2 id="Apis">Import the Support Library APIs</h2>
-
-<p>The Support Library includes a variety of APIs that were either added in recent versions of
-Android or don't exist in the platform at all and merely provide additional support to you when
-developing specific application features.</p>
-
-<p>You can find all the API reference documentation for the Support Library in the
-platform docs at {@link android.support.v4.app android.support.v4.*}.</p>
-
-<div class="warning"><p><strong>Warning:</strong> To be sure that you don't accidentally use new
-APIs on an older system version, be certain that you import the {@link
-android.support.v4.app.Fragment} class and related APIs from the {@link android.support.v4.app}
-package:</p>
-<pre>
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-...
-</pre>
-</div>
-
-
-<p>When creating an activity that hosts fragments while using the Support Library, you must also
-extend the {@link android.support.v4.app.FragmentActivity} class instead of the traditional {@link
-android.app.Activity} class. You'll see sample code for the fragment and activity in the next
-lesson.</p>
-
diff --git a/docs/html/training/multiscreen/screendensities.jd b/docs/html/training/multiscreen/screendensities.jd
index fcb65cc..1fc5904 100644
--- a/docs/html/training/multiscreen/screendensities.jd
+++ b/docs/html/training/multiscreen/screendensities.jd
@@ -28,6 +28,7 @@ next.link=adaptui.html
<ul>
<li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
+ <li><a href="{@docRoot}design/style/iconography.html">Iconography</a></li>
<li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Icon Design
Guidelines</a></li>
</ul>
@@ -133,6 +134,28 @@ MyProject/
<p>Then, any time you reference <code>&#64;drawable/awesomeimage</code>, the system selects the
appropriate bitmap based on the screen's dpi.</p>
+<p>Place your launcher icons in the <code>mipmap/</code> folders. </p>
+
+<pre>res/...
+ mipmap-ldpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-mdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-hdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-xhdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-xxhdpi/...
+ <em>finished_launcher_asset</em>.png
+ mipmap-xxxhdpi/...
+ <em>finished_launcher_asset</em>.png
+</pre>
+
+<p class="note"><strong>Note:</strong> You should place all launcher icons in the
+<code>res/mipmap-[density]/</code> folders, rather than <code>drawable/</code> folders to ensure
+launcher apps use the best resolution icon. For more information about using the mipmap folders, see
+<a href="{@docRoot}tools/project/index.html#mipmap">Managing Projects Overview</a>.</p>
+
<p>For more tips and guidelines for creating icon assets for your application, see the <a
href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Icon Design
Guidelines</a>.</p>
diff --git a/libs/hwui/FloatColor.h b/libs/hwui/FloatColor.h
index 803b9d4..97dec88 100644
--- a/libs/hwui/FloatColor.h
+++ b/libs/hwui/FloatColor.h
@@ -18,10 +18,26 @@
#include "utils/Macros.h"
+#include <stdint.h>
+
namespace android {
namespace uirenderer {
struct FloatColor {
+ void set(uint32_t color) {
+ a = ((color >> 24) & 0xff) / 255.0f;
+ r = a * ((color >> 16) & 0xff) / 255.0f;
+ g = a * ((color >> 8) & 0xff) / 255.0f;
+ b = a * ((color ) & 0xff) / 255.0f;
+ }
+
+ bool isNotBlack() {
+ return a < 1.0f
+ || r > 0.0f
+ || g > 0.0f
+ || b > 0.0f;
+ }
+
float r;
float g;
float b;
diff --git a/libs/hwui/Glop.h b/libs/hwui/Glop.h
index 10dbd5c..6eca468 100644
--- a/libs/hwui/Glop.h
+++ b/libs/hwui/Glop.h
@@ -19,7 +19,9 @@
#include "FloatColor.h"
#include "Matrix.h"
+#include "Program.h"
#include "Rect.h"
+#include "SkiaShader.h"
#include "utils/Macros.h"
#include <GLES2/gl2.h>
@@ -31,6 +33,7 @@ namespace uirenderer {
class Program;
class RoundRectClipState;
+class Texture;
/*
* Enumerates optional vertex attributes
@@ -89,11 +92,6 @@ struct Glop {
bool colorEnabled;
FloatColor color;
- /* TODO
- union shader {
- //...
- }; TODO
- */
ProgramDescription::ColorFilterMode filterMode;
union Filter {
struct Matrix {
@@ -102,6 +100,8 @@ struct Glop {
} matrix;
FloatColor color;
} filter;
+
+ SkiaShaderData skiaShaderData;
} fill;
struct Transform {
diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp
index 91e0f89..f133d42 100644
--- a/libs/hwui/GlopBuilder.cpp
+++ b/libs/hwui/GlopBuilder.cpp
@@ -39,7 +39,7 @@ namespace uirenderer {
LOG_ALWAYS_FATAL_IF((mStageFlags & (requiredFlags)) != (requiredFlags), \
"not prepared for current stage")
-static void setUnitQuadTextureCoords(Rect uvs, TextureVertex* quadVertex) {;
+static void setUnitQuadTextureCoords(Rect uvs, TextureVertex* quadVertex) {
TextureVertex::setUV(quadVertex++, uvs.left, uvs.top);
TextureVertex::setUV(quadVertex++, uvs.right, uvs.top);
TextureVertex::setUV(quadVertex++, uvs.left, uvs.bottom);
@@ -49,6 +49,7 @@ static void setUnitQuadTextureCoords(Rect uvs, TextureVertex* quadVertex) {;
GlopBuilder::GlopBuilder(RenderState& renderState, Caches& caches, Glop* outGlop)
: mRenderState(renderState)
, mCaches(caches)
+ , mShader(nullptr)
, mOutGlop(outGlop) {
mStageFlags = kInitialStage;
}
@@ -192,12 +193,7 @@ void GlopBuilder::setFill(int color, float alphaScale, SkXfermode::Mode mode,
}
}
}
-
- if (shader) {
- SkiaShader::describe(&mCaches, mDescription, mCaches.extensions(), *shader);
- // TODO: store shader data
- LOG_ALWAYS_FATAL("shaders not yet supported");
- }
+ mShader = shader; // shader resolved in ::build()
if (colorFilter) {
SkColor color;
@@ -275,10 +271,7 @@ GlopBuilder& GlopBuilder::setFillTexturePaint(Texture& texture, bool isAlphaMask
}
if (isAlphaMaskTexture) {
- mDescription.modulate = mOutGlop->fill.color.a < 1.0f
- || mOutGlop->fill.color.r > 0.0f
- || mOutGlop->fill.color.g > 0.0f
- || mOutGlop->fill.color.b > 0.0f;
+ mDescription.modulate = mOutGlop->fill.color.isNotBlack();
} else {
mDescription.modulate = mOutGlop->fill.color.a < 1.0f;
}
@@ -299,27 +292,74 @@ GlopBuilder& GlopBuilder::setFillPaint(const SkPaint& paint, float alphaScale) {
return *this;
}
-GlopBuilder& GlopBuilder::setFillPathTexturePaint(Texture& texture,
+GlopBuilder& GlopBuilder::setFillPathTexturePaint(PathTexture& texture,
const SkPaint& paint, float alphaScale) {
TRIGGER_STAGE(kFillStage);
REQUIRE_STAGES(kMeshStage);
mOutGlop->fill.texture = &texture;
- //specify invalid, since these are always static for path textures
+ //specify invalid, since these are always static for PathTextures
mOutGlop->fill.textureFilter = GL_INVALID_ENUM;
mOutGlop->fill.textureClamp = GL_INVALID_ENUM;
setFill(paint.getColor(), alphaScale, PaintUtils::getXfermode(paint.getXfermode()),
paint.getShader(), paint.getColorFilter());
- mDescription.modulate = mOutGlop->fill.color.a < 1.0f
- || mOutGlop->fill.color.r > 0.0f
- || mOutGlop->fill.color.g > 0.0f
- || mOutGlop->fill.color.b > 0.0f;
+ mDescription.modulate = mOutGlop->fill.color.isNotBlack();
+ return *this;
+}
+
+GlopBuilder& GlopBuilder::setFillShadowTexturePaint(ShadowTexture& texture, int shadowColor,
+ const SkPaint& paint, float alphaScale) {
+ TRIGGER_STAGE(kFillStage);
+ REQUIRE_STAGES(kMeshStage);
+
+ mOutGlop->fill.texture = &texture;
+
+ //specify invalid, since these are always static for ShadowTextures
+ mOutGlop->fill.textureFilter = GL_INVALID_ENUM;
+ mOutGlop->fill.textureClamp = GL_INVALID_ENUM;
+
+ const int ALPHA_BITMASK = SK_ColorBLACK;
+ const int COLOR_BITMASK = ~ALPHA_BITMASK;
+ if ((shadowColor & ALPHA_BITMASK) == ALPHA_BITMASK) {
+ // shadow color is fully opaque: override its alpha with that of paint
+ shadowColor &= paint.getColor() | COLOR_BITMASK;
+ }
+
+ setFill(shadowColor, alphaScale, PaintUtils::getXfermode(paint.getXfermode()),
+ paint.getShader(), paint.getColorFilter());
+
+ mDescription.modulate = mOutGlop->fill.color.isNotBlack();
+ return *this;
+}
+
+GlopBuilder& GlopBuilder::setFillBlack() {
+ TRIGGER_STAGE(kFillStage);
+ REQUIRE_STAGES(kMeshStage);
+
+ mOutGlop->fill.texture = nullptr;
+ mOutGlop->fill.textureFilter = GL_INVALID_ENUM;
+ mOutGlop->fill.textureClamp = GL_INVALID_ENUM;
+
+ setFill(SK_ColorBLACK, 1.0f, SkXfermode::kSrcOver_Mode, nullptr, nullptr);
+
return *this;
}
+GlopBuilder& GlopBuilder::setFillClear() {
+ TRIGGER_STAGE(kFillStage);
+ REQUIRE_STAGES(kMeshStage);
+
+ mOutGlop->fill.texture = nullptr;
+ mOutGlop->fill.textureFilter = GL_INVALID_ENUM;
+ mOutGlop->fill.textureClamp = GL_INVALID_ENUM;
+
+ setFill(SK_ColorBLACK, 1.0f, SkXfermode::kClear_Mode, nullptr, nullptr);
+
+ return *this;
+}
////////////////////////////////////////////////////////////////////////////////
// Transform
////////////////////////////////////////////////////////////////////////////////
@@ -394,6 +434,11 @@ GlopBuilder& GlopBuilder::setRoundRectClipState(const RoundRectClipState* roundR
void GlopBuilder::build() {
REQUIRE_STAGES(kAllStages);
+ // serialize shader info into ShaderData
+ GLuint textureUnit = mOutGlop->fill.texture ? 1 : 0;
+ SkiaShader::store(mCaches, mShader, mOutGlop->transform.modelView,
+ &textureUnit, &mDescription, &(mOutGlop->fill.skiaShaderData));
+
mOutGlop->fill.program = mCaches.programCache.get(mDescription);
mOutGlop->transform.canvas.mapRect(mOutGlop->bounds);
diff --git a/libs/hwui/GlopBuilder.h b/libs/hwui/GlopBuilder.h
index d724041..546e6c5 100644
--- a/libs/hwui/GlopBuilder.h
+++ b/libs/hwui/GlopBuilder.h
@@ -21,16 +21,17 @@
#include "utils/Macros.h"
class SkPaint;
+class SkShader;
namespace android {
namespace uirenderer {
class Caches;
-struct Glop;
class Matrix4;
class RenderState;
class Texture;
class VertexBuffer;
+struct Glop;
class GlopBuilder {
PREVENT_COPY_AND_ASSIGN(GlopBuilder);
@@ -45,8 +46,12 @@ public:
GlopBuilder& setFillPaint(const SkPaint& paint, float alphaScale);
GlopBuilder& setFillTexturePaint(Texture& texture, bool isAlphaMaskTexture,
const SkPaint* paint, float alphaScale);
- GlopBuilder& setFillPathTexturePaint(Texture& texture,
+ GlopBuilder& setFillPathTexturePaint(PathTexture& texture,
+ const SkPaint& paint, float alphaScale);
+ GlopBuilder& setFillShadowTexturePaint(ShadowTexture& texture, int shadowColor,
const SkPaint& paint, float alphaScale);
+ GlopBuilder& setFillBlack();
+ GlopBuilder& setFillClear();
GlopBuilder& setTransformClip(const Matrix4& ortho, const Matrix4& transform, bool fudgingOffset);
@@ -74,6 +79,7 @@ private:
ProgramDescription mDescription;
RenderState& mRenderState;
Caches& mCaches;
+ const SkShader* mShader;
Glop* mOutGlop;
};
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index a00a2bc..3f79cef 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -63,20 +63,6 @@ namespace android {
namespace uirenderer {
///////////////////////////////////////////////////////////////////////////////
-// Globals
-///////////////////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Functions
-///////////////////////////////////////////////////////////////////////////////
-
-template<typename T>
-static inline T min(T a, T b) {
- return a < b ? a : b;
-}
-
-///////////////////////////////////////////////////////////////////////////////
// Constructors/destructor
///////////////////////////////////////////////////////////////////////////////
@@ -1199,7 +1185,7 @@ void OpenGLRenderer::dirtyLayerUnchecked(Rect& bounds, Region* region) {
void OpenGLRenderer::issueIndexedQuadDraw(Vertex* mesh, GLsizei quadsCount) {
GLsizei elementsCount = quadsCount * 6;
while (elementsCount > 0) {
- GLsizei drawCount = min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6);
+ GLsizei drawCount = MathUtils::min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6);
setupDrawIndexedVertices(&mesh[0].x);
glDrawElements(GL_TRIANGLES, drawCount, GL_UNSIGNED_SHORT, nullptr);
@@ -1212,8 +1198,8 @@ void OpenGLRenderer::issueIndexedQuadDraw(Vertex* mesh, GLsizei quadsCount) {
}
void OpenGLRenderer::clearLayerRegions() {
- const size_t count = mLayers.size();
- if (count == 0) return;
+ const size_t quadCount = mLayers.size();
+ if (quadCount == 0) return;
if (!mState.currentlyIgnored()) {
EVENT_LOGD("clearLayerRegions");
@@ -1226,10 +1212,10 @@ void OpenGLRenderer::clearLayerRegions() {
// is likely different so we need to disable clipping here
bool scissorChanged = mRenderState.scissor().setEnabled(false);
- Vertex mesh[count * 4];
+ Vertex mesh[quadCount * 4];
Vertex* vertex = mesh;
- for (uint32_t i = 0; i < count; i++) {
+ for (uint32_t i = 0; i < quadCount; i++) {
const Rect& bounds = mLayers[i];
Vertex::set(vertex++, bounds.left, bounds.top);
@@ -1242,18 +1228,30 @@ void OpenGLRenderer::clearLayerRegions() {
// the same thing again
mLayers.clear();
- SkPaint clearPaint;
- clearPaint.setXfermodeMode(SkXfermode::kClear_Mode);
+ if (USE_GLOPS) {
+ Glop glop;
+ GlopBuilder aBuilder(mRenderState, mCaches, &glop);
+ aBuilder.setMeshIndexedQuads(&mesh[0], quadCount)
+ .setFillClear()
+ .setTransformClip(currentSnapshot()->getOrthoMatrix(), Matrix4::identity(), false)
+ .setModelViewOffsetRect(0, 0, currentSnapshot()->getClipRect())
+ .setRoundRectClipState(currentSnapshot()->roundRectClipState)
+ .build();
+ renderGlop(glop);
+ } else {
+ SkPaint clearPaint;
+ clearPaint.setXfermodeMode(SkXfermode::kClear_Mode);
- setupDraw(false);
- setupDrawColor(0.0f, 0.0f, 0.0f, 1.0f);
- setupDrawBlending(&clearPaint, true);
- setupDrawProgram();
- setupDrawPureColorUniforms();
- setupDrawModelView(kModelViewMode_Translate, false,
- 0.0f, 0.0f, 0.0f, 0.0f, true);
+ setupDraw(false);
+ setupDrawColor(0.0f, 0.0f, 0.0f, 1.0f);
+ setupDrawBlending(&clearPaint, true);
+ setupDrawProgram();
+ setupDrawPureColorUniforms();
+ setupDrawModelView(kModelViewMode_Translate, false,
+ 0.0f, 0.0f, 0.0f, 0.0f, true);
- issueIndexedQuadDraw(&mesh[0], count);
+ issueIndexedQuadDraw(&mesh[0], quadCount);
+ }
if (scissorChanged) mRenderState.scissor().setEnabled(true);
} else {
@@ -1405,11 +1403,11 @@ static void handlePointNoTransform(std::vector<Vertex>& rectangleVertices, float
}
void OpenGLRenderer::drawRectangleList(const RectangleList& rectangleList) {
- int count = rectangleList.getTransformedRectanglesCount();
- std::vector<Vertex> rectangleVertices(count * 4);
+ int quadCount = rectangleList.getTransformedRectanglesCount();
+ std::vector<Vertex> rectangleVertices(quadCount * 4);
Rect scissorBox = rectangleList.calculateBounds();
scissorBox.snapToPixelBoundaries();
- for (int i = 0; i < count; ++i) {
+ for (int i = 0; i < quadCount; ++i) {
const TransformedRectangle& tr(rectangleList.getTransformedRectangle(i));
const Matrix4& transform = tr.getTransform();
Rect bounds = tr.getBounds();
@@ -1434,6 +1432,19 @@ void OpenGLRenderer::drawRectangleList(const RectangleList& rectangleList) {
mRenderState.scissor().set(scissorBox.left, getViewportHeight() - scissorBox.bottom,
scissorBox.getWidth(), scissorBox.getHeight());
+ if (USE_GLOPS) {
+ Glop glop;
+ GlopBuilder aBuilder(mRenderState, mCaches, &glop);
+ aBuilder.setMeshIndexedQuads(&rectangleVertices[0], rectangleVertices.size() / 4)
+ .setFillBlack()
+ .setTransformClip(currentSnapshot()->getOrthoMatrix(), Matrix4::identity(), false)
+ .setModelViewOffsetRect(0, 0, scissorBox)
+ .setRoundRectClipState(currentSnapshot()->roundRectClipState)
+ .build();
+ renderGlop(glop);
+ return;
+ }
+
const SkPaint* paint = nullptr;
setupDraw();
setupDrawNoTexture();
@@ -1970,7 +1981,7 @@ void OpenGLRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t
}
void OpenGLRenderer::drawAlphaBitmap(Texture* texture, const SkPaint* paint) {
- if (USE_GLOPS && (!paint || !paint->getShader())) {
+ if (USE_GLOPS) {
Glop glop;
GlopBuilder aBuilder(mRenderState, mCaches, &glop);
aBuilder.setMeshTexturedUnitQuad(texture->uvMapper, true)
@@ -2358,7 +2369,7 @@ void OpenGLRenderer::drawVertexBuffer(float translateX, float translateY,
return;
}
- if (USE_GLOPS && !paint->getShader()) {
+ if (USE_GLOPS) {
Glop glop;
GlopBuilder aBuilder(mRenderState, mCaches, &glop);
bool fudgeOffset = displayFlags & kVertexBuffer_Offset;
@@ -2668,17 +2679,30 @@ void OpenGLRenderer::drawTextShadow(const SkPaint* paint, const char* text,
// NOTE: The drop shadow will not perform gamma correction
// if shader-based correction is enabled
mCaches.dropShadowCache.setFontRenderer(fontRenderer);
- const ShadowTexture* shadow = mCaches.dropShadowCache.get(
+ ShadowTexture* texture = mCaches.dropShadowCache.get(
paint, text, bytesCount, count, textShadow.radius, positions);
// If the drop shadow exceeds the max texture size or couldn't be
// allocated, skip drawing
- if (!shadow) return;
- const AutoTexture autoCleanup(shadow);
+ if (!texture) return;
+ const AutoTexture autoCleanup(texture);
+
+ const float sx = x - texture->left + textShadow.dx;
+ const float sy = y - texture->top + textShadow.dy;
- const float sx = x - shadow->left + textShadow.dx;
- const float sy = y - shadow->top + textShadow.dy;
+ if (USE_GLOPS) {
+ Glop glop;
+ GlopBuilder aBuilder(mRenderState, mCaches, &glop);
+ aBuilder.setMeshTexturedUnitQuad(nullptr, true)
+ .setFillShadowTexturePaint(*texture, textShadow.color, *paint, currentSnapshot()->alpha)
+ .setTransformClip(currentSnapshot()->getOrthoMatrix(), *currentTransform(), false)
+ .setModelViewMapUnitToRect(Rect(sx, sy, sx + texture->width, sy + texture->height))
+ .setRoundRectClipState(currentSnapshot()->roundRectClipState)
+ .build();
+ renderGlop(glop);
+ return;
+ }
- const int shadowAlpha = ((textShadow.color >> 24) & 0xFF) * writableSnapshot()->alpha;
+ const int shadowAlpha = ((textShadow.color >> 24) & 0xFF) * currentSnapshot()->alpha;
if (getShader(paint)) {
textShadow.color = SK_ColorWHITE;
}
@@ -2691,8 +2715,8 @@ void OpenGLRenderer::drawTextShadow(const SkPaint* paint, const char* text,
setupDrawBlending(paint, true);
setupDrawProgram();
setupDrawModelView(kModelViewMode_TranslateAndScale, false,
- sx, sy, sx + shadow->width, sy + shadow->height);
- setupDrawTexture(shadow->id);
+ sx, sy, sx + texture->width, sy + texture->height);
+ setupDrawTexture(texture->id);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms(getColorFilter(paint));
setupDrawShaderUniforms(getShader(paint));
@@ -3024,7 +3048,6 @@ void OpenGLRenderer::drawLayer(Layer* layer, float x, float y) {
DRAW_DOUBLE_STENCIL_IF(!layer->hasDrawnSinceUpdate,
composeLayerRect(layer, layer->regionRect));
} else if (layer->mesh) {
-
const float a = getLayerAlpha(layer);
setupDraw();
setupDrawWithTexture();
@@ -3052,7 +3075,7 @@ void OpenGLRenderer::drawLayer(Layer* layer, float x, float y) {
GLsizei elementsCount = layer->meshElementCount;
while (elementsCount > 0) {
- GLsizei drawCount = min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6);
+ GLsizei drawCount = MathUtils::min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6);
setupDrawMeshIndices(&mesh[0].x, &mesh[0].u);
DRAW_DOUBLE_STENCIL_IF(!layer->hasDrawnSinceUpdate,
@@ -3107,13 +3130,13 @@ Texture* OpenGLRenderer::getTexture(const SkBitmap* bitmap) {
return texture;
}
-void OpenGLRenderer::drawPathTexture(PathTexture* texture,
- float x, float y, const SkPaint* paint) {
+void OpenGLRenderer::drawPathTexture(PathTexture* texture, float x, float y,
+ const SkPaint* paint) {
if (quickRejectSetupScissor(x, y, x + texture->width, y + texture->height)) {
return;
}
- if (USE_GLOPS && !paint->getShader()) {
+ if (USE_GLOPS) {
Glop glop;
GlopBuilder aBuilder(mRenderState, mCaches, &glop);
aBuilder.setMeshTexturedUnitQuad(nullptr, true)
@@ -3274,7 +3297,7 @@ void OpenGLRenderer::drawColorRects(const float* rects, int count, const SkPaint
return;
}
- if (USE_GLOPS && !paint->getShader()) {
+ if (USE_GLOPS) {
const Matrix4& transform = ignoreTransform ? Matrix4::identity() : *currentTransform();
Glop glop;
GlopBuilder aBuilder(mRenderState, mCaches, &glop);
@@ -3320,7 +3343,7 @@ void OpenGLRenderer::drawColorRects(const float* rects, int count, const SkPaint
void OpenGLRenderer::drawColorRect(float left, float top, float right, float bottom,
const SkPaint* paint, bool ignoreTransform) {
- if (USE_GLOPS && !paint->getShader()) {
+ if (USE_GLOPS) {
const Matrix4& transform = ignoreTransform ? Matrix4::identity() : *currentTransform();
Glop glop;
GlopBuilder aBuilder(mRenderState, mCaches, &glop);
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp
index 9c929da..2fcf7f3 100644
--- a/libs/hwui/SkiaShader.cpp
+++ b/libs/hwui/SkiaShader.cpp
@@ -16,17 +16,17 @@
#define LOG_TAG "OpenGLRenderer"
-#include <utils/Log.h>
-
-#include <SkMatrix.h>
+#include "SkiaShader.h"
#include "Caches.h"
#include "Extensions.h"
#include "Layer.h"
#include "Matrix.h"
-#include "SkiaShader.h"
#include "Texture.h"
+#include <SkMatrix.h>
+#include <utils/Log.h>
+
namespace android {
namespace uirenderer {
@@ -34,7 +34,7 @@ namespace uirenderer {
// Support
///////////////////////////////////////////////////////////////////////////////
-static const GLint gTileModes[] = {
+static const GLenum gTileModes[] = {
GL_CLAMP_TO_EDGE, // == SkShader::kClamp_TileMode
GL_REPEAT, // == SkShader::kRepeat_Mode
GL_MIRRORED_REPEAT // == SkShader::kMirror_TileMode
@@ -56,6 +56,10 @@ static inline void bindUniformColor(int slot, uint32_t color) {
a);
}
+static inline void bindUniformColor(int slot, FloatColor color) {
+ glUniform4fv(slot, 1, reinterpret_cast<const float*>(&color));
+}
+
static inline void bindTexture(Caches* caches, Texture* texture, GLenum wrapS, GLenum wrapT) {
caches->textureState().bindTexture(texture->id);
texture->setWrapST(wrapS, wrapT);
@@ -270,7 +274,7 @@ void SkiaBitmapShader::setupProgram(Caches* caches, const mat4& modelViewMatrix,
}
GLuint textureSlot = (*textureUnit)++;
- Caches::getInstance().textureState().activateTexture(textureSlot);
+ caches->textureState().activateTexture(textureSlot);
BitmapShaderInfo shaderInfo;
if (!bitmapShaderHelper(caches, nullptr, &shaderInfo, extensions, bitmap, xy)) {
@@ -470,5 +474,290 @@ void SkiaComposeShader::setupProgram(Caches* caches, const mat4& modelViewMatrix
SkiaShader::setupProgram(caches, transform, textureUnit, extensions, *rec.fShaderB);
}
+///////////////////////////////////////////////////////////////////////////////
+// Store / apply
+///////////////////////////////////////////////////////////////////////////////
+
+bool tryStoreGradient(Caches& caches, const SkShader& shader, const Matrix4 modelViewMatrix,
+ GLuint* textureUnit, ProgramDescription* description,
+ SkiaShaderData::GradientShaderData* outData) {
+ SkShader::GradientInfo gradInfo;
+ gradInfo.fColorCount = 0;
+ gradInfo.fColors = nullptr;
+ gradInfo.fColorOffsets = nullptr;
+
+ SkMatrix unitMatrix;
+ switch (shader.asAGradient(&gradInfo)) {
+ case SkShader::kLinear_GradientType:
+ description->gradientType = ProgramDescription::kGradientLinear;
+
+ toUnitMatrix(gradInfo.fPoint, &unitMatrix);
+ break;
+ case SkShader::kRadial_GradientType:
+ description->gradientType = ProgramDescription::kGradientCircular;
+
+ toCircularUnitMatrix(gradInfo.fPoint[0].fX, gradInfo.fPoint[0].fY,
+ gradInfo.fRadius[0], &unitMatrix);
+ break;
+ case SkShader::kSweep_GradientType:
+ description->gradientType = ProgramDescription::kGradientSweep;
+
+ toSweepUnitMatrix(gradInfo.fPoint[0].fX, gradInfo.fPoint[0].fY, &unitMatrix);
+ break;
+ default:
+ // Do nothing. This shader is unsupported.
+ return false;
+ }
+ description->hasGradient = true;
+ description->isSimpleGradient = isSimpleGradient(gradInfo);
+
+ computeScreenSpaceMatrix(outData->screenSpace, unitMatrix,
+ shader.getLocalMatrix(), modelViewMatrix);
+
+ // re-query shader to get full color / offset data
+ std::unique_ptr<SkColor[]> colorStorage(new SkColor[gradInfo.fColorCount]);
+ std::unique_ptr<SkScalar[]> colorOffsets(new SkScalar[gradInfo.fColorCount]);
+ gradInfo.fColors = &colorStorage[0];
+ gradInfo.fColorOffsets = &colorOffsets[0];
+ shader.asAGradient(&gradInfo);
+
+ if (CC_UNLIKELY(!isSimpleGradient(gradInfo))) {
+ outData->gradientSampler = (*textureUnit)++;
+
+#ifndef SK_SCALAR_IS_FLOAT
+ #error Need to convert gradInfo.fColorOffsets to float!
+#endif
+ outData->gradientTexture = caches.gradientCache.get(
+ gradInfo.fColors, gradInfo.fColorOffsets, gradInfo.fColorCount);
+ outData->wrapST = gTileModes[gradInfo.fTileMode];
+ } else {
+ outData->gradientSampler = 0;
+ outData->gradientTexture = nullptr;
+
+ outData->startColor.set(gradInfo.fColors[0]);
+ outData->endColor.set(gradInfo.fColors[1]);
+ }
+
+ outData->ditherSampler = (*textureUnit)++;
+ return true;
+}
+
+void applyGradient(Caches& caches, const SkiaShaderData::GradientShaderData& data) {
+ if (CC_UNLIKELY(data.gradientTexture)) {
+ caches.textureState().activateTexture(data.gradientSampler);
+ bindTexture(&caches, data.gradientTexture, data.wrapST, data.wrapST);
+ glUniform1i(caches.program().getUniform("gradientSampler"), data.gradientSampler);
+ } else {
+ bindUniformColor(caches.program().getUniform("startColor"), data.startColor);
+ bindUniformColor(caches.program().getUniform("endColor"), data.endColor);
+ }
+
+ // TODO: remove sampler slot incrementing from dither.setupProgram,
+ // since this assignment of slots is done at store, not apply time
+ GLuint ditherSampler = data.ditherSampler;
+ caches.dither.setupProgram(caches.program(), &ditherSampler);
+ glUniformMatrix4fv(caches.program().getUniform("screenSpace"), 1,
+ GL_FALSE, &data.screenSpace.data[0]);
+}
+
+bool tryStoreBitmap(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
+ GLuint* textureUnit, ProgramDescription* description,
+ SkiaShaderData::BitmapShaderData* outData) {
+ SkBitmap bitmap;
+ SkShader::TileMode xy[2];
+ if (shader.asABitmap(&bitmap, nullptr, xy) != SkShader::kDefault_BitmapType) {
+ return false;
+ }
+
+ outData->bitmapTexture = caches.textureCache.get(&bitmap);
+ if (!outData->bitmapTexture) return false;
+
+ outData->bitmapSampler = (*textureUnit)++;
+
+ const float width = outData->bitmapTexture->width;
+ const float height = outData->bitmapTexture->height;
+
+ description->hasBitmap = true;
+ if (!caches.extensions().hasNPot()
+ && (!isPowerOfTwo(width) || !isPowerOfTwo(height))
+ && (xy[0] != SkShader::kClamp_TileMode || xy[1] != SkShader::kClamp_TileMode)) {
+ description->isBitmapNpot = true;
+ description->bitmapWrapS = gTileModes[xy[0]];
+ description->bitmapWrapT = gTileModes[xy[1]];
+
+ outData->wrapS = GL_CLAMP_TO_EDGE;
+ outData->wrapT = GL_CLAMP_TO_EDGE;
+ } else {
+ outData->wrapS = gTileModes[xy[0]];
+ outData->wrapT = gTileModes[xy[1]];
+ }
+
+ computeScreenSpaceMatrix(outData->textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
+ modelViewMatrix);
+ outData->textureDimension[0] = 1.0f / width;
+ outData->textureDimension[1] = 1.0f / height;
+
+ return true;
+}
+
+void applyBitmap(Caches& caches, const SkiaShaderData::BitmapShaderData& data) {
+ caches.textureState().activateTexture(data.bitmapSampler);
+ bindTexture(&caches, data.bitmapTexture, data.wrapS, data.wrapT);
+ data.bitmapTexture->setFilter(GL_LINEAR);
+
+ glUniform1i(caches.program().getUniform("bitmapSampler"), data.bitmapSampler);
+ glUniformMatrix4fv(caches.program().getUniform("textureTransform"), 1, GL_FALSE,
+ &data.textureTransform.data[0]);
+ glUniform2fv(caches.program().getUniform("textureDimension"), 1, &data.textureDimension[0]);
+}
+
+SkiaShaderType getComposeSubType(const SkShader& shader) {
+ // First check for a gradient shader.
+ switch (shader.asAGradient(nullptr)) {
+ case SkShader::kNone_GradientType:
+ // Not a gradient shader. Fall through to check for other types.
+ break;
+ case SkShader::kLinear_GradientType:
+ case SkShader::kRadial_GradientType:
+ case SkShader::kSweep_GradientType:
+ return kGradient_SkiaShaderType;
+ default:
+ // This is a Skia gradient that has no SkiaShader equivalent. Return None to skip.
+ return kNone_SkiaShaderType;
+ }
+
+ // The shader is not a gradient. Check for a bitmap shader.
+ if (shader.asABitmap(nullptr, nullptr, nullptr) == SkShader::kDefault_BitmapType) {
+ return kBitmap_SkiaShaderType;
+ }
+ return kNone_SkiaShaderType;
+}
+
+void storeCompose(Caches& caches, const SkShader& bitmapShader, const SkShader& gradientShader,
+ const Matrix4& modelViewMatrix, GLuint* textureUnit,
+ ProgramDescription* description, SkiaShaderData* outData) {
+ LOG_ALWAYS_FATAL_IF(!tryStoreBitmap(caches, bitmapShader, modelViewMatrix,
+ textureUnit, description, &outData->bitmapData),
+ "failed storing bitmap shader data");
+ LOG_ALWAYS_FATAL_IF(!tryStoreGradient(caches, gradientShader, modelViewMatrix,
+ textureUnit, description, &outData->gradientData),
+ "failing storing gradient shader data");
+}
+
+bool tryStoreCompose(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
+ GLuint* textureUnit, ProgramDescription* description,
+ SkiaShaderData* outData) {
+
+ SkShader::ComposeRec rec;
+ if (!shader.asACompose(&rec)) return false;
+
+ const SkiaShaderType shaderAType = getComposeSubType(*rec.fShaderA);
+ const SkiaShaderType shaderBType = getComposeSubType(*rec.fShaderB);
+
+ // check that type enum values are the 2 flags that compose the kCompose value
+ if ((shaderAType & shaderBType) != 0) return false;
+ if ((shaderAType | shaderBType) != kCompose_SkiaShaderType) return false;
+
+ mat4 transform;
+ computeScreenSpaceMatrix(transform, SkMatrix::I(), shader.getLocalMatrix(), modelViewMatrix);
+ if (shaderAType == kBitmap_SkiaShaderType) {
+ description->isBitmapFirst = true;
+ storeCompose(caches, *rec.fShaderA, *rec.fShaderB,
+ transform, textureUnit, description, outData);
+ } else {
+ description->isBitmapFirst = false;
+ storeCompose(caches, *rec.fShaderB, *rec.fShaderA,
+ transform, textureUnit, description, outData);
+ }
+ if (!SkXfermode::AsMode(rec.fMode, &description->shadersMode)) {
+ // TODO: Support other modes.
+ description->shadersMode = SkXfermode::kSrcOver_Mode;
+ }
+ return true;
+}
+
+bool tryStoreLayer(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
+ GLuint* textureUnit, ProgramDescription* description,
+ SkiaShaderData::LayerShaderData* outData) {
+ Layer* layer;
+ if (!shader.asACustomShader(reinterpret_cast<void**>(&layer))) {
+ return false;
+ }
+
+ description->hasBitmap = true;
+ outData->layer = layer;
+ outData->bitmapSampler = (*textureUnit)++;
+
+ const float width = layer->getWidth();
+ const float height = layer->getHeight();
+
+ computeScreenSpaceMatrix(outData->textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
+ modelViewMatrix);
+
+ outData->textureDimension[0] = 1.0f / width;
+ outData->textureDimension[1] = 1.0f / height;
+ return true;
+}
+
+void applyLayer(Caches& caches, const SkiaShaderData::LayerShaderData& data) {
+ caches.textureState().activateTexture(data.bitmapSampler);
+
+ data.layer->bindTexture();
+ data.layer->setWrap(GL_CLAMP_TO_EDGE);
+ data.layer->setFilter(GL_LINEAR);
+
+ glUniform1i(caches.program().getUniform("bitmapSampler"), data.bitmapSampler);
+ glUniformMatrix4fv(caches.program().getUniform("textureTransform"), 1,
+ GL_FALSE, &data.textureTransform.data[0]);
+ glUniform2fv(caches.program().getUniform("textureDimension"), 1, &data.textureDimension[0]);
+}
+
+void SkiaShader::store(Caches& caches, const SkShader* shader, const Matrix4& modelViewMatrix,
+ GLuint* textureUnit, ProgramDescription* description,
+ SkiaShaderData* outData) {
+ if (!shader) {
+ outData->skiaShaderType = kNone_SkiaShaderType;
+ return;
+ }
+
+ if (tryStoreGradient(caches, *shader, modelViewMatrix,
+ textureUnit, description, &outData->gradientData)) {
+ outData->skiaShaderType = kGradient_SkiaShaderType;
+ return;
+ }
+
+ if (tryStoreBitmap(caches, *shader, modelViewMatrix,
+ textureUnit, description, &outData->bitmapData)) {
+ outData->skiaShaderType = kBitmap_SkiaShaderType;
+ return;
+ }
+
+ if (tryStoreCompose(caches, *shader, modelViewMatrix,
+ textureUnit, description, outData)) {
+ outData->skiaShaderType = kCompose_SkiaShaderType;
+ return;
+ }
+
+ if (tryStoreLayer(caches, *shader, modelViewMatrix,
+ textureUnit, description, &outData->layerData)) {
+ outData->skiaShaderType = kLayer_SkiaShaderType;
+ }
+}
+
+void SkiaShader::apply(Caches& caches, const SkiaShaderData& data) {
+ if (!data.skiaShaderType) return;
+
+ if (data.skiaShaderType & kGradient_SkiaShaderType) {
+ applyGradient(caches, data.gradientData);
+ }
+ if (data.skiaShaderType & kBitmap_SkiaShaderType) {
+ applyBitmap(caches, data.bitmapData);
+ }
+
+ if (data.skiaShaderType == kLayer_SkiaShaderType) {
+ applyLayer(caches, data.layerData);
+ }
+}
+
}; // namespace uirenderer
}; // namespace android
diff --git a/libs/hwui/SkiaShader.h b/libs/hwui/SkiaShader.h
index e110ca5..2962441c 100644
--- a/libs/hwui/SkiaShader.h
+++ b/libs/hwui/SkiaShader.h
@@ -17,32 +17,72 @@
#ifndef ANDROID_HWUI_SKIA_SHADER_H
#define ANDROID_HWUI_SKIA_SHADER_H
-#include <SkShader.h>
-#include <SkXfermode.h>
+#include "FloatColor.h"
+#include "Matrix.h"
#include <GLES2/gl2.h>
-
+#include <SkShader.h>
+#include <SkXfermode.h>
#include <cutils/compiler.h>
-#include "Matrix.h"
-
namespace android {
namespace uirenderer {
class Caches;
class Extensions;
class Layer;
+class Texture;
struct ProgramDescription;
/**
* Type of Skia shader in use.
+ *
+ * Note that kBitmap | kGradient = kCompose, since Compose implies
+ * both its component types are in use simultaneously. No other
+ * composition of multiple types is supported.
*/
enum SkiaShaderType {
- kNone_SkiaShaderType,
- kBitmap_SkiaShaderType,
- kGradient_SkiaShaderType,
- kCompose_SkiaShaderType,
- kLayer_SkiaShaderType
+ kNone_SkiaShaderType = 0,
+ kBitmap_SkiaShaderType = 1,
+ kGradient_SkiaShaderType = 2,
+ kCompose_SkiaShaderType = kBitmap_SkiaShaderType | kGradient_SkiaShaderType,
+ kLayer_SkiaShaderType = 4,
+};
+
+struct SkiaShaderData {
+ SkiaShaderType skiaShaderType;
+ struct BitmapShaderData {
+ Texture* bitmapTexture;
+ GLuint bitmapSampler;
+ GLenum wrapS;
+ GLenum wrapT;
+
+ Matrix4 textureTransform;
+ float textureDimension[2];
+ } bitmapData;
+ struct GradientShaderData {
+ Matrix4 screenSpace;
+ GLuint ditherSampler;
+
+ // simple gradient
+ FloatColor startColor;
+ FloatColor endColor;
+
+ // complex gradient
+ Texture* gradientTexture;
+ GLuint gradientSampler;
+ GLenum wrapST;
+
+ } gradientData;
+ struct LayerShaderData {
+ Layer* layer;
+ GLuint bitmapSampler;
+ GLenum wrapS;
+ GLenum wrapT;
+
+ Matrix4 textureTransform;
+ float textureDimension[2];
+ } layerData;
};
class SkiaShader {
@@ -52,6 +92,12 @@ public:
const Extensions& extensions, const SkShader& shader);
static void setupProgram(Caches* caches, const mat4& modelViewMatrix,
GLuint* textureUnit, const Extensions& extensions, const SkShader& shader);
+
+ // new SkiaShader interaction model - store into ShaderData, and apply to Caches/Program/GL
+ static void store(Caches& caches, const SkShader* shader, const Matrix4& modelViewMatrix,
+ GLuint* textureUnit, ProgramDescription* description,
+ SkiaShaderData* outData);
+ static void apply(Caches& caches, const SkiaShaderData& data);
};
class InvalidSkiaShader {
diff --git a/libs/hwui/Vertex.h b/libs/hwui/Vertex.h
index fd3845d..11d0c4b 100644
--- a/libs/hwui/Vertex.h
+++ b/libs/hwui/Vertex.h
@@ -21,8 +21,6 @@
#include "utils/Macros.h"
-#include <type_traits>
-
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index e35327b..b64dbdc 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -266,7 +266,7 @@ void RenderState::render(const Glop& glop) {
meshState().bindIndicesBufferInternal(mesh.indexBufferObject);
if (mesh.vertexFlags & kTextureCoord_Attrib) {
- // TODO: to support shaders, increment texture unit
+ // glop.fill.texture always takes slot 0, shader samplers increment from there
mCaches->textureState().activateTexture(0);
if (glop.fill.textureClamp != GL_INVALID_ENUM) {
@@ -294,6 +294,9 @@ void RenderState::render(const Glop& glop) {
glVertexAttribPointer(alphaSlot, 1, GL_FLOAT, GL_FALSE, kAlphaVertexStride, alphaCoords);
}
+ // Shader uniforms
+ SkiaShader::apply(*mCaches, glop.fill.skiaShaderData);
+
// ------------------------------------
// ---------- GL state setup ----------
// ------------------------------------
diff --git a/libs/hwui/utils/Macros.h b/libs/hwui/utils/Macros.h
index eae73a9..5ca9083 100644
--- a/libs/hwui/utils/Macros.h
+++ b/libs/hwui/utils/Macros.h
@@ -16,6 +16,8 @@
#ifndef MACROS_H
#define MACROS_H
+#include <type_traits>
+
#define PREVENT_COPY_AND_ASSIGN(Type) \
private: \
Type(const Type&) = delete; \
diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java
index 5285074..b4c612a 100644
--- a/media/java/android/media/MediaRouter.java
+++ b/media/java/android/media/MediaRouter.java
@@ -17,6 +17,7 @@
package android.media;
import android.Manifest;
+import android.annotation.DrawableRes;
import android.app.ActivityThread;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -2083,7 +2084,7 @@ public class MediaRouter {
*
* @param resId Resource ID of an icon drawable to use to represent this route
*/
- public void setIconResource(int resId) {
+ public void setIconResource(@DrawableRes int resId) {
setIconDrawable(sStatic.mResources.getDrawable(resId));
}
@@ -2393,7 +2394,7 @@ public class MediaRouter {
*
* @param resId Resource ID of an icon drawable to use to represent this group
*/
- public void setIconResource(int resId) {
+ public void setIconResource(@DrawableRes int resId) {
setIconDrawable(sStatic.mResources.getDrawable(resId));
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java
index 7c56e84..bca0305 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java
@@ -17,11 +17,7 @@
package com.android.keyguard;
import android.content.Context;
-import android.database.ContentObserver;
import android.graphics.Rect;
-import android.os.Handler;
-import android.os.UserHandle;
-import android.provider.Settings;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.View;
@@ -32,39 +28,19 @@ import android.view.View;
public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
implements View.OnKeyListener {
- private final android.database.ContentObserver mSpeakPasswordObserver
- = new ContentObserver(new Handler()) {
- @Override
- public void onChange(boolean selfChange) {
- super.onChange(selfChange);
- // Ensure that it's not called too early
- if (mButton0 != null) {
- mButton0.updateContentDescription();
- mButton1.updateContentDescription();
- mButton2.updateContentDescription();
- mButton3.updateContentDescription();
- mButton4.updateContentDescription();
- mButton5.updateContentDescription();
- mButton6.updateContentDescription();
- mButton7.updateContentDescription();
- mButton8.updateContentDescription();
- mButton9.updateContentDescription();
- }
- }
- };
protected PasswordTextView mPasswordEntry;
private View mOkButton;
private View mDeleteButton;
- private NumPadKey mButton0;
- private NumPadKey mButton1;
- private NumPadKey mButton2;
- private NumPadKey mButton3;
- private NumPadKey mButton4;
- private NumPadKey mButton5;
- private NumPadKey mButton6;
- private NumPadKey mButton7;
- private NumPadKey mButton8;
- private NumPadKey mButton9;
+ private View mButton0;
+ private View mButton1;
+ private View mButton2;
+ private View mButton3;
+ private View mButton4;
+ private View mButton5;
+ private View mButton6;
+ private View mButton7;
+ private View mButton8;
+ private View mButton9;
public KeyguardPinBasedInputView(Context context) {
this(context, null);
@@ -72,9 +48,6 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
public KeyguardPinBasedInputView(Context context, AttributeSet attrs) {
super(context, attrs);
- context.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD), true,
- mSpeakPasswordObserver, UserHandle.USER_ALL);
}
@Override
@@ -215,16 +188,16 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
}
});
- mButton0 = (NumPadKey) findViewById(R.id.key0);
- mButton1 = (NumPadKey) findViewById(R.id.key1);
- mButton2 = (NumPadKey) findViewById(R.id.key2);
- mButton3 = (NumPadKey) findViewById(R.id.key3);
- mButton4 = (NumPadKey) findViewById(R.id.key4);
- mButton5 = (NumPadKey) findViewById(R.id.key5);
- mButton6 = (NumPadKey) findViewById(R.id.key6);
- mButton7 = (NumPadKey) findViewById(R.id.key7);
- mButton8 = (NumPadKey) findViewById(R.id.key8);
- mButton9 = (NumPadKey) findViewById(R.id.key9);
+ mButton0 = findViewById(R.id.key0);
+ mButton1 = findViewById(R.id.key1);
+ mButton2 = findViewById(R.id.key2);
+ mButton3 = findViewById(R.id.key3);
+ mButton4 = findViewById(R.id.key4);
+ mButton5 = findViewById(R.id.key5);
+ mButton6 = findViewById(R.id.key6);
+ mButton7 = findViewById(R.id.key7);
+ mButton8 = findViewById(R.id.key8);
+ mButton9 = findViewById(R.id.key9);
mPasswordEntry.requestFocus();
super.onFinishInflate();
diff --git a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java b/packages/Keyguard/src/com/android/keyguard/NumPadKey.java
index 70a4108..681db80 100644
--- a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java
+++ b/packages/Keyguard/src/com/android/keyguard/NumPadKey.java
@@ -22,8 +22,6 @@ import android.graphics.drawable.Drawable;
import android.os.Debug;
import android.os.PowerManager;
import android.os.SystemClock;
-import android.os.UserHandle;
-import android.provider.Settings;
import android.util.AttributeSet;
import android.view.HapticFeedbackConstants;
import android.view.KeyEvent;
@@ -120,17 +118,7 @@ public class NumPadKey extends ViewGroup {
}
setBackground(mContext.getDrawable(R.drawable.ripple_drawable));
- updateContentDescription();
- }
-
- public void updateContentDescription() {
- if (shouldSpeakPasswordsForAccessibility()) {
- setContentDescription(
- mDigitText.getText().toString() + mKlondikeText.getText().toString());
- } else {
- setContentDescription(getContext().getString(
- com.android.internal.R.string.keyboard_password_character_no_headset));
- }
+ setContentDescription(mDigitText.getText().toString());
}
@Override
@@ -164,15 +152,6 @@ public class NumPadKey extends ViewGroup {
mKlondikeText.layout(left, top, left + mKlondikeText.getMeasuredWidth(), bottom);
}
- /**
- * @return true if the user has explicitly allowed accessibility services
- * to speak passwords.
- */
- private boolean shouldSpeakPasswordsForAccessibility() {
- return (Settings.Secure.getIntForUser(mContext.getContentResolver(),
- Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0, UserHandle.USER_CURRENT) == 1);
- }
-
@Override
public boolean hasOverlappingRendering() {
return false;
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
index 8371117..78f6ace 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
@@ -941,6 +941,7 @@ public class SettingsBackupAgent extends BackupAgentHelper {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStreamWriter out = new OutputStreamWriter(bos);
fromFile.write(out);
+ out.flush();
return bos.toByteArray();
} else {
return EMPTY_DATA;
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 5aac06d..2c63647 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -56,7 +56,9 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.content.PackageMonitor;
import com.android.internal.os.BackgroundThread;
import java.io.File;
+import java.io.FileDescriptor;
import java.io.FileNotFoundException;
+import java.io.PrintWriter;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.List;
@@ -479,6 +481,59 @@ public class SettingsProvider extends ContentProvider {
+ "ringtone playback is available through android.media.Ringtone");
}
+ @Override
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ synchronized (mLock) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ List<UserInfo> users = mUserManager.getUsers(true);
+ final int userCount = users.size();
+ for (int i = 0; i < userCount; i++) {
+ UserInfo user = users.get(i);
+ dumpForUser(user.id, pw);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+ }
+
+ private void dumpForUser(int userId, PrintWriter pw) {
+ if (userId == UserHandle.USER_OWNER) {
+ pw.println("GLOBAL SETTINGS (user " + userId + ")");
+ Cursor globalCursor = getAllGlobalSettingsLocked(ALL_COLUMNS);
+ dumpSettings(globalCursor, pw);
+ pw.println();
+ }
+
+ pw.println("SECURE SETTINGS (user " + userId + ")");
+ Cursor secureCursor = getAllSecureSettingsLocked(userId, ALL_COLUMNS);
+ dumpSettings(secureCursor, pw);
+ pw.println();
+
+ pw.println("SYSTEM SETTINGS (user " + userId + ")");
+ Cursor systemCursor = getAllSystemSettingsLocked(userId, ALL_COLUMNS);
+ dumpSettings(systemCursor, pw);
+ pw.println();
+ }
+
+ private void dumpSettings(Cursor cursor, PrintWriter pw) {
+ if (!cursor.moveToFirst()) {
+ return;
+ }
+
+ final int idColumnIdx = cursor.getColumnIndex(Settings.NameValueTable._ID);
+ final int nameColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.NAME);
+ final int valueColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.VALUE);
+
+ do {
+ pw.append("_id:").append(cursor.getString(idColumnIdx));
+ pw.append(" name:").append(cursor.getString(nameColumnIdx));
+ pw.append(" value:").append(cursor.getString(valueColumnIdx));
+ pw.println();
+ } while (cursor.moveToNext());
+ }
+
private void registerBroadcastReceivers() {
IntentFilter userFilter = new IntentFilter();
userFilter.addAction(Intent.ACTION_USER_REMOVED);
@@ -724,7 +779,7 @@ public class SettingsProvider extends ContentProvider {
// Special cases for location providers (sigh).
if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name)) {
- return updateLocationProvidersAllowed(value, owningUserId);
+ return updateLocationProvidersAllowedLocked(value, owningUserId);
}
// Mutate the value.
@@ -1017,7 +1072,7 @@ public class SettingsProvider extends ContentProvider {
*
* @returns whether the enabled location providers changed.
*/
- private boolean updateLocationProvidersAllowed(String value, int owningUserId) {
+ private boolean updateLocationProvidersAllowedLocked(String value, int owningUserId) {
if (TextUtils.isEmpty(value)) {
return false;
}
@@ -1075,10 +1130,9 @@ public class SettingsProvider extends ContentProvider {
return false;
}
- updateSecureSettingLocked(Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
- newProviders, owningUserId);
-
- return true;
+ return mSettingsRegistry.insertSettingLocked(SettingsRegistry.SETTINGS_TYPE_SECURE,
+ owningUserId, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, newProviders,
+ getCallingPackage());
}
private void sendNotify(Uri uri, int userId) {
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index 833638c..0d03ed9 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -109,6 +109,9 @@ final class SettingsState {
@GuardedBy("mLock")
private boolean mWriteScheduled;
+ @GuardedBy("mLock")
+ private long mNextId;
+
public SettingsState(Object lock, File file, int key, int maxBytesPerAppPackage) {
// It is important that we use the same lock as the settings provider
// to ensure multiple mutations on this state are atomicaly persisted
@@ -522,21 +525,19 @@ final class SettingsState {
return value;
}
- public static final class Setting {
- private static long sNextId;
-
+ public final class Setting {
private String name;
private String value;
private String packageName;
private String id;
public Setting(String name, String value, String packageName) {
- init(name, value, packageName, String.valueOf(sNextId++));
+ init(name, value, packageName, String.valueOf(mNextId++));
}
public Setting(String name, String value, String packageName, String id) {
- sNextId = Math.max(sNextId, Long.valueOf(id));
- init(name, value, packageName, String.valueOf(sNextId));
+ mNextId = Math.max(mNextId, Long.valueOf(id) + 1);
+ init(name, value, packageName, id);
}
private void init(String name, String value, String packageName, String id) {
@@ -568,7 +569,7 @@ final class SettingsState {
}
this.value = value;
this.packageName = packageName;
- this.id = String.valueOf(sNextId++);
+ this.id = String.valueOf(mNextId++);
return true;
}
}
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 08e7f4f..45f4290 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Versteek <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Dit sal verskyn die volgende keer wanneer jy dit in instellings aanskakel."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Versteek"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> wil die volumedialoog wees."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Laat toe"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Weier"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is die volumedialoog"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Raak om die oorspronklike terug te stel."</string>
</resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 11a85cc..aac7a2f 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> ይደበቅ?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"በቅንብሮች ውስጥ በሚቀጥለው ጊዜ እንዲበራ በሚያደርጉበት ጊዜ ዳግመኛ ብቅ ይላል።"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"ደብቅ"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> የድምጽ መጠን መገናኛው መሆን ይፈልጋል።"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"ፍቀድ"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"ከልክል"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> የድምጽ መጠን መገናኛው ነው"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"የመጀመሪያውን ወደነበረበት ለመመለስ ይንኩ።"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index e3b2bee..447196a 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -373,14 +373,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"هل تريد إخفاء <xliff:g id="TILE_LABEL">%1$s</xliff:g>؟"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"سيظهر مرة أخرى عند تمكينه في الإعدادات المرة التالية."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"إخفاء"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"يريد <xliff:g id="APP_NAME">%1$s</xliff:g> أن يكون مربع حوار مستوى الصوت."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"سماح"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"رفض"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> هو مربع حوار مستوى الصوت"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"المس لاستعادة الإعداد الأصلي."</string>
</resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 6d20387..a058c39 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Да се скрие ли „<xliff:g id="TILE_LABEL">%1$s</xliff:g>“?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Бързите настройки ще се покажат отново следващия път, когато ги включите от „Настройки“."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Скриване"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> иска да изпълнява ролята на диалоговия прозорец за силата на звука."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Разрешаване"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Отказване"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> изпълнява ролята на диалоговия прозорец за силата на звука"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Докоснете, за да възстановите оригинала."</string>
</resources>
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn-rBD/strings.xml
index 79d576d..8805acf 100644
--- a/packages/SystemUI/res/values-bn-rBD/strings.xml
+++ b/packages/SystemUI/res/values-bn-rBD/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> লুকাবেন?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"আপনি পরের বার সেটিংস-এ এটি চালু করলে এটি উপস্থিত হবে"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"লুকান"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ভলিউম ডায়লগ হতে চায়৷"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"মঞ্জুরি দিন"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"প্রত্যাখ্যান করুন"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> হল ভলিউম ডায়লগ"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"আসলটি পুনঃস্থাপন করতে স্পর্শ করুন৷"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 50e4112..1b9987c 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Vols amagar <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Tornarà a mostrar-se la propera vegada que l\'activis a la configuració."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Amaga"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> vol passar a ser el diàleg del volum."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permet"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Denega"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> és el diàleg de volum"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Toca per restaurar l\'original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index ec954a1..c5ee2fb 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -373,14 +373,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Skrýt <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Tato položka se znovu zobrazí, až ji v nastavení znovu zapnete."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Skrýt"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> chce být dialogem hlasitosti."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Povolit"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Odmítnout"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je dialog hlasitosti"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Klepnutím obnovíte originál."</string>
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index b467a3a..11f1640 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Vil du skjule <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Den vises igen, næste gang du aktiverer den i indstillingerne."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Skjul"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ønsker at være dialogboksen for lydstyrke."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Tillad"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Afvis"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> er dialogboksen for lydstyrke"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Tryk for at gendanne originalen."</string>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 0c0cee7..4bf3076 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> ausblenden?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Sie wird wieder eingeblendet, wenn Sie sie in den Einstellungen erneut aktivieren."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ausblenden"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> will die Lautstärke regeln."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Zulassen"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Ablehnen"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> regelt die Lautstärke."</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Zum Wiederherstellen des Originals hier tippen"</string>
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 2517d2b..d5a7b2b 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Απόκρυψη <xliff:g id="TILE_LABEL">%1$s</xliff:g>;"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Θα εμφανιστεί ξανά την επόμενη φορά που θα το ενεργοποιήσετε στις ρυθμίσεις."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Απόκρυψη"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"Η εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> θέλει να γίνει το παράθυρο διαλόγου ελέγχου έντασης"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Να επιτραπεί"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Απόρριψη"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"Η εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> αποτελεί το παράθυρο διαλόγου ελέγχου έντασης"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Αγγίξτε για επαναφορά αρχικού."</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 8faef53..a7c929b 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Hide <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"It will reappear the next time you turn it on in settings."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Hide"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> wants to be the volume dialogue."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Allow"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Deny"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is the volume dialogue"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Touch to restore the original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 8faef53..a7c929b 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Hide <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"It will reappear the next time you turn it on in settings."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Hide"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> wants to be the volume dialogue."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Allow"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Deny"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is the volume dialogue"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Touch to restore the original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 248de9c..aeef5b7 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"¿Ocultar <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Volverá a aparecer la próxima vez que se active en la configuración."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ocultar"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> quiere ser el cuadro de diálogo de volumen."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permitir"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Rechazar"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> es el cuadro de diálogo de volumen."</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Toca para restaurar el original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index b850733..39e83a4 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"¿Ocultar <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Volverá a aparecer la próxima vez que actives esta opción en Ajustes."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ocultar"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> quiere ser el cuadro de diálogo de volumen."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permitir"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Rechazar"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> es el cuadro de diálogo de volumen"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Toca para restaurar la versión original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-et-rEE/strings.xml b/packages/SystemUI/res/values-et-rEE/strings.xml
index b4bcea1..d58bc52 100644
--- a/packages/SystemUI/res/values-et-rEE/strings.xml
+++ b/packages/SystemUI/res/values-et-rEE/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Kas peita <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"See kuvatakse uuesti järgmisel korral, kui selle seadetes sisse lülitate."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Peida"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> tahab olla helitugevuse dialoog."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Luba"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Keela"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> on helitugevuse dialoog"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Originaali taastamiseks puudutage."</string>
</resources>
diff --git a/packages/SystemUI/res/values-eu-rES/strings.xml b/packages/SystemUI/res/values-eu-rES/strings.xml
index 454a8ca..1753575 100644
--- a/packages/SystemUI/res/values-eu-rES/strings.xml
+++ b/packages/SystemUI/res/values-eu-rES/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> ezkutatu nahi duzu?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ezarpenetan aktibatzen duzun hurrengoan agertuko da berriro."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ezkutatu"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> bolumenaren leihoa izan nahian ari da."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Baimendu"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Ukatu"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> da bolumenaren leihoa"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Ukitu jatorrizkora leheneratzeko"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index dae1d36..a704494 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> مخفی شود؟"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"دفعه بعد که آن را روشن کنید، در تنظیمات نشان داده می‌شود."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"پنهان کردن"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> می‌خواهد کنترل‌کننده صدا باشد."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"مجاز"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"رد کردن"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> کنترل‌کننده صدا است"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"برای بازیابی کنترل‌کننده اصلی، لمس کنید."</string>
</resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 7a32323..4480bda7 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Piilotetaanko <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Se tulee takaisin näkyviin, kun seuraavan kerran otat sen käyttöön asetuksissa."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Piilota"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> haluaa olla äänenvoimakkuusvalinta."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Salli"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Estä"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> on äänenvoimakkuusvalinta."</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Palauta alkuperäinen koskettamalla."</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index e7fa6a9..49dd20a 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Masquer <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Cet élément réapparaîtra la prochaine fois que vous l\'activerez dans les paramètres."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Masquer"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> souhaite être la boîte de dialogue du volume."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Autoriser"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Refuser"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> correspond à la boîte de dialogue du volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Touchez pour restaurer l\'original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 5bd5157..4b3f42a 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Masquer <xliff:g id="TILE_LABEL">%1$s</xliff:g> ?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Cet élément réapparaîtra la prochaine fois que vous l\'activerez dans les paramètres."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Masquer"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> souhaite être la boîte de dialogue du volume."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Autoriser"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Refuser"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> correspond à la boîte de dialogue du volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Appuyez pour restaurer l\'interface d\'origine."</string>
</resources>
diff --git a/packages/SystemUI/res/values-gl-rES/strings.xml b/packages/SystemUI/res/values-gl-rES/strings.xml
index 22369e0..350a50f 100644
--- a/packages/SystemUI/res/values-gl-rES/strings.xml
+++ b/packages/SystemUI/res/values-gl-rES/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Queres ocultar <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Volverá aparecer a próxima vez que se active na configuración."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ocultar"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> quere ser o cadro de diálogo de volume."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permitir"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Rexeitar"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é o cadro de diálogo de volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Toca para restaurar o orixinal."</string>
</resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 8999999..73ec483 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> को छिपाएं?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"जब आप उसे अगली बार सेटिंग में चालू करेंगे तो वह फिर से दिखाई देगी."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"छिपाएं"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> वॉल्यूम संवाद होना चाहता है."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"अनुमति दें"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"अस्वीकार करें"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> वॉल्यूम संवाद है"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"मूल को पुनर्स्थापित करने के लिए स्पर्श करें."</string>
</resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 2197459..be21b3c 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -370,14 +370,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Želite li sakriti pločicu <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ponovo će se pojaviti kada je sljedeći put uključite u postavkama."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Sakrij"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> želi biti dijaloški okvir za upravljanje glasnoćom."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Dopusti"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Odbij"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> predstavlja dijaloški okvir za upravljanje glasnoćom"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Dodirnite da biste vratili izvorno."</string>
</resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 341b3e1..5d6a599 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Elrejti ezt: <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Újból megjelenik majd, amikor ismét engedélyezi a beállítások között."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Elrejtés"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"A(z) <xliff:g id="APP_NAME">%1$s</xliff:g> alkalmazás szeretné kezelni a hangerőt."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Engedélyezés"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Elutasítás"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"A(z) <xliff:g id="APP_NAME">%1$s</xliff:g> alkalmazás kezeli a hangerőt"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Érintse meg az eredeti érték visszaállításához."</string>
</resources>
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index a681f10..abef9a0 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Թաքցնե՞լ <xliff:g id="TILE_LABEL">%1$s</xliff:g>-ը:"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Այն դարձյալ կհայտնվի, երբ նորից միացնեք կարգավորումներում:"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Թաքցնել"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g>-ը ցանկանում է երկխոսության հավելվածը դառնալ:"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Թույլատրել"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Մերժել"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>-ը ձայնի ուժգնության երկխոսության հավելված է"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Դիպչեք՝ սկզբնօրինակը վերականգնելու համար:"</string>
</resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 819dd8f..451983d 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Sembunyikan <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ini akan muncul kembali saat Anda mengaktifkannya dalam setelan."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Sembunyikan"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ingin menjadi dialog volume."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Izinkan"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Tolak"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> adalah dialog volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Sentuh untuk memulihkan aslinya."</string>
</resources>
diff --git a/packages/SystemUI/res/values-is-rIS/strings.xml b/packages/SystemUI/res/values-is-rIS/strings.xml
index d688fca..c616ab3 100644
--- a/packages/SystemUI/res/values-is-rIS/strings.xml
+++ b/packages/SystemUI/res/values-is-rIS/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Fela <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Þetta birtist aftur næst þegar þú kveikir á því í stillingunum."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Fela"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> vill vera hljóðstyrksvalmyndin."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Leyfa"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Hafna"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> er hljóðstyrksvalmyndin"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Snertu til að færa í upprunalegt horf."</string>
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 9f03609..a9a7297 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Nascondere <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Verranno visualizzate di nuovo quando le riattiverai nelle impostazioni."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Nascondi"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> desidera fungere da finestra di dialogo relativa al volume"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Consenti"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Nega"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> rappresenta la finestra di dialogo relativa al volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Tocca per ripristinare l\'originale."</string>
</resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index b602158..70de38d 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"להסתיר<xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"יופיע מחדש בפעם הבאה שתפעיל את האפשרות בהגדרות."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"הסתר"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> מנסה לפעול בתור תיבת הדו-שיח של עוצמת הקול."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"התר"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"דחה"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> הוא תיבת הדו-שיח של עוצמת הקול"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"גע כדי לשחזר את עוצמת הקול המקורית."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 722c836..1b44396 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g>を非表示にしますか?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"次回、設定でONにすると再表示されます。"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"非表示"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g>が音量ダイアログとして機能します。"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"許可"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"許可しない"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>を音量ダイアログとして使用"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"タップすると元の音量ダイアログが復元されます。"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka-rGE/strings.xml
index 1a2c624..1bf9099 100644
--- a/packages/SystemUI/res/values-ka-rGE/strings.xml
+++ b/packages/SystemUI/res/values-ka-rGE/strings.xml
@@ -80,7 +80,7 @@
<string name="accessibility_back" msgid="567011538994429120">"უკან"</string>
<string name="accessibility_home" msgid="8217216074895377641">"საწყისი"</string>
<string name="accessibility_menu" msgid="316839303324695949">"მენიუ"</string>
- <string name="accessibility_recent" msgid="5208608566793607626">"გადახედვა"</string>
+ <string name="accessibility_recent" msgid="5208608566793607626">"მიმოხილვა"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ძიება"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"კამერა"</string>
<string name="accessibility_phone_button" msgid="6738112589538563574">"ტელეფონი"</string>
@@ -166,7 +166,7 @@
<string name="accessibility_desc_quick_settings" msgid="6186378411582437046">"სწრაფი პარამეტრები"</string>
<string name="accessibility_desc_lock_screen" msgid="5625143713611759164">"ეკრანის დაბლოკვა."</string>
<string name="accessibility_desc_settings" msgid="3417884241751434521">"პარამეტრები"</string>
- <string name="accessibility_desc_recent_apps" msgid="4876900986661819788">"გადახედვა."</string>
+ <string name="accessibility_desc_recent_apps" msgid="4876900986661819788">"მიმოხილვა"</string>
<string name="accessibility_quick_settings_user" msgid="1104846699869476855">"მომხმარებელი: <xliff:g id="USER">%s</xliff:g>."</string>
<string name="accessibility_quick_settings_wifi" msgid="5518210213118181692">"<xliff:g id="SIGNAL">%1$s</xliff:g>."</string>
<string name="accessibility_quick_settings_wifi_changed_off" msgid="8716484460897819400">"Wifi გამორთულია."</string>
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"დაიმალოს <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"ის კვლავ გამოჩნდება, როდესაც პარამეტრებში ჩართავთ"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"დამალვა"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> სურს იყოს ხმოვან დიალოგში."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"უფლების მიცემა"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"უარყოფა"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ხმოვან დიალოგშია"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"ორიგინალის აღდგენისათვის, შეეხეთ."</string>
</resources>
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings.xml b/packages/SystemUI/res/values-kk-rKZ/strings.xml
index 3efd5cd..805fca6 100644
--- a/packages/SystemUI/res/values-kk-rKZ/strings.xml
+++ b/packages/SystemUI/res/values-kk-rKZ/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> жасыру керек пе?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ол сіз оны параметрлерде келесі қосқанда қайта пайда болады."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Жасыру"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> көлем диалогтық терезесі болғысы келеді."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Рұқсат беру"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Өшіру"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> — көлем диалогтық терезесі"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Түпнұсқаны қалпына келтіру үшін түртіңіз."</string>
</resources>
diff --git a/packages/SystemUI/res/values-km-rKH/strings.xml b/packages/SystemUI/res/values-km-rKH/strings.xml
index d24ccda..52dd68c 100644
--- a/packages/SystemUI/res/values-km-rKH/strings.xml
+++ b/packages/SystemUI/res/values-km-rKH/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"លាក់ <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"វា​នឹង​បង្ហាញ​ពេល​ក្រោយ​ ពេល​ដែល​អ្នក​បើក​ក្នុង​ការ​កំណត់។"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"លាក់"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ចង់ក្លាយជាប្រអប់សម្លេង។"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"អនុញ្ញាត"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"បដិសេធ"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> គឺជាប្រអប់សម្លេង"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"ប៉ះដើម្បីស្តារច្បាប់ដើម។"</string>
</resources>
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index 9446616..6df8655 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> ಮರೆಮಾಡುವುದೇ?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"ನೀವು ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ ಅದನ್ನು ಆನ್ ಮಾಡಿದಾಗ ಅದು ಮರುಕಾಣಿಸಿಕೊಳ್ಳುತ್ತದೆ."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"ಮರೆಮಾಡಿ"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ವಾಲ್ಯೂಮ್ ಸಂವಾದವಾಗಲು ಬಯಸುತ್ತದೆ."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"ಅನುಮತಿಸು"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"ನಿರಾಕರಿಸು"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ವಾಲ್ಯೂಮ್ ಸಂವಾದವಾಗಿದೆ"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"ಮೂಲ ಮರುಸ್ಥಾಪಿಸಲು ಸ್ಪರ್ಶಿಸಿ."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ky-rKG/strings.xml b/packages/SystemUI/res/values-ky-rKG/strings.xml
index f33873a..d2a35cd 100644
--- a/packages/SystemUI/res/values-ky-rKG/strings.xml
+++ b/packages/SystemUI/res/values-ky-rKG/strings.xml
@@ -394,14 +394,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> жашырылсынбы?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Бул кийинки жолу жөндөөлөрдөн күйгүзүлгөндө кайра көрүнөт."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Жашыруу"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> үндү катуулатуу диалогу болгусу келет."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Уруксат берүү"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Жок"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> үндү катуулатуу диалогу"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Түпнусканы калыбына келтирүү үчүн тийип коюңуз."</string>
</resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 27b22e9..1b523a2 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Slėpti „<xliff:g id="TILE_LABEL">%1$s</xliff:g>“?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Tai bus vėl parodyta, kai kitą kartą įjungsite tai nustatymuose."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Slėpti"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"„<xliff:g id="APP_NAME">%1$s</xliff:g>“ nori būti garsumo valdymo dialogo langu."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Leisti"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Atmesti"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"„<xliff:g id="APP_NAME">%1$s</xliff:g>“ yra garsumo valdymo dialogo langas"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Palieskite, kad atkurtumėte originalą."</string>
</resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 157575f..4461006 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -370,14 +370,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Vai paslēpt vienumu <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Tas tiks atkārtoti parādīts, kad nākamreiz ieslēgsiet to iestatījumos."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Paslēpt"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> vēlas pārvaldīt skaļuma dialoglodziņu."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Atļaut"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Neatļaut"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ir skaļuma dialoglodziņš"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Pieskarieties, lai atjaunotu sākotnējo."</string>
</resources>
diff --git a/packages/SystemUI/res/values-mk-rMK/strings.xml b/packages/SystemUI/res/values-mk-rMK/strings.xml
index b6be2c9..d65bf65 100644
--- a/packages/SystemUI/res/values-mk-rMK/strings.xml
+++ b/packages/SystemUI/res/values-mk-rMK/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Сокриј <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ќе се појави повторно следниот пат кога ќе го вклучите во поставки."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Сокриј"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> сака да биде дијалог за јачина на звук."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Овозможи"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Одбиј"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> е дијалог за јачина на звук"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Допрете за да го вратите оригиналот."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ml-rIN/strings.xml b/packages/SystemUI/res/values-ml-rIN/strings.xml
index 56dd34f..467453e 100644
--- a/packages/SystemUI/res/values-ml-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ml-rIN/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> എന്നത് മറയ്‌ക്കണോ?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"അടുത്ത തവണ നിങ്ങൾ അത് ക്രമീകരണങ്ങളിൽ ഓണാക്കുമ്പോൾ അത് വീണ്ടും ദൃശ്യമാകും."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"മറയ്‌ക്കുക"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g>, വോളിയം ഡയലോഗ് ആകാൻ താൽപ്പര്യപ്പെടുന്നു."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"അനുവദിക്കുക"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"നിരസിക്കുക"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>, വോളിയം ഡയലോഗാണ്"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"യഥാർത്ഥമായത് പുനഃസ്ഥാപിക്കാൻ സ്‌പർശിക്കുക."</string>
</resources>
diff --git a/packages/SystemUI/res/values-mr-rIN/strings.xml b/packages/SystemUI/res/values-mr-rIN/strings.xml
index 10b855d..9399957 100644
--- a/packages/SystemUI/res/values-mr-rIN/strings.xml
+++ b/packages/SystemUI/res/values-mr-rIN/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> लपवायचे?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"आपण सेटिंग्जमध्ये ते पुढील वेळी चालू कराल तेव्हा ते पुन्हा दिसेल."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"लपवा"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> हा आकारमान संवाद होऊ इच्छितो."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"अनुमती द्या"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"नकार द्या"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> हा आकारमान संवाद आहे"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"मूळ पुनर्संचयित करण्यासाठी स्पर्श करा."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms-rMY/strings.xml
index 218485e..72783a5 100644
--- a/packages/SystemUI/res/values-ms-rMY/strings.xml
+++ b/packages/SystemUI/res/values-ms-rMY/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Sembunyikan <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Mesej itu akan terpapar semula pada kali seterusnya anda menghidupkan apl dalam tetapan."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Sembunyikan"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> mahu menjadi dialog kelantangan."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Benarkan"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Tolak"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ialah dialog kelantangan"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Sentuh untuk memulihkan yang asal."</string>
</resources>
diff --git a/packages/SystemUI/res/values-my-rMM/strings.xml b/packages/SystemUI/res/values-my-rMM/strings.xml
index 966ca9e..6043929 100644
--- a/packages/SystemUI/res/values-my-rMM/strings.xml
+++ b/packages/SystemUI/res/values-my-rMM/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> ဝှက်မည်လား?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"နောက်တစ်ကြိမ်သင် ချိန်ညှိချက်များဖွင့်လျှင် ၎င်းပေါ်လာပါမည်။"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"ဖျောက်ထားမည်"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> သည်အသံဒိုင်ယာလော့ခ်ဖြစ်လိုပါသည်။"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"ခွင့်ပြုသည်"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"ငြင်းပယ်သည်"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> သည် အသံဒိုင်ယာလော့ခ်ဖြစ်သည်"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"မူရင်းအားပြန်လည်သိမ်းဆည်းရန် ထိပါ။"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index f06cc66..9ea954e 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Vil du skjule <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Den vises igjen neste gang du slår den på i innstillingene."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Skjul"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ønsker å være volumdialogen."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Tillat"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Ikke tillat"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> er volumdialogen"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Trykk for å gå tilbake til den opprinnelige volumdialogen."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ne-rNP/strings.xml b/packages/SystemUI/res/values-ne-rNP/strings.xml
index b8afe9b..38b4d56 100644
--- a/packages/SystemUI/res/values-ne-rNP/strings.xml
+++ b/packages/SystemUI/res/values-ne-rNP/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"लुकाउनुहुन्छ <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"यो तपाईं सेटिङ् मा यो बारी अर्को समय देखापर्नेछ।"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"लुकाउनुहोस्"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> भोल्यूम संवाद बन्न चाहन्छ।"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"अनुमति दिनुहोस्"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"अस्वीकार गर्नुहोस्"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> भोल्यूम संवाद हो"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"मूल पुन: भण्डार गर्न छुनुहोस्।"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 9aca0f8..be46153 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> verbergen?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Deze wordt opnieuw weergegeven zodra u de instelling weer inschakelt."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Verbergen"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> wil het volumedialoogvenster zijn."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Toestaan"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Afwijzen"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is het volumedialoogvenster"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Tik hierop om het origineel te herstellen."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index c0d939f..5e6c632 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Ukryć <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Pojawi się ponownie, gdy następnym włączysz go w ustawieniach."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ukryj"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> chce sterować głośnością."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Zezwól"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Odmów"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> steruje głośnością"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Dotknij, by przywrócić pierwotną."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index d5bb452..b9977ff 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Pretende ocultar <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Reaparecerá da próxima vez que a funcionalidade for ativada nas definições."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ocultar"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> pretende ser a caixa de diálogo do volume."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permitir"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Recusar"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é a caixa de diálogo do volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Toque para restaurar o original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index c92e03f..90913c9 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Esconder <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ela reaparecerá na próxima vez que você ativá-la nas configurações."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ocultar"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> deseja ser a caixa de diálogo referente ao volume."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permitir"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Negar"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é a caixa de diálogo referente ao volume"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Toque para restaurar o original."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index f638c17..2b815ab 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -370,14 +370,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Ascundeți <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Va reapărea la următoarea activare în setări."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ascundeți"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> dorește să afișeze caseta de dialog pentru volum."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Permiteți"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Refuzați"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> afișează caseta de dialog pentru volum"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Atingeți pentru a reveni la setarea inițială."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index fb007af..8904be2 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -373,14 +373,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Скрыть параметр \"<xliff:g id="TILE_LABEL">%1$s</xliff:g>\"?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Этот параметр появится в следующий раз, когда вы включите его."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Скрыть"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"Назначить приложение <xliff:g id="APP_NAME">%1$s</xliff:g> регулятором громкости?"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Да"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Нет"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"Приложение <xliff:g id="APP_NAME">%1$s</xliff:g> назначено регулятором громкости"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Нажмите, чтобы восстановить приложение по умолчанию."</string>
</resources>
diff --git a/packages/SystemUI/res/values-si-rLK/strings.xml b/packages/SystemUI/res/values-si-rLK/strings.xml
index bb28fc9..f8d2293 100644
--- a/packages/SystemUI/res/values-si-rLK/strings.xml
+++ b/packages/SystemUI/res/values-si-rLK/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> සඟවන්නද?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"ඊළඟ අවස්ථාවේ සැකසීම් තුළ ඔබ එය සක්‍රිය කළ විට එය නැවත දිසිවේ."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"සඟවන්න"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> හට ධාරිතා සංවාදය වීමට අවශ්‍යයි"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"ඉඩ දෙන්න"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"ප්‍රතික්ෂේප කරන්න"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ධාරිතා සංවාදයයි"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"මුල් තත්වය නැවත ප්‍රතිසාධනය කිරීමට ස්පර්ශ කරන්න."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index f3ab6de..ddb45b4a 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -373,14 +373,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Skryť <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Táto položka sa znova zobrazí, keď ju v nastaveniach opätovne zapnete."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Skryť"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> chce byť dialógom hlasitosti"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Povoliť"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Odmietnuť"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je dialóg hlasitosti"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Klepnutím obnovíte originál."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 826dfd2..24b92c4 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Želite skriti <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Znova se bo pojavila, ko jo naslednjič vklopite v nastavitvah."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Skrij"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> želi biti pogovorno okno glede prostornine."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Dovoli"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Zavrni"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je pogovorno okno glede prostornine"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Dotaknite se, če želite obnoviti izvirnik."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 13b5fb6..552b377 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -370,14 +370,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Желите ли да сакријете <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Ово ће се поново појавити када га следећи пут будете укључили у подешавањима."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Сакриј"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> жели да буде дијалог за јачину звука."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Дозволи"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Одбиј"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> је дијалог за јачину звука"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Додирните да бисте вратили оригинал."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 0abb8c9..c8587c0 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Vill du dölja <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Den visas på nytt nästa gång du aktiverar den i inställningarna."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Dölj"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> försöker överta funktionen som volymkontroll."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Tillåt"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Neka"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> används som volymkontroll"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Tryck här om du vill återställa den ursprungliga appen."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 70a5809..d933224 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Ungependa kuficha <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Itaonekana tena wakati mwingine utakapoiwasha katika mipangilio."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ficha"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> inataka kuwa mazungumzo ya sauti."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Ruhusu"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Kataa"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ni mazungumzo ya sauti"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Gusa ili urejeshe ya awali."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ta-rIN/strings.xml b/packages/SystemUI/res/values-ta-rIN/strings.xml
index e211645..c9a7459 100644
--- a/packages/SystemUI/res/values-ta-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ta-rIN/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g>ஐ மறைக்கவா?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"அடுத்த முறை அமைப்புகளில் மீண்டும் இயக்கும்போது, இது மீண்டும் தோன்றும்."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"மறை"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g>, ஒலியளவு செய்தியாகச் செயல்பட விரும்புகிறது."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"அனுமதி"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"நிராகரி"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"ஒலியளவு செய்தி: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"அசலை மீட்டமைக்கத் தொடவும்."</string>
</resources>
diff --git a/packages/SystemUI/res/values-te-rIN/strings.xml b/packages/SystemUI/res/values-te-rIN/strings.xml
index 21eb37c..481acc3 100644
--- a/packages/SystemUI/res/values-te-rIN/strings.xml
+++ b/packages/SystemUI/res/values-te-rIN/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g>ని దాచాలా?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"మీరు సెట్టింగ్‌ల్లో దీన్ని ఆన్ చేసిన తదుపరిసారి ఇది కనిపిస్తుంది."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"దాచు"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> అనేది వాల్యూమ్ డైలాగ్‌గా ఉండాలనుకుంటోంది."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"అనుమతించు"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"తిరస్కరించు"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> అనేది వాల్యూమ్ డైలాగ్"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"అసలుదాన్ని పునరుద్ధరించడానికి తాకండి."</string>
</resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 6af2b0f..2aab5ff 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"ซ่อน <xliff:g id="TILE_LABEL">%1$s</xliff:g> ไหม"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"จะปรากฏอีกครั้งเมื่อคุณเปิดใช้ในการตั้งค่าครั้งถัดไป"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"ซ่อน"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ต้องการเป็่นช่องโต้ตอบระดับเสียง"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"อนุญาต"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"ปฏิเสธ"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> เป็นช่องโต้ตอบระดับเสียง"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"แตะเพื่อคืนค่าดั้งเดิม"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 2a816f0..5a36fb2 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Itago ang <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Lalabas itong muli sa susunod na pagkakataon na i-on mo ito sa mga setting."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Itago"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"Gusto ng <xliff:g id="APP_NAME">%1$s</xliff:g> na maging volume dialog."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Payagan"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Tanggihan"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"Ang <xliff:g id="APP_NAME">%1$s</xliff:g> ang volume dialog"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Pindutin upang ibalik ang orihinal."</string>
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index d90eb79..ccecdba 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Сховати <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"З’явиться знову, коли ви ввімкнете його в налаштуваннях."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Сховати"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> може стати діалоговим вікном налаштування гучності."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Дозволити"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Відхилити"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> – діалогове вікно налаштування гучності"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Торкніться, щоб відновити оригінал."</string>
</resources>
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings.xml b/packages/SystemUI/res/values-uz-rUZ/strings.xml
index 445e1f3..2e1f94f 100644
--- a/packages/SystemUI/res/values-uz-rUZ/strings.xml
+++ b/packages/SystemUI/res/values-uz-rUZ/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> berkitilsinmi?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Keyingi safar sozlamalardan yoqilgan paydo bo‘ladi."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Berkitish"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> ovoz balandligini boshqarmoqchi."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Ruxsat berish"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Rad etish"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ovoz balandligini boshqaradi"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Aslini tiklash uchun bosing."</string>
</resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 47b09da8..d3e7a14 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Ẩn <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Thông báo này sẽ xuất hiện lại vào lần tiếp theo bạn bật thông báo trong cài đặt."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Ẩn"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> muốn trở thành hộp thoại khối lượng."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Cho phép"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Từ chối"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> là hộp thoại khối lượng"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Chạm để khôi phục bản gốc."</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index a86af82..a352a23 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"隱藏 <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"下一次您在設定開啟它時,它將再次出現。"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"隱藏"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」想成為音量對話。"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"允許"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"拒絕"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」為音量對話"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"輕觸即可復原。"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 2ee2782..7cef5aa 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -371,14 +371,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"隱藏<xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"只要在設定頁面中重新啟用,就能再次看到快捷設定選項。"</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"隱藏"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> 想成為預設的音量控制對話方塊。"</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"允許"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"拒絕"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> 現在是預設的音量控制對話方塊。"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"輕觸即可還原為原始的音量控制對話方塊。"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 5cd9e4b..7bb54d6 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -369,14 +369,9 @@
<string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Fihla i-<xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
<string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Izovela ngesikhathi esilandelayo uma uvule lesi silungiselelo."</string>
<string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Fihla"</string>
- <!-- no translation found for volumeui_prompt_message (918680947433389110) -->
- <skip />
- <!-- no translation found for volumeui_prompt_allow (7954396902482228786) -->
- <skip />
- <!-- no translation found for volumeui_prompt_deny (5720663643411696731) -->
- <skip />
- <!-- no translation found for volumeui_notification_title (4906770126345910955) -->
- <skip />
- <!-- no translation found for volumeui_notification_text (1826889705095768656) -->
- <skip />
+ <string name="volumeui_prompt_message" msgid="918680947433389110">"I-<xliff:g id="APP_NAME">%1$s</xliff:g> ifuna ukuba yingxoxo yevolumu."</string>
+ <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Vumela"</string>
+ <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Phika"</string>
+ <string name="volumeui_notification_title" msgid="4906770126345910955">"I-<xliff:g id="APP_NAME">%1$s</xliff:g> yingxoxo yevolumu"</string>
+ <string name="volumeui_notification_text" msgid="1826889705095768656">"Thinta ukuze ubuyisele kokwangempela."</string>
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 0420d35..808ded5 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -483,17 +483,17 @@
<string name="accessibility_brightness">Display brightness</string>
<!-- Title of dialog shown when 2G-3G data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] -->
- <string name="data_usage_disabled_dialog_3g_title">2G-3G data is off</string>
+ <string name="data_usage_disabled_dialog_3g_title">2G-3G data is paused</string>
<!-- Title of dialog shown when 4G data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] -->
- <string name="data_usage_disabled_dialog_4g_title">4G data is off</string>
+ <string name="data_usage_disabled_dialog_4g_title">4G data is paused</string>
<!-- Title of dialog shown when mobile data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] -->
- <string name="data_usage_disabled_dialog_mobile_title">Cellular data is off</string>
+ <string name="data_usage_disabled_dialog_mobile_title">Cellular data is paused</string>
<!-- Title of dialog shown when data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] -->
- <string name="data_usage_disabled_dialog_title">Data is off</string>
+ <string name="data_usage_disabled_dialog_title">Data is paused</string>
<!-- Body of dialog shown when data usage has exceeded limit and has been disabled. [CHAR LIMIT=NONE] -->
- <string name="data_usage_disabled_dialog">Your device turned off data because it reached the limit you set.\n\nTurning it back on may lead to charges from your carrier.</string>
+ <string name="data_usage_disabled_dialog">Because your set data limit was reached, the device has paused data usage for the remainder of this cycle.\n\nResuming may lead to charges from your carrier.</string>
<!-- Dialog button indicating that data connection should be re-enabled. [CHAR LIMIT=28] -->
- <string name="data_usage_disabled_dialog_enable">Turn on data</string>
+ <string name="data_usage_disabled_dialog_enable">Resume</string>
<!-- Text to display underneath the graphical signal strength meter when
no connection is available. [CHAR LIMIT=20] -->
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index 5e150e9..e7487aa 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -887,6 +887,55 @@ public class RenderScript {
return rsnPathCreate(mContext, prim, isStatic, vtx, loop, q);
}
+ native void rsnScriptIntrinsicBLAS_Single(long con, long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ float alpha, long A, long B, float beta, long C, int incX, int incY,
+ int KL, int KU);
+ synchronized void nScriptIntrinsicBLAS_Single(long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ float alpha, long A, long B, float beta, long C, int incX, int incY,
+ int KL, int KU) {
+ validate();
+ rsnScriptIntrinsicBLAS_Single(mContext, id, func, TransA, TransB, Side, Uplo, Diag, M, N, K, alpha, A, B, beta, C, incX, incY, KL, KU);
+ }
+
+ native void rsnScriptIntrinsicBLAS_Double(long con, long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ double alpha, long A, long B, double beta, long C, int incX, int incY,
+ int KL, int KU);
+ synchronized void nScriptIntrinsicBLAS_Double(long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ double alpha, long A, long B, double beta, long C, int incX, int incY,
+ int KL, int KU) {
+ validate();
+ rsnScriptIntrinsicBLAS_Double(mContext, id, func, TransA, TransB, Side, Uplo, Diag, M, N, K, alpha, A, B, beta, C, incX, incY, KL, KU);
+ }
+
+ native void rsnScriptIntrinsicBLAS_Complex(long con, long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ float alphaX, float alphaY, long A, long B, float betaX, float betaY, long C, int incX, int incY,
+ int KL, int KU);
+ synchronized void nScriptIntrinsicBLAS_Complex(long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ float alphaX, float alphaY, long A, long B, float betaX, float betaY, long C, int incX, int incY,
+ int KL, int KU) {
+ validate();
+ rsnScriptIntrinsicBLAS_Complex(mContext, id, func, TransA, TransB, Side, Uplo, Diag, M, N, K, alphaX, alphaY, A, B, betaX, betaY, C, incX, incY, KL, KU);
+ }
+
+ native void rsnScriptIntrinsicBLAS_Z(long con, long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ double alphaX, double alphaY, long A, long B, double betaX, double betaY, long C, int incX, int incY,
+ int KL, int KU);
+ synchronized void nScriptIntrinsicBLAS_Z(long id, int func, int TransA,
+ int TransB, int Side, int Uplo, int Diag, int M, int N, int K,
+ double alphaX, double alphaY, long A, long B, double betaX, double betaY, long C, int incX, int incY,
+ int KL, int KU) {
+ validate();
+ rsnScriptIntrinsicBLAS_Z(mContext, id, func, TransA, TransB, Side, Uplo, Diag, M, N, K, alphaX, alphaY, A, B, betaX, betaY, C, incX, incY, KL, KU);
+ }
+
+
long mDev;
long mContext;
@SuppressWarnings({"FieldCanBeLocal"})
diff --git a/rs/java/android/renderscript/ScriptIntrinsicBLAS.java b/rs/java/android/renderscript/ScriptIntrinsicBLAS.java
new file mode 100644
index 0000000..90d2300
--- /dev/null
+++ b/rs/java/android/renderscript/ScriptIntrinsicBLAS.java
@@ -0,0 +1,1489 @@
+/*
+ * Copyright (C) 2015 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 android.renderscript;
+
+import android.annotation.IntDef;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ *
+ * BLAS
+ *
+ * @hide
+ **/
+public final class ScriptIntrinsicBLAS extends ScriptIntrinsic {
+ private Allocation mLUT;
+
+ private ScriptIntrinsicBLAS(long id, RenderScript rs) {
+ super(id, rs);
+ }
+
+ private static final int RsBlas_sdsdot = 1;
+ private static final int RsBlas_dsdot = 2;
+ private static final int RsBlas_sdot = 3;
+ private static final int RsBlas_ddot = 4;
+ private static final int RsBlas_cdotu_sub = 5;
+ private static final int RsBlas_cdotc_sub = 6;
+ private static final int RsBlas_zdotu_sub = 7;
+ private static final int RsBlas_zdotc_sub = 8;
+ private static final int RsBlas_snrm2 = 9;
+ private static final int RsBlas_sasum = 10;
+ private static final int RsBlas_dnrm2 = 11;
+ private static final int RsBlas_dasum = 12;
+ private static final int RsBlas_scnrm2 = 13;
+ private static final int RsBlas_scasum = 14;
+ private static final int RsBlas_dznrm2 = 15;
+ private static final int RsBlas_dzasum = 16;
+ private static final int RsBlas_isamax = 17;
+ private static final int RsBlas_idamax = 18;
+ private static final int RsBlas_icamax = 19;
+ private static final int RsBlas_izamax = 20;
+ private static final int RsBlas_sswap = 21;
+ private static final int RsBlas_scopy = 22;
+ private static final int RsBlas_saxpy = 23;
+ private static final int RsBlas_dswap = 24;
+ private static final int RsBlas_dcopy = 25;
+ private static final int RsBlas_daxpy = 26;
+ private static final int RsBlas_cswap = 27;
+ private static final int RsBlas_ccopy = 28;
+ private static final int RsBlas_caxpy = 29;
+ private static final int RsBlas_zswap = 30;
+ private static final int RsBlas_zcopy = 31;
+ private static final int RsBlas_zaxpy = 32;
+ private static final int RsBlas_srotg = 33;
+ private static final int RsBlas_srotmg = 34;
+ private static final int RsBlas_srot = 35;
+ private static final int RsBlas_srotm = 36;
+ private static final int RsBlas_drotg = 37;
+ private static final int RsBlas_drotmg = 38;
+ private static final int RsBlas_drot = 39;
+ private static final int RsBlas_drotm = 40;
+ private static final int RsBlas_sscal = 41;
+ private static final int RsBlas_dscal = 42;
+ private static final int RsBlas_cscal = 43;
+ private static final int RsBlas_zscal = 44;
+ private static final int RsBlas_csscal = 45;
+ private static final int RsBlas_zdscal = 46;
+ private static final int RsBlas_sgemv = 47;
+ private static final int RsBlas_sgbmv = 48;
+ private static final int RsBlas_strmv = 49;
+ private static final int RsBlas_stbmv = 50;
+ private static final int RsBlas_stpmv = 51;
+ private static final int RsBlas_strsv = 52;
+ private static final int RsBlas_stbsv = 53;
+ private static final int RsBlas_stpsv = 54;
+ private static final int RsBlas_dgemv = 55;
+ private static final int RsBlas_dgbmv = 56;
+ private static final int RsBlas_dtrmv = 57;
+ private static final int RsBlas_dtbmv = 58;
+ private static final int RsBlas_dtpmv = 59;
+ private static final int RsBlas_dtrsv = 60;
+ private static final int RsBlas_dtbsv = 61;
+ private static final int RsBlas_dtpsv = 62;
+ private static final int RsBlas_cgemv = 63;
+ private static final int RsBlas_cgbmv = 64;
+ private static final int RsBlas_ctrmv = 65;
+ private static final int RsBlas_ctbmv = 66;
+ private static final int RsBlas_ctpmv = 67;
+ private static final int RsBlas_ctrsv = 68;
+ private static final int RsBlas_ctbsv = 69;
+ private static final int RsBlas_ctpsv = 70;
+ private static final int RsBlas_zgemv = 71;
+ private static final int RsBlas_zgbmv = 72;
+ private static final int RsBlas_ztrmv = 73;
+ private static final int RsBlas_ztbmv = 74;
+ private static final int RsBlas_ztpmv = 75;
+ private static final int RsBlas_ztrsv = 76;
+ private static final int RsBlas_ztbsv = 77;
+ private static final int RsBlas_ztpsv = 78;
+ private static final int RsBlas_ssymv = 79;
+ private static final int RsBlas_ssbmv = 80;
+ private static final int RsBlas_sspmv = 81;
+ private static final int RsBlas_sger = 82;
+ private static final int RsBlas_ssyr = 83;
+ private static final int RsBlas_sspr = 84;
+ private static final int RsBlas_ssyr2 = 85;
+ private static final int RsBlas_sspr2 = 86;
+ private static final int RsBlas_dsymv = 87;
+ private static final int RsBlas_dsbmv = 88;
+ private static final int RsBlas_dspmv = 89;
+ private static final int RsBlas_dger = 90;
+ private static final int RsBlas_dsyr = 91;
+ private static final int RsBlas_dspr = 92;
+ private static final int RsBlas_dsyr2 = 93;
+ private static final int RsBlas_dspr2 = 94;
+ private static final int RsBlas_chemv = 95;
+ private static final int RsBlas_chbmv = 96;
+ private static final int RsBlas_chpmv = 97;
+ private static final int RsBlas_cgeru = 98;
+ private static final int RsBlas_cgerc = 99;
+ private static final int RsBlas_cher = 100;
+ private static final int RsBlas_chpr = 101;
+ private static final int RsBlas_cher2 = 102;
+ private static final int RsBlas_chpr2 = 103;
+ private static final int RsBlas_zhemv = 104;
+ private static final int RsBlas_zhbmv = 105;
+ private static final int RsBlas_zhpmv = 106;
+ private static final int RsBlas_zgeru = 107;
+ private static final int RsBlas_zgerc = 108;
+ private static final int RsBlas_zher = 109;
+ private static final int RsBlas_zhpr = 110;
+ private static final int RsBlas_zher2 = 111;
+ private static final int RsBlas_zhpr2 = 112;
+ private static final int RsBlas_sgemm = 113;
+ private static final int RsBlas_ssymm = 114;
+ private static final int RsBlas_ssyrk = 115;
+ private static final int RsBlas_ssyr2k = 116;
+ private static final int RsBlas_strmm = 117;
+ private static final int RsBlas_strsm = 118;
+ private static final int RsBlas_dgemm = 119;
+ private static final int RsBlas_dsymm = 120;
+ private static final int RsBlas_dsyrk = 121;
+ private static final int RsBlas_dsyr2k = 122;
+ private static final int RsBlas_dtrmm = 123;
+ private static final int RsBlas_dtrsm = 124;
+ private static final int RsBlas_cgemm = 125;
+ private static final int RsBlas_csymm = 126;
+ private static final int RsBlas_csyrk = 127;
+ private static final int RsBlas_csyr2k = 128;
+ private static final int RsBlas_ctrmm = 129;
+ private static final int RsBlas_ctrsm = 130;
+ private static final int RsBlas_zgemm = 131;
+ private static final int RsBlas_zsymm = 132;
+ private static final int RsBlas_zsyrk = 133;
+ private static final int RsBlas_zsyr2k = 134;
+ private static final int RsBlas_ztrmm = 135;
+ private static final int RsBlas_ztrsm = 136;
+ private static final int RsBlas_chemm = 137;
+ private static final int RsBlas_cherk = 138;
+ private static final int RsBlas_cher2k = 139;
+ private static final int RsBlas_zhemm = 140;
+ private static final int RsBlas_zherk = 141;
+ private static final int RsBlas_zher2k = 142;
+
+ /**
+ */
+ public static ScriptIntrinsicBLAS create(RenderScript rs) {
+ long id = rs.nScriptIntrinsicCreate(13, Element.U32(rs).getID(rs));
+ return new ScriptIntrinsicBLAS(id, rs);
+ }
+
+ @IntDef({NO_TRANSPOSE, TRANSPOSE, CONJ_TRANSPOSE})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Transpose {}
+
+ @IntDef({UPPER, LOWER})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Uplo {}
+
+ @IntDef({NON_UNIT, UNIT})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Diag {}
+
+ @IntDef({LEFT, RIGHT})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Side {}
+
+ public static final int NO_TRANSPOSE = 111;
+ public static final int TRANSPOSE = 112;
+ public static final int CONJ_TRANSPOSE = 113;
+
+ public static final int UPPER = 121;
+ public static final int LOWER = 122;
+
+ public static final int NON_UNIT = 131;
+ public static final int UNIT = 132;
+
+ public static final int LEFT = 141;
+ public static final int RIGHT = 142;
+
+ static void validateSide(@Side int Side) {
+ if (Side != LEFT && Side != RIGHT) {
+ throw new RSRuntimeException("Invalid side passed to BLAS");
+ }
+ }
+
+ static void validateTranspose(@Transpose int Trans) {
+ if (Trans != NO_TRANSPOSE && Trans != TRANSPOSE &&
+ Trans != CONJ_TRANSPOSE) {
+ throw new RSRuntimeException("Invalid transpose passed to BLAS");
+ }
+ }
+
+ static void validateConjTranspose(@Transpose int Trans) {
+ if (Trans != NO_TRANSPOSE &&
+ Trans != CONJ_TRANSPOSE) {
+ throw new RSRuntimeException("Invalid transpose passed to BLAS");
+ }
+ }
+
+ static void validateDiag(@Diag int Diag) {
+ if (Diag != NON_UNIT && Diag != UNIT) {
+ throw new RSRuntimeException("Invalid diag passed to BLAS");
+ }
+ }
+
+ static void validateUplo(@Uplo int Uplo) {
+ if (Uplo != LEFT && Uplo != RIGHT) {
+ throw new RSRuntimeException("Invalid uplo passed to BLAS");
+ }
+ }
+
+
+ /**
+ * Level 2 BLAS
+ */
+
+ static void validateGEMV(Element e, int TransA, Allocation A, Allocation X, int incX, Allocation Y, int incY) {
+ validateTranspose(TransA);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (incX <= 0 || incY <= 0) {
+ throw new RSRuntimeException("Vector increments must be greater than 0");
+ }
+ int expectedXDim = -1, expectedYDim = -1;
+ if (TransA == NO_TRANSPOSE) {
+ expectedXDim = 1 + (N - 1) * incX;
+ expectedYDim = 1 + (M - 1) * incY;
+ } else {
+ expectedXDim = 1 + (M - 1) * incX;
+ expectedYDim = 1 + (N - 1) * incY;
+ }
+ if (X.getType().getX() != expectedXDim ||
+ Y.getType().getY() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for GEMV");
+ }
+ }
+ void SGEMV(@Transpose int TransA, float alpha, Allocation A, Allocation X, int incX, float beta, Allocation Y, int incY) {
+ validateGEMV(Element.F32(mRS), TransA, A, X, incX, Y, incY);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sgemv, TransA, 0, 0, 0, 0, M, N, 0, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void DGEMV(@Transpose int TransA, double alpha, Allocation A, Allocation X, int incX, double beta, Allocation Y, int incY) {
+ validateGEMV(Element.F64(mRS), TransA, A, X, incX, Y, incY);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dgemv, TransA, 0, 0, 0, 0, M, N, 0, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void CGEMV(@Transpose int TransA, Float2 alpha, Allocation A, Allocation X, int incX, Float2 beta, Allocation Y, int incY) {
+ validateGEMV(Element.F32_2(mRS), TransA, A, X, incX, Y, incY);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cgemv, TransA, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZGEMV(@Transpose int TransA, Double2 alpha, Allocation A, Allocation X, int incX, Double2 beta, Allocation Y, int incY) {
+ validateGEMV(Element.F64_2(mRS), TransA, A, X, incX, Y, incY);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zgemv, TransA, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+
+ void SGBMV(@Transpose int TransA, int KL, int KU, float alpha, Allocation A, Allocation X, int incX, float beta, Allocation Y, int incY) {
+ // GBMV has the same validation requirements as GEMV + KL and KU >= 0
+ validateGEMV(Element.F32(mRS), TransA, A, X, incX, Y, incY);
+ if (KL < 0 || KU < 0) {
+ throw new RSRuntimeException("KL and KU must be greater than or equal to 0");
+ }
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sgbmv, TransA, 0, 0, 0, 0, M, N, 0, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, KL, KU);
+ }
+ void DGBMV(@Transpose int TransA, int KL, int KU, double alpha, Allocation A, Allocation X, int incX, double beta, Allocation Y, int incY) {
+ // GBMV has the same validation requirements as GEMV + KL and KU >= 0
+ validateGEMV(Element.F64(mRS), TransA, A, X, incX, Y, incY);
+ if (KL < 0 || KU < 0) {
+ throw new RSRuntimeException("KL and KU must be greater than or equal to 0");
+ }
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dgbmv, TransA, 0, 0, 0, 0, M, N, 0, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, KL, KU);
+ }
+ void CGBMV(@Transpose int TransA, int KL, int KU, Float2 alpha, Allocation A, Allocation X, int incX, Float2 beta, Allocation Y, int incY) {
+ // GBMV has the same validation requirements as GEMV + KL and KU >= 0
+ validateGEMV(Element.F32_2(mRS), TransA, A, X, incX, Y, incY);
+ if (KL < 0 || KU < 0) {
+ throw new RSRuntimeException("KL and KU must be greater than or equal to 0");
+ }
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cgbmv, TransA, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, KL, KU);
+ }
+ void ZGBMV(@Transpose int TransA, int KL, int KU, Double2 alpha, Allocation A, Allocation X, int incX, Double2 beta, Allocation Y, int incY) {
+ // GBMV has the same validation requirements as GEMV + KL and KU >= 0
+ validateGEMV(Element.F64_2(mRS), TransA, A, X, incX, Y, incY);
+ if (KL < 0 || KU < 0) {
+ throw new RSRuntimeException("KL and KU must be greater than or equal to 0");
+ }
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zgbmv, TransA, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, KL, KU);
+ }
+
+ static void validateTRMV(Element e, @Transpose int TransA, Allocation A, Allocation X, int incX) {
+ validateTranspose(TransA);
+ int N = A.getType().getY();
+ if (A.getType().getX() != N) {
+ throw new RSRuntimeException("A must be a square matrix for TRMV");
+ }
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (incX <= 0) {
+ throw new RSRuntimeException("Vector increments must be greater than 0");
+ }
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for TRMV");
+ }
+ }
+
+ static int validateTPMV(Element e, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ validateTranspose(TransA);
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ if (!Ap.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (Ap.getType().getY() > 1) {
+ throw new RSRuntimeException("Ap must have a Y dimension of 0 or 1");
+ }
+
+ int N = (int)Math.sqrt((double)Ap.getType().getX() * 2);
+ if (Ap.getType().getX() != ((N * (N+1)) / 2)) {
+ throw new RSRuntimeException("Invalid dimension for Ap");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SYMV");
+ }
+
+ return N;
+ }
+
+ void STRMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ validateTRMV(Element.F32(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_strmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void DTRMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ validateTRMV(Element.F64(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dtrmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void CTRMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ validateTRMV(Element.F32_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ctrmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void ZTRMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ validateTRMV(Element.F64_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ztrmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void STBMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBMV has the same requirements as TRMV
+ validateTRMV(Element.F32(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_stbmv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void DTBMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBMV has the same requirements as TRMV
+ validateTRMV(Element.F64(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dtbmv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void CTBMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBMV has the same requirements as TRMV
+ validateTRMV(Element.F32_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ctbmv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void ZTBMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBMV has the same requirements as TRMV
+ validateTRMV(Element.F64_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ztbmv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void STPMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ int N = validateTPMV(Element.F32(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_stpmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void DTPMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ int N = validateTPMV(Element.F64(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dtpmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void CTPMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ int N = validateTPMV(Element.F32_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ctpmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void ZTPMV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ int N = validateTPMV(Element.F64_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ztpmv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void STRSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ // TRSV is the same as TRMV
+ validateTRMV(Element.F32(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_strsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+
+ }
+ void DTRSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ // TRSV is the same as TRMV
+ validateTRMV(Element.F64(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dtrsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+
+ }
+ void CTRSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ // TRSV is the same as TRMV
+ validateTRMV(Element.F32_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ctrsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+
+ }
+ void ZTRSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation A, Allocation X, int incX) {
+ // TRSV is the same as TRMV
+ validateTRMV(Element.F64_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ztrsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+
+ }
+ void STBSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBSV is the same as TRMV
+ validateTRMV(Element.F32(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ if (K < 0) {
+ throw new RSRuntimeException("Number of diagonals must be positive");
+ }
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_stbsv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void DTBSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBSV is the same as TRMV
+ validateTRMV(Element.F64(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ if (K < 0) {
+ throw new RSRuntimeException("Number of diagonals must be positive");
+ }
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dtbsv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, A.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void CTBSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBSV is the same as TRMV
+ validateTRMV(Element.F32_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ if (K < 0) {
+ throw new RSRuntimeException("Number of diagonals must be positive");
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ctbsv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void ZTBSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, int K, Allocation A, Allocation X, int incX) {
+ // TBSV is the same as TRMV
+ validateTRMV(Element.F64_2(mRS), TransA, A, X, incX);
+ int N = A.getType().getY();
+ if (K < 0) {
+ throw new RSRuntimeException("Number of diagonals must be positive");
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ztbsv, TransA, 0, 0, Uplo, Diag, 0, N, K, 0, 0, A.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void STPSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ // TPSV is same as TPMV
+ int N = validateTPMV(Element.F32(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_stpsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void DTPSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ // TPSV is same as TPMV
+ int N = validateTPMV(Element.F64(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dtpsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, incX, 0, 0, 0);
+ }
+ void CTPSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ // TPSV is same as TPMV
+ int N = validateTPMV(Element.F32_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ctpsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+ void ZTPSV(@Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Allocation Ap, Allocation X, int incX) {
+ // TPSV is same as TPMV
+ int N = validateTPMV(Element.F64_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ztpsv, TransA, 0, 0, Uplo, Diag, 0, N, 0, 0, 0, Ap.getID(mRS), X.getID(mRS), 0, 0, 0, incX, 0, 0, 0);
+ }
+
+ /**
+ * Level 2, S and D only
+ */
+ static int validateSYMV(Element e, @Uplo int Uplo, Allocation A, Allocation X, Allocation Y, int incX, int incY) {
+ validateUplo(Uplo);
+ int N = A.getType().getY();
+ if (A.getType().getX() != N) {
+ throw new RSRuntimeException("A must be a square matrix for SYMV");
+ }
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e) ) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (incX <= 0 || incY <= 0) {
+ throw new RSRuntimeException("Vector increments must be greater than 0");
+ }
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SYMV");
+ }
+ int expectedYDim = 1 + (N - 1) * incY;
+ if (Y.getType().getX() != expectedYDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SYMV");
+ }
+ return N;
+ }
+ static int validateSPMV(Element e, @Uplo int Uplo, Allocation Ap, Allocation X, int incX, Allocation Y, int incY) {
+ validateUplo(Uplo);
+ if (!Ap.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (Ap.getType().getY() > 1) {
+ throw new RSRuntimeException("Ap must have a Y dimension of 0 or 1");
+ }
+
+ int N = (int)Math.sqrt((double)Ap.getType().getX() * 2);
+ if (Ap.getType().getX() != ((N * (N+1)) / 2)) {
+ throw new RSRuntimeException("Invalid dimension for Ap");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SPMV");
+ }
+ int expectedYDim = 1 + (N - 1) * incY;
+ if (Y.getType().getX() != expectedYDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SPMV");
+ }
+
+ return N;
+ }
+ static void validateGER(Element e, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e) ) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+
+ if (N < 1 || M < 1) {
+ throw new RSRuntimeException("M and N must be 1 or greater for GER");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for GER");
+ }
+ int expectedYDim = 1 + (N - 1) * incY;
+ if (Y.getType().getX() != expectedYDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for GER");
+ }
+
+
+ }
+ static int validateSYR(Element e, @Uplo int Uplo, Allocation X, int incX, Allocation A) {
+ validateUplo(Uplo);
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+
+ int N = A.getType().getX();
+
+ if (X.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+ if (N != A.getType().getY()) {
+ throw new RSRuntimeException("A must be a symmetric matrix");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SYR");
+ }
+ return N;
+ }
+ static int validateSPR(Element e, @Uplo int Uplo, Allocation X, int incX, Allocation Ap) {
+ validateUplo(Uplo);
+ if (!Ap.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (Ap.getType().getY() > 1) {
+ throw new RSRuntimeException("Ap must have a Y dimension of 0 or 1");
+ }
+
+ int N = (int)Math.sqrt((double)Ap.getType().getX() * 2);
+ if (Ap.getType().getX() != ((N * (N+1)) / 2)) {
+ throw new RSRuntimeException("Invalid dimension for Ap");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SPMV");
+ }
+
+ return N;
+ }
+
+ static int validateSYR2(Element e, @Uplo int Uplo, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ validateUplo(Uplo);
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ int N = A.getType().getX();
+
+ if (N != A.getType().getY()) {
+ throw new RSRuntimeException("A must be a symmetric matrix");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ int expectedYDim = 1 + (N - 1) * incY;
+ if (X.getType().getX() != expectedXDim || Y.getType().getX() != expectedYDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SYR");
+ }
+ return N;
+
+ }
+ static int validateSPR2(Element e, @Uplo int Uplo, Allocation X, int incX, Allocation Y, int incY, Allocation Ap) {
+ validateUplo(Uplo);
+ if (!Ap.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ if (Ap.getType().getY() > 1) {
+ throw new RSRuntimeException("Ap must have a Y dimension of 0 or 1");
+ }
+
+ int N = (int)Math.sqrt((double)Ap.getType().getX() * 2);
+ if (Ap.getType().getX() != ((N * (N+1)) / 2)) {
+ throw new RSRuntimeException("Invalid dimension for Ap");
+ }
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ int expectedYDim = 1 + (N - 1) * incY;
+ if (X.getType().getX() != expectedXDim || Y.getType().getX() != expectedYDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for SPMV");
+ }
+
+ return N;
+ }
+
+ void SSYMV(@Uplo int Uplo, float alpha, Allocation A, Allocation X, int incX, float beta, Allocation Y, int incY) {
+ int N = validateSYMV(Element.F32(mRS), Uplo, A, X, Y, incX, incY);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssymv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void SSBMV(@Uplo int Uplo, int K, float alpha, Allocation A, Allocation X, int incX, float beta, Allocation Y, int incY) {
+ // SBMV is the same as SYMV
+ int N = validateSYMV(Element.F32(mRS), Uplo, A, X, Y, incX, incY);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssbmv, 0, 0, 0, Uplo, 0, 0, N, K, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void SSPMV(@Uplo int Uplo, float alpha, Allocation Ap, Allocation X, int incX, float beta, Allocation Y, int incY) {
+ int N = validateSPMV(Element.F32(mRS), Uplo, Ap, X, incX, Y, incY);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sspmv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, Ap.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void SGER(float alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sger, 0, 0, 0, 0, 0, M, N, 0, alpha, X.getID(mRS), Y.getID(mRS), 0.f, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void SSYR(@Uplo int Uplo, float alpha, Allocation X, int incX, Allocation A) {
+ int N = validateSYR(Element.F32(mRS), Uplo, X, incX, A);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssyr, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), A.getID(mRS), 0.f, 0, incX, 0, 0, 0);
+ }
+ void SSPR(@Uplo int Uplo, float alpha, Allocation X, int incX, Allocation Ap) {
+ int N = validateSPR(Element.F32(mRS), Uplo, X, incX, Ap);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sspr, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), Ap.getID(mRS), 0.f, 0, incX, 0, 0, 0);
+ }
+ void SSYR2(@Uplo int Uplo, float alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ int N = validateSYR2(Element.F32(mRS), Uplo, X, incX, Y, incY, A);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssyr2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), Y.getID(mRS), 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void SSPR2(@Uplo int Uplo, float alpha, Allocation X, int incX, Allocation Y, int incY, Allocation Ap) {
+ int N = validateSPR2(Element.F32(mRS), Uplo, X, incX, Y, incY, Ap);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sspr2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), Y.getID(mRS), 0, Ap.getID(mRS), incX, incY, 0, 0);
+ }
+ void DSYMV(@Uplo int Uplo, double alpha, Allocation A, Allocation X, int incX, double beta, Allocation Y, int incY) {
+ int N = validateSYMV(Element.F64(mRS), Uplo, A, X, Y, incX, incY);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsymv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void DSBMV(@Uplo int Uplo, int K, double alpha, Allocation A, Allocation X, int incX, double beta, Allocation Y, int incY) {
+ // SBMV is the same as SYMV
+ int N = validateSYMV(Element.F64(mRS), Uplo, A, X, Y, incX, incY);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsbmv, 0, 0, 0, Uplo, 0, 0, N, K, alpha, A.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void DSPMV(@Uplo int Uplo, double alpha, Allocation Ap, Allocation X, int incX, double beta, Allocation Y, int incY) {
+ int N = validateSPMV(Element.F64(mRS), Uplo, Ap, X, incX, Y, incY);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dspmv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, Ap.getID(mRS), X.getID(mRS), beta, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void DGER(double alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dger, 0, 0, 0, 0, 0, M, N, 0, alpha, X.getID(mRS), Y.getID(mRS), 0.f, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void DSYR(@Uplo int Uplo, double alpha, Allocation X, int incX, Allocation A) {
+ int N = validateSYR(Element.F64(mRS), Uplo, X, incX, A);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsyr, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), A.getID(mRS), 0.f, 0, incX, 0, 0, 0);
+ }
+ void DSPR(@Uplo int Uplo, double alpha, Allocation X, int incX, Allocation Ap) {
+ int N = validateSPR(Element.F64(mRS), Uplo, X, incX, Ap);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dspr, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), Ap.getID(mRS), 0.f, 0, incX, 0, 0, 0);
+ }
+ void DSYR2(@Uplo int Uplo, double alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ int N = validateSYR2(Element.F64(mRS), Uplo, X, incX, Y, incY, A);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsyr2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), Y.getID(mRS), 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void DSPR2(@Uplo int Uplo, double alpha, Allocation X, int incX, Allocation Y, int incY, Allocation Ap) {
+ int N = validateSPR2(Element.F64(mRS), Uplo, X, incX, Y, incY, Ap);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dspr2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, X.getID(mRS), Y.getID(mRS), 0, Ap.getID(mRS), incX, incY, 0, 0);
+ }
+
+
+ /**
+ * Level 2, C and Z only
+ */
+
+ static void validateGERU(Element e, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ if (!A.getType().getElement().isCompatible(e) ||
+ !X.getType().getElement().isCompatible(e) ||
+ !Y.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (X.getType().getY() > 1 || Y.getType().getY() > 1) {
+ throw new RSRuntimeException("BLAS vectors must have Y dimension of 0 or 1");
+ }
+
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+
+ int expectedXDim = 1 + (N - 1) * incX;
+ if (X.getType().getX() != expectedXDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for GERU");
+ }
+ int expectedYDim = 1 + (N - 1) * incY;
+ if (Y.getType().getX() != expectedYDim) {
+ throw new RSRuntimeException("Incorrect vector dimensions for GERU");
+ }
+
+ }
+
+ void CHEMV(@Uplo int Uplo, Float2 alpha, Allocation A, Allocation X, int incX, Float2 beta, Allocation Y, int incY) {
+ // HEMV is the same as SYR2 validation-wise
+ int N = validateSYR2(Element.F32_2(mRS), Uplo, X, incX, Y, incY, A);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chemv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void CHBMV(@Uplo int Uplo, int K, Float2 alpha, Allocation A, Allocation X, int incX, Float2 beta, Allocation Y, int incY) {
+ // HBMV is the same as SYR2 validation-wise
+ int N = validateSYR2(Element.F32_2(mRS), Uplo, X, incX, Y, incY, A);
+ if (K < 0) {
+ throw new RSRuntimeException("K must be 0 or greater for HBMV");
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chbmv, 0, 0, 0, Uplo, 0, 0, N, K, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void CHPMV(@Uplo int Uplo, Float2 alpha, Allocation Ap, Allocation X, int incX, Float2 beta, Allocation Y, int incY) {
+ // HPMV is the same as SPR2
+ int N = validateSPR2(Element.F32_2(mRS), Uplo, X, incX, Y, incY, Ap);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chpmv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, Ap.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void CGERU(Float2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ validateGERU(Element.F32_2(mRS), X, incX, Y, incY, A);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cgeru, 0, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void CGERC(Float2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ // same as GERU
+ validateGERU(Element.F32_2(mRS), X, incX, Y, incY, A);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cgerc, 0, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void CHER(@Uplo int Uplo, float alpha, Allocation X, int incX, Allocation A) {
+ // same as SYR
+ int N = validateSYR(Element.F32(mRS), Uplo, X, incX, A);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cher, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, 0, X.getID(mRS), 0, 0, 0, A.getID(mRS), incX, 0, 0, 0);
+ }
+ void CHPR(@Uplo int Uplo, float alpha, Allocation X, int incX, Allocation Ap) {
+ // equivalent to SPR for validation
+ int N = validateSPR(Element.F32_2(mRS), Uplo, X, incX, Ap);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chpr, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, 0, X.getID(mRS), 0, 0, 0, Ap.getID(mRS), incX, 0, 0, 0);
+ }
+ void CHER2(@Uplo int Uplo, Float2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ // same as SYR2
+ int N = validateSYR2(Element.F32_2(mRS), Uplo, X, incX, Y, incY, A);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cher2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void CHPR2(@Uplo int Uplo, Float2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation Ap) {
+ // same as SPR2
+ int N = validateSPR2(Element.F32_2(mRS), Uplo, X, incX, Y, incY, Ap);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chpr2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, Ap.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZHEMV(@Uplo int Uplo, Double2 alpha, Allocation A, Allocation X, int incX, Double2 beta, Allocation Y, int incY) {
+ // HEMV is the same as SYR2 validation-wise
+ int N = validateSYR2(Element.F64_2(mRS), Uplo, X, incX, Y, incY, A);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhemv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZHBMV(@Uplo int Uplo, int K, Double2 alpha, Allocation A, Allocation X, int incX, Double2 beta, Allocation Y, int incY) {
+ // HBMV is the same as SYR2 validation-wise
+ int N = validateSYR2(Element.F64_2(mRS), Uplo, X, incX, Y, incY, A);
+ if (K < 0) {
+ throw new RSRuntimeException("K must be 0 or greater for HBMV");
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhbmv, 0, 0, 0, Uplo, 0, 0, N, K, alpha.x, alpha.y, A.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZHPMV(@Uplo int Uplo, Double2 alpha, Allocation Ap, Allocation X, int incX, Double2 beta, Allocation Y, int incY) {
+ // HPMV is the same as SPR2
+ int N = validateSPR2(Element.F64_2(mRS), Uplo, X, incX, Y, incY, Ap);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhpmv, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, Ap.getID(mRS), X.getID(mRS), beta.x, beta.y, Y.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZGERU(Double2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ validateGERU(Element.F64_2(mRS), X, incX, Y, incY, A);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zgeru, 0, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZGERC(Double2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ // same as GERU
+ validateGERU(Element.F64_2(mRS), X, incX, Y, incY, A);
+ int M = A.getType().getY();
+ int N = A.getType().getX();
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zgerc, 0, 0, 0, 0, 0, M, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZHER(@Uplo int Uplo, double alpha, Allocation X, int incX, Allocation A) {
+ // same as SYR
+ int N = validateSYR(Element.F64(mRS), Uplo, X, incX, A);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zher, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, 0, X.getID(mRS), 0, 0, 0, A.getID(mRS), incX, 0, 0, 0);
+ }
+ void ZHPR(@Uplo int Uplo, double alpha, Allocation X, int incX, Allocation Ap) {
+ // equivalent to SPR for validation
+ int N = validateSPR(Element.F64_2(mRS), Uplo, X, incX, Ap);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhpr, 0, 0, 0, Uplo, 0, 0, N, 0, alpha, 0, X.getID(mRS), 0, 0, 0, Ap.getID(mRS), incX, 0, 0, 0);
+ }
+ void ZHER2(@Uplo int Uplo, Double2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation A) {
+ // same as SYR2
+ int N = validateSYR2(Element.F64_2(mRS), Uplo, X, incX, Y, incY, A);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zher2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, A.getID(mRS), incX, incY, 0, 0);
+ }
+ void ZHPR2(@Uplo int Uplo, Double2 alpha, Allocation X, int incX, Allocation Y, int incY, Allocation Ap) {
+ // same as SPR2
+ int N = validateSPR2(Element.F64_2(mRS), Uplo, X, incX, Y, incY, Ap);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhpr2, 0, 0, 0, Uplo, 0, 0, N, 0, alpha.x, alpha.y, X.getID(mRS), Y.getID(mRS), 0, 0, Ap.getID(mRS), incX, incY, 0, 0);
+ }
+
+
+ /**
+ * Level 3 BLAS
+ */
+
+ static void validateL3(Element e, int TransA, int TransB, int Side, Allocation A, Allocation B, Allocation C) {
+ int aX = -1, aY = -1, bX = -1, bY = -1, cX = -1, cY = -1;
+ if ((A != null && !A.getType().getElement().isCompatible(e)) ||
+ (B != null && !B.getType().getElement().isCompatible(e)) ||
+ (C != null && !C.getType().getElement().isCompatible(e))) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (C != null) {
+ cX = C.getType().getY();
+ cY = C.getType().getX();
+ }
+ if (Side == RIGHT) {
+ if (B != null) {
+ bX = A.getType().getY();
+ bY = A.getType().getX();
+ }
+ if (A != null) {
+ aX = B.getType().getY();
+ aY = B.getType().getX();
+ }
+ } else {
+ if (A != null) {
+ if (TransA == TRANSPOSE) {
+ aY = A.getType().getY();
+ aX = A.getType().getX();
+ } else {
+ aX = A.getType().getY();
+ aY = A.getType().getX();
+ }
+ }
+ if (B != null) {
+ if (TransB == TRANSPOSE) {
+ bY = B.getType().getY();
+ bX = B.getType().getX();
+ } else {
+ bX = B.getType().getY();
+ bY = B.getType().getX();
+ }
+ }
+ }
+ if (A != null && B != null && C != null) {
+ if (aY != bX || aX != cX || bY != cY) {
+ throw new RSRuntimeException("Called BLAS with invalid dimensions");
+ }
+ } else if (A != null && C != null) {
+ // A and C only
+ if (aX != cY || aY != cX) {
+ throw new RSRuntimeException("Called BLAS with invalid dimensions");
+ }
+ } else if (A != null && B != null) {
+ // A and B only
+ }
+
+ }
+
+ public void SGEMM(@Transpose int TransA, @Transpose int TransB, float alpha, Allocation A,
+ Allocation B, float beta, Allocation C) {
+ validateTranspose(TransA);
+ validateTranspose(TransB);
+ validateL3(Element.F32(mRS), TransA, TransB, 0, A, B, C);
+
+ int M = -1, N = -1, K = -1;
+ if (TransA == TRANSPOSE) {
+ M = A.getType().getX();
+ K = A.getType().getY();
+ } else {
+ M = A.getType().getY();
+ K = A.getType().getX();
+ }
+ if (TransB == TRANSPOSE) {
+ N = B.getType().getY();
+ } else {
+ N = B.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_sgemm, TransA, TransB, 0, 0, 0, M, N, K, alpha, A.getID(mRS), B.getID(mRS),
+ beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void DGEMM(@Transpose int TransA, @Transpose int TransB, double alpha, Allocation A,
+ Allocation B, double beta, Allocation C) {
+ validateTranspose(TransA);
+ validateTranspose(TransB);
+ validateL3(Element.F64(mRS), TransA, TransB, 0, A, B, C);
+ int M = -1, N = -1, K = -1;
+ if (TransA == TRANSPOSE) {
+ M = A.getType().getX();
+ K = A.getType().getY();
+ } else {
+ M = A.getType().getY();
+ K = A.getType().getX();
+ }
+ if (TransB == TRANSPOSE) {
+ N = B.getType().getY();
+ } else {
+ N = B.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dgemm, TransA, TransB, 0, 0, 0, M, N, K, alpha, A.getID(mRS), B.getID(mRS),
+ beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void CGEMM(@Transpose int TransA, @Transpose int TransB, Float2 alpha, Allocation A,
+ Allocation B, Float2 beta, Allocation C) {
+ validateTranspose(TransA);
+ validateTranspose(TransB);
+ validateL3(Element.F32_2(mRS), TransA, TransB, 0, A, B, C);
+ int M = -1, N = -1, K = -1;
+ if (TransA == TRANSPOSE) {
+ M = A.getType().getX();
+ K = A.getType().getY();
+ } else {
+ M = A.getType().getY();
+ K = A.getType().getX();
+ }
+ if (TransB == TRANSPOSE) {
+ N = B.getType().getY();
+ } else {
+ N = B.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cgemm, TransA, TransB, 0, 0, 0, M, N, K, alpha.x, alpha.y, A.getID(mRS), B.getID(mRS),
+ beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ public void ZGEMM(@Transpose int TransA, @Transpose int TransB, Double2 alpha, Allocation A,
+ Allocation B, Double2 beta, Allocation C) {
+ validateTranspose(TransA);
+ validateTranspose(TransB);
+ validateL3(Element.F64_2(mRS), TransA, TransB, 0, A, B, C);
+ int M = -1, N = -1, K = -1;
+ if (TransA == TRANSPOSE) {
+ M = A.getType().getX();
+ K = A.getType().getY();
+ } else {
+ M = A.getType().getY();
+ K = A.getType().getX();
+ }
+ if (TransB == TRANSPOSE) {
+ N = B.getType().getY();
+ } else {
+ N = B.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zgemm, TransA, TransB, 0, 0, 0, M, N, K, alpha.x, alpha.y, A.getID(mRS), B.getID(mRS),
+ beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ public void SSYMM(@Side int Side, @Uplo int Uplo, float alpha, Allocation A,
+ Allocation B, float beta, Allocation C) {
+ validateSide(Side);
+ validateUplo(Uplo);
+ validateL3(Element.F32(mRS), 0, 0, Side, A, B, C);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssymm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0, alpha, A.getID(mRS), B.getID(mRS),
+ beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void DSYMM(@Side int Side, @Uplo int Uplo, double alpha, Allocation A,
+ Allocation B, double beta, Allocation C) {
+ validateSide(Side);
+ validateUplo(Uplo);
+ validateL3(Element.F64(mRS), 0, 0, Side, A, B, C);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsymm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0, alpha, A.getID(mRS), B.getID(mRS),
+ beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void CSYMM(@Side int Side, @Uplo int Uplo, Float2 alpha, Allocation A,
+ Allocation B, Float2 beta, Allocation C) {
+ validateSide(Side);
+ validateUplo(Uplo);
+ validateL3(Element.F32_2(mRS), 0, 0, Side, A, B, C);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_csymm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0, alpha.x, alpha.y, A.getID(mRS), B.getID(mRS),
+ beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void ZSYMM(@Side int Side, @Uplo int Uplo, Double2 alpha, Allocation A,
+ Allocation B, Double2 beta, Allocation C) {
+ validateSide(Side);
+ validateUplo(Uplo);
+ validateL3(Element.F64_2(mRS), 0, 0, Side, A, B, C);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zsymm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0, alpha.x, alpha.y, A.getID(mRS), B.getID(mRS),
+ beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ public void SSYRK(@Uplo int Uplo, @Transpose int Trans, float alpha, Allocation A, float beta, Allocation C) {
+ validateTranspose(Trans);
+ validateUplo(Uplo);
+ validateL3(Element.F32(mRS), Trans, 0, 0, A, null, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha, A.getID(mRS), 0, beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ public void DSYRK(@Uplo int Uplo, @Transpose int Trans, double alpha, Allocation A, double beta, Allocation C) {
+ validateTranspose(Trans);
+ validateUplo(Uplo);
+ validateL3(Element.F64(mRS), Trans, 0, 0, A, null, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha, A.getID(mRS), 0, beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void CSYRK(@Uplo int Uplo, @Transpose int Trans, float alphaX, float alphaY, Allocation A, float betaX, float betaY, Allocation C) {
+ validateTranspose(Trans);
+ validateUplo(Uplo);
+ validateL3(Element.F32_2(mRS), Trans, 0, 0, A, null, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_csyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alphaX, alphaY, A.getID(mRS), 0, betaX, betaY,
+ C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void ZSYRK(@Uplo int Uplo, @Transpose int Trans, double alphaX, double alphaY, Allocation A, double betaX, double betaY, Allocation C) {
+ validateTranspose(Trans);
+ validateUplo(Uplo);
+ validateL3(Element.F64_2(mRS), Trans, 0, 0, A, null, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zsyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alphaX, alphaY, A.getID(mRS), 0, betaX, betaY,
+ C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ static void validateSYR2K(Element e, @Transpose int Trans, Allocation A, Allocation B, Allocation C) {
+ validateTranspose(Trans);
+ if (!A.getType().getElement().isCompatible(e) ||
+ !B.getType().getElement().isCompatible(e) ||
+ !C.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ int Cdim = -1;
+ // A is n x k if no transpose, k x n if transpose
+ // C is n x n
+ if (Trans == TRANSPOSE) {
+ // check columns versus C
+ Cdim = A.getType().getX();
+ } else {
+ // check rows versus C
+ Cdim = A.getType().getY();
+ }
+ if (C.getType().getX() != Cdim && C.getType().getY() != Cdim) {
+ throw new RSRuntimeException("Invalid symmetric matrix in SYR2K");
+ }
+ // A dims == B dims
+ if (A.getType().getX() != B.getType().getX() || A.getType().getY() != B.getType().getY()) {
+ throw new RSRuntimeException("Invalid A and B in SYR2K");
+ }
+ }
+ public void SSYR2K(@Uplo int Uplo, @Transpose int Trans, float alpha, Allocation A, Allocation B, float beta, Allocation C) {
+ validateUplo(Uplo);
+ validateSYR2K(Element.F32(mRS), Trans, A, B, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_ssyr2k, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha, A.getID(mRS), B.getID(mRS), beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void DSYR2K(@Uplo int Uplo, @Transpose int Trans, double alpha, Allocation A, Allocation B, double beta, Allocation C) {
+ validateUplo(Uplo);
+ validateSYR2K(Element.F64(mRS), Trans, A, B, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_ssyr2k, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha, A.getID(mRS), B.getID(mRS), beta, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void CSYR2K(@Uplo int Uplo, @Transpose int Trans, Float2 alpha, Allocation A, Allocation B, Float2 beta, Allocation C) {
+ validateUplo(Uplo);
+ validateSYR2K(Element.F32_2(mRS), Trans, A, B, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_ssyr2k, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void ZSYR2K(@Uplo int Uplo, @Transpose int Trans, Double2 alpha, Allocation A, Allocation B, Double2 beta, Allocation C) {
+ validateUplo(Uplo);
+ validateSYR2K(Element.F64_2(mRS), Trans, A, B, C);
+ int K = -1;
+ if (Trans == TRANSPOSE) {
+ K = A.getType().getY();
+ } else {
+ K = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_ssyr2k, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ static void validateTRMM(Element e, @Side int Side, @Transpose int TransA, Allocation A, Allocation B) {
+ validateSide(Side);
+ validateTranspose(TransA);
+ int aX = -1, aY = -1, bX = -1, bY = -1;
+ if (!A.getType().getElement().isCompatible(e) ||
+ !B.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ if (TransA == TRANSPOSE) {
+ aY = A.getType().getY();
+ aX = A.getType().getX();
+ } else {
+ aY = A.getType().getX();
+ aX = A.getType().getY();
+ }
+ bX = B.getType().getY();
+ bY = B.getType().getX();
+ if (Side == LEFT) {
+ if (aX == 0 || aY != bX) {
+ throw new RSRuntimeException("Called TRMM with invalid matrices");
+ }
+ } else {
+ if (bY != aX || aY == 0) {
+ throw new RSRuntimeException("Called TRMM with invalid matrices");
+ }
+ }
+ }
+ public void STRMM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, float alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRMM(Element.F32(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_strmm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha, A.getID(mRS), B.getID(mRS), 0.f, 0, 0, 0, 0, 0);
+ }
+ public void DTRMM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, double alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRMM(Element.F64(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_strmm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha, A.getID(mRS), B.getID(mRS), 0.f, 0, 0, 0, 0, 0);
+ }
+ public void CTRMM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Float2 alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRMM(Element.F32_2(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_strmm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), 0, 0, 0, 0, 0, 0, 0);
+ }
+ public void ZTRMM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Double2 alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRMM(Element.F64_2(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_strmm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), 0, 0, 0, 0, 0, 0, 0);
+ }
+
+ static void validateTRSM(Element e, @Side int Side, @Transpose int TransA, Allocation A, Allocation B) {
+ int adim = -1, bX = -1, bY = -1;
+ validateSide(Side);
+ validateTranspose(TransA);
+ if (!A.getType().getElement().isCompatible(e) ||
+ !B.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ adim = A.getType().getX();
+ if (adim != A.getType().getY()) {
+ // this may be unnecessary, the restriction could potentially be relaxed
+ // A needs to contain at least that symmetric matrix but could theoretically be larger
+ // for now we assume adapters are sufficient, will reevaluate in the future
+ throw new RSRuntimeException("Called TRSM with a non-symmetric matrix A");
+ }
+ bX = B.getType().getY();
+ bY = B.getType().getX();
+ if (Side == LEFT) {
+ // A is M*M
+ if (adim != bY) {
+ throw new RSRuntimeException("Called TRSM with invalid matrix dimensions");
+ }
+ } else {
+ // A is N*N
+ if (adim != bX) {
+ throw new RSRuntimeException("Called TRSM with invalid matrix dimensions");
+ }
+ }
+ }
+ public void STRSM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, float alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRSM(Element.F32(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Single(getID(mRS), RsBlas_strsm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha, A.getID(mRS), B.getID(mRS), 0, 0, 0, 0, 0, 0);
+ }
+ public void DTRSM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, double alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRSM(Element.F64(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_strsm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha, A.getID(mRS), B.getID(mRS), 0, 0, 0, 0, 0, 0);
+ }
+ public void CTRSM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Float2 alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRSM(Element.F32_2(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_strsm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), 0, 0, 0, 0, 0, 0, 0);
+ }
+ public void ZTRSM(@Side int Side, @Uplo int Uplo, @Transpose int TransA, @Diag int Diag, Double2 alpha, Allocation A, Allocation B) {
+ validateUplo(Uplo);
+ validateDiag(Diag);
+ validateTRSM(Element.F64_2(mRS), Side, TransA, A, B);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_strsm, TransA, 0, Side, Uplo, Diag, B.getType().getY(), B.getType().getX(), 0,
+ alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), 0, 0, 0, 0, 0, 0, 0);
+ }
+
+ static void validateHEMM(Element e, @Side int Side, Allocation A, Allocation B, Allocation C) {
+ validateSide(Side);
+
+ if (!A.getType().getElement().isCompatible(e) ||
+ !B.getType().getElement().isCompatible(e) ||
+ !C.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+
+ // A must be square; can potentially be relaxed similar to TRSM
+ int adim = A.getType().getX();
+ if (adim != A.getType().getY()) {
+ throw new RSRuntimeException("Called HEMM with non-square A");
+ }
+ if ((Side == LEFT && adim != B.getType().getY()) ||
+ (Side == RIGHT && adim != B.getType().getX())) {
+ throw new RSRuntimeException("Called HEMM with invalid B");
+ }
+ if (B.getType().getX() != C.getType().getX() ||
+ B.getType().getY() != C.getType().getY()) {
+ throw new RSRuntimeException("Called HEMM with mismatched B and C");
+ }
+ }
+ public void CHEMM(@Side int Side, @Uplo int Uplo, float alpha, Allocation A, Allocation B, float beta, Allocation C) {
+ validateUplo(Uplo);
+ validateHEMM(Element.F32_2(mRS), Side, A, B, C);
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chemm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0,
+ alpha, 0, A.getID(mRS), B.getID(mRS), beta, 0, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void ZHEMM(@Side int Side, @Uplo int Uplo, double alpha, Allocation A, Allocation B, double beta, Allocation C) {
+ validateUplo(Uplo);
+ validateHEMM(Element.F32_2(mRS), Side, A, B, C);
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhemm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0,
+ alpha, 0, A.getID(mRS), B.getID(mRS), beta, 0, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ static void validateHERK(Element e, @Transpose int Trans, Allocation A, Allocation C) {
+ if (!A.getType().getElement().isCompatible(e) ||
+ !C.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ validateConjTranspose(Trans);
+ int cdim = C.getType().getX();
+ if (cdim != C.getType().getY()) {
+ throw new RSRuntimeException("Called HERK with non-square C");
+ }
+ if (Trans == NO_TRANSPOSE) {
+ if (cdim != A.getType().getX()) {
+ throw new RSRuntimeException("Called HERK with invalid A");
+ }
+ } else {
+ if (cdim != A.getType().getY()) {
+ throw new RSRuntimeException("Called HERK with invalid A");
+ }
+ }
+ }
+ public void CHERK(@Uplo int Uplo, @Transpose int Trans, float alpha, Allocation A, float beta, Allocation C) {
+ validateUplo(Uplo);
+ validateHERK(Element.F32_2(mRS), Trans, A, C);
+ int k = 0;
+ if (Trans == TRANSPOSE) {
+ k = A.getType().getY();
+ } else {
+ k = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cherk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), k,
+ alpha, 0, A.getID(mRS), 0, beta, 0, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void ZHERK(@Uplo int Uplo, @Transpose int Trans, double alpha, Allocation A, double beta, Allocation C) {
+ validateUplo(Uplo);
+ validateHERK(Element.F64_2(mRS), Trans, A, C);
+ int k = 0;
+ if (Trans == TRANSPOSE) {
+ k = A.getType().getY();
+ } else {
+ k = A.getType().getX();
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zherk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), k,
+ alpha, 0, A.getID(mRS), 0, beta, 0, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+ static void validateHER2K(Element e, @Transpose int Trans, Allocation A, Allocation B, Allocation C) {
+ if (!A.getType().getElement().isCompatible(e) ||
+ !B.getType().getElement().isCompatible(e) ||
+ !C.getType().getElement().isCompatible(e)) {
+ throw new RSRuntimeException("Called BLAS with wrong Element type");
+ }
+ validateConjTranspose(Trans);
+ int cdim = C.getType().getX();
+ if (cdim != C.getType().getY()) {
+ throw new RSRuntimeException("Called HER2K with non-square C");
+ }
+ if (Trans == NO_TRANSPOSE) {
+ if (A.getType().getY() != cdim) {
+ throw new RSRuntimeException("Called HER2K with invalid matrices");
+ }
+ } else {
+ if (A.getType().getX() != cdim) {
+ throw new RSRuntimeException("Called HER2K with invalid matrices");
+ }
+ }
+ if (A.getType().getX() != B.getType().getX() || A.getType().getY() != B.getType().getY()) {
+ throw new RSRuntimeException("Called HER2K with invalid A and B matrices");
+ }
+ }
+ public void CHER2K(@Uplo int Uplo, @Transpose int Trans, Float2 alpha, Allocation A, Allocation B, float beta, Allocation C) {
+ validateUplo(Uplo);
+ validateHER2K(Element.F32_2(mRS), Trans, A, B, C);
+ int k = 0;
+ if (Trans == NO_TRANSPOSE) {
+ k = A.getType().getX();
+ } else {
+ k = A.getType().getY();
+ }
+ mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_cher2k, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), k, alpha.x, alpha.y,
+ A.getID(mRS), B.getID(mRS), beta, 0, C.getID(mRS), 0, 0, 0, 0);
+ }
+ public void ZHER2K(@Uplo int Uplo, @Transpose int Trans, Double2 alpha, Allocation A, Allocation B, double beta, Allocation C) {
+ validateUplo(Uplo);
+ validateHER2K(Element.F64_2(mRS), Trans, A, B, C);
+ int k = 0;
+ if (Trans == NO_TRANSPOSE) {
+ k = A.getType().getX();
+ } else {
+ k = A.getType().getY();
+ }
+ mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zher2k, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), k, alpha.x, alpha.y,
+ A.getID(mRS), B.getID(mRS), beta, 0, C.getID(mRS), 0, 0, 0, 0);
+ }
+
+
+
+}
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index 198cabe..2612323 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -310,6 +310,143 @@ nScriptGroup2Execute(JNIEnv *_env, jobject _this, jlong con, jlong groupID) {
}
static void
+nScriptIntrinsicBLAS_Single(JNIEnv *_env, jobject _this, jlong con, jlong id, jint func, jint TransA,
+ jint TransB, jint Side, jint Uplo, jint Diag, jint M, jint N, jint K,
+ jfloat alpha, jlong A, jlong B, jfloat beta, jlong C, jint incX, jint incY,
+ jint KL, jint KU) {
+ RsBlasCall call;
+ memset(&call, 0, sizeof(call));
+ call.func = (RsBlasFunction)func;
+ call.transA = (RsBlasTranspose)TransA;
+ call.transB = (RsBlasTranspose)TransB;
+ call.side = (RsBlasSide)Side;
+ call.uplo = (RsBlasUplo)Uplo;
+ call.diag = (RsBlasDiag)Diag;
+ call.M = M;
+ call.N = N;
+ call.K = K;
+ call.alpha.f = alpha;
+ call.beta.f = beta;
+ call.incX = incX;
+ call.incY = incY;
+ call.KL = KL;
+ call.KU = KU;
+
+ RsAllocation in_allocs[3];
+ in_allocs[0] = (RsAllocation)A;
+ in_allocs[1] = (RsAllocation)B;
+ in_allocs[2] = (RsAllocation)C;
+
+ rsScriptForEachMulti((RsContext)con, (RsScript)id, 0,
+ in_allocs, sizeof(in_allocs), nullptr,
+ &call, sizeof(call), nullptr, 0);
+}
+
+static void
+nScriptIntrinsicBLAS_Double(JNIEnv *_env, jobject _this, jlong con, jlong id, jint func, jint TransA,
+ jint TransB, jint Side, jint Uplo, jint Diag, jint M, jint N, jint K,
+ jdouble alpha, jlong A, jlong B, jdouble beta, jlong C, jint incX, jint incY,
+ jint KL, jint KU) {
+ RsBlasCall call;
+ memset(&call, 0, sizeof(call));
+ call.func = (RsBlasFunction)func;
+ call.transA = (RsBlasTranspose)TransA;
+ call.transB = (RsBlasTranspose)TransB;
+ call.side = (RsBlasSide)Side;
+ call.uplo = (RsBlasUplo)Uplo;
+ call.diag = (RsBlasDiag)Diag;
+ call.M = M;
+ call.N = N;
+ call.K = K;
+ call.alpha.d = alpha;
+ call.beta.d = beta;
+ call.incX = incX;
+ call.incY = incY;
+ call.KL = KL;
+ call.KU = KU;
+
+ RsAllocation in_allocs[3];
+ in_allocs[0] = (RsAllocation)A;
+ in_allocs[1] = (RsAllocation)B;
+ in_allocs[2] = (RsAllocation)C;
+
+ rsScriptForEachMulti((RsContext)con, (RsScript)id, 0,
+ in_allocs, sizeof(in_allocs), nullptr,
+ &call, sizeof(call), nullptr, 0);
+}
+
+static void
+nScriptIntrinsicBLAS_Complex(JNIEnv *_env, jobject _this, jlong con, jlong id, jint func, jint TransA,
+ jint TransB, jint Side, jint Uplo, jint Diag, jint M, jint N, jint K,
+ jfloat alphaX, jfloat alphaY, jlong A, jlong B, jfloat betaX,
+ jfloat betaY, jlong C, jint incX, jint incY, jint KL, jint KU) {
+ RsBlasCall call;
+ memset(&call, 0, sizeof(call));
+ call.func = (RsBlasFunction)func;
+ call.transA = (RsBlasTranspose)TransA;
+ call.transB = (RsBlasTranspose)TransB;
+ call.side = (RsBlasSide)Side;
+ call.uplo = (RsBlasUplo)Uplo;
+ call.diag = (RsBlasDiag)Diag;
+ call.M = M;
+ call.N = N;
+ call.K = K;
+ call.alpha.c.r = alphaX;
+ call.alpha.c.i = alphaY;
+ call.beta.c.r = betaX;
+ call.beta.c.r = betaY;
+ call.incX = incX;
+ call.incY = incY;
+ call.KL = KL;
+ call.KU = KU;
+
+ RsAllocation in_allocs[3];
+ in_allocs[0] = (RsAllocation)A;
+ in_allocs[1] = (RsAllocation)B;
+ in_allocs[2] = (RsAllocation)C;
+
+ rsScriptForEachMulti((RsContext)con, (RsScript)id, 0,
+ in_allocs, sizeof(in_allocs), nullptr,
+ &call, sizeof(call), nullptr, 0);
+}
+
+static void
+nScriptIntrinsicBLAS_Z(JNIEnv *_env, jobject _this, jlong con, jlong id, jint func, jint TransA,
+ jint TransB, jint Side, jint Uplo, jint Diag, jint M, jint N, jint K,
+ jdouble alphaX, jdouble alphaY, jlong A, jlong B, jdouble betaX,
+ jdouble betaY, jlong C, jint incX, jint incY, jint KL, jint KU) {
+ RsBlasCall call;
+ memset(&call, 0, sizeof(call));
+ call.func = (RsBlasFunction)func;
+ call.transA = (RsBlasTranspose)TransA;
+ call.transB = (RsBlasTranspose)TransB;
+ call.side = (RsBlasSide)Side;
+ call.uplo = (RsBlasUplo)Uplo;
+ call.diag = (RsBlasDiag)Diag;
+ call.M = M;
+ call.N = N;
+ call.K = K;
+ call.alpha.z.r = alphaX;
+ call.alpha.z.i = alphaY;
+ call.beta.z.r = betaX;
+ call.beta.z.r = betaY;
+ call.incX = incX;
+ call.incY = incY;
+ call.KL = KL;
+ call.KU = KU;
+
+ RsAllocation in_allocs[3];
+ in_allocs[0] = (RsAllocation)A;
+ in_allocs[1] = (RsAllocation)B;
+ in_allocs[2] = (RsAllocation)C;
+
+ rsScriptForEachMulti((RsContext)con, (RsScript)id, 0,
+ in_allocs, sizeof(in_allocs), nullptr,
+ &call, sizeof(call), nullptr, 0);
+}
+
+
+static void
nAssignName(JNIEnv *_env, jobject _this, jlong con, jlong obj, jbyteArray str)
{
if (kLogApi) {
@@ -2094,6 +2231,11 @@ static JNINativeMethod methods[] = {
{"rsnScriptGroupExecute", "(JJ)V", (void*)nScriptGroupExecute },
{"rsnScriptGroup2Execute", "(JJ)V", (void*)nScriptGroup2Execute },
+{"rsnScriptIntrinsicBLAS_Single", "(JJIIIIIIIIIFJJFJIIII)V", (void*)nScriptIntrinsicBLAS_Single },
+{"rsnScriptIntrinsicBLAS_Double", "(JJIIIIIIIIIDJJDJIIII)V", (void*)nScriptIntrinsicBLAS_Double },
+{"rsnScriptIntrinsicBLAS_Complex", "(JJIIIIIIIIIFFJJFFJIIII)V", (void*)nScriptIntrinsicBLAS_Complex },
+{"rsnScriptIntrinsicBLAS_Z", "(JJIIIIIIIIIDDJJDDJIIII)V", (void*)nScriptIntrinsicBLAS_Z },
+
{"rsnProgramStoreCreate", "(JZZZZZZIII)J", (void*)nProgramStoreCreate },
{"rsnProgramBindConstants", "(JJIJ)V", (void*)nProgramBindConstants },
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 7623514..da11dad 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -2837,10 +2837,10 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
return providersUpdated;
}
- private boolean removeHostsAndProvidersForPackageLocked(String pkgName, int userId) {
+ private boolean removeProvidersForPackageLocked(String pkgName, int userId) {
boolean removed = false;
- int N = mProviders.size();
+ final int N = mProviders.size();
for (int i = N - 1; i >= 0; i--) {
Provider provider = mProviders.get(i);
if (pkgName.equals(provider.info.provider.getPackageName())
@@ -2849,11 +2849,16 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
removed = true;
}
}
+ return removed;
+ }
+
+ private boolean removeHostsAndProvidersForPackageLocked(String pkgName, int userId) {
+ boolean removed = removeProvidersForPackageLocked(pkgName, userId);
// Delete the hosts for this package too
// By now, we have removed any AppWidgets that were in any hosts here,
// so we don't need to worry about sending DISABLE broadcasts to them.
- N = mHosts.size();
+ final int N = mHosts.size();
for (int i = N - 1; i >= 0; i--) {
Host host = mHosts.get(i);
if (pkgName.equals(host.id.packageName)
@@ -2925,13 +2930,30 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
synchronized (mLock) {
boolean providersChanged = false;
+ ArraySet<String> previousPackages = new ArraySet<String>();
+ final int providerCount = mProviders.size();
+ for (int i = 0; i < providerCount; ++i) {
+ Provider provider = mProviders.get(i);
+ if (provider.getUserId() == userId) {
+ previousPackages.add(provider.id.componentName.getPackageName());
+ }
+ }
+
final int packageCount = packages.size();
for (int i = 0; i < packageCount; i++) {
String packageName = packages.get(i);
+ previousPackages.remove(packageName);
providersChanged |= updateProvidersForPackageLocked(packageName,
userId, null);
}
+ // Some packages are no longer whitelisted.
+ final int removedCount = previousPackages.size();
+ for (int i = 0; i < removedCount; ++i) {
+ providersChanged |= removeProvidersForPackageLocked(
+ previousPackages.valueAt(i), userId);
+ }
+
if (providersChanged) {
saveGroupStateAsync(userId);
scheduleNotifyGroupHostsForProvidersChangedLocked(userId);
@@ -3142,10 +3164,10 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
if (parentId != callerId) {
return false;
}
- return isProviderWhitelListed(packageName, profileId);
+ return isProviderWhiteListed(packageName, profileId);
}
- public boolean isProviderWhitelListed(String packageName, int profileId) {
+ public boolean isProviderWhiteListed(String packageName, int profileId) {
DevicePolicyManagerInternal devicePolicyManager = LocalServices.getService(
DevicePolicyManagerInternal.class);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 511347e..50820ff 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -57,6 +57,7 @@ import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.SparseIntArray;
+import android.view.Display;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsService;
@@ -8205,14 +8206,13 @@ public final class ActivityManagerService extends ActivityManagerNative
}
@Override
- public IActivityContainer getEnclosingActivityContainer(IBinder activityToken)
- throws RemoteException {
+ public int getActivityDisplayId(IBinder activityToken) throws RemoteException {
synchronized (this) {
ActivityStack stack = ActivityRecord.getStackLocked(activityToken);
- if (stack != null) {
- return stack.mActivityContainer;
+ if (stack != null && stack.mActivityContainer.isAttachedLocked()) {
+ return stack.mActivityContainer.getDisplayId();
}
- return null;
+ return Display.DEFAULT_DISPLAY;
}
}
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index 1a0f81d..06c154e 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -31,6 +31,7 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.ContentObserver;
import android.media.AudioManager;
+import android.media.AudioManagerInternal;
import android.media.AudioSystem;
import android.media.IAudioService;
import android.media.IRemoteVolumeController;
@@ -59,6 +60,7 @@ import android.util.Log;
import android.util.SparseArray;
import android.view.KeyEvent;
+import com.android.server.LocalServices;
import com.android.server.SystemService;
import com.android.server.Watchdog;
import com.android.server.Watchdog.Monitor;
@@ -94,6 +96,7 @@ public class MediaSessionService extends SystemService implements Monitor {
private KeyguardManager mKeyguardManager;
private IAudioService mAudioService;
private AudioManager mAudioManager;
+ private AudioManagerInternal mAudioManagerInternal;
private ContentResolver mContentResolver;
private SettingsObserver mSettingsObserver;
@@ -121,6 +124,7 @@ public class MediaSessionService extends SystemService implements Monitor {
(KeyguardManager) getContext().getSystemService(Context.KEYGUARD_SERVICE);
mAudioService = getAudioService();
mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
+ mAudioManagerInternal = LocalServices.getService(AudioManagerInternal.class);
mContentResolver = getContext().getContentResolver();
mSettingsObserver = new SettingsObserver();
mSettingsObserver.observe();
@@ -343,7 +347,13 @@ public class MediaSessionService extends SystemService implements Monitor {
}
}
- private void enforceStatusBarPermission(String action, int pid, int uid) {
+ private void enforceSystemUiPermission(String action, int pid, int uid) {
+ if (mAudioManagerInternal != null) {
+ final int vcuid = mAudioManagerInternal.getVolumeControllerUid();
+ if (vcuid > 0 && uid == vcuid) {
+ return;
+ }
+ }
if (getContext().checkPermission(android.Manifest.permission.STATUS_BAR_SERVICE,
pid, uid) != PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Only system ui may " + action);
@@ -789,7 +799,7 @@ public class MediaSessionService extends SystemService implements Monitor {
final int uid = Binder.getCallingUid();
final long token = Binder.clearCallingIdentity();
try {
- enforceStatusBarPermission("listen for volume changes", pid, uid);
+ enforceSystemUiPermission("listen for volume changes", pid, uid);
mRvc = rvc;
} finally {
Binder.restoreCallingIdentity(token);
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 69a1ac9..2729392 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -28,7 +28,6 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.UserInfo;
import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.os.Binder;
import android.os.Bundle;
import android.os.Environment;
@@ -36,6 +35,7 @@ import android.os.FileUtils;
import android.os.Handler;
import android.os.IUserManager;
import android.os.Message;
+import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -111,6 +111,7 @@ public class UserManagerService extends IUserManager.Stub {
private static final String USER_INFO_DIR = "system" + File.separator + "users";
private static final String USER_LIST_FILENAME = "userlist.xml";
private static final String USER_PHOTO_FILENAME = "photo.png";
+ private static final String USER_PHOTO_FILENAME_TMP = USER_PHOTO_FILENAME + ".tmp";
private static final String RESTRICTIONS_FILE_PREFIX = "res_";
private static final String XML_SUFFIX = ".xml";
@@ -433,7 +434,8 @@ public class UserManagerService extends IUserManager.Stub {
}
@Override
- public Bitmap getUserIcon(int userId) {
+ public ParcelFileDescriptor getUserIcon(int userId) {
+ String iconPath;
synchronized (mPackagesLock) {
UserInfo info = mUsers.get(userId);
if (info == null || info.partial) {
@@ -448,8 +450,16 @@ public class UserManagerService extends IUserManager.Stub {
if (info.iconPath == null) {
return null;
}
- return BitmapFactory.decodeFile(info.iconPath);
+ iconPath = info.iconPath;
}
+
+ try {
+ return ParcelFileDescriptor.open(
+ new File(iconPath), ParcelFileDescriptor.MODE_READ_ONLY);
+ } catch (FileNotFoundException e) {
+ Log.e(LOG_TAG, "Couldn't find icon file", e);
+ }
+ return null;
}
public void makeInitialized(int userId) {
@@ -572,6 +582,7 @@ public class UserManagerService extends IUserManager.Stub {
try {
File dir = new File(mUsersDir, Integer.toString(info.id));
File file = new File(dir, USER_PHOTO_FILENAME);
+ File tmp = new File(dir, USER_PHOTO_FILENAME_TMP);
if (!dir.exists()) {
dir.mkdir();
FileUtils.setPermissions(
@@ -580,7 +591,8 @@ public class UserManagerService extends IUserManager.Stub {
-1, -1);
}
FileOutputStream os;
- if (bitmap.compress(Bitmap.CompressFormat.PNG, 100, os = new FileOutputStream(file))) {
+ if (bitmap.compress(Bitmap.CompressFormat.PNG, 100, os = new FileOutputStream(tmp))
+ && tmp.renameTo(file)) {
info.iconPath = file.getAbsolutePath();
}
try {
@@ -588,6 +600,7 @@ public class UserManagerService extends IUserManager.Stub {
} catch (IOException ioe) {
// What the ... !
}
+ tmp.delete();
} catch (FileNotFoundException e) {
Slog.w(LOG_TAG, "Error setting photo for user ", e);
}
@@ -1787,7 +1800,8 @@ public class UserManagerService extends IUserManager.Stub {
public int getUserHandle(int userSerialNumber) {
synchronized (mPackagesLock) {
for (int userId : mUserIds) {
- if (getUserInfoLocked(userId).serialNumber == userSerialNumber) return userId;
+ UserInfo info = getUserInfoLocked(userId);
+ if (info != null && info.serialNumber == userSerialNumber) return userId;
}
// Not found
return -1;
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 05f3473..f073c23 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -241,7 +241,9 @@ class DisplayContent {
mTouchExcludeRegion.op(mTmpRect, Region.Op.DIFFERENCE);
}
}
- mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion);
+ if (mTapDetector != null) {
+ mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion);
+ }
}
void switchUserStacks() {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 9450d16..dd4bbb7 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -3663,14 +3663,12 @@ public class WindowManagerService extends IWindowManager.Stub
// TODO(multidisplay): Change to the correct display.
final WindowList windows = getDefaultWindowListLocked();
- int pos = windows.size() - 1;
- while (pos >= 0) {
+ for (int pos = windows.size() - 1; pos >= 0; --pos) {
WindowState win = windows.get(pos);
- pos--;
if (win.mAppToken != null) {
// We hit an application window. so the orientation will be determined by the
// app window. No point in continuing further.
- return (mLastWindowForcedOrientation=ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
+ return (mLastWindowForcedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
}
if (!win.isVisibleLw() || !win.mPolicyVisibilityAfterAnim) {
continue;
@@ -3682,9 +3680,9 @@ public class WindowManagerService extends IWindowManager.Stub
}
if (DEBUG_ORIENTATION) Slog.v(TAG, win + " forcing orientation to " + req);
- return (mLastWindowForcedOrientation=req);
+ return (mLastWindowForcedOrientation = req);
}
- return (mLastWindowForcedOrientation=ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
+ return (mLastWindowForcedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
}
public int getOrientationFromAppTokensLocked() {
@@ -3742,14 +3740,12 @@ public class WindowManagerService extends IWindowManager.Stub
// to use the orientation behind it, then just take whatever
// orientation it has and ignores whatever is under it.
lastFullscreen = atoken.appFullscreen;
- if (lastFullscreen
- && or != ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
+ if (lastFullscreen && or != ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
if (DEBUG_ORIENTATION) Slog.v(TAG, "Done at " + atoken
+ " -- full screen, return " + or);
return or;
}
- // If this application has requested an explicit orientation,
- // then use it.
+ // If this application has requested an explicit orientation, then use it.
if (or != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
&& or != ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
if (DEBUG_ORIENTATION) Slog.v(TAG, "Done at " + atoken
@@ -6367,13 +6363,12 @@ public class WindowManagerService extends IWindowManager.Stub
screenRotationAnimation =
mAnimator.getScreenRotationAnimationLocked(Display.DEFAULT_DISPLAY);
- // We need to update our screen size information to match the new
- // rotation. Note that this is redundant with the later call to
- // sendNewConfiguration() that must be called after this function
- // returns... however we need to do the screen size part of that
- // before then so we have the correct size to use when initializing
- // the rotation animation for the new rotation.
- computeScreenConfigurationLocked(null);
+ // We need to update our screen size information to match the new rotation. If the rotation
+ // has actually changed then this method will return true and, according to the comment at
+ // the top of the method, the caller is obligated to call computeNewConfigurationLocked().
+ // By updating the Display info here it will be available to
+ // computeScreenConfigurationLocked later.
+ updateDisplayAndOrientationLocked();
final DisplayInfo displayInfo = displayContent.getDisplayInfo();
if (!inTransaction) {
@@ -7045,9 +7040,9 @@ public class WindowManagerService extends IWindowManager.Stub
return sw;
}
- private boolean computeScreenConfigurationLocked(Configuration config) {
+ DisplayInfo updateDisplayAndOrientationLocked() {
if (!mDisplayReady) {
- return false;
+ return null;
}
// TODO(multidisplay): For now, apply Configuration to main screen only.
@@ -7079,11 +7074,6 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
- if (config != null) {
- config.orientation = (dw <= dh) ? Configuration.ORIENTATION_PORTRAIT :
- Configuration.ORIENTATION_LANDSCAPE;
- }
-
// Update application display metrics.
final int appWidth = mPolicy.getNonDecorDisplayWidth(dw, dh, mRotation);
final int appHeight = mPolicy.getNonDecorDisplayHeight(dw, dh, mRotation);
@@ -7106,87 +7096,100 @@ public class WindowManagerService extends IWindowManager.Stub
Slog.i(TAG, "Set app display size: " + appWidth + " x " + appHeight);
}
- final DisplayMetrics dm = mDisplayMetrics;
- mCompatibleScreenScale = CompatibilityInfo.computeCompatibleScaling(dm,
+ mCompatibleScreenScale = CompatibilityInfo.computeCompatibleScaling(mDisplayMetrics,
mCompatDisplayMetrics);
+ return displayInfo;
+ }
- if (config != null) {
- config.screenWidthDp = (int)(mPolicy.getConfigDisplayWidth(dw, dh, mRotation)
- / dm.density);
- config.screenHeightDp = (int)(mPolicy.getConfigDisplayHeight(dw, dh, mRotation)
- / dm.density);
- computeSizeRangesAndScreenLayout(displayInfo, rotated, dw, dh, dm.density, config);
-
- config.compatScreenWidthDp = (int)(config.screenWidthDp / mCompatibleScreenScale);
- config.compatScreenHeightDp = (int)(config.screenHeightDp / mCompatibleScreenScale);
- config.compatSmallestScreenWidthDp = computeCompatSmallestWidth(rotated, dm, dw, dh);
- config.densityDpi = displayContent.mBaseDisplayDensity;
-
- // Update the configuration based on available input devices, lid switch,
- // and platform configuration.
- config.touchscreen = Configuration.TOUCHSCREEN_NOTOUCH;
- config.keyboard = Configuration.KEYBOARD_NOKEYS;
- config.navigation = Configuration.NAVIGATION_NONAV;
-
- int keyboardPresence = 0;
- int navigationPresence = 0;
- final InputDevice[] devices = mInputManager.getInputDevices();
- final int len = devices.length;
- for (int i = 0; i < len; i++) {
- InputDevice device = devices[i];
- if (!device.isVirtual()) {
- final int sources = device.getSources();
- final int presenceFlag = device.isExternal() ?
- WindowManagerPolicy.PRESENCE_EXTERNAL :
- WindowManagerPolicy.PRESENCE_INTERNAL;
-
- if (mIsTouchDevice) {
- if ((sources & InputDevice.SOURCE_TOUCHSCREEN) ==
- InputDevice.SOURCE_TOUCHSCREEN) {
- config.touchscreen = Configuration.TOUCHSCREEN_FINGER;
- }
- } else {
- config.touchscreen = Configuration.TOUCHSCREEN_NOTOUCH;
- }
+ boolean computeScreenConfigurationLocked(Configuration config) {
+ final DisplayInfo displayInfo = updateDisplayAndOrientationLocked();
+ if (displayInfo == null) {
+ return false;
+ }
- if ((sources & InputDevice.SOURCE_TRACKBALL) == InputDevice.SOURCE_TRACKBALL) {
- config.navigation = Configuration.NAVIGATION_TRACKBALL;
- navigationPresence |= presenceFlag;
- } else if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD
- && config.navigation == Configuration.NAVIGATION_NONAV) {
- config.navigation = Configuration.NAVIGATION_DPAD;
- navigationPresence |= presenceFlag;
+ final int dw = displayInfo.logicalWidth;
+ final int dh = displayInfo.logicalHeight;
+ config.orientation = (dw <= dh) ? Configuration.ORIENTATION_PORTRAIT :
+ Configuration.ORIENTATION_LANDSCAPE;
+ config.screenWidthDp =
+ (int)(mPolicy.getConfigDisplayWidth(dw, dh, mRotation) / mDisplayMetrics.density);
+ config.screenHeightDp =
+ (int)(mPolicy.getConfigDisplayHeight(dw, dh, mRotation) / mDisplayMetrics.density);
+ final boolean rotated = (mRotation == Surface.ROTATION_90
+ || mRotation == Surface.ROTATION_270);
+ computeSizeRangesAndScreenLayout(displayInfo, rotated, dw, dh, mDisplayMetrics.density,
+ config);
+
+ config.compatScreenWidthDp = (int)(config.screenWidthDp / mCompatibleScreenScale);
+ config.compatScreenHeightDp = (int)(config.screenHeightDp / mCompatibleScreenScale);
+ config.compatSmallestScreenWidthDp = computeCompatSmallestWidth(rotated,
+ mDisplayMetrics, dw, dh);
+ config.densityDpi = displayInfo.logicalDensityDpi;
+
+ // Update the configuration based on available input devices, lid switch,
+ // and platform configuration.
+ config.touchscreen = Configuration.TOUCHSCREEN_NOTOUCH;
+ config.keyboard = Configuration.KEYBOARD_NOKEYS;
+ config.navigation = Configuration.NAVIGATION_NONAV;
+
+ int keyboardPresence = 0;
+ int navigationPresence = 0;
+ final InputDevice[] devices = mInputManager.getInputDevices();
+ final int len = devices.length;
+ for (int i = 0; i < len; i++) {
+ InputDevice device = devices[i];
+ if (!device.isVirtual()) {
+ final int sources = device.getSources();
+ final int presenceFlag = device.isExternal() ?
+ WindowManagerPolicy.PRESENCE_EXTERNAL :
+ WindowManagerPolicy.PRESENCE_INTERNAL;
+
+ if (mIsTouchDevice) {
+ if ((sources & InputDevice.SOURCE_TOUCHSCREEN) ==
+ InputDevice.SOURCE_TOUCHSCREEN) {
+ config.touchscreen = Configuration.TOUCHSCREEN_FINGER;
}
+ } else {
+ config.touchscreen = Configuration.TOUCHSCREEN_NOTOUCH;
+ }
- if (device.getKeyboardType() == InputDevice.KEYBOARD_TYPE_ALPHABETIC) {
- config.keyboard = Configuration.KEYBOARD_QWERTY;
- keyboardPresence |= presenceFlag;
- }
+ if ((sources & InputDevice.SOURCE_TRACKBALL) == InputDevice.SOURCE_TRACKBALL) {
+ config.navigation = Configuration.NAVIGATION_TRACKBALL;
+ navigationPresence |= presenceFlag;
+ } else if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD
+ && config.navigation == Configuration.NAVIGATION_NONAV) {
+ config.navigation = Configuration.NAVIGATION_DPAD;
+ navigationPresence |= presenceFlag;
}
- }
- if (config.navigation == Configuration.NAVIGATION_NONAV && mHasPermanentDpad) {
- config.navigation = Configuration.NAVIGATION_DPAD;
- navigationPresence |= WindowManagerPolicy.PRESENCE_INTERNAL;
+ if (device.getKeyboardType() == InputDevice.KEYBOARD_TYPE_ALPHABETIC) {
+ config.keyboard = Configuration.KEYBOARD_QWERTY;
+ keyboardPresence |= presenceFlag;
+ }
}
+ }
- // Determine whether a hard keyboard is available and enabled.
- boolean hardKeyboardAvailable = config.keyboard != Configuration.KEYBOARD_NOKEYS;
- if (hardKeyboardAvailable != mHardKeyboardAvailable) {
- mHardKeyboardAvailable = hardKeyboardAvailable;
- mH.removeMessages(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
- mH.sendEmptyMessage(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
- }
- if (mShowImeWithHardKeyboard) {
- config.keyboard = Configuration.KEYBOARD_NOKEYS;
- }
+ if (config.navigation == Configuration.NAVIGATION_NONAV && mHasPermanentDpad) {
+ config.navigation = Configuration.NAVIGATION_DPAD;
+ navigationPresence |= WindowManagerPolicy.PRESENCE_INTERNAL;
+ }
- // Let the policy update hidden states.
- config.keyboardHidden = Configuration.KEYBOARDHIDDEN_NO;
- config.hardKeyboardHidden = Configuration.HARDKEYBOARDHIDDEN_NO;
- config.navigationHidden = Configuration.NAVIGATIONHIDDEN_NO;
- mPolicy.adjustConfigurationLw(config, keyboardPresence, navigationPresence);
+ // Determine whether a hard keyboard is available and enabled.
+ boolean hardKeyboardAvailable = config.keyboard != Configuration.KEYBOARD_NOKEYS;
+ if (hardKeyboardAvailable != mHardKeyboardAvailable) {
+ mHardKeyboardAvailable = hardKeyboardAvailable;
+ mH.removeMessages(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
+ mH.sendEmptyMessage(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
}
+ if (mShowImeWithHardKeyboard) {
+ config.keyboard = Configuration.KEYBOARD_NOKEYS;
+ }
+
+ // Let the policy update hidden states.
+ config.keyboardHidden = Configuration.KEYBOARDHIDDEN_NO;
+ config.hardKeyboardHidden = Configuration.HARDKEYBOARDHIDDEN_NO;
+ config.navigationHidden = Configuration.NAVIGATIONHIDDEN_NO;
+ mPolicy.adjustConfigurationLw(config, keyboardPresence, navigationPresence);
return true;
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 1e372ab..7ff7827 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -1580,15 +1580,16 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
void syncDeviceCapabilitiesLocked(DevicePolicyData policy) {
// Ensure the status of the camera is synced down to the system. Interested native services
// should monitor this value and act accordingly.
- boolean systemState = SystemProperties.getBoolean(SYSTEM_PROP_DISABLE_CAMERA, false);
+ String cameraPropertyForUser = SYSTEM_PROP_DISABLE_CAMERA_PREFIX + policy.mUserHandle;
+ boolean systemState = SystemProperties.getBoolean(cameraPropertyForUser, false);
boolean cameraDisabled = getCameraDisabled(null, policy.mUserHandle);
if (cameraDisabled != systemState) {
long token = Binder.clearCallingIdentity();
try {
String value = cameraDisabled ? "1" : "0";
if (DBG) Slog.v(LOG_TAG, "Change in camera state ["
- + SYSTEM_PROP_DISABLE_CAMERA + "] = " + value);
- SystemProperties.set(SYSTEM_PROP_DISABLE_CAMERA, value);
+ + cameraPropertyForUser + "] = " + value);
+ SystemProperties.set(cameraPropertyForUser, value);
} finally {
Binder.restoreCallingIdentity(token);
}
@@ -3669,9 +3670,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
/**
* The system property used to share the state of the camera. The native camera service
- * is expected to read this property and act accordingly.
+ * is expected to read this property and act accordingly. The userId should be appended
+ * to this key.
*/
- public static final String SYSTEM_PROP_DISABLE_CAMERA = "sys.secpolicy.camera.disabled";
+ public static final String SYSTEM_PROP_DISABLE_CAMERA_PREFIX = "sys.secpolicy.camera.off_";
/**
* Disables all device cameras according to the specified admin.
diff --git a/tests/HwAccelerationTest/res/layout/projection_clipping.xml b/tests/HwAccelerationTest/res/layout/projection_clipping.xml
index 7177fc8f..1f2b939 100644
--- a/tests/HwAccelerationTest/res/layout/projection_clipping.xml
+++ b/tests/HwAccelerationTest/res/layout/projection_clipping.xml
@@ -14,13 +14,13 @@
android:id="@+id/clickable1"
android:layout_width="100dp"
android:layout_height="100dp"
- android:background="?android:attr/selectableItemBackground"/>
+ android:background="?android:attr/selectableItemBackgroundBorderless"/>
<View
android:id="@+id/clickable2"
android:translationX="50dp"
android:translationY="10dp"
android:layout_width="150dp"
android:layout_height="100dp"
- android:background="?android:attr/selectableItemBackground"/>
+ android:background="?android:attr/selectableItemBackgroundBorderless"/>
</FrameLayout>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/tools/apilint/apilint.py b/tools/apilint/apilint.py
index fefea6b..b8eaa2d 100644
--- a/tools/apilint/apilint.py
+++ b/tools/apilint/apilint.py
@@ -409,7 +409,7 @@ def verify_parcelable(clazz):
def verify_protected(clazz):
- """Verify that no protected methods are allowed."""
+ """Verify that no protected methods or fields are allowed."""
for m in clazz.methods:
if "protected" in m.split:
error(clazz, m, "M7", "No protected methods; must be public")
@@ -554,7 +554,7 @@ def verify_helper_classes(clazz):
if "final" in m.split: continue
if not re.match("on[A-Z]", m.name):
if "abstract" in m.split:
- error(clazz, m, None, "Methods implemented by developers must be named onFoo()")
+ warn(clazz, m, None, "Methods implemented by developers should be named onFoo()")
else:
warn(clazz, m, None, "If implemented by developer, should be named onFoo(); otherwise consider marking final")
@@ -578,7 +578,7 @@ def verify_builder(clazz):
if m.name.startswith("clear"): continue
if m.name.startswith("with"):
- error(clazz, m, None, "Builder methods names must follow setFoo() style")
+ warn(clazz, m, None, "Builder methods names should follow setFoo() style")
if m.name.startswith("set"):
if not m.typ.endswith(clazz.fullname):
@@ -692,7 +692,7 @@ def verify_flags(clazz):
scope = f.name[0:f.name.index("FLAG_")]
if val & known[scope]:
- error(clazz, f, "C1", "Found overlapping flag constant value")
+ warn(clazz, f, "C1", "Found overlapping flag constant value")
known[scope] |= val
@@ -740,13 +740,13 @@ def verify_manager(clazz):
if not clazz.name.endswith("Manager"): return
for c in clazz.ctors:
- error(clazz, c, None, "Managers must always be obtained from Context")
+ error(clazz, c, None, "Managers should always be obtained from Context")
def verify_boxed(clazz):
"""Verifies that methods avoid boxed primitives."""
- boxed = ["java.lang.Number", "java.lang.Byte","java.lang.Double","java.lang.Float","java.lang.Integer","java.lang.Long","java.lang.Short"]
+ boxed = ["java.lang.Number","java.lang.Byte","java.lang.Double","java.lang.Float","java.lang.Integer","java.lang.Long","java.lang.Short"]
for c in clazz.ctors:
for arg in c.args:
@@ -782,6 +782,115 @@ def verify_static_utils(clazz):
error(clazz, None, None, "Fully-static utility classes must not have constructor")
+def verify_overload_args(clazz):
+ """Verifies that method overloads add new arguments at the end."""
+ if clazz.fullname.startswith("android.opengl"): return
+
+ overloads = collections.defaultdict(list)
+ for m in clazz.methods:
+ if "deprecated" in m.split: continue
+ overloads[m.name].append(m)
+
+ for name, methods in overloads.iteritems():
+ if len(methods) <= 1: continue
+
+ # Look for arguments common across all overloads
+ def cluster(args):
+ count = collections.defaultdict(int)
+ res = set()
+ for i in range(len(args)):
+ a = args[i]
+ res.add("%s#%d" % (a, count[a]))
+ count[a] += 1
+ return res
+
+ common_args = cluster(methods[0].args)
+ for m in methods:
+ common_args = common_args & cluster(m.args)
+
+ if len(common_args) == 0: continue
+
+ # Require that all common arguments are present at start of signature
+ locked_sig = None
+ for m in methods:
+ sig = m.args[0:len(common_args)]
+ if not common_args.issubset(cluster(sig)):
+ warn(clazz, m, "M2", "Expected common arguments [%s] at beginning of overloaded method" % (", ".join(common_args)))
+ elif not locked_sig:
+ locked_sig = sig
+ elif locked_sig != sig:
+ error(clazz, m, "M2", "Expected consistent argument ordering between overloads: %s..." % (", ".join(locked_sig)))
+
+
+def verify_callback_handlers(clazz):
+ """Verifies that methods adding listener/callback have overload
+ for specifying delivery thread."""
+
+ # Ignore UI components which deliver things on main thread
+ skip = [
+ "android.animation",
+ "android.view",
+ "android.graphics",
+ "android.transition",
+ "android.widget",
+ "android.webkit",
+ ]
+ for s in skip:
+ if clazz.fullname.startswith(s): return
+ if clazz.extends and clazz.extends.startswith(s): return
+
+ skip = [
+ "android.app.ActionBar",
+ "android.app.AlertDialog",
+ "android.app.AlertDialog.Builder",
+ "android.app.Application",
+ "android.app.Activity",
+ "android.app.Dialog",
+ "android.app.Fragment",
+ "android.app.FragmentManager",
+ "android.app.LoaderManager",
+ "android.app.ListActivity",
+ "android.app.AlertDialog.Builder"
+ "android.content.Loader",
+ ]
+ for s in skip:
+ if clazz.fullname == s or clazz.extends == s: return
+
+ found = {}
+ by_name = collections.defaultdict(list)
+ for m in clazz.methods:
+ if m.name.startswith("unregister"): continue
+ if m.name.startswith("remove"): continue
+ if re.match("on[A-Z]+", m.name): continue
+
+ by_name[m.name].append(m)
+
+ for a in m.args:
+ if a.endswith("Listener") or a.endswith("Callback") or a.endswith("Callbacks"):
+ found[m.name] = m
+
+ for f in found.values():
+ takes_handler = False
+ for m in by_name[f.name]:
+ if "android.os.Handler" in m.args:
+ takes_handler = True
+ if not takes_handler:
+ error(clazz, f, "L1", "Registration methods should have overload that accepts delivery Handler")
+
+
+def verify_context_first(clazz):
+ """Verifies that methods accepting a Context keep it the first argument."""
+ for m in clazz.ctors:
+ if len(m.args) > 1:
+ if "android.content.Context" in m.args[1:]:
+ error(clazz, m, "M3", "Context is distinct, so it must be the first argument")
+
+ for m in clazz.methods:
+ if len(m.args) > 1:
+ if "android.content.Context" in m.args[1:]:
+ error(clazz, m, "M3", "Context is distinct, so it must be the first argument")
+
+
def verify_style(api):
"""Find all style issues in the given API level."""
global failures
@@ -826,6 +935,9 @@ def verify_style(api):
verify_manager(clazz)
verify_boxed(clazz)
verify_static_utils(clazz)
+ verify_overload_args(clazz)
+ verify_callback_handlers(clazz)
+ verify_context_first(clazz)
return failures
diff --git a/tools/layoutlib/.idea/codeStyleSettings.xml b/tools/layoutlib/.idea/codeStyleSettings.xml
index a04e440..1f08f09 100644
--- a/tools/layoutlib/.idea/codeStyleSettings.xml
+++ b/tools/layoutlib/.idea/codeStyleSettings.xml
@@ -5,7 +5,6 @@
<value>
<option name="FIELD_NAME_PREFIX" value="m" />
<option name="STATIC_FIELD_NAME_PREFIX" value="s" />
- <option name="USE_FQ_CLASS_NAMES_IN_JAVADOC" value="false" />
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
@@ -34,6 +33,9 @@
<option name="JD_ADD_BLANK_AFTER_RETURN" value="true" />
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
<option name="WRAP_COMMENTS" value="true" />
+ <JavaCodeStyleSettings>
+ <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
+ </JavaCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
diff --git a/tools/layoutlib/.idea/misc.xml b/tools/layoutlib/.idea/misc.xml
index fd63e6c..fa48f70 100644
--- a/tools/layoutlib/.idea/misc.xml
+++ b/tools/layoutlib/.idea/misc.xml
@@ -12,5 +12,4 @@
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
-</project>
-
+</project> \ No newline at end of file
diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeAssetManager.java b/tools/layoutlib/bridge/src/android/content/res/BridgeAssetManager.java
index c41a4ee..2691e56 100644
--- a/tools/layoutlib/bridge/src/android/content/res/BridgeAssetManager.java
+++ b/tools/layoutlib/bridge/src/android/content/res/BridgeAssetManager.java
@@ -16,12 +16,13 @@
package android.content.res;
+import com.android.ide.common.rendering.api.AssetRepository;
import com.android.layoutlib.bridge.Bridge;
-import android.content.res.AssetManager;
-
public class BridgeAssetManager extends AssetManager {
+ private AssetRepository mAssetRepository;
+
/**
* This initializes the static field {@link AssetManager#sSystem} which is used
* by methods who get a global asset manager using {@link AssetManager#getSystem()}.
@@ -48,6 +49,14 @@ public class BridgeAssetManager extends AssetManager {
AssetManager.sSystem = null;
}
- private BridgeAssetManager() {
+ public void setAssetRepository(AssetRepository assetRepository) {
+ mAssetRepository = assetRepository;
+ }
+
+ public AssetRepository getAssetRepository() {
+ return mAssetRepository;
+ }
+
+ public BridgeAssetManager() {
}
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
index ab79664..42de4ec 100644
--- a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
@@ -18,21 +18,28 @@ package android.graphics;
import com.android.annotations.NonNull;
import com.android.annotations.Nullable;
+import com.android.ide.common.rendering.api.AssetRepository;
import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import android.content.res.AssetManager;
+import android.content.res.BridgeAssetManager;
import java.awt.Font;
import java.awt.FontFormatException;
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
import java.util.Scanner;
import java.util.Set;
@@ -56,10 +63,28 @@ public class FontFamily_Delegate {
public static final int BOLD_FONT_WEIGHT_DELTA = 300;
public static final int BOLD_FONT_WEIGHT = 700;
- // FONT_SUFFIX_ITALIC will always match FONT_SUFFIX_BOLDITALIC and hence it must be checked
- // separately.
private static final String FONT_SUFFIX_ITALIC = "Italic.ttf";
private static final String FN_ALL_FONTS_LIST = "fontsInSdk.txt";
+ private static final String EXTENSION_OTF = ".otf";
+
+ private static final int CACHE_SIZE = 10;
+ // The cache has a drawback that if the font file changed after the font object was created,
+ // we will not update it.
+ private static final Map<String, FontInfo> sCache =
+ new LinkedHashMap<String, FontInfo>(CACHE_SIZE) {
+ @Override
+ protected boolean removeEldestEntry(Entry<String, FontInfo> eldest) {
+ return size() > CACHE_SIZE;
+ }
+
+ @Override
+ public FontInfo put(String key, FontInfo value) {
+ // renew this entry.
+ FontInfo removed = remove(key);
+ super.put(key, value);
+ return removed;
+ }
+ };
/**
* A class associating {@link Font} with its metadata.
@@ -194,7 +219,7 @@ public class FontFamily_Delegate {
try {
return Font.createFont(Font.TRUETYPE_FONT, f);
} catch (Exception e) {
- if (path.endsWith(".otf") && e instanceof FontFormatException) {
+ if (path.endsWith(EXTENSION_OTF) && e instanceof FontFormatException) {
// If we aren't able to load an Open Type font, don't log a warning just yet.
// We wait for a case where font is being used. Only then we try to log the
// warning.
@@ -281,8 +306,74 @@ public class FontFamily_Delegate {
@LayoutlibDelegate
/*package*/ static boolean nAddFontFromAsset(long nativeFamily, AssetManager mgr, String path) {
- Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
- "Typeface.createFromAsset is not supported.", null, null);
+ FontFamily_Delegate ffd = sManager.getDelegate(nativeFamily);
+ ffd.mValid = true;
+ if (mgr == null) {
+ return false;
+ }
+ if (mgr instanceof BridgeAssetManager) {
+ InputStream fontStream = null;
+ try {
+ AssetRepository assetRepository = ((BridgeAssetManager) mgr).getAssetRepository();
+ if (assetRepository == null) {
+ Bridge.getLog().error(LayoutLog.TAG_MISSING_ASSET, "Asset not found: " + path,
+ null);
+ return false;
+ }
+ if (!assetRepository.isSupported()) {
+ // Don't log any warnings on unsupported IDEs.
+ return false;
+ }
+ // Check cache
+ FontInfo fontInfo = sCache.get(path);
+ if (fontInfo != null) {
+ // renew the font's lease.
+ sCache.put(path, fontInfo);
+ ffd.addFont(fontInfo);
+ return true;
+ }
+ fontStream = assetRepository.openAsset(path, AssetManager.ACCESS_STREAMING);
+ if (fontStream == null) {
+ Bridge.getLog().error(LayoutLog.TAG_MISSING_ASSET, "Asset not found: " + path,
+ path);
+ return false;
+ }
+ Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
+ fontInfo = new FontInfo();
+ fontInfo.mFont = font;
+ fontInfo.mWeight = font.isBold() ? BOLD_FONT_WEIGHT : DEFAULT_FONT_WEIGHT;
+ fontInfo.mIsItalic = font.isItalic();
+ ffd.addFont(fontInfo);
+ return true;
+ } catch (IOException e) {
+ Bridge.getLog().error(LayoutLog.TAG_MISSING_ASSET, "Unable to load font " + path, e,
+ path);
+ } catch (FontFormatException e) {
+ if (path.endsWith(EXTENSION_OTF)) {
+ // otf fonts are not supported on the user's config (JRE version + OS)
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
+ "OpenType fonts are not supported yet: " + path, null, path);
+ } else {
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
+ "Unable to load font " + path, e, path);
+ }
+ } finally {
+ if (fontStream != null) {
+ try {
+ fontStream.close();
+ } catch (IOException ignored) {
+ }
+ }
+ }
+ return false;
+ }
+ // This should never happen. AssetManager is a final class (from user's perspective), and
+ // we've replaced every creation of AssetManager with our implementation. We create an
+ // exception and log it, but continue with rest of the rendering, without loading this font.
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
+ "You have found a bug in the rendering library. Please file a bug at b.android.com.",
+ new RuntimeException("Asset Manager is not an instance of BridgeAssetManager"),
+ null);
return false;
}
diff --git a/tools/layoutlib/bridge/src/android/view/ViewGroup_Delegate.java b/tools/layoutlib/bridge/src/android/view/ViewGroup_Delegate.java
index a6c00f7..3915046 100644
--- a/tools/layoutlib/bridge/src/android/view/ViewGroup_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/view/ViewGroup_Delegate.java
@@ -71,8 +71,10 @@ public class ViewGroup_Delegate {
int x = 0;
if (outline.mRect != null) {
Shadow s = getRectShadow(parent, canvas, child, outline);
- shadow = s.mShadow;
- x = -s.mShadowWidth;
+ if (s != null) {
+ shadow = s.mShadow;
+ x = -s.mShadowWidth;
+ }
} else if (outline.mPath != null) {
shadow = getPathShadow(child, outline, canvas);
}
@@ -132,6 +134,9 @@ public class ViewGroup_Delegate {
private static BufferedImage getPathShadow(View child, Outline outline, Canvas canvas) {
Rect clipBounds = canvas.getClipBounds();
+ if (clipBounds.isEmpty()) {
+ return null;
+ }
BufferedImage image = new BufferedImage(clipBounds.width(), clipBounds.height(),
BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = image.createGraphics();
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index 3441878..2f62b93 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -18,6 +18,7 @@ package com.android.layoutlib.bridge.android;
import android.os.IBinder;
import com.android.annotations.Nullable;
+import com.android.ide.common.rendering.api.AssetRepository;
import com.android.ide.common.rendering.api.ILayoutPullParser;
import com.android.ide.common.rendering.api.IProjectCallback;
import com.android.ide.common.rendering.api.LayoutLog;
@@ -48,6 +49,7 @@ import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
+import android.content.res.BridgeAssetManager;
import android.content.res.BridgeResources;
import android.content.res.BridgeTypedArray;
import android.content.res.Configuration;
@@ -102,6 +104,7 @@ public final class BridgeContext extends Context {
* used to populate the mViewKeyMap.
*/
private final HashMap<Object, Object> mViewKeyHelpMap = new HashMap<Object, Object>();
+ private final BridgeAssetManager mAssets;
private Resources mSystemResources;
private final Object mProjectKey;
private final DisplayMetrics mMetrics;
@@ -141,6 +144,7 @@ public final class BridgeContext extends Context {
*/
public BridgeContext(Object projectKey, DisplayMetrics metrics,
RenderResources renderResources,
+ AssetRepository assets,
IProjectCallback projectCallback,
Configuration config,
int targetSdkVersion,
@@ -151,6 +155,8 @@ public final class BridgeContext extends Context {
mRenderResources = renderResources;
mConfig = config;
+ mAssets = new BridgeAssetManager();
+ mAssets.setAssetRepository(assets);
mApplicationInfo = new ApplicationInfo();
mApplicationInfo.targetSdkVersion = targetSdkVersion;
@@ -1088,9 +1094,8 @@ public final class BridgeContext extends Context {
}
@Override
- public AssetManager getAssets() {
- // pass
- return null;
+ public BridgeAssetManager getAssets() {
+ return mAssets;
}
@Override
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 60f5331..127cb72 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
@@ -35,7 +35,6 @@ import com.android.resources.ScreenSize;
import android.content.res.Configuration;
import android.os.HandlerThread_Delegate;
-import android.os.Looper;
import android.util.DisplayMetrics;
import android.view.ViewConfiguration_Accessor;
import android.view.inputmethod.InputMethodManager;
@@ -71,7 +70,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
/**
* Creates a renderAction.
* <p>
- * This <b>must</b> be followed by a call to {@link RenderAction#init()}, which act as a
+ * This <b>must</b> be followed by a call to {@link RenderAction#init(long)}, which act as a
* call to {@link RenderAction#acquire(long)}
*
* @param params the RenderParams. This must be a copy that the action can keep
@@ -121,8 +120,8 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
// build the context
mContext = new BridgeContext(mParams.getProjectKey(), metrics, resources,
- mParams.getProjectCallback(), getConfiguration(), mParams.getTargetSdkVersion(),
- mParams.isRtlSupported());
+ mParams.getAssets(), mParams.getProjectCallback(), getConfiguration(),
+ mParams.getTargetSdkVersion(), mParams.isRtlSupported());
setUp();
@@ -139,7 +138,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
* The preparation can fail if another rendering took too long and the timeout was elapsed.
*
* More than one call to this from the same thread will have no effect and will return
- * {@link Result#SUCCESS}.
+ * {@link Result.Status#SUCCESS}.
*
* After scene actions have taken place, only one call to {@link #release()} must be
* done.
@@ -173,7 +172,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
* Acquire the lock so that the scene can be acted upon.
* <p>
* This returns null if the lock was just acquired, otherwise it returns
- * {@link Result#SUCCESS} if the lock already belonged to that thread, or another
+ * {@link Result.Status#SUCCESS} if the lock already belonged to that thread, or another
* instance (see {@link Result#getStatus()}) if an error occurred.
*
* @param timeout the time to wait if another rendering is happening.
@@ -184,11 +183,11 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
*/
private Result acquireLock(long timeout) {
ReentrantLock lock = Bridge.getLock();
- if (lock.isHeldByCurrentThread() == false) {
+ if (!lock.isHeldByCurrentThread()) {
try {
boolean acquired = lock.tryLock(timeout, TimeUnit.MILLISECONDS);
- if (acquired == false) {
+ if (!acquired) {
return ERROR_TIMEOUT.createResult();
}
} catch (InterruptedException e) {
@@ -308,7 +307,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
*/
protected void checkLock() {
ReentrantLock lock = Bridge.getLock();
- if (lock.isHeldByCurrentThread() == false) {
+ if (!lock.isHeldByCurrentThread()) {
throw new IllegalStateException("scene must be acquired first. see #acquire(long)");
}
if (sCurrentContext != mContext) {
@@ -347,6 +346,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
config.screenWidthDp = hardwareConfig.getScreenWidth() / density.getDpiValue();
config.screenHeightDp = hardwareConfig.getScreenHeight() / density.getDpiValue();
if (config.screenHeightDp < config.screenWidthDp) {
+ //noinspection SuspiciousNameCombination
config.smallestScreenWidthDp = config.screenHeightDp;
} else {
config.smallestScreenWidthDp = config.screenWidthDp;
@@ -367,6 +367,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
config.orientation = Configuration.ORIENTATION_LANDSCAPE;
break;
case SQUARE:
+ //noinspection deprecation
config.orientation = Configuration.ORIENTATION_SQUARE;
break;
}