Updating assets.

- Tweaking search bar layout.

Change-Id: I9624fa4284135858d3e19b8b8e4710b5dd746042
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index e55a55c..888d3d3 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -1179,11 +1179,6 @@
         // should stop this now.
     }
 
-    @Override
-    protected int getPageWidthForScrollingIndicator() {
-        return getPageContentWidth();
-    }
-
     /*
      * We load an extra page on each side to prevent flashes from scrolling and loading of the
      * widget previews in the background with the AsyncTasks.
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 0c052a7..5c9e4dd 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2748,12 +2748,12 @@
         ComponentName activityName = searchManager.getGlobalSearchActivity();
         if (activityName != null) {
             sGlobalSearchIcon = updateButtonWithIconFromExternalActivity(
-                    R.id.search_button, activityName, R.drawable.ic_generic_search);
+                    R.id.search_button, activityName, R.drawable.ic_search_normal_holo);
             searchButton.setVisibility(View.VISIBLE);
-            searchDivider.setVisibility(View.VISIBLE);
+            if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
         } else {
             searchButton.setVisibility(View.GONE);
-            searchDivider.setVisibility(View.GONE);
+            if (searchDivider != null) searchDivider.setVisibility(View.GONE);
         }
     }
 
@@ -2769,11 +2769,11 @@
         ComponentName activityName = intent.resolveActivity(getPackageManager());
         if (activityName != null) {
             sVoiceSearchIcon = updateButtonWithIconFromExternalActivity(
-                    R.id.voice_button, activityName, R.drawable.ic_voice_search);
-            searchDivider.setVisibility(View.VISIBLE);
+                    R.id.voice_button, activityName, R.drawable.ic_voice_search_holo);
+            if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
             voiceButton.setVisibility(View.VISIBLE);
         } else {
-            searchDivider.setVisibility(View.GONE);
+            if (searchDivider != null) searchDivider.setVisibility(View.GONE);
             voiceButton.setVisibility(View.GONE);
         }
     }
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index a90d32f..81e876f 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -1641,7 +1641,7 @@
     }
 
     protected boolean isScrollingIndicatorEnabled() {
-        return true;
+        return !LauncherApplication.isScreenLarge();
     }
 
     protected void flashScrollingIndicator() {
@@ -1655,7 +1655,6 @@
     }
 
     protected void showScrollingIndicator() {
-        if (LauncherApplication.isScreenLarge()) return;
         if (getChildCount() <= 1) return;
         if (!isScrollingIndicatorEnabled()) return;
 
@@ -1668,7 +1667,6 @@
     }
 
     protected void hideScrollingIndicator(boolean immediately) {
-        if (LauncherApplication.isScreenLarge()) return;
         if (getChildCount() <= 1) return;
         if (!isScrollingIndicatorEnabled()) return;
 
@@ -1682,7 +1680,6 @@
     }
 
     private void updateScrollingIndicator() {
-        if (LauncherApplication.isScreenLarge()) return;
         if (getChildCount() <= 1) return;
         if (!isScrollingIndicatorEnabled()) return;
 
@@ -1692,19 +1689,19 @@
         }
     }
 
-    protected int getPageWidthForScrollingIndicator() {
-        return getMeasuredWidth();
-    }
-
     private void updateScrollingIndicatorPosition() {
+        if (!isScrollingIndicatorEnabled()) return;
+
         // We can make the page width smaller to make it look more centered
-        int pageWidth = getPageWidthForScrollingIndicator();
-        int pageOffset = (getMeasuredWidth() - pageWidth) / 2;
-        int maxPageWidth = getChildCount() * pageWidth;
+        getScrollingIndicatorTrack();
+        int pageWidth = mScrollTrack.getMeasuredWidth() - mScrollTrack.getPaddingLeft() -
+                mScrollTrack.getPaddingRight();
+        int maxPageWidth = getChildCount() * getMeasuredWidth();
         float offset = (float) getScrollX() / maxPageWidth;
         int indicatorWidth = pageWidth / getChildCount();
         int indicatorCenterOffset = indicatorWidth / 2 - mScrollIndicator.getMeasuredWidth() / 2;
-        int indicatorPos = (int) (offset * pageWidth) + pageOffset + indicatorCenterOffset;
+        int indicatorPos = (int) (offset * pageWidth) + mScrollTrack.getPaddingLeft() +
+                indicatorCenterOffset;
         mScrollIndicator.setTranslationX(indicatorPos);
         mScrollIndicator.invalidate();
     }
@@ -1718,20 +1715,20 @@
     }
 
     public void showScrollIndicatorTrack() {
-        if (!LauncherApplication.isScreenLarge()) {
-            getScrollingIndicatorTrack();
-            if (mScrollTrack != null) {
-                mScrollTrack.setVisibility(View.VISIBLE);
-            }
+        if (!isScrollingIndicatorEnabled()) return;
+
+        getScrollingIndicatorTrack();
+        if (mScrollTrack != null) {
+            mScrollTrack.setVisibility(View.VISIBLE);
         }
     }
 
     public void hideScrollIndicatorTrack() {
-        if (!LauncherApplication.isScreenLarge()) {
-            getScrollingIndicatorTrack();
-            if (mScrollTrack != null) {
-                mScrollTrack.setVisibility(View.GONE);
-            }
+        if (!isScrollingIndicatorEnabled()) return;
+
+        getScrollingIndicatorTrack();
+        if (mScrollTrack != null) {
+            mScrollTrack.setVisibility(View.GONE);
         }
     }