--- src/com/android/settings/deviceinfo/BuildNumberPreferenceController.java ---
index f039813..efef6ec 100644
@@ -49,4 +49,5 @@ import com.android.settingslib.development.DevelopmentSettingsEnabler;
import com.mediatek.settings.UtilsExt;
import com.mediatek.settings.ext.IDeviceInfoSettingsExt;
+import android.os.SystemProperties;
public class BuildNumberPreferenceController extends AbstractPreferenceController implements
@@ -122,4 +123,9 @@ public class BuildNumberPreferenceController extends AbstractPreferenceControlle
@Override
public boolean handlePreferenceTreeClick(Preference preference) {
+ if("user".equals(SystemProperties.get("ro.build.type"))){
+ return false;
+ }
if (!TextUtils.equals(preference.getKey(), KEY_BUILD_NUMBER)) {
return false;
--- src/com/android/settings/deviceinfo/DeviceModelPreferenceController.java ---
index 71c6b8b..5609eca 100644
@@ -30,4 +30,5 @@ import com.android.settingslib.core.AbstractPreferenceController;
import com.mediatek.settings.UtilsExt;
import com.mediatek.settings.ext.IDeviceInfoSettingsExt;
+import android.os.SystemProperties;
public class DeviceModelPreferenceController extends AbstractPreferenceController implements
@@ -70,4 +71,9 @@ public class DeviceModelPreferenceController extends AbstractPreferenceControlle
@Override
public boolean handlePreferenceTreeClick(Preference preference) {
+ if("user".equals(SystemProperties.get("ro.build.type"))){
+ return false;
+ }
if (!TextUtils.equals(preference.getKey(), KEY_DEVICE_MODEL)) {
return false;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)