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

Commit 26eb01bd authored by Bruno Martins's avatar Bruno Martins Committed by android-build-merger
Browse files

Merge "NfcTile: Avoid NPE during boot up phase" am: 3a419fe2 am: 36285374

am: 7a5f915f

Change-Id: I7b7c0374e1f001fffd25c6ee3239ab675054ac9b
parents 377e6be4 7a5f915f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ public class NfcTile extends QSTileImpl<BooleanState> {
    protected void handleUpdateState(BooleanState state, Object arg) {
        final Drawable mEnable = mContext.getDrawable(R.drawable.ic_qs_nfc_enabled);
        final Drawable mDisable = mContext.getDrawable(R.drawable.ic_qs_nfc_disabled);

        if (getAdapter() == null) return;
        state.value = getAdapter().isEnabled();
        state.label = mContext.getString(R.string.quick_settings_nfc_label);
        state.icon = new DrawableIcon(state.value ? mEnable : mDisable);