Merge "Permit MediaRouteButton to select system routes in toggle mode." into jb-dev
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index e7b0e78..044627c 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -997,13 +997,13 @@
                 mTransition.showChild(this, child, oldVisibility);
             } else {
                 mTransition.hideChild(this, child, newVisibility);
-                // Only track this on disappearing views - appearing views are already visible
-                // and don't need special handling during drawChild()
-                if (mVisibilityChangingChildren == null) {
-                    mVisibilityChangingChildren = new ArrayList<View>();
-                }
-                mVisibilityChangingChildren.add(child);
                 if (mTransitioningViews != null && mTransitioningViews.contains(child)) {
+                    // Only track this on disappearing views - appearing views are already visible
+                    // and don't need special handling during drawChild()
+                    if (mVisibilityChangingChildren == null) {
+                        mVisibilityChangingChildren = new ArrayList<View>();
+                    }
+                    mVisibilityChangingChildren.add(child);
                     addDisappearingView(child);
                 }
             }
diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
index fc44878..62410ed 100644
--- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
@@ -360,7 +360,6 @@
                 mHandleDrawable.setAlpha(0.0f);
                 deactivateTargets();
                 showTargets(true);
-                ping();
                 startBackgroundAnimation(INITIAL_SHOW_HANDLE_DURATION, 1.0f);
                 setGrabbedState(OnTriggerListener.CENTER_HANDLE);
                 if (AccessibilityManager.getInstance(mContext).isEnabled()) {
@@ -484,11 +483,7 @@
         final int duration = animate ? HIDE_ANIMATION_DURATION : 0;
         final int delay = animate ? HIDE_ANIMATION_DELAY : 0;
 
-        // TODO: add an attribute for this. For now we'll show the expand for navbar, but not
-        // keyguard.
-        final boolean expandDisabled = !mAlwaysTrackFinger;
-
-        final float targetScale = (expanded || expandDisabled) ?
+        final float targetScale = expanded ?
                 TARGET_SCALE_EXPANDED : TARGET_SCALE_COLLAPSED;
         final int length = mTargetDrawables.size();
         final TimeInterpolator interpolator = Ease.Cubic.easeOut;
@@ -504,7 +499,7 @@
                     "onUpdate", mUpdateListener));
         }
 
-        final float ringScaleTarget = (expanded || expandDisabled) ?
+        final float ringScaleTarget = expanded ?
                 RING_SCALE_EXPANDED : RING_SCALE_COLLAPSED;
         mTargetAnimations.add(Tweener.to(mOuterRing, duration,
                 "ease", interpolator,
diff --git a/core/res/res/drawable-hdpi/ic_find_next_holo_light.png b/core/res/res/drawable-hdpi/ic_find_next_holo_light.png
new file mode 100644
index 0000000..3748169
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_find_next_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_find_previous_holo_light.png b/core/res/res/drawable-hdpi/ic_find_previous_holo_light.png
new file mode 100644
index 0000000..e4834a2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_find_previous_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_find_next_holo_light.png b/core/res/res/drawable-mdpi/ic_find_next_holo_light.png
new file mode 100644
index 0000000..4eea3c3
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_find_next_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_find_previous_holo_light.png b/core/res/res/drawable-mdpi/ic_find_previous_holo_light.png
new file mode 100644
index 0000000..786e1d6
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_find_previous_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_find_next_holo_light.png b/core/res/res/drawable-xhdpi/ic_find_next_holo_light.png
new file mode 100644
index 0000000..5b6890d
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_find_next_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_find_previous_holo_light.png b/core/res/res/drawable-xhdpi/ic_find_previous_holo_light.png
new file mode 100644
index 0000000..73976c7
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_find_previous_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable/ic_lockscreen_outerring.xml b/core/res/res/drawable/ic_lockscreen_outerring.xml
index 3886bb4..75bea70 100644
--- a/core/res/res/drawable/ic_lockscreen_outerring.xml
+++ b/core/res/res/drawable/ic_lockscreen_outerring.xml
@@ -20,5 +20,5 @@
     <size android:height="@dimen/keyguard_lockscreen_outerring_diameter"
           android:width="@dimen/keyguard_lockscreen_outerring_diameter" />
     <solid android:color="#00000000" />
-    <stroke android:color="#00000000" android:width="2dp" />
+    <stroke android:color="#1affffff" android:width="2dp" />
 </shape>
diff --git a/core/res/res/menu/webview_find.xml b/core/res/res/menu/webview_find.xml
index 526b346..1770bd9 100644
--- a/core/res/res/menu/webview_find.xml
+++ b/core/res/res/menu/webview_find.xml
@@ -16,11 +16,11 @@
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:id="@+id/find_prev"
-        android:icon="@drawable/ic_find_previous_holo_dark"
+        android:icon="?android:attr/findOnPagePreviousDrawable"
         android:showAsAction="always"
         />
     <item android:id="@+id/find_next"
-        android:icon="@drawable/ic_find_next_holo_dark"
+        android:icon="?android:attr/findOnPageNextDrawable"
         android:showAsAction="always"
         />
 </menu>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3a7253b..fcab4f3 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -842,6 +842,12 @@
         <!-- The drawable for accessibility focused views. -->
         <attr name="accessibilityFocusedDrawable" format="reference" />
 
+        <!-- Drawable for WebView find-on-page dialogue's "next" button. @hide -->
+        <attr name="findOnPageNextDrawable" format="reference" />
+
+        <!-- Drawable for WebView find-on-page dialogue's "previous" button. @hide -->
+        <attr name="findOnPagePreviousDrawable" format="reference" />
+
     </declare-styleable>
 
     <!-- **************************************************************** -->
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 83d0f63..2f18944 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -153,6 +153,8 @@
                 ?android:attr/expandableListPreferredItemIndicatorLeft</item>
         <item name="expandableListPreferredChildIndicatorRight">
                 ?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="findOnPageNextDrawable">@android:drawable/ic_find_next_holo_dark</item>
+        <item name="findOnPagePreviousDrawable">@android:drawable/ic_find_previous_holo_dark</item>
 
         <!-- Gallery attributes -->
         <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
@@ -467,6 +469,8 @@
         <item name="detailsElementBackground">@android:drawable/panel_bg_holo_light</item>
 
         <item name="mediaRouteButtonStyle">@android:style/Widget.DeviceDefault.Light.MediaRouteButton</item>
+        <item name="findOnPageNextDrawable">@android:drawable/ic_find_next_holo_light</item>
+        <item name="findOnPagePreviousDrawable">@android:drawable/ic_find_previous_holo_light</item>
     </style>
 
     <!-- Variant of {@link #Theme_Light} with no title bar -->
@@ -980,6 +984,8 @@
         <item name="expandableListPreferredItemIndicatorRight">0dip</item>
         <item name="expandableListPreferredChildIndicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
         <item name="expandableListPreferredChildIndicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="findOnPageNextDrawable">@android:drawable/ic_find_next_holo_dark</item>
+        <item name="findOnPagePreviousDrawable">@android:drawable/ic_find_previous_holo_dark</item>
 
         <!-- Gallery attributes -->
         <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
@@ -1283,6 +1289,8 @@
         <item name="expandableListPreferredChildIndicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
 
         <item name="listDividerAlertDialog">@android:drawable/list_divider_holo_light</item>
+        <item name="findOnPageNextDrawable">@android:drawable/ic_find_next_holo_light</item>
+        <item name="findOnPagePreviousDrawable">@android:drawable/ic_find_previous_holo_light</item>
 
         <!-- Gallery attributes -->
         <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
diff --git a/packages/SystemUI/res/drawable/navbar_search_outerring.xml b/packages/SystemUI/res/drawable/navbar_search_outerring.xml
index 8a8785f..689dbf0 100644
--- a/packages/SystemUI/res/drawable/navbar_search_outerring.xml
+++ b/packages/SystemUI/res/drawable/navbar_search_outerring.xml
@@ -19,5 +19,5 @@
     <size android:height="@dimen/navbar_search_outerring_diameter"
         android:width="@dimen/navbar_search_outerring_diameter" />
     <solid android:color="#00000000" />
-    <stroke android:color="#00000000" android:width="2dp" />
+    <stroke android:color="#40ffffff" android:width="2dp" />
 </shape>
diff --git a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
index f91e5d6..c8a120d 100644
--- a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
@@ -54,7 +54,7 @@
                 prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
                 prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
                 prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
-                prvandroid:feedbackCount="1"
+                prvandroid:feedbackCount="0"
                 prvandroid:vibrationDuration="@integer/config_vibration_duration"
                 prvandroid:alwaysTrackFinger="true"
                 prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
diff --git a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
index 2556aca..1e4bb57 100644
--- a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
@@ -54,7 +54,7 @@
                 prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
                 prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
                 prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
-                prvandroid:feedbackCount="1"
+                prvandroid:feedbackCount="0"
                 prvandroid:vibrationDuration="@integer/config_vibration_duration"
                 prvandroid:alwaysTrackFinger="true"
                 prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
index 459fac9..3b6c52e 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
@@ -40,7 +40,7 @@
         prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
         prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
         prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
-        prvandroid:feedbackCount="1"
+        prvandroid:feedbackCount="0"
         prvandroid:vibrationDuration="@integer/config_vibration_duration"
         prvandroid:alwaysTrackFinger="true"
         prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
diff --git a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
index d2e26db..8c2360e 100644
--- a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
@@ -41,7 +41,7 @@
         prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
         prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
         prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
-        prvandroid:feedbackCount="1"
+        prvandroid:feedbackCount="0"
         prvandroid:vibrationDuration="@integer/config_vibration_duration"
         prvandroid:alwaysTrackFinger="true"
         prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"