Merge "hardwareinfo: Hide hardware revision if empty" am: a1716edbb6
am: defe0a6b9f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1465283 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia74c0bea83aa76c4b8aa453a190bebe8041eafed
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user