| Chunk |
|---|
| Conflicting content |
|---|
import org.totschnig.myexpenses.preference.SharedPreferencesCompat; import org.totschnig.myexpenses.provider.DbUtils; <<<<<<< HEAD import org.totschnig.myexpenses.service.UnlockHandler; ======= import org.totschnig.myexpenses.service.PlanExecutor; >>>>>>> ed624d039d9107dd9dba9b62065b5900fefd37f1 import org.totschnig.myexpenses.util.Utils; import android.annotation.SuppressLint; |
| Solution content |
|---|
import org.totschnig.myexpenses.preference.SharedPreferencesCompat; import org.totschnig.myexpenses.provider.DbUtils; import org.totschnig.myexpenses.service.UnlockHandler; import org.totschnig.myexpenses.service.PlanExecutor; import org.totschnig.myexpenses.util.Utils; import android.annotation.SuppressLint; |
| File |
|---|
| MyApplication.java |
| Developer's decision |
|---|
| Concatenation |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.annotation.SuppressLint; import android.app.AlarmManager; import android.app.Application; <<<<<<< HEAD import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.res.Resources.NotFoundException; import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; ======= import android.app.PendingIntent; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.res.Resources.NotFoundException; import android.database.Cursor; import android.net.Uri; >>>>>>> ed624d039d9107dd9dba9b62065b5900fefd37f1 import android.preference.PreferenceManager; import android.provider.CalendarContract; import android.provider.CalendarContract.Calendars; |
| Solution content |
|---|
import android.annotation.SuppressLint; import android.app.AlarmManager; import android.app.Application; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.res.Resources.NotFoundException; import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; import android.app.PendingIntent; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.res.Resources.NotFoundException; import android.database.Cursor; import android.net.Uri; import android.preference.PreferenceManager; import android.provider.CalendarContract; import android.provider.CalendarContract.Calendars; |
| File |
|---|
| MyApplication.java |
| Developer's decision |
|---|
| Concatenation |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
} catch (IOException e) {
Log.w(TAG,"Failed to open property file");
}
<<<<<<< HEAD
initContribEnabled();
}
public boolean initContribEnabled() {
//TODO profile time taken in this function
int contribStatusInfo = Utils.getContribStatusInfo(this);
isContribEnabled = contribStatusInfo == -1 ||Utils.verifyLicenceKey(settings.getString(MyApplication.PREFKEY_ENTER_LICENCE, ""));
//we call MyExpensesContrib to check status
if (!isContribEnabled) {
Log.i(TAG,"contribStatusInfo: " + contribStatusInfo);
if (contribStatusInfo < 5) {
try {
final Messenger mMessenger = new Messenger(new UnlockHandler() {
public void handleMessage(Message msg) {
super.handleMessage(msg);
try {
unbindService(mConnection);
Log.i(TAG,"having handled message; unbinding from service");
} catch (IllegalArgumentException e) {
Log.i(TAG,"unbind service during handleMessage lead to IllegalArgumentException");
}
}
});
mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
// This is called when the connection with the service has been
// established, giving us the object we can use to
// interact with the service. We are communicating with the
// service using a Messenger, so here we get a client-side
// representation of that from the raw IBinder object.
mService = new Messenger(service);
try {
Message msg = Message.obtain();
msg.replyTo = mMessenger;
mService.send(msg);
} catch (RemoteException e) {
Log.w(TAG,"Could not communicate with licence verification service");
}
}
public void onServiceDisconnected(ComponentName className) {
// This is called when the connection with the service has been
// unexpectedly disconnected -- that is, its process crashed.
mService = null;
}
};
if (!bindService(new Intent("org.totschnig.myexpenses.contrib.MyService"), mConnection,
Context.BIND_AUTO_CREATE)) {
showImportantUpgradeInfo = Utils.doesPackageExist(this, "org.totschnig.myexpenses.contrib");
try {
//prevent ServiceConnectionLeaked warning
unbindService(mConnection);
} catch (Throwable t) {}
}
//TODO implement dialog showing contribupgradeinfo
} catch (SecurityException e) {
Log.w(TAG,"Could not bind to licence verification service");
}
}
else
showContribRetryLimitReachedInfo = true;
} else
Log.i(TAG,"Contrib status enabled");
=======
refreshContribEnabled();
initPlaner();
}
public boolean refreshContribEnabled() {
isContribEnabled = Utils.verifyLicenceKey(settings.getString(MyApplication.PREFKEY_ENTER_LICENCE, ""));
>>>>>>> ed624d039d9107dd9dba9b62065b5900fefd37f1
return isContribEnabled;
}
public static MyApplication getInstance() { |
| Solution content |
|---|
} catch (IOException e) {
Log.w(TAG,"Failed to open property file");
}
initContribEnabled();
initPlaner();
}
public boolean initContribEnabled() {
//TODO profile time taken in this function
int contribStatusInfo = Utils.getContribStatusInfo(this);
isContribEnabled = contribStatusInfo == -1 ||Utils.verifyLicenceKey(settings.getString(MyApplication.PREFKEY_ENTER_LICENCE, ""));
//we call MyExpensesContrib to check status
if (!isContribEnabled) {
Log.i(TAG,"contribStatusInfo: " + contribStatusInfo);
if (contribStatusInfo < 5) {
try {
final Messenger mMessenger = new Messenger(new UnlockHandler() {
public void handleMessage(Message msg) {
super.handleMessage(msg);
try {
unbindService(mConnection);
Log.i(TAG,"having handled message; unbinding from service");
} catch (IllegalArgumentException e) {
Log.i(TAG,"unbind service during handleMessage lead to IllegalArgumentException");
}
}
});
mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
// This is called when the connection with the service has been
// established, giving us the object we can use to
// interact with the service. We are communicating with the
// service using a Messenger, so here we get a client-side
// representation of that from the raw IBinder object.
mService = new Messenger(service);
try {
Message msg = Message.obtain();
msg.replyTo = mMessenger;
mService.send(msg);
} catch (RemoteException e) {
Log.w(TAG,"Could not communicate with licence verification service");
}
}
public void onServiceDisconnected(ComponentName className) {
// This is called when the connection with the service has been
// unexpectedly disconnected -- that is, its process crashed.
mService = null;
}
};
if (!bindService(new Intent("org.totschnig.myexpenses.contrib.MyService"), mConnection,
Context.BIND_AUTO_CREATE)) {
showImportantUpgradeInfo = Utils.doesPackageExist(this, "org.totschnig.myexpenses.contrib");
try {
//prevent ServiceConnectionLeaked warning
unbindService(mConnection);
} catch (Throwable t) {}
}
//TODO implement dialog showing contribupgradeinfo
} catch (SecurityException e) {
Log.w(TAG,"Could not bind to licence verification service");
}
}
else
showContribRetryLimitReachedInfo = true;
} else
Log.i(TAG,"Contrib status enabled");
return isContribEnabled;
}
public static MyApplication getInstance() { |
| File |
|---|
| MyApplication.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
import org.totschnig.myexpenses.MyApplication; import org.totschnig.myexpenses.R; import org.totschnig.myexpenses.dialog.VersionDialogFragment; <<<<<<< HEAD import org.totschnig.myexpenses.dialog.MessageDialogFragment; ======= import org.totschnig.myexpenses.fragment.TaskExecutionFragment; >>>>>>> ed624d039d9107dd9dba9b62065b5900fefd37f1 import org.totschnig.myexpenses.model.Transaction; import org.totschnig.myexpenses.preference.SharedPreferencesCompat; import org.totschnig.myexpenses.provider.DbUtils; |
| Solution content |
|---|
import org.totschnig.myexpenses.MyApplication; import org.totschnig.myexpenses.R; import org.totschnig.myexpenses.dialog.VersionDialogFragment; import org.totschnig.myexpenses.dialog.MessageDialogFragment; import org.totschnig.myexpenses.model.Transaction; import org.totschnig.myexpenses.preference.SharedPreferencesCompat; import org.totschnig.myexpenses.provider.DbUtils; |
| File |
|---|
| LaunchActivity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |