use of com.android.internal.utils.du.Config.ActionConfig in project android_packages_apps_DUI by DirtyUnicorns.
the class FlingActionHandler method onUpLeftSwipe.
@Override
public void onUpLeftSwipe() {
ActionConfig left_swipe = (ActionConfig) mActionMap.get(ActionConstants.Fling.FLING_LEFT_UP_TAG);
ActionConfig right_swipe = (ActionConfig) mActionMap.get(ActionConstants.Fling.FLING_RIGHT_UP_TAG);
fireAction(!left_swipe.hasNoAction() ? left_swipe : right_swipe);
}
use of com.android.internal.utils.du.Config.ActionConfig in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ActionFragment method findAndUpdatePreference.
protected void findAndUpdatePreference(ActionConfig action, String tag) {
for (ActionPreference pref : mPrefHolder) {
if (pref.getTag().equals(mHolderTag)) {
if (action == null) {
action = pref.getDefaultActionConfig();
}
pref.setActionConfig(action);
ButtonConfig button = mButtons.get(pref.getConfigMap().button);
ActionConfig newAction = pref.getActionConfig();
button.setActionConfig(newAction, pref.getConfigMap().action);
mButtons = Config.replaceButtonAtPosition(mButtons, button, pref.getConfigMap());
Config.setConfig(getActivity(), mDefaults, mButtons);
onActionPolicyEnforced(mPrefHolder);
break;
}
}
}
use of com.android.internal.utils.du.Config.ActionConfig in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ActionFragment method loadAndSetConfigs.
private void loadAndSetConfigs() {
mButtons = Config.getConfig(getActivity(), mDefaults);
mDefaultButtons = Config.getDefaultConfig(getActivity(), mDefaults);
for (ActionPreference pref : mPrefHolder) {
pref.setDefaults(mDefaults);
ButtonConfig button = mButtons.get(pref.getConfigMap().button);
ActionConfig action = button.getActionConfig(pref.getConfigMap().action);
pref.setActionConfig(action);
ButtonConfig defButton = mDefaultButtons.get(pref.getConfigMap().button);
ActionConfig defAction = defButton.getActionConfig(pref.getConfigMap().action);
pref.setDefaultActionConfig(defAction);
}
}
use of com.android.internal.utils.du.Config.ActionConfig in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ActionPickerDialogActivity method sendResultAndFinish.
private void sendResultAndFinish(String result) {
Intent intent = new Intent("intent_action_action_picker");
intent.putExtra("result", Activity.RESULT_OK);
intent.putExtra("action_string", result);
ActionConfig actionConfig = new ActionConfig(this, result);
intent.putExtra("action_config", actionConfig);
sendBroadcastAsUser(intent, UserHandle.CURRENT);
setResult(Activity.RESULT_OK, intent);
finish();
}
Aggregations