Projects >> android_packages_apps_Camera >>e30b3d0314d771732a916c653a73741259430bfd

Chunk
Conflicting content
import com.android.gallery3d.app.AppBridge;
import com.android.gallery3d.app.GalleryActionBar;
import com.android.gallery3d.app.PhotoPage;
<<<<<<< HEAD
=======
import com.android.gallery3d.common.ApiHelper;
>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81
import com.android.gallery3d.ui.ScreenNail;
import com.android.gallery3d.util.MediaSetUtils;
Solution content
import com.android.gallery3d.app.AppBridge;
import com.android.gallery3d.app.GalleryActionBar;
import com.android.gallery3d.app.PhotoPage;
import com.android.gallery3d.ui.ScreenNail;
import com.android.gallery3d.util.MediaSetUtils;
File
ActivityBase.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
            return ActivityBase.this.isPanoramaActivity();
        }

<<<<<<< HEAD
=======
        @Override
        public boolean isStaticCamera() {
            return !ApiHelper.HAS_SURFACE_TEXTURE;
        }

        public void addSecureAlbumItem(boolean isVideo, int id) {
            if (mServer != null) mServer.addSecureAlbumItem(isVideo, id);
        }

>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81
        private void setCameraRelativeFrame(Rect frame) {
            if (mServer != null) mServer.setCameraRelativeFrame(frame);
        }
Solution content
            return ActivityBase.this.isPanoramaActivity();
        }

        private void setCameraRelativeFrame(Rect frame) {
            if (mServer != null) mServer.setCameraRelativeFrame(frame);
        }
File
ActivityBase.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
import com.android.camera.ui.Rotatable;
import com.android.camera.ui.RotateImageView;
import com.android.camera.ui.TwoStateImageView;
<<<<<<< HEAD
=======
import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.util.LightCycleHelper;
>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81

/**
 * A widget that includes three mode selections {@code RotateImageView}'s and
Solution content
import com.android.camera.ui.Rotatable;
import com.android.camera.ui.RotateImageView;
import com.android.camera.ui.TwoStateImageView;

/**
 * A widget that includes three mode selections {@code RotateImageView}'s and
File
ModePicker.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    public static final int MODE_PANORAMA = 2;

    // Total mode number
<<<<<<< HEAD
    private static final int MODE_NUM = 3;
=======
    private final int mModeNum;
    private final boolean mHasPanorama;

    // Fade in and fade out duration in millisecond.
    private static final int FADE_DURATION = 200;
>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81

    /** A callback to be called when the user wants to switch activity. */
    public interface OnModeChangeListener {
Solution content
    public static final int MODE_PANORAMA = 2;

    // Total mode number
    private static final int MODE_NUM = 3;

    /** A callback to be called when the user wants to switch activity. */
    public interface OnModeChangeListener {
File
ModePicker.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
    protected void onFinishInflate() {
        super.onFinishInflate();

<<<<<<< HEAD
        mModeSelectionFrame = findViewById(R.id.mode_selection);
        mModeSelectionIcon = new RotateImageView[MODE_NUM];
        mModeSelectionIcon[MODE_PANORAMA] =
                (RotateImageView) findViewById(R.id.mode_panorama);
=======
        mModeSelectionFrame = (LinearLayout) findViewById(R.id.mode_selection);
        mModeSelectionIcon = new RotateImageView[mModeNum];

>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81
        mModeSelectionIcon[MODE_VIDEO] =
                (RotateImageView) findViewById(R.id.mode_video);
        mModeSelectionIcon[MODE_CAMERA] =
Solution content
    protected void onFinishInflate() {
        super.onFinishInflate();

        mModeSelectionFrame = findViewById(R.id.mode_selection);
        mModeSelectionIcon = new RotateImageView[MODE_NUM];
        mModeSelectionIcon[MODE_PANORAMA] =
                (RotateImageView) findViewById(R.id.mode_panorama);
        mModeSelectionIcon[MODE_VIDEO] =
                (RotateImageView) findViewById(R.id.mode_video);
        mModeSelectionIcon[MODE_CAMERA] =
File
ModePicker.java
Developer's decision
Version 1
Kind of conflict
Array access
Attribute
Cast expression
Method invocation
Chunk
Conflicting content
                (RotateImageView) findViewById(R.id.mode_video);
        mModeSelectionIcon[MODE_CAMERA] =
                (RotateImageView) findViewById(R.id.mode_camera);
<<<<<<< HEAD
=======
        if (mHasPanorama) {
            mModeSelectionIcon[MODE_PANORAMA] =
                    (RotateImageView) findViewById(R.id.mode_panorama);
        } else {

            // Hide panorama icon if it is not supported
            mModeSelectionFrame.removeView(findViewById(R.id.mode_panorama));
            requestLayout();
        }
>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81
        // The current mode frame is for Phone UI only.
        mCurrentModeFrame = findViewById(R.id.current_mode);
Solution content
                (RotateImageView) findViewById(R.id.mode_video);
        mModeSelectionIcon[MODE_CAMERA] =
                (RotateImageView) findViewById(R.id.mode_camera);

        // The current mode frame is for Phone UI only.
        mCurrentModeFrame = findViewById(R.id.current_mode);
File
ModePicker.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            mCurrentModeIcon = new RotateImageView[mModeNum];
            mCurrentModeIcon[0] = (RotateImageView) findViewById(R.id.mode_0);
            mCurrentModeIcon[1] = (RotateImageView) findViewById(R.id.mode_1);
<<<<<<< HEAD
            mCurrentModeIcon[2] = (RotateImageView) findViewById(R.id.mode_2);
=======
            if (mHasPanorama) {
                mCurrentModeIcon[2] = (RotateImageView) findViewById(R.id.mode_2);
            } else {
                // Hide panorama icon if it is not supported
                ViewGroup subCurrentModeFrame = (ViewGroup) findViewById(R.id.sub_current_mode);
                subCurrentModeFrame.removeView(subCurrentModeFrame.findViewById(R.id.mode_2));
            }
>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81
        } else {
            // current_mode_bar is only for tablet.
            mCurrentModeBar = findViewById(R.id.current_mode_bar);
Solution content
            mCurrentModeIcon[0] = (RotateImageView) findViewById(R.id.mode_0);
            mCurrentModeIcon[1] = (RotateImageView) findViewById(R.id.mode_1);
            mCurrentModeIcon[2] = (RotateImageView) findViewById(R.id.mode_2);
        } else {
            // current_mode_bar is only for tablet.
            mCurrentModeBar = findViewById(R.id.current_mode_bar);
File
ModePicker.java
Developer's decision
Version 1
Kind of conflict
Array access
Cast expression
If statement
Chunk
Conflicting content
            mCurrentModeBar = findViewById(R.id.current_mode_bar);
            enableModeSelection(true);
        }
<<<<<<< HEAD
=======

        // Construct animation according to the orientation of the mode selection frame.
        float ratio = 1.0f - 1.0f / mModeNum;
        if (mModeSelectionFrame.getOrientation() == LinearLayout.HORIZONTAL) {
            mFadeIn = new TranslateAnimation(Animation.RELATIVE_TO_SELF, -ratio,
                    Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0);
            mFadeOut = new TranslateAnimation(Animation.ABSOLUTE, 0, Animation.RELATIVE_TO_SELF,
                    -ratio, Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0);
        } else {
            mFadeIn = new TranslateAnimation(Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0,
                    Animation.RELATIVE_TO_SELF, ratio, Animation.ABSOLUTE, 0);
            mFadeOut = new TranslateAnimation(Animation.ABSOLUTE, 0, Animation.ABSOLUTE, 0,
                    Animation.ABSOLUTE, 0, Animation.RELATIVE_TO_SELF, ratio);
        }
        DecelerateInterpolator interpolator = new DecelerateInterpolator();
        mFadeIn.setInterpolator(interpolator);
        mFadeIn.setDuration(FADE_DURATION);
        mFadeOut.setInterpolator(interpolator);
        mFadeOut.setDuration(FADE_DURATION);
        mFadeOut.setAnimationListener(mAnimationListener);

>>>>>>> 028cb770a16d9ec45fd956786a12173536ac5e81
        registerOnClickListener();
    }
Solution content
            mCurrentModeBar = findViewById(R.id.current_mode_bar);
            enableModeSelection(true);
        }
        registerOnClickListener();
    }
File
ModePicker.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
If statement
Method invocation
Variable