merge from open-source master

Change-Id: I1901177e8a4bd32a707020c581f25f21349ba571
This commit is contained in:
The Android Open Source Project
2010-07-20 10:33:38 -07:00
3 changed files with 14 additions and 10 deletions

View File

@@ -94,7 +94,8 @@ public final class Debug
/** /**
* Default trace file path and file * Default trace file path and file
*/ */
private static final String DEFAULT_TRACE_PATH_PREFIX = "/sdcard/"; private static final String DEFAULT_TRACE_PATH_PREFIX =
Environment.getExternalStorageDirectory().getPath() + "/";
private static final String DEFAULT_TRACE_BODY = "dmtrace"; private static final String DEFAULT_TRACE_BODY = "dmtrace";
private static final String DEFAULT_TRACE_EXTENSION = ".trace"; private static final String DEFAULT_TRACE_EXTENSION = ".trace";
private static final String DEFAULT_TRACE_FILE_PATH = private static final String DEFAULT_TRACE_FILE_PATH =
@@ -127,7 +128,7 @@ public final class Debug
public int otherPrivateDirty; public int otherPrivateDirty;
/** The shared dirty pages used by everything else. */ /** The shared dirty pages used by everything else. */
public int otherSharedDirty; public int otherSharedDirty;
public MemoryInfo() { public MemoryInfo() {
} }
@@ -137,21 +138,21 @@ public final class Debug
public int getTotalPss() { public int getTotalPss() {
return dalvikPss + nativePss + otherPss; return dalvikPss + nativePss + otherPss;
} }
/** /**
* Return total private dirty memory usage in kB. * Return total private dirty memory usage in kB.
*/ */
public int getTotalPrivateDirty() { public int getTotalPrivateDirty() {
return dalvikPrivateDirty + nativePrivateDirty + otherPrivateDirty; return dalvikPrivateDirty + nativePrivateDirty + otherPrivateDirty;
} }
/** /**
* Return total shared dirty memory usage in kB. * Return total shared dirty memory usage in kB.
*/ */
public int getTotalSharedDirty() { public int getTotalSharedDirty() {
return dalvikSharedDirty + nativeSharedDirty + otherSharedDirty; return dalvikSharedDirty + nativeSharedDirty + otherSharedDirty;
} }
public int describeContents() { public int describeContents() {
return 0; return 0;
} }
@@ -179,7 +180,7 @@ public final class Debug
otherPrivateDirty = source.readInt(); otherPrivateDirty = source.readInt();
otherSharedDirty = source.readInt(); otherSharedDirty = source.readInt();
} }
public static final Creator<MemoryInfo> CREATOR = new Creator<MemoryInfo>() { public static final Creator<MemoryInfo> CREATOR = new Creator<MemoryInfo>() {
public MemoryInfo createFromParcel(Parcel source) { public MemoryInfo createFromParcel(Parcel source) {
return new MemoryInfo(source); return new MemoryInfo(source);
@@ -460,7 +461,7 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
* Like startMethodTracing(String, int, int), but taking an already-opened * Like startMethodTracing(String, int, int), but taking an already-opened
* FileDescriptor in which the trace is written. The file name is also * FileDescriptor in which the trace is written. The file name is also
* supplied simply for logging. Makes a dup of the file descriptor. * supplied simply for logging. Makes a dup of the file descriptor.
* *
* Not exposed in the SDK unless we are really comfortable with supporting * Not exposed in the SDK unless we are really comfortable with supporting
* this and find it would be useful. * this and find it would be useful.
* @hide * @hide
@@ -1070,7 +1071,7 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
* static { * static {
* // Sets all the fields * // Sets all the fields
* Debug.setFieldsOn(MyDebugVars.class); * Debug.setFieldsOn(MyDebugVars.class);
* *
* // Sets only the fields annotated with @Debug.DebugProperty * // Sets only the fields annotated with @Debug.DebugProperty
* // Debug.setFieldsOn(MyDebugVars.class, true); * // Debug.setFieldsOn(MyDebugVars.class, true);
* } * }

View File

@@ -25,6 +25,7 @@ import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.database.sqlite.SqliteWrapper; import android.database.sqlite.SqliteWrapper;
import android.net.Uri; import android.net.Uri;
import android.os.Environment;
import android.telephony.SmsMessage; import android.telephony.SmsMessage;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Config; import android.util.Config;
@@ -1526,7 +1527,8 @@ public final class Telephony {
* which streams the captured image to the uri. Internally we write the media content * which streams the captured image to the uri. Internally we write the media content
* to this file. It's named '.temp.jpg' so Gallery won't pick it up. * to this file. It's named '.temp.jpg' so Gallery won't pick it up.
*/ */
public static final String SCRAP_FILE_PATH = "/sdcard/mms/scrapSpace/.temp.jpg"; public static final String SCRAP_FILE_PATH =
Environment.getExternalStorageDirectory().getPath() + "/mms/scrapSpace/.temp.jpg";
} }
public static final class Intents { public static final class Intents {

View File

@@ -85,7 +85,8 @@ public class SamplingProfilerIntegration {
pending = true; pending = true;
snapshotWriter.execute(new Runnable() { snapshotWriter.execute(new Runnable() {
public void run() { public void run() {
String dir = "/sdcard/snapshots"; String dir =
Environment.getExternalStorageDirectory().getPath() + "/snapshots";
if (!dirMade) { if (!dirMade) {
new File(dir).mkdirs(); new File(dir).mkdirs();
if (new File(dir).isDirectory()) { if (new File(dir).isDirectory()) {