1.摄像和图片保存后,区别不明显
packages/apps/Gallery2/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
/// M: [FEATURE.MODIFY] do not show play icon@{
int s = Math.min(width, height) / 6;
mVideoPlayIcon.draw(canvas, (width - s) / 2, (height - s) / 2, s, s);
2.修改摄像设置EIS为中文
vendor/mediatek/proprietary/packages/apps/Camera/res/values/strings.xml
EIS
3.安全锁屏画面日期重叠
frameworks/base/packages/Keyguard/res/layout/keyguard_bouncer.xml
4.卸载正在运行的应用手机会重启
frameworks/base/services/core/java/com/android/server/am/ActivityStack.java
// mWindowManager.notifyAppRelaunchingCleared(r.appToken);
5.短按camera键无法进入相机
/vendor/mediatek/proprietary/packages/apps/Camera/src/com/android/camera/CameraButtonIntentReceiver.java
// ComboPreferences pref = new ComboPreferences(context);
int cameraId = 0;//SettingUtils.readPreferredCameraId(pref);
// if (holder.tryOpen(cameraId) == null) {
// return;
// }
vendor/mediatek/proprietary/packages/apps/Camera/AndroidManifest.xml
6.自定义按键
device/techfaith/tf6750_66_n/mtk-kpd.kl
key 139 F2
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
case KeyEvent.KEYCODE_F1:{
result|=ACTION_PASS_TO_USER;
Intent intent;
if (down) {
intent = new Intent(“com.tf.intent.F1_ACTION_PRESS_DOWN”);
mHandler.postDelayed(mF1LongRun, ViewConfiguration.getGlobalActionKeyTimeout());
}else{
mHandler.removeCallbacks(mF1LongRun);
intent = new Intent(“com.tf.intent.F1_ACTION_PRESS_UP”);
}
mContext.sendBroadcast(intent, null);
break;
}
case KeyEvent.KEYCODE_F2:{
result|=ACTION_PASS_TO_USER;
Intent intent;
if (down) {
intent = new Intent(“com.tf.intent.F2_ACTION_PRESS_DOWN”);
mHandler.postDelayed(mF2LongRun, ViewConfiguration.getGlobalActionKeyTimeout());
}else{
mHandler.removeCallbacks(mF2LongRun);
intent = new Intent(“com.tf.intent.F2_ACTION_PRESS_UP”);
}
mContext.sendBroadcast(intent, null);
break;
}
7.锁屏添加时钟&桌面搜索去掉‘google’
frameworks/base/packages/Keyguard/res/layout/keyguard_bouncer.xml
*
packages/apps/QuickSearchBox/res/layout/search_activity.xml
android:background="@drawable/textfield_search_empty"
packages/apps/QuickSearchBox/res/layout/search_widget.xml
android:background="@drawable/textfield_search_empty"
8.快速搜索默认使用百度
packages/apps/QuickSearchBox/res/values/config.xml
9.删除图库,修改hotseat图标
packages/apps/Launcher3/res/xml/default_workspace_4x4.xml
packages/apps/Launcher3/res/xml/dw_phone_hotseat.xml
10.删除关机菜单中飞行模式选项
frameworks/base/core/res/res/values/config.xml
power
bugreport
users
11.开机后,锁屏壁纸出现屏幕闪烁和移位现象
packages/apps/Launcher3/src/com/android/launcher3/Workspace.java
@Override
public void doFrame(long frameTimeNanos) {
//updateOffset(false);
}
12.去掉长按二级菜单出现搜索功能
packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java
//allAppsButton.setOnLongClickListener(mLauncher);
13.添加系统微信,删除应用宝
/device/techfaith/a_15f_os/device.mk
#PRODUCT_PACKAGES += Yingyongbao
PRODUCT_PACKAGES += Weixin
14.将Launcher由二级桌面改为一级桌面;应用保留
packages/apps/Launcher3/src/com/android/launcher3/LauncherAppState.java
public static boolean isDisableAllApps(){
if(SystemProperties.get(“ro.build.product”).indexOf(“a_15f_os”)>=0){
return true;
}
return sContext.getResources().getBoolean(R.bool.config_isDisableAllApps);
}
packages/apps/Launcher3/src/com/android/launcher3/LauncherModel.java
// Create the ApplicationInfos
for (int i = 0; i < apps.size(); i++) {
LauncherActivityInfoCompat app = apps.get(i);
// This builds the icon bitmaps.
if(SystemProperties.get(“ro.build.product”).indexOf(“子项目”)>=0){
if(!appNeedHideInLauncher(app.getComponentName().getPackageName())){
// This builds the icon bitmaps.
mBgAllAppsList.add(new AppInfo(mContext, app, user, mIconCache,
quietMode));
}
}
}
private boolean appNeedHideInLauncher(String packageName){
boolean needHideInLauncher = false;
if (“com.android.calendar”.equals(packageName)
|| “com.android.email”.equals(packageName)
|| “com.android.music”.equals(packageName)
|| “com.baidu.BaiduMap”.equals(packageName)
|| “com.mfox.savepower”.equals(packageName)){
needHideInLauncher = true;
}
return needHideInLauncher;
}
/**
* Called when the icons for packages have been updated in the icon cache.
*/
case OP_UPDATE:
for (int i=0; i<N; i++) {
if (DEBUG_LOADERS) Log.d(TAG, "mAllAppsList.updatePackage " + packages[i]);
if(!appNeedHideInLauncher(packages[i])){
mIconCache.updateIconsForPkg(packages[i], mUser);
mBgAllAppsList.updatePackage(context, packages[i], mUser);
mApp.getWidgetCache().removePackage(packages[i], mUser);
}
}
if (added != null) {
if(LauncherAppState.isDisableAllApps()){
final ArrayList addedInfos = new ArrayList(added);
addAndBindAddedWorkspaceItems(context, addedInfos);
}else{
addAppsToAllApps(context, added);
}
}
15.长按power2秒弹框,5秒重启
frameworks/base/core/java/android/view/ViewConfiguration.java
private static final int DEFAULT_LONG_PRESS_TIMEOUT = 2000;
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
mHandler.sendMessageDelayed(msg,2000
/ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout()/);
vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6755/src/drivers/inc/keypad.h
#if 1 /* long press reset settings are moved to default.mak and cust_bldr.mak /
#define KPD_PMIC_LPRST_TD 3 / timeout period. 0: 8sec; 1: 11sec; 2: 14sec; 3: 5sec */
#define ONEKEY_REBOOT_NORMAL_MODE_PL
16.卸载正在运行的app,Launcher3停止运行
packages/apps/Launcher3/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
public void onPackageChanged(String packageName, UserHandle user) {
if(DEBUG)
Log.i(TAG,“onPackageChanged”);
try {
if(mPackageManager.getApplicationEnabledSetting(packageName)==PackageManager.COMPONENT_ENABLED_STATE_DISABLED){
return;
}
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
/if(mPackageManager.getApplicationEnabledSetting(packageName)==PackageManager.COMPONENT_ENABLED_STATE_DISABLED){
return;
}/
mCallback.onPackageChanged(packageName, UserHandleCompat.fromUser(user));
}
17.主界面进入主菜单后,点击home键返回主界面,时间图标会闪一下
packages/apps/Launcher3/src/com/android/launcher3/Launcher.java
if (alreadyOnHome) {
showWorkspace(false);
18.收到信息时振动无效
vendor/mediatek/proprietary/packages/apps/Mms/src/com/android/mms/transaction/MessagingNotification.java
if (notiProf.needVibrate()
/&& audioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_NOTIFICATION)/) {
defaults |= Notification.DEFAULT_VIBRATE;
}