summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt32
-rw-r--r--core/java/android/text/TextDirectionHeuristic.java2
-rw-r--r--core/java/android/text/TextDirectionHeuristics.java2
-rw-r--r--core/java/android/view/ActionMode.java13
-rw-r--r--core/java/android/view/Display.java9
-rw-r--r--core/java/android/view/View.java10
-rw-r--r--core/java/android/widget/HorizontalScrollView.java27
-rw-r--r--core/java/android/widget/ScrollView.java31
-rw-r--r--core/java/com/android/internal/app/ActionBarImpl.java1
-rw-r--r--core/java/com/android/internal/view/StandaloneActionMode.java1
-rw-r--r--core/res/AndroidManifest.xml788
-rwxr-xr-xcore/res/res/values/strings.xml89
-rw-r--r--core/res/res/values/themes.xml7
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java15
-rwxr-xr-xservices/java/com/android/server/VibratorService.java12
-rw-r--r--services/java/com/android/server/input/InputManagerService.java10
-rwxr-xr-xservices/java/com/android/server/wm/WindowManagerService.java5
-rw-r--r--services/jni/com_android_server_input_InputManagerService.cpp24
18 files changed, 759 insertions, 319 deletions
diff --git a/api/current.txt b/api/current.txt
index ab18196..22bc7f2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -141,16 +141,34 @@ package android {
public static final class Manifest.permission_group {
ctor public Manifest.permission_group();
field public static final java.lang.String ACCOUNTS = "android.permission-group.ACCOUNTS";
+ field public static final java.lang.String APP_INFO = "android.permission-group.APP_INFO";
+ field public static final java.lang.String AUDIO_SETTINGS = "android.permission-group.AUDIO_SETTINGS";
+ field public static final java.lang.String BOOKMARKS = "android.permission-group.BOOKMARKS";
+ field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
+ field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
field public static final java.lang.String COST_MONEY = "android.permission-group.COST_MONEY";
field public static final java.lang.String DEVELOPMENT_TOOLS = "android.permission-group.DEVELOPMENT_TOOLS";
+ field public static final java.lang.String DEVICE_ALARMS = "android.permission-group.DEVICE_ALARMS";
+ field public static final java.lang.String DISPLAY = "android.permission-group.DISPLAY";
+ field public static final java.lang.String AFFECTS_BATTERY = "android.permission-group.AFFECTS_BATTERY";
field public static final java.lang.String HARDWARE_CONTROLS = "android.permission-group.HARDWARE_CONTROLS";
field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
field public static final java.lang.String MESSAGES = "android.permission-group.MESSAGES";
+ field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final java.lang.String NETWORK = "android.permission-group.NETWORK";
field public static final java.lang.String PERSONAL_INFO = "android.permission-group.PERSONAL_INFO";
field public static final java.lang.String PHONE_CALLS = "android.permission-group.PHONE_CALLS";
+ field public static final java.lang.String SCREENLOCK = "android.permission-group.SCREENLOCK";
+ field public static final java.lang.String SHORTRANGE_NETWORK = "android.permission-group.SHORTRANGE_NETWORK";
+ field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
+ field public static final java.lang.String STATUS_BAR = "android.permission-group.STATUS_BAR";
field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
+ field public static final java.lang.String SYNC_SETTINGS = "android.permission-group.SYNC_SETTINGS";
+ field public static final java.lang.String SYSTEM_CLOCK = "android.permission-group.SYSTEM_CLOCK";
field public static final java.lang.String SYSTEM_TOOLS = "android.permission-group.SYSTEM_TOOLS";
+ field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
+ field public static final java.lang.String VOICEMAIL = "android.permission-group.VOICEMAIL";
+ field public static final java.lang.String WALLPAPER = "android.permission-group.WALLPAPER";
}
public final class R {
@@ -21098,19 +21116,6 @@ package android.text {
method public int getTopPadding();
}
- public abstract interface TextDirectionHeuristic {
- }
-
- public class TextDirectionHeuristics {
- ctor public TextDirectionHeuristics();
- field public static final android.text.TextDirectionHeuristic ANYRTL_LTR;
- field public static final android.text.TextDirectionHeuristic FIRSTSTRONG_LTR;
- field public static final android.text.TextDirectionHeuristic FIRSTSTRONG_RTL;
- field public static final android.text.TextDirectionHeuristic LOCALE;
- field public static final android.text.TextDirectionHeuristic LTR;
- field public static final android.text.TextDirectionHeuristic RTL;
- }
-
public class TextPaint extends android.graphics.Paint {
ctor public TextPaint();
ctor public TextPaint(int);
@@ -22539,6 +22544,7 @@ package android.view {
method public abstract java.lang.CharSequence getSubtitle();
method public java.lang.Object getTag();
method public abstract java.lang.CharSequence getTitle();
+ method public boolean getTitleOptionalHint();
method public abstract void invalidate();
method public boolean isTitleOptional();
method public abstract void setCustomView(android.view.View);
diff --git a/core/java/android/text/TextDirectionHeuristic.java b/core/java/android/text/TextDirectionHeuristic.java
index 0bf64e4..513e11c 100644
--- a/core/java/android/text/TextDirectionHeuristic.java
+++ b/core/java/android/text/TextDirectionHeuristic.java
@@ -22,5 +22,5 @@ package android.text;
* @hide
*/
public interface TextDirectionHeuristic {
- /** @hide */ boolean isRtl(char[] text, int start, int count);
+ boolean isRtl(char[] text, int start, int count);
}
diff --git a/core/java/android/text/TextDirectionHeuristics.java b/core/java/android/text/TextDirectionHeuristics.java
index 6ca6161..bbaa173 100644
--- a/core/java/android/text/TextDirectionHeuristics.java
+++ b/core/java/android/text/TextDirectionHeuristics.java
@@ -22,6 +22,8 @@ import android.view.View;
/**
* Some objects that implement TextDirectionHeuristic.
+ *
+ * @hide
*/
public class TextDirectionHeuristics {
diff --git a/core/java/android/view/ActionMode.java b/core/java/android/view/ActionMode.java
index 0ba5fdb..a359952 100644
--- a/core/java/android/view/ActionMode.java
+++ b/core/java/android/view/ActionMode.java
@@ -30,6 +30,7 @@ package android.view;
*/
public abstract class ActionMode {
private Object mTag;
+ private boolean mTitleOptionalHint;
/**
* Set a tag object associated with this ActionMode.
@@ -119,6 +120,18 @@ public abstract class ActionMode {
* @param titleOptional true if the title only presents optional information.
*/
public void setTitleOptionalHint(boolean titleOptional) {
+ mTitleOptionalHint = titleOptional;
+ }
+
+ /**
+ * @return true if this action mode has been given a hint to consider the
+ * title/subtitle display to be optional.
+ *
+ * @see #setTitleOptionalHint(boolean)
+ * @see #isTitleOptional()
+ */
+ public boolean getTitleOptionalHint() {
+ return mTitleOptionalHint;
}
/**
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index bda8016..c947312 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -391,6 +391,15 @@ public class Display {
}
/**
+ * If the display is mirrored to an external HDMI display, returns the
+ * rotation of that display relative to its natural orientation.
+ * @hide
+ */
+ public int getExternalRotation() {
+ return Surface.ROTATION_0;
+ }
+
+ /**
* Gets display metrics based on an explicit assumed display size.
* @hide
*/
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 092bcbd..2f67481 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -5423,6 +5423,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* app should not need to concern itself with saving and restoring, but that
* the framework should take special note to preserve when possible.
*
+ * <p>A view with transient state cannot be trivially rebound from an external
+ * data source, such as an adapter binding item views in a list. This may be
+ * because the view is performing an animation, tracking user selection
+ * of content, or similar.</p>
+ *
* @return true if the view has transient state
*/
@ViewDebug.ExportedProperty(category = "layout")
@@ -5436,6 +5441,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* so every call to setHasTransientState(true) should be paired with a later call
* to setHasTransientState(false).
*
+ * <p>A view with transient state cannot be trivially rebound from an external
+ * data source, such as an adapter binding item views in a list. This may be
+ * because the view is performing an animation, tracking user selection
+ * of content, or similar.</p>
+ *
* @param hasTransientState true if this view has transient state
*/
public void setHasTransientState(boolean hasTransientState) {
diff --git a/core/java/android/widget/HorizontalScrollView.java b/core/java/android/widget/HorizontalScrollView.java
index c2559a5..1986450 100644
--- a/core/java/android/widget/HorizontalScrollView.java
+++ b/core/java/android/widget/HorizontalScrollView.java
@@ -536,10 +536,15 @@ public class HorizontalScrollView extends FrameLayout {
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
- mIsBeingDragged = getChildCount() != 0;
- if (!mIsBeingDragged) {
+ if (getChildCount() == 0) {
return false;
}
+ if ((mIsBeingDragged = !mScroller.isFinished())) {
+ final ViewParent parent = getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(true);
+ }
+ }
/*
* If being flinged and user touches, stop the fling. isFinished
@@ -555,11 +560,23 @@ public class HorizontalScrollView extends FrameLayout {
break;
}
case MotionEvent.ACTION_MOVE:
+ final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
+ final int x = (int) ev.getX(activePointerIndex);
+ int deltaX = mLastMotionX - x;
+ if (!mIsBeingDragged && Math.abs(deltaX) > mTouchSlop) {
+ final ViewParent parent = getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(true);
+ }
+ mIsBeingDragged = true;
+ if (deltaX > 0) {
+ deltaX -= mTouchSlop;
+ } else {
+ deltaX += mTouchSlop;
+ }
+ }
if (mIsBeingDragged) {
// Scroll to follow the motion event
- final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
- final int x = (int) ev.getX(activePointerIndex);
- final int deltaX = (int) (mLastMotionX - x);
mLastMotionX = x;
final int oldX = mScrollX;
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 0f0dbae..f912c66 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -482,6 +482,10 @@ public class ScrollView extends FrameLayout {
if (mScrollStrictSpan == null) {
mScrollStrictSpan = StrictMode.enterCriticalSpan("ScrollView-scroll");
}
+ final ViewParent parent = getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(true);
+ }
}
break;
}
@@ -546,10 +550,15 @@ public class ScrollView extends FrameLayout {
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
- mIsBeingDragged = getChildCount() != 0;
- if (!mIsBeingDragged) {
+ if (getChildCount() == 0) {
return false;
}
+ if ((mIsBeingDragged = !mScroller.isFinished())) {
+ final ViewParent parent = getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(true);
+ }
+ }
/*
* If being flinged and user touches, stop the fling. isFinished
@@ -569,11 +578,23 @@ public class ScrollView extends FrameLayout {
break;
}
case MotionEvent.ACTION_MOVE:
+ final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
+ final int y = (int) ev.getY(activePointerIndex);
+ int deltaY = mLastMotionY - y;
+ if (!mIsBeingDragged && Math.abs(deltaY) > mTouchSlop) {
+ final ViewParent parent = getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(true);
+ }
+ mIsBeingDragged = true;
+ if (deltaY > 0) {
+ deltaY -= mTouchSlop;
+ } else {
+ deltaY += mTouchSlop;
+ }
+ }
if (mIsBeingDragged) {
// Scroll to follow the motion event
- final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
- final int y = (int) ev.getY(activePointerIndex);
- final int deltaY = mLastMotionY - y;
mLastMotionY = y;
final int oldX = mScrollX;
diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java
index ed711f3..805c0a9 100644
--- a/core/java/com/android/internal/app/ActionBarImpl.java
+++ b/core/java/com/android/internal/app/ActionBarImpl.java
@@ -817,6 +817,7 @@ public class ActionBarImpl extends ActionBar {
@Override
public void setTitleOptionalHint(boolean titleOptional) {
+ super.setTitleOptionalHint(titleOptional);
mContextView.setTitleOptional(titleOptional);
}
diff --git a/core/java/com/android/internal/view/StandaloneActionMode.java b/core/java/com/android/internal/view/StandaloneActionMode.java
index 4b681ec..fae7ea1 100644
--- a/core/java/com/android/internal/view/StandaloneActionMode.java
+++ b/core/java/com/android/internal/view/StandaloneActionMode.java
@@ -73,6 +73,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
@Override
public void setTitleOptionalHint(boolean titleOptional) {
+ super.setTitleOptionalHint(titleOptional);
mContextView.setTitleOptional(titleOptional);
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index e1eaf41..bd1f574 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -139,16 +139,29 @@
<eat-comment />
<!-- Used for permissions that can be used to make the user spend money
- without their direct involvement. For example, this is the group
- for permissions that allow you to directly place phone calls,
- directly send SMS messages, etc. -->
+ without their direct involvement. -->
<permission-group android:name="android.permission-group.COST_MONEY"
android:label="@string/permgrouplab_costMoney"
android:description="@string/permgroupdesc_costMoney" />
- <!-- Allows an application to send SMS messages. -->
+ <!-- ================================== -->
+ <!-- Permissions for accessing messages -->
+ <!-- ================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that allow an application to send messages
+ on behalf of the user or intercept messages being received by the
+ user. This is primarily intended for SMS/MMS messaging, such as
+ receiving or reading an MMS. -->
+ <permission-group android:name="android.permission-group.MESSAGES"
+ android:label="@string/permgrouplab_messages"
+ android:description="@string/permgroupdesc_messages"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="2"/>
+
+ <!-- Allows an application to send SMS messages. -->
<permission android:name="android.permission.SEND_SMS"
- android:permissionGroup="android.permission-group.COST_MONEY"
+ android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous"
android:label="@string/permlab_sendSms"
android:description="@string/permdesc_sendSms" />
@@ -157,33 +170,11 @@
input or confirmation.
@hide -->
<permission android:name="android.permission.SEND_SMS_NO_CONFIRMATION"
- android:permissionGroup="android.permission-group.COST_MONEY"
+ android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="signature|system"
android:label="@string/permlab_sendSmsNoConfirmation"
android:description="@string/permdesc_sendSmsNoConfirmation" />
- <!-- Allows an application to initiate a phone call without going through
- the Dialer user interface for the user to confirm the call
- being placed. -->
- <permission android:name="android.permission.CALL_PHONE"
- android:permissionGroup="android.permission-group.COST_MONEY"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_callPhone"
- android:description="@string/permdesc_callPhone" />
-
- <!-- ================================== -->
- <!-- Permissions for accessing messages -->
- <!-- ================================== -->
- <eat-comment />
-
- <!-- Used for permissions that allow an application to send messages
- on behalf of the user or intercept messages being received by the
- user. This is primarily intended for SMS/MMS messaging, such as
- receiving or reading an MMS. -->
- <permission-group android:name="android.permission-group.MESSAGES"
- android:label="@string/permgrouplab_messages"
- android:description="@string/permgroupdesc_messages" />
-
<!-- Allows an application to monitor incoming SMS messages, to record
or perform processing on them. -->
<permission android:name="android.permission.RECEIVE_SMS"
@@ -248,22 +239,24 @@
android:description="@string/permdesc_receiveWapPush" />
<!-- =============================================================== -->
- <!-- Permissions for accessing personal info (contacts and calendar) -->
+ <!-- Permissions for accessing social info (contacts and social) -->
<!-- =============================================================== -->
<eat-comment />
- <!-- Used for permissions that provide access to the user's private data,
- such as contacts, calendar events, e-mail messages, etc. This includes
+ <!-- Used for permissions that provide access to the user's social connections,
+ such as contacts, call logs, social stream, etc. This includes
both reading and writing of this data (which should generally be
expressed as two distinct permissions). -->
- <permission-group android:name="android.permission-group.PERSONAL_INFO"
- android:label="@string/permgrouplab_personalInfo"
- android:description="@string/permgroupdesc_personalInfo"
- android:permissionGroupFlags="personalInfo" />
+
+ <permission-group android:name="android.permission-group.SOCIAL_INFO"
+ android:label="@string/permgrouplab_socialInfo"
+ android:description="@string/permgroupdesc_socialInfo"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="6" />
<!-- Allows an application to read the user's contacts data. -->
<permission android:name="android.permission.READ_CONTACTS"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.SOCIAL_INFO"
android:protectionLevel="dangerous"
android:label="@string/permlab_readContacts"
android:description="@string/permdesc_readContacts" />
@@ -271,14 +264,14 @@
<!-- Allows an application to write (but not read) the user's
contacts data. -->
<permission android:name="android.permission.WRITE_CONTACTS"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.SOCIAL_INFO"
android:protectionLevel="dangerous"
android:label="@string/permlab_writeContacts"
android:description="@string/permdesc_writeContacts" />
<!-- Allows an application to read the user's call log. -->
<permission android:name="android.permission.READ_CALL_LOG"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.SOCIAL_INFO"
android:protectionLevel="dangerous"
android:label="@string/permlab_readCallLog"
android:description="@string/permdesc_readCallLog" />
@@ -286,11 +279,40 @@
<!-- Allows an application to write (but not read) the user's
contacts data. -->
<permission android:name="android.permission.WRITE_CALL_LOG"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.SOCIAL_INFO"
android:protectionLevel="dangerous"
android:label="@string/permlab_writeCallLog"
android:description="@string/permdesc_writeCallLog" />
+ <!-- Allows an application to read from the user's social stream. -->
+ <permission android:name="android.permission.READ_SOCIAL_STREAM"
+ android:permissionGroup="android.permission-group.SOCIAL_INFO"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_readSocialStream"
+ android:description="@string/permdesc_readSocialStream" />
+
+ <!-- Allows an application to write (but not read) the user's
+ social stream data. -->
+ <permission android:name="android.permission.WRITE_SOCIAL_STREAM"
+ android:permissionGroup="android.permission-group.SOCIAL_INFO"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_writeSocialStream"
+ android:description="@string/permdesc_writeSocialStream" />
+
+ <!-- =============================================================== -->
+ <!-- Permissions for accessing information about the device owner -->
+ <!-- =============================================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide access to information about the device
+ user such as profile information. This includes both reading and
+ writing of this data (which should generally be expressed as two
+ distinct permissions). -->
+ <permission-group android:name="android.permission-group.PERSONAL_INFO"
+ android:label="@string/permgrouplab_personalInfo"
+ android:description="@string/permgroupdesc_personalInfo"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="7" />
<!-- Allows an application to read the user's personal profile data. -->
<permission android:name="android.permission.READ_PROFILE"
@@ -307,20 +329,18 @@
android:label="@string/permlab_writeProfile"
android:description="@string/permdesc_writeProfile" />
- <!-- Allows an application to read from the user's social stream. -->
- <permission android:name="android.permission.READ_SOCIAL_STREAM"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_readSocialStream"
- android:description="@string/permdesc_readSocialStream" />
+ <!-- =============================================================== -->
+ <!-- Permissions for accessing the device calendar -->
+ <!-- =============================================================== -->
+ <eat-comment />
- <!-- Allows an application to write (but not read) the user's
- social stream data. -->
- <permission android:name="android.permission.WRITE_SOCIAL_STREAM"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_writeSocialStream"
- android:description="@string/permdesc_writeSocialStream" />
+ <!-- Used for permissions that provide access to the device
+ calendar to create / view events.-->
+ <permission-group android:name="android.permission-group.CALENDAR"
+ android:label="@string/permgrouplab_calendar"
+ android:description="@string/permgroupdesc_calendar"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="9" />
<!-- Allows an application to read the user's calendar data. -->
<permission android:name="android.permission.READ_CALENDAR"
@@ -337,26 +357,52 @@
android:label="@string/permlab_writeCalendar"
android:description="@string/permdesc_writeCalendar" />
+ <!-- =============================================================== -->
+ <!-- Permissions for accessing the user dictionary-->
+ <!-- =============================================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide access to the user
+ calendar to create / view events.-->
+ <permission-group android:name="android.permission-group.USER_DICTIONARY"
+ android:label="@string/permgrouplab_dictionary"
+ android:description="@string/permgroupdesc_dictionary"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="20" />
+
<!-- Allows an application to read the user dictionary. This should
really only be required by an IME, or a dictionary editor like
the Settings app. -->
<permission android:name="android.permission.READ_USER_DICTIONARY"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.USER_DICTIONARY"
android:protectionLevel="dangerous"
android:label="@string/permlab_readDictionary"
android:description="@string/permdesc_readDictionary" />
<!-- Allows an application to write to the user dictionary. -->
<permission android:name="android.permission.WRITE_USER_DICTIONARY"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.USER_DICTIONARY"
android:protectionLevel="normal"
android:label="@string/permlab_writeDictionary"
android:description="@string/permdesc_writeDictionary" />
+ <!-- =============================================================== -->
+ <!-- Permissions for accessing the user bookmarks -->
+ <!-- =============================================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide access to the user
+ bookmarks and browser history.-->
+ <permission-group android:name="android.permission-group.BOOKMARKS"
+ android:label="@string/permgrouplab_bookmarks"
+ android:description="@string/permgroupdesc_bookmarks"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="8" />
+
<!-- Allows an application to read (but not write) the user's
browsing history and bookmarks. -->
<permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.BOOKMARKS"
android:label="@string/permlab_readHistoryBookmarks"
android:description="@string/permdesc_readHistoryBookmarks"
android:protectionLevel="dangerous" />
@@ -364,22 +410,46 @@
<!-- Allows an application to write (but not read) the user's
browsing history and bookmarks. -->
<permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.BOOKMARKS"
android:label="@string/permlab_writeHistoryBookmarks"
android:description="@string/permdesc_writeHistoryBookmarks"
android:protectionLevel="dangerous" />
+ <!-- =============================================================== -->
+ <!-- Permissions for setting the device alarm -->
+ <!-- =============================================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide access to the user voicemail box. -->
+ <permission-group android:name="android.permission-group.DEVICE_ALARMS"
+ android:label="@string/permgrouplab_deviceAlarms"
+ android:description="@string/permgroupdesc_deviceAlarms"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="16"/>
+
<!-- Allows an application to broadcast an Intent to set an alarm for the
user. -->
<permission android:name="com.android.alarm.permission.SET_ALARM"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.DEVICE_ALARMS"
android:label="@string/permlab_setAlarm"
android:description="@string/permdesc_setAlarm"
android:protectionLevel="normal" />
+ <!-- =============================================================== -->
+ <!-- Permissions for accessing the user voicemail -->
+ <!-- =============================================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide access to the user voicemail box. -->
+ <permission-group android:name="android.permission-group.VOICEMAIL"
+ android:label="@string/permgrouplab_voicemail"
+ android:description="@string/permgroupdesc_voicemail"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="10" />
+
<!-- Allows an application to add voicemails into the system. -->
<permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:permissionGroup="android.permission-group.VOICEMAIL"
android:protectionLevel="dangerous"
android:label="@string/permlab_addVoicemail"
android:description="@string/permdesc_addVoicemail" />
@@ -393,7 +463,9 @@
location. -->
<permission-group android:name="android.permission-group.LOCATION"
android:label="@string/permgrouplab_location"
- android:description="@string/permgroupdesc_location" />
+ android:description="@string/permgroupdesc_location"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="5" />
<!-- Allows an application to access fine (e.g., GPS) location -->
<permission android:name="android.permission.ACCESS_FINE_LOCATION"
@@ -440,7 +512,8 @@
or other related network operations. -->
<permission-group android:name="android.permission-group.NETWORK"
android:label="@string/permgrouplab_network"
- android:description="@string/permgroupdesc_network" />
+ android:description="@string/permgroupdesc_network"
+ android:priority="11" />
<!-- Allows applications to open network sockets. -->
<permission android:name="android.permission.INTERNET"
@@ -462,6 +535,13 @@
android:protectionLevel="normal"
android:description="@string/permdesc_accessWifiState"
android:label="@string/permlab_accessWifiState" />
+
+ <!-- Allows applications to change Wi-Fi connectivity state -->
+ <permission android:name="android.permission.CHANGE_WIFI_STATE"
+ android:permissionGroup="android.permission-group.NETWORK"
+ android:protectionLevel="normal"
+ android:description="@string/permdesc_changeWifiState"
+ android:label="@string/permlab_changeWifiState" />
<!-- @hide -->
<permission android:name="android.permission.ACCESS_WIMAX_STATE"
@@ -469,36 +549,49 @@
android:protectionLevel="normal"
android:description="@string/permdesc_accessWimaxState"
android:label="@string/permlab_accessWimaxState" />
+
+ <!-- @hide -->
+ <permission android:name="android.permission.CHANGE_WIMAX_STATE"
+ android:permissionGroup="android.permission-group.NETWORK"
+ android:protectionLevel="dangerous"
+ android:description="@string/permdesc_changeWimaxState"
+ android:label="@string/permlab_changeWimaxState" />
+
+ <!-- ======================================= -->
+ <!-- Permissions for short range, peripheral networks -->
+ <!-- ======================================= -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide access to network services that
+ are for peripherals and other nearby devices. These networks
+ generally do not provide IP based networking or internet access.-->
+ <permission-group android:name="android.permission-group.SHORTRANGE_NETWORK"
+ android:label="@string/permgrouplab_shortRangeNetwork"
+ android:description="@string/permgroupdesc_shortRangeNetwork"
+ android:priority="12" />
+
<!-- Allows applications to connect to paired bluetooth devices -->
<permission android:name="android.permission.BLUETOOTH"
- android:permissionGroup="android.permission-group.NETWORK"
+ android:permissionGroup="android.permission-group.SHORTRANGE_NETWORK"
android:protectionLevel="dangerous"
android:description="@string/permdesc_bluetooth"
android:label="@string/permlab_bluetooth" />
-
+
+ <!-- Allows applications to discover and pair bluetooth devices -->
+ <permission android:name="android.permission.BLUETOOTH_ADMIN"
+ android:permissionGroup="android.permission-group.SHORTRANGE_NETWORK"
+ android:protectionLevel="dangerous"
+ android:description="@string/permdesc_bluetoothAdmin"
+ android:label="@string/permlab_bluetoothAdmin" />
+
<!-- Allows applications to perform I/O operations over NFC -->
<permission android:name="android.permission.NFC"
- android:permissionGroup="android.permission-group.NETWORK"
+ android:permissionGroup="android.permission-group.SHORTRANGE_NETWORK"
android:protectionLevel="dangerous"
android:description="@string/permdesc_nfc"
android:label="@string/permlab_nfc" />
- <!-- Allows an application to use SIP service -->
- <permission android:name="android.permission.USE_SIP"
- android:permissionGroup="android.permission-group.NETWORK"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_use_sip"
- android:label="@string/permlab_use_sip" />
-
- <!-- Allows applications to call into AccountAuthenticators. Only
- the system can get this permission. -->
- <permission android:name="android.permission.ACCOUNT_MANAGER"
- android:permissionGroup="android.permission-group.ACCOUNTS"
- android:protectionLevel="signature"
- android:description="@string/permdesc_accountManagerService"
- android:label="@string/permlab_accountManagerService" />
-
- <!-- Allows an internal user to use privaledged ConnectivityManager
+ <!-- Allows an internal user to use privileged ConnectivityManager
APIs.
@hide -->
<permission android:name="android.permission.CONNECTIVITY_INTERNAL"
@@ -514,7 +607,9 @@
by the Account Manager. -->
<permission-group android:name="android.permission-group.ACCOUNTS"
android:label="@string/permgrouplab_accounts"
- android:description="@string/permgroupdesc_accounts" />
+ android:description="@string/permgroupdesc_accounts"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="17" />
<!-- Allows access to the list of accounts in the Accounts Service -->
<permission android:name="android.permission.GET_ACCOUNTS"
@@ -545,58 +640,87 @@
android:label="@string/permlab_manageAccounts"
android:description="@string/permdesc_manageAccounts" />
+ <!-- Allows applications to call into AccountAuthenticators. Only
+ the system can get this permission. -->
+ <permission android:name="android.permission.ACCOUNT_MANAGER"
+ android:permissionGroup="android.permission-group.ACCOUNTS"
+ android:protectionLevel="signature"
+ android:description="@string/permdesc_accountManagerService"
+ android:label="@string/permlab_accountManagerService" />
+
<!-- ================================== -->
- <!-- Permissions for accessing hardware -->
+ <!-- Permissions for accessing hardware that may effect battery life-->
<!-- ================================== -->
<eat-comment />
<!-- Used for permissions that provide direct access to the hardware on
- the device. This includes audio, the camera, vibrator, etc. -->
- <permission-group android:name="android.permission-group.HARDWARE_CONTROLS"
- android:label="@string/permgrouplab_hardwareControls"
- android:description="@string/permgroupdesc_hardwareControls" />
+ the device that has an effect on battery life. This includes vibrator,
+ flashlight, etc. -->
- <!-- Allows an application to modify global audio settings -->
- <permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"
- android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_modifyAudioSettings"
- android:description="@string/permdesc_modifyAudioSettings" />
+ <permission-group android:name="android.permission-group.AFFECTS_BATTERY"
+ android:label="@string/permgrouplab_affectsBattery"
+ android:description="@string/permgroupdesc_affectsBattery"
+ android:priority="19" />
- <!-- Allows an application to record audio -->
- <permission android:name="android.permission.RECORD_AUDIO"
- android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_recordAudio"
- android:description="@string/permdesc_recordAudio" />
-
- <!-- Required to be able to access the camera device.
- <p>This will automatically enforce the <a
- href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
- &lt;uses-feature&gt;}</a> manifest element for <em>all</em> camera features.
- If you do not require all camera features or can properly operate if a camera
- is not available, then you must modify your manifest as appropriate in order to
- install on devices that don't support all camera features.</p> -->
- <permission android:name="android.permission.CAMERA"
- android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_camera"
- android:description="@string/permdesc_camera" />
+ <!-- Allows applications to enter Wi-Fi Multicast mode -->
+ <permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
+ android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
+ android:protectionLevel="normal"
+ android:description="@string/permdesc_changeWifiMulticastState"
+ android:label="@string/permlab_changeWifiMulticastState" />
<!-- Allows access to the vibrator -->
<permission android:name="android.permission.VIBRATE"
- android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+ android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
android:protectionLevel="normal"
android:label="@string/permlab_vibrate"
android:description="@string/permdesc_vibrate" />
<!-- Allows access to the flashlight -->
<permission android:name="android.permission.FLASHLIGHT"
- android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+ android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
android:protectionLevel="normal"
android:label="@string/permlab_flashlight"
android:description="@string/permdesc_flashlight" />
+ <!-- Allows using PowerManager WakeLocks to keep processor from sleeping or screen
+ from dimming -->
+ <permission android:name="android.permission.WAKE_LOCK"
+ android:permissionGroup="android.permission-group.AFFECTS_BATTERY"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_wakeLock"
+ android:description="@string/permdesc_wakeLock" />
+
+ <!-- ==================================================== -->
+ <!-- Permissions related to changing audio settings -->
+ <!-- ==================================================== -->
+
+ <!-- Used for permissions that provide direct access to speaker settings
+ the device. -->
+ <permission-group android:name="android.permission-group.AUDIO_SETTINGS"
+ android:label="@string/permgrouplab_audioSettings"
+ android:description="@string/permgroupdesc_audioSettings"
+ android:priority="25" />
+
+ <!-- Allows an application to modify global audio settings -->
+ <permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"
+ android:permissionGroup="android.permission-group.AUDIO_SETTINGS"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_modifyAudioSettings"
+ android:description="@string/permdesc_modifyAudioSettings" />
+
+ <!-- ================================== -->
+ <!-- Permissions for accessing hardware -->
+ <!-- ================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that provide direct access to the hardware on
+ the device. This includes audio, the camera, vibrator, etc. -->
+ <permission-group android:name="android.permission-group.HARDWARE_CONTROLS"
+ android:label="@string/permgrouplab_hardwareControls"
+ android:description="@string/permgroupdesc_hardwareControls"
+ android:priority="26"/>
+
<!-- Allows an application to manage preferences and permissions for USB devices
@hide -->
<permission android:name="android.permission.MANAGE_USB"
@@ -633,18 +757,65 @@
android:protectionLevel="signature" />
<!-- =========================================== -->
+ <!-- Permissions associated with audio capture -->
+ <!-- =========================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that are associated with accessing
+ microphone audio from the device. Note that phone calls also capture audio
+ but are in a separate (more visible) permission group. -->
+ <permission-group android:name="android.permission-group.MICROPHONE"
+ android:label="@string/permgrouplab_microphone"
+ android:description="@string/permgroupdesc_microphone"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="4" />
+
+ <!-- Allows an application to record audio -->
+ <permission android:name="android.permission.RECORD_AUDIO"
+ android:permissionGroup="android.permission-group.MICROPHONE"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_recordAudio" />
+
+
+ <!-- =========================================== -->
+ <!-- Permissions associated with camera and image capture -->
+ <!-- =========================================== -->
+ <eat-comment />
+
+ <!-- Used for permissions that are associated with accessing
+ camera or capturing images/video from the device. -->
+ <permission-group android:name="android.permission-group.CAMERA"
+ android:label="@string/permgrouplab_camera"
+ android:description="@string/permgroupdesc_camera"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="3" />
+
+ <!-- Required to be able to access the camera device.
+ <p>This will automatically enforce the <a
+ href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
+ &lt;uses-feature&gt;}</a> manifest element for <em>all</em> camera features.
+ If you do not require all camera features or can properly operate if a camera
+ is not available, then you must modify your manifest as appropriate in order to
+ install on devices that don't support all camera features.</p> -->
+ <permission android:name="android.permission.CAMERA"
+ android:permissionGroup="android.permission-group.CAMERA"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_camera"
+ android:description="@string/permdesc_camera" />
+
+ <!-- =========================================== -->
<!-- Permissions associated with telephony state -->
<!-- =========================================== -->
<eat-comment />
<!-- Used for permissions that are associated with accessing and modifyign
- telephony state: intercepting outgoing calls, reading
- and modifying the phone state. Note that
- placing phone calls is not in this group, since that is in the
- more important "takin' yer moneys" group. -->
+ telephony state: placing calls, intercepting outgoing calls, reading
+ and modifying the phone state. -->
<permission-group android:name="android.permission-group.PHONE_CALLS"
android:label="@string/permgrouplab_phoneCalls"
- android:description="@string/permgroupdesc_phoneCalls" />
+ android:description="@string/permgroupdesc_phoneCalls"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="1" />
<!-- Allows an application to monitor, modify, or abort outgoing
calls. -->
@@ -675,6 +846,22 @@
android:permissionGroup="android.permission-group.PHONE_CALLS"
android:protectionLevel="signature|system" />
+ <!-- Allows an application to initiate a phone call without going through
+ the Dialer user interface for the user to confirm the call
+ being placed. -->
+ <permission android:name="android.permission.CALL_PHONE"
+ android:permissionGroup="android.permission-group.PHONE_CALLS"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_callPhone"
+ android:description="@string/permdesc_callPhone" />
+
+ <!-- Allows an application to use SIP service -->
+ <permission android:name="android.permission.USE_SIP"
+ android:permissionGroup="android.permission-group.PHONE_CALLS"
+ android:protectionLevel="dangerous"
+ android:description="@string/permdesc_use_sip"
+ android:label="@string/permlab_use_sip" />
+
<!-- ================================== -->
<!-- Permissions for sdcard interaction -->
<!-- ================================== -->
@@ -683,7 +870,9 @@
<!-- Group of permissions that are related to SD card access. -->
<permission-group android:name="android.permission-group.STORAGE"
android:label="@string/permgrouplab_storage"
- android:description="@string/permgroupdesc_storage" />
+ android:description="@string/permgroupdesc_storage"
+ android:permissionGroupFlags="personalInfo"
+ android:priority="13" />
<!-- Allows an application to read from external storage -->
<permission android:name="android.permission.READ_EXTERNAL_STORAGE"
@@ -707,45 +896,40 @@
android:description="@string/permdesc_mediaStorageWrite"
android:protectionLevel="signature|system" />
- <!-- ============================================ -->
- <!-- Permissions for low-level system interaction -->
- <!-- ============================================ -->
+ <!-- ================================== -->
+ <!-- Permissions for screenlock -->
+ <!-- ================================== -->
<eat-comment />
- <!-- Group of permissions that are related to system APIs. Many
- of these are not permissions the user will be expected to understand,
- and such permissions should generally be marked as "normal" protection
- level so they don't get displayed. This can also, however, be used
- for miscellaneous features that provide access to the operating system,
- such as writing the global system settings. -->
- <permission-group android:name="android.permission-group.SYSTEM_TOOLS"
- android:label="@string/permgrouplab_systemTools"
- android:description="@string/permgroupdesc_systemTools" />
+ <!-- Group of permissions that are related to the screenlock. -->
+ <permission-group android:name="android.permission-group.SCREENLOCK"
+ android:label="@string/permgrouplab_storage"
+ android:permissionGroupFlags="personalInfo"
+ android:description="@string/permgroupdesc_storage" />
- <!-- Allows an application to read or write the system settings. -->
- <permission android:name="android.permission.WRITE_SETTINGS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ <!-- Allows applications to disable the keyguard -->
+ <permission android:name="android.permission.DISABLE_KEYGUARD"
+ android:permissionGroup="android.permission-group.SCREENLOCK"
android:protectionLevel="dangerous"
- android:label="@string/permlab_writeSettings"
- android:description="@string/permdesc_writeSettings" />
+ android:description="@string/permdesc_disableKeyguard"
+ android:label="@string/permlab_disableKeyguard" />
- <!-- Allows an application to modify the Google service map. -->
- <permission android:name="android.permission.WRITE_GSERVICES"
- android:protectionLevel="signature|system"
- android:label="@string/permlab_writeGservices"
- android:description="@string/permdesc_writeGservices" />
+ <!-- ================================== -->
+ <!-- Permissions to access other installed applications -->
+ <!-- ================================== -->
+ <eat-comment />
- <!-- Allows an application to expand or collapse the status bar. -->
- <permission android:name="android.permission.EXPAND_STATUS_BAR"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
- android:label="@string/permlab_expandStatusBar"
- android:description="@string/permdesc_expandStatusBar" />
+ <!-- Group of permissions that are related to the other applications
+ installed on the system. Examples include such as listing
+ running apps, or killing background processes. -->
+ <permission-group android:name="android.permission-group.APP_INFO"
+ android:label="@string/permgrouplab_appInfo"
+ android:description="@string/permgroupdesc_appInfo" />
<!-- Allows an application to get information about the currently
or recently running tasks. -->
<permission android:name="android.permission.GET_TASKS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:permissionGroup="android.permission-group.APP_INFO"
android:protectionLevel="dangerous"
android:label="@string/permlab_getTasks"
android:description="@string/permdesc_getTasks" />
@@ -761,14 +945,14 @@
<!-- Allows an application to change the Z-order of tasks -->
<permission android:name="android.permission.REORDER_TASKS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
+ android:permissionGroup="android.permission-group.APP_INFO"
+ android:protectionLevel="normal"
android:label="@string/permlab_reorderTasks"
android:description="@string/permdesc_reorderTasks" />
<!-- @hide Allows an application to change to remove/kill tasks -->
<permission android:name="android.permission.REMOVE_TASKS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:permissionGroup="android.permission-group.APP_INFO"
android:protectionLevel="signature"
android:label="@string/permlab_removeTasks"
android:description="@string/permdesc_removeTasks" />
@@ -781,6 +965,160 @@
android:label="@string/permlab_startAnyActivity"
android:description="@string/permdesc_startAnyActivity" />
+ <!-- @deprecated The {@link android.app.ActivityManager#restartPackage}
+ API is no longer supported. -->
+ <permission android:name="android.permission.RESTART_PACKAGES"
+ android:permissionGroup="android.permission-group.APP_INFO"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_killBackgroundProcesses"
+ android:description="@string/permdesc_killBackgroundProcesses" />
+
+ <!-- Allows an application to call
+ {@link android.app.ActivityManager#killBackgroundProcesses}. -->
+ <permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"
+ android:permissionGroup="android.permission-group.APP_INFO"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_killBackgroundProcesses"
+ android:description="@string/permdesc_killBackgroundProcesses" />
+
+ <!-- ================================== -->
+ <!-- Permissions affecting the display of other applications -->
+ <!-- ================================== -->
+ <eat-comment />
+
+ <!-- Group of permissions that allow manipulation of how
+ another application displays UI to the user. -->
+ <permission-group android:name="android.permission-group.DISPLAY"
+ android:label="@string/permgrouplab_display"
+ android:description="@string/permgroupdesc_display"
+ android:priority="18"/>
+
+ <!-- Allows an application to open windows using the type
+ {@link android.view.WindowManager.LayoutParams#TYPE_SYSTEM_ALERT},
+ shown on top of all other applications. Very few applications
+ should use this permission; these windows are intended for
+ system-level interaction with the user. -->
+ <permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
+ android:permissionGroup="android.permission-group.DISPLAY"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_systemAlertWindow"
+ android:description="@string/permdesc_systemAlertWindow" />
+
+ <!-- ================================== -->
+ <!-- Permissions affecting the system wallpaper -->
+ <!-- ================================== -->
+ <eat-comment />
+
+ <!-- Group of permissions that allow manipulation of how
+ another application displays UI to the user. -->
+ <permission-group android:name="android.permission-group.WALLPAPER"
+ android:label="@string/permgrouplab_wallpaper"
+ android:description="@string/permgroupdesc_wallpaper"
+ android:priority="22" />
+
+ <!-- Allows applications to set the wallpaper -->
+ <permission android:name="android.permission.SET_WALLPAPER"
+ android:permissionGroup="android.permission-group.WALLPAPER"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_setWallpaper"
+ android:description="@string/permdesc_setWallpaper" />
+
+ <!-- Allows applications to set the wallpaper hints -->
+ <permission android:name="android.permission.SET_WALLPAPER_HINTS"
+ android:permissionGroup="android.permission-group.WALLPAPER"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_setWallpaperHints"
+ android:description="@string/permdesc_setWallpaperHints" />
+
+ <!-- ============================================ -->
+ <!-- Permissions for changing the system clock -->
+ <!-- ============================================ -->
+ <eat-comment />
+
+ <!-- Group of permissions that are related to system clock. -->
+ <permission-group android:name="android.permission-group.SYSTEM_CLOCK"
+ android:label="@string/permgrouplab_systemClock"
+ android:description="@string/permgroupdesc_systemClock"
+ android:priority="23" />
+
+ <!-- Allows applications to set the system time -->
+ <permission android:name="android.permission.SET_TIME"
+ android:protectionLevel="signature|system"
+ android:label="@string/permlab_setTime"
+ android:description="@string/permdesc_setTime" />
+
+ <!-- Allows applications to set the system time zone -->
+ <permission android:name="android.permission.SET_TIME_ZONE"
+ android:permissionGroup="android.permission-group.SYSTEM_CLOCK"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_setTimeZone"
+ android:description="@string/permdesc_setTimeZone" />
+
+ <!-- ==================================================== -->
+ <!-- Permissions related to changing status bar -->
+ <!-- ==================================================== -->
+
+ <!-- Used for permissions that change the status bar -->
+ <permission-group android:name="android.permission-group.STATUS_BAR"
+ android:label="@string/permgrouplab_statusBar"
+ android:description="@string/permgroupdesc_statusBar" />
+
+ <!-- Allows an application to expand or collapse the status bar. -->
+ <permission android:name="android.permission.EXPAND_STATUS_BAR"
+ android:permissionGroup="android.permission-group.STATUS_BAR"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_expandStatusBar"
+ android:description="@string/permdesc_expandStatusBar" />
+
+ <!-- ==================================================== -->
+ <!-- Permissions related to accessing sync settings -->
+ <!-- ==================================================== -->
+
+ <!-- Used for permissions that access the sync settings or sync
+ related information. -->
+ <permission-group android:name="android.permission-group.SYNC_SETTINGS"
+ android:label="@string/permgrouplab_syncSettings"
+ android:description="@string/permgroupdesc_syncSettings"
+ android:priority="29" />
+
+ <!-- Allows applications to read the sync settings -->
+ <permission android:name="android.permission.READ_SYNC_SETTINGS"
+ android:permissionGroup="android.permission-group.SYNC_SETTINGS"
+ android:protectionLevel="normal"
+ android:description="@string/permdesc_readSyncSettings"
+ android:label="@string/permlab_readSyncSettings" />
+
+ <!-- Allows applications to write the sync settings -->
+ <permission android:name="android.permission.WRITE_SYNC_SETTINGS"
+ android:permissionGroup="android.permission-group.SYNC_SETTINGS"
+ android:protectionLevel="normal"
+ android:description="@string/permdesc_writeSyncSettings"
+ android:label="@string/permlab_writeSyncSettings" />
+
+ <!-- Allows applications to read the sync stats -->
+ <permission android:name="android.permission.READ_SYNC_STATS"
+ android:permissionGroup="android.permission-group.SYNC_SETTINGS"
+ android:protectionLevel="normal"
+ android:description="@string/permdesc_readSyncStats"
+ android:label="@string/permlab_readSyncStats" />
+
+
+ <!-- ============================================ -->
+ <!-- Permissions for low-level system interaction -->
+ <!-- ============================================ -->
+ <eat-comment />
+
+ <!-- Group of permissions that are related to system APIs. Many
+ of these are not permissions the user will be expected to understand,
+ and such permissions should generally be marked as "normal" protection
+ level so they don't get displayed. This can also, however, be used
+ for miscellaneous features that provide access to the operating system,
+ such as writing the global system settings. -->
+ <permission-group android:name="android.permission-group.SYSTEM_TOOLS"
+ android:label="@string/permgrouplab_systemTools"
+ android:description="@string/permgroupdesc_systemTools"
+ android:priority="30" />
+
<!-- @hide Change the screen compatibility mode of applications -->
<permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
@@ -796,21 +1134,33 @@
android:label="@string/permlab_changeConfiguration"
android:description="@string/permdesc_changeConfiguration" />
- <!-- @deprecated The {@link android.app.ActivityManager#restartPackage}
- API is no longer supported. -->
- <permission android:name="android.permission.RESTART_PACKAGES"
+ <!-- Allows an application to read or write the system settings. -->
+ <permission android:name="android.permission.WRITE_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"
- android:label="@string/permlab_killBackgroundProcesses"
- android:description="@string/permdesc_killBackgroundProcesses" />
+ android:label="@string/permlab_writeSettings"
+ android:description="@string/permdesc_writeSettings" />
- <!-- Allows an application to call
- {@link android.app.ActivityManager#killBackgroundProcesses}. -->
- <permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"
+ <!-- Allows an application to modify the Google service map. -->
+ <permission android:name="android.permission.WRITE_GSERVICES"
+ android:protectionLevel="signature|system"
+ android:label="@string/permlab_writeGservices"
+ android:description="@string/permdesc_writeGservices" />
+
+ <!-- @hide Change the screen compatibility mode of applications -->
+ <permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
- android:label="@string/permlab_killBackgroundProcesses"
- android:description="@string/permdesc_killBackgroundProcesses" />
+ android:protectionLevel="signature"
+ android:label="@string/permlab_setScreenCompatibility"
+ android:description="@string/permdesc_setScreenCompatibility" />
+
+ <!-- Allows an application to modify the current configuration, such
+ as locale. -->
+ <permission android:name="android.permission.CHANGE_CONFIGURATION"
+ android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:protectionLevel="system|signature"
+ android:label="@string/permlab_changeConfiguration"
+ android:description="@string/permdesc_changeConfiguration" />
<!-- Allows an application to call
{@link android.app.ActivityManager#forceStopPackage}.
@@ -829,17 +1179,6 @@
android:label="@string/permlab_retrieve_window_content"
android:description="@string/permdesc_retrieve_window_content" />
- <!-- Allows an application to open windows using the type
- {@link android.view.WindowManager.LayoutParams#TYPE_SYSTEM_ALERT},
- shown on top of all other applications. Very few applications
- should use this permission; these windows are intended for
- system-level interaction with the user. -->
- <permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_systemAlertWindow"
- android:description="@string/permdesc_systemAlertWindow" />
-
<!-- Modify the global animation scaling factor. -->
<permission android:name="android.permission.SET_ANIMATION_SCALE"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
@@ -848,12 +1187,10 @@
android:description="@string/permdesc_setAnimationScale" />
<!-- @deprecated This functionality will be removed in the future; please do
- not use.
-
- Allow an application to make its activities persistent. -->
+ not use. Allow an application to make its activities persistent. -->
<permission android:name="android.permission.PERSISTENT_ACTIVITY"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
+ android:protectionLevel="normal"
android:label="@string/permlab_persistentActivity"
android:description="@string/permdesc_persistentActivity" />
@@ -900,52 +1237,17 @@
android:label="@string/permlab_broadcastSticky"
android:description="@string/permdesc_broadcastSticky" />
- <!-- Allows using PowerManager WakeLocks to keep processor from sleeping or screen
- from dimming -->
- <permission android:name="android.permission.WAKE_LOCK"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_wakeLock"
- android:description="@string/permdesc_wakeLock" />
-
- <!-- Allows applications to set the wallpaper -->
- <permission android:name="android.permission.SET_WALLPAPER"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
- android:label="@string/permlab_setWallpaper"
- android:description="@string/permdesc_setWallpaper" />
-
- <!-- Allows applications to set the wallpaper hints -->
- <permission android:name="android.permission.SET_WALLPAPER_HINTS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
- android:label="@string/permlab_setWallpaperHints"
- android:description="@string/permdesc_setWallpaperHints" />
-
- <!-- Allows applications to set the system time -->
- <permission android:name="android.permission.SET_TIME"
- android:protectionLevel="signature|system"
- android:label="@string/permlab_setTime"
- android:description="@string/permdesc_setTime" />
-
- <!-- Allows applications to set the system time zone -->
- <permission android:name="android.permission.SET_TIME_ZONE"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_setTimeZone"
- android:description="@string/permdesc_setTimeZone" />
-
<!-- Allows mounting and unmounting file systems for removable storage. -->
<permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
+ android:protectionLevel="system|signature"
android:label="@string/permlab_mount_unmount_filesystems"
android:description="@string/permdesc_mount_unmount_filesystems" />
<!-- Allows formatting file systems for removable storage. -->
<permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
+ android:protectionLevel="system|signature"
android:label="@string/permlab_mount_format_filesystems"
android:description="@string/permdesc_mount_format_filesystems" />
@@ -989,34 +1291,6 @@
android:label="@string/permlab_asec_rename"
android:description="@string/permdesc_asec_rename" />
- <!-- Allows applications to disable the keyguard -->
- <permission android:name="android.permission.DISABLE_KEYGUARD"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_disableKeyguard"
- android:label="@string/permlab_disableKeyguard" />
-
- <!-- Allows applications to read the sync settings -->
- <permission android:name="android.permission.READ_SYNC_SETTINGS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
- android:description="@string/permdesc_readSyncSettings"
- android:label="@string/permlab_readSyncSettings" />
-
- <!-- Allows applications to write the sync settings -->
- <permission android:name="android.permission.WRITE_SYNC_SETTINGS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_writeSyncSettings"
- android:label="@string/permlab_writeSyncSettings" />
-
- <!-- Allows applications to read the sync stats -->
- <permission android:name="android.permission.READ_SYNC_STATS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
- android:description="@string/permdesc_readSyncStats"
- android:label="@string/permlab_readSyncStats" />
-
<!-- Allows applications to write the apn settings -->
<permission android:name="android.permission.WRITE_APN_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
@@ -1040,37 +1314,10 @@
<!-- Allows applications to change network connectivity state -->
<permission android:name="android.permission.CHANGE_NETWORK_STATE"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
+ android:protectionLevel="normal"
android:description="@string/permdesc_changeNetworkState"
android:label="@string/permlab_changeNetworkState" />
- <!-- Allows applications to change Wi-Fi connectivity state -->
- <permission android:name="android.permission.CHANGE_WIFI_STATE"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_changeWifiState"
- android:label="@string/permlab_changeWifiState" />
-
- <!-- @hide -->
- <permission android:name="android.permission.CHANGE_WIMAX_STATE"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_changeWimaxState"
- android:label="@string/permlab_changeWimaxState" />
- <!-- Allows applications to enter Wi-Fi Multicast mode -->
- <permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_changeWifiMulticastState"
- android:label="@string/permlab_changeWifiMulticastState" />
-
- <!-- Allows applications to discover and pair bluetooth devices -->
- <permission android:name="android.permission.BLUETOOTH_ADMIN"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_bluetoothAdmin"
- android:label="@string/permlab_bluetoothAdmin" />
-
<!-- Allows an application to clear the caches of all installed
applications on the device. -->
<permission android:name="android.permission.CLEAR_APP_CACHE"
@@ -1097,7 +1344,8 @@
purposes. -->
<permission-group android:name="android.permission-group.DEVELOPMENT_TOOLS"
android:label="@string/permgrouplab_developmentTools"
- android:description="@string/permgroupdesc_developmentTools" />
+ android:description="@string/permgroupdesc_developmentTools"
+ android:priority="31" />
<!-- Allows an application to read or write the secure system settings. -->
<permission android:name="android.permission.WRITE_SECURE_SETTINGS"
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index c863e7c..d779f72 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -390,11 +390,12 @@
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_personalInfo">Your personal information</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permgroupdesc_personalInfo" product="tablet">Direct access to your contacts
- and calendar stored on the tablet.</string>
+ <string name="permgroupdesc_personalInfo">Direct access to information about you, stored in on your contact card.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_socialInfo">Your social information</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permgroupdesc_personalInfo" product="default">Direct access to your contacts
- and calendar stored on the phone.</string>
+ <string name="permgroupdesc_socialInfo">Direct access to information about your contacts and social connections.</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_location">Your location</string>
@@ -407,6 +408,81 @@
<string name="permgroupdesc_network">Access various network features.</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_shortRangeNetwork">Bluetooth and NFC</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_shortRangeNetwork">Access Bluetooth or NFC networks and devices.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_audioSettings">Audio Settings</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_audioSettings">Change audio settings.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_affectsBattery">Affects Battery</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_affectsBattery">Use features that can quickly drain battery.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_calendar">Calendar</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_calendar">Direct access to calendar and events.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_dictionary">User Dictionary</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_dictionary">Direct access to the user dictionary.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_bookmarks">Bookmarks and History</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_bookmarks">Direct access to bookmarks and browser history.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_deviceAlarms">Alarm</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_deviceAlarms">Set the alarm clock.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_voicemail">Voicemail</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_voicemail">Direct access to voicemail.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_microphone">Microphone</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_microphone">Direct access to the microphone to record audio.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_camera">Camera</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_camera">Direct access to camera for image or video capture.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_appInfo">Your applications information</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_appInfo">Ability to affect behavior of other applications on your device.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_wallpaper">Wallpaper</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_wallpaper">Change the device wallpaper settings.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_systemClock">Clock</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_systemClock">Change the device time or timezone.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_statusBar">Status Bar</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_statusBar">Change the device status bar settings.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_syncSettings">Sync Settings</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_syncSettings">Access to the sync settings.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_accounts">Your accounts</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgroupdesc_accounts">Access the available accounts.</string>
@@ -432,6 +508,11 @@
<string name="permgroupdesc_developmentTools">Features only needed for app developers.</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_display">Other Application UI</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_display">Effect the UI of other applications.</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_storage">Storage</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
<string name="permgroupdesc_storage" product="nosdcard">Access the USB storage.</string>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 71738ad..77dbaa5 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -174,6 +174,13 @@ please see themes_device_defaults.xml.
<item name="windowActionModeOverlay">false</item>
<item name="windowCloseOnTouchOutside">false</item>
+ <!-- Define these here; ContextThemeWrappers around themes that define them should
+ always clear these values. -->
+ <item name="windowFixedWidthMajor">0dp</item>
+ <item name="windowFixedWidthMinor">0dp</item>
+ <item name="windowFixedHeightMajor">0dp</item>
+ <item name="windowFixedHeightMinor">0dp</item>
+
<!-- Dialog attributes -->
<item name="alertDialogStyle">@android:style/AlertDialog</item>
<item name="dialogTheme">@android:style/Theme.Dialog</item>
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index c3c49b0..4b91422 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -2108,8 +2108,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
w = 0;
}
- final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
- widthMeasureSpec = MeasureSpec.makeMeasureSpec(Math.min(w, widthSize), EXACTLY);
+ if (w > 0) {
+ final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(
+ Math.min(w, widthSize), EXACTLY);
+ }
}
}
@@ -2125,9 +2128,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
h = 0;
}
- final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
- heightMeasureSpec =
- MeasureSpec.makeMeasureSpec(Math.min(h, heightSize), EXACTLY);
+ if (h > 0) {
+ final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(
+ Math.min(h, heightSize), EXACTLY);
+ }
}
}
diff --git a/services/java/com/android/server/VibratorService.java b/services/java/com/android/server/VibratorService.java
index 6282c31..b609867 100755
--- a/services/java/com/android/server/VibratorService.java
+++ b/services/java/com/android/server/VibratorService.java
@@ -391,9 +391,15 @@ public class VibratorService extends IVibratorService.Stub
}
private boolean doVibratorExists() {
- synchronized (mInputDeviceVibrators) {
- return !mInputDeviceVibrators.isEmpty() || vibratorExists();
- }
+ // For now, we choose to ignore the presence of input devices that have vibrators
+ // when reporting whether the device has a vibrator. Applications often use this
+ // information to decide whether to enable certain features so they expect the
+ // result of hasVibrator() to be constant. For now, just report whether
+ // the device has a built-in vibrator.
+ //synchronized (mInputDeviceVibrators) {
+ // return !mInputDeviceVibrators.isEmpty() || vibratorExists();
+ //}
+ return vibratorExists();
}
private void doVibratorOn(long millis) {
diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java
index 117e064..299649d 100644
--- a/services/java/com/android/server/input/InputManagerService.java
+++ b/services/java/com/android/server/input/InputManagerService.java
@@ -140,7 +140,8 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
private static native void nativeStart(int ptr);
private static native void nativeSetDisplaySize(int ptr, int displayId,
int width, int height, int externalWidth, int externalHeight);
- private static native void nativeSetDisplayOrientation(int ptr, int displayId, int rotation);
+ private static native void nativeSetDisplayOrientation(int ptr, int displayId,
+ int rotation, int externalRotation);
private static native int nativeGetScanCodeState(int ptr,
int deviceId, int sourceMask, int scanCode);
@@ -287,15 +288,16 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
nativeSetDisplaySize(mPtr, displayId, width, height, externalWidth, externalHeight);
}
- public void setDisplayOrientation(int displayId, int rotation) {
+ public void setDisplayOrientation(int displayId, int rotation, int externalRotation) {
if (rotation < Surface.ROTATION_0 || rotation > Surface.ROTATION_270) {
throw new IllegalArgumentException("Invalid rotation.");
}
if (DEBUG) {
- Slog.d(TAG, "Setting display #" + displayId + " orientation to " + rotation);
+ Slog.d(TAG, "Setting display #" + displayId + " orientation to rotation " + rotation
+ + " external rotation " + externalRotation);
}
- nativeSetDisplayOrientation(mPtr, displayId, rotation);
+ nativeSetDisplayOrientation(mPtr, displayId, rotation, externalRotation);
}
/**
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index ee74e40..8eda9ca 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -5580,7 +5580,8 @@ public class WindowManagerService extends IWindowManager.Stub
mWaitingForConfig = true;
mLayoutNeeded = true;
startFreezingDisplayLocked(inTransaction);
- mInputManager.setDisplayOrientation(0, rotation);
+ mInputManager.setDisplayOrientation(0, rotation,
+ mDisplay != null ? mDisplay.getExternalRotation() : Surface.ROTATION_0);
// We need to update our screen size information to match the new
// rotation. Note that this is redundant with the later call to
@@ -6606,6 +6607,8 @@ public class WindowManagerService extends IWindowManager.Stub
mInputManager.setDisplaySize(Display.DEFAULT_DISPLAY,
mDisplay.getRawWidth(), mDisplay.getRawHeight(),
mDisplay.getRawExternalWidth(), mDisplay.getRawExternalHeight());
+ mInputManager.setDisplayOrientation(Display.DEFAULT_DISPLAY,
+ mDisplay.getRotation(), mDisplay.getExternalRotation());
mPolicy.setInitialDisplaySize(mDisplay, mInitialDisplayWidth, mInitialDisplayHeight);
}
diff --git a/services/jni/com_android_server_input_InputManagerService.cpp b/services/jni/com_android_server_input_InputManagerService.cpp
index b6378bf..0e1ce51 100644
--- a/services/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/jni/com_android_server_input_InputManagerService.cpp
@@ -166,7 +166,7 @@ public:
void setDisplaySize(int32_t displayId, int32_t width, int32_t height,
int32_t externalWidth, int32_t externalHeight);
- void setDisplayOrientation(int32_t displayId, int32_t orientation);
+ void setDisplayOrientation(int32_t displayId, int32_t orientation, int32_t externalOrientation);
status_t registerInputChannel(JNIEnv* env, const sp<InputChannel>& inputChannel,
const sp<InputWindowHandle>& inputWindowHandle, bool monitor);
@@ -224,8 +224,9 @@ private:
struct Locked {
// Display size information.
int32_t displayWidth, displayHeight; // -1 when not initialized
- int32_t displayExternalWidth, displayExternalHeight; // -1 when not initialized
int32_t displayOrientation;
+ int32_t displayExternalWidth, displayExternalHeight; // -1 when not initialized
+ int32_t displayExternalOrientation;
// System UI visibility.
int32_t systemUiVisibility;
@@ -275,9 +276,10 @@ NativeInputManager::NativeInputManager(jobject contextObj,
AutoMutex _l(mLock);
mLocked.displayWidth = -1;
mLocked.displayHeight = -1;
+ mLocked.displayOrientation = DISPLAY_ORIENTATION_0;
mLocked.displayExternalWidth = -1;
mLocked.displayExternalHeight = -1;
- mLocked.displayOrientation = DISPLAY_ORIENTATION_0;
+ mLocked.displayExternalOrientation = DISPLAY_ORIENTATION_0;
mLocked.systemUiVisibility = ASYSTEM_UI_VISIBILITY_STATUS_BAR_VISIBLE;
mLocked.pointerSpeed = 0;
@@ -345,7 +347,8 @@ void NativeInputManager::setDisplaySize(int32_t displayId, int32_t width, int32_
}
}
-void NativeInputManager::setDisplayOrientation(int32_t displayId, int32_t orientation) {
+void NativeInputManager::setDisplayOrientation(int32_t displayId, int32_t orientation,
+ int32_t externalOrientation) {
bool changed = false;
if (displayId == 0) {
AutoMutex _l(mLock);
@@ -359,6 +362,11 @@ void NativeInputManager::setDisplayOrientation(int32_t displayId, int32_t orient
controller->setDisplayOrientation(orientation);
}
}
+
+ if (mLocked.displayExternalOrientation != externalOrientation) {
+ changed = true;
+ mLocked.displayExternalOrientation = externalOrientation;
+ }
}
if (changed) {
@@ -444,7 +452,7 @@ void NativeInputManager::getReaderConfiguration(InputReaderConfiguration* outCon
mLocked.displayWidth, mLocked.displayHeight, mLocked.displayOrientation);
outConfig->setDisplayInfo(0, true /*external*/,
mLocked.displayExternalWidth, mLocked.displayExternalHeight,
- mLocked.displayOrientation);
+ mLocked.displayExternalOrientation);
} // release lock
}
@@ -1041,10 +1049,10 @@ static void nativeSetDisplaySize(JNIEnv* env, jclass clazz, jint ptr,
}
static void nativeSetDisplayOrientation(JNIEnv* env, jclass clazz,
- jint ptr, jint displayId, jint orientation) {
+ jint ptr, jint displayId, jint orientation, jint externalOrientation) {
NativeInputManager* im = reinterpret_cast<NativeInputManager*>(ptr);
- im->setDisplayOrientation(displayId, orientation);
+ im->setDisplayOrientation(displayId, orientation, externalOrientation);
}
static jint nativeGetScanCodeState(JNIEnv* env, jclass clazz,
@@ -1327,7 +1335,7 @@ static JNINativeMethod gInputManagerMethods[] = {
(void*) nativeStart },
{ "nativeSetDisplaySize", "(IIIIII)V",
(void*) nativeSetDisplaySize },
- { "nativeSetDisplayOrientation", "(III)V",
+ { "nativeSetDisplayOrientation", "(IIII)V",
(void*) nativeSetDisplayOrientation },
{ "nativeGetScanCodeState", "(IIII)I",
(void*) nativeGetScanCodeState },