[RenderScript] Load from the full path of librsjni and libRSSupport. am: aa35ba536c
am: 2e2e7fb23a

* commit '2e2e7fb23ae9be56e2c8d17eac3295e99fe61adf':
  [RenderScript] Load from the full path of librsjni and libRSSupport.
diff --git a/percent/Android.mk b/percent/Android.mk
index 5d4cf86..bc268c3 100644
--- a/percent/Android.mk
+++ b/percent/Android.mk
@@ -32,7 +32,7 @@
 # in their makefiles to include the resources in their package.
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-percent
-LOCAL_SDK_VERSION := 7
+LOCAL_SDK_VERSION := 8
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 LOCAL_JAVA_LIBRARIES := android-support-percent-res \
     android-support-v4
diff --git a/percent/AndroidManifest.xml b/percent/AndroidManifest.xml
index 12a6568..8668424 100644
--- a/percent/AndroidManifest.xml
+++ b/percent/AndroidManifest.xml
@@ -15,6 +15,6 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="android.support.percent">
-    <uses-sdk android:minSdkVersion="7"/>
+    <uses-sdk android:minSdkVersion="8"/>
     <application />
 </manifest>
diff --git a/percent/api/current.txt b/percent/api/current.txt
index 34d0302..eb10df8 100644
--- a/percent/api/current.txt
+++ b/percent/api/current.txt
@@ -32,6 +32,7 @@
     method public void fillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams, int, int);
     method public void restoreLayoutParams(android.view.ViewGroup.LayoutParams);
     method public void restoreMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams);
+    field public float aspectRatio;
     field public float bottomMarginPercent;
     field public float endMarginPercent;
     field public float heightPercent;
diff --git a/percent/res/values/attrs.xml b/percent/res/values/attrs.xml
index 31154cc..ab147f7 100644
--- a/percent/res/values/attrs.xml
+++ b/percent/res/values/attrs.xml
@@ -27,6 +27,7 @@
         <attr name="layout_marginBottomPercent" format="fraction"/>
         <attr name="layout_marginStartPercent" format="fraction"/>
         <attr name="layout_marginEndPercent" format="fraction"/>
+        <attr name="layout_aspectRatio" format="fraction" />
     </declare-styleable>
 </resources>
 
diff --git a/percent/src/android/support/percent/PercentFrameLayout.java b/percent/src/android/support/percent/PercentFrameLayout.java
index 90c238d..2041d70 100644
--- a/percent/src/android/support/percent/PercentFrameLayout.java
+++ b/percent/src/android/support/percent/PercentFrameLayout.java
@@ -34,7 +34,7 @@
  *         xmlns:android="http://schemas.android.com/apk/res/android"
  *         xmlns:app="http://schemas.android.com/apk/res-auto"
  *         android:layout_width="match_parent"
- *         android:layout_height="match_parent"/&gt
+ *         android:layout_height="match_parent"&gt
  *     &lt;ImageView
  *         app:layout_widthPercent="50%"
  *         app:layout_heightPercent="50%"
@@ -54,6 +54,7 @@
  *     <li>{@code layout_marginBottomPercent}
  *     <li>{@code layout_marginStartPercent}
  *     <li>{@code layout_marginEndPercent}
+ *     <li>{@code layout_aspectRatio}
  * </ul>
  *
  * It is not necessary to specify {@code layout_width/height} if you specify {@code
@@ -61,6 +62,17 @@
  * percentage value permits, you can add {@code layout_width/height="wrap_content"}. In that case
  * if the percentage size is too small for the View's content, it will be resized using
  * {@code wrap_content} rule.
+ *
+ * <p>
+ * You can also make one dimension be a fraction of the other by setting only width or height and
+ * using {@code layout_aspectRatio} for the second one to be calculated automatically. For
+ * example, if you would like to achieve 16:9 aspect ratio, you can write:
+ * <pre class="prettyprint">
+ *     android:layout_width="300dp"
+ *     app:layout_aspectRatio="178%"
+ * </pre>
+ * This will make the aspect ratio 16:9 (1.78:1) with the width fixed at 300dp and height adjusted
+ * accordingly.
  */
 public class PercentFrameLayout extends FrameLayout {
     private final PercentLayoutHelper mHelper = new PercentLayoutHelper(this);
@@ -78,6 +90,11 @@
     }
 
     @Override
+    protected LayoutParams generateDefaultLayoutParams() {
+        return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+    }
+
+    @Override
     public LayoutParams generateLayoutParams(AttributeSet attrs) {
         return new LayoutParams(getContext(), attrs);
     }
diff --git a/percent/src/android/support/percent/PercentLayoutHelper.java b/percent/src/android/support/percent/PercentLayoutHelper.java
index 216371f..b670385 100644
--- a/percent/src/android/support/percent/PercentLayoutHelper.java
+++ b/percent/src/android/support/percent/PercentLayoutHelper.java
@@ -101,6 +101,7 @@
                     + View.MeasureSpec.toString(widthMeasureSpec) + " heightMeasureSpec: "
                     + View.MeasureSpec.toString(heightMeasureSpec));
         }
+
         int widthHint = View.MeasureSpec.getSize(widthMeasureSpec);
         int heightHint = View.MeasureSpec.getSize(heightMeasureSpec);
         for (int i = 0, N = mHost.getChildCount(); i < N; i++) {
@@ -217,6 +218,16 @@
             info = info != null ? info : new PercentLayoutInfo();
             info.endMarginPercent = value;
         }
+
+        value = array.getFraction(R.styleable.PercentLayout_Layout_layout_aspectRatio, 1, 1, -1f);
+        if (value != -1f) {
+            if (Log.isLoggable(TAG, Log.VERBOSE)) {
+                Log.v(TAG, "aspect ratio: " + value);
+            }
+            info = info != null ? info : new PercentLayoutInfo();
+            info.aspectRatio = value;
+        }
+
         array.recycle();
         if (Log.isLoggable(TAG, Log.DEBUG)) {
             Log.d(TAG, "constructed: " + info);
@@ -329,6 +340,8 @@
 
         public float endMarginPercent;
 
+        public float aspectRatio;
+
         /* package */ final ViewGroup.MarginLayoutParams mPreservedParams;
 
         public PercentLayoutInfo() {
@@ -352,12 +365,30 @@
             mPreservedParams.width = params.width;
             mPreservedParams.height = params.height;
 
+            // We assume that width/height set to 0 means that value was unset. This might not
+            // necessarily be true, as the user might explicitly set it to 0. However, we use this
+            // information only for the aspect ratio. If the user set the aspect ratio attribute,
+            // it means they accept or soon discover that it will be disregarded.
+            final boolean widthNotSet = params.width == 0 && widthPercent < 0;
+            final boolean heightNotSet = params.height == 0 && heightPercent < 0;
+
             if (widthPercent >= 0) {
                 params.width = (int) (widthHint * widthPercent);
             }
+
             if (heightPercent >= 0) {
                 params.height = (int) (heightHint * heightPercent);
             }
+
+            if (aspectRatio >= 0) {
+                if (widthNotSet) {
+                    params.width = (int) (params.height * aspectRatio);
+                }
+                if (heightNotSet) {
+                    params.height = (int) (params.width / aspectRatio);
+                }
+            }
+
             if (Log.isLoggable(TAG, Log.DEBUG)) {
                 Log.d(TAG, "after fillLayoutParams: (" + params.width + ", " + params.height + ")");
             }
diff --git a/percent/src/android/support/percent/PercentRelativeLayout.java b/percent/src/android/support/percent/PercentRelativeLayout.java
index 07c08cf..02a9188 100644
--- a/percent/src/android/support/percent/PercentRelativeLayout.java
+++ b/percent/src/android/support/percent/PercentRelativeLayout.java
@@ -34,7 +34,7 @@
  *         xmlns:android="http://schemas.android.com/apk/res/android"
  *         xmlns:app="http://schemas.android.com/apk/res-auto"
  *         android:layout_width="match_parent"
- *         android:layout_height="match_parent"/&gt
+ *         android:layout_height="match_parent"&gt
  *     &lt;ImageView
  *         app:layout_widthPercent="50%"
  *         app:layout_heightPercent="50%"
@@ -54,6 +54,7 @@
  *     <li>{@code layout_marginBottomPercent}
  *     <li>{@code layout_marginStartPercent}
  *     <li>{@code layout_marginEndPercent}
+ *     <li>{@code layout_aspectRatio}
  * </ul>
  *
  * It is not necessary to specify {@code layout_width/height} if you specify {@code
@@ -61,6 +62,17 @@
  * percentage value permits, you can add {@code layout_width/height="wrap_content"}. In that case
  * if the percentage size is too small for the View's content, it will be resized using
  * {@code wrap_content} rule.
+ *
+ * <p>
+ * You can also make one dimension be a fraction of the other by setting only width or height and
+ * using {@code layout_aspectRatio} for the second one to be calculated automatically. For
+ * example, if you would like to achieve 16:9 aspect ratio, you can write:
+ * <pre class="prettyprint">
+ *     android:layout_width="300dp"
+ *     app:layout_aspectRatio="178%"
+ * </pre>
+ * This will make the aspect ratio 16:9 (1.78:1) with the width fixed at 300dp and height adjusted
+ * accordingly.
  */
 public class PercentRelativeLayout extends RelativeLayout {
     private final PercentLayoutHelper mHelper = new PercentLayoutHelper(this);
@@ -78,6 +90,11 @@
     }
 
     @Override
+    protected LayoutParams generateDefaultLayoutParams() {
+        return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+    }
+
+    @Override
     public LayoutParams generateLayoutParams(AttributeSet attrs) {
         return new LayoutParams(getContext(), attrs);
     }
diff --git a/v17/leanback/res/values-ta-rIN/strings.xml b/v17/leanback/res/values-ta-rIN/strings.xml
index 9472522..f67ee4d 100644
--- a/v17/leanback/res/values-ta-rIN/strings.xml
+++ b/v17/leanback/res/values-ta-rIN/strings.xml
@@ -20,7 +20,7 @@
     <string name="orb_search_action" msgid="5651268540267663887">"செயலைத் தேடுக"</string>
     <string name="lb_search_bar_hint" msgid="8325490927970116252">"தேடு"</string>
     <string name="lb_search_bar_hint_speech" msgid="5511270823320183816">"தேட, பேசவும்"</string>
-    <string name="lb_search_bar_hint_with_title" msgid="1627103380996590035">"<xliff:g id="SEARCH_CONTEXT">%1$s</xliff:g> ஐத் தேடுக"</string>
+    <string name="lb_search_bar_hint_with_title" msgid="1627103380996590035">"<xliff:g id="SEARCH_CONTEXT">%1$s</xliff:g> இல் தேடுக"</string>
     <string name="lb_search_bar_hint_with_title_speech" msgid="2712734639766312034">"<xliff:g id="SEARCH_CONTEXT">%1$s</xliff:g> ஐத் தேட, பேசவும்"</string>
     <string name="lb_control_display_fast_forward_multiplier" msgid="4541442045214207774">"%1$dX"</string>
     <string name="lb_control_display_rewind_multiplier" msgid="3097220783222910245">"%1$dX"</string>
diff --git a/v4/java/android/support/v4/app/NotificationCompat.java b/v4/java/android/support/v4/app/NotificationCompat.java
index b206e95..e23c11c 100644
--- a/v4/java/android/support/v4/app/NotificationCompat.java
+++ b/v4/java/android/support/v4/app/NotificationCompat.java
@@ -2247,7 +2247,7 @@
          * Size value for use with {@link #setCustomSizePreset} to show this notification with
          * default sizing.
          * <p>For custom display notifications created using {@link #setDisplayIntent},
-         * the default is {@link #SIZE_LARGE}. All other notifications size automatically based
+         * the default is {@link #SIZE_MEDIUM}. All other notifications size automatically based
          * on their content.
          */
         public static final int SIZE_DEFAULT = 0;