Android6.0 MTK 需求文档(四)

本文档详细介绍了Android 6.0在MTK平台上的定制需求,包括取消用户模式设置、默认显示通话记录、解决开机卡顿后的显示问题、主菜单界面透明化、保修激活条件变更、版本锁定、工厂模式调整、关闭GPS功能、移除光距感应器以及双卡单卡应用图标与名称的更新等关键改动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一:取消用户模式

(frameworks/)

diff --git a/base/packages/SystemUI/res/layout/keyguard_status_bar.xml b/base/packages/SystemUI/res/layout/keyguard_status_bar.xml
index b5f917a..9eb3ce9 100644
--- a/base/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/base/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -29,6 +29,7 @@
         android:layout_width="@dimen/multi_user_switch_width_keyguard"
         android:layout_height="@dimen/status_bar_header_height_keyguard"
         android:layout_alignParentEnd="true"
+        android:visibility="gone"
         android:background="@drawable/ripple_drawable"
         android:layout_marginEnd="@dimen/multi_user_switch_keyguard_margin">
         <ImageView android:id="@+id/multi_user_avatar"
@@ -41,7 +42,7 @@
     <LinearLayout android:id="@+id/system_icons_super_container"
         android:layout_width="wrap_content"
         android:layout_height="@dimen/status_bar_header_height"
-        android:layout_toStartOf="@id/multi_user_switch"
+        android:layout_alignParentEnd="true"
         android:layout_alignWithParentIfMissing="true"
         android:layout_marginStart="16dp"
         android:paddingEnd="@dimen/system_icons_keyguard_padding_end">
diff --git a/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 5eca471..8659a02 100644
--- a/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -35,6 +35,7 @@
     <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
         android:layout_width="@dimen/multi_user_switch_width_collapsed"
         android:layout_height="@dimen/status_bar_header_height"
+        android:visibility="gone"
         android:layout_alignParentEnd="true"
         android:background="@drawable/ripple_drawable" >
         <ImageView android:id="@+id/multi_user_avatar"
@@ -50,7 +51,7 @@
         android:layout_height="@dimen/status_bar_header_height"
         android:clipChildren="false"
         android:clipToPadding="false"
-        android:layout_toStartOf="@id/multi_user_switch">
+        android:layout_alignParentEnd="true">
 
         <com.android.systemui.statusbar.phone.SettingsButton android:id="@+id/settings_button"
             style="@android:style/Widget.Material.Button.Borderless"


(packages/apps/Settings/src/com/android/settings/SettingsActivity.java)

diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 8527713..2312ab9 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -1393,6 +1393,7 @@ public class SettingsActivity extends Activity
                             || Utils.isMonkeyRunning()) {
                         removeTile = true;
                     }
+                        removeTile = true;
                 } else if (id == R.id.nfc_payment_settings) {
                     if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC)) {
                         removeTile = true;



二:mtp和ptp可不加下划线

(frameworks/)

diff --git a/av/media/mtp/MtpServer.cpp b/av/media/mtp/MtpServer.cpp
index 769c9b7..29a2f9d 100755
--- a/av/media/mtp/MtpServer.cpp
+++ b/av/media/mtp/MtpServer.cpp
@@ -499,7 +499,7 @@ MtpResponseCode MtpServer::doGetDeviceInfo() {
     mData.putString(string);   // Manufacturer
 
     property_get("ro.product.model", prop_value, "MTP Device");
-    string.set(prop_value);
+    string.set("不加下划线的mtp名称");
     mData.putString(string);   // Model
     string.set("1.0");
     mData.putString(string);   // Device Version
diff --git a/base/media/java/android/mtp/MtpDatabase.java b/base/media/java/android/mtp/MtpDatabase.java
index 0100695..4898a23 100755
--- a/base/media/java/android/mtp/MtpDatabase.java
+++ b/base/media/java/android/mtp/MtpDatabase.java
@@ -41,6 +41,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Locale;
+import android.os.SystemProperties;
 
 /**
  * {@hide}
@@ -844,17 +845,82 @@ public class MtpDatabase {
     private int getDeviceProperty(int property, long[] outIntValue, char[] outStringValue) {
         Log.d(TAG, "getDeviceProperty  property = 0x" + Integer.toHexString(property));
 
+        String value = "",deviceName;
+        int length = 0,lengthDeviceName = 0;
         switch (property) {
             case MtpConstants.DEVICE_PROPERTY_SYNCHRONIZATION_PARTNER:
+                //Ainge
+                // writable string properties kept in shared preferences
+                value = mDeviceProperties.getString(Integer.toString(property), ""); 
+                length = value.length();
+                if (length > 255) {
+                    length = 255; 
+                }    
+                value.getChars(0, length, outStringValue, 0);
+                outStringValue[length] = 0; 
+                /// M: Added for USB Develpment debug, more log for more debuging help @{
+                if(length > 0) { 
+                    Log.d(TAG, "getDeviceProperty  property = " + Integer.toHexString(property));
+                    Log.d(TAG, "getDeviceProperty  value = " + value + ", length = " + length);
+                }    
+                Log.d(TAG, "getDeviceProperty  length = " + length);
+
+                /// M: Added Modification for ALPS00278882 @{
+                // Return the device name for the PC display if the FriendlyName is empty!!
+                deviceName = "不加下划线的ptp名称";
+
+                lengthDeviceName = deviceName.length();
+                if (lengthDeviceName > 255) {
+                    lengthDeviceName = 255; 
+                }    
+                if(lengthDeviceName >0) {
+                    deviceName.getChars(0, lengthDeviceName, outStringValue, 0);
+                    outStringValue[lengthDeviceName] = 0; 
+                    Log.d(TAG, "getDeviceProperty  deviceName = " + deviceName + ", lengthDeviceName = " + lengthDeviceName);
+                } else {
+                    Log.d(TAG, "getDeviceProperty  lengthDeviceName = " + lengthDeviceName);
+                }    
+                /// M: @}
+                //Ainge
+                return MtpConstants.RESPONSE_OK;
             case MtpConstants.DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME:
                 // writable string properties kept in shared preferences
-                String value = mDeviceProperties.getString(Integer.toString(property), "");
-                int length = value.length();
+                value = mDeviceProperties.getString(Integer.toString(property), "");
+                length = value.length();
                 if (length > 255) {
                     length = 255;
                 }
                 value.getChars(0, length, outStringValue, 0);
            
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值