| Chunk |
|---|
| Conflicting content |
|---|
import android.database.ContentObserver; import android.database.Cursor; import android.media.AudioService; <<<<<<< HEAD import android.os.*; ======= import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; >>>>>>> 301b97ac19caf677c481cdf86ed27b2dd80a81b3 import android.provider.Contacts.People; import android.provider.Settings; import android.server.BluetoothA2dpService; |
| Solution content |
|---|
import android.database.ContentObserver; import android.database.Cursor; import android.media.AudioService; import android.os.*; import android.provider.Contacts.People; import android.provider.Settings; import android.server.BluetoothA2dpService; |
| File |
|---|
| SystemServer.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
sendServiceArgsLocked(r, true);
}
<<<<<<< HEAD
private final boolean scheduleServiceRestartLocked(ServiceRecord r,
boolean allowCancel) {
boolean canceled = false;
long minDuration = SERVICE_RESTART_DURATION;
long resetTime = minDuration*2*2*2;
// Any delivered but not yet finished starts should be put back
// on the pending list.
final int N = r.deliveredStarts.size();
if (N > 0) {
for (int i=N-1; i>=0; i--) {
ServiceRecord.StartItem si = r.deliveredStarts.get(i);
if (si.intent == null) {
// We'll generate this again if needed.
} else if (!allowCancel || (si.deliveryCount < ServiceRecord.MAX_DELIVERY_COUNT
&& si.doneExecutingCount < ServiceRecord.MAX_DONE_EXECUTING_COUNT)) {
r.pendingStarts.add(0, si);
long dur = SystemClock.uptimeMillis() - si.deliveredTime;
dur *= 2;
if (minDuration < dur) minDuration = dur;
if (resetTime < dur) resetTime = dur;
} else {
Log.w(TAG, "Canceling start item " + si.intent + " in service "
+ r.name);
canceled = true;
}
}
r.deliveredStarts.clear();
}
=======
private final void scheduleServiceRestartLocked(ServiceRecord r) {
final long now = SystemClock.uptimeMillis();
>>>>>>> 301b97ac19caf677c481cdf86ed27b2dd80a81b3
r.totalRestartCount++;
if (r.restartDelay == 0) { |
| Solution content |
|---|
sendServiceArgsLocked(r, true);
}
private final boolean scheduleServiceRestartLocked(ServiceRecord r,
boolean allowCancel) {
boolean canceled = false;
final long now = SystemClock.uptimeMillis();
long minDuration = SERVICE_RESTART_DURATION;
long resetTime = SERVICE_RESET_RUN_DURATION;
// Any delivered but not yet finished starts should be put back
// on the pending list.
final int N = r.deliveredStarts.size();
if (N > 0) {
for (int i=N-1; i>=0; i--) {
ServiceRecord.StartItem si = r.deliveredStarts.get(i);
if (si.intent == null) {
// We'll generate this again if needed.
} else if (!allowCancel || (si.deliveryCount < ServiceRecord.MAX_DELIVERY_COUNT
&& si.doneExecutingCount < ServiceRecord.MAX_DONE_EXECUTING_COUNT)) {
r.pendingStarts.add(0, si);
long dur = SystemClock.uptimeMillis() - si.deliveredTime;
dur *= 2;
if (minDuration < dur) minDuration = dur;
if (resetTime < dur) resetTime = dur;
} else {
Log.w(TAG, "Canceling start item " + si.intent + " in service "
+ r.name);
canceled = true;
}
}
r.deliveredStarts.clear();
}
r.totalRestartCount++;
if (r.restartDelay == 0) { |
| File |
|---|
| ActivityManagerService.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (now > (r.restartTime+resetTime)) {
=======
// the beginning, so we don't infinitely increase the duration
// on a service that just occasionally gets killed (which is
// a normal case, due to process being killed to reclaim memory).
<<<<<<< HEAD
long now = SystemClock.uptimeMillis();
if (now > (r.restartTime+SERVICE_RESET_RUN_DURATION)) {
>>>>>>> 301b97ac19caf677c481cdf86ed27b2dd80a81b3
r.restartCount = 1;
r.restartDelay = minDuration;
} else { |
| Solution content |
|---|
// the beginning, so we don't infinitely increase the duration
// on a service that just occasionally gets killed (which is
// a normal case, due to process being killed to reclaim memory).
if (now > (r.restartTime+resetTime)) {
r.restartCount = 1;
r.restartDelay = minDuration;
} else { |
| File |
|---|
| ActivityManagerService.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
r.restartCount = 1;
r.restartDelay = minDuration;
} else {
<<<<<<< HEAD
r.restartDelay *= 4;
if (r.restartDelay < minDuration) {
r.restartDelay = minDuration;
}
=======
r.restartDelay *= SERVICE_RESTART_DURATION_FACTOR;
>>>>>>> 301b97ac19caf677c481cdf86ed27b2dd80a81b3
}
}
|
| Solution content |
|---|
r.restartCount = 1;
r.restartDelay = minDuration;
} else {
r.restartDelay *= SERVICE_RESTART_DURATION_FACTOR;
if (r.restartDelay < minDuration) {
r.restartDelay = minDuration;
}
}
}
|
| File |
|---|
| ActivityManagerService.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (!mRestartingServices.contains(r)) {
mRestartingServices.add(r);
}
<<<<<<< HEAD
r.cancelNotification();
=======
>>>>>>> 301b97ac19caf677c481cdf86ed27b2dd80a81b3
mHandler.removeCallbacks(r.restarter);
mHandler.postAtTime(r.restarter, r.nextRestartTime); |
| Solution content |
|---|
mHandler.removeCallbacks(r.restarter);
if (!mRestartingServices.contains(r)) {
mRestartingServices.add(r);
}
r.cancelNotification();
mHandler.postAtTime(r.restarter, r.nextRestartTime); |
| File |
|---|
| ActivityManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (!resDir.equals(baseDir)) pw.print(" resDir="); pw.print(resDir);
pw.print(" dataDir="); pw.println(dataDir);
pw.print(prefix); pw.print("app="); pw.println(app);
<<<<<<< HEAD
if (isForeground || foregroundId != 0) {
pw.print(prefix); pw.print("isForeground="); pw.print(isForeground);
pw.print(" foregroundId="); pw.print(foregroundId);
pw.print(" foregroundNoti="); pw.println(foregroundNoti);
}
pw.print(prefix); pw.print("lastActivity="); pw.print(lastActivity);
pw.print(" executingStart="); pw.print(executingStart);
pw.print(" restartTime="); pw.println(restartTime);
if (startRequested || lastStartId != 0) {
pw.print(prefix); pw.print("startRequested="); pw.print(startRequested);
pw.print(" stopIfKilled="); pw.print(stopIfKilled);
pw.print(" callStart="); pw.print(callStart);
pw.print(" lastStartId="); pw.println(lastStartId);
}
if (executeNesting != 0 || crashCount != 0 || restartCount != 0
|| restartDelay != 0 || nextRestartTime != 0) {
pw.print(prefix); pw.print("executeNesting="); pw.print(executeNesting);
pw.print(" restartCount="); pw.print(restartCount);
pw.print(" restartDelay="); pw.print(restartDelay);
pw.print(" nextRestartTime="); pw.print(nextRestartTime);
pw.print(" crashCount="); pw.println(crashCount);
}
if (deliveredStarts.size() > 0) {
pw.print(prefix); pw.println("Delivered Starts:");
dumpStartList(pw, prefix, deliveredStarts, SystemClock.uptimeMillis());
}
if (pendingStarts.size() > 0) {
pw.print(prefix); pw.println("Pending Starts:");
dumpStartList(pw, prefix, pendingStarts, 0);
}
=======
pw.print(prefix); pw.print("isForeground="); pw.print(isForeground);
pw.print(" lastActivity="); pw.println(lastActivity-now);
pw.print(prefix); pw.print("startRequested="); pw.print(startRequested);
pw.print(" startId="); pw.print(lastStartId);
pw.print(" executeNesting="); pw.print(executeNesting);
pw.print(" executingStart="); pw.print(executingStart-now);
pw.print(" crashCount="); pw.println(crashCount);
pw.print(prefix); pw.print("totalRestartCount="); pw.print(totalRestartCount);
pw.print(" restartCount="); pw.print(restartCount);
pw.print(" restartDelay="); pw.print(restartDelay);
pw.print(" restartTime="); pw.print(restartTime-now);
pw.print(" nextRestartTime="); pw.println(nextRestartTime-now);
>>>>>>> 301b97ac19caf677c481cdf86ed27b2dd80a81b3
if (bindings.size() > 0) {
Iterator |
| Solution content |
|---|
if (!resDir.equals(baseDir)) pw.print(" resDir="); pw.print(resDir);
pw.print(" dataDir="); pw.println(dataDir);
pw.print(prefix); pw.print("app="); pw.println(app);
if (isForeground || foregroundId != 0) {
pw.print(prefix); pw.print("isForeground="); pw.print(isForeground);
pw.print(" foregroundId="); pw.print(foregroundId);
pw.print(" foregroundNoti="); pw.println(foregroundNoti);
}
pw.print(prefix); pw.print("lastActivity="); pw.print(lastActivity-now);
pw.print(" executingStart="); pw.print(executingStart-now);
pw.print(" restartTime="); pw.println(restartTime);
if (startRequested || lastStartId != 0) {
pw.print(prefix); pw.print("startRequested="); pw.print(startRequested);
pw.print(" stopIfKilled="); pw.print(stopIfKilled);
pw.print(" callStart="); pw.print(callStart);
pw.print(" lastStartId="); pw.println(lastStartId);
}
if (executeNesting != 0 || crashCount != 0 || restartCount != 0
|| restartDelay != 0 || nextRestartTime != 0) {
pw.print(prefix); pw.print("executeNesting="); pw.print(executeNesting);
pw.print(" restartCount="); pw.print(restartCount);
pw.print(" restartDelay="); pw.print(restartDelay-now);
pw.print(" nextRestartTime="); pw.print(nextRestartTime-now);
pw.print(" crashCount="); pw.println(crashCount);
}
if (deliveredStarts.size() > 0) {
pw.print(prefix); pw.println("Delivered Starts:");
dumpStartList(pw, prefix, deliveredStarts, SystemClock.uptimeMillis());
}
if (pendingStarts.size() > 0) {
pw.print(prefix); pw.println("Pending Starts:");
dumpStartList(pw, prefix, pendingStarts, 0);
}
if (bindings.size() > 0) {
Iterator |
| File |
|---|
| ServiceRecord.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |