Use public APIs not internal APIs
am: 59cc3bcdaf

Change-Id: I1b2fbc29e41a0b6adedfb1f0d12c804305c25ade
diff --git a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/StorageLifetimeFragment.java b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/StorageLifetimeFragment.java
index bf7af5d..b134139 100644
--- a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/StorageLifetimeFragment.java
+++ b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/StorageLifetimeFragment.java
@@ -28,6 +28,7 @@
 import android.os.Bundle;
 import android.os.StatFs;
 import android.system.ErrnoException;
+import android.system.Os;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -41,8 +42,6 @@
 import com.google.android.car.kitchensink.KitchenSinkActivity;
 import com.google.android.car.kitchensink.R;
 
-import libcore.io.Libcore;
-
 import java.io.File;
 import java.io.FileDescriptor;
 import java.io.IOException;
@@ -148,16 +147,16 @@
     private void fsyncFile() {
         try {
             final Path filePath = getFilePath();
-            FileDescriptor fd = Libcore.os.open(filePath.toString(), O_APPEND | O_RDWR, 0);
+            FileDescriptor fd = Os.open(filePath.toString(), O_APPEND | O_RDWR, 0);
             if (!fd.valid()) {
                 Log.w(TAG, "file descriptor is invalid");
                 return;
             }
             // fill byteBuffer with arbitrary data in order to make an fsync() meaningful
             ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[] {101, 110, 114, 105, 99, 111});
-            Libcore.os.write(fd, byteBuffer);
-            Libcore.os.fsync(fd);
-            Libcore.os.close(fd);
+            Os.write(fd, byteBuffer);
+            Os.fsync(fd);
+            Os.close(fd);
         } catch (ErrnoException | IOException e) {
             Log.w(TAG, "could not fsync data", e);
         }