summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt48
-rw-r--r--api/system-current.txt50
-rw-r--r--core/java/android/app/Instrumentation.java6
-rw-r--r--core/java/android/os/Debug.java68
4 files changed, 122 insertions, 50 deletions
diff --git a/api/current.txt b/api/current.txt
index 707999b..b5d0c39 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -4459,10 +4459,10 @@ package android.app {
method public void setInTouchMode(boolean);
method public void start();
method public android.app.Activity startActivitySync(android.content.Intent);
- method public void startAllocCounting();
+ method public deprecated void startAllocCounting();
method public void startPerformanceSnapshot();
method public void startProfiling();
- method public void stopAllocCounting();
+ method public deprecated void stopAllocCounting();
method public void stopProfiling();
method public void waitForIdle(java.lang.Runnable);
method public void waitForIdleSync();
@@ -22025,47 +22025,47 @@ package android.os {
method public static final int getBinderProxyObjectCount();
method public static int getBinderReceivedTransactions();
method public static int getBinderSentTransactions();
- method public static int getGlobalAllocCount();
- method public static int getGlobalAllocSize();
- method public static int getGlobalClassInitCount();
- method public static int getGlobalClassInitTime();
+ method public static deprecated int getGlobalAllocCount();
+ method public static deprecated int getGlobalAllocSize();
+ method public static deprecated int getGlobalClassInitCount();
+ method public static deprecated int getGlobalClassInitTime();
method public static deprecated int getGlobalExternalAllocCount();
method public static deprecated int getGlobalExternalAllocSize();
method public static deprecated int getGlobalExternalFreedCount();
method public static deprecated int getGlobalExternalFreedSize();
- method public static int getGlobalFreedCount();
- method public static int getGlobalFreedSize();
- method public static int getGlobalGcInvocationCount();
+ method public static deprecated int getGlobalFreedCount();
+ method public static deprecated int getGlobalFreedSize();
+ method public static deprecated int getGlobalGcInvocationCount();
method public static int getLoadedClassCount();
method public static void getMemoryInfo(android.os.Debug.MemoryInfo);
method public static long getNativeHeapAllocatedSize();
method public static long getNativeHeapFreeSize();
method public static long getNativeHeapSize();
method public static long getPss();
- method public static int getThreadAllocCount();
- method public static int getThreadAllocSize();
+ method public static deprecated int getThreadAllocCount();
+ method public static deprecated int getThreadAllocSize();
method public static deprecated int getThreadExternalAllocCount();
method public static deprecated int getThreadExternalAllocSize();
- method public static int getThreadGcInvocationCount();
+ method public static deprecated int getThreadGcInvocationCount();
method public static boolean isDebuggerConnected();
method public static void printLoadedClasses(int);
- method public static void resetAllCounts();
- method public static void resetGlobalAllocCount();
- method public static void resetGlobalAllocSize();
- method public static void resetGlobalClassInitCount();
- method public static void resetGlobalClassInitTime();
+ method public static deprecated void resetAllCounts();
+ method public static deprecated void resetGlobalAllocCount();
+ method public static deprecated void resetGlobalAllocSize();
+ method public static deprecated void resetGlobalClassInitCount();
+ method public static deprecated void resetGlobalClassInitTime();
method public static deprecated void resetGlobalExternalAllocCount();
method public static deprecated void resetGlobalExternalAllocSize();
method public static deprecated void resetGlobalExternalFreedCount();
method public static deprecated void resetGlobalExternalFreedSize();
- method public static void resetGlobalFreedCount();
- method public static void resetGlobalFreedSize();
- method public static void resetGlobalGcInvocationCount();
- method public static void resetThreadAllocCount();
- method public static void resetThreadAllocSize();
+ method public static deprecated void resetGlobalFreedCount();
+ method public static deprecated void resetGlobalFreedSize();
+ method public static deprecated void resetGlobalGcInvocationCount();
+ method public static deprecated void resetThreadAllocCount();
+ method public static deprecated void resetThreadAllocSize();
method public static deprecated void resetThreadExternalAllocCount();
method public static deprecated void resetThreadExternalAllocSize();
- method public static void resetThreadGcInvocationCount();
+ method public static deprecated void resetThreadGcInvocationCount();
method public static deprecated int setAllocationLimit(int);
method public static deprecated int setGlobalAllocationLimit(int);
method public static deprecated void startAllocCounting();
@@ -22084,7 +22084,7 @@ package android.os {
field public static final int SHOW_CLASSLOADER = 2; // 0x2
field public static final int SHOW_FULL_DETAIL = 1; // 0x1
field public static final int SHOW_INITIALIZED = 4; // 0x4
- field public static final int TRACE_COUNT_ALLOCS = 1; // 0x1
+ field public static final deprecated int TRACE_COUNT_ALLOCS = 1; // 0x1
}
public static deprecated class Debug.InstructionCount {
diff --git a/api/system-current.txt b/api/system-current.txt
index 2ffc4e1..1a8082f 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -4549,10 +4549,10 @@ package android.app {
method public void setInTouchMode(boolean);
method public void start();
method public android.app.Activity startActivitySync(android.content.Intent);
- method public void startAllocCounting();
+ method public deprecated void startAllocCounting();
method public void startPerformanceSnapshot();
method public void startProfiling();
- method public void stopAllocCounting();
+ method public deprecated void stopAllocCounting();
method public void stopProfiling();
method public void waitForIdle(java.lang.Runnable);
method public void waitForIdleSync();
@@ -23614,47 +23614,47 @@ package android.os {
method public static final int getBinderProxyObjectCount();
method public static int getBinderReceivedTransactions();
method public static int getBinderSentTransactions();
- method public static int getGlobalAllocCount();
- method public static int getGlobalAllocSize();
- method public static int getGlobalClassInitCount();
- method public static int getGlobalClassInitTime();
+ method public static deprecated int getGlobalAllocCount();
+ method public static deprecated int getGlobalAllocSize();
+ method public static deprecated int getGlobalClassInitCount();
+ method public static deprecated int getGlobalClassInitTime();
method public static deprecated int getGlobalExternalAllocCount();
method public static deprecated int getGlobalExternalAllocSize();
method public static deprecated int getGlobalExternalFreedCount();
method public static deprecated int getGlobalExternalFreedSize();
- method public static int getGlobalFreedCount();
- method public static int getGlobalFreedSize();
- method public static int getGlobalGcInvocationCount();
+ method public static deprecated int getGlobalFreedCount();
+ method public static deprecated int getGlobalFreedSize();
+ method public static deprecated int getGlobalGcInvocationCount();
method public static int getLoadedClassCount();
method public static void getMemoryInfo(android.os.Debug.MemoryInfo);
method public static long getNativeHeapAllocatedSize();
method public static long getNativeHeapFreeSize();
method public static long getNativeHeapSize();
method public static long getPss();
- method public static int getThreadAllocCount();
- method public static int getThreadAllocSize();
+ method public static deprecated int getThreadAllocCount();
+ method public static deprecated int getThreadAllocSize();
method public static deprecated int getThreadExternalAllocCount();
method public static deprecated int getThreadExternalAllocSize();
- method public static int getThreadGcInvocationCount();
+ method public static deprecated int getThreadGcInvocationCount();
method public static boolean isDebuggerConnected();
method public static void printLoadedClasses(int);
- method public static void resetAllCounts();
- method public static void resetGlobalAllocCount();
- method public static void resetGlobalAllocSize();
- method public static void resetGlobalClassInitCount();
- method public static void resetGlobalClassInitTime();
+ method public static deprecated void resetAllCounts();
+ method public static deprecated void resetGlobalAllocCount();
+ method public static deprecated void resetGlobalAllocSize();
+ method public static deprecated void resetGlobalClassInitCount();
+ method public static deprecated void resetGlobalClassInitTime();
method public static deprecated void resetGlobalExternalAllocCount();
method public static deprecated void resetGlobalExternalAllocSize();
method public static deprecated void resetGlobalExternalFreedCount();
method public static deprecated void resetGlobalExternalFreedSize();
- method public static void resetGlobalFreedCount();
- method public static void resetGlobalFreedSize();
- method public static void resetGlobalGcInvocationCount();
- method public static void resetThreadAllocCount();
- method public static void resetThreadAllocSize();
+ method public static deprecated void resetGlobalFreedCount();
+ method public static deprecated void resetGlobalFreedSize();
+ method public static deprecated void resetGlobalGcInvocationCount();
+ method public static deprecated void resetThreadAllocCount();
+ method public static deprecated void resetThreadAllocSize();
method public static deprecated void resetThreadExternalAllocCount();
method public static deprecated void resetThreadExternalAllocSize();
- method public static void resetThreadGcInvocationCount();
+ method public static deprecated void resetThreadGcInvocationCount();
method public static deprecated int setAllocationLimit(int);
method public static deprecated int setGlobalAllocationLimit(int);
method public static deprecated void startAllocCounting();
@@ -23673,7 +23673,7 @@ package android.os {
field public static final int SHOW_CLASSLOADER = 2; // 0x2
field public static final int SHOW_FULL_DETAIL = 1; // 0x1
field public static final int SHOW_INITIALIZED = 4; // 0x4
- field public static final int TRACE_COUNT_ALLOCS = 1; // 0x1
+ field public static final deprecated int TRACE_COUNT_ALLOCS = 1; // 0x1
}
public static deprecated class Debug.InstructionCount {
@@ -30894,8 +30894,8 @@ package android.telecom {
method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
- field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
field public static final java.lang.String ACTION_PHONE_ACCOUNT_REGISTERED = "android.telecom.action.PHONE_ACCOUNT_REGISTERED";
+ field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
field public static final java.lang.String ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS = "android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS";
field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index ad2b61f..5572d30 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1322,7 +1322,10 @@ public class Instrumentation {
/*
* Starts allocation counting. This triggers a gc and resets the counts.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public void startAllocCounting() {
// Before we start trigger a GC and reset the debug counts. Run the
// finalizers and another GC before starting and stopping the alloc
@@ -1340,7 +1343,10 @@ public class Instrumentation {
/*
* Stops allocation counting.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public void stopAllocCounting() {
Runtime.getRuntime().gc();
Runtime.getRuntime().runFinalization();
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index d03365b..512e212 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -63,7 +63,10 @@ public final class Debug
*
* TRACE_COUNT_ALLOCS adds the results from startAllocCounting to the
* trace key file.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static final int TRACE_COUNT_ALLOCS = VMDebug.TRACE_COUNT_ALLOCS;
/**
@@ -760,7 +763,7 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Stop counting the number and aggregate size of memory allocations.
*
- * @see #startAllocCounting()
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
@Deprecated
public static void stopAllocCounting() {
@@ -770,7 +773,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the global count of objects allocated by the runtime between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalAllocCount() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_ALLOCATED_OBJECTS);
}
@@ -778,7 +784,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the global count of objects allocated.
* @see #getGlobalAllocCount()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalAllocCount() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_ALLOCATED_OBJECTS);
}
@@ -786,7 +795,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the global size, in bytes, of objects allocated by the runtime between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalAllocSize() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_ALLOCATED_BYTES);
}
@@ -794,7 +806,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the global size of objects allocated.
* @see #getGlobalAllocSize()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalAllocSize() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_ALLOCATED_BYTES);
}
@@ -802,7 +817,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the global count of objects freed by the runtime between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalFreedCount() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_FREED_OBJECTS);
}
@@ -810,7 +828,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the global count of objects freed.
* @see #getGlobalFreedCount()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalFreedCount() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_FREED_OBJECTS);
}
@@ -818,7 +839,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the global size, in bytes, of objects freed by the runtime between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalFreedSize() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_FREED_BYTES);
}
@@ -826,7 +850,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the global size of objects freed.
* @see #getGlobalFreedSize()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalFreedSize() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_FREED_BYTES);
}
@@ -834,7 +861,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the number of non-concurrent GC invocations between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalGcInvocationCount() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_GC_INVOCATIONS);
}
@@ -842,7 +872,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the count of non-concurrent GC invocations.
* @see #getGlobalGcInvocationCount()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalGcInvocationCount() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_GC_INVOCATIONS);
}
@@ -851,7 +884,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
* Returns the number of classes successfully initialized (ie those that executed without
* throwing an exception) between a {@link #startAllocCounting() start} and
* {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalClassInitCount() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_COUNT);
}
@@ -859,7 +895,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the count of classes initialized.
* @see #getGlobalClassInitCount()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalClassInitCount() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_COUNT);
}
@@ -867,7 +906,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the time spent successfully initializing classes between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getGlobalClassInitTime() {
/* cumulative elapsed time for class initialization, in usec */
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_TIME);
@@ -876,7 +918,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the count of time spent initializing classes.
* @see #getGlobalClassInitTime()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetGlobalClassInitTime() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_TIME);
}
@@ -948,7 +993,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the thread-local count of objects allocated by the runtime between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getThreadAllocCount() {
return VMDebug.getAllocCount(VMDebug.KIND_THREAD_ALLOCATED_OBJECTS);
}
@@ -956,7 +1004,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the thread-local count of objects allocated.
* @see #getThreadAllocCount()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetThreadAllocCount() {
VMDebug.resetAllocCount(VMDebug.KIND_THREAD_ALLOCATED_OBJECTS);
}
@@ -965,7 +1016,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
* Returns the thread-local size of objects allocated by the runtime between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
* @return The allocated size in bytes.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getThreadAllocSize() {
return VMDebug.getAllocCount(VMDebug.KIND_THREAD_ALLOCATED_BYTES);
}
@@ -973,7 +1027,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the thread-local count of objects allocated.
* @see #getThreadAllocSize()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetThreadAllocSize() {
VMDebug.resetAllocCount(VMDebug.KIND_THREAD_ALLOCATED_BYTES);
}
@@ -1013,7 +1070,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Returns the number of thread-local non-concurrent GC invocations between a
* {@link #startAllocCounting() start} and {@link #stopAllocCounting() stop}.
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static int getThreadGcInvocationCount() {
return VMDebug.getAllocCount(VMDebug.KIND_THREAD_GC_INVOCATIONS);
}
@@ -1021,7 +1081,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears the thread-local count of non-concurrent GC invocations.
* @see #getThreadGcInvocationCount()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetThreadGcInvocationCount() {
VMDebug.resetAllocCount(VMDebug.KIND_THREAD_GC_INVOCATIONS);
}
@@ -1029,7 +1092,10 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
/**
* Clears all the global and thread-local memory allocation counters.
* @see #startAllocCounting()
+ *
+ * @deprecated Accurate counting is a burden on the runtime and may be removed.
*/
+ @Deprecated
public static void resetAllCounts() {
VMDebug.resetAllocCount(VMDebug.KIND_ALL_COUNTS);
}