Android6.0 MTK 需求文档(一)

Andorid6.0 ——

一:短信签名(在 vendor 下)

diff --git a/mediatek/proprietary/packages/apps/Mms/res/values-zh-rCN/strings_custon_mms_signature.xml b/mediatek/proprietary/packages/apps/Mms/res/values-zh-rCN/strings_custon_mms_signature.xml
new file mode 100644
index 0000000..5af5489
--- /dev/null
+++ b/mediatek/proprietary/packages/apps/Mms/res/values-zh-rCN/strings_custon_mms_signature.xml
@@ -0,0 +1,10 @@
+
+
+    "请输入签名"
+    "<这里填写短信签名>"
+    "签名设置"
+    "签名选项"
+    "短信签名"
+    "当发送短信时,自动附加短信签名"
+
diff --git a/mediatek/proprietary/packages/apps/Mms/res/values/strings_custon_mms_signature.xml b/mediatek/proprietary/packages/apps/Mms/res/values/strings_custon_mms_signature.xml
new file mode 100644
index 0000000..7ac7b9f
--- /dev/null
+++ b/mediatek/proprietary/packages/apps/Mms/res/values/strings_custon_mms_signature.xml
@@ -0,0 +1,10 @@
+
+
+    Please enter a signature
+    "<这里填写短信签名>"
+    "Signature Setting"
+    "Optional signature"
+    "SMS signature"
+    "Automatically append signature to every MMS message you send"
+
+
diff --git a/mediatek/proprietary/packages/apps/Mms/res/xml/generalpreferences.xml b/mediatek/proprietary/packages/apps/Mms/res/xml/generalpreferences.xml
index 901c106..1b64ffa 100755
--- a/mediatek/proprietary/packages/apps/Mms/res/xml/generalpreferences.xml
+++ b/mediatek/proprietary/packages/apps/Mms/res/xml/generalpreferences.xml
@@ -45,6 +45,18 @@
             android:persistent="false">
         
     
+    
+        
+        
+    
 
     
diff --git a/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsMessageSender.java b/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsMessageSender.java
index b9f396d..1633a59 100644
--- a/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsMessageSender.java
+++ b/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsMessageSender.java
@@ -51,7 +51,7 @@ public class SmsMessageSender implements MessageSender {
     protected final Context mContext;
     protected final int mNumberOfDests;
     private final String[] mDests;
-    protected final String mMessageText;
+    protected String mMessageText;
     protected final String mServiceCenter;
     protected final long mThreadId;
     protected int mSubId;
diff --git a/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsSingleRecipientSender.java b/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsSingleRecipientSender.java
index 4aab62f..2d60f08 100644
--- a/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsSingleRecipientSender.java
+++ b/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/SmsSingleRecipientSender.java
@@ -34,6 +34,10 @@ import com.android.mms.MmsApp;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.mms.util.PhoneUtils;
 import com.android.mms.util.MmsLog;
+import com.mediatek.setting.GeneralPreferenceActivity;
+import android.preference.PreferenceManager;
+import android.content.SharedPreferences;
+
 
 
 public class SmsSingleRecipientSender extends SmsMessageSender {
@@ -42,6 +46,7 @@ public class SmsSingleRecipientSender extends SmsMessageSender {
     private String mDest;
     private Uri mUri;
     private static final String TAG = "SmsSingleRecipientSender";
+    private Context mContext;
 
     private IOpSmsSingleRecipientSenderExt mOpSmsSenderExt;
 
@@ -51,6 +56,7 @@ public class SmsSingleRecipientSender extends SmsMessageSender {
         mRequestDeliveryReport = requestDeliveryReport;
         mDest = dest;
         mUri = uri;
+        mContext = context;
         mOpSmsSenderExt = OpMessageUtils.getOpMessagePlugin().getOpSmsSingleRecipientSenderExt();
     }
 
@@ -65,6 +71,15 @@ public class SmsSingleRecipientSender extends SmsMessageSender {
         }
 
         /// M:Code analyze 002,add a variable to caculate the length of sms @{
+        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
+        StringBuffer addSignature = new StringBuffer(mMessageText);
+        if(sp.getBoolean(GeneralPreferenceActivity.SMS_SIGNATURE_SWITCH,true)){
+            addSignature.append("\n\n"+sp.getString(GeneralPreferenceActivity.SMS_SIGNATURE_TEXT,"<这里填写短信签名>"));
+            android.util.Log.i("jiangyanqing", "      addSignature  : "+addSignature);
+        }
+        mMessageText = addSignature+"";
         int codingType = SmsMessage.ENCODING_UNKNOWN;
         codingType = mOpSmsSenderExt.sendMessagePrepare(mContext, codingType);
 
diff --git a/mediatek/proprietary/packages/apps/Mms/src/com/mediatek/setting/GeneralPreferenceActivity.java b/mediatek/proprietary/packages/apps/Mms/src/com/mediatek/setting/GeneralPreferenceActivity.java
index 4d12a2f..8dd0c87 100755
--- a/mediatek/proprietary/packages/apps/Mms/src/com/mediatek/setting/GeneralPreferenceActivity.java
+++ b/mediatek/proprietary/packages/apps/Mms/src/com/mediatek/setting/GeneralPreferenceActivity.java
@@ -88,6 +88,11 @@ import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import android.widget.EditText;
+import android.graphics.Color;
+import android.content.DialogInterface.OnClickListener;
+import android.content.SharedPreferences.Editor;
+
 
 /**
  * With this activity, users can set preferences for MMS and SMS and
@@ -124,6 +129,10 @@ public class GeneralPreferenceActivity extends PreferenceActivity
 
     public static final String WAPPUSH_ENABLED = "pref_key_wappush_enable";
 
+    public static final String SMS_SIGNATURE_SWITCH  = "pref_key_signature_switch";
+
+    public static final String SMS_SIGNATURE_TEXT  = "pref_key_signature_text_editor";
+
     private static final String MAX_SMS_PER_THREAD = "MaxSmsMessagesPerThread";
 
     private static final String MAX_MMS_PER_THREAD = "MaxMmsMessagesPerThread";
@@ -143,6 +152,10 @@ public class GeneralPreferenceActivity extends PreferenceActivity
 
     private Preference mChatWallpaperPref;
 
+    private Preference mSmsSignatureTextPref;
+
+    private Preference mSmsSignatureSwitch;
+
     private Preference mSmsLimitPref;
 
     private Preference mMmsLimitPref;
@@ -294,7 +307,18 @@ public class GeneralPreferenceActivity extends PreferenceActivity
                 .getOpGeneralPreferenceActivityExt();
         mOpGeneralPreferenceActivityExt.setMessagePreferences(
                 GeneralPreferenceActivity.this, storageCategory);
-
+        mSmsSignatureTextPref = (Preference) findPreference(SMS_SIGNATURE_TEXT);
+        android.util.Log.i("jiangyanqing", "     signature txt :"+sp.getString(SMS_SIGNATURE_TEXT,""));
+        if(sp.getString(SMS_SIGNATURE_TEXT,"").equals("")){
+            Editor ed = PreferenceManager.getDefaultSharedPreferences(GeneralPreferenceActivity.this).edit();
+            ed.putString(SMS_SIGNATURE_TEXT, getString(R.string.signature_text_default));
+            ed.commit();
+        }
+        android.util.Log.i("jiangyanqing", "     signature txt 2222:"+sp.getString(SMS_SIGNATURE_TEXT,""));
+        mSmsSignatureTextPref.setSummary(sp.getString(SMS_SIGNATURE_TEXT,""));
+        mSmsSignatureSwitch = (Preference) findPreference(SMS_SIGNATURE_SWITCH);
         mFontSize = (Preference) findPreference(FONT_SIZE_SETTING);
         mFontSizeChoices = getResourceArray(R.array.pref_message_font_size_choices);
         mFontSizeValues = getResourceArray(R.array.pref_message_font_size_values);
@@ -409,6 +433,37 @@ public class GeneralPreferenceActivity extends PreferenceActivity
             showDialog(FONT_SIZE_DIALOG);
         } else if (preference == mChatWallpaperPref) {
             pickChatWallpaper();
+        }else if (preference == mSmsSignatureTextPref){
+            final EditText smsSignatureEdit = new EditText(this);
+            smsSignatureEdit.setHint(R.string.signature_text_hint);
+            smsSignatureEdit.setTextColor(Color.BLACK);
+            smsSignatureEdit.computeScroll();
+            if (mSmsSignatureTextPref.getSummary().length() > 0) {
+                smsSignatureEdit.setText(mSmsSignatureTextPref.getSummary());
+            }
+            new AlertDialog.Builder(this)
+                //.setTitle(R.string.signature_text_title)
+                .setTitle(getString(R.string.mms_signature_title))
+                .setView(smsSignatureEdit)
+                .setPositiveButton(R.string.OK, new OnClickListener() {
+                        @Override
+                        public void onClick(DialogInterface dialog, int which) {
+                        String text = smsSignatureEdit.getText().toString();
+                        if (text.length() <= 0) {
+                        text = getResources().getString(R.string.signature_text_default);
+                        }
+                        mSmsSignatureTextPref.setSummary(text);
+                        SharedPreferences.Editor ed = PreferenceManager.getDefaultSharedPreferences(GeneralPreferenceActivity.this).edit();
+                        ed.putString(SMS_SIGNATURE_TEXT, text);
+                        ed.commit();
+                        }
+                        })
+            .setNegativeButton(R.string.Cancel, null)
+                .show();
+        }else if(preference == mSmsSignatureSwitch){
+
         }
         return super.onPreferenceTreeClick(preferenceScreen, preference);
     }
@@ -425,6 +480,9 @@ public class GeneralPreferenceActivity extends PreferenceActivity
         editor.putBoolean(CELL_BROADCAST, false);
         /// M: fix bug ALPS00759844, WAPPUSH_ENABLED should be true.
         editor.putBoolean(WAPPUSH_ENABLED, true);
+        editor.putBoolean(SMS_SIGNATURE_SWITCH,true);
+        editor.putString(SMS_SIGNATURE_TEXT,getString(R.string.signature_text_default));
+
         editor.putBoolean(WAPPUSH_AUTO_DOWNLOAD, false);
         /// M: fix bug ALPS00432361, restore default preferences
         /// about GroupMms and ShowEmailAddress @{


二: 第三方app状态栏作成沉浸式的(在 frameworks 下

diff --git a/base/core/java/com/android/internal/policy/PhoneWindow.java b/base/core/java/com/android/internal/policy/PhoneWindow.java
index 0ab5aed..f627612 100644
--- a/base/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/base/core/java/com/android/internal/policy/PhoneWindow.java
@@ -2966,7 +2966,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
             WindowManager.LayoutParams attrs = getAttributes();
             int sysUiVisibility = attrs.systemUiVisibility | getWindowSystemUiVisibility();
 
-            if (!mIsFloating && ActivityManager.isHighEndGfx()) {
+          //  if (!mIsFloating && ActivityManager.isHighEndGfx()) {
+            if (!mIsFloating && (ActivityManager.isHighEndGfx() || SystemProperties.getBoolean("ro.config.low_ram", true))){
                 boolean disallowAnimate = !isLaidOut();
                 disallowAnimate |= ((mLastWindowFlags ^ attrs.flags)
                         & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0;
@@ -3879,7 +3880,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
 
         // Non-floating windows on high end devices must put up decor beneath the system bars and
         // therefore must know about visibility changes of those.
-        if (!mIsFloating && ActivityManager.isHighEndGfx()) {
+      //  if (!mIsFloating && ActivityManager.isHighEndGfx()) {
+        if (!mIsFloating && (ActivityManager.isHighEndGfx() || SystemProperties.getBoolean("ro.config.low_ram", true))){
             if (!targetPreL && a.getBoolean(
                     R.styleable.Window_windowDrawsSystemBarBackgrounds,
                     false)) {


三:相机人脸识别开关(在 vendor/mediatek/proprietary/packages/apps/Camera/res/values/strings.xml 里


    
    off


四: 添加时区

先在 frameworks/base/packages/SettingsLib/res/xml/timezones.xml 里找一下有没有你要默认的时区,里面有的可以直接做默认时区,没有的话请下载我资源中的timezones文件并解压,

再在其中搜索你要添加的时区(搜索到的格式必须为.../...的标准时区格式),如果搜索到的话可以添加进timezones.xml,如果没有搜索到的话,证明不能添加时区,如果客户必须要这些时区的话

我们可以把+/-时区时间相同的另一个时区改名为客户要的...以下为patch(右边替换左边)

diff --git a/base/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java b/base/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java
index 7b5bfb5..0520960 100644
--- a/base/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java
+++ b/base/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java
@@ -118,7 +118,7 @@ public class ZoneGetter {
             boolean isLocalZoneId = localZoneIds.contains(olsonId);
             boolean preferLongName = isLocalZoneId && !localLongNamesAreAmbiguous;
             String displayName = getZoneDisplayName(locale, tz, now, preferLongName);
-
+            displayName = displayName.replace("Dhaka", "Astana").replace("达卡", "阿斯塔纳").replace("Дакка","Астана").replace("Magadan", "Severo-Kurilsk").replace("马加丹", "塞维罗-库里尔斯克").replace("Магадан","Северо-Курильск").replace("Vladivostok", "Khabarovsk").replace("海参崴", "哈巴罗夫斯克").replace("Владивосток","Хабаровск");
             String gmtOffsetString = getGmtOffsetString(locale, tz, now);
             int offsetMillis = tz.getOffset(now.getTime());
             Map displayEntry =
如果要做默认时区的话还需注意的是:如果有Google开机向导,那么需要察看默认的时区在Google开机向导中是否存在该时区,如果不存在,那么该时区不能作为默认时区添加

五: 开机点击菜单按钮,桌面与主菜单重叠

在 packages/apps/Launcher3 中让用户第一次点击时停2秒就解决了

diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 9366659..8b3ea5a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -255,7 +255,7 @@ public class Launcher extends Activity
     public static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT = 300;
     private static final int ON_ACTIVITY_RESULT_ANIMATION_DELAY = 500;
     private static final int ACTIVITY_START_DELAY = 1000;
-
+    private int mSleep = 0;
     private HashMap mItemIdToViewId = new HashMap();
     private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);
 
@@ -2887,7 +2887,19 @@ public class Launcher extends Activity
                 onClickFolderIcon(v);
             }
         } else if (v == mAllAppsButton) {
-            onClickAllAppsButton(v);
+            if(mSleep == 0){
+                Handler handler = new Handler();
+                handler.postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        mSleep = 1;
+                        onClickAllAppsButton(mAllAppsButton);
+                    }
+                }, 2000);
+            }
+            else{
+                onClickAllAppsButton(v);
+            }
         } else if (tag instanceof AppInfo) {
             startAppShortcutOrInfoActivity(v);
         } else if (tag instanceof LauncherAppWidgetInfo) {

六:设置 > 位置信息 frameworks/base/packages/SettingsProvider/res/values/ defaults.xml


    
里面填 gps 是打开 network 是高精度,两个都要就用;连接     默认到节电就这样( packages/apps/Settings)

diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java
index 3b71e79..3324c4d 100644
--- a/src/com/android/settings/location/LocationSettings.java
+++ b/src/com/android/settings/location/LocationSettings.java
@@ -385,7 +385,7 @@ public class LocationSettings extends LocationSettingsBase
     @Override
     public void onSwitchChanged(Switch switchView, boolean isChecked) {
         if (isChecked) {
-            setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);
+            setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_BATTERY_SAVING);
         } else {
             setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_OFF);
         }



七: 基带版本号和内核版本号(在packages/apps/Settings 下

diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java
index e77726a..192aa59 100644
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -140,13 +140,13 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
             getPreferenceScreen().removePreference(findPreference(KEY_SECURITY_PATCH));
 
         }
-        setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband");
	 //基带版本号
+        findPreference(KEY_BASEBAND_VERSION).setSummary("MOLY.WR8.W1449.MD.WG.MP.V6.P6, \n2016/06/16 19:48");
         setStringSummary(KEY_DEVICE_MODEL, Build.MODEL + getMsvSuffix());
         setValueSummary(KEY_EQUIPMENT_ID, PROPERTY_EQUIPMENT_ID);
         setStringSummary(KEY_DEVICE_MODEL, Build.MODEL);
         setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY);
         findPreference(KEY_BUILD_NUMBER).setEnabled(true);
-        findPreference(KEY_KERNEL_VERSION).setSummary(getFormattedKernelVersion());
	 //内核版本号
+        findPreference(KEY_KERNEL_VERSION).setSummary("3.10.72+ \nsonglixin@v106 #1 \nThu Jun 16 20:02:31 CST 2016");
 
         if (!SELinux.isSELinuxEnabled()) {
             String status = getResources().getString(R.string.selinux_status_disabled);
diff --git a/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java b/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java
index 0bcca55..234a286 100644
--- a/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java
+++ b/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java
@@ -139,7 +139,7 @@ public class DeviceInfoSettingsExts {
             baseband = "gsm.version.baseband.2";
         }
         Log.d(TAG, "baseband = " + baseband);
-        setValueSummary(KEY_BASEBAND_VERSION, baseband);
+        findPreference(KEY_BASEBAND_VERSION).setSummary("MOLY.WR8.W1449.MD.WG.MP.V6.P6, \n2016/06/16 19:48");
 
         if (hasExternalModem && !FeatureOption.PURE_AP_USE_EXTERNAL_MODEM) {
             String baseband2 = "gsm.version.baseband.2";

八:合入FOTA

除了加入客户提供的fota apk 外,还要在关于手机里面加入无线升级(fota 入口) (在packages/apps/Settings  中

diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
index b9ac889..67c155d 100644
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -37,8 +37,8 @@
         
         
-            
	     //apk包名
+            
	     //apk类名
+                    android:targetClass="ru.drivepixels.fota.Fota"/>
         
         
 
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java
index fbb818b..5375b93 100644
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -240,14 +240,14 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
 /* Vanzo:tanglei on: Sun, 03 Jan 2016 15:57:06 +0800
  */
         //fota start
-        if(!isApkExist(act, "com.adups.fota")){
+        if(!isApkExist(act, "ru.drivepixels.fota")){
             if(findPreference("adupsfota_software_update") != null){
                 getPreferenceScreen().removePreference(findPreference("adupsfota_software_update"));
             }
         } else {
             Preference preference = findPreference("adupsfota_software_update");
             if (preference != null) {
-                preference.setTitle(getAppName(act, "com.adups.fota"));
+                preference.setTitle(getAppName(act, "ru.drivepixels.fota"));
             }
         }
         //fota end

九: 暗码

1)工程代码/查看软件版本 (packages/apps/Dialer/res/values/strings_custom.xml)

    //工程
    #*#77250411##*
    //软件版本
    *#*#77111269#*#*
2)工厂模式( packages/apps/Dialer/res/values/ strings_engineer.xml)

    *#66*#
3) 查PCB版本和查看硬件指令和软件版本和软硬件版本指令(packages/apps/Dialer)
diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.java
index f0d069e..b03efeb 100755
--- a/src/com/android/dialer/SpecialCharSequenceMgr.java
+++ b/src/com/android/dialer/SpecialCharSequenceMgr.java
@@ -176,6 +176,9 @@ public class SpecialCharSequenceMgr {
         if(input.equals(context.getResources().getString(R.string.engineer_mode_code))) {
             input="*#*#3646633#*#*";
         }
	 //硬件指令(外面的是客户提供的里面的是内部的)
+        if (input.equals("*#6666*#")) {
+            input = "*#*#9646633#*#*";
+        }
 // End of Vanzo:yujianpeng
         //get rid of the separators so that the string gets parsed correctly
         String dialString = PhoneNumberUtils.stripSeparators(input);
@@ -197,6 +200,7 @@ public class SpecialCharSequenceMgr {
                 || handlePinEntry(context, dialString)
                 || handleAdnEntry(context, dialString, textField)
                 || handleSecretCode(context, dialString)
+                || handlePCBVersion(context, dialString)
+   		 || handleExternalBuildNumber(context,dialString)
+                || handleInternalBuildNumber(context,dialString)
                 /// M: for OP09 6M project @{
                 || handleVersionCode(context, dialString)
                 /// @}
@@ -221,6 +225,18 @@ public class SpecialCharSequenceMgr {
         return false;
     }
+    //PCB版本
+    static boolean handlePCBVersion(Context context, String input) {
+        if (input.equals("*#7777*#")) {
+            AlertDialog alert = new AlertDialog.Builder(context)
+                .setTitle("PCB")
+                .setMessage("W371_MB_MP1.0_MT6580")
+                .setPositiveButton(android.R.string.ok, null).setCancelable(false).create();
+                alert.show();
+            return true;
+        }
+        return false;
+    }
+    //软硬件版本指令
+    static boolean handleExternalBuildNumber(Context context,String input) {
+        if(input.equals("#*8378#1#")) {
+            String displayId = SystemProperties.get("ro.build.display.id");
+            String hardwareId = SystemProperties.get("ro.build.display.hardware.id","UNKOWN");
+            AlertDialog alert = new AlertDialog.Builder(context)
+                .setTitle(context.getResources().getString(R.string.sw_version_title))
+                .setMessage("Version de Software\n" + displayId + "\n" + "Version de Hardware\n" +hardwareId)
+                .setPositiveButton(android.R.string.ok, null)
+                .setCancelable(false)
+                .show();
+            return true;
+        }
+        return false;
+    }
+     //内部版本指令
+     static boolean handleInternalBuildNumber(Context context,String input) {
+        if(input.equals("*1111#")) {
+            String innerId = SystemProperties.get("ro.build.display.inner.id","UNKOWN");
+	     //这个要在下面的buildinfo.sh中定义
+            String buildtime = SystemProperties.get("ro.build.date.ymd","UNKOWN");
+            AlertDialog alert = new AlertDialog.Builder(context)
+                .setTitle(context.getResources().getString(R.string.sw_version_title))
+                .setMessage("Version de Software\n" + innerId + "_" + buildtime)
+                .setPositiveButton(android.R.string.ok, null)
+                .setCancelable(false)
+                .show();
+            return true;
+        }
+        return false;
+    }

(build/tools/buildinfo.sh)

+diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
+index 3254ce4..25d24b2 100755
+--- a/tools/buildinfo.sh
++++ b/tools/buildinfo.sh
+@@ -28,6 +28,7 @@ fi
+ echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
+ echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
+ echo "ro.build.date=`date`"
++echo "ro.build.date.ymd=`date +%Y%m%d`"
+ echo "ro.build.date.utc=`date +%s`"
+ echo "ro.build.type=$TARGET_BUILD_TYPE"
+ echo "ro.build.user=$USER"
(packages/apps/Settings/)硬件版本号
+diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
+index 8c647c8..a752eac 100644
+--- a/res/values-es-rUS/strings.xml
++++ b/res/values-es-rUS/strings.xml
+@@ -900,7 +900,8 @@
+     "ID del equipo"
+     "Versión de banda base"
+     "Versión de núcleo"
+-    "Número de compilación"
++    "Versión de Software"
++    "Versión de Hardware"
+     "Estado de SELinux"
+     "No disponible"
+     "Estado"
+diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
+index 94e27ea..6a19598 100644
+--- a/res/values-zh-rCN/strings.xml
++++ b/res/values-zh-rCN/strings.xml
+@@ -900,7 +900,8 @@
+     "设备 ID"
+     "基带版本"
+     "内核版本"
+-    "版本号"
++    "软件版本号"
++    "硬件版本号"
+     "SELinux 状态"
+     "不可用"
+     "状态信息"
+diff --git a/res/values/strings.xml b/res/values/strings.xml
+index ad5ca8c..33ac7b3 100644
+--- a/res/values/strings.xml
++++ b/res/values/strings.xml
+@@ -2148,7 +2148,8 @@
+     
+     Kernel version
+     
+-    Build number
++    Build number 
++    Hardware version
+     
+     SELinux status
+ 
+diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
+index b9ac889..de65506 100644
+--- a/res/xml/device_info_settings.xml
++++ b/res/xml/device_info_settings.xml
+@@ -153,6 +153,12 @@ add brand name
+                 android:title="@string/build_number"
+                 android:summary="@string/device_info_default"/>
+ 
++        
++        
++
+         
+         


十:android键盘 打开俄罗斯语言和英文
packages/inputmethods

diff --git a/LatinIME/java/Android.mk b/LatinIME/java/Android.mk
index 7a4df92..b94dae0 100644
--- a/LatinIME/java/Android.mk
+++ b/LatinIME/java/Android.mk
@@ -35,6 +35,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
 
 
 
+LOCAL_JAVA_LIBRARIES := mediatek-common
+LOCAL_PRIVILEGED_MODULE := true
 # Do not compress dictionary files to mmap dict data runtime
 LOCAL_AAPT_FLAGS := -0 .dict
 
diff --git a/LatinIME/java/AndroidManifest.xml b/LatinIME/java/AndroidManifest.xml
index a1f469e..22b4ff0 100644
--- a/LatinIME/java/AndroidManifest.xml
+++ b/LatinIME/java/AndroidManifest.xml
@@ -34,6 +34,10 @@
     
     
     
+    
+    
+    
+    
 
     
         
+        
+            
+                
+            
+        
     
 
diff --git a/LatinIME/java/res/xml/method.xml b/LatinIME/java/res/xml/method.xml
index 19742d4..0e3fea2 100644
--- a/LatinIME/java/res/xml/method.xml
+++ b/LatinIME/java/res/xml/method.xml
@@ -810,14 +810,6 @@
             android:imeSubtypeMode="keyboard"
             android:imeSubtypeExtraValue="KeyboardLayoutSet=bengali,SupportTouchPositionCorrection,EmojiCapable"
     />
-    
-    
     
     
				//这里控制打开的
+        final String[] locales = {"ru","en_US"};
+        for (String s : locales) {
+            if (s.equals(locale)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+}

十一: 在电话本里,电话匹配长度是7 位数字(从右向左,7位数字)
(frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java)

	public static final int VANZO_FEATURE_DEFAULT_PHONENUMBER_MIN_MATCH = 7;
 
 
  

 
  
 	if (sIsCtaSupport) {
             minMatchLen = MIN_MATCH_CTA;
         } else if (sPhoneNumberExt != null) {
-            minMatchLen = sPhoneNumberExt.getMinMatch();
+           minMatchLen = MIN_MATCH;
         }

         Rlog.d(LOG_TAG, "[compareLoosely] a: " + a + ", b: " + b + ", minMatchLen:" + minMatchLen);
@@ -905,7 +914,12 @@ public class PhoneNumberUtils
         if (sIsCtaSupport) {
             minMatchLen = MIN_MATCH_CTA;
         } else if (sPhoneNumberExt != null) {
-             minMatchLen = sPhoneNumberExt.getMinMatch();
+             minMatchLen = MIN_MATCH;
         }
 
         String strStrippedReversed = internalGetStrippedReversed(np, minMatchLen);
@@ -1715,7 +1729,12 @@ public class PhoneNumberUtils
     //
     // However, in order to loose match 650-555-1212 and 555-1212, we need to set the min match
     // to 7.
-    static final int MIN_MATCH = 7;
+    static final int MIN_MATCH = VANZO_FEATURE_DEFAULT_PHONENUMBER_MIN_MATCH;
     /// M: [mtk04070][111116][ALPS00093395]Add a constant integer. @{
     static final int MIN_MATCH_CTA = 11;
     /// @}

在不过gms的情况下,还要额外加上一段修改(packages/providers)

diff --git a/ContactsProvider/src/com/android/providers/contacts/ContactsDatabaseHelper.java b/ContactsProvider/src/com/android/providers/contacts/ContactsDatabaseHelper.java
index e1d3b77..b3300a4 100644
--- a/ContactsProvider/src/com/android/providers/contacts/ContactsDatabaseHelper.java
+++ b/ContactsProvider/src/com/android/providers/contacts/ContactsDatabaseHelper.java
@@ -5731,33 +5731,12 @@ public class ContactsDatabaseHelper extends SQLiteOpenHelper {
      */
     public void buildFallbackPhoneLookupAndContactQuery(SQLiteQueryBuilder qb, String number) {
         final String minMatch = PhoneNumberUtils.toCallerIDMinMatch(number);
-        final StringBuilder sb = new StringBuilder();
-        // Append lookup tables.
-        sb.append(Tables.RAW_CONTACTS);
-        sb.append(" JOIN " + Views.CONTACTS + " as contacts_view"
-                + " ON (contacts_view._id = " + Tables.RAW_CONTACTS
-                + "." + RawContacts.CONTACT_ID + ")" +
-                " JOIN (SELECT " + PhoneLookupColumns.DATA_ID + "," +
-                PhoneLookupColumns.NORMALIZED_NUMBER + " FROM "+ Tables.PHONE_LOOKUP + " "
-                + "WHERE (" + Tables.PHONE_LOOKUP + "." + PhoneLookupColumns.MIN_MATCH + " = '");
-        sb.append(minMatch);
-        sb.append("')) AS lookup " +
-                "ON lookup." + PhoneLookupColumns.DATA_ID + "=" + Tables.DATA + "." + Data._ID
-                + " JOIN " + Tables.DATA + " "
-                + "ON " + Tables.DATA + "." + Data.RAW_CONTACT_ID + "=" + Tables.RAW_CONTACTS + "."
-                + RawContacts._ID);
-
-        /**
-         * M: append this table for some query(fix ALPS00532279) @{
-         */
+        StringBuilder sb = new StringBuilder();
+        appendPhoneLookupTables(sb, minMatch, true);
         appendPresenceAndStautsTable(sb);
-        /** @} */
         qb.setTables(sb.toString());
-
-        sb.setLength(0);
-        sb.append("PHONE_NUMBERS_EQUAL(" + Tables.DATA + "." + Phone.NUMBER + ", ");
-        DatabaseUtils.appendEscapedSQLString(sb, number);
-        sb.append(mUseStrictPhoneNumberComparison ? ", 1)" : ", 0)");
+        sb = new StringBuilder();
+        appendPhoneLookupSelection(sb, null, null);
         qb.appendWhere(sb.toString());
     }
     /** @} */

十二:去除工厂模式中的 光感/距感测试项 vanzo

diff --git a/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java b/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java
index 6100b0e..449b5fa 100755
--- a/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java
+++ b/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java
@@ -56,7 +56,7 @@ public class FactoryMode extends Activity implements OnItemClickListener {
 
     private TextView mMotherBoardResult;
 
-    public static boolean mHavePsensor = true;
+    public static boolean mHavePsensor = false;
 
     public static boolean mHaveMsensor = true;

十三: 相机零延迟开关/ 避免闪烁没有默认60HZ

零延迟:vendor/mediatek/proprietary/packages/apps/Camera/res/values/strings.xml

    on
避免闪烁没有默认60HZ:(vendor)
diff --git a/mediatek/proprietary/packages/apps/Camera/res/values/arrays.xml b/mediatek/proprietary/packages/apps/Camera/res/values/arrays.xml
index 607f6a0..a01f714 100755
--- a/mediatek/proprietary/packages/apps/Camera/res/values/arrays.xml
+++ b/mediatek/proprietary/packages/apps/Camera/res/values/arrays.xml
@@ -684,6 +684,7 @@ add 16M 16_9
     
     
     
+        60hz
         auto
         off
         50hz

十四:WIFI默认关闭 packages/apps/Launcher3
 
  

 
  
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index df22272..8929289 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -70,6 +70,8 @@
     
     
     
+    
+    
     
      
     
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 9366659..7c30d9d 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -146,6 +146,9 @@ import android.hardware.SensorEvent;
 import android.hardware.SensorEventListener;
 import android.hardware.SensorManager;
 import com.android.featureoption.FeatureOption;
+import android.net.NetworkInfo;
+import android.net.wifi.WifiManager;
+import android.net.ConnectivityManager;
 // End of Vanzo:hanshengpeng
 
 /**
@@ -5163,6 +5166,18 @@ public class Launcher extends Activity
         editor.apply();
     }
 
+    private void closeWifiGps() {
+        // Intent sh = new Intent("com.android.settings.location.CLOSE");
+        //sendBroadcast(sh);
+        final WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
+        ConnectivityManager con = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
+        NetworkInfo netWork = con.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
+        if (wifiManager == null || netWork.isConnected()) {
+            return;
+        }
+        wifiManager.setWifiEnabled(false);
+    }
+
     @Thunk void showFirstRunClings() {
         // The two first run cling paths are mutually exclusive, if the launcher is preinstalled
         // on the device, then we always show the first run cling experience (or if there is no
@@ -5175,6 +5190,7 @@ public class Launcher extends Activity
             } else {
                 launcherClings.showLongPressCling(true);
             }
+            closeWifiGps();
         }
     }


十五:壁纸不滑动packages/apps/Launcher3

diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
index e299302..5ac7b2b 100755
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -1059,11 +1059,15 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
 
         if (partner == null || !partner.hideDefaultWallpaper()) {
             // Add an entry for the default wallpaper (stored in system resources)
+/* Vanzo:yujianpeng on: Fri, 01 Apr 2016 15:39:35 +0800
+ * TODO: replace this line with your comment
             WallpaperTileInfo defaultWallpaperInfo = Utilities.ATLEAST_KITKAT
                     ? getDefaultWallpaper() : getPreKKDefaultWallpaperInfo();
             if (defaultWallpaperInfo != null) {
                 bundled.add(0, defaultWallpaperInfo);
             }
+ */
+// End of Vanzo:yujianpeng
         }
         return bundled;
     }

十六:插入SD卡时默认为SD卡packages/apps/Settings

diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c8b252a..bed2c41 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -3173,6 +3173,12 @@ add fp control
         
     
 
-
+    
+        
+            
+            
+            
+        
+    
     
 
diff --git a/src/com/android/settings/UsbBroadCastReceiver.java b/src/com/android/settings/UsbBroadCastReceiver.java
new file mode 100644
index 0000000..b578167
--- /dev/null
+++ b/src/com/android/settings/UsbBroadCastReceiver.java
@@ -0,0 +1,26 @@
+package com.android.settings;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.provider.Settings;
+import android.util.Log;
+import android.os.storage.IMountService;
+import com.mediatek.storage.StorageManagerEx;
+
+public class UsbBroadCastReceiver extends BroadcastReceiver {
+    String TAG = "UsbBroadCastReceiver";
+    String ExternalStoragePath = StorageManagerEx.getExternalStoragePath();
+
+
+    public void onReceive(Context context, Intent intent) {
+
+        Log.i(TAG,"receive change request");
+        if (Intent.ACTION_MEDIA_MOUNTED.equals(intent.getAction())) {
+            Log.d("yjp","intent  :  ACTION_MEDIA_MOUNTED");
+            Log.d("yjp","ExternalStoragePath " + ExternalStoragePath + "  getInternalStoragePath : " + StorageManagerEx.getInternalStoragePath());
+            StorageManagerEx.setDefaultPath(ExternalStoragePath);
+        }
+    }
+
+}

十七: 邮箱默认签名,默认西班牙语下:Enviado des... 英语和其他语言下:Sent from my LO...(packages/apps/Email)

diff --git a/UnifiedEmail/src/com/android/mail/compose/ComposeActivity.java b/UnifiedEmail/src/com/android/mail/compose/ComposeActivity.java
index d6acdaf..e8bdab6 100755
--- a/UnifiedEmail/src/com/android/mail/compose/ComposeActivity.java
+++ b/UnifiedEmail/src/com/android/mail/compose/ComposeActivity.java
@@ -78,6 +78,8 @@ import android.widget.ScrollView;
 import android.widget.MultiAutoCompleteTextView;
 import android.widget.TextView;
 import android.widget.Toast;
+import android.preference.EditTextPreference;
+import java.util.Locale;
 
 import com.android.common.Rfc822Validator;
 import com.android.common.contacts.DataUsageStatUpdater;
@@ -1116,6 +1118,15 @@ public class ComposeActivity extends ActionBarActivity
             DataCollectUtils.clearRecordedList();
         }
         /** @} */
+        if(mSignature.equals("Enviado desde mi smartphone LOGIC")){
+            if(mBodyView.getText().toString().contains("Enviado desde mi smartphone LOGIC")){
+                if(Locale.getDefault().getLanguage().equals("es")) {
+                    mBodyView.setText(mBodyView.getText().toString());
+                } else {
+                    mBodyView.setText(mBodyView.getText().toString());
+                }
+            }
+        }
     }
 
     @Override
@@ -1890,6 +1901,17 @@ public class ComposeActivity extends ActionBarActivity
                             message.bodyHtml.length());
                 }
             }
+            if(mSignature.equals("Enviado desde mi smartphone LOGIC") || mSignature.equals("Sent from my LOGIC smartphone.")){
+                if(body.equals("Enviado desde mi smartphone LOGIC") || body.equals("Sent from my LOGIC smartphone.") ){
+                    if(Locale.getDefault().getLanguage().equals("es")){
+                        mBodyView.setText("Enviado desde mi smartphone LOGIC");
+                    } else {
+                        mBodyView.setText("Sent from my LOGIC smartphone.");
+                    }
+                }
+            } else{
+                mBodyView.setText(body);
+            }
             new HtmlToSpannedTask().execute(body);
         } else {
             final String body = message.bodyText;
@@ -4229,6 +4251,15 @@ public class ComposeActivity extends ActionBarActivity
             mSignature = newSignature;
             if (!TextUtils.isEmpty(mSignature)) {
                 // Appending a signature does not count as changing text.
+                if(mSignature.equals("Enviado desde mi smartphone LOGIC") || mSignature.equals("Sent from my LOGIC smartphone.")){
+                    if(Locale.getDefault().getLanguage().equals("es")){
+                        mSignature =  "Enviado desde mi smartphone LOGIC";
+                    }else{
+                        mSignature = "Sent from my LOGIC smartphone.";
+                    }
+                } else {
+                    mSignature = newSignature;
+                }
                 mBodyView.removeTextChangedListener(this);
                 mBodyView.append(convertToPrintableSignature(mSignature));
                 mBodyView.addTextChangedListener(this);
diff --git a/emailcommon/src/com/android/emailcommon/provider/Account.java b/emailcommon/src/com/android/emailcommon/provider/Account.java
index e3671b3..ce7a184 100755
--- a/emailcommon/src/com/android/emailcommon/provider/Account.java
+++ b/emailcommon/src/com/android/emailcommon/provider/Account.java
@@ -44,6 +44,7 @@ import org.json.JSONException;
 import org.json.JSONObject;
 
 import java.util.ArrayList;
+import java.util.Locale;
 
 public final class Account extends EmailContent implements Parcelable {
     public static final String TABLE_NAME = "Account";
@@ -144,6 +145,7 @@ public final class Account extends EmailContent implements Parcelable {
     public String mProtocolVersion;
     public String mSecuritySyncKey;
     public String mSignature;
+    public String CUSTOM_SIGNATURE = "Sent from my LOGIC smartphone.";
     public long mPolicyKey;
     public long mPingDuration;
 
@@ -211,6 +213,13 @@ public final class Account extends EmailContent implements Parcelable {
         mSyncInterval = -1;
         mSyncLookback = -1;
         mFlags = 0;
+        if(Locale.getDefault().getLanguage().equals("en")){
+            mSignature = "Sent from my LOGIC smartphone.";
+        } else if(Locale.getDefault().getLanguage().equals("es")){
+            mSignature = "Enviado desde mi smartphone LOGIC";
+        } else{
+            mSignature = CUSTOM_SIGNATURE;
+        }
     }
 
     public static Account restoreAccountWithId(Context context, long id) {
@@ -285,7 +294,14 @@ public final class Account extends EmailContent implements Parcelable {
         mRingtoneUri = cursor.getString(CONTENT_RINGTONE_URI_COLUMN);
         mProtocolVersion = cursor.getString(CONTENT_PROTOCOL_VERSION_COLUMN);
         mSecuritySyncKey = cursor.getString(CONTENT_SECURITY_SYNC_KEY_COLUMN);
-        mSignature = cursor.getString(CONTENT_SIGNATURE_COLUMN);
+        //mSignature = cursor.getString(CONTENT_SIGNATURE_COLUMN);
+        if(Locale.getDefault().getLanguage().equals("en")){
+            CUSTOM_SIGNATURE = "Sent from my LOGIC smartphone.";
+        }else if(Locale.getDefault().getLanguage().equals("es")){
+            CUSTOM_SIGNATURE = "Enviado desde mi smartphone LOGIC";
+        }else{
+            mSignature = CUSTOM_SIGNATURE;
+        }
         mPolicyKey = cursor.getLong(CONTENT_POLICY_KEY_COLUMN);
         mPingDuration = cursor.getLong(CONTENT_PING_DURATION_COLUMN);
     }
@@ -957,6 +973,13 @@ public final class Account extends EmailContent implements Parcelable {
         mProtocolVersion = in.readString();
         /* mNewMessageCount = */ in.readInt();
         mSecuritySyncKey = in.readString();
+        if(Locale.getDefault().getLanguage().equals("en")){
+            CUSTOM_SIGNATURE = "Sent from my LOGIC smartphone.";
+        }else if(Locale.getDefault().getLanguage().equals("es")){
+            CUSTOM_SIGNATURE = "Enviado desde mi smartphone LOGIC";
+        }else{
+            mSignature = CUSTOM_SIGNATURE;
+        }
         mSignature = in.readString();
         mPolicyKey = in.readLong();
 
diff --git a/src/com/android/email/activity/setup/AccountFinalizeFragment.java b/src/com/android/email/activity/setup/AccountFinalizeFragment.java
index f2b9cde..bdfecf9 100755
--- a/src/com/android/email/activity/setup/AccountFinalizeFragment.java
+++ b/src/com/android/email/activity/setup/AccountFinalizeFragment.java
@@ -127,13 +127,6 @@ public class AccountFinalizeFragment extends Fragment {
         public Boolean loadInBackground() {
             // Update the account in the database
             final ContentValues cv = new ContentValues();
-/* Vanzo:tanglei on: Mon, 09 Feb 2015 20:34:31 +0800
- * email default signature
- */
-            if (!FeatureOption.VANZO_FEATURE_EMAIL_DEFAULT_SIGNATURE.equals("")) {
-                cv.put(EmailContent.AccountColumns.SIGNATURE, FeatureOption.VANZO_FEATURE_EMAIL_DEFAULT_SIGNATURE);
-            }
-// End of Vanzo:tanglei
             cv.put(EmailContent.AccountColumns.DISPLAY_NAME, mAccount.getDisplayName());
             cv.put(EmailContent.AccountColumns.SENDER_NAME, mAccount.getSenderName());
             mAccount.update(getContext(), cv);

十八: 在短信设置里:有(100K, 200K, 300K, 600K, 1M)选项可以选择

短信默认最大160个字节,超过部分作为第二个短信,默认编辑方式:7 Bits

vendor

diff --git a/mediatek/proprietary/packages/apps/Mms/res/values/mtk_arrays.xml b/mediatek/proprietary/packages/apps/Mms/res/values/mtk_arrays.xml
index da3f0dc..eef0535 100755
--- a/mediatek/proprietary/packages/apps/Mms/res/values/mtk_arrays.xml
+++ b/mediatek/proprietary/packages/apps/Mms/res/values/mtk_arrays.xml
@@ -44,11 +44,15 @@
         100K
         200K
         300K
+        600K
+        1MB
     
     
         100
         200
         300
+        600
+        1024
       
     
         High
diff --git a/mediatek/proprietary/packages/apps/Mms/res/xml/mms_config.xml b/mediatek/proprietary/packages/apps/Mms/res/xml/mms_config.xml
index 3e87525..76aa9e6 100644
--- a/mediatek/proprietary/packages/apps/Mms/res/xml/mms_config.xml
+++ b/mediatek/proprietary/packages/apps/Mms/res/xml/mms_config.xml
@@ -26,7 +26,7 @@
     true
 
     
-    307200
+    1048576
 
     
     480
diff --git a/mediatek/proprietary/packages/apps/Mms/res/xml/multicardpreferences.xml b/mediatek/proprietary/packages/apps/Mms/res/xml/multicardpreferences.xml
index 70a9ebe..d47b8e4 100755
--- a/mediatek/proprietary/packages/apps/Mms/res/xml/multicardpreferences.xml
+++ b/mediatek/proprietary/packages/apps/Mms/res/xml/multicardpreferences.xml
@@ -76,7 +76,7 @@
     
         
         

十九:更改时间格式 frameworks
+++ b/base/api/system-current.txt
@@ -34813,6 +34813,7 @@ package android.text.format {
     method public static java.lang.CharSequence format(java.lang.CharSequence, java.util.Calendar);
     method public static java.lang.String getBestDateTimePattern(java.util.Locale, java.lang.String);
     method public static java.text.DateFormat getDateFormat(android.content.Context);
+    method public static java.text.DateFormat getDateFormatForSetting(android.content.Context, java.lang.String);
     method public static char[] getDateFormatOrder(android.content.Context);
     method public static java.text.DateFormat getLongDateFormat(android.content.Context);
     method public static java.text.DateFormat getMediumDateFormat(android.content.Context);
diff --git a/base/core/java/android/text/format/DateFormat.java b/base/core/java/android/text/format/DateFormat.java
index 8d5555d..1555939 100755
--- a/base/core/java/android/text/format/DateFormat.java
+++ b/base/core/java/android/text/format/DateFormat.java
@@ -292,7 +292,14 @@ public class DateFormat {
      * @return the {@link java.text.DateFormat} object that properly formats the date.
      */
     public static java.text.DateFormat getDateFormat(Context context) {
+/* Vanzo:yujianpeng on: Sat, 02 Apr 2016 11:22:51 +0800
+ * add choose date format
         return java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT);
+ */
+        String value = Settings.System.getString(context.getContentResolver(),
+                Settings.System.DATE_FORMAT);
+        return getDateFormatForSetting(context, value);
+// End of Vanzo:yujianpeng
     }
 
     /**
@@ -325,9 +332,16 @@ public class DateFormat {
      * order returned here.
      */
     public static char[] getDateFormatOrder(Context context) {
+/* Vanzo:yujianpeng on: Sat, 02 Apr 2016 11:27:55 +0800
+ * add choose date format
         return ICU.getDateFormatOrder(getDateFormatString());
+ */
+        return ICU.getDateFormatOrder(getDateFormatString(context));
+// End of Vanzo:yujianpeng
     }
 
+/* Vanzo:yujianpeng on: Sat, 02 Apr 2016 11:28:07 +0800
+ * add choose date format
     private static String getDateFormatString() {
         java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT);
         if (df instanceof SimpleDateFormat) {
@@ -336,6 +350,13 @@ public class DateFormat {
 
         throw new AssertionError("!(df instanceof SimpleDateFormat)");
     }
+ */
+    private static String getDateFormatString(Context context) {
+        String value = Settings.System.getString(context.getContentResolver(),
+                Settings.System.DATE_FORMAT);
+        return getDateFormatStringForSetting(context, value);
+    }
+// End of Vanzo:yujianpeng
 
     /**
      * Given a format string and a time in milliseconds since Jan 1, 1970 GMT, returns a
@@ -636,4 +657,116 @@ public class DateFormat {
     private static String zeroPad(int inValue, int inMinDigits) {
         return String.format(Locale.getDefault(), "%0" + inMinDigits + "d", inValue);
     }
+/* Vanzo:yujianpeng on: Sat, 02 Apr 2016 11:13:06 +0800
+ * TODO: replace this line with your comment
+ */
+
+    public static java.text.DateFormat getDateFormatForSetting(Context context, String value) {
+        String format = getDateFormatStringForSetting(context, value);
+        return new java.text.SimpleDateFormat(format);
+    }
+
+    private static String getDateFormatStringForSetting(Context context, String value) {
+        String result = null;
+        if (value != null) {
+            /// M: add week and arrange month day year according to resource's date format defination for settings. CR: ALPS00049014 @{
+            String dayValue = value.indexOf("dd") < 0 ? "d" : "dd";
+            String monthValue = value.indexOf("MMMM") < 0 ? (value.indexOf("MMM") < 0 ? (value.indexOf("MM") < 0 ? "M" : "MM") : "MMM") : "MMMM";
+            String yearValue = value.indexOf("yyyy") < 0 ? "y" : "yyyy";
+            String weekValue = value.indexOf("EEEE") < 0 ? "E" : "EEEE";
+
+            int day = value.indexOf(dayValue);
+            int month = value.indexOf(monthValue);
+            int year = value.indexOf(yearValue);
+            int week = value.indexOf(weekValue);
+
+            if (week >= 0 && month >= 0 && day >= 0 && year >= 0) {
+                String template = null;
+                if (week < day) {
+                    if (year < month && year < day) {
+                        if (month < day) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_year_month_day);
+                            result = String.format(template, weekValue, yearValue, monthValue, dayValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_year_day_month);
+                            result = String.format(template, weekValue, yearValue, dayValue, monthValue);
+                        }
+                    } else if (month < day) {
+                        if (day < year) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_month_day_year);
+                            result = String.format(template, weekValue, monthValue, dayValue, yearValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_month_year_day);
+                            result = String.format(template, weekValue, monthValue, yearValue, dayValue);
+                        }
+                    } else {
+                        if (month < year) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_day_month_year);
+                            result = String.format(template, weekValue, dayValue, monthValue, yearValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_day_year_month);
+                            result = String.format(template, weekValue, dayValue, yearValue, monthValue);
+                        }
+                    }
+                } else {
+                    if (year < month && year < day) {
+                        if (month < day) {
+                            template = context.getString(com.mediatek.internal.R.string.year_month_day_wday);
+                            result = String.format(template, yearValue, monthValue, dayValue, weekValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.year_day_month_wday);
+                            result = String.format(template, yearValue, dayValue, monthValue, weekValue);
+                        }
+                    } else if (month < day) {
+                        if (day < year) {
+                            template = context.getString(com.mediatek.internal.R.string.month_day_year_wday);
+                            result = String.format(template, monthValue, dayValue, yearValue, weekValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.month_year_day_wday);
+                            result = String.format(template, monthValue, yearValue, dayValue, weekValue);
+                        }
+                    } else {
+                        if (month < year) {
+                            template = context.getString(com.mediatek.internal.R.string.day_month_year_wday);
+                            result = String.format(template, dayValue, monthValue, yearValue, weekValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.day_year_month_wday);
+                            result = String.format(template, dayValue, yearValue, monthValue, weekValue);
+                        }
+                    }
+                }
+
+                return result;
+                /// M: @}
+        } else if (month >= 0 && day >= 0 && year >= 0) {
+            String template = context.getString(com.android.internal.R.string.numeric_date_template);
+            if (year < month && year < day) {
+                if (month < day) {
+                    result = String.format(template, yearValue, monthValue, dayValue);
+                } else {
+                    result = String.format(template, yearValue, dayValue, monthValue);
+                }
+            } else if (month < day) {
+                if (day < year) {
+                    result = String.format(template, monthValue, dayValue, yearValue);
+                } else { // unlikely
+                    result = String.format(template, monthValue, yearValue, dayValue);
+                }
+            } else { // date < month
+                if (month < year) {
+                    result = String.format(template, dayValue, monthValue, yearValue);
+                } else { // unlikely
+                    result = String.format(template, dayValue, yearValue, monthValue);
+                }
+            }
+
+            return result;
+        }
+        }
+
+        // The setting is not set; use the locale's default.
+        LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
+        return d.shortDateFormat4;
+    }
+// End of Vanzo:yujianpeng
 }
diff --git a/base/core/res/res/values/donottranslate-cldr.xml b/base/core/res/res/values/donottranslate-cldr.xml
index a8e2b2b..80db6e4 100755
--- a/base/core/res/res/values/donottranslate-cldr.xml
+++ b/base/core/res/res/values/donottranslate-cldr.xml
@@ -1,6 +1,7 @@
 
 
+    "%s/%s/%s"
     %B %-e, %Y
     %-l:%M:%S %p
     %b %-e, %Y, %-l:%M:%S %p
diff --git a/base/core/res/res/values/symbols.xml b/base/core/res/res/values/symbols.xml
index e9faf09..50a869a 100644
--- a/base/core/res/res/values/symbols.xml
+++ b/base/core/res/res/values/symbols.xml
@@ -2325,7 +2325,7 @@
    
    
    
-
+   
 
   
diff --git a/base/packages/Keyguard/res/values/strings_custom.xml b/base/packages/Keyguard/res/values/strings_custom.xml
new file mode 100755
index 0000000..c688ae5
--- /dev/null
+++ b/base/packages/Keyguard/res/values/strings_custom.xml
@@ -0,0 +1,4 @@
+
+
+    dd-MM-yyyy
+
diff --git a/base/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/base/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
index 86244b8..6c22fea 100644
--- a/base/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
+++ b/base/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
@@ -35,6 +35,12 @@ import android.widget.GridLayout;
 import android.widget.LinearLayout;
 import android.widget.TextClock;
 import android.widget.TextView;
+/* Vanzo:yujianpeng on: Fri, 01 Apr 2016 21:54:21 +0800
+ * add choose date format
+ */
+import android.provider.Settings;
+import libcore.icu.LocaleData;
+// End of Vanzo:yujianpeng
 
 import com.android.internal.widget.LockPatternUtils;
 
@@ -165,8 +171,17 @@ public class KeyguardStatusView extends GridLayout {
     }
 
     public void refreshTime() {
+/* Vanzo:yujianpeng on: Fri, 01 Apr 2016 21:55:48 +0800
+ * add choose date format
         mDateView.setFormat24Hour(Patterns.dateView);
         mDateView.setFormat12Hour(Patterns.dateView);
+ */
+        String dateFormat = getCustomDateFormatString(mContext);
+        if (dateFormat == null || "".equals(dateFormat))
+            dateFormat = getResources().getString(R.string.default_date_format);
+        mDateView.setFormat24Hour(dateFormat);
+        mDateView.setFormat12Hour(dateFormat);
+// End of Vanzo:yujianpeng
 
         if (bA1Support) {
             mClockView.setFormat12Hour(Patterns.clockView12);
@@ -286,4 +301,118 @@ public class KeyguardStatusView extends GridLayout {
             cacheKey = key;
         }
     }
+
+/* Vanzo:hanshengpeng on: Fri, 24 Jul 2015 15:57:35 +0800
+ * add choose date format
+ * this part was ported from 82lp
+*/
+    private String getCustomDateFormatString(Context context) {
+        String value = Settings.System.getString(context.getContentResolver(),
+                Settings.System.DATE_FORMAT);
+        return getDateFormatStringForSetting(context, value);
+    }
+
+    private String getDateFormatStringForSetting(Context context, String value) {
+        String result = null;
+        if (value != null) {
+            /// M: add week and arrange month day year according to resource's date format defination for settings. CR: ALPS00049014 @{
+            String dayValue = value.indexOf("dd") < 0 ? "d" : "dd";
+            String monthValue = value.indexOf("MMMM") < 0 ? (value.indexOf("MMM") < 0 ? (value.indexOf("MM") < 0 ? "M" : "MM") : "MMM") : "MMMM";
+            String yearValue = value.indexOf("yyyy") < 0 ? "y" : "yyyy";
+            String weekValue = value.indexOf("EEEE") < 0 ? "E" : "EEEE";
+
+            int day = value.indexOf(dayValue);
+            int month = value.indexOf(monthValue);
+            int year = value.indexOf(yearValue);
+            int week = value.indexOf(weekValue);
+
+            if (week >= 0 && month >= 0 && day >= 0 && year >= 0) {
+                String template = null;
+                if (week < day) {
+                    if (year < month && year < day) {
+                        if (month < day) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_year_month_day);
+                            result = String.format(template, weekValue, yearValue, monthValue, dayValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_year_day_month);
+                            result = String.format(template, weekValue, yearValue, dayValue, monthValue);
+                        }
+                    } else if (month < day) {
+                        if (day < year) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_month_day_year);
+                            result = String.format(template, weekValue, monthValue, dayValue, yearValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_month_year_day);
+                            result = String.format(template, weekValue, monthValue, yearValue, dayValue);
+                        }
+                    } else {
+                        if (month < year) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_day_month_year);
+                            result = String.format(template, weekValue, dayValue, monthValue, yearValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_day_year_month);
+                            result = String.format(template, weekValue, dayValue, yearValue, monthValue);
+                        }
+                    }
+                } else {
+                    if (year < month && year < day) {
+                        if (month < day) {
+                            template = context.getString(com.mediatek.internal.R.string.year_month_day_wday);
+                            result = String.format(template, yearValue, monthValue, dayValue, weekValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.year_day_month_wday);
+                            result = String.format(template, yearValue, dayValue, monthValue, weekValue);
+                        }
+                    } else if (month < day) {
+                        if (day < year) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_month_day_year);
+                            result = String.format(template, weekValue, monthValue, dayValue, yearValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_month_year_day);
+                            result = String.format(template, weekValue, monthValue, yearValue, dayValue);
+                        }
+                    } else {
+                        if (month < year) {
+                            template = context.getString(com.mediatek.internal.R.string.wday_day_month_year);
+                            result = String.format(template, weekValue, dayValue, monthValue, yearValue);
+                        } else {
+                            template = context.getString(com.mediatek.internal.R.string.wday_day_year_month);
+                            result = String.format(template, weekValue, dayValue, yearValue, monthValue);
+                        }
+                    }
+                }
+
+                return result;
+                /// M: @}
+        } else if (month >= 0 && day >= 0 && year >= 0) {
+            String template = context.getString(com.android.internal.R.string.numeric_date_template);
+            if (year < month && year < day) {
+                if (month < day) {
+                    result = String.format(template, yearValue, monthValue, dayValue);
+                } else {
+                    result = String.format(template, yearValue, dayValue, monthValue);
+                }
+            } else if (month < day) {
+                if (day < year) {
+                    result = String.format(template, monthValue, dayValue, yearValue);
+                } else { // unlikely
+                    result = String.format(template, monthValue, yearValue, dayValue);
+                }
+            } else { // date < month
+                if (month < year) {
+                    result = String.format(template, dayValue, monthValue, yearValue);
+                } else { // unlikely
+                    result = String.format(template, dayValue, yearValue, monthValue);
+                }
+            }
+
+            return result;
+        }
+        }
+
+        // The setting is not set; use the locale's default.
+        LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
+        return d.shortDateFormat4;
+    }
+// End of Vanzo:hanshengpeng
 }
diff --git a/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
index 186005c..d9eaabc 100644
--- a/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -31,6 +31,11 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
 
+/* Vanzo:songlixin on: Fri, 25 Apr 2014 15:50:51 +0800
+ */
+import java.util.Calendar;
+import android.text.format.DateFormat;
+// End of Vanzo:songlixin
 public class DateView extends TextView {
     private static final String TAG = "DateView";
 
@@ -98,6 +103,8 @@ public class DateView extends TextView {
     }
 
     protected void updateClock() {
+/* Vanzo:hanshengpeng on: Fri, 01 Nov 2013 14:56:08 +0800
+ * porting jb2->kk #53983
         if (mDateFormat == null) {
             final Locale l = Locale.getDefault();
             final String fmt = DateFormat.getBestDateTimePattern(l, mDatePattern);
@@ -111,5 +118,10 @@ public class DateView extends TextView {
             setText(text);
             mLastText = text;
         }
+ */
+        java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(mContext);
+        final Calendar now = Calendar.getInstance();
+        setText(shortDateFormat.format(now.getTime()));
+// End of Vanzo:hanshengpeng
     }
 }
(packages/apps/Settings)
diff --git a/res/xml/date_time_prefs.xml b/res/xml/date_time_prefs.xml
index 39d8743..f169374 100644
--- a/res/xml/date_time_prefs.xml
+++ b/res/xml/date_time_prefs.xml
@@ -53,4 +53,12 @@
         android:title="@string/date_time_24hour"
         />
 
+
+    
+
 
diff --git a/src/com/android/settings/DateTimeSettings.java b/src/com/android/settings/DateTimeSettings.java
index 474f026..fed3f03 100644
--- a/src/com/android/settings/DateTimeSettings.java
+++ b/src/com/android/settings/DateTimeSettings.java
@@ -81,6 +81,12 @@ public class DateTimeSettings extends SettingsPreferenceFragment
     private SwitchPreference mAutoTimeZonePref;
     private Preference mTimeZone;
     private Preference mDatePref;
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:18:33 +0800
+ * add date format
+ */
+    private static final String KEY_DATE_FORMAT = "date_format";
+    private ListPreference mDateFormat;
+// End of Vanzo: zhangsu
 
     // /M: add for GPS time sync feature @{
     private static final int DIALOG_GPS_CONFIRM = 2;
@@ -151,8 +157,50 @@ public class DateTimeSettings extends SettingsPreferenceFragment
         mTime24Pref = findPreference("24 hour");
         mTimeZone = findPreference("timezone");
         mDatePref = findPreference("date");
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:18:52 +0800
+ * add date format
+        if (isFirstRun) {
+            getPreferenceScreen().removePreference(mTime24Pref);
+        }
+ */
+        mDateFormat = (ListPreference) findPreference(KEY_DATE_FORMAT);
+        if (isFirstRun) {
+            getPreferenceScreen().removePreference(mTime24Pref);
+            getPreferenceScreen().removePreference(mDateFormat);
+        }
+        String [] dateFormats = getResources().getStringArray(R.array.date_format_values);
+        String [] formattedDates = new String[dateFormats.length];
+        String currentFormat = getDateFormat();
+        // Initialize if DATE_FORMAT is not set in the system settings
+        // This can happen after a factory reset (or data wipe)
+        if (currentFormat == null) {
+            currentFormat = "";
+        }
+
+        // Prevents duplicated values on date format selector.
+        mDummyDate.set(mDummyDate.get(Calendar.YEAR), mDummyDate.DECEMBER, 31, 13, 0, 0);
+
+        for (int i = 0; i < formattedDates.length; i++) {
+/* Vanzo:yujianpeng on: Fri, 01 Apr 2016 21:48:16 +0800
+ * TODO: replace this line with your comment
+            String formatted =DateFormat.getTimeFormat(getActivity()).format(mDummyDate.getTime());
+ */
+            String formatted =DateFormat.getDateFormatForSetting(getActivity(), dateFormats[i]).format(mDummyDate.getTime());
+// End of Vanzo:yujianpeng
+
+            if (dateFormats[i].length() == 0) {
+                formattedDates[i] = getResources().getString(R.string.normal_date_format, formatted);
+            } else {
+                formattedDates[i] = formatted;
+            }
+        }
+
+        mDateFormat.setEntries(formattedDates);
+        mDateFormat.setEntryValues(R.array.date_format_values);
+        mDateFormat.setValue(currentFormat);
+
+// End of Vanzo: zhangsu
 
-        // /M: modify as MTK add GPS time Sync feature
         boolean autoEnabled = autoTimeEnabled || autoTimeGpsEnabled;
         mTimePref.setEnabled(!autoEnabled);
         mDatePref.setEnabled(!autoEnabled);
@@ -193,18 +241,51 @@ public class DateTimeSettings extends SettingsPreferenceFragment
         // We use 13:00 so we can demonstrate the 12/24 hour options.
         mDummyDate.set(now.get(Calendar.YEAR), 11, 31, 13, 0, 0);
         Date dummyDate = mDummyDate.getTime();
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:20:40 +0800
+ * add date format
+ */
+        java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(context);
+        mDateFormat.setSummary(shortDateFormat.format(dummyDate));
+
+// End of Vanzo: zhangsu
         mDatePref.setSummary(DateFormat.getLongDateFormat(context).format(now.getTime()));
         mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()));
         mTimeZone.setSummary(ZoneGetter.getTimeZoneOffsetAndName(now.getTimeZone(), now.getTime()));
         mTime24Pref.setSummary(DateFormat.getTimeFormat(getActivity()).format(dummyDate));
     }
 
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:21:01 +0800
+ * add date format
+ */
+    private void updateDateFormatEntries() {
+        String [] dateFormats = getResources().getStringArray(R.array.date_format_values);
+        String [] formattedDates = new String[dateFormats.length];
+        for (int i = 0; i < formattedDates.length; i++) {
+          //  String formatted =DateFormat.getTimeFormat(getActivity()).format(mDummyDate.getTime());
+            String formatted =DateFormat.getDateFormatForSetting(getActivity(), dateFormats[i]).format(mDummyDate.getTime());
+            if (dateFormats[i].length() == 0) {
+                formattedDates[i] = getResources().getString(R.string.normal_date_format, formatted);
+            } else {
+                formattedDates[i] = formatted;
+            }
+        }
+        mDateFormat.setEntries(formattedDates);
+    }
+
+// End of Vanzo: zhangsu
+
     @Override
     public void onDateSet(DatePicker view, int year, int month, int day) {
         final Activity activity = getActivity();
         if (activity != null) {
             setDate(activity, year, month, day);
             updateTimeAndDateDisplay(activity);
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:21:25 +0800
+ * add date format
+ */
+            updateDateFormatEntries();
+
+// End of Vanzo: zhangsu
         }
     }
 
@@ -250,6 +331,17 @@ public class DateTimeSettings extends SettingsPreferenceFragment
             Settings.Global.putInt(
                     getContentResolver(), Settings.Global.AUTO_TIME_ZONE, autoZoneEnabled ? 1 : 0);
             mTimeZone.setEnabled(!autoZoneEnabled);
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:21:54 +0800
+ * add date format
+ */
+        } else if (key.equals(KEY_DATE_FORMAT)) {
+            String format = preferences.getString(key,getResources().getString(R.string.default_date_format));
+            Settings.System.putString(getContentResolver(),Settings.System.DATE_FORMAT, format);
+            updateTimeAndDateDisplay(getActivity());
+            Intent timeChanged = new Intent(Intent.ACTION_TIME_CHANGED);
+            getActivity().sendBroadcast(timeChanged);
+
+// End of Vanzo: zhangsu
         }
     }
 
@@ -372,6 +464,14 @@ public class DateTimeSettings extends SettingsPreferenceFragment
                 is24Hour? HOURS_24 : HOURS_12);
     }
 
+/* Vanzo:zhangsu on: Sat, 25 Jul 2015 18:22:19 +0800
+ * add date format
+ */
+    private String getDateFormat() {
+        return Settings.System.getString(getContentResolver(),Settings.System.DATE_FORMAT);
+    }
+// End of Vanzo: zhangsu
+
     private boolean getAutoState(String name) {
         try {
             return Settings.Global.getInt(getContentResolver(), name) > 0;

二十:日历以星期一为开始 vendor
diff --git a/mediatek/proprietary/packages/apps/Calendar/res/xml/general_preferences.xml b/mediatek/proprietary/packages/apps/Calendar/res/xml/general_preferences.xml
index a0d1577..0b17327 100644
--- a/mediatek/proprietary/packages/apps/Calendar/res/xml/general_preferences.xml
+++ b/mediatek/proprietary/packages/apps/Calendar/res/xml/general_preferences.xml
@@ -26,7 +26,7 @@
             android:title="@string/preferences_show_week_num_title" />
         

二十一:硬件版本号 packages/apps/Settings
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 8c647c8..cb38e54 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -901,6 +901,7 @@
     "Versión de banda base"
     "Versión de núcleo"
     "Número de compilación"
+    "Versión de Hardware"
     "Estado de SELinux"
     "No disponible"
     "Estado"
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 94e27ea..8dce7fe 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -901,6 +901,7 @@
     "基带版本"
     "内核版本"
     "版本号"
+    "硬件版本号"
     "SELinux 状态"
     "不可用"
     "状态信息"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ad5ca8c..b57782d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2149,6 +2149,7 @@
     Kernel version
     
     Build number
+    Hardware version
     
     SELinux status
 
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
index b9ac889..de65506 100644
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -153,6 +153,12 @@ add brand name
                 android:title="@string/build_number"
                 android:summary="@string/device_info_default"/>
 
+        
+        
+
         
         

二十二:锁屏界面的PIN码和设置里面的那个锁SIM的PIN码 不能超过8位 (设置 > 安全 > 屏幕锁定方式 > PIN码 这个可以输多个是正确的,不用改)
锁屏(frameworks
diff --git a/base/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/base/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
index c41a2d2..3bb3d34 100644
--- a/base/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
+++ b/base/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
@@ -187,29 +187,33 @@ public class PasswordTextView extends View {
 
 
     public void append(char c) {
-        int visibleChars = mTextChars.size();
-        String textbefore = mText;
-        mText = mText + c;
-        int newLength = mText.length();
-        CharState charState;
-        if (newLength > visibleChars) {
-            charState = obtainCharState(c);
-            mTextChars.add(charState);
-        } else {
-            charState = mTextChars.get(newLength - 1);
-            charState.whichChar = c;
-        }
-        charState.startAppearAnimation();
+        if(mText.length()<8){
+            int visibleChars = mTextChars.size();
+            String textbefore = mText;
+            mText = mText + c;
+            int newLength = mText.length();
+            CharState charState;
+            if (newLength > visibleChars) {
+                charState = obtainCharState(c);
+                mTextChars.add(charState);
+            } else {
+                charState = mTextChars.get(newLength - 1);
+                charState.whichChar = c;
+            }
+            charState.startAppearAnimation();
 
-        // ensure that the previous element is being swapped
-        if (newLength > 1) {
-            CharState previousState = mTextChars.get(newLength - 2);
-            if (previousState.isDotSwapPending) {
-                previousState.swapToDotWhenAppearFinished();
+            // ensure that the previous element is being swapped
+            if (newLength > 1) {
+                CharState previousState = mTextChars.get(newLength - 2);
+                if (previousState.isDotSwapPending) {
+                    previousState.swapToDotWhenAppearFinished();
+                }
             }
+            userActivity();
+            sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length(), 0, 1);
+        }else{
+         return;
         }
-        userActivity();
-        sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length(), 0, 1);
     }
 
     public void setUserActivityListener(UserActivityListener userActivitiListener) {
SIM的( packages/apps/Settings
diff --git a/src/com/android/settings/IccLockSettings.java b/src/com/android/settings/IccLockSettings.java
index 2d8134d..293eed9 100644
--- a/src/com/android/settings/IccLockSettings.java
+++ b/src/com/android/settings/IccLockSettings.java
@@ -39,6 +39,7 @@ import android.widget.TabHost;
 import android.widget.TabHost.OnTabChangeListener;
 import android.widget.TabHost.TabContentFactory;
 import android.widget.TabHost.TabSpec;
+import android.text.InputFilter;
 import android.widget.TabWidget;
 import android.widget.Toast;
 
@@ -190,6 +191,8 @@ public class IccLockSettings extends InstrumentedPreferenceActivity
         addPreferencesFromResource(R.xml.sim_lock_settings);
 
         mPinDialog = (EditPinPreference) findPreference(PIN_DIALOG);
+        mPinDialog.getEditText().setFilters(new InputFilter[]{new InputFilter.LengthFilter(8)});
         mPinToggle = (SwitchPreference) findPreference(PIN_TOGGLE);
         if (savedInstanceState != null && savedInstanceState.containsKey(DIALOG_STATE)) {
             mDialogState = savedInstanceState.getInt(DIALOG_STATE);

 
  
 
 

你可能感兴趣的:(MTK)