Loading cmds/pm/src/com/android/commands/pm/Pm.java +9 −881 File changed.Preview size limit exceeded, changes collapsed. Show changes core/java/android/app/ActivityManager.java +28 −12 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.graphics.Matrix; import android.graphics.Point; import android.graphics.Rect; import android.os.BatteryStats; import android.os.Binder; import android.os.Build; import android.os.Build.VERSION_CODES; import android.os.Bundle; Loading Loading @@ -3885,8 +3886,22 @@ public class ActivityManager { IBinder service = ServiceManager.checkService(name); if (service == null) { pw.println(" (Service not found)"); pw.flush(); return; } pw.flush(); if (service instanceof Binder) { // If this is a local object, it doesn't make sense to do an async dump with it, // just directly dump. try { service.dump(fd, args); } catch (Throwable e) { pw.println("Failure dumping service:"); e.printStackTrace(pw); pw.flush(); } } else { // Otherwise, it is remote, do the dump asynchronously to avoid blocking. TransferPipe tp = null; try { pw.flush(); Loading @@ -3902,6 +3917,7 @@ public class ActivityManager { e.printStackTrace(pw); } } } /** * Request that the system start watching for the calling process to exceed a pss Loading core/java/android/os/BatteryStats.java +1 −1 Original line number Diff line number Diff line Loading @@ -6453,7 +6453,7 @@ public abstract class BatteryStats implements Parcelable { pw.println(); } } if (!filtering || (flags&(DUMP_CHARGED_ONLY|DUMP_DAILY_ONLY)) != 0) { if (!filtering || (flags & DUMP_DAILY_ONLY) != 0) { pw.println("Daily stats:"); pw.print(" Current start time: "); pw.println(DateFormat.format("yyyy-MM-dd-HH-mm-ss", Loading core/java/android/os/Binder.java +2 −2 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class Binder implements IBinder { try { if (binder instanceof BinderProxy) { ((BinderProxy) binder).mWarnOnBlocking = false; } else if (binder != null } else if (binder != null && binder.getInterfaceDescriptor() != null && binder.queryLocalInterface(binder.getInterfaceDescriptor()) == null) { Log.w(TAG, "Unable to allow blocking on interface " + binder); } Loading Loading @@ -414,7 +414,7 @@ public class Binder implements IBinder { * descriptor. */ public @Nullable IInterface queryLocalInterface(@NonNull String descriptor) { if (mDescriptor.equals(descriptor)) { if (mDescriptor != null && mDescriptor.equals(descriptor)) { return mOwner; } return null; Loading core/java/android/os/ShellCommand.java +36 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.os; import android.util.Slog; import com.android.internal.util.FastPrintWriter; import java.io.BufferedInputStream; Loading Loading @@ -118,12 +119,32 @@ public abstract class ShellCommand { mErrPrintWriter.flush(); } if (DEBUG) Slog.d(TAG, "Sending command result on " + mTarget); if (mResultReceiver != null) { mResultReceiver.send(res, null); } } if (DEBUG) Slog.d(TAG, "Finished command " + mCmd + " on " + mTarget); return res; } /** * Adopt the ResultReceiver that was given to this shell command from it, taking * it over. Primarily used to dispatch to another shell command. Once called, * this shell command will no longer return its own result when done. */ public ResultReceiver adoptResultReceiver() { ResultReceiver rr = mResultReceiver; mResultReceiver = null; return rr; } /** * Return the raw FileDescriptor for the output stream. */ public FileDescriptor getOutFileDescriptor() { return mOut; } /** * Return direct raw access (not buffered) to the command's output data stream. */ Loading @@ -144,6 +165,13 @@ public abstract class ShellCommand { return mOutPrintWriter; } /** * Return the raw FileDescriptor for the error stream. */ public FileDescriptor getErrFileDescriptor() { return mErr; } /** * Return direct raw access (not buffered) to the command's error output data stream. */ Loading @@ -167,6 +195,13 @@ public abstract class ShellCommand { return mErrPrintWriter; } /** * Return the raw FileDescriptor for the input stream. */ public FileDescriptor getInFileDescriptor() { return mIn; } /** * Return direct raw access (not buffered) to the command's input data stream. */ Loading Loading
cmds/pm/src/com/android/commands/pm/Pm.java +9 −881 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/java/android/app/ActivityManager.java +28 −12 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.graphics.Matrix; import android.graphics.Point; import android.graphics.Rect; import android.os.BatteryStats; import android.os.Binder; import android.os.Build; import android.os.Build.VERSION_CODES; import android.os.Bundle; Loading Loading @@ -3885,8 +3886,22 @@ public class ActivityManager { IBinder service = ServiceManager.checkService(name); if (service == null) { pw.println(" (Service not found)"); pw.flush(); return; } pw.flush(); if (service instanceof Binder) { // If this is a local object, it doesn't make sense to do an async dump with it, // just directly dump. try { service.dump(fd, args); } catch (Throwable e) { pw.println("Failure dumping service:"); e.printStackTrace(pw); pw.flush(); } } else { // Otherwise, it is remote, do the dump asynchronously to avoid blocking. TransferPipe tp = null; try { pw.flush(); Loading @@ -3902,6 +3917,7 @@ public class ActivityManager { e.printStackTrace(pw); } } } /** * Request that the system start watching for the calling process to exceed a pss Loading
core/java/android/os/BatteryStats.java +1 −1 Original line number Diff line number Diff line Loading @@ -6453,7 +6453,7 @@ public abstract class BatteryStats implements Parcelable { pw.println(); } } if (!filtering || (flags&(DUMP_CHARGED_ONLY|DUMP_DAILY_ONLY)) != 0) { if (!filtering || (flags & DUMP_DAILY_ONLY) != 0) { pw.println("Daily stats:"); pw.print(" Current start time: "); pw.println(DateFormat.format("yyyy-MM-dd-HH-mm-ss", Loading
core/java/android/os/Binder.java +2 −2 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class Binder implements IBinder { try { if (binder instanceof BinderProxy) { ((BinderProxy) binder).mWarnOnBlocking = false; } else if (binder != null } else if (binder != null && binder.getInterfaceDescriptor() != null && binder.queryLocalInterface(binder.getInterfaceDescriptor()) == null) { Log.w(TAG, "Unable to allow blocking on interface " + binder); } Loading Loading @@ -414,7 +414,7 @@ public class Binder implements IBinder { * descriptor. */ public @Nullable IInterface queryLocalInterface(@NonNull String descriptor) { if (mDescriptor.equals(descriptor)) { if (mDescriptor != null && mDescriptor.equals(descriptor)) { return mOwner; } return null; Loading
core/java/android/os/ShellCommand.java +36 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.os; import android.util.Slog; import com.android.internal.util.FastPrintWriter; import java.io.BufferedInputStream; Loading Loading @@ -118,12 +119,32 @@ public abstract class ShellCommand { mErrPrintWriter.flush(); } if (DEBUG) Slog.d(TAG, "Sending command result on " + mTarget); if (mResultReceiver != null) { mResultReceiver.send(res, null); } } if (DEBUG) Slog.d(TAG, "Finished command " + mCmd + " on " + mTarget); return res; } /** * Adopt the ResultReceiver that was given to this shell command from it, taking * it over. Primarily used to dispatch to another shell command. Once called, * this shell command will no longer return its own result when done. */ public ResultReceiver adoptResultReceiver() { ResultReceiver rr = mResultReceiver; mResultReceiver = null; return rr; } /** * Return the raw FileDescriptor for the output stream. */ public FileDescriptor getOutFileDescriptor() { return mOut; } /** * Return direct raw access (not buffered) to the command's output data stream. */ Loading @@ -144,6 +165,13 @@ public abstract class ShellCommand { return mOutPrintWriter; } /** * Return the raw FileDescriptor for the error stream. */ public FileDescriptor getErrFileDescriptor() { return mErr; } /** * Return direct raw access (not buffered) to the command's error output data stream. */ Loading @@ -167,6 +195,13 @@ public abstract class ShellCommand { return mErrPrintWriter; } /** * Return the raw FileDescriptor for the input stream. */ public FileDescriptor getInFileDescriptor() { return mIn; } /** * Return direct raw access (not buffered) to the command's input data stream. */ Loading