Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7578357 authored by Wu-cheng Li's avatar Wu-cheng Li
Browse files

Change slide-to-camera intent to INTENT_ACTION_STILL_IMAGE_CAMERA.

ACTION_CAMERA_BUTTON is for camera hardware button. Change the
intent to INTENT_ACTION_STILL_IMAGE_CAMERA.

bug:5572158

Change-Id: I49ffbf50ecd4458065ee1c2d1fdab8d9e696a1a8
parent 6581043a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.view.ViewGroup;
import android.widget.*;
import android.util.Log;
import android.media.AudioManager;
import android.provider.MediaStore;
import android.provider.Settings;

import java.io.File;
@@ -225,9 +226,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
                mCallback.goToUnlockScreen();
            } else if (target == 2 || target == 3) { // 2 = alt/portrait, 3 = alt/landscape
                if (!mCameraDisabled) {
                    // Broadcast an intent to start the Camera
                    Intent intent = new Intent(Intent.ACTION_CAMERA_BUTTON, null);
                    mContext.sendOrderedBroadcast(intent, null);
                    // Start the Camera
                    Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    mContext.startActivity(intent);
                    mCallback.goToUnlockScreen();
                } else {
                    toggleRingMode();