Projects >> android-frameworks-base-with-screenshot-tweaks >>be53cb4eba3e2790aafa11ac8f690292a30eb482

Chunk
Conflicting content
        } catch (AuthenticatorException e) {
        }
        mEnableFallback = !hasSAMLAccount;
<<<<<<< HEAD

        if (mUnlockScreen == null) {
            Log.w(TAG, "no unlock screen when receiving AccountManager information");
        } else if (mUnlockScreen instanceof UnlockScreen) {
=======
        if (mUnlockScreen instanceof UnlockScreen) {
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
            ((UnlockScreen)mUnlockScreen).setEnableFallback(true);
        }
    }
Solution content
        } catch (AuthenticatorException e) {
        }
        mEnableFallback = !hasSAMLAccount;

        if (mUnlockScreen == null) {
            Log.w(TAG, "no unlock screen when receiving AccountManager information");
        } else if (mUnlockScreen instanceof UnlockScreen) {
            ((UnlockScreen)mUnlockScreen).setEnableFallback(true);
        }
    }
File
LockPatternKeyguardView.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
            KeyguardWindowController controller) {
        super(context);

<<<<<<< HEAD
=======
        final boolean hasAccount = AccountManager.get(context).getAccounts().length > 0;
        if (hasAccount) {
            /* If we have a SAML account which requires web login we can not use the
             fallback screen UI to ask the user for credentials.
             For now we will disable fallback screen in this case.
             Ultimately we could consider bringing up a web login from GLS
             but need to make sure that it will work in the "locked screen" mode. */
            String[] features = new String[] {"saml"};
            AccountManager.get(context).getAccountsByTypeAndFeatures(
                    "com.google", features, this, null);
        }
        
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        mEnableFallback = false;

        mRequiresSim =
Solution content
            KeyguardWindowController controller) {
        super(context);

        mEnableFallback = false;

        mRequiresSim =
File
LockPatternKeyguardView.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
            public void reportFailedPatternAttempt() {
                mUpdateMonitor.reportFailedAttempt();
                final int failedAttempts = mUpdateMonitor.getFailedAttempts();
<<<<<<< HEAD
                if (DEBUG) Log.d(TAG, 
                    "reportFailedPatternAttempt: #" + failedAttempts +
                    " (enableFallback=" + mEnableFallback + ")");
=======
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
                if (mEnableFallback && failedAttempts ==
                        (LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET
                                - LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
Solution content
            public void reportFailedPatternAttempt() {
                mUpdateMonitor.reportFailedAttempt();
                final int failedAttempts = mUpdateMonitor.getFailedAttempts();
                if (DEBUG) Log.d(TAG, 
                    "reportFailedPatternAttempt: #" + failedAttempts +
                    " (enableFallback=" + mEnableFallback + ")");
                if (mEnableFallback && failedAttempts ==
                        (LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET
                                - LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
File
LockPatternKeyguardView.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                    mUpdateMonitor,
                    mKeyguardScreenCallback,
                    mUpdateMonitor.getFailedAttempts());
<<<<<<< HEAD
            if (DEBUG) Log.d(TAG,
                "createUnlockScreenFor(" + unlockMode + "): mEnableFallback=" + mEnableFallback);
=======
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
            view.setEnableFallback(mEnableFallback);
            return view;
        } else if (unlockMode == UnlockMode.SimPin) {
Solution content
                    mUpdateMonitor,
                    mKeyguardScreenCallback,
                    mUpdateMonitor.getFailedAttempts());
            if (DEBUG) Log.d(TAG,
                "createUnlockScreenFor(" + unlockMode + "): mEnableFallback=" + mEnableFallback);
            view.setEnableFallback(mEnableFallback);
            return view;
        } else if (unlockMode == UnlockMode.SimPin) {
File
LockPatternKeyguardView.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
import com.android.internal.widget.RotarySelector;
import com.android.internal.R;
import com.android.internal.telephony.IccCard;
import com.android.internal.widget.LockPatternUtils;
<<<<<<< HEAD
import com.android.internal.widget.SlidingTab;
=======
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7

import android.content.Context;
import android.content.res.Resources;
Solution content
import com.android.internal.R;
import com.android.internal.telephony.IccCard;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.SlidingTab;

import android.content.Context;
import android.content.res.Resources;
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
<<<<<<< HEAD
=======

import android.os.SystemProperties;
import android.util.Log;
import android.media.AudioManager;
import com.android.internal.telephony.IccCard;
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7

import java.util.Date;
import java.io.File;
Solution content
import android.util.Log;
import android.media.AudioManager;
import android.os.SystemProperties;

import java.util.Date;
import java.io.File;
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
 */
class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateMonitor.InfoCallback,
        KeyguardUpdateMonitor.SimStateCallback, KeyguardUpdateMonitor.ConfigurationChangeCallback,
<<<<<<< HEAD
        SlidingTab.OnTriggerListener {
=======
        RotarySelector.OnDialTriggerListener {
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7

    private static final boolean DBG = false;
    private static final String TAG = "LockScreen";
Solution content
 */
class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateMonitor.InfoCallback,
        KeyguardUpdateMonitor.SimStateCallback, KeyguardUpdateMonitor.ConfigurationChangeCallback,
        SlidingTab.OnTriggerListener {

    private static final boolean DBG = false;
    private static final String TAG = "LockScreen";
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
    private final KeyguardScreenCallback mCallback;

    private TextView mCarrier;
<<<<<<< HEAD
    private SlidingTab mSelector;
=======
    private RotarySelector mRotary;
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
    private TextView mTime;
    private TextView mDate;
    private TextView mStatus1;
Solution content
    private final KeyguardScreenCallback mCallback;

    private TextView mCarrier;
    private SlidingTab mSelector;
    private TextView mTime;
    private TextView mDate;
    private TextView mStatus1;
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
        /**
    private Drawable mAlarmIcon = null;
    private String mCharging = null;
    private Drawable mChargingIcon = null;
<<<<<<< HEAD

    private boolean mSilentMode;
    private AudioManager mAudioManager;
    private String mDateFormatString;
    private java.text.DateFormat mTimeFormat;
    private boolean mCreatedInPortrait;
    private boolean mEnableMenuKeyInLockScreen;

    /**
     * The status of this lock screen.
     */
    enum Status {
        /**
         * Normal case (sim card present, it's not locked)
         */
        Normal(true),

        /**
         * The sim card is 'network locked'.
         */
        NetworkLocked(true),

        /**
         * The sim card is missing.
         */
        SimMissing(false),

        /**
         * The sim card is missing, and this is the device isn't provisioned, so we don't let
         * them get past the screen.
         */
        SimMissingLocked(false),

        /**
         * The sim card is PUK locked, meaning they've entered the wrong sim unlock code too many
         * times.
         */
        SimPukLocked(false),

        /**
         * The sim card is locked.
         */
        SimLocked(true);

        private final boolean mShowStatusLines;

        Status(boolean mShowStatusLines) {
            this.mShowStatusLines = mShowStatusLines;
        }

=======

    private boolean mSilentMode;
    private AudioManager mAudioManager;
    private java.text.DateFormat mDateFormat;
    private java.text.DateFormat mTimeFormat;
    private boolean mCreatedInPortrait;
    private boolean mEnableMenuKeyInLockScreen;

    /**
     * The status of this lock screen.
     */
    enum Status {
        /**
         * Normal case (sim card present, it's not locked)
         */
        Normal(true),

         * The sim card is 'network locked'.
         */
        NetworkLocked(true),

        /**
         * The sim card is missing.
         */
        SimMissing(false),

        /**
         * The sim card is missing, and this is the device isn't provisioned, so we don't let
         * them get past the screen.
         */
        SimMissingLocked(false),

        /**
         * The sim card is PUK locked, meaning they've entered the wrong sim unlock code too many
         * times.
         */
        SimPukLocked(false),

        /**
         * The sim card is locked.
         */
        SimLocked(true);

        private final boolean mShowStatusLines;

        Status(boolean mShowStatusLines) {
            this.mShowStatusLines = mShowStatusLines;
        }

>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        /**
         * @return Whether the status lines (battery level and / or next alarm) are shown while
         *         in this state.  Mostly dictated by whether this is room for them.
Solution content
    private Drawable mAlarmIcon = null;
    private String mCharging = null;
    private Drawable mChargingIcon = null;

    private boolean mSilentMode;
    private AudioManager mAudioManager;
    private String mDateFormatString;
    private java.text.DateFormat mTimeFormat;
    private boolean mCreatedInPortrait;
    private boolean mEnableMenuKeyInLockScreen;

    /**
     * The status of this lock screen.
     */
    enum Status {
        /**
         * Normal case (sim card present, it's not locked)
         */
        Normal(true),

        /**
         * The sim card is 'network locked'.
         */
        NetworkLocked(true),

        /**
         * The sim card is missing.
         */
        SimMissing(false),

        /**
         * The sim card is missing, and this is the device isn't provisioned, so we don't let
         * them get past the screen.
         */
        SimMissingLocked(false),

        /**
         * The sim card is PUK locked, meaning they've entered the wrong sim unlock code too many
         * times.
         */
        SimPukLocked(false),

        /**
         * The sim card is locked.
         */
        SimLocked(true);

        private final boolean mShowStatusLines;

        Status(boolean mShowStatusLines) {
            this.mShowStatusLines = mShowStatusLines;
        }

        /**
         * @return Whether the status lines (battery level and / or next alarm) are shown while
         *         in this state.  Mostly dictated by whether this is room for them.
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Enum signature
Enum value
Method declaration
Chunk
Conflicting content
        final LayoutInflater inflater = LayoutInflater.from(context);
        if (mCreatedInPortrait) {
<<<<<<< HEAD
            inflater.inflate(R.layout.keyguard_screen_tab_unlock, this, true);
        } else {
            inflater.inflate(R.layout.keyguard_screen_tab_unlock_land, this, true);
        }

        mCarrier = (TextView) findViewById(R.id.carrier);
=======
            inflater.inflate(R.layout.keyguard_screen_rotary_unlock, this, true);
        } else {
            inflater.inflate(R.layout.keyguard_screen_rotary_unlock_land, this, true);
        }

        mCarrier = (TextView) findViewById(R.id.carrier);
        mTime = (TextView) findViewById(R.id.time);
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        mDate = (TextView) findViewById(R.id.date);
        mStatus1 = (TextView) findViewById(R.id.status1);
        mStatus2 = (TextView) findViewById(R.id.status2);
Solution content
        final LayoutInflater inflater = LayoutInflater.from(context);
        if (mCreatedInPortrait) {
            inflater.inflate(R.layout.keyguard_screen_tab_unlock, this, true);
        } else {
            inflater.inflate(R.layout.keyguard_screen_tab_unlock_land, this, true);
        }

        mCarrier = (TextView) findViewById(R.id.carrier);
        mDate = (TextView) findViewById(R.id.date);
        mStatus1 = (TextView) findViewById(R.id.status1);
        mStatus2 = (TextView) findViewById(R.id.status2);
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Cast expression
Method invocation
Chunk
Conflicting content
        mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
        mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
        mScreenLocked = (TextView) findViewById(R.id.screenLocked);
<<<<<<< HEAD
        mSelector = (SlidingTab) findViewById(R.id.tab_selector);
        mSelector.setLeftHintText(R.string.lockscreen_unlock_label);
=======
        mRotary = (RotarySelector) findViewById(R.id.rotary);
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        mEmergencyCallButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                mCallback.takeEmergencyCallAction();
Solution content
        mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
        mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
        mScreenLocked = (TextView) findViewById(R.id.screenLocked);
        mSelector = (SlidingTab) findViewById(R.id.tab_selector);
        mSelector.setLeftHintText(R.string.lockscreen_unlock_label);
        mEmergencyCallButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                mCallback.takeEmergencyCallAction();
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Cast expression
Method invocation
Chunk
Conflicting content
=======
        updateMonitor.registerConfigurationChangeCallback(this);

        mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
<<<<<<< HEAD
        mSilentMode = isSilentMode();

        mSelector.setLeftTabResources(
                R.drawable.ic_jog_dial_unlock,
                R.drawable.jog_tab_target_green,
                R.drawable.jog_tab_bar_left_unlock,
                R.drawable.jog_tab_left_unlock);

        updateRightTabResources();

        mSelector.setOnTriggerListener(this);

        resetStatusInfo(updateMonitor);
    }

    private boolean isSilentMode() {
        return mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT;
    }

    private void updateRightTabResources() {
        mSelector.setRightTabResources(
                mSilentMode ? R.drawable.ic_jog_dial_sound_off : R.drawable.ic_jog_dial_sound_on,
                mSilentMode ? R.drawable.jog_tab_target_yellow : R.drawable.jog_tab_target_gray,
                mSilentMode ? R.drawable.jog_tab_bar_right_sound_on
                        : R.drawable.jog_tab_bar_right_sound_off,
                mSilentMode ? R.drawable.jog_tab_right_sound_on
                        : R.drawable.jog_tab_right_sound_off);
    }

        mSilentMode = mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT;

        mRotary.setOnDialTriggerListener(this);
        mRotary.setLeftHandleResource(R.drawable.ic_jog_dial_unlock);
        mRotary.setRightHandleResource(mSilentMode ?
                R.drawable.ic_jog_dial_sound_off :
                R.drawable.ic_jog_dial_sound_on);

        resetStatusInfo(updateMonitor);
    }

>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
    private void resetStatusInfo(KeyguardUpdateMonitor updateMonitor) {
        mShowingBatteryInfo = updateMonitor.shouldShowBatteryInfo();
        mPluggedIn = updateMonitor.isDevicePluggedIn();
Solution content
        updateMonitor.registerConfigurationChangeCallback(this);

        mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
        mSilentMode = isSilentMode();

        mSelector.setLeftTabResources(
                R.drawable.ic_jog_dial_unlock,
                R.drawable.jog_tab_target_green,
                R.drawable.jog_tab_bar_left_unlock,
                R.drawable.jog_tab_left_unlock);

        updateRightTabResources();

        mSelector.setOnTriggerListener(this);

        resetStatusInfo(updateMonitor);
    }
    private boolean isSilentMode() {
        return mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT;
    }

    private void updateRightTabResources() {
        mSelector.setRightTabResources(
                mSilentMode ? R.drawable.ic_jog_dial_sound_off : R.drawable.ic_jog_dial_sound_on,
                mSilentMode ? R.drawable.jog_tab_target_yellow : R.drawable.jog_tab_target_gray,
                mSilentMode ? R.drawable.jog_tab_bar_right_sound_on
                        : R.drawable.jog_tab_bar_right_sound_off,
                mSilentMode ? R.drawable.jog_tab_right_sound_on
                        : R.drawable.jog_tab_right_sound_off);
    }

    private void resetStatusInfo(KeyguardUpdateMonitor updateMonitor) {
        mShowingBatteryInfo = updateMonitor.shouldShowBatteryInfo();
        mPluggedIn = updateMonitor.isDevicePluggedIn();
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method declaration
Method invocation
Chunk
Conflicting content
        refreshAlarmDisplay();

        mTimeFormat = DateFormat.getTimeFormat(getContext());
<<<<<<< HEAD
        mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
=======
        mDateFormat = getLockScreenDateFormat();
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        refreshTimeAndDateDisplay();
        updateStatusLines();
    }
Solution content
        refreshAlarmDisplay();

        mTimeFormat = DateFormat.getTimeFormat(getContext());
        mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
        refreshTimeAndDateDisplay();
        updateStatusLines();
    }
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    }

    /** {@inheritDoc} */
<<<<<<< HEAD
    public void onTrigger(View v, int whichHandle) {
        if (whichHandle == SlidingTab.OnTriggerListener.LEFT_HANDLE) {
            mCallback.goToUnlockScreen();
        } else if (whichHandle == SlidingTab.OnTriggerListener.RIGHT_HANDLE) {
=======
    public void onDialTrigger(View v, int whichHandle) {
        if (whichHandle == RotarySelector.OnDialTriggerListener.LEFT_HANDLE) {
            mCallback.goToUnlockScreen();
        } else if (whichHandle == RotarySelector.OnDialTriggerListener.RIGHT_HANDLE) {
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
            // toggle silent mode
            mSilentMode = !mSilentMode;
            mAudioManager.setRingerMode(mSilentMode ? AudioManager.RINGER_MODE_SILENT
Solution content
    }

    /** {@inheritDoc} */
    public void onTrigger(View v, int whichHandle) {
        if (whichHandle == SlidingTab.OnTriggerListener.LEFT_HANDLE) {
            mCallback.goToUnlockScreen();
        } else if (whichHandle == SlidingTab.OnTriggerListener.RIGHT_HANDLE) {
            // toggle silent mode
            mSilentMode = !mSilentMode;
            mAudioManager.setRingerMode(mSilentMode ? AudioManager.RINGER_MODE_SILENT
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Chunk
Conflicting content
            mSilentMode = !mSilentMode;
            mAudioManager.setRingerMode(mSilentMode ? AudioManager.RINGER_MODE_SILENT
                        : AudioManager.RINGER_MODE_NORMAL);
<<<<<<< HEAD

            updateRightTabResources();

            String message = mSilentMode ?
                    getContext().getString(R.string.global_action_silent_mode_on_status) :
                    getContext().getString(R.string.global_action_silent_mode_off_status);

            final int toastIcon = mSilentMode ? R.drawable.ic_lock_ringer_off
                    : R.drawable.ic_lock_ringer_on;
=======
            final int handleIcon = mSilentMode ?
                    R.drawable.ic_jog_dial_sound_off :
                    R.drawable.ic_jog_dial_sound_on;
            final int toastIcon = mSilentMode ?
                    R.drawable.ic_lock_ringer_off :
                    R.drawable.ic_lock_ringer_on;
            mRotary.setRightHandleResource(handleIcon);
            String message = mSilentMode ?
                    getContext().getString(R.string.global_action_silent_mode_on_status) :
                    getContext().getString(R.string.global_action_silent_mode_off_status);
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
            toastMessage(mScreenLocked, message, toastIcon);
            mCallback.pokeWakelock();
        }
Solution content
            mSilentMode = !mSilentMode;
            mAudioManager.setRingerMode(mSilentMode ? AudioManager.RINGER_MODE_SILENT
                        : AudioManager.RINGER_MODE_NORMAL);

            updateRightTabResources();

            String message = mSilentMode ?
                    getContext().getString(R.string.global_action_silent_mode_on_status) :
                    getContext().getString(R.string.global_action_silent_mode_off_status);

            final int toastIcon = mSilentMode ? R.drawable.ic_lock_ringer_off
                    : R.drawable.ic_lock_ringer_on;
            toastMessage(mScreenLocked, message, toastIcon);
            mCallback.pokeWakelock();
        }
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Variable
Chunk
Conflicting content
    /** {@inheritDoc} */
    public void onGrabbedStateChange(View v, int grabbedState) {
<<<<<<< HEAD
        if (grabbedState == SlidingTab.OnTriggerListener.RIGHT_HANDLE) {
            mSilentMode = isSilentMode();
            mSelector.setRightHintText(mSilentMode ? R.string.lockscreen_sound_on_label
                    : R.string.lockscreen_sound_off_label);
        }
        mCallback.pokeWakelock();
=======
        // TODO: Update onscreen hint text based on the new state.
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
    }

    /**
Solution content
    /** {@inheritDoc} */
    public void onGrabbedStateChange(View v, int grabbedState) {
        if (grabbedState == SlidingTab.OnTriggerListener.RIGHT_HANDLE) {
            mSilentMode = isSilentMode();
            mSelector.setRightHintText(mSilentMode ? R.string.lockscreen_sound_on_label
                    : R.string.lockscreen_sound_off_label);
        }
        mCallback.pokeWakelock();
    }

    /**
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Chunk
Conflicting content
    }

    private void refreshTimeAndDateDisplay() {
<<<<<<< HEAD
        mDate.setText(DateFormat.format(mDateFormatString, new Date()));
    }

    private void updateStatusLines() {
        if (!mStatus.showStatusLines()
                || (mCharging == null && mNextAlarm == null)) {
            mStatus1.setVisibility(View.INVISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);
        } else if (mCharging != null && mNextAlarm == null) {
            // charging only
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);

            mStatus1.setText(mCharging);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
        } else if (mNextAlarm != null && mCharging == null) {
            // next alarm only
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);

            mStatus1.setText(mNextAlarm);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
        } else if (mCharging != null && mNextAlarm != null) {
            // both charging and next alarm
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.VISIBLE);

            mStatus1.setText(mCharging);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
            mStatus2.setText(mNextAlarm);
            mStatus2.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
        }
    }

    /** {@inheritDoc} */
    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
        if (DBG) Log.d(TAG, "onRefreshCarrierInfo(" + plmn + ", " + spn + ")");
        updateLayout(mStatus);
    }

=======
        Date now = new Date();
        mTime.setText(mTimeFormat.format(now));
        mDate.setText(mDateFormat.format(now));
    }

    /**
     * @return A localized format like "Fri, Sep 18, 2009"
     */
    private java.text.DateFormat getLockScreenDateFormat() {
        SimpleDateFormat adjusted = null;
        try {
            // this call gives us the localized order
            final SimpleDateFormat dateFormat = (SimpleDateFormat)
                    java.text.DateFormat.getDateInstance(java.text.DateFormat.FULL);
            adjusted = new SimpleDateFormat(dateFormat.toPattern()
                    .replace("MMMM", "MMM")    // we want "Sep", not "September"
                    .replace("EEEE", "EEE"));  // we want "Fri", no "Friday"
        } catch (ClassCastException e) {
            // in case the library implementation changes and this throws a class cast exception
            // or anything else that is funky
            Log.e("LockScreen", "couldn't finnagle our custom date format :(", e);
            return java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM);
        }
        return adjusted;
    }

    private void updateStatusLines() {
        if (!mStatus.showStatusLines()
                || (mCharging == null && mNextAlarm == null)) {
            mStatus1.setVisibility(View.INVISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);
        } else if (mCharging != null && mNextAlarm == null) {
            // charging only
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);

            mStatus1.setText(mCharging);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
        } else if (mNextAlarm != null && mCharging == null) {
            // next alarm only
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);

            mStatus1.setText(mNextAlarm);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
        } else if (mCharging != null && mNextAlarm != null) {
            // both charging and next alarm
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.VISIBLE);

            mStatus1.setText(mCharging);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
            mStatus2.setText(mNextAlarm);
            mStatus2.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
        }
    }

    /** {@inheritDoc} */
    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
        if (DBG) Log.d(TAG, "onRefreshCarrierInfo(" + plmn + ", " + spn + ")");
        updateLayout(mStatus);
    }

>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
    private void putEmergencyBelow(int viewId) {
        final RelativeLayout.LayoutParams layoutParams =
                (RelativeLayout.LayoutParams) mEmergencyCallButton.getLayoutParams();
Solution content
    }

    private void refreshTimeAndDateDisplay() {
        mDate.setText(DateFormat.format(mDateFormatString, new Date()));
    }

    private void updateStatusLines() {
        if (!mStatus.showStatusLines()
                || (mCharging == null && mNextAlarm == null)) {
            mStatus1.setVisibility(View.INVISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);
        } else if (mCharging != null && mNextAlarm == null) {
            // charging only
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);

            mStatus1.setText(mCharging);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
        } else if (mNextAlarm != null && mCharging == null) {
            // next alarm only
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.INVISIBLE);

            mStatus1.setText(mNextAlarm);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
        } else if (mCharging != null && mNextAlarm != null) {
            // both charging and next alarm
            mStatus1.setVisibility(View.VISIBLE);
            mStatus2.setVisibility(View.VISIBLE);

            mStatus1.setText(mCharging);
            mStatus1.setCompoundDrawablesWithIntrinsicBounds(mChargingIcon, null, null, null);
            mStatus2.setText(mNextAlarm);
            mStatus2.setCompoundDrawablesWithIntrinsicBounds(mAlarmIcon, null, null, null);
        }
    }

    /** {@inheritDoc} */
    public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {
        if (DBG) Log.d(TAG, "onRefreshCarrierInfo(" + plmn + ", " + spn + ")");
        updateLayout(mStatus);
    }

    private void putEmergencyBelow(int viewId) {
        final RelativeLayout.LayoutParams layoutParams =
                (RelativeLayout.LayoutParams) mEmergencyCallButton.getLayoutParams();
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration
Method invocation
Variable
Chunk
Conflicting content
                return Status.SimMissing;
        }
        return Status.SimMissing;
<<<<<<< HEAD
    }

    /**
     * Update the layout to match the current status.
     */
    private void updateLayout(Status status) {
        switch (status) {
            case Normal:
                // text
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                mUpdateMonitor.getTelephonySpn()));
//                mScreenLocked.setText(R.string.lockscreen_screen_locked);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case NetworkLocked:
                //  text
                mCarrier.setText(R.string.lockscreen_network_locked_message);
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case SimMissing:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.divider);
                break;
            case SimMissingLocked:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.GONE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.screenLocked);
                break;
            case SimLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_locked_message);

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case SimPukLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_puk_locked_message);
                mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.GONE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.screenLocked);
                break;
        }
    }

    static CharSequence getCarrierString(CharSequence telephonyPlmn, CharSequence telephonySpn) {
        if (telephonyPlmn != null && telephonySpn == null) {
            return telephonyPlmn;
        } else if (telephonyPlmn != null && telephonySpn != null) {
            return telephonyPlmn + "\n" + telephonySpn;
        } else if (telephonyPlmn == null && telephonySpn != null) {
            return telephonySpn;
        } else {
            return "";
        }
    }

=======
    }

    /**
     * Update the layout to match the current status.
     */
    private void updateLayout(Status status) {
        switch (status) {
            case Normal:
                // text
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                mUpdateMonitor.getTelephonySpn()));
//                mScreenLocked.setText(R.string.lockscreen_screen_locked);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mRotary.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case NetworkLocked:
                //  text
                mCarrier.setText(R.string.lockscreen_network_locked_message);
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mRotary.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case SimMissing:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
                mRotary.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.divider);
                break;
            case SimMissingLocked:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mRotary.setVisibility(View.GONE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.screenLocked);
                break;
            case SimLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_locked_message);

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
                mRotary.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case SimPukLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_puk_locked_message);
                mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mRotary.setVisibility(View.GONE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.screenLocked);
                break;
        }
    }

    static CharSequence getCarrierString(CharSequence telephonyPlmn, CharSequence telephonySpn) {
        if (telephonyPlmn != null && telephonySpn == null) {
            return telephonyPlmn;
        } else if (telephonyPlmn != null && telephonySpn != null) {
            return telephonyPlmn + "\n" + telephonySpn;
        } else if (telephonyPlmn == null && telephonySpn != null) {
            return telephonySpn;
        } else {
            return "";
        }
    }

>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
    public void onSimStateChanged(IccCard.State simState) {
        if (DBG) Log.d(TAG, "onSimStateChanged(" + simState + ")");
        mStatus = getCurrentStatus(simState);
Solution content
                return Status.SimMissing;
        }
        return Status.SimMissing;
    }

    /**
     * Update the layout to match the current status.
     */
    private void updateLayout(Status status) {
        switch (status) {
            case Normal:
                // text
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                mUpdateMonitor.getTelephonySpn()));
//                mScreenLocked.setText(R.string.lockscreen_screen_locked);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case NetworkLocked:
                //  text
                mCarrier.setText(R.string.lockscreen_network_locked_message);
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case SimMissing:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.divider);
                break;
            case SimMissingLocked:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.GONE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.screenLocked);
                break;
            case SimLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_locked_message);

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
                mSelector.setVisibility(View.VISIBLE);
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case SimPukLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_puk_locked_message);
                mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions);

                // layout
                mScreenLocked.setVisibility(View.VISIBLE);
                mSelector.setVisibility(View.GONE);
                mEmergencyCallButton.setVisibility(View.VISIBLE);
                putEmergencyBelow(R.id.screenLocked);
                break;
        }
    }

    static CharSequence getCarrierString(CharSequence telephonyPlmn, CharSequence telephonySpn) {
        if (telephonyPlmn != null && telephonySpn == null) {
            return telephonyPlmn;
        } else if (telephonyPlmn != null && telephonySpn != null) {
            return telephonyPlmn + "\n" + telephonySpn;
        } else if (telephonyPlmn == null && telephonySpn != null) {
            return telephonySpn;
        } else {
            return "";
        }
    }

    public void onSimStateChanged(IccCard.State simState) {
        if (DBG) Log.d(TAG, "onSimStateChanged(" + simState + ")");
        mStatus = getCurrentStatus(simState);
File
LockScreen.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
import android.widget.TextView;
import android.text.format.DateFormat;
import android.text.TextUtils;
<<<<<<< HEAD
import android.util.Log;
=======
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
import com.android.internal.R;
import com.android.internal.telephony.IccCard;
import com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient;
Solution content
import android.widget.TextView;
import android.text.format.DateFormat;
import android.text.TextUtils;
import android.util.Log;
import com.android.internal.R;
import com.android.internal.telephony.IccCard;
import com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient;
File
UnlockScreen.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    private boolean mCreatedInPortrait;

<<<<<<< HEAD
    private String mDateFormatString;

    private TextView mCarrier;
    private TextView mDate;
=======
    private TextView mCarrier;
    private TextView mCenterDot;
    private TextView mDate;
    private TextView mTime;
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7

    // are we showing battery information?
    private boolean mShowingBatteryInfo = false;
Solution content
    private boolean mCreatedInPortrait;

    private String mDateFormatString;

    private TextView mCarrier;
    private TextView mDate;

    // are we showing battery information?
    private boolean mShowingBatteryInfo = false;
File
UnlockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
        }

        mCarrier = (TextView) findViewById(R.id.carrier);
<<<<<<< HEAD
        mDate = (TextView) findViewById(R.id.date);

        mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
        refreshTimeAndDateDisplay();

        mStatus1 = (TextView) findViewById(R.id.status1);
        mStatusSep = (TextView) findViewById(R.id.statusSep);
        mStatus2 = (TextView) findViewById(R.id.status2);

=======
        mCenterDot = (TextView) findViewById(R.id.centerDot);
        mDate = (TextView) findViewById(R.id.date);
        mTime = (TextView) findViewById(R.id.time);

        mCenterDot.setText("|");
        refreshTimeAndDateDisplay();

        mStatus1 = (TextView) findViewById(R.id.status1);
        mStatusSep = (TextView) findViewById(R.id.statusSep);
        mStatus2 = (TextView) findViewById(R.id.status2);

>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        resetStatusInfo();

Solution content
        }

        mCarrier = (TextView) findViewById(R.id.carrier);
        mDate = (TextView) findViewById(R.id.date);

        mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
        refreshTimeAndDateDisplay();

        mStatus1 = (TextView) findViewById(R.id.status1);
        mStatusSep = (TextView) findViewById(R.id.statusSep);
        mStatus2 = (TextView) findViewById(R.id.status2);

        resetStatusInfo();

File
UnlockScreen.java
Developer's decision
Version 1
Kind of conflict
Attribute
Cast expression
Method invocation
Chunk
Conflicting content
    }

    public void setEnableFallback(boolean state) {
<<<<<<< HEAD
        if (DEBUG) Log.d(TAG, "setEnableFallback(" + state + ")");
=======
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
        mEnableFallback = state;
    }
    
Solution content
    }

    public void setEnableFallback(boolean state) {
        if (DEBUG) Log.d(TAG, "setEnableFallback(" + state + ")");
        mEnableFallback = state;
    }
    
File
UnlockScreen.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        Date now = new Date();


    private void refreshTimeAndDateDisplay() {
<<<<<<< HEAD
        mDate.setText(DateFormat.format(mDateFormatString, new Date()));
=======
        mTime.setText(DateFormat.getTimeFormat(getContext()).format(now));
        mDate.setText(DateFormat.getMediumDateFormat(getContext()).format(now));
>>>>>>> 1767b3e9c274aabcb70aaa3351f50ecbef9f7ba7
    }

Solution content

    private void refreshTimeAndDateDisplay() {
        mDate.setText(DateFormat.format(mDateFormatString, new Date()));
    }

File
UnlockScreen.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable