From b40c1fdaee6e6cabea8d1ed78f56d5b6bd133cfb Mon Sep 17 00:00:00 2001
From: Scott Main
Date: Tue, 23 Apr 2013 13:30:06 -0700
Subject: [PATCH] add docs for new attributes, including account restriction
for restricted profiles
Change-Id: I737ea55bfa58562b1b384e52626e95b479759376
---
core/java/android/widget/ProgressBar.java | 1 +
.../topics/manifest/application-element.jd | 89 ++++++++++++++++++-
.../topics/resources/drawable-resource.jd | 7 ++
.../graphics/drawable/BitmapDrawable.java | 2 +
4 files changed, 96 insertions(+), 3 deletions(-)
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index d816200947cdf..5392a96715bf3 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -184,6 +184,7 @@ import java.util.ArrayList;
* @attr ref android.R.styleable#ProgressBar_maxWidth
* @attr ref android.R.styleable#ProgressBar_minHeight
* @attr ref android.R.styleable#ProgressBar_minWidth
+ * @attr ref android.R.styleable#ProgressBar_mirrorForRtl
* @attr ref android.R.styleable#ProgressBar_progress
* @attr ref android.R.styleable#ProgressBar_progressDrawable
* @attr ref android.R.styleable#ProgressBar_secondaryProgress
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 42cfdd56ae104..6bfa3dc8aee88 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -1,11 +1,11 @@
page.title=<application>
-parent.title=The AndroidManifest.xml File
-parent.link=manifest-intro.html
+
@jd:body
- syntax:
<application android:allowTaskReparenting=["true" | "false"]
+ android:allowBackup=["true" | "false"]
android:backupAgent="string"
android:debuggable=["true" | "false"]
android:description="string resource"
@@ -23,10 +23,14 @@ parent.link=manifest-intro.html
android:persistent=["true" | "false"]
android:process="string"
android:restoreAnyVersion=["true" | "false"]
+ android:requiredAccountType="string"
+ android:restrictedAccountType="string"
android:supportsRtl=["true" | "false"]
android:taskAffinity="string"
+ android:testOnly=["true" | "false"]
android:theme="resource or theme"
- android:uiOptions=["none" | "splitActionBarWhenNarrow"] >
+ android:uiOptions=["none" | "splitActionBarWhenNarrow"]
+ android:vmSafeMode=["true" | "false"] >
. . .
</application>
@@ -52,6 +56,10 @@ for corresponding attributes of the component elements. Others (such as
{@code allowClearUserData}) set values for the application as a whole and
cannot be overridden by the components.
+
+
+
+
- attributes
@@ -71,6 +79,15 @@ attribute that can override the value set here. See that attribute for more
information.
+
+{@code android:allowbackup}
+Whether to allow the application to participate in the backup
+and restore infrastructure. If this attribute is set to false, no backup
+or restore of the application will ever be performed, even by a full-system
+backup that would otherwise cause all application data to be saved via adb.
+The default value of this attribute is true.
+
+
{@code android:backupAgent}
The name of the class that implement's the application's backup agent,
a subclass of {@link android.app.backup.BackupAgent}. The attribute value should be
@@ -282,6 +299,57 @@ incompatible. Use with caution!
The default value of this attribute is {@code false}.
+
+
+{@code android:requiredAccountType}
+Specifies the account type required by the application in order to function.
+If your app requires an {@link android.accounts.Account}, the value for this attribute must
+correspond to the account authenticator
+type used by your app (as defined by {@link android.accounts.AuthenticatorDescription}),
+such as "com.google".
+
+The default value is null and indicates that the application
+can work without any accounts.
+
+
Because restricted profiles currently
+cannot add accounts, specifying this attribute makes your app
+unavailable from a restricted profile unless you also declare
+{@code android:restrictedAccountType} with
+the same value.
+
+Caution:
+If the account data may reveal personally identifiable information, it's important
+that you declare this attribute and leave {@code android:restrictedAccountType} null, so that restricted profiles cannot use
+your app to access personal information that belongs to the owner user.
+
+This attribute was added in API level 18.
+
+
+
+{@code android:restrictedAccountType}
+Specifies the account type required by this application and indicates that restricted profiles
+are allowed to access such accounts that belong to the owner user. If your app requires an
+{@link android.accounts.Account} and restricted profiles are allowed to
+access the primary user's accounts, the value for this attribute must
+correspond to the account authenticator type used by your app (as
+defined by {@link android.accounts.AuthenticatorDescription}), such as "com.google".
+
+The default value is null and indicates that the application can work without any
+accounts.
+
+
Caution:
+Specifying this attribute allows restricted profiles to use your
+app with accounts that belong to the owner user, which may reveal personally identifiable
+information. If the account may reveal personal details, you should not
+use this attribute and you should instead declare the {@code android:requiredAccountType} attribute
+to make your app unavailable to restricted profiles.
+
+This attribute was added in API level 18.
+
+
+
+
{@code android:supportsRtl}
Declares whether your application is willing to support right-to-left (RTL) layouts.
If set to {@code true} and <manifest> element.
+{@code android:testOnly}
+Indicates whether this application is only for testing purposes. For example,
+it may expose functionality or data outside of itself that would cause a security
+hole, but is useful for testing. This kind of application can be installed
+only through adb.
+
+
{@code android:theme}
A reference to a style resource defining a default theme for all
activities in the application. Individual activities can override
@@ -340,6 +415,14 @@ href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar developer guide.<
This attribute was added in API level 14.
+{@code android:vmSafeMode}
+Indicates whether the app would like the virtual machine (VM) to operate
+in safe mode. The default value is {@code "false"}.
+
+
+
+
+
diff --git a/docs/html/guide/topics/resources/drawable-resource.jd b/docs/html/guide/topics/resources/drawable-resource.jd
index a34ed6c0ed33d..dee28fe02d5c2 100644
--- a/docs/html/guide/topics/resources/drawable-resource.jd
+++ b/docs/html/guide/topics/resources/drawable-resource.jd
@@ -174,6 +174,7 @@ In XML: @[package:]drawable/filename
android:gravity=["top" | "bottom" | "left" | "right" | "center_vertical" |
"fill_vertical" | "center_horizontal" | "fill_horizontal" |
"center" | "fill" | "clip_vertical" | "clip_horizontal"]
+ android:mipMap=["true" | "false"]
android:tileMode=["disabled" | "clamp" | "repeat" | "mirror"] />
@@ -245,6 +246,12 @@ the right edge, a right gravity clips the left edge, and neither clips both edge
+
+ android:mipMap
+ Boolean. Enables or disables the mipmap hint. See {@link
+ android.graphics.Bitmap#setHasMipMap setHasMipMap()} for more information.
+ Default value is false.
+
android:tileMode
Keyword. Defines the tile mode. When the tile mode is enabled, the bitmap is
repeated. Gravity is ignored when the tile mode is enabled.
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 675c4b6bceb01..a97ed2c2709a9 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -53,6 +53,7 @@ import java.io.IOException;
* @attr ref android.R.styleable#BitmapDrawable_filter
* @attr ref android.R.styleable#BitmapDrawable_dither
* @attr ref android.R.styleable#BitmapDrawable_gravity
+ * @attr ref android.R.styleable#BitmapDrawable_mipMap
* @attr ref android.R.styleable#BitmapDrawable_tileMode
*/
public class BitmapDrawable extends Drawable {
@@ -283,6 +284,7 @@ public class BitmapDrawable extends Drawable {
* is null, this method always returns false.
*
* @see #setMipMap(boolean)
+ * @attr ref android.R.styleable#BitmapDrawable_mipMap
*/
public boolean hasMipMap() {
return mBitmapState.mBitmap != null && mBitmapState.mBitmap.hasMipMap();