use of com.android.internal.utils.du.Config.ActionConfig in project android_packages_apps_DUI by DirtyUnicorns.
the class FlingActionHandler method onDoubleLeftTap.
@Override
public void onDoubleLeftTap() {
ActionConfig left_tap = (ActionConfig) mActionMap.get(ActionConstants.Fling.DOUBLE_LEFT_TAP_TAG);
ActionConfig right_tap = (ActionConfig) mActionMap.get(ActionConstants.Fling.DOUBLE_RIGHT_TAP_TAG);
fireAction(!left_tap.hasNoAction() ? left_tap : right_tap);
}
use of com.android.internal.utils.du.Config.ActionConfig in project android_packages_apps_DUI by DirtyUnicorns.
the class FlingActionHandler method loadConfigs.
void loadConfigs() {
mActionMap.clear();
ArrayList<ButtonConfig> configs = Config.getConfig(mContext, ActionConstants.getDefaults(ActionConstants.FLING));
for (Map.Entry<String, ConfigMap> entry : ActionConstants.getDefaults(ActionConstants.FLING).getActionMap().entrySet()) {
ButtonConfig button = configs.get(entry.getValue().button);
ActionConfig action = button.getActionConfig(entry.getValue().action);
mActionMap.put(entry.getKey(), action);
}
isDoubleTapEnabled = !((ActionConfig) mActionMap.get(ActionConstants.Fling.DOUBLE_LEFT_TAP_TAG)).hasNoAction() || !((ActionConfig) mActionMap.get(ActionConstants.Fling.DOUBLE_RIGHT_TAP_TAG)).hasNoAction();
}
use of com.android.internal.utils.du.Config.ActionConfig in project android_packages_apps_DUI by DirtyUnicorns.
the class FlingActionHandler method onSingleLeftPress.
@Override
public void onSingleLeftPress() {
ActionConfig left_tap = (ActionConfig) mActionMap.get(ActionConstants.Fling.SINGLE_LEFT_TAP_TAG);
ActionConfig right_tap = (ActionConfig) mActionMap.get(ActionConstants.Fling.SINGLE_RIGHT_TAP_TAG);
fireAction(!left_tap.hasNoAction() ? left_tap : right_tap);
}
use of com.android.internal.utils.du.Config.ActionConfig in project android_packages_apps_DUI by DirtyUnicorns.
the class FlingActionHandler method onDoubleRightTap.
@Override
public void onDoubleRightTap() {
ActionConfig right_tap = (ActionConfig) mActionMap.get(ActionConstants.Fling.DOUBLE_RIGHT_TAP_TAG);
ActionConfig left_tap = (ActionConfig) mActionMap.get(ActionConstants.Fling.DOUBLE_LEFT_TAP_TAG);
fireAction(!right_tap.hasNoAction() ? right_tap : left_tap);
}
use of com.android.internal.utils.du.Config.ActionConfig in project android_packages_apps_DUI by DirtyUnicorns.
the class FlingActionHandler method onLongLeftPress.
@Override
public void onLongLeftPress() {
ActionConfig left_long = (ActionConfig) mActionMap.get(ActionConstants.Fling.LONG_LEFT_PRESS_TAG);
ActionConfig right_long = (ActionConfig) mActionMap.get(ActionConstants.Fling.LONG_RIGHT_PRESS_TAG);
if (ActionHandler.isLockTaskOn()) {
ActionHandler.turnOffLockTask();
} else {
fireAction(!left_long.hasNoAction() ? left_long : right_long);
}
}
Aggregations