sanders: MotoActions: Nuke PiP action
* Useless
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<java-symbol type="string" name="app_does_not_support_pip" />
|
||||
</resources>
|
||||
@@ -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());
|
||||
|
||||
@@ -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[]{
|
||||
|
||||
Reference in New Issue
Block a user