Android6.0 MTK 需求文档(三)

本文档详细介绍了Android 6.0在MTK平台上的定制需求,包括修改client IDs,关闭WiFi通知音,优化Email中.vcf文件的处理,以及图库和设置应用的型号名显示等。具体涉及设备配置文件,Java源代码及系统服务的调整。

一:修改client ids

(device/mediatek/common/device.mk)

diff --git a/mediatek/common/device.mk b/mediatek/common/device.mk
index 6d3bd82..7e15fd1 100644
--- a/mediatek/common/device.mk
+++ b/mediatek/common/device.mk
@@ -336,11 +336,11 @@ endif
 $(call inherit-product-if-exists, google/products/gms.mk)
 
 PRODUCT_PROPERTY_OVERRIDES += \
-      ro.com.google.clientidbase=android-{country} \
-      ro.com.google.clientidbase.ms=android-{country} \
-      ro.com.google.clientidbase.yt=android-{country} \
-      ro.com.google.clientidbase.am=android-{country} \
-      ro.com.google.clientidbase.gmm=android-{country}
+      ro.com.google.clientidbase=android-advandigital \
+      ro.com.google.clientidbase.ms=android-advandigital \
+      ro.com.google.clientidbase.yt=android-advandigital \
+      ro.com.google.clientidbase.am=android-vimpelcom-ru \
+      ro.com.google.clientidbase.gmm=android-advandigital
 #endif
 #endif
 # End of Vanzo:hanshengpeng


二:关闭wifi通知音

(frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNotificationController.java)

diff --git a/opt/net/wifi/service/java/com/android/server/wifi/WifiNotificationController.java b/opt/net/wifi/service/java/com/android/server/wifi/WifiNotificationController.java
index 57ae95d..11c3fb6 100644
--- a/opt/net/wifi/service/java/com/android/server/wifi/WifiNotificationController.java
+++ b/opt/net/wifi/service/java/com/android/server/wifi/WifiNotificationController.java
@@ -355,12 +355,12 @@ final class WifiNotificationController {
             mNotificationRepeatTime = System.currentTimeMillis() + NOTIFICATION_REPEAT_DELAY_MS;
 
             ///M:@{
-            if (!mNotificationShown) {
-                mNotificationBuilder.setSound(RingtoneManager.getActualDefaultRingtoneUri(mContext,
-                    RingtoneManager.TYPE_NOTIFICATION));
-            } else {
+            //if (!mNotificationShown) {
+            //    mNotificationBuilder.setSound(RingtoneManager.getActualDefaultRingtoneUri(mContext,
+            //        RingtoneManager.TYPE_NOTIFICATION));
+            //} else {
                 mNotificationBuilder.setSound(null);
-            }
+            //}
             Slog.d(TAG, "Pop up notification, mNotificationBuilder.setSound");
             ///@}
             ///M: ALPS01931078 UserHandle change to OWNER


三:Email接收带有联系人(.vcf)的邮件,保存联系人,弹框选择保存位置,把Phone" 改成 Память телефона

(/packages/apps/ContactsCommon/src/com/mediatek/contacts/util/VcardUtils.java)

diff --git a/src/com/mediatek/contacts/util/VcardUtils.java b/src/com/mediatek/contacts/util/VcardUtils.java
index 59434dd..d795863 100644
--- a/src/com/mediatek/contacts/util/VcardUtils.java
+++ b/src/com/mediatek/contacts/util/VcardUtils.java
@@ -67,6 +67,7 @@ import com.mediatek.storage.StorageManagerEx;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 
 public class VcardUtils {
     private static final String TAG = "VcardUtils";
@@ -191,8 +192,15 @@ public class VcardUtils {
                 final AccountType accountType = accountTypes.getAccountType(account.type,
                         account.dataSet);
                 final Context context = getContext();
-
-                text1.setText(account.name);
+                String locale = Locale.getDefault().getLanguage();
+                Log.i("zhongyeqing", "label"+locale);
+                if("ru".equals(locale )&& account.name.equals("Phone")){ 
+                    text1.setText("Память телефона");
+                }else {
+                    text1.setText(account.name);
+                } 
                 text2.setText(accountType.getDisplayLabel(context));
 
                 return convertView;

四:电话/短信前面加了8 或者+7(后面的号码是一样的) ,短信需要合并成一个电话本

(packages/apps/Dialer/src/com/android/dialer/calllog/CallLogGroupBuilder.java)

diff --git a/src/com/android/dialer/calllog/CallLogGroupBuilder.java b/src/com/android/dialer/calllog/CallLogGroupBuilder.java
index 074f6dd..97e3f02 100644
--- a/src/com/android/dialer/calllog/CallLogGroupBuilder.java
+++ b/src/com/android/dialer/calllog/CallLogGroupBuilder.java
@@ -148,7 +148,7 @@ public class CallLogGroupBuilder {
                     CallLogQuery.ACCOUNT_COMPONENT_NAME);
             final String currentAccountId = cursor.getString(CallLogQuery.ACCOUNT_ID);
 
-            final boolean sameNumber = equalNumbers(firstNumber, currentNumber);
+            boolean sameNumber = equalNumbers(firstNumber, currentNumber);
             final boolean sameAccountComponentName = Objects.equals(
                     firstAccountComponentName,
                     currentAccountComponentName);
@@ -161,6 +161,21 @@ public class CallLogGroupBuilder {
             final long currentCallId = cursor.getLong(CallLogQuery.ID);
             final long date = cursor.getLong(CallLogQuery.DATE);
 
+            String currentNumber2;
+            if(sameNumber == false){
+                if(currentNumber.startsWith("8")){
+                    currentNumber2 = currentNumber.substring(1);
+                    currentNumber2 = "+7"+currentNumber2;
+
+                    sameNumber = equalNumbers(firstNumber, currentNumber2);
+                }else if(currentNumber.startsWith("+7")){
+                    currentNumber2 = currentNumber.substring(2);
+            
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值