+++ b/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
@@ -1428,6+1428,12 @@ publicclassResolverActivityextendsActivity{// So far we only support a single other profile at a time.// The first one we see gets special treatment.for(ResolvedComponentInfo info : currentResolveList){+//android.util.Log.d("mh.mmi", "info.getResolveInfoAt(0):"+info.getResolveInfoAt(0).toString()+" intent:"+info.getIntentAt(0).getAction());+if(info.getResolveInfoAt(0).activityInfo.packageName.equals("xxx.xxx.xxx")+&& info.getIntentAt(0).getAction().equals("android.intent.action.SEND")){+ currentResolveList.remove(info);+break;+}if(info.getResolveInfoAt(0).targetUserId !=UserHandle.USER_CURRENT){
mOtherProfile =newDisplayResolveInfo(info.getIntentAt(0),
+++ b/vendor/mediatek/proprietary/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/WallpaperUtils.java
@@ -137,7+137,7 @@ publicfinalclassWallpaperUtils{// We need to ensure that there is enough extra space in the wallpaper// for the intended parallax effects-finalint defaultWidth, defaultHeight;+int defaultWidth, defaultHeight;if(res.getConfiguration().smallestScreenWidthDp >=720){
defaultWidth =(int)(maxDim *wallpaperTravelToScreenWidthRatio(maxDim, minDim));
defaultHeight = maxDim;
@@ -145,6+145,8 @@ publicfinalclassWallpaperUtils{
defaultWidth =Math.max((int)(minDim *WALLPAPER_SCREENS_SPAN), maxDim);
defaultHeight = maxDim;}+//mh.mmi+ defaultWidth = realSize.x;+ defaultHeight = realSize.y;
sDefaultWallpaperSize =newPoint(defaultWidth, defaultHeight);
取消关机振动
+++ b/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
@@ -88,7+88,7 @@ publicclassShutdownThreadextendsThread{privatestaticfinalintMOUNT_SERVICE_STOP_PERCENT=20;// length of vibration before shutting down-privatestaticfinalintSHUTDOWN_VIBRATE_MS=500;+privatestaticfinalintSHUTDOWN_VIBRATE_MS=0;
+++ b/frameworks/base/core/java/android/widget/TextView.java
@@ -7374,10+7374,10 @@ publicclassTextViewextendsViewimplementsViewTreeObserver.OnPreDrawListener// Consume arrows from keyboard devices to prevent focus leaving the editor.// DPAD/JOY devices (Gamepads, TV remotes) often lack a TAB key so allow those// to move focus with arrows.-if(event.getSource()==InputDevice.SOURCE_KEYBOARD+/*if (event.getSource() == InputDevice.SOURCE_KEYBOARD
&& isDirectionalNavigationKey(keyCode)) {
return KEY_EVENT_HANDLED;
- }
+ }*///mh.mmi
灭屏状态下收到短信、蓝牙收到文件,屏幕亮屏
vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+privatePowerManager.WakeLock mNotificationWakeLock;publicvoidonAsyncInflationFinished(Entry entry){
mPendingNotifications.remove(entry.key);// If there was an async task started after the removal, we don't want to add it back to// the list, otherwise we might get leaks.boolean isNew = mNotificationData.get(entry.key)==null;+//mh.20180424+ mNotificationWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK|PowerManager.ACQUIRE_CAUSES_WAKEUP+|PowerManager.ON_AFTER_RELEASE,TAG);+//end+ mNotificationWakeLock.setReferenceCounted(false);if(isNew &&!entry.row.isRemoved()){protectedvoidaddNotificationViews(Entry entry){if(entry ==null){return;}// Add the expanded view and icon.
mNotificationData.add(entry);Log.d(TAG,"packgename:"+entry.key);+//mh.20180424+if(!mPowerManager.isScreenOn()&& entry.key !=null&&(entry.key.contains("com.google.android.apps.messaging")+|| entry.key.contains("com.android.bluetooth"))){+ mNotificationWakeLock.acquire(5000);+Log.d(TAG,"special app notification turn screen on");+}+//endupdateNotifications();}publicvoidupdateNotification(StatusBarNotification notification,RankingMap ranking)throwsInflationException{......if(entry ==null){return;}
mNotificationData.add(entry);+//mh.20180424+if(!mPowerManager.isScreenOn()&& entry.key !=null&&(entry.key.contains("com.google.android.apps.messaging")+|| entry.key.contains("com.android.bluetooth"))){+ mNotificationWakeLock.acquire(5000);+Log.d(TAG,"special app notification turn screen on");+}+//end
mHeadsUpEntriesToRemoveOnSwitch.remove(entry);
mRemoteInputEntriesToRemoveOnCollapse.remove(entry);......
+++ packages/apps/Launcher3/src/com/android/launcher3/Launcher.java
@@ -2672,6+2672,7 @@ publicclassLauncherextendsBaseActivity// private contract between launcher and may be ignored in the future).boolean useLaunchAnimation =(v !=null)&&!intent.hasExtra(INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION);+ useLaunchAnimation =false;//andyBundle optsBundle = useLaunchAnimation ?getActivityLaunchOptions(v):null;UserHandle user = item ==null?null: item.user;
长按Home键 取消屏幕固定
frameworks/base/core/res/res/values/strings.xml
-<string name="lock_to_app_toast">To unpin this screen, touch & hold Back and Overview- buttons</string>+<string name="lock_to_app_toast">To unpin this screen, touch & hold Home buttons</string>
vendor/mediatek/proprietary/packages/apps/SystemUI/res/values/strings.xml
-<string name="screen_pinning_description">This keeps it in view until you unpin. Touch& hold Back and Overviewtounpin.</string>+<string name="screen_pinning_description">This keeps it in view until you unpin. Touch& hold Hometounpin.</string>
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
+importandroid.app.IActivityManager;+importandroid.view.accessibility.AccessibilityManager;+importandroid.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener;+importandroid.app.ActivityManagerNative;+privatevoidonLongPressBackMenu(){+IActivityManager activityManager =ActivityManagerNative.getDefault();+boolean touchExplorationEnabled = mAccessibilityManager.isTouchExplorationEnabled();+try{+boolean inLockTaskMode = activityManager.isInLockTaskMode();+Log.d("joyatel","onLongPressBackMenu......inLockTaskMode:"+inLockTaskMode+", touchExplorationEnabled:"+touchExplorationEnabled);+if(inLockTaskMode &&!touchExplorationEnabled){+ activityManager.stopLockTaskMode();+}+++}catch(RemoteException e){+Log.d(TAG,"Unable to reach activity manager", e);+}+++}
@@ -3488,6+3511,7 @@ publicclassPhoneWindowManagerimplementsWindowManagerPolicy{}elseif((event.getFlags()&KeyEvent.FLAG_LONG_PRESS)!=0){if(!keyguardOn){handleLongPressOnHome(event.getDeviceId());+onLongPressBackMenu();}}
publicstaticbooleanmustShowDeviceRoot(Intent intent){/// M: Discussed with QA, this option should always be shown-returnfalse;+returntrue;//devin.20180423//return intent.getBooleanExtra(DocumentsContract.EXTRA_SHOW_ADVANCED, false);}