| Chunk |
|---|
| Conflicting content |
|---|
private static final String SHARED_PREFS_NAME = "com.android.calendar_preferences";
public static final String KEY_CLEAR_SEARCH_HISTORY = "preferences_clear_search_history";
// Preference keys
<<<<<<< HEAD
public static final String KEY_HIDE_DECLINED = "preferences_hide_declined";
public static final String KEY_WEEK_START_DAY = "preferences_week_start_day";
public static final String KEY_ALERTS = "preferences_alerts";
public static final String KEY_ALERTS_VIBRATE = "preferences_alerts_vibrate";
public static final String KEY_ALERTS_VIBRATE_WHEN = "preferences_alerts_vibrateWhen";
public static final String KEY_ALERTS_RINGTONE = "preferences_alerts_ringtone";
public static final String KEY_ALERTS_POPUP = "preferences_alerts_popup";
public static final String KEY_DEFAULT_REMINDER = "preferences_default_reminder";
/** Key to SharePreference for default view (CalendarController.ViewType) */
public static final String KEY_START_VIEW = "preferred_startView";
/**
* Key to SharePreference for default detail view (CalendarController.ViewType)
* Typically used by widget
*/
public static final String KEY_DETAILED_VIEW = "preferred_detailedView";
public static final String KEY_DEFAULT_CALENDAR = "preference_defaultCalendar";
// These must be in sync with the array preferences_week_start_day_values
public static final String WEEK_START_DEFAULT = "-1";
public static final String WEEK_START_SATURDAY = "7";
public static final String WEEK_START_SUNDAY = "1";
public static final String WEEK_START_MONDAY = "2";
// These keys are kept to enable migrating users from previous versions
private static final String KEY_ALERTS_TYPE = "preferences_alerts_type";
private static final String ALERT_TYPE_ALERTS = "0";
private static final String ALERT_TYPE_STATUS_BAR = "1";
private static final String ALERT_TYPE_OFF = "2";
=======
static final String KEY_HIDE_DECLINED = "preferences_hide_declined";
static final String KEY_ALERTS_TYPE = "preferences_alerts_type";
static final String KEY_ALERTS_VIBRATE = "preferences_alerts_vibrate";
static final String KEY_ALERTS_VIBRATE_WHEN = "preferences_alerts_vibrateWhen";
static final String KEY_ALERTS_RINGTONE = "preferences_alerts_ringtone";
static final String KEY_DEFAULT_REMINDER = "preferences_default_reminder";
static final String KEY_START_VIEW = "startView";
static final String KEY_DETAILED_VIEW = "preferredDetailedView";
static final String KEY_DEFAULT_CALENDAR = "preference_defaultCalendar";
static final String KEY_HOME_TZ_ENABLED = "preferences_home_tz_enabled";
static final String KEY_HOME_TZ = "preferences_home_tz";
// 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";
>>>>>>> 38ace6e53df6313bbfcc37d8190c4c4d85b67264
// Default preference values
public static final int DEFAULT_START_VIEW = CalendarController.ViewType.WEEK; |
| Solution content |
|---|
private static final String SHARED_PREFS_NAME = "com.android.calendar_preferences";
// Preference keys
public static final String KEY_HIDE_DECLINED = "preferences_hide_declined";
public static final String KEY_WEEK_START_DAY = "preferences_week_start_day";
public static final String KEY_CLEAR_SEARCH_HISTORY = "preferences_clear_search_history";
public static final String KEY_ALERTS = "preferences_alerts";
public static final String KEY_ALERTS_VIBRATE = "preferences_alerts_vibrate";
public static final String KEY_ALERTS_VIBRATE_WHEN = "preferences_alerts_vibrateWhen";
public static final String KEY_ALERTS_RINGTONE = "preferences_alerts_ringtone";
public static final String KEY_ALERTS_POPUP = "preferences_alerts_popup";
public static final String KEY_DEFAULT_REMINDER = "preferences_default_reminder";
/** Key to SharePreference for default view (CalendarController.ViewType) */
public static final String KEY_START_VIEW = "preferred_startView";
/**
* Key to SharePreference for default detail view (CalendarController.ViewType)
* Typically used by widget
*/
public static final String KEY_DETAILED_VIEW = "preferred_detailedView";
public static final String KEY_DEFAULT_CALENDAR = "preference_defaultCalendar";
// These must be in sync with the array preferences_week_start_day_values
public static final String WEEK_START_DEFAULT = "-1";
public static final String WEEK_START_SATURDAY = "7";
public static final String WEEK_START_SUNDAY = "1";
public static final String WEEK_START_MONDAY = "2";
// These keys are kept to enable migrating users from previous versions
private static final String KEY_ALERTS_TYPE = "preferences_alerts_type";
private static final String ALERT_TYPE_ALERTS = "0";
private static final String ALERT_TYPE_STATUS_BAR = "1";
private static final String ALERT_TYPE_OFF = "2";
static final String KEY_HOME_TZ_ENABLED = "preferences_home_tz_enabled";
static final String KEY_HOME_TZ = "preferences_home_tz";
// Default preference values
public static final int DEFAULT_START_VIEW = CalendarController.ViewType.WEEK; |
| File |
|---|
| CalendarPreferenceActivity.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/* The corner should be rounded on the top right and bottom right */
private static final float[] CORNERS = new float[] {0, 0, 5, 5, 5, 5, 0, 0};
<<<<<<< HEAD
public static final String INTENT_KEY_DETAIL_VIEW = "DETAIL_VIEW";
public static final String INTENT_KEY_VIEW_TYPE = "VIEW";
public static final String INTENT_VALUE_VIEW_TYPE_DAY = "DAY";
=======
private volatile static boolean mFirstTZRequest = true;
private volatile static boolean mTZQueryInProgress = false;
private volatile static boolean mUseHomeTZ = false;
private volatile static String mHomeTZ = Time.getCurrentTimezone();
private static HashSet |
| Solution content |
|---|
/* The corner should be rounded on the top right and bottom right */
private static final float[] CORNERS = new float[] {0, 0, 5, 5, 5, 5, 0, 0};
public static final String INTENT_KEY_DETAIL_VIEW = "DETAIL_VIEW";
public static final String INTENT_KEY_VIEW_TYPE = "VIEW";
public static final String INTENT_VALUE_VIEW_TYPE_DAY = "DAY";
private volatile static boolean mFirstTZRequest = true;
private volatile static boolean mTZQueryInProgress = false;
private volatile static boolean mUseHomeTZ = false;
private volatile static String mHomeTZ = Time.getCurrentTimezone();
private static HashSet |
| File |
|---|
| Utils.java |
| Developer's decision |
|---|
| Concatenation |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/
return prefs.getString(key, defaultValue);
}
<<<<<<< HEAD
public static int getSharedPreference(Context context, String key, int defaultValue) {
=======
/**
* Gets the time zone that Calendar should be displayed in
*
* This is a helper method to get the appropriate time zone for Calendar. If this
* is the first time this method has been called it will initiate an asynchronous
* query to verify that the data in preferences is correct. The callback supplied
* will only be called if this query returns a value other than what is stored in
* preferences and should cause the calling activity to refresh anything that
* depends on calling this method.
*
* @param context The calling activity
* @param callback The runnable that should execute if a query returns new values
* @return The string value representing the time zone Calendar should display
public static String getTimeZone(Context context, Runnable callback) {
synchronized (mTZCallbacks){
if (mFirstTZRequest) {
mTZQueryInProgress = true;
mFirstTZRequest = false;
SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
mUseHomeTZ = prefs.getBoolean(
CalendarPreferenceActivity.KEY_HOME_TZ_ENABLED, false);
mHomeTZ = prefs.getString(
CalendarPreferenceActivity.KEY_HOME_TZ, Time.getCurrentTimezone());
// TODO kick off async query
// When the async query returns it should synchronize on
// mTZCallbacks, update mUseHomeTZ, mHomeTZ, and the
// preferences, set mTZQueryInProgress to false, and call all
// the runnables in mTZCallbacks.
// TODO remove this line when we have a query
mTZQueryInProgress = false;
}
if (mTZQueryInProgress) {
mTZCallbacks.add(callback);
}
}
return mUseHomeTZ ? mHomeTZ : Time.getCurrentTimezone();
}
static void setSharedPreference(Context context, String key, String value) {
>>>>>>> 38ace6e53df6313bbfcc37d8190c4c4d85b67264
SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
return prefs.getInt(key, defaultValue);
} |
| Solution content |
|---|
/**
* Gets the time zone that Calendar should be displayed in
*
* This is a helper method to get the appropriate time zone for Calendar. If this
* is the first time this method has been called it will initiate an asynchronous
* query to verify that the data in preferences is correct. The callback supplied
* will only be called if this query returns a value other than what is stored in
* preferences and should cause the calling activity to refresh anything that
* depends on calling this method.
*
* @param context The calling activity
* @param callback The runnable that should execute if a query returns new values
* @return The string value representing the time zone Calendar should display
*/
public static String getTimeZone(Context context, Runnable callback) {
synchronized (mTZCallbacks){
if (mFirstTZRequest) {
mTZQueryInProgress = true;
mFirstTZRequest = false;
SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
mUseHomeTZ = prefs.getBoolean(
CalendarPreferenceActivity.KEY_HOME_TZ_ENABLED, false);
mHomeTZ = prefs.getString(
CalendarPreferenceActivity.KEY_HOME_TZ, Time.getCurrentTimezone());
// TODO kick off async query
// When the async query returns it should synchronize on
// mTZCallbacks, update mUseHomeTZ, mHomeTZ, and the
// preferences, set mTZQueryInProgress to false, and call all
// the runnables in mTZCallbacks.
// TODO remove this line when we have a query
mTZQueryInProgress = false;
}
if (mTZQueryInProgress) {
mTZCallbacks.add(callback);
}
}
return mUseHomeTZ ? mHomeTZ : Time.getCurrentTimezone();
}
public static String getSharedPreference(Context context, String key, String defaultValue) {
SharedPreferences prefs = CalendarPreferenceActivity.getSharedPreferences(context);
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);
} |
| File |
|---|
| Utils.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Method signature |