Search in sources :

Example 51 with PrintWriterPrinter

use of android.util.PrintWriterPrinter in project android_frameworks_base by crdroidandroid.

the class ProcessRecord method dump.

void dump(PrintWriter pw, String prefix) {
    final long now = SystemClock.uptimeMillis();
    pw.print(prefix);
    pw.print("user #");
    pw.print(userId);
    pw.print(" uid=");
    pw.print(info.uid);
    if (uid != info.uid) {
        pw.print(" ISOLATED uid=");
        pw.print(uid);
    }
    pw.print(" gids={");
    if (gids != null) {
        for (int gi = 0; gi < gids.length; gi++) {
            if (gi != 0)
                pw.print(", ");
            pw.print(gids[gi]);
        }
    }
    pw.println("}");
    pw.print(prefix);
    pw.print("requiredAbi=");
    pw.print(requiredAbi);
    pw.print(" instructionSet=");
    pw.println(instructionSet);
    if (info.className != null) {
        pw.print(prefix);
        pw.print("class=");
        pw.println(info.className);
    }
    if (info.manageSpaceActivityName != null) {
        pw.print(prefix);
        pw.print("manageSpaceActivityName=");
        pw.println(info.manageSpaceActivityName);
    }
    pw.print(prefix);
    pw.print("dir=");
    pw.print(info.sourceDir);
    pw.print(" publicDir=");
    pw.print(info.publicSourceDir);
    pw.print(" data=");
    pw.println(info.dataDir);
    pw.print(prefix);
    pw.print("packageList={");
    for (int i = 0; i < pkgList.size(); i++) {
        if (i > 0)
            pw.print(", ");
        pw.print(pkgList.keyAt(i));
    }
    pw.println("}");
    if (pkgDeps != null) {
        pw.print(prefix);
        pw.print("packageDependencies={");
        for (int i = 0; i < pkgDeps.size(); i++) {
            if (i > 0)
                pw.print(", ");
            pw.print(pkgDeps.valueAt(i));
        }
        pw.println("}");
    }
    pw.print(prefix);
    pw.print("compat=");
    pw.println(compat);
    if (instrumentationClass != null || instrumentationProfileFile != null || instrumentationArguments != null) {
        pw.print(prefix);
        pw.print("instrumentationClass=");
        pw.print(instrumentationClass);
        pw.print(" instrumentationProfileFile=");
        pw.println(instrumentationProfileFile);
        pw.print(prefix);
        pw.print("instrumentationArguments=");
        pw.println(instrumentationArguments);
        pw.print(prefix);
        pw.print("instrumentationInfo=");
        pw.println(instrumentationInfo);
        if (instrumentationInfo != null) {
            instrumentationInfo.dump(new PrintWriterPrinter(pw), prefix + "  ");
        }
    }
    pw.print(prefix);
    pw.print("thread=");
    pw.println(thread);
    pw.print(prefix);
    pw.print("pid=");
    pw.print(pid);
    pw.print(" starting=");
    pw.println(starting);
    pw.print(prefix);
    pw.print("lastActivityTime=");
    TimeUtils.formatDuration(lastActivityTime, now, pw);
    pw.print(" lastPssTime=");
    TimeUtils.formatDuration(lastPssTime, now, pw);
    pw.print(" nextPssTime=");
    TimeUtils.formatDuration(nextPssTime, now, pw);
    pw.println();
    pw.print(prefix);
    pw.print("adjSeq=");
    pw.print(adjSeq);
    pw.print(" lruSeq=");
    pw.print(lruSeq);
    pw.print(" lastPss=");
    DebugUtils.printSizeValue(pw, lastPss * 1024);
    pw.print(" lastSwapPss=");
    DebugUtils.printSizeValue(pw, lastSwapPss * 1024);
    pw.print(" lastCachedPss=");
    DebugUtils.printSizeValue(pw, lastCachedPss * 1024);
    pw.print(" lastCachedSwapPss=");
    DebugUtils.printSizeValue(pw, lastCachedSwapPss * 1024);
    pw.println();
    pw.print(prefix);
    pw.print("cached=");
    pw.print(cached);
    pw.print(" empty=");
    pw.println(empty);
    if (serviceb) {
        pw.print(prefix);
        pw.print("serviceb=");
        pw.print(serviceb);
        pw.print(" serviceHighRam=");
        pw.println(serviceHighRam);
    }
    if (notCachedSinceIdle) {
        pw.print(prefix);
        pw.print("notCachedSinceIdle=");
        pw.print(notCachedSinceIdle);
        pw.print(" initialIdlePss=");
        pw.println(initialIdlePss);
    }
    pw.print(prefix);
    pw.print("oom: max=");
    pw.print(maxAdj);
    pw.print(" curRaw=");
    pw.print(curRawAdj);
    pw.print(" setRaw=");
    pw.print(setRawAdj);
    pw.print(" cur=");
    pw.print(curAdj);
    pw.print(" set=");
    pw.println(setAdj);
    pw.print(prefix);
    pw.print("curSchedGroup=");
    pw.print(curSchedGroup);
    pw.print(" setSchedGroup=");
    pw.print(setSchedGroup);
    pw.print(" systemNoUi=");
    pw.print(systemNoUi);
    pw.print(" trimMemoryLevel=");
    pw.println(trimMemoryLevel);
    pw.print(prefix);
    pw.print("vrThreadTid=");
    pw.print(vrThreadTid);
    pw.print(prefix);
    pw.print("curProcState=");
    pw.print(curProcState);
    pw.print(" repProcState=");
    pw.print(repProcState);
    pw.print(" pssProcState=");
    pw.print(pssProcState);
    pw.print(" setProcState=");
    pw.print(setProcState);
    pw.print(" lastStateTime=");
    TimeUtils.formatDuration(lastStateTime, now, pw);
    pw.println();
    if (hasShownUi || pendingUiClean || hasAboveClient || treatLikeActivity) {
        pw.print(prefix);
        pw.print("hasShownUi=");
        pw.print(hasShownUi);
        pw.print(" pendingUiClean=");
        pw.print(pendingUiClean);
        pw.print(" hasAboveClient=");
        pw.print(hasAboveClient);
        pw.print(" treatLikeActivity=");
        pw.println(treatLikeActivity);
    }
    if (setIsForeground || foregroundServices || forcingToForeground != null) {
        pw.print(prefix);
        pw.print("setIsForeground=");
        pw.print(setIsForeground);
        pw.print(" foregroundServices=");
        pw.print(foregroundServices);
        pw.print(" forcingToForeground=");
        pw.println(forcingToForeground);
    }
    if (reportedInteraction || fgInteractionTime != 0) {
        pw.print(prefix);
        pw.print("reportedInteraction=");
        pw.print(reportedInteraction);
        if (interactionEventTime != 0) {
            pw.print(" time=");
            TimeUtils.formatDuration(interactionEventTime, SystemClock.elapsedRealtime(), pw);
        }
        if (fgInteractionTime != 0) {
            pw.print(" fgInteractionTime=");
            TimeUtils.formatDuration(fgInteractionTime, SystemClock.elapsedRealtime(), pw);
        }
        pw.println();
    }
    if (persistent || removed) {
        pw.print(prefix);
        pw.print("persistent=");
        pw.print(persistent);
        pw.print(" removed=");
        pw.println(removed);
    }
    if (hasClientActivities || foregroundActivities || repForegroundActivities) {
        pw.print(prefix);
        pw.print("hasClientActivities=");
        pw.print(hasClientActivities);
        pw.print(" foregroundActivities=");
        pw.print(foregroundActivities);
        pw.print(" (rep=");
        pw.print(repForegroundActivities);
        pw.println(")");
    }
    if (lastProviderTime > 0) {
        pw.print(prefix);
        pw.print("lastProviderTime=");
        TimeUtils.formatDuration(lastProviderTime, now, pw);
        pw.println();
    }
    if (hasStartedServices) {
        pw.print(prefix);
        pw.print("hasStartedServices=");
        pw.println(hasStartedServices);
    }
    if (setProcState >= ActivityManager.PROCESS_STATE_SERVICE) {
        long wtime;
        synchronized (mBatteryStats) {
            wtime = mBatteryStats.getProcessWakeTime(info.uid, pid, SystemClock.elapsedRealtime());
        }
        pw.print(prefix);
        pw.print("lastWakeTime=");
        pw.print(lastWakeTime);
        pw.print(" timeUsed=");
        TimeUtils.formatDuration(wtime - lastWakeTime, pw);
        pw.println("");
        pw.print(prefix);
        pw.print("lastCpuTime=");
        pw.print(lastCpuTime);
        pw.print(" timeUsed=");
        TimeUtils.formatDuration(curCpuTime - lastCpuTime, pw);
        pw.println("");
    }
    pw.print(prefix);
    pw.print("lastRequestedGc=");
    TimeUtils.formatDuration(lastRequestedGc, now, pw);
    pw.print(" lastLowMemory=");
    TimeUtils.formatDuration(lastLowMemory, now, pw);
    pw.print(" reportLowMemory=");
    pw.println(reportLowMemory);
    if (killed || killedByAm || waitingToKill != null) {
        pw.print(prefix);
        pw.print("killed=");
        pw.print(killed);
        pw.print(" killedByAm=");
        pw.print(killedByAm);
        pw.print(" waitingToKill=");
        pw.println(waitingToKill);
    }
    if (debugging || crashing || crashDialog != null || notResponding || anrDialog != null || bad) {
        pw.print(prefix);
        pw.print("debugging=");
        pw.print(debugging);
        pw.print(" crashing=");
        pw.print(crashing);
        pw.print(" ");
        pw.print(crashDialog);
        pw.print(" notResponding=");
        pw.print(notResponding);
        pw.print(" ");
        pw.print(anrDialog);
        pw.print(" bad=");
        pw.print(bad);
        // crashing or notResponding is always set before errorReportReceiver
        if (errorReportReceiver != null) {
            pw.print(" errorReportReceiver=");
            pw.print(errorReportReceiver.flattenToShortString());
        }
        pw.println();
    }
    if (whitelistManager) {
        pw.print(prefix);
        pw.print("whitelistManager=");
        pw.println(whitelistManager);
    }
    if (activities.size() > 0) {
        pw.print(prefix);
        pw.println("Activities:");
        for (int i = 0; i < activities.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(activities.get(i));
        }
    }
    if (services.size() > 0) {
        pw.print(prefix);
        pw.println("Services:");
        for (int i = 0; i < services.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(services.valueAt(i));
        }
    }
    if (executingServices.size() > 0) {
        pw.print(prefix);
        pw.print("Executing Services (fg=");
        pw.print(execServicesFg);
        pw.println(")");
        for (int i = 0; i < executingServices.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(executingServices.valueAt(i));
        }
    }
    if (connections.size() > 0) {
        pw.print(prefix);
        pw.println("Connections:");
        for (int i = 0; i < connections.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(connections.valueAt(i));
        }
    }
    if (pubProviders.size() > 0) {
        pw.print(prefix);
        pw.println("Published Providers:");
        for (int i = 0; i < pubProviders.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(pubProviders.keyAt(i));
            pw.print(prefix);
            pw.print("    -> ");
            pw.println(pubProviders.valueAt(i));
        }
    }
    if (conProviders.size() > 0) {
        pw.print(prefix);
        pw.println("Connected Providers:");
        for (int i = 0; i < conProviders.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(conProviders.get(i).toShortString());
        }
    }
    if (curReceivers.size() > 0) {
        pw.print(prefix);
        pw.println("Current Receivers:");
        for (int i = 0; i < curReceivers.size(); i++) {
            pw.print(prefix);
            pw.print(" -");
            pw.println(curReceivers.valueAt(i));
        }
    }
    if (receivers.size() > 0) {
        pw.print(prefix);
        pw.println("Receivers:");
        for (int i = 0; i < receivers.size(); i++) {
            pw.print(prefix);
            pw.print("  - ");
            pw.println(receivers.valueAt(i));
        }
    }
    if (hasTopUi) {
        pw.print(prefix);
        pw.print("hasTopUi=");
        pw.print(hasTopUi);
    }
}
Also used : PrintWriterPrinter(android.util.PrintWriterPrinter)

Example 52 with PrintWriterPrinter

use of android.util.PrintWriterPrinter in project android_frameworks_base by crdroidandroid.

the class ReceiverList method dump.

void dump(PrintWriter pw, String prefix) {
    Printer pr = new PrintWriterPrinter(pw);
    dumpLocal(pw, prefix);
    String p2 = prefix + "  ";
    final int N = size();
    for (int i = 0; i < N; i++) {
        BroadcastFilter bf = get(i);
        pw.print(prefix);
        pw.print("Filter #");
        pw.print(i);
        pw.print(": BroadcastFilter{");
        pw.print(Integer.toHexString(System.identityHashCode(bf)));
        pw.println('}');
        bf.dumpInReceiverList(pw, pr, p2);
    }
}
Also used : PrintWriterPrinter(android.util.PrintWriterPrinter) PrintWriterPrinter(android.util.PrintWriterPrinter) Printer(android.util.Printer)

Example 53 with PrintWriterPrinter

use of android.util.PrintWriterPrinter in project android_frameworks_base by crdroidandroid.

the class VoiceInteractionManagerServiceImpl method dumpLocked.

public void dumpLocked(FileDescriptor fd, PrintWriter pw, String[] args) {
    if (!mValid) {
        pw.print("  NOT VALID: ");
        if (mInfo == null) {
            pw.println("no info");
        } else {
            pw.println(mInfo.getParseError());
        }
        return;
    }
    pw.print("  mUser=");
    pw.println(mUser);
    pw.print("  mComponent=");
    pw.println(mComponent.flattenToShortString());
    pw.print("  Session service=");
    pw.println(mInfo.getSessionService());
    pw.println("  Service info:");
    mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw), "    ");
    pw.print("  Recognition service=");
    pw.println(mInfo.getRecognitionService());
    pw.print("  Settings activity=");
    pw.println(mInfo.getSettingsActivity());
    pw.print("  Supports assist=");
    pw.println(mInfo.getSupportsAssist());
    pw.print("  Supports launch from keyguard=");
    pw.println(mInfo.getSupportsLaunchFromKeyguard());
    if (mDisabledShowContext != 0) {
        pw.print("  mDisabledShowContext=");
        pw.println(Integer.toHexString(mDisabledShowContext));
    }
    pw.print("  mBound=");
    pw.print(mBound);
    pw.print(" mService=");
    pw.println(mService);
    if (mActiveSession != null) {
        pw.println("  Active session:");
        mActiveSession.dump("    ", pw);
    }
}
Also used : PrintWriterPrinter(android.util.PrintWriterPrinter)

Example 54 with PrintWriterPrinter

use of android.util.PrintWriterPrinter in project android_frameworks_base by crdroidandroid.

the class IntentResolver method dumpMap.

boolean dumpMap(PrintWriter out, String titlePrefix, String title, String prefix, ArrayMap<String, F[]> map, String packageName, boolean printFilter, boolean collapseDuplicates) {
    final String eprefix = prefix + "  ";
    final String fprefix = prefix + "    ";
    final ArrayMap<Object, MutableInt> found = new ArrayMap<>();
    boolean printedSomething = false;
    Printer printer = null;
    for (int mapi = 0; mapi < map.size(); mapi++) {
        F[] a = map.valueAt(mapi);
        final int N = a.length;
        boolean printedHeader = false;
        F filter;
        if (collapseDuplicates && !printFilter) {
            found.clear();
            for (int i = 0; i < N && (filter = a[i]) != null; i++) {
                if (packageName != null && !isPackageForFilter(packageName, filter)) {
                    continue;
                }
                Object label = filterToLabel(filter);
                int index = found.indexOfKey(label);
                if (index < 0) {
                    found.put(label, new MutableInt(1));
                } else {
                    found.valueAt(index).value++;
                }
            }
            for (int i = 0; i < found.size(); i++) {
                if (title != null) {
                    out.print(titlePrefix);
                    out.println(title);
                    title = null;
                }
                if (!printedHeader) {
                    out.print(eprefix);
                    out.print(map.keyAt(mapi));
                    out.println(":");
                    printedHeader = true;
                }
                printedSomething = true;
                dumpFilterLabel(out, fprefix, found.keyAt(i), found.valueAt(i).value);
            }
        } else {
            for (int i = 0; i < N && (filter = a[i]) != null; i++) {
                if (packageName != null && !isPackageForFilter(packageName, filter)) {
                    continue;
                }
                if (title != null) {
                    out.print(titlePrefix);
                    out.println(title);
                    title = null;
                }
                if (!printedHeader) {
                    out.print(eprefix);
                    out.print(map.keyAt(mapi));
                    out.println(":");
                    printedHeader = true;
                }
                printedSomething = true;
                dumpFilter(out, fprefix, filter);
                if (printFilter) {
                    if (printer == null) {
                        printer = new PrintWriterPrinter(out);
                    }
                    filter.dump(printer, fprefix + "  ");
                }
            }
        }
    }
    return printedSomething;
}
Also used : PrintWriterPrinter(android.util.PrintWriterPrinter) MutableInt(android.util.MutableInt) ArrayMap(android.util.ArrayMap) PrintWriterPrinter(android.util.PrintWriterPrinter) LogPrinter(android.util.LogPrinter) Printer(android.util.Printer)

Example 55 with PrintWriterPrinter

use of android.util.PrintWriterPrinter in project android_frameworks_base by crdroidandroid.

the class PowerManagerService method dumpInternal.

private void dumpInternal(PrintWriter pw) {
    pw.println("POWER MANAGER (dumpsys power)\n");
    final WirelessChargerDetector wcd;
    synchronized (mLock) {
        pw.println("Power Manager State:");
        pw.println("  mDirty=0x" + Integer.toHexString(mDirty));
        pw.println("  mWakefulness=" + PowerManagerInternal.wakefulnessToString(mWakefulness));
        pw.println("  mWakefulnessChanging=" + mWakefulnessChanging);
        pw.println("  mIsPowered=" + mIsPowered);
        pw.println("  mPlugType=" + mPlugType);
        pw.println("  mBatteryLevel=" + mBatteryLevel);
        pw.println("  mBatteryLevelWhenDreamStarted=" + mBatteryLevelWhenDreamStarted);
        pw.println("  mDockState=" + mDockState);
        pw.println("  mStayOn=" + mStayOn);
        pw.println("  mProximityPositive=" + mProximityPositive);
        pw.println("  mBootCompleted=" + mBootCompleted);
        pw.println("  mSystemReady=" + mSystemReady);
        pw.println("  mHalAutoSuspendModeEnabled=" + mHalAutoSuspendModeEnabled);
        pw.println("  mHalInteractiveModeEnabled=" + mHalInteractiveModeEnabled);
        pw.println("  mWakeLockSummary=0x" + Integer.toHexString(mWakeLockSummary));
        pw.print("  mNotifyLongScheduled=");
        if (mNotifyLongScheduled == 0) {
            pw.print("(none)");
        } else {
            TimeUtils.formatDuration(mNotifyLongScheduled, SystemClock.uptimeMillis(), pw);
        }
        pw.println();
        pw.print("  mNotifyLongDispatched=");
        if (mNotifyLongDispatched == 0) {
            pw.print("(none)");
        } else {
            TimeUtils.formatDuration(mNotifyLongDispatched, SystemClock.uptimeMillis(), pw);
        }
        pw.println();
        pw.print("  mNotifyLongNextCheck=");
        if (mNotifyLongNextCheck == 0) {
            pw.print("(none)");
        } else {
            TimeUtils.formatDuration(mNotifyLongNextCheck, SystemClock.uptimeMillis(), pw);
        }
        pw.println();
        pw.println("  mUserActivitySummary=0x" + Integer.toHexString(mUserActivitySummary));
        pw.println("  mRequestWaitForNegativeProximity=" + mRequestWaitForNegativeProximity);
        pw.println("  mSandmanScheduled=" + mSandmanScheduled);
        pw.println("  mSandmanSummoned=" + mSandmanSummoned);
        pw.println("  mLowPowerModeEnabled=" + mLowPowerModeEnabled);
        pw.println("  mBatteryLevelLow=" + mBatteryLevelLow);
        pw.println("  mLightDeviceIdleMode=" + mLightDeviceIdleMode);
        pw.println("  mDeviceIdleMode=" + mDeviceIdleMode);
        pw.println("  mDeviceIdleWhitelist=" + Arrays.toString(mDeviceIdleWhitelist));
        pw.println("  mDeviceIdleTempWhitelist=" + Arrays.toString(mDeviceIdleTempWhitelist));
        pw.println("  mLastWakeTime=" + TimeUtils.formatUptime(mLastWakeTime));
        pw.println("  mLastSleepTime=" + TimeUtils.formatUptime(mLastSleepTime));
        pw.println("  mLastUserActivityTime=" + TimeUtils.formatUptime(mLastUserActivityTime));
        pw.println("  mLastUserActivityTimeNoChangeLights=" + TimeUtils.formatUptime(mLastUserActivityTimeNoChangeLights));
        pw.println("  mLastInteractivePowerHintTime=" + TimeUtils.formatUptime(mLastInteractivePowerHintTime));
        pw.println("  mLastScreenBrightnessBoostTime=" + TimeUtils.formatUptime(mLastScreenBrightnessBoostTime));
        pw.println("  mScreenBrightnessBoostInProgress=" + mScreenBrightnessBoostInProgress);
        pw.println("  mDisplayReady=" + mDisplayReady);
        pw.println("  mHoldingWakeLockSuspendBlocker=" + mHoldingWakeLockSuspendBlocker);
        pw.println("  mHoldingDisplaySuspendBlocker=" + mHoldingDisplaySuspendBlocker);
        pw.println();
        pw.println("Settings and Configuration:");
        pw.println("  mDecoupleHalAutoSuspendModeFromDisplayConfig=" + mDecoupleHalAutoSuspendModeFromDisplayConfig);
        pw.println("  mDecoupleHalInteractiveModeFromDisplayConfig=" + mDecoupleHalInteractiveModeFromDisplayConfig);
        pw.println("  mWakeUpWhenPluggedOrUnpluggedConfig=" + mWakeUpWhenPluggedOrUnpluggedConfig);
        pw.println("  mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=" + mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig);
        pw.println("  mTheaterModeEnabled=" + mTheaterModeEnabled);
        pw.println("  mSuspendWhenScreenOffDueToProximityConfig=" + mSuspendWhenScreenOffDueToProximityConfig);
        pw.println("  mDreamsSupportedConfig=" + mDreamsSupportedConfig);
        pw.println("  mDreamsEnabledByDefaultConfig=" + mDreamsEnabledByDefaultConfig);
        pw.println("  mDreamsActivatedOnSleepByDefaultConfig=" + mDreamsActivatedOnSleepByDefaultConfig);
        pw.println("  mDreamsActivatedOnDockByDefaultConfig=" + mDreamsActivatedOnDockByDefaultConfig);
        pw.println("  mDreamsEnabledOnBatteryConfig=" + mDreamsEnabledOnBatteryConfig);
        pw.println("  mDreamsBatteryLevelMinimumWhenPoweredConfig=" + mDreamsBatteryLevelMinimumWhenPoweredConfig);
        pw.println("  mDreamsBatteryLevelMinimumWhenNotPoweredConfig=" + mDreamsBatteryLevelMinimumWhenNotPoweredConfig);
        pw.println("  mDreamsBatteryLevelDrainCutoffConfig=" + mDreamsBatteryLevelDrainCutoffConfig);
        pw.println("  mDreamsEnabledSetting=" + mDreamsEnabledSetting);
        pw.println("  mDreamsActivateOnSleepSetting=" + mDreamsActivateOnSleepSetting);
        pw.println("  mDreamsActivateOnDockSetting=" + mDreamsActivateOnDockSetting);
        pw.println("  mDozeAfterScreenOffConfig=" + mDozeAfterScreenOffConfig);
        pw.println("  mLowPowerModeSetting=" + mLowPowerModeSetting);
        pw.println("  mAutoLowPowerModeConfigured=" + mAutoLowPowerModeConfigured);
        pw.println("  mAutoLowPowerModeSnoozing=" + mAutoLowPowerModeSnoozing);
        pw.println("  mMinimumScreenOffTimeoutConfig=" + mMinimumScreenOffTimeoutConfig);
        pw.println("  mMaximumScreenDimDurationConfig=" + mMaximumScreenDimDurationConfig);
        pw.println("  mMaximumScreenDimRatioConfig=" + mMaximumScreenDimRatioConfig);
        pw.println("  mScreenOffTimeoutSetting=" + mScreenOffTimeoutSetting);
        pw.println("  mSleepTimeoutSetting=" + mSleepTimeoutSetting);
        pw.println("  mMaximumScreenOffTimeoutFromDeviceAdmin=" + mMaximumScreenOffTimeoutFromDeviceAdmin + " (enforced=" + isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked() + ")");
        pw.println("  mStayOnWhilePluggedInSetting=" + mStayOnWhilePluggedInSetting);
        pw.println("  mScreenBrightnessSetting=" + mScreenBrightnessSetting);
        pw.println("  mScreenAutoBrightnessAdjustmentSetting=" + mScreenAutoBrightnessAdjustmentSetting);
        pw.println("  mScreenBrightnessModeSetting=" + mScreenBrightnessModeSetting);
        pw.println("  mScreenBrightnessOverrideFromWindowManager=" + mScreenBrightnessOverrideFromWindowManager);
        pw.println("  mUserActivityTimeoutOverrideFromWindowManager=" + mUserActivityTimeoutOverrideFromWindowManager);
        pw.println("  mUserInactiveOverrideFromWindowManager=" + mUserInactiveOverrideFromWindowManager);
        pw.println("  mTemporaryScreenBrightnessSettingOverride=" + mTemporaryScreenBrightnessSettingOverride);
        pw.println("  mTemporaryScreenAutoBrightnessAdjustmentSettingOverride=" + mTemporaryScreenAutoBrightnessAdjustmentSettingOverride);
        pw.println("  mDozeScreenStateOverrideFromDreamManager=" + mDozeScreenStateOverrideFromDreamManager);
        pw.println("  mDozeScreenBrightnessOverrideFromDreamManager=" + mDozeScreenBrightnessOverrideFromDreamManager);
        pw.println("  mScreenBrightnessSettingMinimum=" + mScreenBrightnessSettingMinimum);
        pw.println("  mScreenBrightnessSettingMaximum=" + mScreenBrightnessSettingMaximum);
        pw.println("  mScreenBrightnessSettingDefault=" + mScreenBrightnessSettingDefault);
        pw.println("  mScreenBrightnessForVrSettingDefault=" + mScreenBrightnessForVrSettingDefault);
        pw.println("  mScreenBrightnessForVrSetting=" + mScreenBrightnessForVrSetting);
        pw.println("  mDoubleTapWakeEnabled=" + mDoubleTapWakeEnabled);
        pw.println("  mIsVrModeEnabled=" + mIsVrModeEnabled);
        final int sleepTimeout = getSleepTimeoutLocked();
        final int screenOffTimeout = getScreenOffTimeoutLocked(sleepTimeout);
        final int screenDimDuration = getScreenDimDurationLocked(screenOffTimeout);
        pw.println();
        pw.println("Sleep timeout: " + sleepTimeout + " ms");
        pw.println("Screen off timeout: " + screenOffTimeout + " ms");
        pw.println("Screen dim duration: " + screenDimDuration + " ms");
        pw.println();
        pw.println("UID states:");
        for (int i = 0; i < mUidState.size(); i++) {
            pw.print("  UID ");
            UserHandle.formatUid(pw, mUidState.keyAt(i));
            pw.print(": ");
            pw.println(mUidState.valueAt(i));
        }
        pw.println();
        pw.println("Looper state:");
        mHandler.getLooper().dump(new PrintWriterPrinter(pw), "  ");
        pw.println();
        pw.println("Wake Locks: size=" + mWakeLocks.size());
        for (WakeLock wl : mWakeLocks) {
            pw.println("  " + wl);
        }
        pw.println();
        pw.println("Suspend Blockers: size=" + mSuspendBlockers.size());
        for (SuspendBlocker sb : mSuspendBlockers) {
            pw.println("  " + sb);
        }
        pw.println();
        pw.println("Display Power: " + mDisplayPowerCallbacks);
        wcd = mWirelessChargerDetector;
    }
    if (wcd != null) {
        wcd.dump(pw);
    }
}
Also used : PrintWriterPrinter(android.util.PrintWriterPrinter)

Aggregations

PrintWriterPrinter (android.util.PrintWriterPrinter)109 Printer (android.util.Printer)47 RemoteException (android.os.RemoteException)28 ResolveInfo (android.content.pm.ResolveInfo)22 Intent (android.content.Intent)20 PrintWriter (java.io.PrintWriter)16 URISyntaxException (java.net.URISyntaxException)16 Bundle (android.os.Bundle)10 ArrayMap (android.util.ArrayMap)7 LogPrinter (android.util.LogPrinter)7 HashMap (java.util.HashMap)7 InputMethodInfo (android.view.inputmethod.InputMethodInfo)6 IInputMethod (com.android.internal.view.IInputMethod)6 Date (java.util.Date)6 Map (java.util.Map)6 MutableInt (android.util.MutableInt)5 ArrayList (java.util.ArrayList)5 PendingIntent (android.app.PendingIntent)4 Iterator (java.util.Iterator)4 Point (android.graphics.Point)2