Loading core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3415,4 +3415,7 @@ <!-- STK setup Call --> <string name="SetupCallDefault">Accept Call?</string> <!--Application killed toast --> <string name="app_killed_message">Application killed</string> </resources> policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −2 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ import android.view.KeyCharacterMap.FallbackAction; import android.view.accessibility.AccessibilityEvent; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Toast; import android.media.IAudioService; import android.media.AudioManager; Loading Loading @@ -666,6 +667,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { Runnable mBackLongPress = new Runnable() { public void run() { try { performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false); IActivityManager mgr = ActivityManagerNative.getDefault(); List<RunningAppProcessInfo> apps = mgr.getRunningAppProcesses(); for (RunningAppProcessInfo appInfo : apps) { Loading @@ -674,8 +676,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { // root, phone, etc.) if (uid >= Process.FIRST_APPLICATION_UID && uid <= Process.LAST_APPLICATION_UID && appInfo.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND) { Toast.makeText(mContext, R.string.app_killed_message, Toast.LENGTH_SHORT).show(); // Kill the entire pid if (appInfo.pkgList!=null && (apps.size() > 0)){ mgr.forceStopPackage(appInfo.pkgList[0]); }else{ Process.killProcess(appInfo.pid); } break; } } Loading Loading @@ -1661,7 +1668,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.KILL_APP_LONGPRESS_BACK, 0) == 1) { if (down && repeatCount == 0) { mHandler.postDelayed(mBackLongPress, 2000); mHandler.postDelayed(mBackLongPress, ViewConfiguration.getGlobalActionKeyTimeout()); } } } Loading Loading
core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3415,4 +3415,7 @@ <!-- STK setup Call --> <string name="SetupCallDefault">Accept Call?</string> <!--Application killed toast --> <string name="app_killed_message">Application killed</string> </resources>
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −2 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ import android.view.KeyCharacterMap.FallbackAction; import android.view.accessibility.AccessibilityEvent; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Toast; import android.media.IAudioService; import android.media.AudioManager; Loading Loading @@ -666,6 +667,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { Runnable mBackLongPress = new Runnable() { public void run() { try { performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false); IActivityManager mgr = ActivityManagerNative.getDefault(); List<RunningAppProcessInfo> apps = mgr.getRunningAppProcesses(); for (RunningAppProcessInfo appInfo : apps) { Loading @@ -674,8 +676,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { // root, phone, etc.) if (uid >= Process.FIRST_APPLICATION_UID && uid <= Process.LAST_APPLICATION_UID && appInfo.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND) { Toast.makeText(mContext, R.string.app_killed_message, Toast.LENGTH_SHORT).show(); // Kill the entire pid if (appInfo.pkgList!=null && (apps.size() > 0)){ mgr.forceStopPackage(appInfo.pkgList[0]); }else{ Process.killProcess(appInfo.pid); } break; } } Loading Loading @@ -1661,7 +1668,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.KILL_APP_LONGPRESS_BACK, 0) == 1) { if (down && repeatCount == 0) { mHandler.postDelayed(mBackLongPress, 2000); mHandler.postDelayed(mBackLongPress, ViewConfiguration.getGlobalActionKeyTimeout()); } } } Loading