Add setLastModified test to testAllPackageDirsWritable

Bug: 34955809
Test: Ran the modified test
Change-Id: Ic3b369e7d0fedf0e2a67c0e928e2787e05df378e
diff --git a/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java b/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java
index f5666d1..4b0bec3 100644
--- a/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java
+++ b/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java
@@ -103,6 +103,7 @@
      * Verify we can write to our own package dirs.
      */
     public void testAllPackageDirsWritable() throws Exception {
+        final long testValue = 12345000;
         final List<File> paths = getAllPackageSpecificPaths(getContext());
         for (File path : paths) {
             assertNotNull("Valid media must be inserted during CTS", path);
@@ -122,6 +123,12 @@
 
             assertEquals(32, readInt(directChild));
             assertEquals(64, readInt(subdirChild));
+
+            assertTrue("Must be able to set last modified", directChild.setLastModified(testValue));
+            assertTrue("Must be able to set last modified", subdirChild.setLastModified(testValue));
+
+            assertEquals(testValue, directChild.lastModified());
+            assertEquals(testValue, subdirChild.lastModified());
         }
 
         for (File path : paths) {