// Path: mobile/src/main/java/com/matejdro/wearvibrationcenter/preferences/PerAppSettings.java
// public class PerAppSettings {
//     public static final String VIRTUAL_APP_DEFAULT_SETTINGS = "com.matejdro.wearvibrationcenter.virtual.default";
// 
//     public static final EnumPreferenceDefinition<VibrationType> VIBRATION_TYPE = new EnumPreferenceDefinition<>("vibration_type", VibrationType.REGULAR);
//     public static final PreferenceDefinition<long[]> VIBRATION_PATTERN = new SimplePreferenceDefinition<>("vibration_pattern", new long[] { 0, 500, 250, 500, 250, 500, 1000 });
//     public static final PreferenceDefinition<Boolean> TURN_SCREEN_ON = new SimplePreferenceDefinition<>("turn_screen_on", false);
// 
//     public static final PreferenceDefinition<Boolean> ONLY_VIBRATE_ORIGINAL_VIBRATING = new SimplePreferenceDefinition<>("only_vibrate_original_vibrating", true);
//     public static final PreferenceDefinition<Boolean> RESPECT_ZEN_MODE = new SimplePreferenceDefinition<>("setting_respect_zen_mode", false);
// 
//     public static final PreferenceDefinition<Integer> MIN_VIBRATION_INTERVAL = new SimplePreferenceDefinition<>("min_vibration_interval", 5000);
//     public static final PreferenceDefinition<Boolean> NO_UPDATE_VIBRATIONS = new SimplePreferenceDefinition<>("setting_no_update_vibration", false);
//     public static final PreferenceDefinition<Boolean> NO_SUBSEQUENT_NOTIFICATION_VIBRATIONS = new SimplePreferenceDefinition<>("setting_no_subsequent_notification_vibration", false);
//     public static final PreferenceDefinition<Boolean> NO_VIBRATIONS_SCREEN_ON = new SimplePreferenceDefinition<>("no_vibration_screen_on", false);
//     public static final PreferenceDefinition<Boolean> IGNORE_LOCAL_ONLY = new SimplePreferenceDefinition<>("ignore_local_only", false);
//     public static final PreferenceDefinition<Boolean> ALLOW_PERSISTENT = new SimplePreferenceDefinition<>("allow_persistent", false);
// 
//     public static final PreferenceDefinition<Boolean> RESPECT_THETAER_MODE = new SimplePreferenceDefinition<>("respect_theater_mode", true);
//     public static final PreferenceDefinition<Boolean> RESPECT_CHARGING = new SimplePreferenceDefinition<>("respect_charging", true);
// 
//     public static final PreferenceDefinition<List<String>> EXCLUDING_REGEX = new SimplePreferenceDefinition<>("excluding_regex", null);
//     public static final PreferenceDefinition<List<String>> INCLUDING_REGEX = new SimplePreferenceDefinition<>("including_regex", null);
//     public static final PreferenceDefinition<List<String>> ALARM_REGEX = new SimplePreferenceDefinition<>("alarm_regex", null);
// 
//     public static final PreferenceDefinition<Integer> SNOOZE_DURATION = new SimplePreferenceDefinition<>("snooze_duration", 10 * 60);
// }


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.matejdro.wearutils.tasker.LocaleConstants;
import com.matejdro.wearutils.tasker.TaskerSetupActivity;
import com.matejdro.wearvibrationcenter.R;
import com.matejdro.wearvibrationcenter.preferences.PerAppSettings;
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        if (requestCode == TASKER_ACTION_REQUEST && resultCode == RESULT_OK)
        {
            setResult(RESULT_OK, data);
            finish();
            return;
        }

        super.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public void onBackPressed()
    {
        setResult(RESULT_CANCELED);
        super.onBackPressed();
    }

    public void startAlarm(View view) {
        startActivityForResult(new Intent(this, StartAlarmPreferenceActivity.class), TASKER_ACTION_REQUEST);
    }

    public void changeGlobalSettings(View view) {
        startActivityForResult(new Intent(this, TaskerGlobalSettingsActivity.class), TASKER_ACTION_REQUEST);
    }

    public void changeDefaultAppSettings(View view) {
        Intent appSettingsActivityIntent = new Intent(this, TaskerAppSettingsActivity.class);
// Path: mobile/src/main/java/com/matejdro/wearvibrationcenter/preferences/PerAppSettings.java
// public class PerAppSettings {
//     public static final String VIRTUAL_APP_DEFAULT_SETTINGS = "com.matejdro.wearvibrationcenter.virtual.default";
// 
//     public static final EnumPreferenceDefinition<VibrationType> VIBRATION_TYPE = new EnumPreferenceDefinition<>("vibration_type", VibrationType.REGULAR);
//     public static final PreferenceDefinition<long[]> VIBRATION_PATTERN = new SimplePreferenceDefinition<>("vibration_pattern", new long[] { 0, 500, 250, 500, 250, 500, 1000 });
//     public static final PreferenceDefinition<Boolean> TURN_SCREEN_ON = new SimplePreferenceDefinition<>("turn_screen_on", false);
// 
//     public static final PreferenceDefinition<Boolean> ONLY_VIBRATE_ORIGINAL_VIBRATING = new SimplePreferenceDefinition<>("only_vibrate_original_vibrating", true);
//     public static final PreferenceDefinition<Boolean> RESPECT_ZEN_MODE = new SimplePreferenceDefinition<>("setting_respect_zen_mode", false);
// 
//     public static final PreferenceDefinition<Integer> MIN_VIBRATION_INTERVAL = new SimplePreferenceDefinition<>("min_vibration_interval", 5000);
//     public static final PreferenceDefinition<Boolean> NO_UPDATE_VIBRATIONS = new SimplePreferenceDefinition<>("setting_no_update_vibration", false);
//     public static final PreferenceDefinition<Boolean> NO_SUBSEQUENT_NOTIFICATION_VIBRATIONS = new SimplePreferenceDefinition<>("setting_no_subsequent_notification_vibration", false);
//     public static final PreferenceDefinition<Boolean> NO_VIBRATIONS_SCREEN_ON = new SimplePreferenceDefinition<>("no_vibration_screen_on", false);
//     public static final PreferenceDefinition<Boolean> IGNORE_LOCAL_ONLY = new SimplePreferenceDefinition<>("ignore_local_only", false);
//     public static final PreferenceDefinition<Boolean> ALLOW_PERSISTENT = new SimplePreferenceDefinition<>("allow_persistent", false);
// 
//     public static final PreferenceDefinition<Boolean> RESPECT_THETAER_MODE = new SimplePreferenceDefinition<>("respect_theater_mode", true);
//     public static final PreferenceDefinition<Boolean> RESPECT_CHARGING = new SimplePreferenceDefinition<>("respect_charging", true);
// 
//     public static final PreferenceDefinition<List<String>> EXCLUDING_REGEX = new SimplePreferenceDefinition<>("excluding_regex", null);
//     public static final PreferenceDefinition<List<String>> INCLUDING_REGEX = new SimplePreferenceDefinition<>("including_regex", null);
//     public static final PreferenceDefinition<List<String>> ALARM_REGEX = new SimplePreferenceDefinition<>("alarm_regex", null);
// 
//     public static final PreferenceDefinition<Integer> SNOOZE_DURATION = new SimplePreferenceDefinition<>("snooze_duration", 10 * 60);
// }


// Path: mobile/src/main/java/com/matejdro/wearvibrationcenter/tasker/TaskerActionPickerActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.matejdro.wearutils.tasker.LocaleConstants;
import com.matejdro.wearutils.tasker.TaskerSetupActivity;
import com.matejdro.wearvibrationcenter.R;
import com.matejdro.wearvibrationcenter.preferences.PerAppSettings;

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        if (requestCode == TASKER_ACTION_REQUEST && resultCode == RESULT_OK)
        {
            setResult(RESULT_OK, data);
            finish();
            return;
        }

        super.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public void onBackPressed()
    {
        setResult(RESULT_CANCELED);
        super.onBackPressed();
    }

    public void startAlarm(View view) {
        startActivityForResult(new Intent(this, StartAlarmPreferenceActivity.class), TASKER_ACTION_REQUEST);
    }

    public void changeGlobalSettings(View view) {
        startActivityForResult(new Intent(this, TaskerGlobalSettingsActivity.class), TASKER_ACTION_REQUEST);
    }

    public void changeDefaultAppSettings(View view) {
        Intent appSettingsActivityIntent = new Intent(this, TaskerAppSettingsActivity.class);
        appSettingsActivityIntent.putExtra(TaskerAppSettingsActivity.EXTRA_SHOW_APP, PerAppSettings.VIRTUAL_APP_DEFAULT_SETTINGS);