Import Android SDK Platform P [4477446]

/google/data/ro/projects/android/fetch_artifact \
    --bid 4477446 \
    --target sdk_phone_armv7-win_sdk \
    sdk-repo-linux-sources-4477446.zip

AndroidVersion.ApiLevel has been modified to appear as 28

Change-Id: If0559643d7c328e36aafca98f0c114641d33642c
diff --git a/android/os/ShellCommand.java b/android/os/ShellCommand.java
index d75219f..fa05a5e 100644
--- a/android/os/ShellCommand.java
+++ b/android/os/ShellCommand.java
@@ -91,7 +91,13 @@
         mCmd = cmd;
         mResultReceiver = resultReceiver;
 
-        if (DEBUG) Slog.d(TAG, "Starting command " + mCmd + " on " + mTarget);
+        if (DEBUG) {
+            RuntimeException here = new RuntimeException("here");
+            here.fillInStackTrace();
+            Slog.d(TAG, "Starting command " + mCmd + " on " + mTarget, here);
+            Slog.d(TAG, "Calling uid=" + Binder.getCallingUid()
+                    + " pid=" + Binder.getCallingPid() + " ShellCallback=" + getShellCallback());
+        }
         int res = -1;
         try {
             res = onCommand(mCmd);
@@ -227,15 +233,19 @@
      * @hide
      */
     public ParcelFileDescriptor openFileForSystem(String path, String mode) {
+        if (DEBUG) Slog.d(TAG, "openFileForSystem: " + path + " mode=" + mode);
         try {
             ParcelFileDescriptor pfd = getShellCallback().openFile(path,
                     "u:r:system_server:s0", mode);
             if (pfd != null) {
+                if (DEBUG) Slog.d(TAG, "Got file: " + pfd);
                 return pfd;
             }
         } catch (RuntimeException e) {
+            if (DEBUG) Slog.d(TAG, "Failure opening file: " + e.getMessage());
             getErrPrintWriter().println("Failure opening file: " + e.getMessage());
         }
+        if (DEBUG) Slog.d(TAG, "Error: Unable to open file: " + path);
         getErrPrintWriter().println("Error: Unable to open file: " + path);
         getErrPrintWriter().println("Consider using a file under /data/local/tmp/");
         return null;