Merge "adjust sdcard dir" into jb-mr1-dev
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index 5e7b540..f64b3ce 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -296,6 +296,7 @@
                     "/data/btips",
                     "/data/btips/TI",
                     "/data/btips/TI/opp",
+                    "/data/cache",
                     "/data/calibration",
                     "/data/clipboard",
                     "/data/clp",
@@ -337,6 +338,10 @@
                     "/data/emt",
                     "/data/factory",
                     "/data/fota",
+                    "/data/gps",
+                    "/data/gps/log",
+                    "/data/gps/var",
+                    "/data/gps/var/run",
                     "/data/gpscfg",
                     "/data/hwvefs",
                     "/data/htcfs",
diff --git a/tests/tests/security/src/android/security/cts/KernelSettingsTest.java b/tests/tests/security/src/android/security/cts/KernelSettingsTest.java
index 1e6d384..cc4b6a6 100644
--- a/tests/tests/security/src/android/security/cts/KernelSettingsTest.java
+++ b/tests/tests/security/src/android/security/cts/KernelSettingsTest.java
@@ -59,6 +59,23 @@
     }
 
     /**
+     * dmesg shows the contents of the kernel log buffer. This log buffer
+     * stores sensitive information, such as kernel addresses, which
+     * could be used to perform attacks against the kernel. In addition,
+     * inappropriate data, such as keystrokes and touch events,
+     * are occasionally logged to dmesg. This setting prevents user
+     * space programs from accessing the kernel settings buffer,
+     * and should not be changed.
+     */
+    public void testDmesgRestrict() throws IOException {
+        try {
+            assertEquals("1", getFile("/proc/sys/kernel/dmesg_restrict"));
+        } catch (FileNotFoundException e) {
+            // Odd. The file doesn't exist... Assume we're ok.
+        }
+    }
+
+    /**
      * setuid programs should not be dumpable.
      */
     public void testSetuidDumpable() throws IOException {
diff --git a/tests/tests/view/src/android/view/cts/ViewGroup_MarginLayoutParamsTest.java b/tests/tests/view/src/android/view/cts/ViewGroup_MarginLayoutParamsTest.java
index 453e200..397735f 100644
--- a/tests/tests/view/src/android/view/cts/ViewGroup_MarginLayoutParamsTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewGroup_MarginLayoutParamsTest.java
@@ -81,8 +81,8 @@
         assertEquals(120, mMarginLayoutParams.rightMargin);
         assertEquals(140, mMarginLayoutParams.bottomMargin);
 
-        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.startMargin);
-        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.endMargin);
+        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.getMarginStart());
+        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.getMarginEnd());
 
         assertEquals(false, mMarginLayoutParams.isMarginRelative());
     }
@@ -91,9 +91,9 @@
         // create a new MarginLayoutParams instance
         mMarginLayoutParams = new ViewGroup.MarginLayoutParams(320, 480);
         mMarginLayoutParams.setMarginsRelative(20, 30, 120, 140);
-        assertEquals(20, mMarginLayoutParams.startMargin);
+        assertEquals(20, mMarginLayoutParams.getMarginStart());
         assertEquals(30, mMarginLayoutParams.topMargin);
-        assertEquals(120, mMarginLayoutParams.endMargin);
+        assertEquals(120, mMarginLayoutParams.getMarginEnd());
         assertEquals(140, mMarginLayoutParams.bottomMargin);
 
         assertEquals(0, mMarginLayoutParams.leftMargin);
@@ -116,8 +116,8 @@
         assertEquals(120, mMarginLayoutParams.rightMargin);
         assertEquals(140, mMarginLayoutParams.bottomMargin);
 
-        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.startMargin);
-        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.endMargin);
+        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.getMarginStart());
+        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.getMarginEnd());
 
         assertEquals(false, mMarginLayoutParams.isMarginRelative());
 
@@ -126,9 +126,9 @@
         vg.setLayoutParams(mMarginLayoutParams);
         vg.requestLayout();
 
-        assertEquals(20, mMarginLayoutParams.startMargin);
+        assertEquals(20, mMarginLayoutParams.getMarginStart());
         assertEquals(30, mMarginLayoutParams.topMargin);
-        assertEquals(120, mMarginLayoutParams.endMargin);
+        assertEquals(120, mMarginLayoutParams.getMarginEnd());
         assertEquals(140, mMarginLayoutParams.bottomMargin);
 
         assertEquals(20, mMarginLayoutParams.leftMargin);
@@ -149,8 +149,8 @@
         assertEquals(120, mMarginLayoutParams.rightMargin);
         assertEquals(140, mMarginLayoutParams.bottomMargin);
 
-        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.startMargin);
-        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.endMargin);
+        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.getMarginStart());
+        assertEquals(Integer.MIN_VALUE, mMarginLayoutParams.getMarginEnd());
 
         assertEquals(false, mMarginLayoutParams.isMarginRelative());
 
@@ -159,9 +159,9 @@
         vg.setLayoutParams(mMarginLayoutParams);
         vg.requestLayout();
 
-        assertEquals(20, mMarginLayoutParams.startMargin);
+        assertEquals(20, mMarginLayoutParams.getMarginStart());
         assertEquals(30, mMarginLayoutParams.topMargin);
-        assertEquals(120, mMarginLayoutParams.endMargin);
+        assertEquals(120, mMarginLayoutParams.getMarginEnd());
         assertEquals(140, mMarginLayoutParams.bottomMargin);
 
         assertEquals(120, mMarginLayoutParams.leftMargin);