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

Commit a1716edb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "hardwareinfo: Hide hardware revision if empty"

parents b92cb667 55cab10c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settings.deviceinfo.hardwareinfo;

import android.content.Context;
import android.os.SystemProperties;
import android.text.TextUtils;

import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
@@ -31,8 +32,8 @@ public class HardwareRevisionPreferenceController extends BasePreferenceControll

    @Override
    public int getAvailabilityStatus() {
        return mContext.getResources().getBoolean(R.bool.config_show_device_model)
                ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
        return mContext.getResources().getBoolean(R.bool.config_show_device_model) &&
                !TextUtils.isEmpty(getSummary()) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
    }

    @Override