Projects >> k-9 >>893a719ab37709be543164dfd8b05411c49890b6

Chunk
Conflicting content
import android.os.Looper;
import android.text.format.Time;
import android.util.Log;
<<<<<<< HEAD
import android.webkit.WebSettings;
=======
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3

import com.fsck.k9.activity.MessageCompose;
import com.fsck.k9.controller.MessagingController;
Solution content
import android.os.Looper;
import android.text.format.Time;
import android.util.Log;

import com.fsck.k9.activity.MessageCompose;
import com.fsck.k9.controller.MessagingController;
File
K9.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    //public static final String logFile = Environment.getExternalStorageDirectory() + "/k9mail/debug.log";

    /**
<<<<<<< HEAD
=======
     * If this is enabled, various development settings will be enabled
     * It should NEVER be on for Market builds
     * Right now, it just governs strictmode
     **/
    public static boolean DEVELOPER_MODE = true;


    /**
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3
     * If this is enabled there will be additional logging information sent to
     * Log.d, including protocol dumps.
     * Controlled by Preferences at run-time
Solution content
    //public static final String logFile = Environment.getExternalStorageDirectory() + "/k9mail/debug.log";

    /**
     * If this is enabled, various development settings will be enabled
     * It should NEVER be on for Market builds
     * Right now, it just governs strictmode
     **/
    public static boolean DEVELOPER_MODE = true;


    /**
     * If this is enabled there will be additional logging information sent to
     * Log.d, including protocol dumps.
     * Controlled by Preferences at run-time
File
K9.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
    private static boolean useGalleryBugWorkaround = false;
    private static boolean galleryBuggy;

<<<<<<< HEAD
    /**
     * We use WebSettings.getBlockNetworkLoads() to prevent the WebView that displays email
     * bodies from loading external resources over the network. Unfortunately this method
     * isn't exposed via the official Android API. That's why we use reflection to be able
     * to call the method.
     */
    private static final Method mGetBlockNetworkLoads = getMethod(WebSettings.class, "setBlockNetworkLoads");
=======
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3

    /**
     * The MIME type(s) of attachments we're willing to view.
Solution content
    private static boolean useGalleryBugWorkaround = false;
    private static boolean galleryBuggy;


    /**
     * The MIME type(s) of attachments we're willing to view.
File
K9.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Method invocation
Chunk
Conflicting content
    // Must not conflict with an account number
    public static final int FETCHING_EMAIL_NOTIFICATION      = -5000;
<<<<<<< HEAD
    public static final int CONNECTIVITY_ID = -3;


    public class Intents
    {

        public class EmailReceived
=======
    public static final int SEND_FAILED_NOTIFICATION      = -1500;
    public static final int CONNECTIVITY_ID = -3;


    public static class Intents
    {

        public static class EmailReceived
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3
        {
            public static final String ACTION_EMAIL_RECEIVED    = "com.fsck.k9.intent.action.EMAIL_RECEIVED";
            public static final String ACTION_EMAIL_DELETED     = "com.fsck.k9.intent.action.EMAIL_DELETED";
Solution content
    // Must not conflict with an account number
    public static final int FETCHING_EMAIL_NOTIFICATION      = -5000;
    public static final int SEND_FAILED_NOTIFICATION      = -1500;
    public static final int CONNECTIVITY_ID = -3;


    public static class Intents
    {

        public static class EmailReceived
        {
            public static final String ACTION_EMAIL_RECEIVED    = "com.fsck.k9.intent.action.EMAIL_RECEIVED";
            public static final String ACTION_EMAIL_DELETED     = "com.fsck.k9.intent.action.EMAIL_DELETED";
File
K9.java
Developer's decision
Version 2
Kind of conflict
Attribute
Class signature
Chunk
Conflicting content
    @Override
    public void onCreate()
    {
<<<<<<< HEAD
        super.onCreate();
        app = this;

=======
        maybeSetupStrictMode();
        super.onCreate();
        app = this;


>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3
        galleryBuggy = checkForBuggyGallery();

        Preferences prefs = Preferences.getPreferences(this);
Solution content
    @Override
    public void onCreate()
    {
        maybeSetupStrictMode();
        super.onCreate();
        app = this;


        galleryBuggy = checkForBuggyGallery();

        Preferences prefs = Preferences.getPreferences(this);
File
K9.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        K9.setK9Language(sprefs.getString("language", ""));
        K9.setK9Theme(sprefs.getInt("theme", android.R.style.Theme_Light));
<<<<<<< HEAD
        MessagingController.getInstance(this).resetVisibleLimits(prefs.getAvailableAccounts());
=======
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3

        /*
         * We have to give MimeMessage a temp directory because File.createTempFile(String, String)
Solution content
        K9.setK9Language(sprefs.getString("language", ""));
        K9.setK9Theme(sprefs.getInt("theme", android.R.style.Theme_Light));

        /*
         * We have to give MimeMessage a temp directory because File.createTempFile(String, String)
File
K9.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        notifyObservers();
    }

<<<<<<< HEAD
=======
    private void maybeSetupStrictMode()
    {
        if (!K9.DEVELOPER_MODE)
            return;

        try
        {
            Class strictMode = Class.forName("android.os.StrictMode");
            Method enableDefaults = strictMode.getMethod("enableDefaults");
            enableDefaults.invoke(strictMode);
        }

        catch (Exception e)
        {
            // Discard , as it means we're not running on a device with strict mode
            Log.v(K9.LOG_TAG, "Failed to turn on strict mode "+e);
        }

    }


>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3
    /**
     * since Android invokes Application.onCreate() only after invoking all
     * other components' onCreate(), here is a way to notify interested
Solution content
        notifyObservers();
    }

    private void maybeSetupStrictMode()
    {
        if (!K9.DEVELOPER_MODE)
            return;

        try
        {
            Class strictMode = Class.forName("android.os.StrictMode");
            Method enableDefaults = strictMode.getMethod("enableDefaults");
            enableDefaults.invoke(strictMode);
        }

        catch (Exception e)
        {
            // Discard , as it means we're not running on a device with strict mode
            Log.v(K9.LOG_TAG, "Failed to turn on strict mode "+e);
        }

    }


    /**
     * since Android invokes Application.onCreate() only after invoking all
     * other components' onCreate(), here is a way to notify interested
File
K9.java
Developer's decision
Version 2
Kind of conflict
Method declaration
Chunk
Conflicting content
        mMessageViewReturnToList = messageViewReturnToList;
    }

<<<<<<< HEAD
    private static Method getMethod(Class classObject, String methodName)
    {
        try
        {
            Method method = classObject.getMethod(methodName, boolean.class);
            return method;
=======
    public static Method getMethod(Class classObject, String methodName)
    {
        try
        {
            return classObject.getMethod(methodName, boolean.class);
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3
        }
        catch (NoSuchMethodException e)
        {
Solution content
        try
        mMessageViewReturnToList = messageViewReturnToList;
    }

    public static Method getMethod(Class classObject, String methodName)
    {
        {
            return classObject.getMethod(methodName, boolean.class);
        }
        catch (NoSuchMethodException e)
        {
File
K9.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Method signature
Return statement
Try statement
Variable
Chunk
Conflicting content
        return null;
    }

<<<<<<< HEAD
    public static void setBlockNetworkLoads(WebSettings webSettings, boolean state)
    {
        if (mGetBlockNetworkLoads != null)
        {
            try
            {
                mGetBlockNetworkLoads.invoke(webSettings, state);
            }
            catch (Exception e)
            {
                Log.e(K9.LOG_TAG, "Error on invoking WebSettings.setBlockNetworkLoads()", e);
            }
        }
    }

=======
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3
    public static FontSizes getFontSizes()
    {
        return fontSizes;
Solution content
        return null;
    }

    public static FontSizes getFontSizes()
    {
        return fontSizes;
File
K9.java
Developer's decision
Version 2
Kind of conflict
Method declaration
Chunk
Conflicting content
        }
    }

<<<<<<< HEAD:src/com/fsck/k9/activity/setup/AccountSetupBasics.java
    private void onNext()
=======
    protected void onNext()
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/activity/setup/AccountSetupBasics.java
    {
        String email = mEmailView.getText().toString();
        String[] emailParts = splitEmail(email);
Solution content
        }
    }

    protected void onNext()
    {
        String email = mEmailView.getText().toString();
        String[] emailParts = splitEmail(email);
File
AccountSetupBasics.java
Developer's decision
Version 2
Kind of conflict
Method signature
Chunk
Conflicting content
        Utility.setCompoundDrawablesAlpha(mDoneButton, mDoneButton.isEnabled() ? 255 : 128);
    }

<<<<<<< HEAD:src/com/fsck/k9/activity/setup/AccountSetupNames.java
    private void onNext()
=======
    protected void onNext()
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/activity/setup/AccountSetupNames.java
    {
        if (Utility.requiredFieldValid(mDescription))
        {
Solution content
        Utility.setCompoundDrawablesAlpha(mDoneButton, mDoneButton.isEnabled() ? 255 : 128);
    }

    protected void onNext()
    {
        if (Utility.requiredFieldValid(mDescription))
        {
File
AccountSetupNames.java
Developer's decision
Version 2
Kind of conflict
Method signature
Chunk
Conflicting content
                    {
                // Ignore messages without a unique-id
                if (uidParts.length >= 2)
                {
<<<<<<< HEAD:src/com/fsck/k9/mail/store/Pop3Store.java
	                Integer msgNum = Integer.valueOf(uidParts[0]);
	                String msgUid = uidParts[1];
	                if (unindexedUids.contains(msgUid))
	                {
	                    if (K9.DEBUG && K9.DEBUG_PROTOCOL_POP3)
	                    {
	                        Log.d(K9.LOG_TAG, "Got msgNum " + msgNum + " for UID " + msgUid);
	                    }

	                    Pop3Message message = mUidToMsgMap.get(msgUid);
	                    if (message == null)
	                    {
	                        message = new Pop3Message(msgUid, this);
	                    }
	                    indexMessage(msgNum, message);
	                }
=======
                    Integer msgNum = Integer.valueOf(uidParts[0]);
                    String msgUid = uidParts[1];
                    if (unindexedUids.contains(msgUid))
                        if (K9.DEBUG && K9.DEBUG_PROTOCOL_POP3)
                        {
                            Log.d(K9.LOG_TAG, "Got msgNum " + msgNum + " for UID " + msgUid);
                        }

                        Pop3Message message = mUidToMsgMap.get(msgUid);
                        if (message == null)
                        {
                            message = new Pop3Message(msgUid, this);
                        }
                        indexMessage(msgNum, message);
                    }
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/mail/store/Pop3Store.java
                }
            }
        }
Solution content
                // Ignore messages without a unique-id
                if (uidParts.length >= 2)
                {
                    Integer msgNum = Integer.valueOf(uidParts[0]);
                    String msgUid = uidParts[1];
                    if (unindexedUids.contains(msgUid))
                    {
                        if (K9.DEBUG && K9.DEBUG_PROTOCOL_POP3)
                        {
                            Log.d(K9.LOG_TAG, "Got msgNum " + msgNum + " for UID " + msgUid);
                        }

                        Pop3Message message = mUidToMsgMap.get(msgUid);
                        if (message == null)
                        {
                            message = new Pop3Message(msgUid, this);
                        }
                        indexMessage(msgNum, message);
                    }
                }
            }
        }
File
Pop3Store.java
Developer's decision
Version 1
Kind of conflict
Array access
If statement
Method invocation
Variable
Chunk
Conflicting content
        @Override
        public void appendMessages(Message[] messages) throws MessagingException
        {
<<<<<<< HEAD:src/com/fsck/k9/mail/store/Pop3Store.java
        }

        @Override
        public void delete(boolean recurse) throws MessagingException
        {
        }

        @Override
        public void delete(Message[] msgs, String trashFolderName) throws MessagingException
        {
            setFlags(msgs, new Flag[] { Flag.DELETED }, true);
        }

        @Override
=======
        }

        @Override
        public void delete(boolean recurse) throws MessagingException
        {
        }

        @Override
        public void delete(Message[] msgs, String trashFolderName) throws MessagingException
        {
            setFlags(msgs, new Flag[] { Flag.DELETED }, true);
        }

        @Override
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/mail/store/Pop3Store.java
        public String getUidFromMessageId(Message message) throws MessagingException
        {
            return null;
Solution content
        @Override
        public void appendMessages(Message[] messages) throws MessagingException
        {
        }

        @Override
        public void delete(boolean recurse) throws MessagingException
        {
        }

        @Override
        public void delete(Message[] msgs, String trashFolderName) throws MessagingException
        {
            setFlags(msgs, new Flag[] { Flag.DELETED }, true);
        }

        @Override
        public String getUidFromMessageId(Message message) throws MessagingException
        {
            return null;
File
Pop3Store.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
    }//Pop3Folder

<<<<<<< HEAD:src/com/fsck/k9/mail/store/Pop3Store.java
    class Pop3Message extends MimeMessage
=======
    static class Pop3Message extends MimeMessage
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/mail/store/Pop3Store.java
    {
        public Pop3Message(String uid, Pop3Folder folder)
        {
Solution content
    }//Pop3Folder


    static class Pop3Message extends MimeMessage
    {
        public Pop3Message(String uid, Pop3Folder folder)
        {
File
Pop3Store.java
Developer's decision
Version 2
Kind of conflict
Class signature
Chunk
Conflicting content
        }
    }

<<<<<<< HEAD:src/com/fsck/k9/mail/store/Pop3Store.java
    class Pop3Capabilities
=======
    static class Pop3Capabilities
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/mail/store/Pop3Store.java
    {
        public boolean stls;
        public boolean top;
Solution content
        }
    }

    static class Pop3Capabilities
    {
        public boolean stls;
        public boolean top;
File
Pop3Store.java
Developer's decision
Version 2
Kind of conflict
Class signature
Chunk
Conflicting content
        }
    }

<<<<<<< HEAD:src/com/fsck/k9/mail/store/Pop3Store.java
    class Pop3ResponseInputStream extends InputStream
=======
    static class Pop3ResponseInputStream extends InputStream
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3:src/com/fsck/k9/mail/store/Pop3Store.java
    {
        InputStream mIn;
        boolean mStartOfLine = true;
Solution content
        }
    }

    static class Pop3ResponseInputStream extends InputStream
    {
        InputStream mIn;
        boolean mStartOfLine = true;
File
Pop3Store.java
Developer's decision
Version 2
Kind of conflict
Class signature
Chunk
* * <<<<<<< HEAD * ======= * >>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3 * * *
Conflicting content
 *     
GBKwindows-936CP936 MS936 ms_936 x-mswin-936 CP936 MS936 ms_936 x-mswin-936 x-gbk
ISCII91
* * * * * *
Solution content
 *     
GBKwindows-936CP936 MS936 ms_936 x-mswin-936 x-gbk
ISCII91
File
CharsetUtil.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
                                  "euckr"}),
        new Charset("GB18030", "GB18030", new String[] {"gb18030-2000"}),
        new Charset("EUC_CN", "GB2312", new String[] {"x-EUC-CN", "csGB2312", "euccn", "euc-cn", "gb2312-80", "gb2312-1980", "CN-GB", "CN-GB-ISOIR165"}),
<<<<<<< HEAD
        new Charset("GBK", "windows-936", new String[] {"CP936", "MS936", "ms_936", "x-mswin-936"}),
=======
        new Charset("GBK", "windows-936", new String[] {"CP936", "MS936", "ms_936", "x-mswin-936", "x-gbk"}),
>>>>>>> 605a0bdc93dd198a6ac89130d3c8a139678641c3

        new Charset("Cp037", "IBM037", new String[] {"ebcdic-cp-us", "ebcdic-cp-ca", "ebcdic-cp-wt", "ebcdic-cp-nl", "csIBM037"}),
        new Charset("Cp273", "IBM273", new String[] {"csIBM273"}),
Solution content
                                  "euckr"}),
        new Charset("GB18030", "GB18030", new String[] {"gb18030-2000"}),
        new Charset("EUC_CN", "GB2312", new String[] {"x-EUC-CN", "csGB2312", "euccn", "euc-cn", "gb2312-80", "gb2312-1980", "CN-GB", "CN-GB-ISOIR165"}),
        new Charset("GBK", "windows-936", new String[] {"CP936", "MS936", "ms_936", "x-mswin-936", "x-gbk"}),

        new Charset("Cp037", "IBM037", new String[] {"ebcdic-cp-us", "ebcdic-cp-ca", "ebcdic-cp-wt", "ebcdic-cp-nl", "csIBM037"}),
        new Charset("Cp273", "IBM273", new String[] {"csIBM273"}),
File
CharsetUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation