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

Commit a2353621 authored by Philip Milne's avatar Philip Milne
Browse files

GridLayout diagnostics.

Add null check for:

https://googleplex-android-review.git.corp.google.com/#/c/183792/

Change-Id: Ic8ef7b6749b6d2568ed4e4b3b1fa4ad6659c70eb
parent 07a55b37
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -224,6 +224,12 @@ public class GridLayout extends ViewGroup {
    static final int MAX_SIZE = 100000;
    static final int DEFAULT_CONTAINER_MARGIN = 0;
    static final int UNINITIALIZED_HASH = 0;
    static final Printer LOG_PRINTER = new LogPrinter(Log.DEBUG, GridLayout.class.getName());
    static final Printer NO_PRINTER = new Printer() {
        @Override
        public void println(String x) {
        }
    };

    // Defaults

@@ -252,7 +258,7 @@ public class GridLayout extends ViewGroup {
    int alignmentMode = DEFAULT_ALIGNMENT_MODE;
    int defaultGap;
    int lastLayoutParamsHashCode = UNINITIALIZED_HASH;
    Printer printer = new LogPrinter(Log.DEBUG, getClass().getName());
    Printer printer = LOG_PRINTER;

    // Constructors

@@ -589,7 +595,7 @@ public class GridLayout extends ViewGroup {
     * @see #getPrinter()
     */
    public void setPrinter(Printer printer) {
        this.printer = printer;
        this.printer = (printer == null) ? NO_PRINTER : printer;
    }

    // Static utility methods