Merge "Remove the prefix "Model:" from the summary of hardware." into rvc-d1-dev am: e86dd271da
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12034261 Change-Id: I132e88d5b1cb22db5042c0e66b6bc61ab30efcba
This commit is contained in:
@@ -3054,8 +3054,6 @@
|
|||||||
<string name="security_patch">Android security update</string>
|
<string name="security_patch">Android security update</string>
|
||||||
<!-- About phone screen, status item label [CHAR LIMIT=40] -->
|
<!-- About phone screen, status item label [CHAR LIMIT=40] -->
|
||||||
<string name="model_info">Model</string>
|
<string name="model_info">Model</string>
|
||||||
<!-- About phone screen, status item summary [CHAR LIMIT=40] -->
|
|
||||||
<string name="model_summary">Model: %1$s</string>
|
|
||||||
<!-- About phone screen, dialog title for showing hardware information such as model, serial number, etc.[CHAR LIMIT=60] -->
|
<!-- About phone screen, dialog title for showing hardware information such as model, serial number, etc.[CHAR LIMIT=60] -->
|
||||||
<string name="hardware_info">Model & hardware</string>
|
<string name="hardware_info">Model & hardware</string>
|
||||||
<!-- Label for device's hardware revision value [CHAR LIMIT=40] -->
|
<!-- Label for device's hardware revision value [CHAR LIMIT=40] -->
|
||||||
|
@@ -100,7 +100,7 @@
|
|||||||
<Preference
|
<Preference
|
||||||
android:key="device_model"
|
android:key="device_model"
|
||||||
android:order="31"
|
android:order="31"
|
||||||
android:title="@string/hardware_info"
|
android:title="@string/model_info"
|
||||||
android:summary="@string/summary_placeholder"
|
android:summary="@string/summary_placeholder"
|
||||||
android:fragment="com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFragment"
|
android:fragment="com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFragment"
|
||||||
settings:enableCopying="true"
|
settings:enableCopying="true"
|
||||||
|
@@ -49,7 +49,7 @@ public class HardwareInfoPreferenceController extends BasePreferenceController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getSummary() {
|
public CharSequence getSummary() {
|
||||||
return mContext.getResources().getString(R.string.model_summary, getDeviceModel());
|
return getDeviceModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDeviceModel() {
|
public static String getDeviceModel() {
|
||||||
|
@@ -24,7 +24,6 @@ import androidx.preference.Preference;
|
|||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
import androidx.preference.PreferenceScreen;
|
import androidx.preference.PreferenceScreen;
|
||||||
|
|
||||||
import com.android.settings.R;
|
|
||||||
import com.android.settings.core.BasePreferenceController;
|
import com.android.settings.core.BasePreferenceController;
|
||||||
import com.android.settings.deviceinfo.HardwareInfoPreferenceController;
|
import com.android.settings.deviceinfo.HardwareInfoPreferenceController;
|
||||||
|
|
||||||
@@ -79,8 +78,6 @@ public class HardwareInfoPreferenceControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean containBuildModel(CharSequence result) {
|
private boolean containBuildModel(CharSequence result) {
|
||||||
final String oracle = mContext.getResources().getString(R.string.model_summary,
|
return result.toString().contains(Build.MODEL);
|
||||||
Build.MODEL);
|
|
||||||
return result.toString().contains(oracle);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user