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

Commit bf5740e7 authored by Jeff Brown's avatar Jeff Brown
Browse files

Improve display manager debugging.

Change-Id: Iae794fe99a7cf9809f64eafb216091126a2f7e39
parent 98365d76
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -382,5 +382,16 @@ public final class Display {
            mLastCachedAppSizeUpdate = now;
        }
    }

    // For debugging purposes
    @Override
    public String toString() {
        synchronized (this) {
            updateDisplayInfoLocked();
            mDisplayInfo.getAppMetrics(mTempMetrics, mCompatibilityInfo);
            return "Display id " + mDisplayId + ": " + mDisplayInfo
                    + ", " + mTempMetrics;
        }
    }
}
+13 −0
Original line number Diff line number Diff line
@@ -223,4 +223,17 @@ public final class DisplayInfo implements Parcelable {
            }
        }
    }

    // For debugging purposes
    @Override
    public String toString() {
        return "app " + appWidth + " x " + appHeight
                + ", real " + logicalWidth + " x " + logicalHeight
                + ", largest app " + largestNominalAppWidth + " x " + largestNominalAppHeight
                + ", smallest app " + smallestNominalAppWidth + " x " + smallestNominalAppHeight
                + ", " + refreshRate + " fps"
                + ", rotation " + rotation
                + ", density " + logicalDensityDpi
                + ", " + physicalXDpi + " x " + physicalYDpi + " dpi";
    }
}
+5 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.server.display;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.display.DisplayManager;
import android.hardware.display.IDisplayManager;
import android.os.Binder;
import android.os.SystemProperties;
@@ -166,7 +167,10 @@ public final class DisplayManagerService extends IDisplayManager.Stub {
                pw.println("Adapter: " + adapter.getName());
            }

            pw.println("Default display: " + mDefaultDisplayInfo);
            pw.println("Default display info: " + mDefaultDisplayInfo);
        }

        pw.println("Default display: "
                + DisplayManager.getInstance().getRealDisplay(Display.DEFAULT_DISPLAY));
    }
}