Merge "Added new timepicker assets"
diff --git a/api/current.xml b/api/current.xml
index bf62fa7..a738761 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -6686,6 +6686,17 @@
visibility="public"
>
</field>
+<field name="opacity"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843567"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="order"
type="int"
transient="false"
@@ -86040,6 +86051,19 @@
<parameter name="b" type="int">
</parameter>
</method>
+<method name="setOpacity"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="opacity" type="int">
+</parameter>
+</method>
<method name="unscheduleDrawable"
return="void"
abstract="false"
@@ -101832,6 +101856,17 @@
visibility="public"
>
</field>
+<field name="VOICE_COMMUNICATION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="VOICE_DOWNLINK"
type="int"
transient="false"
diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index fc30da2..5a6c667 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -125,11 +125,11 @@
// the cursor's state doesn't change
while (true) {
mLock.lock();
- if (mCursorState != mThreadState) {
- mLock.unlock();
- break;
- }
try {
+ if (mCursorState != mThreadState) {
+ break;
+ }
+
int count = getQuery().fillWindow(cw, mMaxRead, mCount);
// return -1 means there is still more data to be retrieved from the resultset
if (count != 0) {
@@ -241,9 +241,8 @@
mColumnNameMap = null;
mQuery = query;
+ query.mDatabase.lock();
try {
- query.mDatabase.lock();
-
// Setup the list of columns
int columnCount = mQuery.columnCountLocked();
mColumns = new String[columnCount];
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index f8260ca..a402c91 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -324,6 +324,10 @@
} catch (RuntimeException e) {
reply.writeException(e);
res = true;
+ } catch (OutOfMemoryError e) {
+ RuntimeException re = new RuntimeException("Out of memory", e);
+ reply.writeException(re);
+ res = true;
}
reply.recycle();
data.recycle();
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 1fa5af2..93542c6e 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -706,8 +706,7 @@
StrictMode.PENALTY_DROPBOX);
sVmPolicyMask = StrictMode.DETECT_VM_CURSOR_LEAKS |
StrictMode.DETECT_VM_CLOSABLE_LEAKS |
- StrictMode.PENALTY_DROPBOX |
- StrictMode.PENALTY_LOG;
+ StrictMode.PENALTY_DROPBOX;
setCloseGuardEnabled(vmClosableObjectLeaksEnabled());
return true;
}
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index f0aa878..2d2f205 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -6127,6 +6127,14 @@
public static final int STATUS_CHANGING_LOCALE = 3;
/**
+ * The status that indicates that there are no accounts and no contacts
+ * on the device.
+ *
+ * @hide
+ */
+ public static final int STATUS_NO_ACCOUNTS_NO_CONTACTS = 4;
+
+ /**
* Additional data associated with the status.
*
* @hide
diff --git a/core/java/android/webkit/GeolocationPermissions.java b/core/java/android/webkit/GeolocationPermissions.java
index 4565b756..5d54180 100755
--- a/core/java/android/webkit/GeolocationPermissions.java
+++ b/core/java/android/webkit/GeolocationPermissions.java
@@ -146,7 +146,7 @@
boolean allowed = nativeGetAllowed(origin);
Map retValues = new HashMap<String, Object>();
retValues.put(CALLBACK, callback);
- retValues.put(ALLOWED, new Boolean(allowed));
+ retValues.put(ALLOWED, Boolean.valueOf(allowed));
postUIMessage(Message.obtain(null, RETURN_ALLOWED, retValues));
} break;
case CLEAR:
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 8c515db..17f0a97 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -285,7 +285,9 @@
int fileType = MediaFile.getFileTypeForMimeType(mimeType);
return MediaFile.isAudioFileType(fileType)
|| MediaFile.isVideoFileType(fileType)
- || MediaFile.isPlayListFileType(fileType);
+ || MediaFile.isPlayListFileType(fileType)
+ // The following is not in Media framework, but it's supported.
+ || (mimeType != null && mimeType.startsWith("video/m4v"));
}
/**
@@ -2054,7 +2056,7 @@
}
if (mWebView != null) {
Message msg = Message.obtain(mWebView.mPrivateHandler,
- WebView.SCROLL_BY_MSG_ID, dx, dy, new Boolean(animate));
+ WebView.SCROLL_BY_MSG_ID, dx, dy, Boolean.valueOf(animate));
if (mDrawIsScheduled) {
mEventHub.sendMessage(Message.obtain(null,
EventHub.MESSAGE_RELAY, msg));
diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java
index 3f2bd25..b1f50ba 100644
--- a/core/java/android/widget/Scroller.java
+++ b/core/java/android/widget/Scroller.java
@@ -67,13 +67,12 @@
private static final int FLING_MODE = 1;
private static float DECELERATION_RATE = (float) (Math.log(0.75) / Math.log(0.9));
- private static float ALPHA = 400; // pixels / seconds
+ private static float ALPHA = 800; // pixels / seconds
private static float START_TENSION = 0.4f; // Tension at start: (0.4 * total T, 1.0 * Distance)
private static float END_TENSION = 1.0f - START_TENSION;
private static final int NB_SAMPLES = 100;
private static final float[] SPLINE = new float[NB_SAMPLES + 1];
-
private float mDeceleration;
private final float mPpi;
diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_content.xml b/core/res/res/layout-xlarge/status_bar_latest_event_content.xml
index c64b90e..d599154 100644
--- a/core/res/res/layout-xlarge/status_bar_latest_event_content.xml
+++ b/core/res/res/layout-xlarge/status_bar_latest_event_content.xml
@@ -1,56 +1,41 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingTop="7dp"
- android:paddingLeft="5dp"
>
+ <ImageView android:id="@+id/icon"
+ android:layout_width="48dp"
+ android:layout_height="64dp"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:scaleType="center"
+ />
+
<LinearLayout
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingTop="3dp"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:paddingLeft="16dp"
>
- <!--com.android.server.status.AnimatedImageView android:id="@+id/icon" -->
- <ImageView android:id="@+id/icon"
- android:layout_width="25dp"
- android:layout_height="25dp"
- android:scaleType="fitCenter"
- android:src="@drawable/arrow_down_float"/>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal"
+ />
+ <TextView android:id="@+id/text"
+ android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
- android:paddingLeft="4dp"
- />
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- >
- <TextView android:id="@+id/text"
- android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:fadingEdge="horizontal"
- android:paddingLeft="4dp"
- />
- <android.widget.DateTimeView android:id="@+id/time"
- android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
- android:layout_marginLeft="4dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:paddingRight="5dp"
/>
</LinearLayout>
</LinearLayout>
+
diff --git a/core/res/res/values-xlarge/styles.xml b/core/res/res/values-xlarge/styles.xml
index 4692656..316861e 100644
--- a/core/res/res/values-xlarge/styles.xml
+++ b/core/res/res/values-xlarge/styles.xml
@@ -30,9 +30,9 @@
</style>
<style name="TextAppearance.StatusBar.EventContent">
<item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">16sp</item>
</style>
<style name="TextAppearance.StatusBar.EventContent.Title">
- <item name="android:textSize">18sp</item>
<item name="android:textStyle">bold</item>
</style>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 555de5e..9d54a80 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -49,7 +49,6 @@
window is floating. -->
<attr name="backgroundDimEnabled" format="boolean" />
-
<!-- =========== -->
<!-- Text styles -->
<!-- =========== -->
@@ -2940,6 +2939,14 @@
<attr name="bottom" format="dimension" />
</declare-styleable>
+ <declare-styleable name="LayerDrawable">
+ <attr name="opacity">
+ <enum name="opaque" value="-1" />
+ <enum name="transparent" value="-2" />
+ <enum name="translucent" value="-3" />
+ </attr>
+ </declare-styleable>
+
<declare-styleable name="LayerDrawableItem">
<attr name="left" />
<attr name="top" />
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index aedba17..aa33aa3 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1377,6 +1377,7 @@
<public type="attr" name="animationResolution" />
<public type="attr" name="state_accelerated" />
<public type="attr" name="baseline" />
+ <public type="attr" name="opacity" />
<public type="anim" name="animator_fade_in" />
<public type="anim" name="animator_fade_out" />
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index a35c5a1..7f21e6b 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -159,6 +159,9 @@
storage. However, the system will not allow the user to move the application to external storage if
this attribute is set to {@code internalOnly}, which is the default setting.</p>
+<p>Read <a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> for
+more information about using this attribute (including how to maintain backward compatibility).</p>
+
<p>Introduced in: API Level 8.</p>
@@ -173,7 +176,7 @@
<p>
<dt>see also:</dt>
-<dd><a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a><br/>
+<dd>
<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code></dd>
</dl>
diff --git a/docs/html/guide/topics/resources/menu-resource.jd b/docs/html/guide/topics/resources/menu-resource.jd
index cde72bd..7bcd78a 100644
--- a/docs/html/guide/topics/resources/menu-resource.jd
+++ b/docs/html/guide/topics/resources/menu-resource.jd
@@ -36,22 +36,23 @@
<?xml version="1.0" encoding="utf-8"?>
<<a href="#menu-element">menu</a> xmlns:android="http://schemas.android.com/apk/res/android">
<<a href="#item-element">item</a> android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
- android:menuCategory=["container" | "system" | "secondary" | "alternative"]
- android:orderInCategory="<em>integer</em>"
android:title="<em>string</em>"
android:titleCondensed="<em>string</em>"
android:icon="@[package:]drawable/<em>drawable_resource_name</em>"
+ android:showAsAction=["ifRoom" | "never" | "withText" | "always"]
android:alphabeticShortcut="<em>string</em>"
android:numericShortcut="<em>string</em>"
android:checkable=["true" | "false"]
android:visible=["visible" | "invisible" | "gone"]
- android:enabled=["enabled" | "disabled"] />
+ android:enabled=["enabled" | "disabled"]
+ android:menuCategory=["container" | "system" | "secondary" | "alternative"]
+ android:orderInCategory="<em>integer</em>" />
<<a href="#group-element">group</a> android:id="@[+][<em>package</em>:]id/<em>resource name</em>"
- android:menuCategory=["container" | "system" | "secondary" | "alternative"]
- android:orderInCategory="<em>integer</em>"
android:checkableBehavior=["none" | "all" | "single"]
android:visible=["visible" | "invisible" | "gone"]
- android:enabled=["enabled" | "disabled"] >
+ android:enabled=["enabled" | "disabled"]
+ android:menuCategory=["container" | "system" | "secondary" | "alternative"]
+ android:orderInCategory="<em>integer</em>" >
<<a href="#item-element">item</a> />
</group>
<<a href="#item-element">item</a> >
@@ -77,47 +78,7 @@
<code>"http://schemas.android.com/apk/res/android"</code>.
</dl>
</dd>
- <dt id="group-element"><code><group></code></dt>
- <dd>A menu group (to create a collection of items that share traits, such as whether they are
-visible, enabled, or checkable). Contains one or more <code><item></code> elements. Must be a
-child of a <code><menu></code> element.
- <p class="caps">attributes:</p>
- <dl class="atn-list">
- <dt><code>android:id</code></dt>
- <dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item, use the form:
-<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new ID.</dd>
- <dt><code>android:menuCategory</code></dt>
- <dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
- constants, which define the group's priority. Valid values:
- <table>
- <tr><th>Value</th><th>Description</th></tr>
- <tr><td><code>container</code></td><td>For groups that are part of a
-container.</td></tr>
- <tr><td><code>system</code></td><td>For groups that are provided by the
-system.</td></tr>
- <tr><td><code>secondary</code></td><td>For groups that are user-supplied secondary
-(infrequently used) options.</td></tr>
- <tr><td><code>alternative</code></td><td>For groups that are alternative actions
-on the data that is currently displayed.</td></tr>
- </table>
- </dd>
- <dt><code>android:orderInCategory</code></dt>
- <dd><em>Integer</em>. The default order of the items within the category.</dd>
- <dt><code>android:checkableBehavior</code></dt>
- <dd><em>Keyword</em>. The type of checkable behavior for the group. Valid values:
- <table>
- <tr><th>Value</th><th>Description</th></tr>
- <tr><td><code>none</code></td><td>Not checkable</td></tr>
- <tr><td><code>all</code></td><td>All items can be checked (use checkboxes)</td></tr>
- <tr><td><code>single</code></td><td>Only one item can be checked (use radio buttons)</td></tr>
- </table>
- </dd>
- <dt><code>android:visible</code></dt>
- <dd><em>Boolean</em>. "true" if the group is visible.</dd>
- <dt><code>android:enabled</code></dt>
- <dd><em>Boolean</em>. "true" if the group is enabled.</dd>
- </dl>
- </dd>
+
<dt id="item-element"><code><item></code></dt>
<dd>A menu item. May contain a <code><menu></code> element (for a Sub
Menu). Must be a child of a <code><menu></code> or <code><group></code> element.
@@ -125,7 +86,50 @@
<dl class="atn-list">
<dt><code>android:id</code></dt>
<dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item, use the form:
-<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new ID.</dd>
+<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new
+ID.</dd>
+ <dt><code>android:title</code></dt>
+ <dd><em>String</em>. The menu title.</dd>
+ <dt><code>android:titleCondensed</code></dt>
+ <dd><em>String</em>. A condensed title, for situations in which the normal title is
+too long.</dd>
+ <dt><code>android:icon</code></dt>
+ <dd><em>Drawable resource</em>. An image to be used as the menu item icon.</dd>
+
+ <dt><code>android:showAsAction</code></dt>
+ <dd><em>Keyword</em>. When and how this item should appear as an action item in the Action
+Bar. A menu item can appear as an action item only when the activity includes an {@link
+android.app.ActionBar} (introduced in API Level HONEYCOMB). Valid values:
+ <table>
+ <tr><th>Value</th><th>Description</th></tr>
+ <tr><td><code>ifRoom</code></td><td>Only place this item in the Action Bar if
+there is room for it.</td></tr>
+ <tr><td><code>withText</code></td><td>Also include the title text (defined
+by {@code android:title}) with the action item. You can include this value along with one
+of the others as a flag set, by separating them with a pipe {@code |}.</td></tr>
+ <tr><td><code>never</code></td><td>Never place this item in the Action Bar.</td></tr>
+ <tr><td><code>always</code></td><td>Always place this item in the Action Bar.
+Avoid using this unless it's critical that the item always appear in the action
+bar. Setting multiple items to always appear as action items can result in them overlapping
+with other UI in the action bar.</td></tr>
+ </table>
+ <p>See <a href="{@docRoot}guide/topics/ui/actionbar.html">Using the Action Bar</a> for
+more information.</p>
+ <p>Introduced in API Level HONEYCOMB.</p>
+ </dd>
+
+ <dt><code>android:alphabeticShortcut</code></dt>
+ <dd><em>Char</em>. A character for the alphabetic shortcut key.</dd>
+ <dt><code>android:numericShortcut</code></dt>
+ <dd><em>Integer</em>. A number for the numeric shortcut key.</dd>
+ <dt><code>android:checkable</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is checkable.</dd>
+ <dt><code>android:checked</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is checked by default.</dd>
+ <dt><code>android:visible</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is visible by default.</dd>
+ <dt><code>android:enabled</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is enabled by default.</dd>
<dt><code>android:menuCategory</code></dt>
<dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
constants, which define the item's priority. Valid values:
@@ -143,25 +147,51 @@
</dd>
<dt><code>android:orderInCategory</code></dt>
<dd><em>Integer</em>. The order of "importance" of the item, within a group.</dd>
- <dt><code>android:title</code></dt>
- <dd><em>String</em>. The menu title.</dd>
- <dt><code>android:titleCondensed</code></dt>
- <dd><em>String</em>. A condensed title, for situations in which the normal title is
-too long.</dd>
- <dt><code>android:icon</code></dt>
- <dd><em>Drawable resource</em>. An image to be used as the menu item icon.</dd>
- <dt><code>android:alphabeticShortcut</code></dt>
- <dd><em>Char</em>. A character for the alphabetic shortcut key.</dd>
- <dt><code>android:numericShortcut</code></dt>
- <dd><em>Integer</em>. A number for the numeric shortcut key.</dd>
- <dt><code>android:checkable</code></dt>
- <dd><em>Boolean</em>. "true" if the item is checkable.</dd>
- <dt><code>android:checked</code></dt>
- <dd><em>Boolean</em>. "true" if the item is checked by default.</dd>
+ </dl>
+ </dd>
+
+ <dt id="group-element"><code><group></code></dt>
+ <dd>A menu group (to create a collection of items that share traits, such as whether they are
+visible, enabled, or checkable). Contains one or more <code><item></code> elements. Must be a
+child of a <code><menu></code> element.
+ <p class="caps">attributes:</p>
+ <dl class="atn-list">
+ <dt><code>android:id</code></dt>
+ <dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item,
+use the form:
+<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new
+ID.</dd>
+ <dt><code>android:checkableBehavior</code></dt>
+ <dd><em>Keyword</em>. The type of checkable behavior for the group. Valid values:
+ <table>
+ <tr><th>Value</th><th>Description</th></tr>
+ <tr><td><code>none</code></td><td>Not checkable</td></tr>
+ <tr><td><code>all</code></td><td>All items can be checked (use checkboxes)</td></tr>
+ <tr><td><code>single</code></td><td>Only one item can be checked (use radio
+buttons)</td></tr>
+ </table>
+ </dd>
<dt><code>android:visible</code></dt>
- <dd><em>Boolean</em>. "true" if the item is visible by default.</dd>
+ <dd><em>Boolean</em>. "true" if the group is visible.</dd>
<dt><code>android:enabled</code></dt>
- <dd><em>Boolean</em>. "true" if the item is enabled by default.</dd>
+ <dd><em>Boolean</em>. "true" if the group is enabled.</dd>
+ <dt><code>android:menuCategory</code></dt>
+ <dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
+ constants, which define the group's priority. Valid values:
+ <table>
+ <tr><th>Value</th><th>Description</th></tr>
+ <tr><td><code>container</code></td><td>For groups that are part of a
+container.</td></tr>
+ <tr><td><code>system</code></td><td>For groups that are provided by the
+system.</td></tr>
+ <tr><td><code>secondary</code></td><td>For groups that are user-supplied secondary
+(infrequently used) options.</td></tr>
+ <tr><td><code>alternative</code></td><td>For groups that are alternative actions
+on the data that is currently displayed.</td></tr>
+ </table>
+ </dd>
+ <dt><code>android:orderInCategory</code></dt>
+ <dd><em>Integer</em>. The default order of the items within the category.</dd>
</dl>
</dd>
</dl>
@@ -174,7 +204,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/item1"
android:title="@string/item1"
- android:icon="@drawable/group_item1_icon" />
+ android:icon="@drawable/group_item1_icon"
+ android:showAsAction="ifRoom|withText"/>
<group android:id="@+id/group">
<item android:id="@+id/group_item1"
android:title="@string/group_item1"
@@ -184,7 +215,8 @@
android:icon="@drawable/group_item2_icon" />
</group>
<item android:id="@+id/submenu"
- android:title="@string/submenu_title" >
+ android:title="@string/submenu_title"
+ android:showAsAction="ifRoom|withText" >
<menu>
<item android:id="@+id/submenu_item1"
android:title="@string/submenu_item1" />
@@ -201,6 +233,8 @@
return true;
}
</pre>
+<p class="note"><strong>Note:</strong> The {@code android:showAsAction} attribute is
+available only on Android X.X (API Level HONEYCOMB) and greater.</p>
</dd> <!-- end example -->
diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java
index b6cce7e..09c041f 100644
--- a/graphics/java/android/graphics/drawable/LayerDrawable.java
+++ b/graphics/java/android/graphics/drawable/LayerDrawable.java
@@ -26,6 +26,7 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.util.AttributeSet;
+import android.util.Slog;
import android.view.View;
import java.io.IOException;
@@ -49,6 +50,7 @@
public class LayerDrawable extends Drawable implements Drawable.Callback {
LayerState mLayerState;
+ private int mOpacityOverride = PixelFormat.UNKNOWN;
private int[] mPaddingL;
private int[] mPaddingT;
private int[] mPaddingR;
@@ -113,6 +115,13 @@
int type;
+ TypedArray a = r.obtainAttributes(attrs, com.android.internal.R.styleable.LayerDrawable);
+
+ mOpacityOverride = a.getInt(com.android.internal.R.styleable.LayerDrawable_opacity,
+ PixelFormat.UNKNOWN);
+
+ a.recycle();
+
final int innerDepth = parser.getDepth() + 1;
int depth;
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
@@ -125,7 +134,7 @@
continue;
}
- TypedArray a = r.obtainAttributes(attrs,
+ a = r.obtainAttributes(attrs,
com.android.internal.R.styleable.LayerDrawableItem);
int left = a.getDimensionPixelOffset(
@@ -391,9 +400,28 @@
array[i].mDrawable.setColorFilter(cf);
}
}
+
+ /**
+ * Sets the opacity of this drawable directly, instead of collecting the states from
+ * the layers
+ *
+ * @param opacity The opacity to use, or {@link PixelFormat#UNKNOWN PixelFormat.UNKNOWN}
+ * for the default behavior
+ *
+ * @see PixelFormat#UNKNOWN
+ * @see PixelFormat#TRANSLUCENT
+ * @see PixelFormat#TRANSPARENT
+ * @see PixelFormat#OPAQUE
+ */
+ public void setOpacity(int opacity) {
+ mOpacityOverride = opacity;
+ }
@Override
public int getOpacity() {
+ if (mOpacityOverride != PixelFormat.UNKNOWN) {
+ return mOpacityOverride;
+ }
return mLayerState.getOpacity();
}
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 20949a4..dcf86e3 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -402,9 +402,9 @@
synchronized void nScriptCSetScript(byte[] script, int offset, int length) {
rsnScriptCSetScript(mContext, script, offset, length);
}
- native int rsnScriptCCreate(int con);
- synchronized int nScriptCCreate() {
- return rsnScriptCCreate(mContext);
+ native int rsnScriptCCreate(int con, String val);
+ synchronized int nScriptCCreate(String val) {
+ return rsnScriptCCreate(mContext, val);
}
native void rsnSamplerBegin(int con);
@@ -814,6 +814,3 @@
return 0;
}
}
-
-
-
diff --git a/graphics/java/android/renderscript/ScriptC.java b/graphics/java/android/renderscript/ScriptC.java
index 44fc5fd..64ed75b 100644
--- a/graphics/java/android/renderscript/ScriptC.java
+++ b/graphics/java/android/renderscript/ScriptC.java
@@ -75,7 +75,7 @@
rs.nScriptCBegin();
rs.nScriptCSetScript(pgm, 0, pgmLength);
- return rs.nScriptCCreate();
+ Log.v(TAG, "Create script for resource = " + resources.getResourceName(resourceID));
+ return rs.nScriptCCreate(resources.getResourceName(resourceID));
}
}
-
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 8888459..1cc4386 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -954,10 +954,11 @@
}
static jint
-nScriptCCreate(JNIEnv *_env, jobject _this, RsContext con)
+nScriptCCreate(JNIEnv *_env, jobject _this, RsContext con, jstring resName)
{
LOG_API("nScriptCCreate, con(%p)", con);
- return (jint)rsScriptCCreate(con);
+ const char* resNameUTF = _env->GetStringUTFChars(resName, NULL);
+ return (jint)rsScriptCCreate(con, resNameUTF);
}
// ---------------------------------------------------------------------------
@@ -1346,7 +1347,7 @@
{"rsnScriptCBegin", "(I)V", (void*)nScriptCBegin },
{"rsnScriptCSetScript", "(I[BII)V", (void*)nScriptCSetScript },
-{"rsnScriptCCreate", "(I)I", (void*)nScriptCCreate },
+{"rsnScriptCCreate", "(ILjava/lang/String;)I", (void*)nScriptCCreate },
{"rsnProgramStoreBegin", "(III)V", (void*)nProgramStoreBegin },
{"rsnProgramStoreDepthFunc", "(II)V", (void*)nProgramStoreDepthFunc },
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h
index c913355..2cd0911 100644
--- a/include/ui/FramebufferNativeWindow.h
+++ b/include/ui/FramebufferNativeWindow.h
@@ -29,6 +29,7 @@
#include <ui/egl/android_natives.h>
+#define NUM_FRAME_BUFFERS 2
extern "C" EGLNativeWindowType android_createDisplaySurface(void);
@@ -72,7 +73,7 @@
framebuffer_device_t* fbDev;
alloc_device_t* grDev;
- sp<NativeBuffer> buffers[2];
+ sp<NativeBuffer> buffers[NUM_FRAME_BUFFERS];
sp<NativeBuffer> front;
mutable Mutex mutex;
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index 76db14f..1b584c8 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -320,6 +320,7 @@
}
ScriptCCreate {
+ param const char * resName
ret RsScript
}
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index ec7780e..6587b51 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -396,15 +396,25 @@
extern const char rs_runtime_lib_bc[];
extern unsigned rs_runtime_lib_bc_size;
-void ScriptCState::runCompiler(Context *rsc, ScriptC *s) {
+void ScriptCState::runCompiler(Context *rsc, ScriptC *s, const char *resName) {
{
- StopWatch compileTimer("RenderScript compile time");
s->mBccScript = bccCreateScript();
s->mEnviroment.mIsThreadable = true;
- bccScriptBitcode(s->mBccScript, s->mEnviroment.mScriptText, s->mEnviroment.mScriptTextLength);
- //bccLinkBitcode(s->mBccScript, rs_runtime_lib_bc, rs_runtime_lib_bc_size);
bccRegisterSymbolCallback(s->mBccScript, symbolLookup, s);
- bccCompileScript(s->mBccScript);
+ // bccReadBC() reads in the BitCode, if no cache file corresponding to
+ // the resName is found. Otherwise, bccReadBC() returns a negative value
+ // and the "else" branch will be taken.
+ if (bccReadBC(s->mBccScript,
+ s->mEnviroment.mScriptText,
+ s->mEnviroment.mScriptTextLength,
+ resName) >= 0) {
+ //bccLinkBC(s->mBccScript, rs_runtime_lib_bc, rs_runtime_lib_bc_size);
+ bccCompileBC(s->mBccScript);
+ } else {
+ // bccReadBC returns a neagative value: Didn't read any script,
+ // So, use cached binary instead
+ bccLoadBinary(s->mBccScript);
+ }
bccGetScriptLabel(s->mBccScript, "root", (BCCvoid**) &s->mProgram.mRoot);
bccGetScriptLabel(s->mBccScript, "init", (BCCvoid**) &s->mProgram.mInit);
}
@@ -518,14 +528,15 @@
ss->mScript->mEnviroment.mScriptTextLength = len;
}
-RsScript rsi_ScriptCCreate(Context * rsc) {
+RsScript rsi_ScriptCCreate(Context * rsc, const char *resName)
+{
ScriptCState *ss = &rsc->mScriptC;
ObjectBaseRef<ScriptC> s(ss->mScript);
ss->mScript.clear();
s->incUserRef();
- ss->runCompiler(rsc, s.get());
+ ss->runCompiler(rsc, s.get(), resName);
ss->clear(rsc);
return s.get();
}
diff --git a/libs/rs/rsScriptC.h b/libs/rs/rsScriptC.h
index 7ca33ac..4f0dff3 100644
--- a/libs/rs/rsScriptC.h
+++ b/libs/rs/rsScriptC.h
@@ -81,7 +81,7 @@
void init(Context *rsc);
void clear(Context *rsc);
- void runCompiler(Context *rsc, ScriptC *s);
+ void runCompiler(Context *rsc, ScriptC *s, const char *resName);
struct SymbolTable_t {
const char * mName;
@@ -98,6 +98,3 @@
}
}
#endif
-
-
-
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index a36d555..04a0195 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -83,6 +83,7 @@
if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) == 0) {
int stride;
int err;
+ int i;
err = framebuffer_open(module, &fbDev);
LOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
@@ -96,27 +97,33 @@
mUpdateOnDemand = (fbDev->setUpdateRect != 0);
// initialize the buffer FIFO
- mNumBuffers = 2;
- mNumFreeBuffers = 2;
+ mNumBuffers = NUM_FRAME_BUFFERS;
+ mNumFreeBuffers = NUM_FRAME_BUFFERS;
mBufferHead = mNumBuffers-1;
- buffers[0] = new NativeBuffer(
- fbDev->width, fbDev->height, fbDev->format, GRALLOC_USAGE_HW_FB);
- buffers[1] = new NativeBuffer(
- fbDev->width, fbDev->height, fbDev->format, GRALLOC_USAGE_HW_FB);
-
- err = grDev->alloc(grDev,
- fbDev->width, fbDev->height, fbDev->format,
- GRALLOC_USAGE_HW_FB, &buffers[0]->handle, &buffers[0]->stride);
- LOGE_IF(err, "fb buffer 0 allocation failed w=%d, h=%d, err=%s",
- fbDev->width, fbDev->height, strerror(-err));
+ for (i = 0; i < mNumBuffers; i++)
+ {
+ buffers[i] = new NativeBuffer(
+ fbDev->width, fbDev->height, fbDev->format, GRALLOC_USAGE_HW_FB);
+ }
- err = grDev->alloc(grDev,
- fbDev->width, fbDev->height, fbDev->format,
- GRALLOC_USAGE_HW_FB, &buffers[1]->handle, &buffers[1]->stride);
+ for (i = 0; i < mNumBuffers; i++)
+ {
+ err = grDev->alloc(grDev,
+ fbDev->width, fbDev->height, fbDev->format,
+ GRALLOC_USAGE_HW_FB, &buffers[i]->handle, &buffers[i]->stride);
- LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s",
- fbDev->width, fbDev->height, strerror(-err));
+ LOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
+ i, fbDev->width, fbDev->height, strerror(-err));
+
+ if (err)
+ {
+ mNumBuffers = i;
+ mNumFreeBuffers = i;
+ mBufferHead = mNumBuffers-1;
+ break;
+ }
+ }
const_cast<uint32_t&>(ANativeWindow::flags) = fbDev->flags;
const_cast<float&>(ANativeWindow::xdpi) = fbDev->xdpi;
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 2bea84f..39c4a28 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -149,12 +149,10 @@
* {@link #DEFAULT} otherwise. */
public static final int VOICE_RECOGNITION = 6;
- /**
- * @hide
- * Microphone audio source tuned for voice communications such as VoIP. It
- * will for instance take advantage of echo cancellation or automatic gain control
- * if available. It otherwise behaves like {@link #DEFAULT} if no voice processing
- * is available.
+ /** Microphone audio source tuned for voice communications such as VoIP. It
+ * will for instance take advantage of echo cancellation or automatic gain control
+ * if available. It otherwise behaves like {@link #DEFAULT} if no voice processing
+ * is applied.
*/
public static final int VOICE_COMMUNICATION = 7;
}
diff --git a/media/java/android/media/videoeditor/AudioTrack.java b/media/java/android/media/videoeditor/AudioTrack.java
index d02709e..32ff553 100755
--- a/media/java/android/media/videoeditor/AudioTrack.java
+++ b/media/java/android/media/videoeditor/AudioTrack.java
@@ -102,7 +102,7 @@
// Ducking is enabled by default
mDuckingThreshold = 0;
mDuckedTrackVolume = 0;
- mIsDuckingEnabled = true;
+ mIsDuckingEnabled = false;
// The audio waveform file is generated later
mAudioWaveformFilename = null;
@@ -369,14 +369,15 @@
/**
* Enable ducking by specifying the required parameters
*
- * @param threshold Ducking will be activated when the relative energy in
+ * @param threshold Ducking will be activated when the energy in
* the media items audio signal goes above this value. The valid
- * range of values is 0 to 100.
+ * range of values is 0db to 90dB. 0dB is equivalent to disabling
+ * ducking.
* @param duckedTrackVolume The relative volume of the audio track when ducking
* is active. The valid range of values is 0 to 100.
*/
public void enableDucking(int threshold, int duckedTrackVolume) {
- if (threshold < 0 || threshold > 100) {
+ if (threshold < 0 || threshold > 90) {
throw new IllegalArgumentException("Invalid threshold value: " + threshold);
}
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png b/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png
new file mode 100644
index 0000000..17fd52e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/status_bar_item_background.xml b/packages/SystemUI/res/drawable/status_bar_item_background.xml
new file mode 100644
index 0000000..9da92a7
--- /dev/null
+++ b/packages/SystemUI/res/drawable/status_bar_item_background.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<layer-list
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:opacity="translucent"
+ >
+ <item
+ android:drawable="@drawable/notification_item_background_color"
+ android:left="16dp"
+ />
+</layer-list>
+
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml
index ddb5bb9..b8b8bdd 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml
@@ -28,18 +28,6 @@
android:animateLayoutChanges="false"
>
- <!-- ticker: transient incoming notification information -->
- <FrameLayout
- android:id="@+id/ticker"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_toRightOf="@+id/systemInfo"
- android:paddingLeft="6dip"
- android:gravity="center_vertical"
- android:animateLayoutChanges="true"
- />
-
<!-- notification icons & panel access -->
<LinearLayout
android:id="@+id/notificationArea"
@@ -242,5 +230,17 @@
android:visibility="gone"
/>
+ <!-- ticker: transient incoming notification information -->
+ <FrameLayout
+ android:id="@+id/ticker"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentRight="true"
+ android:layout_toRightOf="@+id/systemInfo"
+ android:paddingLeft="6dip"
+ android:gravity="center_vertical"
+ android:animateLayoutChanges="true"
+ />
+
</RelativeLayout>
</com.android.systemui.statusbar.tablet.TabletStatusBarView>
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml b/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
index 049a1cc..b6679a5 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
@@ -1,36 +1,35 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="65sp"
- android:orientation="vertical"
- android:background="@android:drawable/status_bar_item_background"
+ android:layout_height="65dp"
+ android:background="@drawable/status_bar_item_background"
>
<ImageButton
android:id="@+id/veto"
- android:layout_width="wrap_content"
+ android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/status_bar_veto"
android:scaleType="center"
- android:background="@null"
- android:paddingLeft="16dip"
- android:paddingRight="16dip"
+ android:background="#ff000000"
/>
<com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
- android:layout_alignParentTop="true"
- android:layout_toLeftOf="@id/veto"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="64sp"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_toLeftOf="@id/veto"
+ android:layout_marginLeft="16dp"
android:focusable="true"
android:clickable="true"
- android:paddingRight="6sp"
/>
<View
android:layout_width="match_parent"
- android:layout_height="1sp"
+ android:layout_height="1dp"
+ android:layout_marginLeft="16dp"
android:layout_alignParentBottom="true"
android:background="@android:drawable/divider_horizontal_dark"
/>
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml b/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
index 3e085f3..186aa64 100644
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
+++ b/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
@@ -22,10 +22,9 @@
<com.android.systemui.statusbar.tablet.NotificationPanel
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
- android:layout_width="wrap_content"
+ android:layout_width="540dp"
android:animateLayoutChanges="true"
android:background="@drawable/bg_scrim_notification"
- android:paddingLeft="140dp"
android:paddingBottom="32dp"
>
@@ -34,10 +33,11 @@
android:layout_height="wrap_content"
android:layout_width="384dp"
android:layout_above="@+id/content_frame"
- android:layout_marginLeft="16dp"
+ android:layout_marginLeft="24dp"
android:paddingBottom="16dp"
android:orientation="vertical"
android:animateLayoutChanges="true"
+ android:layout_alignParentRight="true"
>
<com.android.systemui.statusbar.policy.Clock
@@ -108,7 +108,7 @@
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/battery"
android:paddingRight="16dp"
- android:src="@drawable/ic_sysbar_quicksettings"
+ android:src="@drawable/ic_notification_open"
android:baseline="17dp"
/>
@@ -128,8 +128,9 @@
<FrameLayout
android:id="@+id/content_frame"
android:layout_height="wrap_content"
- android:layout_width="400dp"
+ android:layout_width="408dp"
android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
>
<ScrollView
android:id="@+id/notificationScroller"
@@ -144,7 +145,6 @@
android:animateLayoutChanges="true"
android:animationCache="false"
android:orientation="vertical"
- android:background="@drawable/status_bar_background"
android:clickable="true"
android:focusable="true"
android:descendantFocusability="afterDescendants"
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index a0def6b..fd2cf99 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -18,4 +18,5 @@
-->
<resources>
<drawable name="notification_number_text_color">#ffffffff</drawable>
+ <drawable name="notification_item_background_color">#ff000000</drawable>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 1f4c9d1..7c97ac7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -31,6 +31,8 @@
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
@@ -77,7 +79,7 @@
public static final int MSG_CLOSE_RECENTS_PANEL = 1021;
public static final int MSG_HIDE_SHADOWS = 1030;
public static final int MSG_SHOW_SHADOWS = 1031;
- public static final int MSG_SHOW_SHADOWS_NO_COLLAPSE = 1032;
+ public static final int MSG_RESTORE_SHADOWS = 1032;
private static final int MAX_IMAGE_LEVEL = 10000;
private static final boolean USE_2D_RECENTS = true;
@@ -406,14 +408,18 @@
if (mRecentsPanel != null) mRecentsPanel.setVisibility(View.GONE);
break;
case MSG_HIDE_SHADOWS:
+ if (DEBUG) Slog.d(TAG, "hiding shadows (lights on)");
mShadowController.hideAllShadows();
break;
case MSG_SHOW_SHADOWS:
+ if (DEBUG) Slog.d(TAG, "showing shadows (lights out)");
animateCollapse();
- // fall through
- case MSG_SHOW_SHADOWS_NO_COLLAPSE:
mShadowController.showAllShadows();
break;
+ case MSG_RESTORE_SHADOWS:
+ if (DEBUG) Slog.d(TAG, "quickly re-showing shadows if appropriate");
+ mShadowController.refresh();
+ break;
}
}
}
@@ -964,6 +970,13 @@
}
}
+ void workAroundBadLayerDrawableOpacity(View v) {
+ LayerDrawable d = (LayerDrawable)v.getBackground();
+ v.setBackgroundDrawable(null);
+ d.setOpacity(PixelFormat.TRANSLUCENT);
+ v.setBackgroundDrawable(d);
+ }
+
private boolean inflateViews(NotificationData.Entry entry, ViewGroup parent) {
StatusBarNotification sbn = entry.notification;
RemoteViews remoteViews = sbn.notification.contentView;
@@ -975,6 +988,7 @@
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.status_bar_latest_event, parent, false);
+ workAroundBadLayerDrawableOpacity(row);
View vetoButton = row.findViewById(R.id.veto);
if (entry.notification.isClearable()) {
final String _pkg = sbn.pkg;
@@ -1071,15 +1085,15 @@
switch (action) {
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
- mHandler.removeMessages(MSG_SHOW_SHADOWS_NO_COLLAPSE);
+ mHandler.removeMessages(MSG_RESTORE_SHADOWS);
if (mShowShadows) {
- mHandler.sendEmptyMessageDelayed(MSG_SHOW_SHADOWS_NO_COLLAPSE,
+ mHandler.sendEmptyMessageDelayed(MSG_RESTORE_SHADOWS,
v == mNotificationShadow ? 5000 : 500);
}
last = true;
break;
case MotionEvent.ACTION_DOWN:
- mHandler.removeMessages(MSG_SHOW_SHADOWS_NO_COLLAPSE);
+ mHandler.removeMessages(MSG_RESTORE_SHADOWS);
setShadowForButton(mTouchTarget, false);
break;
}
@@ -1093,22 +1107,22 @@
};
}
+ public void refresh() {
+ setShadowForButton(mBackButton, mShowShadows);
+ setShadowForButton(mHomeButton, mShowShadows);
+ setShadowForButton(mRecentButton, mShowShadows);
+ setShadowForButton(mMenuButton, mShowShadows);
+ setShadowForButton(mNotificationArea, mShowShadows);
+ }
+
public void showAllShadows() {
mShowShadows = true;
- setShadowForButton(mBackButton, true);
- setShadowForButton(mHomeButton, true);
- setShadowForButton(mRecentButton, true);
- setShadowForButton(mMenuButton, true);
- setShadowForButton(mNotificationArea, true);
+ refresh();
}
public void hideAllShadows() {
mShowShadows = false;
- setShadowForButton(mBackButton, false);
- setShadowForButton(mHomeButton, false);
- setShadowForButton(mRecentButton, false);
- setShadowForButton(mMenuButton, false);
- setShadowForButton(mNotificationArea, false);
+ refresh();
}
// Use View.INVISIBLE for things hidden due to shadowing, and View.GONE for things that are
diff --git a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
index 5518e11..486e7aa 100644
--- a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
@@ -130,9 +130,10 @@
/** {@inheritDoc} */
public void cleanUp() {
- // hide the dialog.
+ // dismiss the dialog.
if (mSimUnlockProgressDialog != null) {
- mSimUnlockProgressDialog.hide();
+ mSimUnlockProgressDialog.dismiss();
+ mSimUnlockProgressDialog = null;
}
mUpdateMonitor.removeCallback(this);
}
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 8d25d50..84bc100 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -557,6 +557,9 @@
public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(InputMethodInfo imi) {
synchronized (mMethodMap) {
+ if (imi == null && mCurMethodId != null) {
+ imi = mMethodMap.get(mCurMethodId);
+ }
return mSettings.getEnabledInputMethodSubtypeListLocked(imi);
}
}
@@ -2043,18 +2046,20 @@
getEnabledInputMethodsAndSubtypeListLocked();
ArrayList<InputMethodSubtype> enabledSubtypes =
new ArrayList<InputMethodSubtype>();
- for (Pair<String, ArrayList<String>> imsPair : imsList) {
- InputMethodInfo info = mMethodMap.get(imsPair.first);
- if (info != null && info.getId().equals(imi.getId())) {
- ArrayList<InputMethodSubtype> subtypes = info.getSubtypes();
- for (InputMethodSubtype ims: subtypes) {
- for (String s: imsPair.second) {
- if (String.valueOf(ims.hashCode()).equals(s)) {
- enabledSubtypes.add(ims);
+ if (imi != null) {
+ for (Pair<String, ArrayList<String>> imsPair : imsList) {
+ InputMethodInfo info = mMethodMap.get(imsPair.first);
+ if (info != null && info.getId().equals(imi.getId())) {
+ ArrayList<InputMethodSubtype> subtypes = info.getSubtypes();
+ for (InputMethodSubtype ims: subtypes) {
+ for (String s: imsPair.second) {
+ if (String.valueOf(ims.hashCode()).equals(s)) {
+ enabledSubtypes.add(ims);
+ }
}
}
+ break;
}
- break;
}
}
return enabledSubtypes;
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java
index 35d5564..a77e73e 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -141,6 +141,7 @@
this.mNext = sPool;
sPool = this;
sPoolSize++;
+ mResult = null;
}
}
}