Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit feecf9d7 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Support for changing traces from development settings." into jb-dev

parents 8c680128 83e6eb11
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -39,6 +39,14 @@ public final class Trace {
    public static final long TRACE_TAG_SYNC_MANAGER = 1L << 7;
    public static final long TRACE_TAG_AUDIO = 1L << 8;

    public static final int TRACE_FLAGS_START_BIT = 1;
    public static final String[] TRACE_TAGS = {
        "Graphics", "Input", "View", "WebView", "Window Manager",
        "Activity Manager", "Sync Manager", "Audio"
    };

    public static final String PROPERTY_TRACE_TAG_ENABLEFLAGS = "debug.atrace.tags.enableflags";

    private static final long sEnabledTags = nativeGetEnabledTags();

    private static native long nativeGetEnabledTags();
+15 −1
Original line number Diff line number Diff line
@@ -136,10 +136,24 @@ public class MultiCheckPreference extends DialogPreference {
     * 
     * @return The array of values.
     */
    public CharSequence[] getEntryValues() {
    public String[] getEntryValues() {
        return mEntryValues;
    }

    /**
     * Get the boolean state of a given value.
     */
    public boolean getValue(int index) {
        return mSetValues[index];
    }

    /**
     * Set the boolean state of a given value.
     */
    public void setValue(int index, boolean state) {
        mSetValues[index] = state;
    }

    /**
     * Sets the current values.
     */
+10 −6
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ static jint SystemProperties_get_int(JNIEnv *env, jobject clazz,
    int len;
    const char* key;
    char buf[PROPERTY_VALUE_MAX];
    char* end;
    jint result = defJ;

    if (keyJ == NULL) {
@@ -76,9 +77,10 @@ static jint SystemProperties_get_int(JNIEnv *env, jobject clazz,

    len = property_get(key, buf, "");
    if (len > 0) {
        jint temp;
        if (sscanf(buf, "%d", &temp) == 1)
            result = temp;
        result = strtol(buf, &end, 0);
        if (end == buf) {
            result = defJ;
        }
    }

    env->ReleaseStringUTFChars(keyJ, key);
@@ -93,6 +95,7 @@ static jlong SystemProperties_get_long(JNIEnv *env, jobject clazz,
    int len;
    const char* key;
    char buf[PROPERTY_VALUE_MAX];
    char* end;
    jlong result = defJ;

    if (keyJ == NULL) {
@@ -104,9 +107,10 @@ static jlong SystemProperties_get_long(JNIEnv *env, jobject clazz,

    len = property_get(key, buf, "");
    if (len > 0) {
        jlong temp;
        if (sscanf(buf, "%lld", &temp) == 1)
            result = temp;
        result = strtoll(buf, &end, 0);
        if (end == buf) {
            result = defJ;
        }
    }

    env->ReleaseStringUTFChars(keyJ, key);