Projects >> platform_packages_apps_calendar >>275232dae58bb24e3360a779ada9d24601a99bcf

Chunk
Conflicting content
    static final String KEY_HOME_TZ_ENABLED = "preferences_home_tz_enabled";
    static final String KEY_HOME_TZ = "preferences_home_tz";

<<<<<<< HEAD
=======
    // These must be in sync with the array preferences_alert_type_values
    static final String ALERT_TYPE_ALERTS = "0";
    static final String ALERT_TYPE_STATUS_BAR = "1";
    static final String ALERT_TYPE_OFF = "2";

    // The value to use when setting Calendar to use the device's time zone
    public static final String LOCAL_TZ = "AUTO";

>>>>>>> 9ccb1dd06d38173ce11f6a3e99a825c52f29da1b
    // Default preference values
    public static final int DEFAULT_START_VIEW = CalendarController.ViewType.WEEK;
    public static final int DEFAULT_DETAILED_VIEW = CalendarController.ViewType.DAY;
Solution content
    static final String KEY_HOME_TZ_ENABLED = "preferences_home_tz_enabled";
    static final String KEY_HOME_TZ = "preferences_home_tz";

    // The value to use when setting Calendar to use the device's time zone
    public static final String LOCAL_TZ = "AUTO";

    // Default preference values
    public static final int DEFAULT_START_VIEW = CalendarController.ViewType.WEEK;
    public static final int DEFAULT_DETAILED_VIEW = CalendarController.ViewType.DAY;
File
CalendarPreferenceActivity.java
Developer's decision
Combination
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
<<<<<<< HEAD
    CheckBoxPreference mAlert;
    ListPreference mVibrateWhen;
    RingtonePreference mRingtone;
    CheckBoxPreference mPopup;
=======
    CheckBoxPreference mUseHomeTZ;
    ListPreference mHomeTZ;

>>>>>>> 9ccb1dd06d38173ce11f6a3e99a825c52f29da1b

    /** Return a properly configured SharedPreferences instance */
    public static SharedPreferences getSharedPreferences(Context context) {
Solution content
    CheckBoxPreference mAlert;
    ListPreference mVibrateWhen;
    RingtonePreference mRingtone;
    CheckBoxPreference mPopup;
    CheckBoxPreference mUseHomeTZ;
    ListPreference mHomeTZ;

    /** Return a properly configured SharedPreferences instance */
    public static SharedPreferences getSharedPreferences(Context context) {
File
CalendarPreferenceActivity.java
Developer's decision
Concatenation
Kind of conflict
Attribute
Chunk
Conflicting content
        mAlert = (CheckBoxPreference) preferenceScreen.findPreference(KEY_ALERTS);
        mVibrateWhen = (ListPreference) preferenceScreen.findPreference(KEY_ALERTS_VIBRATE_WHEN);
        mRingtone = (RingtonePreference) preferenceScreen.findPreference(KEY_ALERTS_RINGTONE);
<<<<<<< HEAD
        mPopup = (CheckBoxPreference) preferenceScreen.findPreference(KEY_ALERTS_POPUP);
=======
        mUseHomeTZ = (CheckBoxPreference) preferenceScreen.findPreference(KEY_HOME_TZ_ENABLED);
        mHomeTZ = (ListPreference) preferenceScreen.findPreference(KEY_HOME_TZ);
        mHomeTZ.setSummary(mHomeTZ.getEntry());
>>>>>>> 9ccb1dd06d38173ce11f6a3e99a825c52f29da1b

        migrateOldPreferences(sharedPreferences);
Solution content
        migrateOldPreferences(sharedPreferences);

        mAlert = (CheckBoxPreference) preferenceScreen.findPreference(KEY_ALERTS);
        mVibrateWhen = (ListPreference) preferenceScreen.findPreference(KEY_ALERTS_VIBRATE_WHEN);
        mRingtone = (RingtonePreference) preferenceScreen.findPreference(KEY_ALERTS_RINGTONE);
        mPopup = (CheckBoxPreference) preferenceScreen.findPreference(KEY_ALERTS_POPUP);
        mUseHomeTZ = (CheckBoxPreference) preferenceScreen.findPreference(KEY_HOME_TZ_ENABLED);
        mHomeTZ = (ListPreference) preferenceScreen.findPreference(KEY_HOME_TZ);
        mHomeTZ.setSummary(mHomeTZ.getEntry());
File
CalendarPreferenceActivity.java
Developer's decision
Concatenation
Kind of conflict
Attribute
Cast expression
Method invocation
Chunk
Conflicting content
import java.util.TimeZone;

public class Utils {
<<<<<<< HEAD
    // Set to 0 until we have UI to perform undo
    public static final long UNDO_DELAY = 0;

    // For recurring events which instances of the series are being modified
    public static final int MODIFY_UNINITIALIZED = 0;
    public static final int MODIFY_SELECTED = 1;
    public static final int MODIFY_ALL_FOLLOWING = 2;
    public static final int MODIFY_ALL = 3;

    // When the edit event view finishes it passes back the appropriate exit code.
    public static final int DONE_REVERT = 0;
    public static final int DONE_SAVE = 1;
    public static final int DONE_DELETE = 2;

=======
    private static final boolean DEBUG = true;
    private static final String TAG = "CalUtils";
>>>>>>> 9ccb1dd06d38173ce11f6a3e99a825c52f29da1b
    private static final int CLEAR_ALPHA_MASK = 0x00FFFFFF;
    private static final int HIGH_ALPHA = 255 << 24;
    private static final int MED_ALPHA = 180 << 24;
Solution content
import java.util.TimeZone;

public class Utils {
    private static final boolean DEBUG = true;
    private static final String TAG = "CalUtils";
    // Set to 0 until we have UI to perform undo
    public static final long UNDO_DELAY = 0;

    // For recurring events which instances of the series are being modified
    public static final int MODIFY_UNINITIALIZED = 0;
    public static final int MODIFY_SELECTED = 1;
    public static final int MODIFY_ALL_FOLLOWING = 2;
    public static final int MODIFY_ALL = 3;

    // When the edit event view finishes it passes back the appropriate exit code.
    public static final int DONE_REVERT = 0;
    public static final int DONE_SAVE = 1;
    public static final int DONE_DELETE = 2;

    private static final int CLEAR_ALPHA_MASK = 0x00FFFFFF;
    private static final int HIGH_ALPHA = 255 << 24;
    private static final int MED_ALPHA = 180 << 24;
File
Utils.java
Developer's decision
Concatenation
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
        return prefs.getString(key, defaultValue);
    }

<<<<<<< HEAD
    public static int getSharedPreference(Context context, String key, int defaultValue) {
        SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
        return prefs.getInt(key, defaultValue);
    }

    /**
     * Asynchronously sets the preference with the given key to the given value
     *
     * @param context the context to use to get preferences from
     * @param key the key of the preference to set
     * @param value the value to set
     */
    public static void setSharedPreference(Context context, String key, String value) {
        SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
        prefs.edit().putString(key, value).apply();
    }
=======
    static void setSharedPreference(Context context, String key, boolean value) {
        SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
        SharedPreferences.Editor editor = prefs.edit();
        editor.putBoolean(key, value);
        editor.commit();
    }

    static void setDefaultView(Context context, int viewId) {
        String activityString = CalendarApplication.ACTIVITY_NAMES[viewId];
>>>>>>> 9ccb1dd06d38173ce11f6a3e99a825c52f29da1b

    /**
     * Save default agenda/day/week/month view for next time
Solution content
        return prefs.getString(key, defaultValue);
    }

    public static int getSharedPreference(Context context, String key, int defaultValue) {
        SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
        return prefs.getInt(key, defaultValue);
    }

    /**
     * Asynchronously sets the preference with the given key to the given value
     *
     * @param context the context to use to get preferences from
     * @param key the key of the preference to set
     * @param value the value to set
     */
    public static void setSharedPreference(Context context, String key, String value) {
        SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
        prefs.edit().putString(key, value).apply();
    }

    static void setSharedPreference(Context context, String key, boolean value) {
        SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
        SharedPreferences.Editor editor = prefs.edit();
        editor.putBoolean(key, value);
        editor.apply();
    }

    /**
     * Save default agenda/day/week/month view for next time
File
Utils.java
Developer's decision
Manual
Kind of conflict
Array access
Comment
Method declaration
Method signature
Variable