sanders: MotoActions: Nuke PiP action

* Useless
This commit is contained in:
jhenrique09
2018-01-21 23:32:18 -02:00
committed by therootlord
parent fddc97c38d
commit a1b586ff86
6 changed files with 0 additions and 40 deletions

View File

@@ -68,7 +68,6 @@
<string name="action_dialer">Abrir discador</string>
<string name="action_email">Abrir app de mail</string>
<string name="action_messages">Abrir app de mensagens</string>
<string name="action_pip">Modo picture-in-picture</string>
<!-- Screen off gestures -->
<string name="screen_off_gestures_title">Gestos com a tela desligada</string>
@@ -90,6 +89,4 @@
<string name="haptic_feedback">Retorno tátil</string>
<string name="haptic_feedback_summary">Vibrar quando um gesto for detectado</string>
<!-- Pip -->
<string name="app_does_not_support_pip">O aplicativo não tem suporte ao modo picture-in-picture.</string>
</resources>

View File

@@ -31,7 +31,6 @@
<item>@string/action_flashlight</item>
<item>@string/action_camera</item>
<item>@string/action_screenshot</item>
<item>@string/action_pip</item>
</string-array>
<string-array name="fp_keys_listValues">
<item>0</item>
@@ -49,7 +48,6 @@
<item>110</item> <!-- flashlight -->
<item>111</item> <!-- camera -->
<item>112</item> <!-- screenshot -->
<item>120</item> <!-- pip -->
</string-array>
<string-array name="fp_keys_screen_off_listArray">

View File

@@ -68,7 +68,6 @@
<string name="action_dialer">Open dialer</string>
<string name="action_email">Open email app</string>
<string name="action_messages">Open messages app</string>
<string name="action_pip">Picture-in-Picture mode</string>
<!-- Screen off gestures -->
<string name="screen_off_gestures_title">Screen off gestures</string>
@@ -90,6 +89,4 @@
<string name="haptic_feedback">Haptic feedback</string>
<string name="haptic_feedback_summary">Vibrate when a touchscreen gesture is detected</string>
<!-- Pip -->
<string name="app_does_not_support_pip">App does not support picture-in-picture mode.</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<java-symbol type="string" name="app_does_not_support_pip" />
</resources>

View File

@@ -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());

View File

@@ -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[]{