Skip to content

Commit b757835

Browse files
author
Wu-cheng Li
committed
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
1 parent 6581043 commit b757835

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

policy/src/com/android/internal/policy/impl/LockScreen.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import android.widget.*;
3535
import android.util.Log;
3636
import android.media.AudioManager;
37+
import android.provider.MediaStore;
3738
import android.provider.Settings;
3839

3940
import java.io.File;
@@ -225,9 +226,10 @@ public void onTrigger(View v, int target) {
225226
mCallback.goToUnlockScreen();
226227
} else if (target == 2 || target == 3) { // 2 = alt/portrait, 3 = alt/landscape
227228
if (!mCameraDisabled) {
228-
// Broadcast an intent to start the Camera
229-
Intent intent = new Intent(Intent.ACTION_CAMERA_BUTTON, null);
230-
mContext.sendOrderedBroadcast(intent, null);
229+
// Start the Camera
230+
Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
231+
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
232+
mContext.startActivity(intent);
231233
mCallback.goToUnlockScreen();
232234
} else {
233235
toggleRingMode();

0 commit comments

Comments
 (0)