diff options
author | Owen Lin <owenlin@google.com> | 2009-10-15 03:43:44 -0700 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2009-10-21 00:01:54 -0700 |
commit | d6c2fb7a38fcdb58742fcfffd67a4594487ec71c (patch) | |
tree | f73926e8004d67040e108f7f8bc8a6a3bb7f1e75 | |
parent | 666ea1b28a76aeba74744148b15099254d918671 (diff) | |
download | Gallery-d6c2fb7a38fcdb58742fcfffd67a4594487ec71c.tar.gz |
Hide Camera's activities by removing their intent-filters.
Also change the android package name for Gallery, otherwise it will
conflicts with Camera's.
Change-Id: I1fb24c931388e90d0edbd38078609781bdb849e1
31 files changed, 84 insertions, 54 deletions
@@ -5,7 +5,7 @@ LOCAL_MODULE_TAGS := user LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := Camera +LOCAL_PACKAGE_NAME := Gallery LOCAL_CERTIFICATE := media include $(BUILD_PACKAGE) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6b403fc..cb48b9f 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,5 +1,5 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.android.camera" + package="com.android.gallery" android:sharedUserId="android.media"> <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> @@ -16,32 +16,14 @@ android:label="@string/camera_label" android:taskAffinity=""> <service android:name="UploadService" android:process="android.process.media" /> - <receiver android:name="CameraButtonIntentReceiver"> - <intent-filter> - <action android:name="android.intent.action.CAMERA_BUTTON"/> - </intent-filter> - </receiver> - <activity android:name="Camera" + <activity android:name="com.android.camera.Camera" android:configChanges="orientation|keyboardHidden" android:theme="@style/CustomTheme" android:screenOrientation="landscape" android:clearTaskOnLaunch="true" android:taskAffinity="android.task.camera"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.DEFAULT" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - <intent-filter> - <action android:name="android.media.action.IMAGE_CAPTURE" /> - <category android:name="android.intent.category.DEFAULT" /> - </intent-filter> - <intent-filter> - <action android:name="android.media.action.STILL_IMAGE_CAMERA" /> - <category android:name="android.intent.category.DEFAULT" /> - </intent-filter> </activity> - <activity android:name="VideoCamera" + <activity android:name="com.android.camera.VideoCamera" android:label="@string/video_camera_label" android:configChanges="orientation|keyboardHidden" android:icon="@drawable/ic_launcher_video_camera" @@ -49,16 +31,9 @@ android:screenOrientation="landscape" android:clearTaskOnLaunch="true" android:taskAffinity="android.task.camcorder"> - <intent-filter> - <action android:name="android.media.action.VIDEO_CAMERA" /> - <category android:name="android.intent.category.DEFAULT" /> - </intent-filter> - <intent-filter> - <action android:name="android.media.action.VIDEO_CAPTURE" /> - <category android:name="android.intent.category.DEFAULT" /> - </intent-filter> </activity> - <activity android:name="GalleryPicker" android:label="@string/gallery_picker_label" + <activity android:name="com.android.camera.GalleryPicker" + android:label="@string/gallery_picker_label" android:configChanges="orientation|keyboardHidden" android:icon="@drawable/ic_launcher_gallery" android:clearTaskOnLaunch="true" @@ -69,7 +44,8 @@ <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> - <activity android:name="ImageGallery" android:label="@string/gallery_label" + <activity android:name="com.android.camera.ImageGallery" + android:label="@string/gallery_label" android:configChanges="orientation|keyboardHidden" android:icon="@drawable/ic_launcher_gallery"> <intent-filter> @@ -111,7 +87,7 @@ </intent-filter> </activity> <activity - android:name="CropImage" + android:name="com.android.camera.CropImage" android:process=":CropImage" android:configChanges="orientation|keyboardHidden" android:label="@string/crop_label"> @@ -123,14 +99,14 @@ <category android:name="android.intent.category.SELECTED_ALTERNATIVE" /> </intent-filter> </activity> - <activity android:name="ReviewImage" + <activity android:name="com.android.camera.ReviewImage" android:label="@string/view_label" android:theme="@style/CustomTheme" android:screenOrientation="behind" android:configChanges="orientation|keyboardHidden" android:exported="true"> </activity> - <activity android:name="ViewImage" + <activity android:name="com.android.camera.ViewImage" android:label="@string/view_label" android:screenOrientation="behind" android:configChanges="orientation|keyboardHidden"> @@ -140,7 +116,7 @@ <data android:mimeType="image/*" /> </intent-filter> </activity> - <activity android:name="MovieView" + <activity android:name="com.android.camera.MovieView" android:label="@string/movieviewlabel" android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden" @@ -168,21 +144,22 @@ <data android:mimeType="video/3gpp2" /> </intent-filter> </activity> - <activity android:name=".DeleteImage" + <activity android:name="com.android.camera.DeleteImage" android:label="@string/delete_images_message" android:theme="@style/Theme.DeleteImageDialog"> </activity> - <activity android:name="GallerySettings" android:label="@string/preferences_label"> + <activity android:name="com.android.camera.GallerySettings" + android:label="@string/preferences_label"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> </intent-filter> </activity> - <activity android:name=".Wallpaper" - android:label="@string/camera_setas_wallpaper" - android:icon="@drawable/ic_launcher_gallery"> + <activity android:name="com.android.camera.Wallpaper" + android:label="@string/camera_setas_wallpaper" + android:icon="@drawable/ic_launcher_gallery"> <intent-filter> <action android:name="android.intent.action.ATTACH_DATA" /> <data android:mimeType="image/*" /> @@ -190,25 +167,27 @@ </intent-filter> </activity> - <activity android:name=".PickWallpaper" - android:label="@string/camera_pick_wallpaper" - android:icon="@drawable/ic_launcher_gallery"> + <activity android:name="com.android.camera.PickWallpaper" + android:label="@string/camera_pick_wallpaper" + android:icon="@drawable/ic_launcher_gallery"> <intent-filter> <action android:name="android.intent.action.SET_WALLPAPER" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> - <receiver android:name="PhotoAppWidgetProvider" android:label="@string/gadget_title" - android:icon="@drawable/ic_launcher_gallery"> + <receiver android:name="com.android.camera.PhotoAppWidgetProvider" + android:label="@string/gadget_title" + android:icon="@drawable/ic_launcher_gallery"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> - <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info" /> + <meta-data android:name="android.appwidget.provider" + android:resource="@xml/appwidget_info" /> </receiver> <!-- We configure a widget by asking to pick a photo, then crop it, and store the config internally --> - <activity android:name="PhotoAppWidgetConfigure"> + <activity android:name="com.android.camera.PhotoAppWidgetConfigure"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" /> </intent-filter> @@ -217,7 +196,8 @@ <!-- We also allow direct binding where the caller provides a bitmap and appWidgetId to bind. We require the permission because this changes our internal database without user confirmation. --> - <activity android:name="PhotoAppWidgetBind" android:exported="true" + <activity android:name="com.android.camera.PhotoAppWidgetBind" + android:exported="true" android:theme="@android:style/Theme.NoDisplay" android:permission="android.permission.BIND_APPWIDGET" /> diff --git a/res/layout/camera.xml b/res/layout/camera.xml index 8984a0c..2a60de5 100644 --- a/res/layout/camera.xml +++ b/res/layout/camera.xml @@ -15,7 +15,7 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:camera="http://schemas.android.com/apk/res/com.android.camera" + xmlns:camera="http://schemas.android.com/apk/res/com.android.gallery" android:background="@drawable/camera_background" android:id="@+id/camera" android:orientation="horizontal" diff --git a/res/layout/review_control.xml b/res/layout/review_control.xml index a1291a5..c964340 100644 --- a/res/layout/review_control.xml +++ b/res/layout/review_control.xml @@ -15,7 +15,7 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:camera="http://schemas.android.com/apk/res/com.android.camera" + xmlns:camera="http://schemas.android.com/apk/res/com.android.gallery" android:id="@+id/button_bar" android:gravity="center_horizontal" android:layout_height="fill_parent" diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml index a59de44..62a9f8f 100644 --- a/res/xml/camera_preferences.xml +++ b/res/xml/camera_preferences.xml @@ -15,7 +15,7 @@ --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"> + xmlns:camera="http://schemas.android.com/apk/res/com.android.gallery"> <PreferenceCategory android:title="@string/pref_camera_settings_category"> <com.android.camera.IconListPreference android:key="pref_camera_flashmode_key" diff --git a/src/com/android/camera/ActionMenuButton.java b/src/com/android/camera/ActionMenuButton.java index e9033cc..622652c 100644 --- a/src/com/android/camera/ActionMenuButton.java +++ b/src/com/android/camera/ActionMenuButton.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 33dfa08..3aee44f 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index e7d7d0e..46f1ed5 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -1,5 +1,7 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; diff --git a/src/com/android/camera/CropImage.java b/src/com/android/camera/CropImage.java index 6a52d72..fccb626 100644 --- a/src/com/android/camera/CropImage.java +++ b/src/com/android/camera/CropImage.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import com.android.camera.gallery.IImage; import com.android.camera.gallery.IImageList; diff --git a/src/com/android/camera/DeleteImage.java b/src/com/android/camera/DeleteImage.java index 3a13466..1c1b07e 100644 --- a/src/com/android/camera/DeleteImage.java +++ b/src/com/android/camera/DeleteImage.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.ContentResolver; import android.content.Intent; diff --git a/src/com/android/camera/EvenlySpacedLayout.java b/src/com/android/camera/EvenlySpacedLayout.java index d994fe4..0b0f87e 100644 --- a/src/com/android/camera/EvenlySpacedLayout.java +++ b/src/com/android/camera/EvenlySpacedLayout.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; diff --git a/src/com/android/camera/GalleryPicker.java b/src/com/android/camera/GalleryPicker.java index 39d1d1e..33101fd 100644 --- a/src/com/android/camera/GalleryPicker.java +++ b/src/com/android/camera/GalleryPicker.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import com.android.camera.gallery.IImage; import com.android.camera.gallery.IImageList; diff --git a/src/com/android/camera/GalleryPickerItem.java b/src/com/android/camera/GalleryPickerItem.java index 99e4a58..a55ff6b 100644 --- a/src/com/android/camera/GalleryPickerItem.java +++ b/src/com/android/camera/GalleryPickerItem.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.graphics.Canvas; import android.graphics.Rect; diff --git a/src/com/android/camera/GallerySettings.java b/src/com/android/camera/GallerySettings.java index 32c806c..3590e59 100644 --- a/src/com/android/camera/GallerySettings.java +++ b/src/com/android/camera/GallerySettings.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.os.Bundle; import android.preference.PreferenceActivity; diff --git a/src/com/android/camera/GridViewSpecial.java b/src/com/android/camera/GridViewSpecial.java index 5326ebb..3c3caf1 100644 --- a/src/com/android/camera/GridViewSpecial.java +++ b/src/com/android/camera/GridViewSpecial.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import static com.android.camera.Util.Assert; import android.app.Activity; diff --git a/src/com/android/camera/HighlightView.java b/src/com/android/camera/HighlightView.java index c05a4b2..d5478e0 100644 --- a/src/com/android/camera/HighlightView.java +++ b/src/com/android/camera/HighlightView.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; diff --git a/src/com/android/camera/IconIndicator.java b/src/com/android/camera/IconIndicator.java index c3f0392..e180a3d 100644 --- a/src/com/android/camera/IconIndicator.java +++ b/src/com/android/camera/IconIndicator.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; diff --git a/src/com/android/camera/IconListPreference.java b/src/com/android/camera/IconListPreference.java index 314b7a9..6e5d8d8 100644 --- a/src/com/android/camera/IconListPreference.java +++ b/src/com/android/camera/IconListPreference.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; diff --git a/src/com/android/camera/ImageGallery.java b/src/com/android/camera/ImageGallery.java index 680d186..e62c05b 100644 --- a/src/com/android/camera/ImageGallery.java +++ b/src/com/android/camera/ImageGallery.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java index 3fed674..a5d50eb 100644 --- a/src/com/android/camera/MenuHelper.java +++ b/src/com/android/camera/MenuHelper.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.app.AlertDialog; import android.content.ActivityNotFoundException; diff --git a/src/com/android/camera/MovieView.java b/src/com/android/camera/MovieView.java index 48001b8..57e62ba 100644 --- a/src/com/android/camera/MovieView.java +++ b/src/com/android/camera/MovieView.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.Intent; diff --git a/src/com/android/camera/MovieViewControl.java b/src/com/android/camera/MovieViewControl.java index 737433b..012134c 100644 --- a/src/com/android/camera/MovieViewControl.java +++ b/src/com/android/camera/MovieViewControl.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.AlertDialog; import android.content.ContentResolver; import android.content.ContentValues; diff --git a/src/com/android/camera/OnScreenHint.java b/src/com/android/camera/OnScreenHint.java index 9918428..fdda528 100644 --- a/src/com/android/camera/OnScreenHint.java +++ b/src/com/android/camera/OnScreenHint.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.graphics.PixelFormat; import android.os.Handler; diff --git a/src/com/android/camera/OnScreenSettings.java b/src/com/android/camera/OnScreenSettings.java index ffd309d..2fd00c0 100644 --- a/src/com/android/camera/OnScreenSettings.java +++ b/src/com/android/camera/OnScreenSettings.java @@ -1,5 +1,7 @@ package com.android.camera; +import com.android.gallery.R; + import android.content.Context; import android.graphics.PixelFormat; import android.os.Handler; diff --git a/src/com/android/camera/PhotoAppWidgetProvider.java b/src/com/android/camera/PhotoAppWidgetProvider.java index da680b4..ec1f924 100644 --- a/src/com/android/camera/PhotoAppWidgetProvider.java +++ b/src/com/android/camera/PhotoAppWidgetProvider.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ContentValues; diff --git a/src/com/android/camera/PreviewFrameLayout.java b/src/com/android/camera/PreviewFrameLayout.java index 7ef9206..49a39ef 100644 --- a/src/com/android/camera/PreviewFrameLayout.java +++ b/src/com/android/camera/PreviewFrameLayout.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.Context; import android.util.AttributeSet; diff --git a/src/com/android/camera/ReviewImage.java b/src/com/android/camera/ReviewImage.java index 0633b18..ef629da 100644 --- a/src/com/android/camera/ReviewImage.java +++ b/src/com/android/camera/ReviewImage.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.Context; import android.content.Intent; diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java index d44435a..69e608a 100644 --- a/src/com/android/camera/Util.java +++ b/src/com/android/camera/Util.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index afd4cdd..0786fa5 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java index 3ee3029..2992f7a 100644 --- a/src/com/android/camera/ViewImage.java +++ b/src/com/android/camera/ViewImage.java @@ -16,6 +16,8 @@ package com.android.camera; +import com.android.gallery.R; + import android.app.Activity; import android.content.Context; import android.content.Intent; diff --git a/tests/Android.mk b/tests/Android.mk index f5972cb..10f7a81 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -10,9 +10,9 @@ LOCAL_JAVA_LIBRARIES := android.test.runner # Include all test java files. LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := CameraTests +LOCAL_PACKAGE_NAME := GalleryTests -LOCAL_INSTRUMENTATION_FOR := Camera +LOCAL_INSTRUMENTATION_FOR := Gallery include $(BUILD_PACKAGE) |