Android6.0 MTK 需求文档(四)

来源:互联网 发布:ubuntu 写入硬件时间 编辑:程序博客网 时间:2024/06/12 22:33

一:取消用户模式

(frameworks/)

diff --git a/base/packages/SystemUI/res/layout/keyguard_status_bar.xml b/base/packages/SystemUI/res/layout/keyguard_status_bar.xmlindex 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.xmlindex 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.javaindex 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.cppindex 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 Versiondiff --git a/base/media/java/android/mtp/MtpDatabase.java b/base/media/java/android/mtp/MtpDatabase.javaindex 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);                 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);+                }+                else if(SystemProperties.get("ro.sys.usb.mtp.whql.enable").equals("0"))+                {+                    Log.d(TAG, "getDeviceProperty  length = " + length);+                    /// M: Added Modification for ALPS00278882 @{+                    if(property == MtpConstants.DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME) {+                        // Return the device name for the PC display if the FriendlyName is empty!!+                        deviceName = "Nova i4";++                        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: @}+                }+                /// M: @}+                 return MtpConstants.RESPONSE_OK;              case MtpConstants.DEVICE_PROPERTY_IMAGE_SIZE:



三:默认显示通话记录界面


(packages/apps/Dialer/src/com/android/dialer/list/ListsFragment.java)

diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.javaindex f01a475..5a3e706 100644--- a/src/com/android/dialer/list/ListsFragment.java+++ b/src/com/android/dialer/list/ListsFragment.java@@ -214,7 +214,7 @@ public class ListsFragment extends Fragment         mViewPager.setAdapter(mViewPagerAdapter);         mViewPager.setOffscreenPageLimit(TAB_COUNT_WITH_VOICEMAIL - 1);         mViewPager.setOnPageChangeListener(this);-        showTab(TAB_INDEX_SPEED_DIAL);+        showTab(TAB_INDEX_RECENTS);          mTabTitles = new String[TAB_COUNT_WITH_VOICEMAIL];         mTabTitles[TAB_INDEX_SPEED_DIAL] = getResources().getString(R.string.tab_speed_dial);


四:开机卡顿的情况下,刚进入Launcher就点击主菜单按钮的话,主菜单图标会和桌面图标会重叠显示

(packages/apps/Launcher3/src/com/android/launcher3/Launcher.java)

其实很简单,只要让用户第一次点击时休眠2S就好了

diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.javaindex 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<Integer, Integer> mItemIdToViewId = new HashMap<Integer, Integer>();     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) {


五:主菜单界面做成全透明

(packages/apps/Launcher3/)

diff --git a/res/values/styles.xml b/res/values/styles.xmlindex 7d60cbe..dc9511c 100755--- a/res/values/styles.xml+++ b/res/values/styles.xml@@ -41,7 +41,7 @@      <style name="Icon.AllApps">         <item name="android:background">@null</item>-        <item name="android:textColor">@color/quantum_panel_text_color</item>+        <item name="android:textColor">@color/outline_color</item>         <item name="android:drawablePadding">@dimen/dynamic_grid_icon_drawable_padding</item>         <item name="android:shadowRadius">0</item>         <item name="customShadows">false</item>diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.javaindex a000e43..f0407d9 100644--- a/src/com/android/launcher3/LauncherModel.java+++ b/src/com/android/launcher3/LauncherModel.java@@ -1442,7 +1442,7 @@ public class LauncherModel extends BroadcastReceiver                 runLoader = true;             }         }-        if (runLoader) {+        if (true) {             startLoader(PagedView.INVALID_RESTORE_PAGE);         }     }diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.javaindex cdde8c1..80309c8 100755--- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java+++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java@@ -206,7 +206,8 @@ public class LauncherStateTransitionAnimation {         final AnimatorSet animation = LauncherAnimUtils.createAnimatorSet();         final Resources res = mLauncher.getResources();         final boolean material = Utilities.ATLEAST_LOLLIPOP;-        final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime);+    //  final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime);+        final int revealDuration = 0;         final int itemsAlphaStagger =                 res.getInteger(R.integer.config_overlayItemsAlphaStagger); @@ -217,6 +218,9 @@ public class LauncherStateTransitionAnimation {         // If for some reason our views aren't initialized, don't animate         boolean initialized = buttonView != null; +        if (mLauncher != null) {+            mLauncher.getSearchDropTargetBar().hideSearchBar();+        }         // Cancel the current animation         cancelAnimation(); @@ -486,7 +490,8 @@ public class LauncherStateTransitionAnimation {         final AnimatorSet animation = LauncherAnimUtils.createAnimatorSet();         final Resources res = mLauncher.getResources();         final boolean material = Utilities.ATLEAST_LOLLIPOP;-        final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime);+    //  final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime);+        final int revealDuration = 16;         final int itemsAlphaStagger =                 res.getInteger(R.integer.config_overlayItemsAlphaStagger); @@ -714,7 +719,7 @@ public class LauncherStateTransitionAnimation {                     (fromWorkspaceState == Workspace.State.NORMAL_HIDDEN)) {                 // If we are transitioning from the overlay to the workspace, then show the                 // workspace search bar immediately and let the overlay search bar fade out on top-                mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, 0);+                mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, 500);             } else if (fromWorkspaceState == Workspace.State.NORMAL) {                 // If we are transitioning from the workspace to the overlay, then keep the                 // workspace search bar visible until the overlay search bar fades in on topdiff --git a/src/com/android/launcher3/SearchDropTargetBar.java b/src/com/android/launcher3/SearchDropTargetBar.javaindex b4cfe4b..388ce40 100755--- a/src/com/android/launcher3/SearchDropTargetBar.java+++ b/src/com/android/launcher3/SearchDropTargetBar.java@@ -63,7 +63,7 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D         }     } -    private static int DEFAULT_DRAG_FADE_DURATION = 175;+    private static int DEFAULT_DRAG_FADE_DURATION = 0;      private LauncherViewPropertyAnimator mDropTargetBarAnimator;     private LauncherViewPropertyAnimator mQSBSearchBarAnimator;@@ -167,6 +167,9 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D         }     } +    public void hideSearchBar () {+        mQSB.setVisibility(View.GONE);+    }     /**      * Animates the current search bar state to a new state.  If the {@param duration} is 0, then      * the state is applied immediately.@@ -179,7 +182,6 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D             AccessibilityManager am = (AccessibilityManager)                     getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);             mAccessibilityEnabled = am.isEnabled();-             animateViewAlpha(mQSBSearchBarAnimator, mQSB, newState.getSearchBarAlpha(),                     duration);             animateViewAlpha(mDropTargetBarAnimator, mDropTargetBar, newState.getDropTargetBarAlpha(),diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.javaindex 28747ea..6f515bc 100755--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java@@ -376,8 +376,8 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc                 padding.right, 0);         Rect bgPadding = new Rect();         background.getPadding(bgPadding);-        mContainerView.setBackground(background);-        mRevealView.setBackground(background.getConstantState().newDrawable());+       // mContainerView.setBackground(background);+       // mRevealView.setBackground(background.getConstantState().newDrawable());         mAppsRecyclerView.updateBackgroundPadding(bgPadding);         mAdapter.updateBackgroundPadding(bgPadding); diff --git a/src/com/android/launcher3/op09/AllAppsContainerView.java b/src/com/android/launcher3/op09/AllAppsContainerView.javaindex 48e0e3a..c2d5f4b 100755--- a/src/com/android/launcher3/op09/AllAppsContainerView.java+++ b/src/com/android/launcher3/op09/AllAppsContainerView.java@@ -439,8 +439,8 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc                 padding.right, 0);         Rect bgPadding = new Rect();         background.getPadding(bgPadding);-        mContainerView.setBackground(background);-        mRevealView.setBackground(background.getConstantState().newDrawable());+       // mContainerView.setBackground(background);+       // mRevealView.setBackground(background.getConstantState().newDrawable());         mAppsRecyclerView.updateBackgroundPadding(bgPadding);         mAdapter.updateBackgroundPadding(bgPadding); 


六:保修激活功能调整:当前接听来电150秒后会收到保修激活短信, 更换成总累计通话240秒

(packages/services/Telecomm/src/com/android/server/telecom/CallLogManager.java)

diff --git a/Telecomm/src/com/android/server/telecom/CallLogManager.java b/Telecomm/src/com/android/server/telecom/CallLogManager.javaindex 5360248..d4a5f9f 100644--- a/Telecomm/src/com/android/server/telecom/CallLogManager.java+++ b/Telecomm/src/com/android/server/telecom/CallLogManager.java@@ -47,6 +47,7 @@ import com.mediatek.telecom.volte.TelecomVolteUtils;  import java.util.ArrayList; import java.util.HashMap;+import android.provider.Settings;  /**  * Helper class that provides functionality to write information about calls and their associated@@ -248,6 +249,23 @@ final class CallLogManager extends CallsManagerListenerBase {         final boolean isOkToLogThisCall = !isEmergencyNumber || okToLogEmergencyNumber;          sendAddCallBroadcast(callType, duration);+        int status =  Settings.System.getInt(mContext.getContentResolver(),"sms_send_status",0);+        int callTimes =  Settings.System.getInt(mContext.getContentResolver(), "callTimes", 0);+        callTimes = callTimes + (int) (duration/1000);+        Settings.System.putInt(mContext.getContentResolver(), "callTimes", callTimes);++        if(callTimes >= 240 && status == 0 ){+            Intent intent=new Intent();+            intent.setAction("vanzo.intent.action.CALL_DURATION");+            mContext.sendBroadcast(intent);+            android.util.Log.i("huanghua","send action");+            Settings.System.putInt(mContext.getContentResolver(), "sms_send_status", 1);+        }          if (isOkToLogThisCall) {             Log.d(TAG, "Logging Calllog entry: " + callerInfo + ", "


七:锁定客户确认的版本当前页面的版本号和时间都要锁定不能变,增加一个指令*#11*#


(packages/apps/Dialer/)

diff --git a/res/values/strings_engineer.xml b/res/values/strings_engineer.xmlindex 9c9046f..488b512 100755--- a/res/values/strings_engineer.xml+++ b/res/values/strings_engineer.xml@@ -35,7 +35,7 @@     <string name="engineer_code_agingtest">*#11#</string>     <string name="engineer_code_smsregister">*#55555#</string>     <string name="engineer_code_writeimei">*#4634#</string>-+    <string name="internal_build_number">*#11*#</string>     <string name="engineer_entry_factorymode">com.mediatek.factorymode/com.mediatek.factorymode.FactoryMode</string>     <string name="engineer_entry_agingtest">com.mediatek.factorymode/com.mediatek.factorymode.agingtest.AgingTestBegin</string>     <string name="engineer_entry_smsregister">com.android.smsregister/com.android.smsregister.TestSms</string>diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.javaindex f0d069e..a6f80c3 100755--- a/src/com/android/dialer/SpecialCharSequenceMgr.java+++ b/src/com/android/dialer/SpecialCharSequenceMgr.java@@ -16,6 +16,7 @@  package com.android.dialer; +import android.view.WindowManager; import android.app.Activity; import android.app.AlertDialog; import android.app.DialogFragment;@@ -197,6 +198,7 @@ public class SpecialCharSequenceMgr {                 || handlePinEntry(context, dialString)                 || handleAdnEntry(context, dialString, textField)                 || handleSecretCode(context, dialString)+                || handleInternalBuildNumber(context,dialString)                 /// M: for OP09 6M project @{                 || handleVersionCode(context, dialString)                 /// @}@@ -224,10 +226,29 @@ public class SpecialCharSequenceMgr { /* Vanzo:yujianpeng on: Wed, 08 Apr 2015 22:01:09 +0800  * implement #106626 secret passcode  */+    static boolean handleInternalBuildNumber(Context context,String input) {+        if(input.equals(context.getResources().getString(R.string.internal_build_number))) {+            String innerId = SystemProperties.get("ro.build.display.id");+            StringBuffer sb = new StringBuffer();+            AlertDialog alert = new AlertDialog.Builder(context)+                .setTitle("Device info")+                .setMessage(innerId)+                .setPositiveButton(android.R.string.ok, null)+                .setCancelable(false)+                .show();+            WindowManager.LayoutParams params = alert.getWindow().getAttributes();+            params.width = 400;+            params.height = 250;+            alert.getWindow().setAttributes(params);+            return true;+        }+        return false;+    }+     static boolean handleSWVersion(Context context, String input) {         if (input.equals(context.getResources().getString(R.string.build_version_code))) {             String boardinfo;-            boardinfo = SystemProperties.get("ro.build.display.id");+            boardinfo ="IntelkomQ1plusV0.3";             AlertDialog alert = new AlertDialog.Builder(context)                 .setTitle(R.string.sw_version_title)                 .setMessage(boardinfo)


(packages/apps/Settings/)

diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.javaindex 257b0fb..f3cf525 100644--- a/src/com/android/settings/DeviceInfoSettings.java+++ b/src/com/android/settings/DeviceInfoSettings.java@@ -105,7 +105,6 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In  */     private static final String KEY_ROCK_GOTA_UPDATE_SETTINGS = "rock_gota_system_update"; // End of Vanzo:tanglei-     static final int TAPS_TO_BE_A_DEVELOPER = 7;      long[] mHits = new long[3];@@ -151,10 +150,9 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In         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);+        setStringSummary(KEY_BUILD_NUMBER, "IntelkomQ1plusV0.3");         findPreference(KEY_BUILD_NUMBER).setEnabled(true);-        findPreference(KEY_KERNEL_VERSION).setSummary(getFormattedKernelVersion());-+        findPreference(KEY_KERNEL_VERSION).setSummary("3.18.19+\nuser@linux-user #2\nThu Oct 27 12:59:30 CST 2016");         if (!SELinux.isSELinuxEnabled()) {             String status = getResources().getString(R.string.selinux_status_disabled);             setStringSummary(KEY_SELINUX_STATUS, status);diff --git a/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java b/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.javaindex 9ae01f6..bcd9c9d 100644--- a/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java+++ b/src/com/mediatek/settings/deviceinfo/DeviceInfoSettingsExts.java@@ -87,7 +87,7 @@ public class DeviceInfoSettingsExts {         mExt.updateSummary(findPreference(KEY_DEVICE_MODEL), Build.MODEL,                 getString(R.string.device_info_default));         mExt.updateSummary(findPreference(KEY_BUILD_NUMBER), Build.DISPLAY,-                getString(R.string.device_info_default));+                "IntelkomQ1plusV0.3");         mExt.addEpushPreference(mRootContainer);          // /M: Add custom build version.@@ -155,7 +155,7 @@ public class DeviceInfoSettingsExts {          Log.d(TAG, "baseband = " + baseband + "modemSlot: " + modemSlot);         setValueSummary(KEY_BASEBAND_VERSION, baseband);-+        findPreference(KEY_BASEBAND_VERSION).setSummary("MOLY.WR8.W1449.MD.WG.MP.V57.P9,\n2016/10/27 12:08");           if (hasExternalModem && !FeatureOption.PURE_AP_USE_EXTERNAL_MODEM) {             String baseband2 = "gsm.version.baseband1"; 


(vanzo/packages/FactoryMode/src/com/mediatek/factorymode/buildversion/Buildversion.java

diff --git a/packages/FactoryMode/src/com/mediatek/factorymode/buildversion/Buildversion.java b/packages/FactoryMode/src/com/mediatek/factorymode/buildversion/Buildversion.javaindex 678acbb..18a8f42 100644--- a/packages/FactoryMode/src/com/mediatek/factorymode/buildversion/Buildversion.java+++ b/packages/FactoryMode/src/com/mediatek/factorymode/buildversion/Buildversion.java@@ -22,7 +22,7 @@ SharedPreferences mSp;         boardinfo = SystemProperties.get(KEY_BUILDVERSION);         AlertDialog.Builder builder = new AlertDialog.Builder(Buildversion.this);         builder.setTitle(R.string.build_version);-        builder.setMessage(boardinfo);+        builder.setMessage("IntelkomQ1plusV0.3");  builder.setCancelable(false);         builder.setPositiveButton(R.string.Success,                 new DialogInterface.OnClickListener() {




八:设置-app中的最后一项,工厂模式要去掉

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

diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.javaindex dd2bf90..a7a3f88 100644--- a/src/com/android/settings/applications/ManageApplications.java+++ b/src/com/android/settings/applications/ManageApplications.java@@ -902,7 +902,7 @@ public class ManageApplications extends InstrumentedFragment /*  * hide app  */-            List<String> hideApps  = Arrays.asList("com.opera.branding","com.cooee.widget.searchwidget","com.sherlock.news");+            List<String> hideApps  = Arrays.asList("com.opera.branding","com.mediatek.factorymode");             ArrayList<ApplicationsState.AppEntry> showEntries = new ArrayList<ApplicationsState.AppEntry>();             showEntries = origEntries;             for (int i=0; i< origEntries.size(); i++) {


九:关闭GPS功能

(packages/apps/Settings/packages/apps/Settings/)

diff --git a/src/com/android/settings/location/LocationMode.java b/src/com/android/settings/location/LocationMode.javaindex d203bc4..66e33d1 100644--- a/src/com/android/settings/location/LocationMode.java+++ b/src/com/android/settings/location/LocationMode.java@@ -67,8 +67,10 @@ public class LocationMode extends LocationSettingsBase         root = getPreferenceScreen();          mHighAccuracy = (RadioButtonPreference) root.findPreference(KEY_HIGH_ACCURACY);+        root.removePreference(mHighAccuracy);         mBatterySaving = (RadioButtonPreference) root.findPreference(KEY_BATTERY_SAVING);         mSensorsOnly = (RadioButtonPreference) root.findPreference(KEY_SENSORS_ONLY);+        root.removePreference(mSensorsOnly);         mHighAccuracy.setOnClickListener(this);         mBatterySaving.setOnClickListener(this);         mSensorsOnly.setOnClickListener(this);


十:去掉光距感

vanzo/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java

diff --git a/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java b/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.javaindex aaf2930..6f73063 100755--- a/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java+++ b/packages/FactoryMode/src/com/mediatek/factorymode/FactoryMode.java@@ -257,9 +257,7 @@ public class FactoryMode extends Activity implements OnItemClickListener {             mHaveWifi = false;         }         File file = new File("/sys/bus/platform/drivers/als_ps/ps");-        if (!file.exists()) {             mHavePsensor = false;-        }          File redFile = new File("/sys/class/leds/red/brightness");         File greenFile = new File("/sys/class/leds/green/brightness");@@ -269,10 +267,8 @@ public class FactoryMode extends Activity implements OnItemClickListener {         }          File file1 = new File("/dev/msensor");-        if (!file1.exists()) {             mHaveMsensor = false; -        }          File breathLight = new File("/sys/class/breathlightdrv/breathlight");



十一:双卡边单卡,更改SIM卡应用 icon  and  name 后无SIM卡应用

vendor/mediatek/proprietary/packages/apps/Stk/Android.mk)

diff --git a/mediatek/proprietary/packages/apps/Stk/Android.mk b/mediatek/proprietary/packages/apps/Stk/Android.mkindex b594be5..3b57b09 100755--- a/mediatek/proprietary/packages/apps/Stk/Android.mk+++ b/mediatek/proprietary/packages/apps/Stk/Android.mk@@ -41,25 +41,6 @@ ifneq ($(strip $(MTK_EMULATOR_SUPPORT)), yes) #ifndef MTK_TB_WIFI_3G_MODE ifneq ($(strip $(MTK_TB_WIFI_3G_MODE)),WIFI_ONLY) ifneq ($(strip $(MTK_MODEM_SUPPORT)), no)-ifneq ($(strip $(GEMINI)), yes)-    ifeq (OP01,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))-        LOCAL_MANIFEST_FILE := single/cmcc/AndroidManifest.xml-    else-        ifeq (OP02,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))-            LOCAL_MANIFEST_FILE := single/cu/AndroidManifest.xml-        else-            ifeq (OP03,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))-                LOCAL_MANIFEST_FILE := single/orange/AndroidManifest.xml-            else-                LOCAL_MANIFEST_FILE := single/AndroidManifest.xml-            endif-        endif-    endif-else-    ifeq (OP02,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))-        LOCAL_MANIFEST_FILE := cu/AndroidManifest.xml-    endif-endif  LOCAL_MODULE_TAGS := optional LOCAL_JAVA_LIBRARIES += telephony-common \



(vendor/mediatek/proprietary/packages/apps/Stk/AndroidManifest.xml

diff --git a/mediatek/proprietary/packages/apps/Stk/AndroidManifest.xml b/mediatek/proprietary/packages/apps/Stk/AndroidManifest.xmlindex 57ce52a..c9a52b8 100755--- a/mediatek/proprietary/packages/apps/Stk/AndroidManifest.xml+++ b/mediatek/proprietary/packages/apps/Stk/AndroidManifest.xml@@ -44,7 +44,7 @@                 <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>-+<!--         <activity android:name="StkLauncherActivity"             android:theme="@android:style/Theme.NoTitleBar"             android:configChanges="orientation"@@ -56,6 +56,16 @@                  <category android:name="android.intent.category.DEFAULT" />             </intent-filter>         </activity>+-->+        <activity android:name="StkLauncherActivityI"+                  android:label="@string/app_name"+                  android:theme="@android:style/Theme.NoDisplay"+                  android:enabled="false" +                  android:taskAffinity="android.task.stk.StkLauncherActivity">+                  <intent-filter>+                          <action android:name="android.intent.action.MAIN" />+                  </intent-filter>+          </activity>          <activity android:name="StkMenuActivity"             android:theme="@android:style/Theme.NoTitleBar"


0 0
原创粉丝点击