| Chunk |
|---|
| Conflicting content |
|---|
private synchronized final void update(String newName, int newState) {
if (newName != mHeadsetName || newState != mHeadsetState) {
<<<<<<< HEAD
boolean isUnplug = false;
if ( (mHeadsetState & BIT_HEADSET) > 0 || (mHeadsetState & BIT_HEADSET_NO_MIC) > 0) {
if ((newState & BIT_HEADSET) == 0 && (newState & BIT_HEADSET_NO_MIC) == 0)
isUnplug = true;
}
=======
boolean isUnplug = (newState == 0 && mHeadsetState > 0);
>>>>>>> 4d88cbd98e3398e9f8db48c4a054fba467a242ba
mHeadsetName = newName;
mPrevHeadsetState = mHeadsetState;
mHeadsetState = newState; |
| Solution content |
|---|
private synchronized final void update(String newName, int newState) {
if (newName != mHeadsetName || newState != mHeadsetState) {
boolean isUnplug = false;
if ( (mHeadsetState & BIT_HEADSET) > 0 || (mHeadsetState & BIT_HEADSET_NO_MIC) > 0) {
if ((newState & BIT_HEADSET) == 0 && (newState & BIT_HEADSET_NO_MIC) == 0)
isUnplug = true;
}
mHeadsetName = newName;
mPrevHeadsetState = mHeadsetState;
mHeadsetState = newState; |
| File |
|---|
| HeadsetObserver.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// TODO: Should we require a permission?
ActivityManagerNative.broadcastStickyIntent(intent, null);
<<<<<<< HEAD
=======
if (isUnplug) {
intent = new Intent(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
mContext.sendBroadcast(intent);
}
}
private synchronized final void updateAudioRoute() {
if (mAudioRouteNeedsUpdate) {
mAudioManager.setWiredHeadsetOn(mHeadsetState > 0);
mAudioRouteNeedsUpdate = false;
}
>>>>>>> 4d88cbd98e3398e9f8db48c4a054fba467a242ba
}
private final Handler mHandler = new Handler() { |
| Solution content |
|---|
// TODO: Should we require a permission?
ActivityManagerNative.broadcastStickyIntent(intent, null);
}
private final Handler mHandler = new Handler() { |
| File |
|---|
| HeadsetObserver.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method signature |