Projects >> android_packages_apps_Tag >>d93396e8b7cffe958ea91077643a6fb0d4bca364

Chunk
Conflicting content
import java.net.MalformedURLException;
import java.net.URL;
<<<<<<< HEAD
import java.util.ArrayList;
=======
import java.util.List;
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc
import java.util.Set;

/**
Solution content
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import java.util.Set;

/**
File
EditTagActivity.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 */
public abstract class EditTagActivity extends Activity implements OnClickListener, EditCallbacks {

<<<<<<< HEAD
    private static final String BUNDLE_KEY_OUTSTANDING_PICK = "outstanding-pick";
    protected static final int DIALOG_ID_ADD_CONTENT = 0;
=======
    protected static final String BUNDLE_KEY_OUTSTANDING_PICK = "outstanding-pick";
    public static final String EXTRA_RESULT_MSG = "com.android.apps.tag.msg";
    public static final String EXTRA_NEW_RECORD_INFO = "com.android.apps.tag.new_record";
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc

    protected static final Set SUPPORTED_RECORD_TYPES = ImmutableSet.of(
        VCardRecord.RECORD_TYPE,
Solution content
 */
public class EditTagActivity extends Activity implements OnClickListener, EditCallbacks {

    private static final String LOG_TAG = "Tags";

    protected static final String BUNDLE_KEY_OUTSTANDING_PICK = "outstanding-pick";
    public static final String EXTRA_RESULT_MSG = "com.android.apps.tag.msg";
    public static final String EXTRA_NEW_RECORD_INFO = "com.android.apps.tag.new_record";

    protected static final Set SUPPORTED_RECORD_TYPES = ImmutableSet.of(
        VCardRecord.RECORD_TYPE,
File
EditTagActivity.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
    private ViewGroup mContentRoot;

    /**
<<<<<<< HEAD
     * Info about an outstanding picking activity to add a new record.
     */
    private RecordEditInfo mRecordWithOutstandingPick;
=======
     * Whether or not data was already parsed from an {@link Intent}. This happens when the user
     * shares data via the My tag feature.
     */
    private boolean mParsedIntent = false;
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc

    private LayoutInflater mInflater;
Solution content
    private ViewGroup mContentRoot;

    /**
     * Whether or not data was already parsed from an {@link Intent}. This happens when the user
     * shares data via the My tag feature.
     */
    private boolean mParsedIntent = false;

    private LayoutInflater mInflater;
File
EditTagActivity.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
    @Override
    protected void onCreate(Bundle savedState) {
        super.onCreate(savedState);
<<<<<<< HEAD
=======

        setContentView(R.layout.edit_tag_activity);
        setTitle(getResources().getString(R.string.edit_tag));
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc

        mInflater = LayoutInflater.from(this);
<<<<<<< HEAD
Solution content
    @Override
    protected void onCreate(Bundle savedState) {
        super.onCreate(savedState);

        setContentView(R.layout.edit_tag_activity);
        setTitle(getResources().getString(R.string.edit_tag));

        mInflater = LayoutInflater.from(this);
File
EditTagActivity.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc

        mInflater = LayoutInflater.from(this);
<<<<<<< HEAD
    }

    protected ViewGroup getContentRoot() {
        if (mContentRoot == null) {
            mContentRoot = (ViewGroup) findViewById(R.id.content_parent);
        }
        return mContentRoot;
=======
        findViewById(R.id.save).setOnClickListener(this);
        findViewById(R.id.cancel).setOnClickListener(this);

        mContentRoot = (ViewGroup) findViewById(R.id.content_parent);

        resolveIntent();
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc
    }

    /**
Solution content
        mInflater = LayoutInflater.from(this);
        findViewById(R.id.save).setOnClickListener(this);
        findViewById(R.id.cancel).setOnClickListener(this);

        mContentRoot = (ViewGroup) findViewById(R.id.content_parent);

        resolveIntent();
    }

    /**
File
EditTagActivity.java
Developer's decision
Version 2
Kind of conflict
Attribute
Cast expression
If statement
Method invocation
Method signature
Return statement
Chunk
Conflicting content
     * Refreshes the UI with updated content from the record.
     * Typically used when the records require an external {@link Activity} to edit.
     */
<<<<<<< HEAD
    public void addRecord(RecordEditInfo editInfo) {
        mRecords.add(Preconditions.checkNotNull(editInfo));
        addViewForRecord(editInfo);
    }

    /**
     * Adds a child editor view for a record.
     */
    public void addViewForRecord(RecordEditInfo editInfo) {
        ViewGroup root = getContentRoot();
        View editView = editInfo.getEditView(this, mInflater, root, this);
        root.addView(mInflater.inflate(R.layout.tag_divider, root, false));
        root.addView(editView);
    }

    protected void rebuildChildViews() {
        ViewGroup root = getContentRoot();
=======
    public void refresh() {
        ViewGroup root = mContentRoot;
        View editView = mRecord.getEditView(this, mInflater, root, this);
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc
        root.removeAllViews();
        root.addView(editView);
    }
Solution content
     * Refreshes the UI with updated content from the record.
     * Typically used when the records require an external {@link Activity} to edit.
     */
    public void refresh() {
        ViewGroup root = mContentRoot;
        View editView = mRecord.getEditView(this, mInflater, root, this);
        root.removeAllViews();
        root.addView(editView);
    }
File
EditTagActivity.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Method declaration
Method invocation
Method signature
Variable
Chunk
Conflicting content
>>>>>>> cb41da2817175996179cc34e50e5e284d043d3cc

public class TagDBHelper extends SQLiteOpenHelper {

    private static final String DATABASE_NAME = "tags.db";
<<<<<<< HEAD
    private static final int DATABASE_VERSION = 14;
=======
    private static final int DATABASE_VERSION = 16;
    public static final String TABLE_NAME_NDEF_MESSAGES = "ndef_msgs";
Solution content
public class TagDBHelper extends SQLiteOpenHelper {

    private static final String DATABASE_NAME = "tags.db";
    private static final int DATABASE_VERSION = 16;

    public static final String TABLE_NAME_NDEF_MESSAGES = "ndef_msgs";
File
TagDBHelper.java
Developer's decision
Version 2
Kind of conflict
Attribute