diff options
author | Owen Lin <owenlin@google.com> | 2009-05-05 15:43:54 -0700 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2009-05-06 23:18:29 -0700 |
commit | 0ce26e03b0b10fc28824518f3e703aa4b1dc02af (patch) | |
tree | 8825544012dcb96311d0e820ab3e755b5a0b1959 /src/com/android/camera | |
parent | ebbf4905eb58be484f9f6c9ee9eb80257cce0b24 (diff) | |
download | LegacyCamera-0ce26e03b0b10fc28824518f3e703aa4b1dc02af.zip LegacyCamera-0ce26e03b0b10fc28824518f3e703aa4b1dc02af.tar.gz LegacyCamera-0ce26e03b0b10fc28824518f3e703aa4b1dc02af.tar.bz2 |
One last bit to get rid of the duplicated roation ....
Diffstat (limited to 'src/com/android/camera')
-rw-r--r-- | src/com/android/camera/Camera.java | 8 | ||||
-rw-r--r-- | src/com/android/camera/ViewImage.java | 15 |
2 files changed, 2 insertions, 21 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 8f647d8..a098a04 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -28,7 +28,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; @@ -58,13 +57,13 @@ import android.view.Gravity; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; -import android.view.MenuItem.OnMenuItemClickListener; import android.view.OrientationEventListener; import android.view.SurfaceHolder; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; +import android.view.MenuItem.OnMenuItemClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationUtils; @@ -1564,16 +1563,13 @@ public class Camera extends Activity implements View.OnClickListener, targetUri = targetUri.buildUpon().appendQueryParameter( "bucketId", ImageManager.CAMERA_IMAGE_BUCKET_ID).build(); Intent intent = new Intent(Intent.ACTION_VIEW, targetUri); - intent.putExtra(MediaStore.EXTRA_SCREEN_ORIENTATION, - ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); intent.putExtra(MediaStore.EXTRA_FULL_SCREEN, true); intent.putExtra(MediaStore.EXTRA_SHOW_ACTION_ICONS, true); intent.putExtra("com.android.camera.ReviewMode", true); - try { startActivity(intent); } catch (ActivityNotFoundException ex) { - // ignore. + Log.e(TAG, "review image fail", ex); } } else { Log.e(TAG, "Can't view last image."); diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java index ef0857f..866e4ff 100644 --- a/src/com/android/camera/ViewImage.java +++ b/src/com/android/camera/ViewImage.java @@ -24,7 +24,6 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.Matrix; import android.net.Uri; @@ -493,8 +492,6 @@ public class ViewImage extends Activity implements View.OnClickListener { mShowActionIcons = intent.getBooleanExtra( MediaStore.EXTRA_SHOW_ACTION_ICONS, false); - setRequestedOrientation(); - mPrefs = PreferenceManager.getDefaultSharedPreferences(this); setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT); @@ -606,18 +603,6 @@ public class ViewImage extends Activity implements View.OnClickListener { } } - private void setRequestedOrientation() { - Intent intent = getIntent(); - if (intent.hasExtra(MediaStore.EXTRA_SCREEN_ORIENTATION)) { - int orientation = intent.getIntExtra( - MediaStore.EXTRA_SCREEN_ORIENTATION, - ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); - if (orientation != getRequestedOrientation()) { - setRequestedOrientation(orientation); - } - } - } - private Animation makeInAnimation(int id) { Animation inAnimation = AnimationUtils.loadAnimation(this, id); return inAnimation; |