Loading api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -3553,6 +3553,7 @@ package android.app { public class ActivityManager { method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap); method public boolean clearApplicationUserData(); method public void clearWatchHeapLimit(); method public void dumpPackageState(java.io.FileDescriptor, java.lang.String); method public android.util.Size getAppTaskThumbnailSize(); method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks(); Loading @@ -3579,6 +3580,8 @@ package android.app { method public void moveTaskToFront(int, int); method public void moveTaskToFront(int, int, android.os.Bundle); method public deprecated void restartPackage(java.lang.String); method public void setWatchHeapLimit(long); field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT"; field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1 field public static final int LOCK_TASK_MODE_NONE = 0; // 0x0 field public static final int LOCK_TASK_MODE_PINNED = 2; // 0x2 Loading Loading @@ -5434,10 +5437,12 @@ package android.app { public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable { ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence); ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int); method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence); method public int countSynonyms(); method public int describeContents(); method public android.os.Bundle getExtras(); method public int getIndex(); method public java.lang.CharSequence getLabel(); method public java.lang.CharSequence getSynonymAt(int); method public void setExtras(android.os.Bundle); Loading Loading @@ -28271,6 +28276,7 @@ package android.service.voice { ctor public VoiceInteractionSession(android.content.Context); ctor public VoiceInteractionSession(android.content.Context, android.os.Handler); method public void finish(); method public android.content.Context getContext(); method public android.view.LayoutInflater getLayoutInflater(); method public android.app.Dialog getWindow(); method public void hide(); api/system-current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -3641,6 +3641,7 @@ package android.app { public class ActivityManager { method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap); method public boolean clearApplicationUserData(); method public void clearWatchHeapLimit(); method public void dumpPackageState(java.io.FileDescriptor, java.lang.String); method public android.util.Size getAppTaskThumbnailSize(); method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks(); Loading Loading @@ -3668,6 +3669,8 @@ package android.app { method public void moveTaskToFront(int, int); method public void moveTaskToFront(int, int, android.os.Bundle); method public deprecated void restartPackage(java.lang.String); method public void setWatchHeapLimit(long); field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT"; field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1 field public static final int LOCK_TASK_MODE_NONE = 0; // 0x0 field public static final int LOCK_TASK_MODE_PINNED = 2; // 0x2 Loading Loading @@ -5525,10 +5528,12 @@ package android.app { public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable { ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence); ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int); method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence); method public int countSynonyms(); method public int describeContents(); method public android.os.Bundle getExtras(); method public int getIndex(); method public java.lang.CharSequence getLabel(); method public java.lang.CharSequence getSynonymAt(int); method public void setExtras(android.os.Bundle); Loading Loading @@ -30346,6 +30351,7 @@ package android.service.voice { ctor public VoiceInteractionSession(android.content.Context); ctor public VoiceInteractionSession(android.content.Context, android.os.Handler); method public void finish(); method public android.content.Context getContext(); method public android.view.LayoutInflater getLayoutInflater(); method public android.app.Dialog getWindow(); method public void hide(); cmds/am/src/com/android/commands/am/Am.java +2 −2 Original line number Diff line number Diff line Loading @@ -1189,12 +1189,12 @@ public class Am extends BaseCommand { private void runSetWatchHeap() throws Exception { String proc = nextArgRequired(); String limit = nextArgRequired(); mAm.setDumpHeapDebugLimit(proc, Long.parseLong(limit)); mAm.setDumpHeapDebugLimit(proc, 0, Long.parseLong(limit), null); } private void runClearWatchHeap() throws Exception { String proc = nextArgRequired(); mAm.setDumpHeapDebugLimit(proc, -1); mAm.setDumpHeapDebugLimit(proc, 0, -1, null); } private void runBugReport() throws Exception { Loading core/java/android/app/ActivityManager.java +41 −0 Original line number Diff line number Diff line Loading @@ -2681,6 +2681,47 @@ public class ActivityManager { } } /** * Request that the system start watching for the calling process to exceed a pss * size as given here. Once called, the system will look for any occassions where it * sees the associated process with a larger pss size and, when this happens, automatically * pull a heap dump from it and allow the user to share the data. Note that this request * continues running even if the process is killed and restarted. To remove the watch, * use {@link #clearWatchHeapLimit()}. * * <p>This API only work if running on a debuggable (userdebug or eng) build.</p> * * <p>Callers can optionally implement {@link #ACTION_REPORT_HEAP_LIMIT} to directly * handle heap limit reports themselves.</p> * * @param pssSize The size in bytes to set the limit at. */ public void setWatchHeapLimit(long pssSize) { try { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, pssSize, mContext.getPackageName()); } catch (RemoteException e) { } } /** * Action an app can implement to handle reports from {@link #setWatchHeapLimit(long)}. * If your package has an activity handling this action, it will be launched with the * heap data provided to it the same way as {@link Intent#ACTION_SEND}. Note that to * match the activty must support this action and a MIME type of "*/*". */ public static final String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT"; /** * Clear a heap watch limit previously set by {@link #setWatchHeapLimit(long)}. */ public void clearWatchHeapLimit() { try { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, 0, null); } catch (RemoteException e) { } } /** * @hide */ Loading core/java/android/app/ActivityManagerNative.java +7 −2 Original line number Diff line number Diff line Loading @@ -2427,8 +2427,10 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM case SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); String procName = data.readString(); int uid = data.readInt(); long maxMemSize = data.readLong(); setDumpHeapDebugLimit(procName, maxMemSize); String reportPackage = data.readString(); setDumpHeapDebugLimit(procName, uid, maxMemSize, reportPackage); reply.writeNoException(); return true; } Loading Loading @@ -5644,12 +5646,15 @@ class ActivityManagerProxy implements IActivityManager } @Override public void setDumpHeapDebugLimit(String processName, long maxMemSize) throws RemoteException { public void setDumpHeapDebugLimit(String processName, int uid, long maxMemSize, String reportPackage) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(processName); data.writeInt(uid); data.writeLong(maxMemSize); data.writeString(reportPackage); mRemote.transact(SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); Loading Loading
api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -3553,6 +3553,7 @@ package android.app { public class ActivityManager { method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap); method public boolean clearApplicationUserData(); method public void clearWatchHeapLimit(); method public void dumpPackageState(java.io.FileDescriptor, java.lang.String); method public android.util.Size getAppTaskThumbnailSize(); method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks(); Loading @@ -3579,6 +3580,8 @@ package android.app { method public void moveTaskToFront(int, int); method public void moveTaskToFront(int, int, android.os.Bundle); method public deprecated void restartPackage(java.lang.String); method public void setWatchHeapLimit(long); field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT"; field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1 field public static final int LOCK_TASK_MODE_NONE = 0; // 0x0 field public static final int LOCK_TASK_MODE_PINNED = 2; // 0x2 Loading Loading @@ -5434,10 +5437,12 @@ package android.app { public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable { ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence); ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int); method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence); method public int countSynonyms(); method public int describeContents(); method public android.os.Bundle getExtras(); method public int getIndex(); method public java.lang.CharSequence getLabel(); method public java.lang.CharSequence getSynonymAt(int); method public void setExtras(android.os.Bundle); Loading Loading @@ -28271,6 +28276,7 @@ package android.service.voice { ctor public VoiceInteractionSession(android.content.Context); ctor public VoiceInteractionSession(android.content.Context, android.os.Handler); method public void finish(); method public android.content.Context getContext(); method public android.view.LayoutInflater getLayoutInflater(); method public android.app.Dialog getWindow(); method public void hide();
api/system-current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -3641,6 +3641,7 @@ package android.app { public class ActivityManager { method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap); method public boolean clearApplicationUserData(); method public void clearWatchHeapLimit(); method public void dumpPackageState(java.io.FileDescriptor, java.lang.String); method public android.util.Size getAppTaskThumbnailSize(); method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks(); Loading Loading @@ -3668,6 +3669,8 @@ package android.app { method public void moveTaskToFront(int, int); method public void moveTaskToFront(int, int, android.os.Bundle); method public deprecated void restartPackage(java.lang.String); method public void setWatchHeapLimit(long); field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT"; field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1 field public static final int LOCK_TASK_MODE_NONE = 0; // 0x0 field public static final int LOCK_TASK_MODE_PINNED = 2; // 0x2 Loading Loading @@ -5525,10 +5528,12 @@ package android.app { public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable { ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence); ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int); method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence); method public int countSynonyms(); method public int describeContents(); method public android.os.Bundle getExtras(); method public int getIndex(); method public java.lang.CharSequence getLabel(); method public java.lang.CharSequence getSynonymAt(int); method public void setExtras(android.os.Bundle); Loading Loading @@ -30346,6 +30351,7 @@ package android.service.voice { ctor public VoiceInteractionSession(android.content.Context); ctor public VoiceInteractionSession(android.content.Context, android.os.Handler); method public void finish(); method public android.content.Context getContext(); method public android.view.LayoutInflater getLayoutInflater(); method public android.app.Dialog getWindow(); method public void hide();
cmds/am/src/com/android/commands/am/Am.java +2 −2 Original line number Diff line number Diff line Loading @@ -1189,12 +1189,12 @@ public class Am extends BaseCommand { private void runSetWatchHeap() throws Exception { String proc = nextArgRequired(); String limit = nextArgRequired(); mAm.setDumpHeapDebugLimit(proc, Long.parseLong(limit)); mAm.setDumpHeapDebugLimit(proc, 0, Long.parseLong(limit), null); } private void runClearWatchHeap() throws Exception { String proc = nextArgRequired(); mAm.setDumpHeapDebugLimit(proc, -1); mAm.setDumpHeapDebugLimit(proc, 0, -1, null); } private void runBugReport() throws Exception { Loading
core/java/android/app/ActivityManager.java +41 −0 Original line number Diff line number Diff line Loading @@ -2681,6 +2681,47 @@ public class ActivityManager { } } /** * Request that the system start watching for the calling process to exceed a pss * size as given here. Once called, the system will look for any occassions where it * sees the associated process with a larger pss size and, when this happens, automatically * pull a heap dump from it and allow the user to share the data. Note that this request * continues running even if the process is killed and restarted. To remove the watch, * use {@link #clearWatchHeapLimit()}. * * <p>This API only work if running on a debuggable (userdebug or eng) build.</p> * * <p>Callers can optionally implement {@link #ACTION_REPORT_HEAP_LIMIT} to directly * handle heap limit reports themselves.</p> * * @param pssSize The size in bytes to set the limit at. */ public void setWatchHeapLimit(long pssSize) { try { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, pssSize, mContext.getPackageName()); } catch (RemoteException e) { } } /** * Action an app can implement to handle reports from {@link #setWatchHeapLimit(long)}. * If your package has an activity handling this action, it will be launched with the * heap data provided to it the same way as {@link Intent#ACTION_SEND}. Note that to * match the activty must support this action and a MIME type of "*/*". */ public static final String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT"; /** * Clear a heap watch limit previously set by {@link #setWatchHeapLimit(long)}. */ public void clearWatchHeapLimit() { try { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, 0, null); } catch (RemoteException e) { } } /** * @hide */ Loading
core/java/android/app/ActivityManagerNative.java +7 −2 Original line number Diff line number Diff line Loading @@ -2427,8 +2427,10 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM case SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); String procName = data.readString(); int uid = data.readInt(); long maxMemSize = data.readLong(); setDumpHeapDebugLimit(procName, maxMemSize); String reportPackage = data.readString(); setDumpHeapDebugLimit(procName, uid, maxMemSize, reportPackage); reply.writeNoException(); return true; } Loading Loading @@ -5644,12 +5646,15 @@ class ActivityManagerProxy implements IActivityManager } @Override public void setDumpHeapDebugLimit(String processName, long maxMemSize) throws RemoteException { public void setDumpHeapDebugLimit(String processName, int uid, long maxMemSize, String reportPackage) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(processName); data.writeInt(uid); data.writeLong(maxMemSize); data.writeString(reportPackage); mRemote.transact(SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); Loading