Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -17299,6 +17299,17 @@ visibility="public" > </method> <method name="getMemoryClass" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getMemoryInfo" return="void" abstract="false" cmds/dumpstate/dumpstate.c +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ static void dumpstate(int full) { EXEC_XBIN("procrank"); PRINT("------ VIRTUAL MEMORY STATS ------"); DUMP("/proc/vmstat"); PRINT("------ VMALLOC INFO ------"); DUMP("/proc/vmallocinfo"); PRINT("------ SLAB INFO ------"); DUMP("/proc/slabinfo"); PRINT("------ ZONEINFO ------"); Loading core/java/android/app/ActivityManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.RemoteException; import android.os.Handler; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.text.TextUtils; import java.util.List; Loading @@ -46,6 +47,26 @@ public class ActivityManager { mHandler = handler; } /** * Return the approximate per-application memory class of the current * device. This gives you an idea of how hard a memory limit you should * impose on your application to let the overall system work best. The * returned value is in megabytes; the baseline Android memory class is * 16 (which happens to be the Java heap limit of those devices); some * device with more memory may return 24 or even higher numbers. */ public int getMemoryClass() { return staticGetMemoryClass(); } /** @hide */ static public int staticGetMemoryClass() { // Really brain dead right now -- just take this from the configured // vm heap size, and assume it is in megabytes and thus ends with "m". String vmHeapSize = SystemProperties.get("dalvik.vm.heapsize", "16m"); return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1)); } /** * Information you can retrieve about tasks that the user has most recently * started or visited. Loading core/java/android/bluetooth/BluetoothAdapter.java +3 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import java.util.UUID; */ public final class BluetoothAdapter { private static final String TAG = "BluetoothAdapter"; private static final boolean DBG = true; //STOPSHIP: Remove excess logging private static final boolean DBG = false; /** * Sentinel error value for this class. Guaranteed to not equal any other Loading Loading @@ -569,6 +569,7 @@ public final class BluetoothAdapter { * <p>Applications can also register for {@link #ACTION_DISCOVERY_STARTED} * or {@link #ACTION_DISCOVERY_FINISHED} to be notified when discovery * starts or completes. * <p>Requires {@link android.Manifest.permission#BLUETOOTH}. * * @return true if discovering */ Loading @@ -582,6 +583,7 @@ public final class BluetoothAdapter { /** * Return the set of {@link BluetoothDevice} objects that are bonded * (paired) to the local adapter. * <p>Requires {@link android.Manifest.permission#BLUETOOTH}. * * @return unmodifiable set of {@link BluetoothDevice}, or null on error */ Loading core/java/android/bluetooth/BluetoothDevice.java +6 −0 Original line number Diff line number Diff line Loading @@ -513,6 +513,7 @@ public final class BluetoothDevice implements Parcelable { /** * Get trust state of a remote device. * <p>Requires {@link android.Manifest.permission#BLUETOOTH}. * @hide */ public boolean getTrustState() { Loading @@ -526,6 +527,7 @@ public final class BluetoothDevice implements Parcelable { /** * Set trust state for a remote device. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. * @param value the trust state value (true or false) * @hide */ Loading Loading @@ -657,6 +659,8 @@ public final class BluetoothDevice implements Parcelable { * Call #connect on the returned #BluetoothSocket to begin the connection. * The remote device will not be authenticated and communication on this * socket will not be encrypted. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} * * @param port remote port * @return An RFCOMM BluetoothSocket * @throws IOException On error, for example Bluetooth not available, or Loading @@ -671,6 +675,8 @@ public final class BluetoothDevice implements Parcelable { /** * Construct a SCO socket ready to start an outgoing connection. * Call #connect on the returned #BluetoothSocket to begin the connection. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} * * @return a SCO BluetoothSocket * @throws IOException on error, for example Bluetooth not available, or * insufficient permissions. Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -17299,6 +17299,17 @@ visibility="public" > </method> <method name="getMemoryClass" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getMemoryInfo" return="void" abstract="false"
cmds/dumpstate/dumpstate.c +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ static void dumpstate(int full) { EXEC_XBIN("procrank"); PRINT("------ VIRTUAL MEMORY STATS ------"); DUMP("/proc/vmstat"); PRINT("------ VMALLOC INFO ------"); DUMP("/proc/vmallocinfo"); PRINT("------ SLAB INFO ------"); DUMP("/proc/slabinfo"); PRINT("------ ZONEINFO ------"); Loading
core/java/android/app/ActivityManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.RemoteException; import android.os.Handler; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.text.TextUtils; import java.util.List; Loading @@ -46,6 +47,26 @@ public class ActivityManager { mHandler = handler; } /** * Return the approximate per-application memory class of the current * device. This gives you an idea of how hard a memory limit you should * impose on your application to let the overall system work best. The * returned value is in megabytes; the baseline Android memory class is * 16 (which happens to be the Java heap limit of those devices); some * device with more memory may return 24 or even higher numbers. */ public int getMemoryClass() { return staticGetMemoryClass(); } /** @hide */ static public int staticGetMemoryClass() { // Really brain dead right now -- just take this from the configured // vm heap size, and assume it is in megabytes and thus ends with "m". String vmHeapSize = SystemProperties.get("dalvik.vm.heapsize", "16m"); return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1)); } /** * Information you can retrieve about tasks that the user has most recently * started or visited. Loading
core/java/android/bluetooth/BluetoothAdapter.java +3 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import java.util.UUID; */ public final class BluetoothAdapter { private static final String TAG = "BluetoothAdapter"; private static final boolean DBG = true; //STOPSHIP: Remove excess logging private static final boolean DBG = false; /** * Sentinel error value for this class. Guaranteed to not equal any other Loading Loading @@ -569,6 +569,7 @@ public final class BluetoothAdapter { * <p>Applications can also register for {@link #ACTION_DISCOVERY_STARTED} * or {@link #ACTION_DISCOVERY_FINISHED} to be notified when discovery * starts or completes. * <p>Requires {@link android.Manifest.permission#BLUETOOTH}. * * @return true if discovering */ Loading @@ -582,6 +583,7 @@ public final class BluetoothAdapter { /** * Return the set of {@link BluetoothDevice} objects that are bonded * (paired) to the local adapter. * <p>Requires {@link android.Manifest.permission#BLUETOOTH}. * * @return unmodifiable set of {@link BluetoothDevice}, or null on error */ Loading
core/java/android/bluetooth/BluetoothDevice.java +6 −0 Original line number Diff line number Diff line Loading @@ -513,6 +513,7 @@ public final class BluetoothDevice implements Parcelable { /** * Get trust state of a remote device. * <p>Requires {@link android.Manifest.permission#BLUETOOTH}. * @hide */ public boolean getTrustState() { Loading @@ -526,6 +527,7 @@ public final class BluetoothDevice implements Parcelable { /** * Set trust state for a remote device. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. * @param value the trust state value (true or false) * @hide */ Loading Loading @@ -657,6 +659,8 @@ public final class BluetoothDevice implements Parcelable { * Call #connect on the returned #BluetoothSocket to begin the connection. * The remote device will not be authenticated and communication on this * socket will not be encrypted. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} * * @param port remote port * @return An RFCOMM BluetoothSocket * @throws IOException On error, for example Bluetooth not available, or Loading @@ -671,6 +675,8 @@ public final class BluetoothDevice implements Parcelable { /** * Construct a SCO socket ready to start an outgoing connection. * Call #connect on the returned #BluetoothSocket to begin the connection. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} * * @return a SCO BluetoothSocket * @throws IOException on error, for example Bluetooth not available, or * insufficient permissions. Loading