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

Commit 73855d40 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoiding potential NPE when dumping to proto."

parents 50f91361 15afdebe
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1151,7 +1151,9 @@ public class AlarmManager {
        public void writeToProto(ProtoOutputStream proto, long fieldId) {
            final long token = proto.start(fieldId);
            proto.write(AlarmClockInfoProto.TRIGGER_TIME_MS, mTriggerTime);
            if (mShowIntent != null) {
                mShowIntent.writeToProto(proto, AlarmClockInfoProto.SHOW_INTENT);
            }
            proto.end(token);
        }
    }
+6 −2
Original line number Diff line number Diff line
@@ -1096,7 +1096,9 @@ public final class Configuration implements Parcelable, Comparable<Configuration
        protoOutputStream.write(FONT_SCALE, fontScale);
        protoOutputStream.write(MCC, mcc);
        protoOutputStream.write(MNC, mnc);
        if (mLocaleList != null) {
            mLocaleList.writeToProto(protoOutputStream, LOCALES);
        }
        protoOutputStream.write(SCREEN_LAYOUT, screenLayout);
        protoOutputStream.write(COLOR_MODE, colorMode);
        protoOutputStream.write(TOUCHSCREEN, touchscreen);
@@ -1111,7 +1113,9 @@ public final class Configuration implements Parcelable, Comparable<Configuration
        protoOutputStream.write(SCREEN_HEIGHT_DP, screenHeightDp);
        protoOutputStream.write(SMALLEST_SCREEN_WIDTH_DP, smallestScreenWidthDp);
        protoOutputStream.write(DENSITY_DPI, densityDpi);
        if (windowConfiguration != null) {
            windowConfiguration.writeToProto(protoOutputStream, WINDOW_CONFIGURATION);
        }
        protoOutputStream.end(token);
    }

+3 −1
Original line number Diff line number Diff line
@@ -386,7 +386,9 @@ public final class Looper {
        final long looperToken = proto.start(fieldId);
        proto.write(LooperProto.THREAD_NAME, mThread.getName());
        proto.write(LooperProto.THREAD_ID, mThread.getId());
        if (mQueue != null) {
            mQueue.writeToProto(proto, LooperProto.QUEUE);
        }
        proto.end(looperToken);
    }