Search in sources :

Example 1 with ConfigMap

use of com.android.internal.utils.du.ActionConstants.ConfigMap 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();
}
Also used : ActionConfig(com.android.internal.utils.du.Config.ActionConfig) ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig) ConfigMap(com.android.internal.utils.du.ActionConstants.ConfigMap) HashMap(java.util.HashMap) Map(java.util.Map) ConfigMap(com.android.internal.utils.du.ActionConstants.ConfigMap)

Aggregations

ConfigMap (com.android.internal.utils.du.ActionConstants.ConfigMap)1 ActionConfig (com.android.internal.utils.du.Config.ActionConfig)1 ButtonConfig (com.android.internal.utils.du.Config.ButtonConfig)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1