summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CameraActivity.java9
-rw-r--r--src/com/android/camera/CameraSettings.java17
-rw-r--r--src/com/android/camera/SDCard.java8
-rw-r--r--src/com/android/camera/VideoModule.java13
-rw-r--r--src/com/android/camera/crop/CropActivity.java14
-rw-r--r--src/com/android/camera/ui/FaceView.java4
6 files changed, 28 insertions, 37 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 71894b82a..0553979d1 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1407,11 +1407,13 @@ public class CameraActivity extends Activity
}
GcamHelper.init(getContentResolver());
+/*
mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
mOriginalMasterVol = mAudioManager.getMasterVolume();
mShutterVol = SystemProperties.getInt("persist.camera.snapshot.volume", -1);
if (mShutterVol >= 0 && mShutterVol <= 100 )
mAudioManager.setMasterVolume(mShutterVol,0);
+*/
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
setContentView(R.layout.camera_filmstrip);
@@ -1593,8 +1595,10 @@ public class CameraActivity extends Activity
@Override
public void onPause() {
+/*
if (mShutterVol >= 0 && mShutterVol <= 100)
mAudioManager.setMasterVolume(mOriginalMasterVol,0);
+*/
// Delete photos that are pending deletion
performDeletion();
mOrientationListener.disable();
@@ -1618,9 +1622,10 @@ public class CameraActivity extends Activity
@Override
public void onResume() {
+/*
if (mShutterVol >= 0 && mShutterVol <= 100)
mAudioManager.setMasterVolume(mShutterVol,0);
-
+*/
UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA,
UsageStatistics.ACTION_FOREGROUNDED, this.getClass().getSimpleName());
@@ -1681,8 +1686,10 @@ public class CameraActivity extends Activity
mWakeLock.release();
Log.d(TAG, "wake lock release");
}
+/*
if (mShutterVol >= 0 && mShutterVol <= 100)
mAudioManager.setMasterVolume(mOriginalMasterVol,0);
+*/
if (mSecureCamera) {
unregisterReceiver(mScreenOffReceiver);
}
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 465c69049..e8d1a9945 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -1175,11 +1175,13 @@ public class CameraSettings {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
private static void getFineResolutionQuality(ArrayList<String> supported,
int cameraId,Parameters parameters) {
+/*
if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_4kDCI)) {
if (checkSupportedVideoQuality(parameters,4096,2160)) {
supported.add(Integer.toString(CamcorderProfile.QUALITY_4kDCI));
}
}
+*/
if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_2160P)) {
if (checkSupportedVideoQuality(parameters,3840,2160)) {
supported.add(Integer.toString(CamcorderProfile.QUALITY_2160P));
@@ -1200,26 +1202,11 @@ public class CameraSettings {
supported.add(Integer.toString(CamcorderProfile.QUALITY_480P));
}
}
- if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_FWVGA)) {
- if (checkSupportedVideoQuality(parameters,864,480)){
- supported.add(Integer.toString(CamcorderProfile.QUALITY_FWVGA));
- }
- }
- if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_WVGA)) {
- if (checkSupportedVideoQuality(parameters,800,480)){
- supported.add(Integer.toString(CamcorderProfile.QUALITY_WVGA));
- }
- }
if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_VGA)) {
if (checkSupportedVideoQuality(parameters,640,480)){
supported.add(Integer.toString(CamcorderProfile.QUALITY_VGA));
}
}
- if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_HVGA)) {
- if (checkSupportedVideoQuality(parameters,480,360)){
- supported.add(Integer.toString(CamcorderProfile.QUALITY_HVGA));
- }
- }
if (CamcorderProfile.hasProfile(cameraId, CamcorderProfile.QUALITY_CIF)) {
if (checkSupportedVideoQuality(parameters,352,288)){
supported.add(Integer.toString(CamcorderProfile.QUALITY_CIF));
diff --git a/src/com/android/camera/SDCard.java b/src/com/android/camera/SDCard.java
index dad354007..e4f37f4e2 100644
--- a/src/com/android/camera/SDCard.java
+++ b/src/com/android/camera/SDCard.java
@@ -28,7 +28,8 @@
package com.android.camera;
-import android.content.Context;
+import android.app.ActivityThread;
+import android.os.UserHandle;
import android.os.StatFs;
import android.os.Environment;
import android.os.storage.StorageVolume;
@@ -95,7 +96,10 @@ public class SDCard {
try {
mMountService = IMountService.Stub.asInterface(ServiceManager
.getService("mount"));
- final StorageVolume[] volumes = mMountService.getVolumeList();
+
+ String packageName = ActivityThread.currentOpPackageName();
+
+ final StorageVolume[] volumes = mMountService.getVolumeList(UserHandle.myUserId(), packageName, 0);
if (volumes.length > VOLUME_SDCARD_INDEX) {
mVolume = volumes[VOLUME_SDCARD_INDEX];
}
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index cfca4d671..28c62f360 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -306,7 +306,8 @@ public class VideoModule implements CameraModule,
VIDEO_ENCODER_TABLE.put("h263", MediaRecorder.VideoEncoder.H263);
VIDEO_ENCODER_TABLE.put("h264", MediaRecorder.VideoEncoder.H264);
- VIDEO_ENCODER_TABLE.put("h265", MediaRecorder.VideoEncoder.H265);
+//TODO: Add dependency
+// VIDEO_ENCODER_TABLE.put("h265", MediaRecorder.VideoEncoder.H265);
VIDEO_ENCODER_TABLE.put("m4v", MediaRecorder.VideoEncoder.MPEG_4_SP);
VIDEO_ENCODER_TABLE.putDefault(MediaRecorder.VideoEncoder.DEFAULT);
@@ -900,8 +901,8 @@ public class VideoModule implements CameraModule,
}
private boolean is4KEnabled() {
- if (mProfile.quality == CamcorderProfile.QUALITY_2160P ||
- mProfile.quality == CamcorderProfile.QUALITY_4kDCI) {
+ if (mProfile.quality == CamcorderProfile.QUALITY_2160P /*||
+ mProfile.quality == CamcorderProfile.QUALITY_4kDCI*/) {
return true;
} else {
return false;
@@ -963,7 +964,8 @@ public class VideoModule implements CameraModule,
boolean supported = false;
List<VideoEncoderCap> videoEncoders = EncoderCapabilities.getVideoEncoders();
for (VideoEncoderCap videoEncoder: videoEncoders) {
- if (videoEncoder.mCodec == mVideoEncoder) {
+//TODO: How to handle HFRFrameWidth and HFRFrameHeight
+/* if (videoEncoder.mCodec == mVideoEncoder) {
int maxBitrate = (videoEncoder.mMaxHFRFrameWidth *
videoEncoder.mMaxHFRFrameHeight *
videoEncoder.mMaxHFRMode);
@@ -972,6 +974,7 @@ public class VideoModule implements CameraModule,
}
break;
}
+*/
}
return supported;
@@ -2313,6 +2316,7 @@ public class VideoModule implements CameraModule,
List<VideoEncoderCap> videoEncoders = EncoderCapabilities.getVideoEncoders();
for (VideoEncoderCap videoEncoder: videoEncoders) {
if (videoEncoder.mCodec == mVideoEncoder){
+/* TODO:
int maxBitrate = (videoEncoder.mMaxHFRFrameWidth *
videoEncoder.mMaxHFRFrameHeight *
videoEncoder.mMaxHFRMode);
@@ -2331,6 +2335,7 @@ public class VideoModule implements CameraModule,
}
}
break;
+*/
}
}
if ("hfr".equals(HighFrameRate.substring(0,3))) {
diff --git a/src/com/android/camera/crop/CropActivity.java b/src/com/android/camera/crop/CropActivity.java
index 9c9295dc4..9c09b9a87 100644
--- a/src/com/android/camera/crop/CropActivity.java
+++ b/src/com/android/camera/crop/CropActivity.java
@@ -118,8 +118,6 @@ public class CropActivity extends Activity {
if (intent.getData() != null) {
mSourceUri = intent.getData();
startLoadBitmap(mSourceUri);
- } else {
- pickImage();
}
}
@@ -144,18 +142,6 @@ public class CropActivity extends Activity {
}
/**
- * Opens a selector in Gallery to chose an image for use when none was given
- * in the CROP intent.
- */
- private void pickImage() {
- Intent intent = new Intent();
- intent.setType("image/*");
- intent.setAction(Intent.ACTION_GET_CONTENT);
- startActivityForResult(Intent.createChooser(intent, getString(R.string.select_image)),
- SELECT_PICTURE);
- }
-
- /**
* Callback for pickImage().
*/
@Override
diff --git a/src/com/android/camera/ui/FaceView.java b/src/com/android/camera/ui/FaceView.java
index 4ab74e4cf..773196f7b 100644
--- a/src/com/android/camera/ui/FaceView.java
+++ b/src/com/android/camera/ui/FaceView.java
@@ -34,7 +34,7 @@ import android.view.View;
import com.android.camera.PhotoUI;
import com.android.camera.util.CameraUtil;
import org.codeaurora.snapcam.R;
-import org.codeaurora.camera.ExtendedFace;
+//import org.codeaurora.camera.ExtendedFace;
public class FaceView extends View
implements FocusIndicator, Rotatable,
@@ -232,6 +232,7 @@ public class FaceView extends View
mPaint.setColor(mColor);
mRect.offset(dx, dy);
canvas.drawOval(mRect, mPaint);
+/*
if (mFaces[i] instanceof ExtendedFace) {
ExtendedFace face = (ExtendedFace)mFaces[i];
float[] point = new float[4];
@@ -390,6 +391,7 @@ public class FaceView extends View
}
}
}
+*/
}
canvas.restore();
}