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

Commit 9d717366 authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by android-build-merger
Browse files

Merge "Prevent NPE when current clock is null" into ub-launcher3-qt-r1-dev

am: 4a17c50d

Change-Id: I90dd53e943402be24ca082c37f852555239ad18d
parents 95036f50 4a17c50d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package com.android.customization.model.clock;

import android.content.ContentResolver;
import android.provider.Settings.Secure;
import android.text.TextUtils;

import com.android.customization.module.ThemesUserEventLogger;

@@ -64,6 +65,9 @@ public class ClockManager extends BaseClockManager {
    @Override
    protected String lookUpCurrentClock() {
        final String value = Secure.getString(mContentResolver, CLOCK_FACE_SETTING);
        if (TextUtils.isEmpty(value)) {
            return value;
        }
        try {
            final JSONObject json = new JSONObject(value);
            return json.getString(CLOCK_FIELD);