修改安兔兔中8GB存储显示

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/CodingNotes/article/details/81938715
--- a/alps/frameworks/base/core/java/android/widget/TextView.java
+++ b/alps/frameworks/base/core/java/android/widget/TextView.java
@@ -4262,12 +4262,54 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
 private void setText(CharSequence text, BufferType type,
                         boolean notifyBefore, int oldlen) {
        if (text == null) {
            text = "";
        }
		// add for 8GB display at 20161013
		if(SystemProperties.get("ro.x5s_za55_fix_antutu").equals("1")){
			if(getContext() != null && (getContext().getClass().getName().startsWith("com.antutu."))){
				String tempText = text.toString().trim();
				Log.d("aml520","[TextView] --> tempText = "+tempText);
				// english
				if( tempText.contains("Total:4.00GB") || tempText.contains("Total:4,00GB") ){
					text = tempText.replace("Total:4.00GB","Total:8.00GB");
				}
				if( tempText.contains("Total:4.01GB") || tempText.contains("Total:4,01GB") ){
					text = tempText.replace("Total:4.01GB","Total:8.00GB");
				}
				if( tempText.contains("Total:4.02GB") || tempText.contains("Total:4,02GB") ){
					text = tempText.replace("Total:4.02GB","Total:8.00GB");
				}
				if( tempText.contains("Total:4.03GB") || tempText.contains("Total:4,03GB") ){
					text = tempText.replace("Total:4.03GB","Total:8.00GB");
				}
				if( tempText.contains("Total:4.04GB") || tempText.contains("Total:4,04GB") ){
					text = tempText.replace("Total:4.04GB","Total:8.00GB");
				}
				if( tempText.contains("Total:4.05GB") || tempText.contains("Total:4,05GB") ){
					text = tempText.replace("Total:4.05GB","Total:8.00GB");
				}
				// china
				if( tempText.contains("4.01 GB") ){
					text = tempText.replace("4.01 GB","8.00 GB");
				}
				if( tempText.contains("4.02 GB") ){
					text = tempText.replace("4.02 GB","8.00 GB");
				}
				if( tempText.contains("4.03 GB") ){
					text = tempText.replace("4.03 GB","8.00 GB");
				}
				if( tempText.contains("4.04 GB") ){
					text = tempText.replace("4.04 GB","8.00 GB");
				}
				if( tempText.contains("4.05 GB") ){
					text = tempText.replace("4.05 GB","8.00 GB");
				}
				// franch
				if( tempText.contains("4,01GB") ){
					text = tempText.replace("4,01GB","8,00GB");
				}
				if( tempText.contains("4,02GB") ){
					text = tempText.replace("4,02GB","8,00GB");
				}
				if( tempText.contains("4,03GB") ){
					text = tempText.replace("4,03GB","8,00GB");
				}
				if( tempText.contains("4,04GB") ){
					text = tempText.replace("4,04GB","8,00GB");
				}
				if( tempText.contains("4,05GB") ){
					text = tempText.replace("4,05GB","8,00GB");
				}
			}
		}
		// add end

猜你喜欢

转载自blog.csdn.net/CodingNotes/article/details/81938715