From a1b586ff860fb01afb3581a9156aa11a8f6bc424 Mon Sep 17 00:00:00 2001 From: jhenrique09 Date: Sun, 21 Jan 2018 23:32:18 -0200 Subject: [PATCH] sanders: MotoActions: Nuke PiP action * Useless --- MotoActions/res/values-pt-rBR/strings.xml | 3 --- MotoActions/res/values/array.xml | 2 -- MotoActions/res/values/strings.xml | 3 --- MotoActions/res/values/symbols.xml | 4 --- .../src/com/moto/actions/KeyHandler.java | 26 ------------------- .../com/moto/actions/actions/Constants.java | 2 -- 6 files changed, 40 deletions(-) delete mode 100644 MotoActions/res/values/symbols.xml diff --git a/MotoActions/res/values-pt-rBR/strings.xml b/MotoActions/res/values-pt-rBR/strings.xml index 23f6e82..294b6ac 100644 --- a/MotoActions/res/values-pt-rBR/strings.xml +++ b/MotoActions/res/values-pt-rBR/strings.xml @@ -68,7 +68,6 @@ Abrir discador Abrir app de mail Abrir app de mensagens - Modo picture-in-picture Gestos com a tela desligada @@ -90,6 +89,4 @@ Retorno tátil Vibrar quando um gesto for detectado - - O aplicativo não tem suporte ao modo picture-in-picture. diff --git a/MotoActions/res/values/array.xml b/MotoActions/res/values/array.xml index fed1737..87f086c 100644 --- a/MotoActions/res/values/array.xml +++ b/MotoActions/res/values/array.xml @@ -31,7 +31,6 @@ @string/action_flashlight @string/action_camera @string/action_screenshot - @string/action_pip 0 @@ -49,7 +48,6 @@ 110 111 112 - 120 diff --git a/MotoActions/res/values/strings.xml b/MotoActions/res/values/strings.xml index 82da8f5..c2191d8 100644 --- a/MotoActions/res/values/strings.xml +++ b/MotoActions/res/values/strings.xml @@ -68,7 +68,6 @@ Open dialer Open email app Open messages app - Picture-in-Picture mode Screen off gestures @@ -90,6 +89,4 @@ Haptic feedback Vibrate when a touchscreen gesture is detected - - App does not support picture-in-picture mode. diff --git a/MotoActions/res/values/symbols.xml b/MotoActions/res/values/symbols.xml deleted file mode 100644 index 71b806a..0000000 --- a/MotoActions/res/values/symbols.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/MotoActions/src/com/moto/actions/KeyHandler.java b/MotoActions/src/com/moto/actions/KeyHandler.java index d330fc3..736c0a6 100644 --- a/MotoActions/src/com/moto/actions/KeyHandler.java +++ b/MotoActions/src/com/moto/actions/KeyHandler.java @@ -59,7 +59,6 @@ import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.ViewConfiguration; -import android.widget.Toast; import com.android.internal.os.DeviceKeyHandler; import com.android.internal.util.ArrayUtils; @@ -582,11 +581,6 @@ public class KeyHandler implements DeviceKeyHandler { case ACTION_SCREENSHOT: triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_SYSRQ); break; - case ACTION_PIP: - if (!mKeyguardManager.inKeyguardRestrictedInputMode()) { - goToPipMode(); - } - break; case ACTION_LAST_APP: if (!mKeyguardManager.inKeyguardRestrictedInputMode()) { switchToLastApp(mContext); @@ -602,26 +596,6 @@ public class KeyHandler implements DeviceKeyHandler { mVibrator.vibrate(intensity); } - private void goToPipMode() { - ActivityInfo ai = getRunningActivityInfo(mContext); - if (ai != null && !ai.supportsPictureInPicture()) { - try { - PackageManager pm = mContext.getPackageManager(); - Resources resources = pm.getResourcesForApplication("com.moto.actions"); - int resId = resources.getIdentifier("app_does_not_support_pip", "string", "com.moto.actions"); - final String text = resources.getString(resId); - mHandler.post(new Runnable() { - public void run() { - Toast.makeText(mContext, text, Toast.LENGTH_SHORT).show(); - } - }); - } catch (Exception e) { - } - return; - } - triggerVirtualKeypress(mHandler, 171); - } - private void toggleScreenState() { if (mPowerManager.isScreenOn()) { mPowerManager.goToSleep(SystemClock.uptimeMillis()); diff --git a/MotoActions/src/com/moto/actions/actions/Constants.java b/MotoActions/src/com/moto/actions/actions/Constants.java index a067524..307f75d 100644 --- a/MotoActions/src/com/moto/actions/actions/Constants.java +++ b/MotoActions/src/com/moto/actions/actions/Constants.java @@ -63,7 +63,6 @@ public class Constants { public static final int ACTION_DIALER = 117; public static final int ACTION_EMAIL = 118; public static final int ACTION_MESSAGES = 119; - public static final int ACTION_PIP = 120; public static final int ACTION_LAST_APP = 121; public static final int[] sFPSupportedActions = new int[]{ ACTION_HOME, @@ -79,7 +78,6 @@ public class Constants { ACTION_FLASHLIGHT, ACTION_CAMERA, ACTION_SCREENSHOT, - ACTION_PIP, ACTION_LAST_APP }; public static final int[] sFPSupportedActionsScreenOff = new int[]{