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

Commit 3001a035 authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

auto import from //branches/cupcake/...@132276

parent da996f39
Loading
Loading
Loading
Loading
+607 −717

File changed.

Preview size limit exceeded, changes collapsed.

+13 −13
Original line number Diff line number Diff line
@@ -40,6 +40,18 @@ static void dumpstate(int full) {
        PRINT("========================================================");
        PRINT("== dumpstate");
        PRINT("========================================================");
        PRINT("------ MEMORY INFO ------");
        DUMP("/proc/meminfo");
        PRINT("------ CPU INFO ------");
        EXEC7("top", "-n", "1", "-d", "1", "-m", "30", "-t");
        PRINT("------ PROCRANK ------");
        EXEC_XBIN("procrank");
        PRINT("------ VIRTUAL MEMORY STATS ------");
        DUMP("/proc/vmstat");
        PRINT("------ SLAB INFO ------");
        DUMP("/proc/slabinfo");
        PRINT("------ ZONEINFO ------");
        DUMP("/proc/zoneinfo");
        PRINT("------ SYSTEM LOG ------");
        EXEC4("logcat", "-v", "time", "-d", "*:v");
        PRINT("------ VM TRACES ------");
@@ -67,20 +79,8 @@ static void dumpstate(int full) {
        EXEC("ps");
        PRINT("------ PROCESSES AND THREADS ------");
        EXEC2("ps", "-t", "-p");
        PRINT("------ MEMORY INFO ------");
        DUMP("/proc/meminfo");
        PRINT("------ PSS INFO ------");
        EXEC8("top", "-n", "1", "-d", "0", "-m", "15", "-s", "pss");
        PRINT("------ PROCRANK ------");
        EXEC("procrank");
        PRINT("------ LIBRANK ------");
        EXEC("librank");
        PRINT("------ VIRTUAL MEMORY STATS ------");
        DUMP("/proc/vmstat");
        PRINT("------ SLAB INFO ------");
        DUMP("/proc/slabinfo");
        PRINT("------ ZONEINFO ------");
        DUMP("/proc/zoneinfo");
        EXEC_XBIN("librank");
        PRINT("------ BINDER FAILED TRANSACTION LOG ------");
        DUMP("/proc/binder/failed_transaction_log");
        PRINT("");
+18 −0
Original line number Diff line number Diff line
@@ -43,6 +43,15 @@
    run_command(&c, TIMEOUT);   \
}

#define EXEC_XBIN(cmd)          \
{                               \
    static struct Command c = { \
        "/system/xbin/" cmd,    \
        { cmd, 0 }              \
    };                          \
    run_command(&c, TIMEOUT);   \
}

#define EXEC2(cmd, a1, a2)      \
{                               \
    static struct Command c = { \
@@ -70,6 +79,15 @@
    run_command(&c, TIMEOUT);               \
}

#define EXEC7(cmd, a1, a2, a3, a4, a5, a6, a7)  \
{                                               \
    static struct Command c = {                 \
        "/system/bin/" cmd,                     \
        { cmd, a1, a2, a3, a4, a5, a6, a7, 0 }  \
    };                                          \
    run_command(&c, TIMEOUT);                   \
}

#define EXEC8(cmd, a1, a2, a3, a4, a5, a6, a7, a8)  \
{                                                   \
    static struct Command c = {                     \
+8 −5
Original line number Diff line number Diff line
@@ -426,13 +426,9 @@ public final class PendingIntent implements Parcelable {
     */
    @Override
    public boolean equals(Object otherObj) {
        if (otherObj == null) {
            return false;
        }
        try {
        if (otherObj instanceof PendingIntent) {
            return mTarget.asBinder().equals(((PendingIntent)otherObj)
                    .mTarget.asBinder());
        } catch (ClassCastException e) {
        }
        return false;
    }
@@ -442,6 +438,13 @@ public final class PendingIntent implements Parcelable {
        return mTarget.asBinder().hashCode();
    }

    @Override
    public String toString() {
        return "PendingIntent{"
                + Integer.toHexString(System.identityHashCode(this))
                + " target " + (mTarget != null ? mTarget.asBinder() : null) + "}";
    }
    
    public int describeContents() {
        return 0;
    }
+3 −6
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@ import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
@@ -64,7 +62,6 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemSelectedListener;

import java.lang.ref.WeakReference;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;

/**
@@ -538,9 +535,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
                testIntent = mVoiceAppSearchIntent;
            }      
            if (testIntent != null) {
                List<ResolveInfo> list = getContext().getPackageManager().
                        queryIntentActivities(testIntent, PackageManager.MATCH_DEFAULT_ONLY);
                if (list.size() > 0) {
                ResolveInfo ri = getContext().getPackageManager().
                        resolveActivity(testIntent, PackageManager.MATCH_DEFAULT_ONLY);
                if (ri != null) {
                    visibility = View.VISIBLE;
                }
            }
Loading