| Chunk |
|---|
| Conflicting content |
|---|
if (notificationManager == null) {
return;
}
<<<<<<< HEAD
String title = getNotifTitle(notif);
String message = getNotifMessage(notif);
=======
String title = getNotifTitle(notif, mContext);
String message = getNotifMessage(notif, mContext);
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
if (DEBUG) Log.d(TAG, "setNiNotification, notifyId: " + notif.notificationId +
", title: " + title +
", message: " + message); |
| Solution content |
|---|
if (notificationManager == null) {
return;
}
String title = getNotifTitle(notif, mContext);
String message = getNotifMessage(notif, mContext);
if (DEBUG) Log.d(TAG, "setNiNotification, notifyId: " + notif.notificationId +
", title: " + title +
", message: " + message); |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
=======
}
mNiNotification.flags = Notification.FLAG_ONGOING_EVENT;
<<<<<<< HEAD
mNiNotification.tickerText = getNotifTicker(notif);
mNiNotification.tickerText = getNotifTicker(notif, mContext);
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
// if not to popup dialog immediately, pending intent will open the dialog
Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();
PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent, 0); |
| Solution content |
|---|
}
mNiNotification.flags = Notification.FLAG_ONGOING_EVENT;
mNiNotification.tickerText = getNotifTicker(notif, mContext);
// if not to popup dialog immediately, pending intent will open the dialog
Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();
PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent, 0); |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// notification and takes user input
private Intent getDlgIntent(GpsNiNotification notif)
{
<<<<<<< HEAD
Intent intent = new Intent();
String title = getDialogTitle(notif);
String message = getDialogMessage(notif);
// directly bring up the NI activity
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);
// put data in the intent
intent.putExtra(NI_INTENT_KEY_NOTIF_ID, notif.notificationId);
intent.putExtra(NI_INTENT_KEY_TITLE, title);
intent.putExtra(NI_INTENT_KEY_MESSAGE, message);
intent.putExtra(NI_INTENT_KEY_TIMEOUT, notif.timeout);
intent.putExtra(NI_INTENT_KEY_DEFAULT_RESPONSE, notif.defaultResponse);
if (DEBUG) Log.d(TAG, "generateIntent, title: " + title + ", message: " + message +
", timeout: " + notif.timeout);
return intent;
=======
Intent intent = new Intent();
String title = getDialogTitle(notif, mContext);
String message = getDialogMessage(notif, mContext);
// directly bring up the NI activity
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);
// put data in the intent
intent.putExtra(NI_INTENT_KEY_NOTIF_ID, notif.notificationId);
intent.putExtra(NI_INTENT_KEY_TITLE, title);
intent.putExtra(NI_INTENT_KEY_MESSAGE, message);
intent.putExtra(NI_INTENT_KEY_TIMEOUT, notif.timeout);
intent.putExtra(NI_INTENT_KEY_DEFAULT_RESPONSE, notif.defaultResponse);
if (DEBUG) Log.d(TAG, "generateIntent, title: " + title + ", message: " + message +
", timeout: " + notif.timeout);
return intent;
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
}
// Converts a string (or Hex string) to a char array |
| Solution content |
|---|
// notification and takes user input
private Intent getDlgIntent(GpsNiNotification notif)
{
Intent intent = new Intent();
String title = getDialogTitle(notif, mContext);
String message = getDialogMessage(notif, mContext);
// directly bring up the NI activity
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);
// put data in the intent
intent.putExtra(NI_INTENT_KEY_NOTIF_ID, notif.notificationId);
intent.putExtra(NI_INTENT_KEY_TITLE, title);
intent.putExtra(NI_INTENT_KEY_MESSAGE, message);
intent.putExtra(NI_INTENT_KEY_TIMEOUT, notif.timeout);
intent.putExtra(NI_INTENT_KEY_DEFAULT_RESPONSE, notif.defaultResponse);
if (DEBUG) Log.d(TAG, "generateIntent, title: " + title + ", message: " + message +
", timeout: " + notif.timeout);
return intent;
}
// Converts a string (or Hex string) to a char array |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// change this to configure notification display
static private String getNotifTicker(GpsNiNotification notif, Context context)
{
<<<<<<< HEAD
String ticker = String.format("Position request! ReqId: [%s] ClientName: [%s]",
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return ticker;
=======
String ticker = String.format(context.getString(R.string.gpsNotifTicker),
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return ticker;
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
}
// change this to configure notification display |
| Solution content |
|---|
// change this to configure notification display
static private String getNotifTicker(GpsNiNotification notif, Context context)
{
String ticker = String.format(context.getString(R.string.gpsNotifTicker),
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return ticker;
}
// change this to configure notification display |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// change this to configure notification display
static private String getNotifTitle(GpsNiNotification notif, Context context)
{
<<<<<<< HEAD
String title = String.format("Position Request");
return title;
=======
String title = String.format(context.getString(R.string.gpsNotifTitle));
return title;
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
}
// change this to configure notification display |
| Solution content |
|---|
// change this to configure notification display
static private String getNotifTitle(GpsNiNotification notif, Context context)
{
String title = String.format(context.getString(R.string.gpsNotifTitle));
return title;
}
// change this to configure notification display |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// change this to configure notification display
static private String getNotifMessage(GpsNiNotification notif, Context context)
{
<<<<<<< HEAD
String message = String.format(
"NI Request received from [%s] for client [%s]!",
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return message;
=======
String message = String.format(context.getString(R.string.gpsNotifMessage),
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return message;
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
}
// change this to configure dialog display (for verification) |
| Solution content |
|---|
// change this to configure notification display
static private String getNotifMessage(GpsNiNotification notif, Context context)
{
String message = String.format(context.getString(R.string.gpsNotifMessage),
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return message;
}
// change this to configure dialog display (for verification) |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// change this to configure dialog display (for verification)
static public String getDialogTitle(GpsNiNotification notif, Context context)
{
<<<<<<< HEAD
return getNotifTitle(notif);
=======
return getNotifTitle(notif, context);
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
}
// change this to configure dialog display (for verification) |
| Solution content |
|---|
// change this to configure dialog display (for verification)
static public String getDialogTitle(GpsNiNotification notif, Context context)
{
return getNotifTitle(notif, context);
}
// change this to configure dialog display (for verification) |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
// change this to configure dialog display (for verification)
static private String getDialogMessage(GpsNiNotification notif, Context context)
{
<<<<<<< HEAD
return getNotifMessage(notif);
=======
return getNotifMessage(notif, context);
>>>>>>> 78742e01f73d098076f55cf4f40f0a013a3d88ce
}
} |
| Solution content |
|---|
// change this to configure dialog display (for verification)
static private String getDialogMessage(GpsNiNotification notif, Context context)
{
return getNotifMessage(notif, context);
}
} |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |