| Chunk |
|---|
| Conflicting content |
|---|
if (!isScreenOn) {
*/
@Override
public void onPause() {
<<<<<<< HEAD
saveReadingPosition();
super.onPause();
}
private void printScreenAndCallState(String calledFrom) {
boolean isScreenOn = powerManager.isScreenOn();
LOG.debug(calledFrom + ": Screen is off");
} else {
LOG.debug(calledFrom + ": Screen is on");
}
int phoneState = telephonyManager.getCallState();
if ( phoneState == TelephonyManager.CALL_STATE_RINGING || phoneState == TelephonyManager.CALL_STATE_OFFHOOK ) {
LOG.debug(calledFrom + ": Detected call activity");
} else {
LOG.debug(calledFrom + ": No active call.");
}
}
private void startTextToSpeech() {
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO ) {
subscribeToMediaButtons();
}
File fos = getActivity().getDir("tts", Context.MODE_WORLD_WRITEABLE );
//Delete any old TTS files still present.
for ( File f: fos.listFiles() ) {
f.delete();
}
ttsItemPrep.clear();
if (! ttsAvailable ) {
return;
}
this.ttsPlaybackItemQueue.activate();
this.mediaLayout.setVisibility(View.VISIBLE);
this.waitDialog.setTitle(R.string.init_tts);
this.waitDialog.show();
backgroundHandler.post(new StreamToDiskRunnable());
=======
saveReadingPosition();
getActivity().unregisterReceiver(mReceiver);
super.onPause();
>>>>>>> 2bc7346f84b8fe57d1ed3e56de11b5d7339e9a6a
}
private class StreamToDiskRunnable implements Runnable { |
| Solution content |
|---|
*/
@Override
public void onPause() {
saveReadingPosition();
super.onPause();
}
private void printScreenAndCallState(String calledFrom) {
boolean isScreenOn = powerManager.isScreenOn();
if (!isScreenOn) {
LOG.debug(calledFrom + ": Screen is off");
} else {
LOG.debug(calledFrom + ": Screen is on");
}
int phoneState = telephonyManager.getCallState();
if ( phoneState == TelephonyManager.CALL_STATE_RINGING || phoneState == TelephonyManager.CALL_STATE_OFFHOOK ) {
LOG.debug(calledFrom + ": Detected call activity");
} else {
LOG.debug(calledFrom + ": No active call.");
}
}
private void startTextToSpeech() {
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO ) {
subscribeToMediaButtons();
}
File fos = getActivity().getDir("tts", Context.MODE_WORLD_WRITEABLE );
saveReadingPosition();
//Delete any old TTS files still present.
for ( File f: fos.listFiles() ) {
f.delete();
}
ttsItemPrep.clear();
if (! ttsAvailable ) {
return;
}
this.ttsPlaybackItemQueue.activate();
this.mediaLayout.setVisibility(View.VISIBLE);
this.waitDialog.setTitle(R.string.init_tts);
this.waitDialog.show();
backgroundHandler.post(new StreamToDiskRunnable());
}
private class StreamToDiskRunnable implements Runnable { |
| File |
|---|
| ReadingFragment.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| For statement |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
printScreenAndCallState("onStop()");
this.textToSpeech.shutdown();
<<<<<<< HEAD
saveReadingPosition();
this.waitDialog.dismiss();
=======
this.waitDialog.dismiss();
libraryService.close();
>>>>>>> 2bc7346f84b8fe57d1ed3e56de11b5d7339e9a6a
}
private void saveReadingPosition() { |
| Solution content |
|---|
printScreenAndCallState("onStop()");
this.textToSpeech.shutdown();
this.waitDialog.dismiss();
libraryService.close();
}
private void saveReadingPosition() { |
| File |
|---|
| ReadingFragment.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |