| Chunk |
|---|
| Conflicting content |
|---|
private Notification mNiNotification;
public GpsNetInitiatedHandler(Context context) {
<<<<<<< HEAD
mContext = context;
mLocationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
=======
mContext = context;
mLocationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
>>>>>>> 79e642e8ed75033eacc461633a8f4cd5157d25df
}
// Handles NI events from HAL |
| Solution content |
|---|
private Notification mNiNotification;
public GpsNetInitiatedHandler(Context context) {
mContext = context;
mLocationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
}
// Handles NI events from HAL |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// Handles NI events from HAL
public void handleNiNotification(GpsNiNotification notif)
{
<<<<<<< HEAD
if (DEBUG) Log.d(TAG, "handleNiNotification" + " notificationId: " + notif.notificationId
+ " requestorId: " + notif.requestorId + " text: " + notif.text);
// Notify and verify with immediate pop-up
if (notif.needNotify && notif.needVerify && mPopupImmediately)
{
// Popup the dialog box now
openNiDialog(notif);
}
// Notify only, or delayed pop-up (change mPopupImmediately to FALSE)
if (notif.needNotify && !notif.needVerify ||
notif.needNotify && notif.needVerify && !mPopupImmediately)
{
// Show the notification
// if mPopupImmediately == FALSE and needVerify == TRUE, a dialog will be opened
// when the user opens the notification message
setNiNotification(notif);
}
// ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify; 3. privacy override.
if ( notif.needNotify && !notif.needVerify ||
!notif.needNotify && !notif.needVerify ||
notif.privacyOverride)
{
mLocationManager.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_ACCEPT);
}
//////////////////////////////////////////////////////////////////////////
// A note about timeout
// According to the protocol, in the need_notify and need_verify case,
// a default response should be sent when time out.
//
// In some GPS hardware, the GPS driver (under HAL) can handle the timeout case
// and this class GpsNetInitiatedHandler does not need to do anything.
//
// However, the UI should at least close the dialog when timeout. Further,
// for more general handling, timeout response should be added to the Handler here.
//
=======
if (DEBUG) Log.d(TAG, "handleNiNotification" + " notificationId: " + notif.notificationId
+ " requestorId: " + notif.requestorId + " text: " + notif.text);
// Notify and verify with immediate pop-up
if (notif.needNotify && notif.needVerify && mPopupImmediately)
{
// Popup the dialog box now
openNiDialog(notif);
}
// Notify only, or delayed pop-up (change mPopupImmediately to FALSE)
if (notif.needNotify && !notif.needVerify ||
notif.needNotify && notif.needVerify && !mPopupImmediately)
{
// Show the notification
// if mPopupImmediately == FALSE and needVerify == TRUE, a dialog will be opened
// when the user opens the notification message
setNiNotification(notif);
}
// ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify; 3. privacy override.
if ( notif.needNotify && !notif.needVerify ||
!notif.needNotify && !notif.needVerify ||
notif.privacyOverride)
{
mLocationManager.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_ACCEPT);
}
//////////////////////////////////////////////////////////////////////////
// A note about timeout
// According to the protocol, in the need_notify and need_verify case,
// a default response should be sent when time out.
//
// In some GPS hardware, the GPS driver (under HAL) can handle the timeout case
// and this class GpsNetInitiatedHandler does not need to do anything.
//
// However, the UI should at least close the dialog when timeout. Further,
// for more general handling, timeout response should be added to the Handler here.
//
>>>>>>> 79e642e8ed75033eacc461633a8f4cd5157d25df
}
// Sets the NI notification. |
| Solution content |
|---|
// Handles NI events from HAL
public void handleNiNotification(GpsNiNotification notif)
{
if (DEBUG) Log.d(TAG, "handleNiNotification" + " notificationId: " + notif.notificationId
+ " requestorId: " + notif.requestorId + " text: " + notif.text);
// Notify and verify with immediate pop-up
if (notif.needNotify && notif.needVerify && mPopupImmediately)
{
// Popup the dialog box now
openNiDialog(notif);
}
// Notify only, or delayed pop-up (change mPopupImmediately to FALSE)
if (notif.needNotify && !notif.needVerify ||
notif.needNotify && notif.needVerify && !mPopupImmediately)
{
// Show the notification
// if mPopupImmediately == FALSE and needVerify == TRUE, a dialog will be opened
// when the user opens the notification message
setNiNotification(notif);
}
// ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify; 3. privacy override.
if ( notif.needNotify && !notif.needVerify ||
!notif.needNotify && !notif.needVerify ||
notif.privacyOverride)
{
mLocationManager.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_ACCEPT);
}
//////////////////////////////////////////////////////////////////////////
// A note about timeout
// According to the protocol, in the need_notify and need_verify case,
// a default response should be sent when time out.
//
// In some GPS hardware, the GPS driver (under HAL) can handle the timeout case
// and this class GpsNetInitiatedHandler does not need to do anything.
//
// However, the UI should at least close the dialog when timeout. Further,
// for more general handling, timeout response should be added to the Handler here.
//
}
// Sets the NI notification. |
| File |
|---|
| GpsNetInitiatedHandler.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |