| Chunk |
|---|
| Conflicting content |
|---|
import android.app.Activity; import android.content.Intent; <<<<<<< HEAD ======= import android.content.SharedPreferences; >>>>>>> c9026e14efaff2e0abc72ad8e2efc03227f65f19 import android.os.Bundle; import android.preference.PreferenceManager; import android.view.Menu; |
| Solution content |
|---|
import android.content.Intent; import android.os.Bundle; |
| File |
|---|
| PostTextActivity.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import com.tacticalnuclearstrike.tttumblr.R;
import com.tacticalnuclearstrike.tttumblr.TumblrApi;
<<<<<<< HEAD
public class PostTextActivity extends Activity {
private final static String[] URL_PREFIXES = {"http://", "https://", "ftp://", "sftp://"};
=======
public class PostTextActivity extends PostActivity {
public static final String TAG = "PostTextActivity";
>>>>>>> c9026e14efaff2e0abc72ad8e2efc03227f65f19
@Override
public void onCreate(Bundle savedInstanceState) { |
| Solution content |
|---|
import com.tacticalnuclearstrike.tttumblr.R;
public class PostTextActivity extends PostActivity {
public static final String TAG = "PostTextActivity";
@Override
public void onCreate(Bundle savedInstanceState) { |
| File |
|---|
| PostTextActivity.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Array initializer |
| Attribute |
| Class signature |
| Chunk |
|---|
| Conflicting content |
|---|
setupOkButton();
<<<<<<< HEAD
Intent intent = getIntent();
String action = intent.getAction();
// SEND intents for URLs (from, for instance, the Browser) are also text,
// which is somewhat tedious. While it means that you can share a URL to
// an email program easily, it also means that you can't distinguish
// between an URL and plain body text. So we make this activity receive both
// text and URLs and launch the appropriate activity.
if (Intent.ACTION_SEND.equals(action)){
String textBody = intent.getExtras().getString(Intent.EXTRA_TEXT);
boolean isUrl = false;
for (String urlPrefix: URL_PREFIXES){
isUrl = textBody.startsWith(urlPrefix) && !textBody.contains("\n") && !textBody.contains("\r");
if (isUrl){
break;
}
}
if (isUrl){
Intent urlLaunchIntent = new Intent(getIntent());
urlLaunchIntent.setClass(getApplicationContext(), PostLinkActivity.class);
startActivity(urlLaunchIntent);
finish();
}else{
((EditText)findViewById(R.id.inputPost)).setText(textBody);
}
}
=======
loadDefaultPostOptions();
>>>>>>> c9026e14efaff2e0abc72ad8e2efc03227f65f19
}
private void returnToMainActivity() { |
| Solution content |
|---|
setupOkButton();
loadDefaultPostOptions();
}
|
| File |
|---|
| PostTextActivity.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |