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

Unverified Commit 55cab10c authored by Arian Kulmer's avatar Arian Kulmer Committed by Arian
Browse files

hardwareinfo: Hide hardware revision if empty

Test: Hardware version is hidden when ro.boot.hardware.revision
      is unset and shown when it is set.
Change-Id: I6135ce48ea76f3181489c40b1c9227de53c43683
parent 7b9edcde
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