summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml415
-rw-r--r--jni/filters/bwfilter.c55
-rw-r--r--jni/filters/contrast.c56
-rw-r--r--jni/filters/edge.c126
-rw-r--r--jni/filters/exposure.c37
-rw-r--r--jni/filters/filters.h53
-rw-r--r--jni/filters/fx.c88
-rw-r--r--jni/filters/geometry.c184
-rw-r--r--jni/filters/gradient.c65
-rw-r--r--jni/filters/highlight.c40
-rw-r--r--jni/filters/hsv.c156
-rw-r--r--jni/filters/hue.c46
-rw-r--r--jni/filters/kmeans.cc81
-rw-r--r--jni/filters/kmeans.h232
-rw-r--r--jni/filters/negative.c33
-rw-r--r--jni/filters/redEyeMath.c172
-rw-r--r--jni/filters/redeye.c31
-rw-r--r--jni/filters/saturated.c53
-rw-r--r--jni/filters/shadows.c57
-rw-r--r--jni/filters/tinyplanet.cc150
-rw-r--r--jni/filters/vibrance.c62
-rw-r--r--jni/filters/vignette.c49
-rw-r--r--jni/filters/wbalance.c169
-rw-r--r--jni/jni_egl_fence.cpp78
-rw-r--r--jni/jni_egl_fence.h33
-rw-r--r--jni_jpegstream/src/error_codes.h26
-rw-r--r--jni_jpegstream/src/inputstream_wrapper.cpp69
-rw-r--r--jni_jpegstream/src/inputstream_wrapper.h38
-rw-r--r--jni_jpegstream/src/jerr_hook.cpp52
-rw-r--r--jni_jpegstream/src/jerr_hook.h43
-rw-r--r--jni_jpegstream/src/jni_defines.h29
-rw-r--r--jni_jpegstream/src/jpeg_config.h31
-rw-r--r--jni_jpegstream/src/jpeg_hook.cpp198
-rw-r--r--jni_jpegstream/src/jpeg_hook.h76
-rw-r--r--jni_jpegstream/src/jpeg_reader.cpp254
-rw-r--r--jni_jpegstream/src/jpeg_reader.h88
-rw-r--r--jni_jpegstream/src/jpeg_writer.cpp218
-rw-r--r--jni_jpegstream/src/jpeg_writer.h83
-rw-r--r--jni_jpegstream/src/jpegstream.cpp377
-rw-r--r--jni_jpegstream/src/outputstream_wrapper.cpp49
-rw-r--r--jni_jpegstream/src/outputstream_wrapper.h35
-rw-r--r--jni_jpegstream/src/stream_wrapper.cpp97
-rw-r--r--jni_jpegstream/src/stream_wrapper.h44
-rw-r--r--proguard-project.txt20
-rw-r--r--proguard.flags86
-rw-r--r--project.properties14
-rw-r--r--res/drawable/action_bar_two_line_background.xml21
-rw-r--r--res/drawable/border_photo_frame_widget.xml22
-rw-r--r--res/drawable/btn_shutter_video_recording.xml21
-rw-r--r--res/drawable/filtershow_addpoint.pngbin5073 -> 0 bytes
-rw-r--r--res/drawable/filtershow_background.pngbin1863 -> 0 bytes
-rw-r--r--res/drawable/filtershow_border_4x5.9.pngbin300783 -> 0 bytes
-rwxr-xr-xres/drawable/filtershow_border_black.9.pngbin688 -> 0 bytes
-rw-r--r--res/drawable/filtershow_border_brush.9.pngbin618721 -> 0 bytes
-rwxr-xr-xres/drawable/filtershow_border_film.pngbin36176 -> 0 bytes
-rw-r--r--res/drawable/filtershow_border_grunge.9.pngbin86589 -> 0 bytes
-rwxr-xr-xres/drawable/filtershow_border_rounded_black.9.pngbin1113 -> 0 bytes
-rwxr-xr-xres/drawable/filtershow_border_rounded_white.9.pngbin1219 -> 0 bytes
-rw-r--r--res/drawable/filtershow_border_sumi_e.9.pngbin45106 -> 0 bytes
-rw-r--r--res/drawable/filtershow_border_tape.9.pngbin216055 -> 0 bytes
-rwxr-xr-xres/drawable/filtershow_border_white.9.pngbin687 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_background.xml8
-rw-r--r--res/drawable/filtershow_button_border.pngbin1021 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_colors.pngbin1277 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_colors_contrast.pngbin1218 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_colors_vignette.pngbin2147 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_current.pngbin1355 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_fx.pngbin1115 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_geometry.pngbin975 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_geometry_crop.pngbin999 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_geometry_flip.pngbin1809 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_geometry_rotate.pngbin2185 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_geometry_straighten.pngbin3104 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_operations.pngbin1270 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_origin.pngbin1069 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_redo.pngbin964 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_selected_background.9.pngbin2885 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_settings.pngbin1062 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_show_original.pngbin1738 -> 0 bytes
-rw-r--r--res/drawable/filtershow_button_undo.pngbin965 -> 0 bytes
-rw-r--r--res/drawable/filtershow_color_picker_circle.xml24
-rw-r--r--res/drawable/filtershow_color_picker_roundrect.xml25
-rw-r--r--res/drawable/filtershow_delpoint.pngbin4657 -> 0 bytes
-rw-r--r--res/drawable/filtershow_drawing.pngbin1277 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0000_vintage.pngbin11635 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0001_instant.pngbin11179 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0002_bleach.pngbin12263 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0003_blue_crush.pngbin11417 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0004_bw_contrast.pngbin4389 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0005_punch.pngbin11338 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0006_x_process.pngbin8548 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0007_washout.pngbin5907 -> 0 bytes
-rw-r--r--res/drawable/filtershow_fx_0008_washout_color.pngbin11387 -> 0 bytes
-rw-r--r--res/drawable/filtershow_grad_button.xml23
-rw-r--r--res/drawable/filtershow_menu_marker.pngbin1164 -> 0 bytes
-rw-r--r--res/drawable/filtershow_scrubber.xml22
-rw-r--r--res/drawable/filtershow_slider.xml28
-rw-r--r--res/drawable/filtershow_state_button_background0
-rw-r--r--res/drawable/filtershow_tiled_background.xml21
-rw-r--r--res/drawable/filtershow_vertical_bar.pngbin148 -> 0 bytes
-rw-r--r--res/drawable/filtershow_vertical_line.xml22
-rw-r--r--res/drawable/icn_media_pause.xml23
-rw-r--r--res/drawable/icn_media_play.xml23
-rw-r--r--res/drawable/ingest_item_list_selector.xml23
-rw-r--r--res/drawable/menu_save_photo.xml20
-rw-r--r--res/drawable/photoeditor_effect_redeye.pngbin1799 -> 0 bytes
-rw-r--r--res/drawable/photopage_bottom_button_background.xml5
-rw-r--r--res/drawable/white_text_bg_gradient.xml22
-rw-r--r--res/interpolator/decelerate_cubic.xml17
-rw-r--r--res/interpolator/decelerate_quint.xml17
-rw-r--r--res/layout-land/filtershow_activity.xml85
-rw-r--r--res/layout-land/filtershow_category_panel_new.xml32
-rw-r--r--res/layout-land/filtershow_editor_panel.xml127
-rw-r--r--res/layout-land/filtershow_main_panel.xml98
-rw-r--r--res/layout-land/filtershow_state_panel_new.xml33
-rw-r--r--res/layout/action_bar_text.xml28
-rw-r--r--res/layout/action_bar_two_line_text.xml42
-rw-r--r--res/layout/action_mode.xml48
-rw-r--r--res/layout/album_content.xml57
-rw-r--r--res/layout/album_header.xml54
-rw-r--r--res/layout/album_set_item.xml39
-rw-r--r--res/layout/appwidget_loading_item.xml30
-rw-r--r--res/layout/appwidget_main.xml42
-rw-r--r--res/layout/appwidget_photo_item.xml27
-rw-r--r--res/layout/bg_replacement_training_message.xml56
-rw-r--r--res/layout/choose_widget_type.xml54
-rw-r--r--res/layout/crop_activity.xml55
-rw-r--r--res/layout/cropimage.xml21
-rw-r--r--res/layout/details.xml23
-rw-r--r--res/layout/details_list.xml22
-rw-r--r--res/layout/dialog_picker.xml38
-rw-r--r--res/layout/editor_grad_button.xml48
-rw-r--r--res/layout/filtershow_actionbar.xml27
-rw-r--r--res/layout/filtershow_activity.xml87
-rw-r--r--res/layout/filtershow_category_panel.xml62
-rw-r--r--res/layout/filtershow_category_panel_new.xml41
-rw-r--r--res/layout/filtershow_color_gird.xml203
-rw-r--r--res/layout/filtershow_color_picker.xml58
-rw-r--r--res/layout/filtershow_control_action_slider.xml55
-rw-r--r--res/layout/filtershow_control_style_chooser.xml37
-rw-r--r--res/layout/filtershow_control_title_slider.xml43
-rw-r--r--res/layout/filtershow_cp_custom_title.xml26
-rw-r--r--res/layout/filtershow_crop_button.xml27
-rw-r--r--res/layout/filtershow_curves_button.xml27
-rw-r--r--res/layout/filtershow_default_editor.xml30
-rw-r--r--res/layout/filtershow_draw_button.xml27
-rw-r--r--res/layout/filtershow_draw_size.xml36
-rw-r--r--res/layout/filtershow_editor_panel.xml117
-rw-r--r--res/layout/filtershow_export_dialog.xml80
-rw-r--r--res/layout/filtershow_grad_editor.xml29
-rw-r--r--res/layout/filtershow_history_operation_row.xml47
-rw-r--r--res/layout/filtershow_history_panel.xml64
-rw-r--r--res/layout/filtershow_main_panel.xml102
-rw-r--r--res/layout/filtershow_presets_management_dialog.xml66
-rw-r--r--res/layout/filtershow_presets_management_row.xml51
-rw-r--r--res/layout/filtershow_seekbar.xml31
-rw-r--r--res/layout/filtershow_state_panel.xml45
-rw-r--r--res/layout/filtershow_state_panel_new.xml32
-rw-r--r--res/layout/filtershow_tiny_planet_editor.xml30
-rw-r--r--res/layout/filtershow_vignette_editor.xml30
-rw-r--r--res/layout/filtershow_zoom_editor.xml30
-rw-r--r--res/layout/gl_root_group.xml26
-rw-r--r--res/layout/ingest_activity_item_list.xml59
-rw-r--r--res/layout/ingest_date_tile.xml63
-rw-r--r--res/layout/ingest_fullsize.xml43
-rw-r--r--res/layout/ingest_thumbnail.xml22
-rw-r--r--res/layout/main.xml20
-rw-r--r--res/layout/manage_offline_bar.xml61
-rw-r--r--res/layout/movie_view.xml27
-rw-r--r--res/layout/multigrid_content.xml57
-rwxr-xr-xres/layout/photo_frame.xml32
-rw-r--r--res/layout/photo_set_item.xml14
-rw-r--r--res/layout/photopage_bottom_controls.xml50
-rw-r--r--res/layout/photopage_progress_bar.xml40
-rw-r--r--res/layout/popup_list_item.xml28
-rw-r--r--res/layout/trim_menu.xml32
-rw-r--r--res/layout/trim_view.xml27
-rw-r--r--res/layout/undo_bar.xml31
-rw-r--r--res/menu/album.xml31
-rw-r--r--res/menu/albumset.xml37
-rw-r--r--res/menu/crop.xml25
-rw-r--r--res/menu/filterby.xml23
-rw-r--r--res/menu/filtershow_activity_menu.xml37
-rw-r--r--res/menu/filtershow_menu_chan_sat.xml43
-rw-r--r--res/menu/filtershow_menu_crop.xml35
-rw-r--r--res/menu/filtershow_menu_curves.xml18
-rw-r--r--res/menu/filtershow_menu_draw.xml41
-rw-r--r--res/menu/filtershow_menu_grad.xml27
-rw-r--r--res/menu/gallery.xml23
-rw-r--r--res/menu/gallery_multiselect.xml33
-rw-r--r--res/menu/groupby.xml29
-rw-r--r--res/menu/ingest_menu_item_list_selection.xml22
-rw-r--r--res/menu/movie.xml23
-rw-r--r--res/menu/operation.xml73
-rw-r--r--res/menu/photo.xml78
-rw-r--r--res/menu/pickup.xml20
-rw-r--r--res/menu/settings.xml21
-rw-r--r--res/mipmap-hdpi/ic_launcher_gallery.pngbin20425 -> 0 bytes
-rw-r--r--res/mipmap-mdpi/ic_launcher_gallery.pngbin17130 -> 0 bytes
-rw-r--r--res/mipmap-xhdpi/ic_launcher_gallery.pngbin24283 -> 0 bytes
-rw-r--r--res/values/filtershow_color.xml51
-rw-r--r--res/values/filtershow_ids.xml52
-rw-r--r--res/values/filtershow_strings.xml248
-rw-r--r--res/values/filtershow_styles.xml68
-rw-r--r--res/values/filtershow_values.xml43
-rw-r--r--res/values/filtershow_values_attrs.xml32
-rw-r--r--res/values/iconbutton_styles.xml49
-rw-r--r--res/values/strings.xml3
-rw-r--r--res/values/styles.xml4
-rw-r--r--res/xml/camera_preferences.xml2
-rw-r--r--res/xml/device_filter.xml19
-rw-r--r--res/xml/video_preferences.xml2
-rw-r--r--res/xml/wallpaper_picker_preview.xml19
-rw-r--r--res/xml/widget_info.xml8
-rw-r--r--src/com/android/camera/AndroidCameraManagerImpl.java6
-rw-r--r--src/com/android/camera/CameraActivity.java51
-rw-r--r--src/com/android/camera/CameraManager.java6
-rw-r--r--src/com/android/camera/CameraPreference.java2
-rw-r--r--src/com/android/camera/CameraScreenNail.java14
-rw-r--r--src/com/android/camera/CameraSettings.java5
-rw-r--r--src/com/android/camera/CaptureAnimManager.java8
-rw-r--r--src/com/android/camera/ComboPreferences.java4
-rw-r--r--src/com/android/camera/CountDownTimerPreference.java2
-rw-r--r--src/com/android/camera/EffectsRecorder.java18
-rw-r--r--src/com/android/camera/FocusOverlayManager.java8
-rw-r--r--src/com/android/camera/IconListPreference.java6
-rw-r--r--src/com/android/camera/ListPreference.java8
-rw-r--r--src/com/android/camera/OnScreenHint.java2
-rw-r--r--src/com/android/camera/OnScreenIndicators.java2
-rw-r--r--src/com/android/camera/PhotoMenu.java6
-rw-r--r--src/com/android/camera/PhotoModule.java31
-rw-r--r--src/com/android/camera/PhotoUI.java7
-rw-r--r--src/com/android/camera/PreviewFrameLayout.java12
-rw-r--r--src/com/android/camera/RotateDialogController.java2
-rw-r--r--src/com/android/camera/SoundClips.java2
-rw-r--r--src/com/android/camera/StaticBitmapScreenNail.java2
-rw-r--r--src/com/android/camera/Storage.java8
-rw-r--r--src/com/android/camera/SwitchAnimManager.java4
-rw-r--r--src/com/android/camera/Util.java27
-rw-r--r--src/com/android/camera/VideoMenu.java3
-rw-r--r--src/com/android/camera/VideoModule.java22
-rw-r--r--src/com/android/camera/VideoUI.java6
-rw-r--r--src/com/android/camera/app/CameraApp.java11
-rw-r--r--src/com/android/camera/data/CameraDataAdapter.java11
-rw-r--r--src/com/android/camera/data/LocalData.java20
-rw-r--r--src/com/android/camera/data/PanoramaMetadataLoader.java12
-rw-r--r--src/com/android/camera/support/app/OrientationManager.java (renamed from src/com/android/gallery3d/app/OrientationManager.java)24
-rw-r--r--src/com/android/camera/support/app/StitchingChangeListener.java11
-rw-r--r--src/com/android/camera/support/common/ApiHelper.java219
-rw-r--r--src/com/android/camera/support/common/Utils.java325
-rw-r--r--src/com/android/camera/support/filtershow/crop/CropExtras.java (renamed from src/com/android/gallery3d/filtershow/crop/CropExtras.java)21
-rw-r--r--src/com/android/camera/support/glrenderer/BasicTexture.java (renamed from src/com/android/gallery3d/glrenderer/BasicTexture.java)25
-rw-r--r--src/com/android/camera/support/glrenderer/BitmapTexture.java (renamed from src/com/android/gallery3d/glrenderer/BitmapTexture.java)18
-rw-r--r--src/com/android/camera/support/glrenderer/ExtTexture.java45
-rw-r--r--src/com/android/camera/support/glrenderer/GLCanvas.java (renamed from src/com/android/gallery3d/glrenderer/GLCanvas.java)20
-rw-r--r--src/com/android/camera/support/glrenderer/GLId.java17
-rw-r--r--src/com/android/camera/support/glrenderer/GLPaint.java26
-rw-r--r--src/com/android/camera/support/glrenderer/NinePatchChunk.java (renamed from src/com/android/gallery3d/glrenderer/NinePatchChunk.java)18
-rw-r--r--src/com/android/camera/support/glrenderer/NinePatchTexture.java (renamed from src/com/android/gallery3d/glrenderer/NinePatchTexture.java)30
-rw-r--r--src/com/android/camera/support/glrenderer/RawTexture.java (renamed from src/com/android/gallery3d/glrenderer/RawTexture.java)17
-rw-r--r--src/com/android/camera/support/glrenderer/ResourceTexture.java (renamed from src/com/android/gallery3d/glrenderer/ResourceTexture.java)18
-rw-r--r--src/com/android/camera/support/glrenderer/Texture.java27
-rw-r--r--src/com/android/camera/support/glrenderer/UploadedTexture.java (renamed from src/com/android/gallery3d/glrenderer/UploadedTexture.java)21
-rw-r--r--src/com/android/camera/support/ui/BitmapScreenNail.java (renamed from src/com/android/gallery3d/ui/BitmapScreenNail.java)22
-rw-r--r--src/com/android/camera/support/ui/OrientationSource.java6
-rw-r--r--src/com/android/camera/support/ui/ScreenNail.java21
-rw-r--r--src/com/android/camera/support/ui/SurfaceTextureScreenNail.java (renamed from src/com/android/gallery3d/ui/SurfaceTextureScreenNail.java)28
-rw-r--r--src/com/android/camera/support/util/AccessibilityUtils.java (renamed from src/com/android/gallery3d/util/AccessibilityUtils.java)20
-rw-r--r--src/com/android/camera/support/util/MotionEventHelper.java (renamed from src/com/android/gallery3d/util/MotionEventHelper.java)17
-rw-r--r--src/com/android/camera/ui/AbstractSettingPopup.java2
-rw-r--r--src/com/android/camera/ui/CameraControls.java6
-rw-r--r--src/com/android/camera/ui/CameraRootView.java4
-rw-r--r--src/com/android/camera/ui/CameraSwitcher.java10
-rw-r--r--src/com/android/camera/ui/CountDownView.java2
-rw-r--r--src/com/android/camera/ui/CountdownTimerPopup.java6
-rw-r--r--src/com/android/camera/ui/EffectSettingPopup.java9
-rw-r--r--src/com/android/camera/ui/FaceView.java2
-rw-r--r--src/com/android/camera/ui/FilmStripView.java4
-rw-r--r--src/com/android/camera/ui/InLineSettingCheckBox.java3
-rw-r--r--src/com/android/camera/ui/InLineSettingItem.java2
-rw-r--r--src/com/android/camera/ui/InLineSettingMenu.java2
-rw-r--r--src/com/android/camera/ui/ListPrefSettingPopup.java14
-rw-r--r--src/com/android/camera/ui/MoreSettingPopup.java6
-rw-r--r--src/com/android/camera/ui/PieRenderer.java8
-rw-r--r--src/com/android/camera/ui/RotateLayout.java2
-rw-r--r--src/com/android/camera/ui/RotateTextToast.java2
-rw-r--r--src/com/android/camera/ui/Switch.java8
-rw-r--r--src/com/android/camera/ui/TimeIntervalPopup.java2
-rw-r--r--src/com/android/camera/ui/ZoomRenderer.java2
-rw-r--r--src/com/android/gallery3d/anim/AlphaAnimation.java48
-rw-r--r--src/com/android/gallery3d/anim/Animation.java92
-rw-r--r--src/com/android/gallery3d/anim/CanvasAnimation.java25
-rw-r--r--src/com/android/gallery3d/anim/FloatAnimation.java40
-rw-r--r--src/com/android/gallery3d/anim/StateTransitionAnimation.java180
-rw-r--r--src/com/android/gallery3d/app/AbstractGalleryActivity.java343
-rw-r--r--src/com/android/gallery3d/app/ActivityState.java276
-rw-r--r--src/com/android/gallery3d/app/AlbumDataLoader.java397
-rw-r--r--src/com/android/gallery3d/app/AlbumPage.java786
-rw-r--r--src/com/android/gallery3d/app/AlbumPicker.java40
-rw-r--r--src/com/android/gallery3d/app/AlbumSetDataLoader.java393
-rw-r--r--src/com/android/gallery3d/app/AlbumSetPage.java764
-rw-r--r--src/com/android/gallery3d/app/AppBridge.java72
-rw-r--r--src/com/android/gallery3d/app/BatchService.java48
-rw-r--r--src/com/android/gallery3d/app/CommonControllerOverlay.java346
-rw-r--r--src/com/android/gallery3d/app/Config.java127
-rw-r--r--src/com/android/gallery3d/app/ControllerOverlay.java56
-rw-r--r--src/com/android/gallery3d/app/DialogPicker.java41
-rw-r--r--src/com/android/gallery3d/app/EyePosition.java226
-rw-r--r--src/com/android/gallery3d/app/FilmstripPage.java21
-rw-r--r--src/com/android/gallery3d/app/FilterUtils.java257
-rw-r--r--src/com/android/gallery3d/app/Gallery.java274
-rw-r--r--src/com/android/gallery3d/app/GalleryActionBar.java438
-rw-r--r--src/com/android/gallery3d/app/GalleryApp.java41
-rw-r--r--src/com/android/gallery3d/app/GalleryAppImpl.java127
-rw-r--r--src/com/android/gallery3d/app/GalleryContext.java34
-rw-r--r--src/com/android/gallery3d/app/LoadingListener.java27
-rw-r--r--src/com/android/gallery3d/app/Log.java53
-rw-r--r--src/com/android/gallery3d/app/ManageCachePage.java419
-rw-r--r--src/com/android/gallery3d/app/MovieActivity.java263
-rw-r--r--src/com/android/gallery3d/app/MovieControllerOverlay.java185
-rw-r--r--src/com/android/gallery3d/app/MoviePlayer.java525
-rw-r--r--src/com/android/gallery3d/app/MuteVideo.java104
-rw-r--r--src/com/android/gallery3d/app/NotificationIds.java22
-rw-r--r--src/com/android/gallery3d/app/PackagesMonitor.java71
-rw-r--r--src/com/android/gallery3d/app/PanoramaMetadataSupport.java93
-rw-r--r--src/com/android/gallery3d/app/PhotoDataAdapter.java1133
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java1571
-rw-r--r--src/com/android/gallery3d/app/PhotoPageBottomControls.java137
-rw-r--r--src/com/android/gallery3d/app/PhotoPageProgressBar.java50
-rw-r--r--src/com/android/gallery3d/app/PickerActivity.java83
-rw-r--r--src/com/android/gallery3d/app/SinglePhotoDataAdapter.java263
-rw-r--r--src/com/android/gallery3d/app/SinglePhotoPage.java21
-rw-r--r--src/com/android/gallery3d/app/SlideshowDataAdapter.java204
-rw-r--r--src/com/android/gallery3d/app/SlideshowPage.java366
-rw-r--r--src/com/android/gallery3d/app/StateManager.java339
-rw-r--r--src/com/android/gallery3d/app/StitchingChangeListener.java27
-rw-r--r--src/com/android/gallery3d/app/TimeBar.java266
-rw-r--r--src/com/android/gallery3d/app/TransitionStore.java46
-rw-r--r--src/com/android/gallery3d/app/TrimControllerOverlay.java111
-rw-r--r--src/com/android/gallery3d/app/TrimTimeBar.java339
-rw-r--r--src/com/android/gallery3d/app/TrimVideo.java337
-rw-r--r--src/com/android/gallery3d/app/VideoUtils.java328
-rw-r--r--src/com/android/gallery3d/app/Wallpaper.java135
-rw-r--r--src/com/android/gallery3d/data/ActionImage.java103
-rw-r--r--src/com/android/gallery3d/data/BucketHelper.java241
-rw-r--r--src/com/android/gallery3d/data/BytesBufferPool.java91
-rw-r--r--src/com/android/gallery3d/data/CameraShortcutImage.java34
-rw-r--r--src/com/android/gallery3d/data/ChangeNotifier.java57
-rw-r--r--src/com/android/gallery3d/data/ClusterAlbum.java143
-rw-r--r--src/com/android/gallery3d/data/ClusterAlbumSet.java159
-rw-r--r--src/com/android/gallery3d/data/ClusterSource.java86
-rw-r--r--src/com/android/gallery3d/data/Clustering.java29
-rw-r--r--src/com/android/gallery3d/data/ComboAlbum.java103
-rw-r--r--src/com/android/gallery3d/data/ComboAlbumSet.java96
-rw-r--r--src/com/android/gallery3d/data/ComboSource.java55
-rw-r--r--src/com/android/gallery3d/data/ContentListener.java21
-rw-r--r--src/com/android/gallery3d/data/DataManager.java371
-rw-r--r--src/com/android/gallery3d/data/DataSourceType.java45
-rw-r--r--src/com/android/gallery3d/data/DecodeUtils.java312
-rw-r--r--src/com/android/gallery3d/data/DownloadCache.java370
-rw-r--r--src/com/android/gallery3d/data/DownloadEntry.java72
-rw-r--r--src/com/android/gallery3d/data/DownloadUtils.java79
-rw-r--r--src/com/android/gallery3d/data/EmptyAlbumImage.java34
-rw-r--r--src/com/android/gallery3d/data/Exif.java48
-rw-r--r--src/com/android/gallery3d/data/Face.java65
-rw-r--r--src/com/android/gallery3d/data/FaceClustering.java142
-rw-r--r--src/com/android/gallery3d/data/FilterDeleteSet.java256
-rw-r--r--src/com/android/gallery3d/data/FilterEmptyPromptSet.java82
-rw-r--r--src/com/android/gallery3d/data/FilterSource.java94
-rw-r--r--src/com/android/gallery3d/data/FilterTypeSet.java137
-rw-r--r--src/com/android/gallery3d/data/ImageCacheRequest.java102
-rw-r--r--src/com/android/gallery3d/data/ImageCacheService.java123
-rw-r--r--src/com/android/gallery3d/data/LocalAlbum.java325
-rw-r--r--src/com/android/gallery3d/data/LocalAlbumSet.java211
-rw-r--r--src/com/android/gallery3d/data/LocalImage.java355
-rw-r--r--src/com/android/gallery3d/data/LocalMediaItem.java109
-rw-r--r--src/com/android/gallery3d/data/LocalMergeAlbum.java257
-rw-r--r--src/com/android/gallery3d/data/LocalSource.java275
-rw-r--r--src/com/android/gallery3d/data/LocalVideo.java242
-rw-r--r--src/com/android/gallery3d/data/LocationClustering.java316
-rw-r--r--src/com/android/gallery3d/data/Log.java53
-rw-r--r--src/com/android/gallery3d/data/MediaDetails.java170
-rw-r--r--src/com/android/gallery3d/data/MediaItem.java134
-rw-r--r--src/com/android/gallery3d/data/MediaObject.java166
-rw-r--r--src/com/android/gallery3d/data/MediaSet.java348
-rw-r--r--src/com/android/gallery3d/data/MediaSource.java96
-rw-r--r--src/com/android/gallery3d/data/MtpClient.java443
-rw-r--r--src/com/android/gallery3d/data/PanoramaMetadataJob.java40
-rw-r--r--src/com/android/gallery3d/data/Path.java241
-rw-r--r--src/com/android/gallery3d/data/PathMatcher.java102
-rw-r--r--src/com/android/gallery3d/data/SecureAlbum.java206
-rw-r--r--src/com/android/gallery3d/data/SecureSource.java56
-rw-r--r--src/com/android/gallery3d/data/SingleItemAlbum.java68
-rw-r--r--src/com/android/gallery3d/data/SizeClustering.java141
-rw-r--r--src/com/android/gallery3d/data/SnailAlbum.java44
-rw-r--r--src/com/android/gallery3d/data/SnailItem.java95
-rw-r--r--src/com/android/gallery3d/data/SnailSource.java70
-rw-r--r--src/com/android/gallery3d/data/TagClustering.java95
-rw-r--r--src/com/android/gallery3d/data/TimeClustering.java439
-rw-r--r--src/com/android/gallery3d/data/UnlockImage.java34
-rw-r--r--src/com/android/gallery3d/data/UriImage.java298
-rw-r--r--src/com/android/gallery3d/data/UriSource.java95
-rw-r--r--src/com/android/gallery3d/filtershow/CenteredLinearLayout.java51
-rw-r--r--src/com/android/gallery3d/filtershow/EditorPlaceHolder.java82
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java1121
-rw-r--r--src/com/android/gallery3d/filtershow/cache/ImageLoader.java502
-rw-r--r--src/com/android/gallery3d/filtershow/category/Action.java186
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryAdapter.java182
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryPanel.java108
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryTrack.java77
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryView.java176
-rw-r--r--src/com/android/gallery3d/filtershow/category/MainPanel.java239
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/ColorGridDialog.java100
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/ColorListener.java21
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/ColorOpacityView.java197
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/ColorPickerDialog.java123
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/ColorRectView.java225
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/ColorValueView.java180
-rw-r--r--src/com/android/gallery3d/filtershow/colorpicker/RGBListener.java21
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ActionSlider.java71
-rw-r--r--src/com/android/gallery3d/filtershow/controller/BasicParameterInt.java113
-rw-r--r--src/com/android/gallery3d/filtershow/controller/BasicParameterStyle.java111
-rw-r--r--src/com/android/gallery3d/filtershow/controller/BasicSlider.java87
-rw-r--r--src/com/android/gallery3d/filtershow/controller/Control.java32
-rw-r--r--src/com/android/gallery3d/filtershow/controller/FilterView.java25
-rw-r--r--src/com/android/gallery3d/filtershow/controller/Parameter.java33
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ParameterActionAndInt.java29
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ParameterInteger.java31
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ParameterSet.java23
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ParameterStyles.java37
-rw-r--r--src/com/android/gallery3d/filtershow/controller/StyleChooser.java88
-rw-r--r--src/com/android/gallery3d/filtershow/controller/TitledSlider.java106
-rw-r--r--src/com/android/gallery3d/filtershow/crop/BoundedRect.java368
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropActivity.java697
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropDrawingUtils.java168
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropMath.java260
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropObject.java330
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropView.java378
-rw-r--r--src/com/android/gallery3d/filtershow/data/FilterStackDBHelper.java101
-rw-r--r--src/com/android/gallery3d/filtershow/data/FilterStackSource.java197
-rw-r--r--src/com/android/gallery3d/filtershow/data/UserPresetsManager.java149
-rw-r--r--src/com/android/gallery3d/filtershow/editors/BasicEditor.java138
-rw-r--r--src/com/android/gallery3d/filtershow/editors/Editor.java330
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorChanSat.java227
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorCrop.java168
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorCurves.java56
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorDraw.java158
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorGrad.java315
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorInfo.java23
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorMirror.java109
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorPanel.java143
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorRedEye.java65
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorRotate.java112
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorStraighten.java103
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorTinyPlanet.java58
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorVignette.java53
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorZoom.java27
-rw-r--r--src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java50
-rw-r--r--src/com/android/gallery3d/filtershow/editors/ParametricEditor.java206
-rw-r--r--src/com/android/gallery3d/filtershow/editors/SwapButton.java111
-rw-r--r--src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java296
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ColorSpaceMatrix.java225
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java196
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterChanSatRepresentation.java211
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java113
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterCropRepresentation.java179
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterCurvesRepresentation.java170
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterDirectRepresentation.java38
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java171
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java112
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterGradRepresentation.java497
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterImageBorderRepresentation.java91
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterMirrorRepresentation.java190
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterPoint.java21
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterPointRepresentation.java88
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterRedEyeRepresentation.java67
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java262
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterRotateRepresentation.java190
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterStraightenRepresentation.java154
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterTinyPlanetRepresentation.java101
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterUserPresetRepresentation.java53
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java173
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FiltersManagerInterface.java21
-rw-r--r--src/com/android/gallery3d/filtershow/filters/IconUtilities.java75
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilter.java109
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java92
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterBwFilter.java64
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java161
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java58
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterCurves.java112
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterDownsample.java83
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java278
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterEdge.java53
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java56
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java111
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java190
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterHighlights.java74
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java64
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterKMeans.java95
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java39
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java69
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java260
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterRedEye.java79
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java58
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java58
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java107
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java158
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java57
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java98
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java59
-rw-r--r--src/com/android/gallery3d/filtershow/filters/RedEyeCandidate.java50
-rw-r--r--src/com/android/gallery3d/filtershow/filters/SimpleImageFilter.java37
-rw-r--r--src/com/android/gallery3d/filtershow/filters/SplineMath.java166
-rw-r--r--src/com/android/gallery3d/filtershow/filters/convolve3x3.rs67
-rw-r--r--src/com/android/gallery3d/filtershow/filters/grad.rs121
-rw-r--r--src/com/android/gallery3d/filtershow/filters/grey.rs22
-rw-r--r--src/com/android/gallery3d/filtershow/filters/saturation.rs161
-rw-r--r--src/com/android/gallery3d/filtershow/history/HistoryItem.java53
-rw-r--r--src/com/android/gallery3d/filtershow/history/HistoryManager.java172
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ControlPoint.java64
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java302
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java416
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/GradControl.java274
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java307
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageCurves.java445
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageDraw.java139
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageGrad.java215
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageMirror.java78
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImagePoint.java89
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageRedEye.java137
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageRotate.java81
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageShow.java578
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java260
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageTinyPlanet.java174
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageVignette.java165
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/Line.java26
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/MasterImage.java581
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/Oval.java29
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/Spline.java450
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/Buffer.java74
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java193
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/CachingPipeline.java469
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/FilterEnvironment.java178
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/HighresRenderingRequestTask.java90
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java694
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ImageSavingTask.java125
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/PipelineInterface.java31
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ProcessingService.java283
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ProcessingTask.java88
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ProcessingTaskController.java97
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/RenderingRequest.java174
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/RenderingRequestCaller.java21
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/RenderingRequestTask.java81
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/SharedBuffer.java77
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/SharedPreset.java42
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/UpdatePreviewTask.java79
-rw-r--r--src/com/android/gallery3d/filtershow/presets/PresetManagementDialog.java69
-rw-r--r--src/com/android/gallery3d/filtershow/presets/UserPresetsAdapter.java171
-rw-r--r--src/com/android/gallery3d/filtershow/provider/SharedImageProvider.java137
-rw-r--r--src/com/android/gallery3d/filtershow/state/DragListener.java110
-rw-r--r--src/com/android/gallery3d/filtershow/state/PanelTrack.java37
-rw-r--r--src/com/android/gallery3d/filtershow/state/State.java78
-rw-r--r--src/com/android/gallery3d/filtershow/state/StateAdapter.java115
-rw-r--r--src/com/android/gallery3d/filtershow/state/StatePanel.java44
-rw-r--r--src/com/android/gallery3d/filtershow/state/StatePanelTrack.java351
-rw-r--r--src/com/android/gallery3d/filtershow/state/StateView.java291
-rw-r--r--src/com/android/gallery3d/filtershow/tools/IconFactory.java108
-rw-r--r--src/com/android/gallery3d/filtershow/tools/MatrixFit.java200
-rw-r--r--src/com/android/gallery3d/filtershow/tools/SaveImage.java632
-rw-r--r--src/com/android/gallery3d/filtershow/tools/XmpPresets.java133
-rw-r--r--src/com/android/gallery3d/filtershow/ui/ExportDialog.java90
-rw-r--r--src/com/android/gallery3d/filtershow/ui/FramedTextButton.java137
-rw-r--r--src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java48
-rw-r--r--src/com/android/gallery3d/gadget/LocalPhotoSource.java205
-rw-r--r--src/com/android/gallery3d/gadget/MediaSetSource.java233
-rw-r--r--src/com/android/gallery3d/gadget/PhotoAppWidgetProvider.java139
-rw-r--r--src/com/android/gallery3d/gadget/WidgetClickHandler.java77
-rw-r--r--src/com/android/gallery3d/gadget/WidgetConfigure.java209
-rw-r--r--src/com/android/gallery3d/gadget/WidgetDatabaseHelper.java309
-rw-r--r--src/com/android/gallery3d/gadget/WidgetService.java143
-rw-r--r--src/com/android/gallery3d/gadget/WidgetSource.java31
-rw-r--r--src/com/android/gallery3d/gadget/WidgetTypeChooser.java59
-rw-r--r--src/com/android/gallery3d/gadget/WidgetUtils.java80
-rw-r--r--src/com/android/gallery3d/glrenderer/CanvasTexture.java52
-rw-r--r--src/com/android/gallery3d/glrenderer/ColorTexture.java63
-rw-r--r--src/com/android/gallery3d/glrenderer/ExtTexture.java60
-rw-r--r--src/com/android/gallery3d/glrenderer/FadeInTexture.java43
-rw-r--r--src/com/android/gallery3d/glrenderer/FadeOutTexture.java42
-rw-r--r--src/com/android/gallery3d/glrenderer/FadeTexture.java81
-rw-r--r--src/com/android/gallery3d/glrenderer/GLES11Canvas.java997
-rw-r--r--src/com/android/gallery3d/glrenderer/GLES11IdImpl.java68
-rw-r--r--src/com/android/gallery3d/glrenderer/GLES20Canvas.java1009
-rw-r--r--src/com/android/gallery3d/glrenderer/GLES20IdImpl.java42
-rw-r--r--src/com/android/gallery3d/glrenderer/GLId.java33
-rw-r--r--src/com/android/gallery3d/glrenderer/GLPaint.java41
-rw-r--r--src/com/android/gallery3d/glrenderer/MultiLineTexture.java52
-rw-r--r--src/com/android/gallery3d/glrenderer/StringTexture.java88
-rw-r--r--src/com/android/gallery3d/glrenderer/Texture.java44
-rw-r--r--src/com/android/gallery3d/glrenderer/TextureUploader.java105
-rw-r--r--src/com/android/gallery3d/glrenderer/TiledTexture.java349
-rw-r--r--src/com/android/gallery3d/ingest/ImportTask.java95
-rw-r--r--src/com/android/gallery3d/ingest/IngestActivity.java570
-rw-r--r--src/com/android/gallery3d/ingest/IngestService.java320
-rw-r--r--src/com/android/gallery3d/ingest/MtpDeviceIndex.java596
-rw-r--r--src/com/android/gallery3d/ingest/SimpleDate.java114
-rw-r--r--src/com/android/gallery3d/ingest/adapter/CheckBroker.java56
-rw-r--r--src/com/android/gallery3d/ingest/adapter/MtpAdapter.java192
-rw-r--r--src/com/android/gallery3d/ingest/adapter/MtpPagerAdapter.java102
-rw-r--r--src/com/android/gallery3d/ingest/data/BitmapWithMetadata.java29
-rw-r--r--src/com/android/gallery3d/ingest/data/MtpBitmapFetch.java106
-rw-r--r--src/com/android/gallery3d/ingest/ui/DateTileView.java107
-rw-r--r--src/com/android/gallery3d/ingest/ui/IngestGridView.java58
-rw-r--r--src/com/android/gallery3d/ingest/ui/MtpFullscreenView.java115
-rw-r--r--src/com/android/gallery3d/ingest/ui/MtpImageView.java280
-rw-r--r--src/com/android/gallery3d/ingest/ui/MtpThumbnailTileView.java106
-rw-r--r--src/com/android/gallery3d/onetimeinitializer/GalleryWidgetMigrator.java169
-rw-r--r--src/com/android/gallery3d/provider/GalleryProvider.java228
-rw-r--r--src/com/android/gallery3d/ui/AbstractSlotRenderer.java119
-rw-r--r--src/com/android/gallery3d/ui/ActionModeHandler.java501
-rw-r--r--src/com/android/gallery3d/ui/AlbumLabelMaker.java206
-rw-r--r--src/com/android/gallery3d/ui/AlbumSetSlidingWindow.java549
-rw-r--r--src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java242
-rw-r--r--src/com/android/gallery3d/ui/AlbumSlidingWindow.java365
-rw-r--r--src/com/android/gallery3d/ui/AlbumSlotRenderer.java201
-rw-r--r--src/com/android/gallery3d/ui/AnimationTime.java45
-rw-r--r--src/com/android/gallery3d/ui/BitmapLoader.java108
-rw-r--r--src/com/android/gallery3d/ui/BitmapTileProvider.java103
-rw-r--r--src/com/android/gallery3d/ui/CacheStorageUsageInfo.java90
-rw-r--r--src/com/android/gallery3d/ui/CaptureAnimation.java56
-rw-r--r--src/com/android/gallery3d/ui/DetailsAddressResolver.java118
-rw-r--r--src/com/android/gallery3d/ui/DetailsHelper.java148
-rw-r--r--src/com/android/gallery3d/ui/DialogDetailsView.java288
-rw-r--r--src/com/android/gallery3d/ui/DownUpDetector.java61
-rw-r--r--src/com/android/gallery3d/ui/EdgeEffect.java443
-rw-r--r--src/com/android/gallery3d/ui/EdgeView.java132
-rw-r--r--src/com/android/gallery3d/ui/FlingScroller.java141
-rw-r--r--src/com/android/gallery3d/ui/GLRoot.java53
-rw-r--r--src/com/android/gallery3d/ui/GLRootView.java630
-rw-r--r--src/com/android/gallery3d/ui/GLView.java465
-rw-r--r--src/com/android/gallery3d/ui/GestureRecognizer.java132
-rw-r--r--src/com/android/gallery3d/ui/Log.java54
-rw-r--r--src/com/android/gallery3d/ui/ManageCacheDrawer.java116
-rw-r--r--src/com/android/gallery3d/ui/MeasureHelper.java65
-rw-r--r--src/com/android/gallery3d/ui/MenuExecutor.java448
-rw-r--r--src/com/android/gallery3d/ui/OrientationSource.java22
-rw-r--r--src/com/android/gallery3d/ui/Paper.java183
-rw-r--r--src/com/android/gallery3d/ui/PhotoFallbackEffect.java179
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java1858
-rw-r--r--src/com/android/gallery3d/ui/PopupList.java206
-rw-r--r--src/com/android/gallery3d/ui/PositionController.java1821
-rw-r--r--src/com/android/gallery3d/ui/PreparePageFadeoutTexture.java85
-rw-r--r--src/com/android/gallery3d/ui/ProgressSpinner.java80
-rw-r--r--src/com/android/gallery3d/ui/RelativePosition.java42
-rw-r--r--src/com/android/gallery3d/ui/ScreenNail.java35
-rw-r--r--src/com/android/gallery3d/ui/ScrollBarView.java97
-rw-r--r--src/com/android/gallery3d/ui/ScrollerHelper.java97
-rw-r--r--src/com/android/gallery3d/ui/SelectionManager.java251
-rw-r--r--src/com/android/gallery3d/ui/SelectionMenu.java61
-rw-r--r--src/com/android/gallery3d/ui/SlideshowView.java163
-rw-r--r--src/com/android/gallery3d/ui/SlotView.java788
-rw-r--r--src/com/android/gallery3d/ui/SynchronizedHandler.java41
-rw-r--r--src/com/android/gallery3d/ui/TileImageView.java786
-rw-r--r--src/com/android/gallery3d/ui/TileImageViewAdapter.java200
-rw-r--r--src/com/android/gallery3d/ui/TiledScreenNail.java218
-rw-r--r--src/com/android/gallery3d/ui/UndoBarView.java211
-rw-r--r--src/com/android/gallery3d/ui/UserInteractionListener.java26
-rw-r--r--src/com/android/gallery3d/ui/WakeLockHoldingProgressListener.java66
-rw-r--r--src/com/android/gallery3d/util/BucketNames.java29
-rw-r--r--src/com/android/gallery3d/util/CacheManager.java82
-rw-r--r--src/com/android/gallery3d/util/GalleryUtils.java404
-rw-r--r--src/com/android/gallery3d/util/Holder.java29
-rw-r--r--src/com/android/gallery3d/util/IdentityCache.java78
-rw-r--r--src/com/android/gallery3d/util/IntArray.java60
-rw-r--r--src/com/android/gallery3d/util/InterruptableOutputStream.java67
-rw-r--r--src/com/android/gallery3d/util/JobLimiter.java159
-rw-r--r--src/com/android/gallery3d/util/LinkedNode.java71
-rw-r--r--src/com/android/gallery3d/util/Log.java53
-rw-r--r--src/com/android/gallery3d/util/MediaSetUtils.java66
-rw-r--r--src/com/android/gallery3d/util/Profile.java226
-rw-r--r--src/com/android/gallery3d/util/ProfileData.java168
-rw-r--r--src/com/android/gallery3d/util/RangeArray.java52
-rw-r--r--src/com/android/gallery3d/util/RangeBoolArray.java49
-rw-r--r--src/com/android/gallery3d/util/RangeIntArray.java49
-rw-r--r--src/com/android/gallery3d/util/ReverseGeocoder.java418
-rw-r--r--src/com/android/gallery3d/util/SaveVideoFileInfo.java29
-rw-r--r--src/com/android/gallery3d/util/SaveVideoFileUtils.java154
-rw-r--r--src/com/android/gallery3d/util/UpdateHelper.java59
-rw-r--r--src/com/android/photos/AlbumActivity.java48
-rw-r--r--src/com/android/photos/AlbumFragment.java168
-rw-r--r--src/com/android/photos/AlbumSetFragment.java135
-rw-r--r--src/com/android/photos/BitmapRegionTileSource.java183
-rw-r--r--src/com/android/photos/FullscreenViewer.java44
-rw-r--r--src/com/android/photos/GalleryActivity.java184
-rw-r--r--src/com/android/photos/MultiChoiceManager.java295
-rw-r--r--src/com/android/photos/MultiSelectGridFragment.java348
-rw-r--r--src/com/android/photos/PhotoFragment.java25
-rw-r--r--src/com/android/photos/PhotoSetFragment.java133
-rw-r--r--src/com/android/photos/SelectionManager.java184
-rw-r--r--src/com/android/photos/adapters/AlbumSetCursorAdapter.java75
-rw-r--r--src/com/android/photos/adapters/PhotoThumbnailAdapter.java75
-rw-r--r--src/com/android/photos/data/AlbumSetLoader.java54
-rw-r--r--src/com/android/photos/data/BitmapDecoder.java224
-rw-r--r--src/com/android/photos/data/FileRetriever.java109
-rw-r--r--src/com/android/photos/data/GalleryBitmapPool.java161
-rw-r--r--src/com/android/photos/data/MediaCache.java676
-rw-r--r--src/com/android/photos/data/MediaCacheDatabase.java286
-rw-r--r--src/com/android/photos/data/MediaCacheUtils.java167
-rw-r--r--src/com/android/photos/data/MediaRetriever.java129
-rw-r--r--src/com/android/photos/data/NotificationWatcher.java55
-rw-r--r--src/com/android/photos/data/PhotoDatabase.java195
-rw-r--r--src/com/android/photos/data/PhotoProvider.java536
-rw-r--r--src/com/android/photos/data/PhotoSetLoader.java115
-rw-r--r--src/com/android/photos/data/SQLiteContentProvider.java265
-rw-r--r--src/com/android/photos/data/SparseArrayBitmapPool.java212
-rw-r--r--src/com/android/photos/drawables/AutoThumbnailDrawable.java309
-rw-r--r--src/com/android/photos/drawables/DataUriThumbnailDrawable.java54
-rw-r--r--src/com/android/photos/shims/BitmapJobDrawable.java180
-rw-r--r--src/com/android/photos/shims/LoaderCompatShim.java31
-rw-r--r--src/com/android/photos/shims/MediaItemsLoader.java190
-rw-r--r--src/com/android/photos/shims/MediaSetLoader.java191
-rw-r--r--src/com/android/photos/views/BlockingGLTextureView.java438
-rw-r--r--src/com/android/photos/views/GalleryThumbnailView.java883
-rw-r--r--src/com/android/photos/views/HeaderGridView.java466
-rw-r--r--src/com/android/photos/views/SquareImageView.java53
-rw-r--r--src/com/android/photos/views/TiledImageRenderer.java825
-rw-r--r--src/com/android/photos/views/TiledImageView.java382
-rw-r--r--src_pd/com/android/camera/PanoramaStitchingManager.java16
-rw-r--r--src_pd/com/android/camera/app/StitchingProgressManager.java21
-rw-r--r--src_pd/com/android/camera/util/HelpUtils.java (renamed from src_pd/com/android/gallery3d/util/HelpUtils.java)2
-rw-r--r--src_pd/com/android/camera/util/PhotoSphereHelper.java (renamed from src_pd/com/android/gallery3d/util/LightCycleHelper.java)26
-rw-r--r--src_pd/com/android/camera/util/RefocusHelper.java10
-rw-r--r--src_pd/com/android/camera/util/UsageStatistics.java (renamed from src_pd/com/android/gallery3d/util/UsageStatistics.java)18
-rw-r--r--src_pd/com/android/gallery3d/app/StitchingProgressManager.java34
-rw-r--r--src_pd/com/android/gallery3d/filtershow/editors/EditorManager.java40
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java141
-rw-r--r--src_pd/com/android/gallery3d/picasasource/PicasaSource.java148
-rw-r--r--src_pd/com/android/gallery3d/settings/GallerySettings.java23
-rw-r--r--src_pd/com/android/gallery3d/util/RefocusHelper.java25
-rw-r--r--src_pd/com/android/gallery3d/util/XmpUtilHelper.java33
-rw-r--r--src_pd/com/android/photos/data/PhotoProviderAuthority.java21
-rw-r--r--tests/AndroidManifest.xml48
-rwxr-xr-xtests/exiftool_parser/parser.py90
-rw-r--r--tests/res/raw/android_lawn.mp4bin1514621 -> 0 bytes
-rwxr-xr-xtests/res/raw/galaxy_nexus.jpgbin1018845 -> 0 bytes
-rw-r--r--tests/res/raw/jpeg_control.jpgbin116135 -> 0 bytes
-rw-r--r--tests/res/xml/galaxy_nexus.xml43
-rwxr-xr-xtests/src/com/android/gallery3d/CameraTestRunner.java46
-rwxr-xr-xtests/src/com/android/gallery3d/StressTests.java47
-rw-r--r--tests/src/com/android/gallery3d/anim/AnimationTest.java80
-rw-r--r--tests/src/com/android/gallery3d/common/BlobCacheTest.java738
-rw-r--r--tests/src/com/android/gallery3d/common/UtilsTest.java202
-rw-r--r--tests/src/com/android/gallery3d/data/GalleryAppMock.java50
-rw-r--r--tests/src/com/android/gallery3d/data/GalleryAppStub.java47
-rw-r--r--tests/src/com/android/gallery3d/data/LocalDataTest.java461
-rw-r--r--tests/src/com/android/gallery3d/data/MediaSetTest.java63
-rw-r--r--tests/src/com/android/gallery3d/data/MockItem.java53
-rw-r--r--tests/src/com/android/gallery3d/data/MockSet.java88
-rw-r--r--tests/src/com/android/gallery3d/data/MockSource.java48
-rw-r--r--tests/src/com/android/gallery3d/data/PathTest.java82
-rw-r--r--tests/src/com/android/gallery3d/data/RealDataTest.java110
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifDataTest.java154
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java533
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifModifierTest.java184
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java198
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifParserTest.java243
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifReaderTest.java165
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifTagTest.java219
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifTestRunner.java135
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java108
-rw-r--r--tests/src/com/android/gallery3d/exif/ExifXmlReader.java125
-rw-r--r--tests/src/com/android/gallery3d/exif/Util.java195
-rw-r--r--tests/src/com/android/gallery3d/functional/CameraTest.java81
-rw-r--r--tests/src/com/android/gallery3d/functional/ImageCaptureIntentTest.java148
-rw-r--r--tests/src/com/android/gallery3d/functional/VideoCaptureIntentTest.java258
-rw-r--r--tests/src/com/android/gallery3d/glrenderer/GLCanvasMock.java71
-rw-r--r--tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java386
-rw-r--r--tests/src/com/android/gallery3d/glrenderer/GLMock.java197
-rw-r--r--tests/src/com/android/gallery3d/glrenderer/GLStub.java1490
-rw-r--r--tests/src/com/android/gallery3d/glrenderer/TextureTest.java208
-rw-r--r--tests/src/com/android/gallery3d/jpegstream/JpegStreamReaderTest.java84
-rw-r--r--tests/src/com/android/gallery3d/jpegstream/JpegStreamTestCase.java71
-rw-r--r--tests/src/com/android/gallery3d/jpegstream/JpegStreamTestRunner.java78
-rw-r--r--tests/src/com/android/gallery3d/jpegstream/JpegStreamWriterTest.java138
-rwxr-xr-xtests/src/com/android/gallery3d/stress/CameraLatency.java148
-rw-r--r--tests/src/com/android/gallery3d/stress/CameraStartUp.java155
-rwxr-xr-xtests/src/com/android/gallery3d/stress/CameraStressTestRunner.java61
-rwxr-xr-xtests/src/com/android/gallery3d/stress/ImageCapture.java119
-rw-r--r--tests/src/com/android/gallery3d/stress/ShotToShotLatency.java142
-rwxr-xr-xtests/src/com/android/gallery3d/stress/SwitchPreview.java116
-rw-r--r--tests/src/com/android/gallery3d/stress/TestUtil.java57
-rwxr-xr-xtests/src/com/android/gallery3d/stress/VideoCapture.java112
-rw-r--r--tests/src/com/android/gallery3d/ui/GLCanvasStub.java160
-rw-r--r--tests/src/com/android/gallery3d/ui/GLRootMock.java50
-rw-r--r--tests/src/com/android/gallery3d/ui/GLRootStub.java41
-rw-r--r--tests/src/com/android/gallery3d/ui/GLViewMock.java87
-rw-r--r--tests/src/com/android/gallery3d/ui/GLViewTest.java398
-rw-r--r--tests/src/com/android/gallery3d/ui/PointerInfo.java222
-rw-r--r--tests/src/com/android/gallery3d/unittest/CameraUnitTest.java107
-rw-r--r--tests/src/com/android/gallery3d/util/IntArrayTest.java60
-rw-r--r--tests/src/com/android/gallery3d/util/ProfileTest.java179
-rw-r--r--tests/src/com/android/photos/data/DataTestRunner.java46
-rw-r--r--tests/src/com/android/photos/data/MediaCacheTest.java388
-rw-r--r--tests/src/com/android/photos/data/PhotoDatabaseTest.java229
-rw-r--r--tests/src/com/android/photos/data/PhotoDatabaseUtils.java135
-rw-r--r--tests/src/com/android/photos/data/PhotoProviderTest.java391
-rw-r--r--tests/src/com/android/photos/data/TestHelper.java53
806 files changed, 1081 insertions, 103203 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ef1d91459..57209ee90 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,16 +1,11 @@
-<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.camera2"
+ android:versionCode="1"
+ android:versionName="2.0" >
-<manifest android:versionCode="40030"
- android:versionName="1.1.40030"
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.gallery3d">
-
- <original-package android:name="com.android.gallery3d" />
-
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
-
- <permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER"
- android:protectionLevel="signatureOrSystem" />
+ <uses-sdk
+ android:minSdkVersion="14"
+ android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@@ -30,380 +25,80 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
- <uses-permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER" />
-
- <supports-screens android:smallScreens="false"
- android:normalScreens="true" android:largeScreens="true"
- android:anyDensity="true" />
- <application android:icon="@mipmap/ic_launcher_gallery" android:label="@string/app_name"
- android:name="com.android.gallery3d.app.GalleryAppImpl"
- android:theme="@style/Theme.Gallery"
- android:logo="@mipmap/ic_launcher_gallery"
- android:hardwareAccelerated="true"
- android:largeHeap="true"
- android:backupAgent="com.android.camera.CameraBackupAgent"
- android:restoreAnyVersion="true">
- <uses-library android:name="com.google.android.media.effects" android:required="false" />
- <meta-data android:name="com.google.android.backup.api_key"
- android:value="AEdPqrEAAAAIRIXquXawbz6duuuCIUAZ_YJv1zbFMMcjZ0NoVw" />
- <activity android:name="com.android.gallery3d.app.MovieActivity"
- android:label="@string/movie_view_label"
- android:configChanges="orientation|keyboardHidden|screenSize">
+ <supports-screens
+ android:anyDensity="true"
+ android:largeScreens="true"
+ android:normalScreens="true"
+ android:smallScreens="false" />
+
+ <application
+ android:name="com.android.camera.app.CameraApp"
+ android:backupAgent="com.android.camera.CameraBackupAgent"
+ android:hardwareAccelerated="true"
+ android:icon="@mipmap/ic_launcher_camera"
+ android:label="@string/app_name"
+ android:largeHeap="true"
+ android:logo="@mipmap/ic_launcher_camera"
+ android:restoreAnyVersion="true"
+ android:theme="@style/Theme.Camera" >
+ <activity
+ android:name="com.android.camera.CameraActivity"
+ android:clearTaskOnLaunch="true"
+ android:configChanges="orientation|screenSize|keyboardHidden"
+ android:icon="@mipmap/ic_launcher_camera"
+ android:label="@string/camera_2"
+ android:taskAffinity="com.android.camera.CameraActivity"
+ android:theme="@style/Theme.Camera"
+ android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
<intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:scheme="rtsp" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:scheme="http" />
- <data android:scheme="https" />
- <data android:scheme="content" />
- <data android:scheme="file" />
- <data android:mimeType="video/mpeg4" />
- <data android:mimeType="video/mp4" />
- <data android:mimeType="video/3gp" />
- <data android:mimeType="video/3gpp" />
- <data android:mimeType="video/3gpp2" />
- <data android:mimeType="video/webm" />
- <data android:mimeType="video/avi" />
- <data android:mimeType="application/sdp" />
- </intent-filter>
- <intent-filter>
- <!-- HTTP live support -->
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:scheme="http" />
- <data android:scheme="https" />
- <data android:mimeType="audio/x-mpegurl" />
- <data android:mimeType="audio/mpegurl" />
- <data android:mimeType="application/vnd.apple.mpegurl" />
- <data android:mimeType="application/x-mpegurl" />
- </intent-filter>
- </activity>
+ <action android:name="android.media.action.IMAGE_CAPTURE" />
- <activity android:name="com.android.gallery3d.app.Gallery" android:label="@string/app_name"
- android:configChanges="keyboardHidden|orientation|screenSize">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.LAUNCHER" />
- <category android:name="android.intent.category.APP_GALLERY" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.GET_CONTENT" />
- <category android:name="android.intent.category.OPENABLE" />
- <data android:mimeType="vnd.android.cursor.dir/image" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.GET_CONTENT" />
- <category android:name="android.intent.category.OPENABLE" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:mimeType="image/*" />
- <data android:mimeType="video/*" />
- </intent-filter>
- <!-- We do NOT support the PICK intent, we add these intent-filter for
- backward compatibility. Handle it as GET_CONTENT. -->
- <intent-filter>
- <action android:name="android.intent.action.PICK" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:mimeType="image/*" />
- <data android:mimeType="video/*" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.PICK" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:mimeType="vnd.android.cursor.dir/image" />
- <data android:mimeType="vnd.android.cursor.dir/video" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
- <data android:mimeType="vnd.android.cursor.dir/image" />
- <data android:mimeType="vnd.android.cursor.dir/video" />
</intent-filter>
<intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <action android:name="com.android.camera.action.REVIEW" />
+ <action android:name="android.media.action.STILL_IMAGE_CAMERA" />
+
<category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:scheme="" />
- <data android:scheme="http" />
- <data android:scheme="https" />
- <data android:scheme="content" />
- <data android:scheme="file" />
- <data android:mimeType="image/bmp" />
- <data android:mimeType="image/jpeg" />
- <data android:mimeType="image/gif" />
- <data android:mimeType="image/png" />
- <data android:mimeType="image/webp" />
- <data android:mimeType="image/x-ms-bmp" />
- <data android:mimeType="image/vnd.wap.wbmp" />
- <data android:mimeType="application/vnd.google.panorama360+jpg" />
</intent-filter>
<intent-filter>
- <action android:name="com.android.camera.action.REVIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:scheme="http" />
- <data android:scheme="https" />
- <data android:scheme="content" />
- <data android:scheme="file" />
- <data android:mimeType="video/mpeg4" />
- <data android:mimeType="video/mp4" />
- <data android:mimeType="video/3gp" />
- <data android:mimeType="video/3gpp" />
- <data android:mimeType="video/3gpp2" />
- <data android:mimeType="application/sdp" />
- </intent-filter>
- </activity>
-
- <!-- we add this activity-alias for shortcut backward compatibility -->
- <!-- Note: The alias must put after the target activity -->
- <activity-alias android:name="com.cooliris.media.Gallery"
- android:targetActivity="com.android.gallery3d.app.Gallery"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:label="@string/app_name">
- <intent-filter>
<action android:name="android.intent.action.MAIN" />
- </intent-filter>
- </activity-alias>
-
- <!-- This activity receives USB_DEVICE_ATTACHED intents and allows importing
- media from attached MTP devices, like cameras and camera phones -->
- <activity android:launchMode="singleInstance"
- android:taskAffinity="" android:name="com.android.gallery3d.ingest.IngestActivity"
- android:configChanges="orientation|screenSize"
- android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
- </intent-filter>
- <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
- android:resource="@xml/device_filter" />
- </activity>
- <service android:name="com.android.gallery3d.ingest.IngestService" />
- <activity android:name="com.android.gallery3d.app.Wallpaper"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:theme="@style/android:Theme.Translucent.NoTitleBar">
- <intent-filter android:label="@string/camera_setas_wallpaper">
- <action android:name="android.intent.action.ATTACH_DATA" />
- <data android:mimeType="image/*" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <intent-filter android:label="@string/app_name">
- <action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
- <meta-data android:name="android.wallpaper.preview"
- android:resource="@xml/wallpaper_picker_preview" />
- </activity>
- <activity android:name="com.android.gallery3d.app.TrimVideo"
- android:label="@string/trim_label">
- </activity>
-
- <permission android:name="com.android.gallery3d.filtershow.permission.READ"
- android:protectionLevel="signature" />
-
- <permission android:name="com.android.gallery3d.filtershow.permission.WRITE"
- android:protectionLevel="signature" />
- <provider
- android:name="com.android.gallery3d.filtershow.provider.SharedImageProvider"
- android:authorities="com.android.gallery3d.filtershow.provider.SharedImageProvider"
- android:grantUriPermissions="true"
- android:readPermission="com.android.gallery3d.filtershow.permission.READ"
- android:writePermission="com.android.gallery3d.filtershow.permission.WRITE" />
-
- <service
- android:name=".filtershow.pipeline.ProcessingService"
- android:exported="false" />
-
- <activity
- android:name="com.android.gallery3d.filtershow.FilterShowActivity"
- android:label="@string/title_activity_filter_show"
- android:theme="@style/Theme.FilterShow"
- android:configChanges="keyboardHidden|orientation|screenSize">
- <intent-filter>
- <action android:name="android.intent.action.EDIT" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:mimeType="image/*" />
- </intent-filter>
- <intent-filter>
- <action android:name="action_nextgen_edit" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:mimeType="image/*" />
- </intent-filter>
+ <meta-data
+ android:name="com.android.keyguard.layout"
+ android:resource="@layout/keyguard_widget" />
</activity>
-
<activity
- android:name="com.android.gallery3d.filtershow.crop.CropActivity"
- android:label="@string/crop"
- android:theme="@style/Theme.FilterShow"
- android:configChanges="keyboardHidden|orientation|screenSize">
- <intent-filter android:label="@string/crop_label">
- <action android:name="com.android.camera.action.CROP" />
- <data android:scheme="http" />
- <data android:scheme="https" />
- <data android:scheme="content" />
- <data android:scheme="file" />
- <data android:scheme="" />
- <data android:mimeType="image/*" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.ALTERNATIVE" />
- <category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
- </intent-filter>
- </activity>
-
- <uses-library android:name="com.google.android.media.effects"
- android:required="false" />
-
- <activity android:name="com.android.gallery3d.settings.GallerySettings"
- android:theme="@style/Theme.Gallery"
- android:configChanges="orientation|keyboardHidden|screenSize" />
-
- <provider android:name="com.android.gallery3d.provider.GalleryProvider"
- android:syncable="false"
- android:grantUriPermissions="true"
- android:exported="true"
- android:permission="com.android.gallery3d.permission.GALLERY_PROVIDER"
- android:authorities="com.android.gallery3d.provider" />
- <provider
- android:name="com.android.photos.data.PhotoProvider"
- android:authorities="com.android.gallery3d.photoprovider"
- android:syncable="false"
- android:exported="false"/>
- <activity android:name="com.android.gallery3d.gadget.WidgetClickHandler" />
- <activity android:name="com.android.gallery3d.app.DialogPicker"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:theme="@style/DialogPickerTheme"/>
- <activity android:name="com.android.gallery3d.app.AlbumPicker"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:theme="@style/DialogPickerTheme"/>
- <activity android:name="com.android.gallery3d.gadget.WidgetTypeChooser"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:theme="@style/Theme.Gallery.Dialog"/>
- <activity android:name="com.android.camera.CameraActivity"
- android:taskAffinity="com.android.camera.CameraActivity"
- android:label="@string/camera_label"
- android:theme="@style/Theme.Camera"
- android:icon="@mipmap/ic_launcher_camera"
- android:configChanges="orientation|screenSize|keyboardHidden"
- android:clearTaskOnLaunch="true"
- android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
- <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>
- <meta-data android:name="com.android.keyguard.layout"
- android:resource="@layout/keyguard_widget" />
- </activity>
-
- <activity android:name="com.android.camera.SecureCameraActivity"
- android:taskAffinity="com.android.camera.SecureCameraActivity"
- android:excludeFromRecents="true"
- android:label="@string/camera_label"
- android:theme="@style/Theme.Camera"
- android:icon="@mipmap/ic_launcher_camera"
- android:configChanges="orientation|screenSize|keyboardHidden"
- android:clearTaskOnLaunch="true"
- android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
+ android:name="com.android.camera.SecureCameraActivity"
+ android:clearTaskOnLaunch="true"
+ android:configChanges="orientation|screenSize|keyboardHidden"
+ android:excludeFromRecents="true"
+ android:icon="@mipmap/ic_launcher_camera"
+ android:label="@string/camera_2"
+ android:taskAffinity="com.android.camera.SecureCameraActivity"
+ android:theme="@style/Theme.Camera"
+ android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
<intent-filter>
<action android:name="android.media.action.STILL_IMAGE_CAMERA_SECURE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.media.action.IMAGE_CAPTURE_SECURE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <meta-data android:name="com.android.keyguard.layout"
- android:resource="@layout/keyguard_widget" />
- </activity>
- <activity-alias android:icon="@mipmap/ic_launcher_camera"
- android:label="@string/camera_label"
- android:name="com.android.camera.CameraLauncher"
- android:targetActivity="com.android.camera.CameraActivity" >
- <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>
- </activity-alias>
-
- <activity-alias android:icon="@mipmap/ic_launcher_camera"
- android:label="@string/camera_label"
- android:name="com.android.camera.Camera"
- android:targetActivity="com.android.camera.CameraActivity" >
<intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity-alias>
+ <action android:name="android.media.action.IMAGE_CAPTURE_SECURE" />
- <activity-alias android:icon="@mipmap/ic_launcher_video_camera"
- android:label="@string/video_camera_label"
- android:name="com.android.camera.VideoCamera"
- android:targetActivity="com.android.camera.CameraActivity" >
- <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-alias>
- <receiver android:name="com.android.gallery3d.gadget.PhotoAppWidgetProvider"
- android:label="@string/appwidget_title">
- <intent-filter>
- <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
- </intent-filter>
- <meta-data android:name="android.appwidget.provider"
- android:resource="@xml/widget_info" />
- </receiver>
- <receiver android:name="com.android.gallery3d.app.PackagesMonitor">
- <intent-filter>
- <action android:name="android.intent.action.PACKAGE_ADDED"/>
- <action android:name="android.intent.action.PACKAGE_REMOVED"/>
- <action android:name="android.intent.action.PACKAGE_CHANGED"/>
- <data android:scheme="package"/>
- </intent-filter>
- </receiver>
- <service android:name="com.android.gallery3d.app.PackagesMonitor$AsyncService"/>
- <receiver android:name="com.android.camera.CameraButtonIntentReceiver">
- <intent-filter>
- <action android:name="android.intent.action.CAMERA_BUTTON"/>
- </intent-filter>
- </receiver>
- <receiver android:name="com.android.camera.DisableCameraReceiver">
- <intent-filter>
- <action android:name="android.intent.action.BOOT_COMPLETED" />
- </intent-filter>
- </receiver>
- <service android:name="com.android.gallery3d.gadget.WidgetService"
- android:permission="android.permission.BIND_REMOTEVIEWS"/>
- <activity android:name="com.android.gallery3d.gadget.WidgetConfigure"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:theme="@style/android:Theme.Translucent.NoTitleBar">
- <intent-filter>
- <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
- </intent-filter>
+ <meta-data
+ android:name="com.android.keyguard.layout"
+ android:resource="@layout/keyguard_widget" />
</activity>
- <activity android:name="com.android.camera.ProxyLauncher"
- android:theme="@style/Theme.ProxyLauncher">
- </activity>
- <service android:name="com.android.gallery3d.app.BatchService" />
+
<service android:name="com.android.camera.MediaSaveService" />
</application>
-</manifest>
+
+</manifest> \ No newline at end of file
diff --git a/jni/filters/bwfilter.c b/jni/filters/bwfilter.c
deleted file mode 100644
index f7fb31ad1..000000000
--- a/jni/filters/bwfilter.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterBwFilter, nativeApplyFilter, jobject bitmap, jint width, jint height, jint rw, jint gw, jint bw)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- float sr = rw;
- float sg = gw;
- float sb = bw;
-
- float min = MIN(sg,sb);
- min = MIN(sr,min);
- float max = MAX(sg,sb);
- max = MAX(sr,max);
- float avg = (min+max)/2;
- sb /= avg;
- sg /= avg;
- sr /= avg;
- int i;
- int len = width * height * 4;
-
- for (i = 0; i < len; i+=4)
- {
- float r = sr *rgb[RED];
- float g = sg *rgb[GREEN];
- float b = sb *rgb[BLUE];
- min = MIN(g,b);
- min = MIN(r,min);
- max = MAX(g,b);
- max = MAX(r,max);
- avg =(min+max)/2;
- rgb[RED] = CLAMP(avg);
- rgb[GREEN] = rgb[RED];
- rgb[BLUE] = rgb[RED];
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/contrast.c b/jni/filters/contrast.c
deleted file mode 100644
index b04e9364e..000000000
--- a/jni/filters/contrast.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-unsigned char clamp(int c)
-{
- int N = 255;
- c &= ~(c >> 31);
- c -= N;
- c &= (c >> 31);
- c += N;
- return (unsigned char) c;
-}
-
-int clampMax(int c,int max)
-{
- c &= ~(c >> 31);
- c -= max;
- c &= (c >> 31);
- c += max;
- return c;
-}
-
-void JNIFUNCF(ImageFilterContrast, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat bright)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- int i;
- int len = width * height * 4;
- float m = (float)pow(2, bright/100.);
- float c = 127-m*127;
-
- for (i = 0; i < len; i+=4) {
- rgb[RED] = clamp((int)(m*rgb[RED]+c));
- rgb[GREEN] = clamp((int)(m*rgb[GREEN]+c));
- rgb[BLUE] = clamp((int)(m*rgb[BLUE]+c));
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
-
diff --git a/jni/filters/edge.c b/jni/filters/edge.c
deleted file mode 100644
index 9f5d88f77..000000000
--- a/jni/filters/edge.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterEdge, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat p)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
-
- // using contrast function:
- // f(v) = exp(-alpha * v^beta)
- // use beta ~ 1
-
- float const alpha = 5.0f;
- float const beta = p;
- float const c_min = 100.0f;
- float const c_max = 500.0f;
-
- // pixels must be 4 bytes
- char * dst = destination;
-
- int j, k;
- char * ptr = destination;
- int row_stride = 4 * width;
-
- // set 2 row buffer (avoids bitmap copy)
- int buf_len = 2 * row_stride;
- char buf[buf_len];
- int buf_row_ring = 0;
-
- // set initial buffer to black
- memset(buf, 0, buf_len * sizeof(char));
- for (j = 3; j < buf_len; j+=4) {
- *(buf + j) = 255; // set initial alphas
- }
-
- // apply sobel filter
- for (j = 1; j < height - 1; j++) {
-
- for (k = 1; k < width - 1; k++){
- int loc = j * row_stride + k * 4;
-
- float bestx = 0.0f;
- int l;
- for (l = 0; l < 3; l++) {
- float tmp = 0.0f;
- tmp += *(ptr + (loc - row_stride + 4 + l));
- tmp += *(ptr + (loc + 4 + l)) * 2.0f;
- tmp += *(ptr + (loc + row_stride + 4 + l));
- tmp -= *(ptr + (loc - row_stride - 4 + l));
- tmp -= *(ptr + (loc - 4 + l)) * 2.0f;
- tmp -= *(ptr + (loc + row_stride - 4 + l));
- if (fabs(tmp) > fabs(bestx)) {
- bestx = tmp;
- }
- }
-
- float besty = 0.0f;
- for (l = 0; l < 3; l++) {
- float tmp = 0.0f;
- tmp -= *(ptr + (loc - row_stride - 4 + l));
- tmp -= *(ptr + (loc - row_stride + l)) * 2.0f;
- tmp -= *(ptr + (loc - row_stride + 4 + l));
- tmp += *(ptr + (loc + row_stride - 4 + l));
- tmp += *(ptr + (loc + row_stride + l)) * 2.0f;
- tmp += *(ptr + (loc + row_stride + 4 + l));
- if (fabs(tmp) > fabs(besty)) {
- besty = tmp;
- }
- }
-
- // compute gradient magnitude
- float mag = sqrt(bestx * bestx + besty * besty);
-
- // clamp
- mag = MIN(MAX(c_min, mag), c_max);
-
- // scale to [0, 1]
- mag = (mag - c_min) / (c_max - c_min);
-
- float ret = 1.0f - exp (- alpha * pow(mag, beta));
- ret = 255 * ret;
-
- int off = k * 4;
- *(buf + buf_row_ring + off) = ret;
- *(buf + buf_row_ring + off + 1) = ret;
- *(buf + buf_row_ring + off + 2) = ret;
- *(buf + buf_row_ring + off + 3) = *(ptr + loc + 3);
- }
-
- buf_row_ring += row_stride;
- buf_row_ring %= buf_len;
-
- if (j - 1 >= 0) {
- memcpy((dst + row_stride * (j - 1)), (buf + buf_row_ring), row_stride * sizeof(char));
- }
-
- }
- buf_row_ring += row_stride;
- buf_row_ring %= buf_len;
- int second_last_row = row_stride * (height - 2);
- memcpy((dst + second_last_row), (buf + buf_row_ring), row_stride * sizeof(char));
-
- // set last row to black
- int last_row = row_stride * (height - 1);
- memset((dst + last_row), 0, row_stride * sizeof(char));
- for (j = 3; j < row_stride; j+=4) {
- *(dst + last_row + j) = 255; // set alphas
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/exposure.c b/jni/filters/exposure.c
deleted file mode 100644
index 6b32798c8..000000000
--- a/jni/filters/exposure.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterExposure, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat bright)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- int i;
- int len = width * height * 4;
-
- int m = (255-bright);
-
- for (i = 0; i < len; i+=4)
- {
- rgb[RED] = clamp((255*(rgb[RED]))/m);
- rgb[GREEN] = clamp((255*(rgb[GREEN]))/m);
- rgb[BLUE] = clamp((255*(rgb[BLUE]))/m);
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
-
diff --git a/jni/filters/filters.h b/jni/filters/filters.h
deleted file mode 100644
index 14b69cdd4..000000000
--- a/jni/filters/filters.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef FILTERS_H
-#define FILTERS_H
-
-#include <jni.h>
-#include <string.h>
-#include <android/log.h>
-#include <android/bitmap.h>
-
-typedef unsigned int Color;
-
-#define SetColor(a, r, g, b) ((a << 24) | (b << 16) | (g << 8) | (r << 0));
-#define GetA(color) (((color) >> 24) & 0xFF)
-#define GetB(color) (((color) >> 16) & 0xFF)
-#define GetG(color) (((color) >> 8) & 0xFF)
-#define GetR(color) (((color) >> 0) & 0xFF)
-
-#define MIN(a, b) (a < b ? a : b)
-#define MAX(a, b) (a > b ? a : b)
-
-#define LOG(msg...) __android_log_print(ANDROID_LOG_VERBOSE, "NativeFilters", msg)
-
-#define JNIFUNCF(cls, name, vars...) Java_com_android_gallery3d_filtershow_filters_ ## cls ## _ ## name(JNIEnv* env, jobject obj, vars)
-
-#define RED i
-#define GREEN i+1
-#define BLUE i+2
-#define ALPHA i+3
-#define CLAMP(c) (MAX(0, MIN(255, c)))
-
-__inline__ unsigned char clamp(int c);
-__inline__ int clampMax(int c,int max);
-
-extern void rgb2hsv( unsigned char *rgb,int rgbOff,unsigned short *hsv,int hsvOff);
-extern void hsv2rgb(unsigned short *hsv,int hsvOff,unsigned char *rgb,int rgbOff);
-extern void filterRedEye(unsigned char *src, unsigned char *dest, int iw, int ih, short *rect);
-extern double fastevalPoly(double *poly,int n, double x);
-#endif // FILTERS_H
diff --git a/jni/filters/fx.c b/jni/filters/fx.c
deleted file mode 100644
index c3c9cbdc6..000000000
--- a/jni/filters/fx.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-__inline__ int interp(unsigned char *src, int p , int *off ,float dr,float dg, float db){
-
- float fr00 = (src[p+off[0]])*(1-dr)+(src[p+off[1]])*dr;
- float fr01 = (src[p+off[2]])*(1-dr)+(src[p+off[3]])*dr;
- float fr10 = (src[p+off[4]])*(1-dr)+(src[p+off[5]])*dr;
- float fr11 = (src[p+off[6]])*(1-dr)+(src[p+off[7]])*dr;
- float frb0 = fr00 * (1-db)+fr01*db;
- float frb1 = fr10 * (1-db)+fr11*db;
- float frbg = frb0 * (1-dg)+frb1*dg;
-
- return (int)frbg ;
-}
-
-void JNIFUNCF(ImageFilterFx, nativeApplyFilter, jobject bitmap, jint width, jint height,
- jobject lutbitmap, jint lutwidth, jint lutheight,
- jint start, jint end)
-{
- char* destination = 0;
- char* lut = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- AndroidBitmap_lockPixels(env, lutbitmap, (void**) &lut);
- unsigned char * rgb = (unsigned char * )destination;
- unsigned char * lutrgb = (unsigned char * )lut;
- int lutdim_r = lutheight;
- int lutdim_g = lutheight;;
- int lutdim_b = lutwidth/lutheight;;
- int STEP = 4;
-
- int off[8] = {
- 0,
- STEP*1,
- STEP*lutdim_r,
- STEP*(lutdim_r + 1),
- STEP*(lutdim_r*lutdim_b),
- STEP*(lutdim_r*lutdim_b+1),
- STEP*(lutdim_r*lutdim_b+lutdim_r),
- STEP*(lutdim_r*lutdim_b+lutdim_r + 1)
- };
-
- float scale_R = (lutdim_r-1.f)/256.f;
- float scale_G = (lutdim_g-1.f)/256.f;
- float scale_B = (lutdim_b-1.f)/256.f;
-
- int i;
- for (i = start; i < end; i+= STEP)
- {
- int r = rgb[RED];
- int g = rgb[GREEN];
- int b = rgb[BLUE];
-
- float fb = b*scale_B;
- float fg = g*scale_G;
- float fr = r*scale_R;
- int lut_b = (int)fb;
- int lut_g = (int)fg;
- int lut_r = (int)fr;
- int p = lut_r+lut_b*lutdim_r+lut_g*lutdim_r*lutdim_b;
- p*=STEP;
- float dr = fr-lut_r;
- float dg = fg-lut_g;
- float db = fb-lut_b;
- rgb[RED] = clamp(interp(lutrgb,p ,off,dr,dg,db));
- rgb[GREEN] = clamp(interp(lutrgb,p+1,off,dr,dg,db));
- rgb[BLUE] = clamp(interp(lutrgb,p+2,off,dr,dg,db));
-
- }
-
- AndroidBitmap_unlockPixels(env, bitmap);
- AndroidBitmap_unlockPixels(env, lutbitmap);
-}
diff --git a/jni/filters/geometry.c b/jni/filters/geometry.c
deleted file mode 100644
index a0b5aaacf..000000000
--- a/jni/filters/geometry.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-#include <stdio.h>
-
-__inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- //Vertical
- size_t cpy_bytes = sizeof(char) * 4;
- int width = cpy_bytes * srcWidth;
- int length = srcHeight;
- int total = length * width;
- size_t bytes_to_copy = sizeof(char) * width;
- int i = 0;
- int temp = total - width;
- for (i = 0; i < total; i += width) {
- memcpy(destination + temp - i, source + i, bytes_to_copy);
- }
-}
-
-__inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- //Horizontal
- size_t cpy_bytes = sizeof(char) * 4;
- int width = cpy_bytes * srcWidth;
- int length = srcHeight;
- int total = length * width;
- int i = 0;
- int j = 0;
- int temp = 0;
- for (i = 0; i < total; i+= width) {
- temp = width + i - cpy_bytes;
- for (j = 0; j < width; j+=cpy_bytes) {
- memcpy(destination + temp - j, source + i + j, cpy_bytes);
- }
- }
-}
-
-__inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- int horiz = (flip & 1) != 0;
- int vert = (flip & 2) != 0;
- if (horiz && vert){
- int arr_len = dstWidth * dstHeight * sizeof(char) * 4;
- char* temp = (char *) malloc(arr_len);
- flipHorizontal(source, srcWidth, srcHeight, temp, dstWidth, dstHeight);
- flipVertical(temp, dstWidth, dstHeight, destination, dstWidth, dstHeight);
- free(temp);
- return;
- }
- if (horiz){
- flipHorizontal(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- return;
- }
- if (vert){
- flipVertical(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- return;
- }
-}
-
-//90 CCW (opposite of what's used in UI?)
-__inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- size_t cpy_bytes = sizeof(char) * 4;
- int width = cpy_bytes * srcWidth;
- int length = srcHeight;
- int total = length * width;
- int i = 0;
- int j = 0;
- for (j = 0; j < length * cpy_bytes; j+= cpy_bytes){
- for (i = 0; i < width; i+=cpy_bytes){
- int column_disp = (width - cpy_bytes - i) * length;
- int row_disp = j;
- memcpy(destination + column_disp + row_disp , source + j * srcWidth + i, cpy_bytes);
- }
- }
-}
-
-__inline__ void rotate180(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- flip_fun(3, source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
-}
-
-__inline__ void rotate270(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- rotate90(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- flip_fun(3, destination, dstWidth, dstHeight, destination, dstWidth, dstHeight);
-}
-
-// rotate == 1 is 90 degrees, 2 is 180, 3 is 270 (positive is CCW).
-__inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
- switch( rotate )
- {
- case 1:
- rotate90(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- break;
- case 2:
- rotate180(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- break;
- case 3:
- rotate270(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- break;
- default:
- break;
- }
-}
-
-__inline__ void crop(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight, int offsetWidth, int offsetHeight){
- size_t cpy_bytes = sizeof(char) * 4;
- int row_width = cpy_bytes * srcWidth;
- int new_row_width = cpy_bytes * dstWidth;
- if ((srcWidth > dstWidth + offsetWidth) || (srcHeight > dstHeight + offsetHeight)){
- return;
- }
- int i = 0;
- int j = 0;
- for (j = offsetHeight; j < offsetHeight + dstHeight; j++){
- memcpy(destination + (j - offsetHeight) * new_row_width, source + j * row_width + offsetWidth * cpy_bytes, cpy_bytes * dstWidth );
- }
-}
-
-void JNIFUNCF(ImageFilterGeometry, nativeApplyFilterFlip, jobject src, jint srcWidth, jint srcHeight, jobject dst, jint dstWidth, jint dstHeight, jint flip) {
- char* destination = 0;
- char* source = 0;
- if (srcWidth != dstWidth || srcHeight != dstHeight) {
- return;
- }
- AndroidBitmap_lockPixels(env, src, (void**) &source);
- AndroidBitmap_lockPixels(env, dst, (void**) &destination);
- flip_fun(flip, source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- AndroidBitmap_unlockPixels(env, dst);
- AndroidBitmap_unlockPixels(env, src);
-}
-
-void JNIFUNCF(ImageFilterGeometry, nativeApplyFilterRotate, jobject src, jint srcWidth, jint srcHeight, jobject dst, jint dstWidth, jint dstHeight, jint rotate) {
- char* destination = 0;
- char* source = 0;
- int len = dstWidth * dstHeight * 4;
- AndroidBitmap_lockPixels(env, src, (void**) &source);
- AndroidBitmap_lockPixels(env, dst, (void**) &destination);
- rotate_fun(rotate, source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
- AndroidBitmap_unlockPixels(env, dst);
- AndroidBitmap_unlockPixels(env, src);
-}
-
-void JNIFUNCF(ImageFilterGeometry, nativeApplyFilterCrop, jobject src, jint srcWidth, jint srcHeight, jobject dst, jint dstWidth, jint dstHeight, jint offsetWidth, jint offsetHeight) {
- char* destination = 0;
- char* source = 0;
- int len = dstWidth * dstHeight * 4;
- AndroidBitmap_lockPixels(env, src, (void**) &source);
- AndroidBitmap_lockPixels(env, dst, (void**) &destination);
- crop(source, srcWidth, srcHeight, destination, dstWidth, dstHeight, offsetWidth, offsetHeight);
- AndroidBitmap_unlockPixels(env, dst);
- AndroidBitmap_unlockPixels(env, src);
-}
-
-void JNIFUNCF(ImageFilterGeometry, nativeApplyFilterStraighten, jobject src, jint srcWidth, jint srcHeight, jobject dst, jint dstWidth, jint dstHeight, jfloat straightenAngle) {
- char* destination = 0;
- char* source = 0;
- int len = dstWidth * dstHeight * 4;
- AndroidBitmap_lockPixels(env, src, (void**) &source);
- AndroidBitmap_lockPixels(env, dst, (void**) &destination);
- // TODO: implement straighten
- int i = 0;
- for (; i < len; i += 4) {
- int r = source[RED];
- int g = source[GREEN];
- int b = source[BLUE];
- destination[RED] = 128;
- destination[GREEN] = g;
- destination[BLUE] = 128;
- }
- AndroidBitmap_unlockPixels(env, dst);
- AndroidBitmap_unlockPixels(env, src);
-}
-
diff --git a/jni/filters/gradient.c b/jni/filters/gradient.c
deleted file mode 100644
index 1a8569786..000000000
--- a/jni/filters/gradient.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-void JNIFUNCF(ImageFilter, nativeApplyGradientFilter, jobject bitmap, jint width, jint height,
- jintArray redGradient, jintArray greenGradient, jintArray blueGradient)
-{
- char* destination = 0;
- jint* redGradientArray = 0;
- jint* greenGradientArray = 0;
- jint* blueGradientArray = 0;
- if (redGradient)
- redGradientArray = (*env)->GetIntArrayElements(env, redGradient, NULL);
- if (greenGradient)
- greenGradientArray = (*env)->GetIntArrayElements(env, greenGradient, NULL);
- if (blueGradient)
- blueGradientArray = (*env)->GetIntArrayElements(env, blueGradient, NULL);
-
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- int i;
- int len = width * height * 4;
- for (i = 0; i < len; i+=4)
- {
- if (redGradient)
- {
- int r = destination[RED];
- r = redGradientArray[r];
- destination[RED] = r;
- }
- if (greenGradient)
- {
- int g = destination[GREEN];
- g = greenGradientArray[g];
- destination[GREEN] = g;
- }
- if (blueGradient)
- {
- int b = destination[BLUE];
- b = blueGradientArray[b];
- destination[BLUE] = b;
- }
- }
- if (redGradient)
- (*env)->ReleaseIntArrayElements(env, redGradient, redGradientArray, 0);
- if (greenGradient)
- (*env)->ReleaseIntArrayElements(env, greenGradient, greenGradientArray, 0);
- if (blueGradient)
- (*env)->ReleaseIntArrayElements(env, blueGradient, blueGradientArray, 0);
- AndroidBitmap_unlockPixels(env, bitmap);
-}
-
diff --git a/jni/filters/highlight.c b/jni/filters/highlight.c
deleted file mode 100644
index fe9b88f94..000000000
--- a/jni/filters/highlight.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterHighlights, nativeApplyFilter, jobject bitmap,
- jint width, jint height, jfloatArray luminanceMap){
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- int i;
- int len = width * height * 4;
- jfloat* lum = (*env)->GetFloatArrayElements(env, luminanceMap,0);
- unsigned short * hsv = (unsigned short *)malloc(3*sizeof(short));
-
- for (i = 0; i < len; i+=4)
- {
- rgb2hsv(rgb,i,hsv,0);
- int v = clampMax(hsv[0],4080);
- hsv[0] = (unsigned short) clampMax(lum[((255*v)/4080)]*4080,4080);
- hsv2rgb(hsv,0, rgb,i);
- }
-
- free(hsv);
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/hsv.c b/jni/filters/hsv.c
deleted file mode 100644
index aabd053fe..000000000
--- a/jni/filters/hsv.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-double fastevalPoly(double *poly,int n, double x){
-
- double f =x;
- double sum = poly[0]+poly[1]*f;
- int i;
- for (i = 2; i < n; i++) {
- f*=x;
- sum += poly[i]*f;
- }
- return sum;
-}
-
-void rgb2hsv( unsigned char *rgb,int rgbOff,unsigned short *hsv,int hsvOff)
-{
- int iMin,iMax,chroma;
- int ABITS = 4;
- int HSCALE = 256;
-
- int k1=255 << ABITS;
- int k2=HSCALE << ABITS;
-
- int ri = rgb[rgbOff+0];
- int gi = rgb[rgbOff+1];
- int bi = rgb[rgbOff+2];
- short rv,rs,rh;
-
- if (ri > gi) {
- iMax = MAX (ri, bi);
- iMin = MIN (gi, bi);
- } else {
- iMax = MAX (gi, bi);
- iMin = MIN (ri, bi);
- }
-
- chroma = iMax - iMin;
- // set value
- rv = (short)( iMax << ABITS);
-
- // set saturation
- if (rv == 0)
- rs = 0;
- else
- rs = (short)((k1*chroma)/iMax);
-
- // set hue
- if (rs == 0)
- rh = 0;
- else {
- if ( ri == iMax ) {
- rh = (short)( (k2*(6*chroma+gi - bi))/(6*chroma));
- if (rh >= k2) rh -= k2;
- } else if (gi == iMax)
- rh = (short)( (k2*(2*chroma+bi - ri ))/(6*chroma));
- else // (bi == iMax )
- rh = (short)( (k2*(4*chroma+ri - gi ))/(6*chroma));
- }
- hsv[hsvOff+0] = rv;
- hsv[hsvOff+1] = rs;
- hsv[hsvOff+2] = rh;
-}
-
-void hsv2rgb(unsigned short *hsv,int hsvOff, unsigned char *rgb,int rgbOff)
-{
- int ABITS = 4;
- int HSCALE = 256;
- int m;
- int H,X,ih,is,iv;
- int k1=255<<ABITS;
- int k2=HSCALE<<ABITS;
- int k3=1<<(ABITS-1);
- int rr=0;
- int rg=0;
- int rb=0;
- short cv = hsv[hsvOff+0];
- short cs = hsv[hsvOff+1];
- short ch = hsv[hsvOff+2];
-
- // set chroma and min component value m
- //chroma = ( cv * cs )/k1;
- //m = cv - chroma;
- m = ((int)cv*(k1 - (int)cs ))/k1;
-
- // chroma == 0 <-> cs == 0 --> m=cv
- if (cs == 0) {
- rb = ( rg = ( rr =( cv >> ABITS) ));
- } else {
- ih=(int)ch;
- is=(int)cs;
- iv=(int)cv;
-
- H = (6*ih)/k2;
- X = ((iv*is)/k2)*(k2- abs(6*ih- 2*(H>>1)*k2 - k2)) ;
-
- // removing additional bits --> unit8
- X=( (X+iv*(k1 - is ))/k1 + k3 ) >> ABITS;
- m=m >> ABITS;
-
- // ( chroma + m ) --> cv ;
- cv=(short) (cv >> ABITS);
- switch (H) {
- case 0:
- rr = cv;
- rg = X;
- rb = m;
- break;
- case 1:
- rr = X;
- rg = cv;
- rb = m;
- break;
- case 2:
- rr = m;
- rg = cv;
- rb = X;
- break;
- case 3:
- rr = m;
- rg = X;
- rb = cv;
- break;
- case 4:
- rr = X;
- rg = m;
- rb = cv;
- break;
- case 5:
- rr = cv;
- rg = m ;
- rb = X;
- break;
- }
- }
- rgb[rgbOff+0] = rr;
- rgb[rgbOff+1] = rg;
- rgb[rgbOff+2] = rb;
-}
-
diff --git a/jni/filters/hue.c b/jni/filters/hue.c
deleted file mode 100644
index a4aef936d..000000000
--- a/jni/filters/hue.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterHue, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloatArray matrix)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- int i;
- int len = width * height * 4;
- jfloat* mat = (*env)->GetFloatArrayElements(env, matrix,0);
-
- for (i = 0; i < len; i+=4)
- {
- int r = rgb[RED];
- int g = rgb[GREEN];
- int b = rgb[BLUE];
-
- float rf = r*mat[0] + g*mat[4] + b*mat[8] + mat[12];
- float gf = r*mat[1] + g*mat[5] + b*mat[9] + mat[13];
- float bf = r*mat[2] + g*mat[6] + b*mat[10] + mat[14];
-
- rgb[RED] = clamp((int)rf);
- rgb[GREEN] = clamp((int)gf);
- rgb[BLUE] = clamp((int)bf);
- }
-
- (*env)->ReleaseFloatArrayElements(env, matrix, mat, 0);
- AndroidBitmap_unlockPixels(env, bitmap);
-}
-
diff --git a/jni/filters/kmeans.cc b/jni/filters/kmeans.cc
deleted file mode 100644
index 97cead7bc..000000000
--- a/jni/filters/kmeans.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-#include "kmeans.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * For reasonable speeds:
- * k < 30
- * small_ds_bitmap width/height < 64 pixels.
- * large_ds_bitmap width/height < 512 pixels
- *
- * bad for high-frequency image noise
- */
-
-void JNIFUNCF(ImageFilterKMeans, nativeApplyFilter, jobject bitmap, jint width, jint height,
- jobject large_ds_bitmap, jint lwidth, jint lheight, jobject small_ds_bitmap,
- jint swidth, jint sheight, jint p, jint seed)
-{
- char* destination = 0;
- char* larger_ds_dst = 0;
- char* smaller_ds_dst = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- AndroidBitmap_lockPixels(env, large_ds_bitmap, (void**) &larger_ds_dst);
- AndroidBitmap_lockPixels(env, small_ds_bitmap, (void**) &smaller_ds_dst);
- unsigned char * dst = (unsigned char *) destination;
-
- unsigned char * small_ds = (unsigned char *) smaller_ds_dst;
- unsigned char * large_ds = (unsigned char *) larger_ds_dst;
-
- // setting for small bitmap
- int len = swidth * sheight * 4;
- int dimension = 3;
- int stride = 4;
- int iterations = 20;
- int k = p;
- unsigned int s = seed;
- unsigned char finalCentroids[k * stride];
-
- // get initial picks from small downsampled image
- runKMeans<unsigned char, int>(k, finalCentroids, small_ds, len, dimension,
- stride, iterations, s);
-
-
- len = lwidth * lheight * 4;
- iterations = 8;
- unsigned char nextCentroids[k * stride];
-
- // run kmeans on large downsampled image
- runKMeansWithPicks<unsigned char, int>(k, nextCentroids, large_ds, len,
- dimension, stride, iterations, finalCentroids);
-
- len = width * height * 4;
-
- // apply to final image
- applyCentroids<unsigned char, int>(k, nextCentroids, dst, len, dimension, stride);
-
- AndroidBitmap_unlockPixels(env, small_ds_bitmap);
- AndroidBitmap_unlockPixels(env, large_ds_bitmap);
- AndroidBitmap_unlockPixels(env, bitmap);
-}
-#ifdef __cplusplus
-}
-#endif
diff --git a/jni/filters/kmeans.h b/jni/filters/kmeans.h
deleted file mode 100644
index 24506058a..000000000
--- a/jni/filters/kmeans.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef KMEANS_H
-#define KMEANS_H
-
-#include <cstdlib>
-#include <math.h>
-
-// Helper functions
-
-template <typename T, typename N>
-inline void sum(T values[], int len, int dimension, int stride, N dst[]) {
- int x, y;
- // zero out dst vector
- for (x = 0; x < dimension; x++) {
- dst[x] = 0;
- }
- for (x = 0; x < len; x+= stride) {
- for (y = 0; y < dimension; y++) {
- dst[y] += values[x + y];
- }
- }
-}
-
-template <typename T, typename N>
-inline void set(T val1[], N val2[], int dimension) {
- int x;
- for (x = 0; x < dimension; x++) {
- val1[x] = val2[x];
- }
-}
-
-template <typename T, typename N>
-inline void add(T val[], N dst[], int dimension) {
- int x;
- for (x = 0; x < dimension; x++) {
- dst[x] += val[x];
- }
-}
-
-template <typename T, typename N>
-inline void divide(T dst[], N divisor, int dimension) {
- int x;
- if (divisor == 0) {
- return;
- }
- for (x = 0; x < dimension; x++) {
- dst[x] /= divisor;
- }
-}
-
-/**
- * Calculates euclidean distance.
- */
-
-template <typename T, typename N>
-inline N euclideanDist(T val1[], T val2[], int dimension) {
- int x;
- N sum = 0;
- for (x = 0; x < dimension; x++) {
- N diff = (N) val1[x] - (N) val2[x];
- sum += diff * diff;
- }
- return sqrt(sum);
-}
-
-// K-Means
-
-
-/**
- * Picks k random starting points from the data set.
- */
-template <typename T>
-void initialPickHeuristicRandom(int k, T values[], int len, int dimension, int stride, T dst[],
- unsigned int seed) {
- int x, z, num_vals, cntr;
- num_vals = len / stride;
- cntr = 0;
- srand(seed);
- unsigned int r_vals[k];
- unsigned int r;
-
- for (x = 0; x < k; x++) {
-
- // ensure randomly chosen value is unique
- int r_check = 0;
- while (r_check == 0) {
- r = (unsigned int) rand() % num_vals;
- r_check = 1;
- for (z = 0; z < x; z++) {
- if (r == r_vals[z]) {
- r_check = 0;
- }
- }
- }
- r_vals[x] = r;
- r *= stride;
-
- // set dst to be randomly chosen value
- set<T,T>(dst + cntr, values + r, dimension);
- cntr += stride;
- }
-}
-
-/**
- * Finds index of closet centroid to a value
- */
-template <typename T, typename N>
-inline int findClosest(T values[], T oldCenters[], int dimension, int stride, int pop_size) {
- int best_ind = 0;
- N best_len = euclideanDist <T, N>(values, oldCenters, dimension);
- int y;
- for (y = stride; y < pop_size; y+=stride) {
- N l = euclideanDist <T, N>(values, oldCenters + y, dimension);
- if (l < best_len) {
- best_len = l;
- best_ind = y;
- }
- }
- return best_ind;
-}
-
-/**
- * Calculates new centroids by averaging value clusters for old centroids.
- */
-template <typename T, typename N>
-int calculateNewCentroids(int k, T values[], int len, int dimension, int stride, T oldCenters[],
- T dst[]) {
- int x, pop_size;
- pop_size = k * stride;
- int popularities[k];
- N tmp[pop_size];
-
- //zero popularities
- memset(popularities, 0, sizeof(int) * k);
- // zero dst, and tmp
- for (x = 0; x < pop_size; x++) {
- tmp[x] = 0;
- }
-
- // put summation for each k in tmp
- for (x = 0; x < len; x+=stride) {
- int best = findClosest<T, N>(values + x, oldCenters, dimension, stride, pop_size);
- add<T, N>(values + x, tmp + best, dimension);
- popularities[best / stride]++;
-
- }
-
- int ret = 0;
- int y;
- // divide to get centroid and set dst to result
- for (x = 0; x < pop_size; x+=stride) {
- divide<N, int>(tmp + x, popularities[x / stride], dimension);
- for (y = 0; y < dimension; y++) {
- if ((dst + x)[y] != (T) ((tmp + x)[y])) {
- ret = 1;
- }
- }
- set(dst + x, tmp + x, dimension);
- }
- return ret;
-}
-
-template <typename T, typename N>
-void runKMeansWithPicks(int k, T finalCentroids[], T values[], int len, int dimension, int stride,
- int iterations, T initialPicks[]){
- int k_len = k * stride;
- int x;
-
- // zero newCenters
- for (x = 0; x < k_len; x++) {
- finalCentroids[x] = 0;
- }
-
- T * c1 = initialPicks;
- T * c2 = finalCentroids;
- T * temp;
- int ret = 1;
- for (x = 0; x < iterations; x++) {
- ret = calculateNewCentroids<T, N>(k, values, len, dimension, stride, c1, c2);
- temp = c1;
- c1 = c2;
- c2 = temp;
- if (ret == 0) {
- x = iterations;
- }
- }
- set<T, T>(finalCentroids, c1, dimension);
-}
-
-/**
- * Runs the k-means algorithm on dataset values with some initial centroids.
- */
-template <typename T, typename N>
-void runKMeans(int k, T finalCentroids[], T values[], int len, int dimension, int stride,
- int iterations, unsigned int seed){
- int k_len = k * stride;
- T initialPicks [k_len];
- initialPickHeuristicRandom<T>(k, values, len, dimension, stride, initialPicks, seed);
-
- runKMeansWithPicks<T, N>(k, finalCentroids, values, len, dimension, stride,
- iterations, initialPicks);
-}
-
-/**
- * Sets each value in values to the closest centroid.
- */
-template <typename T, typename N>
-void applyCentroids(int k, T centroids[], T values[], int len, int dimension, int stride) {
- int x, pop_size;
- pop_size = k * stride;
- for (x = 0; x < len; x+= stride) {
- int best = findClosest<T, N>(values + x, centroids, dimension, stride, pop_size);
- set<T, T>(values + x, centroids + best, dimension);
- }
-}
-
-#endif // KMEANS_H
diff --git a/jni/filters/negative.c b/jni/filters/negative.c
deleted file mode 100644
index 735e583c9..000000000
--- a/jni/filters/negative.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterNegative, nativeApplyFilter, jobject bitmap, jint width, jint height)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
-
- int tot_len = height * width * 4;
- int i;
- char * dst = destination;
- for (i = 0; i < tot_len; i+=4) {
- dst[RED] = 255 - dst[RED];
- dst[GREEN] = 255 - dst[GREEN];
- dst[BLUE] = 255 - dst[BLUE];
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/redEyeMath.c b/jni/filters/redEyeMath.c
deleted file mode 100644
index 26f3f76a4..000000000
--- a/jni/filters/redEyeMath.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-int value(int r, int g, int b) {
- return MAX(r, MAX(g, b));
-}
-
-int isRed(unsigned char *src, int p) {
- int b = src[p + 2];
- int g = src[p + 1];
- int r = src[p];
- int max = MAX(g, b);
-
- return ((r * 100 / (max + 2) > 160) & (max < 80));
-}
-
-void findPossible(unsigned char *src, unsigned char *mask, int iw, int ih,
- short *rect) {
- int recX = rect[0], recY = rect[1], recW = rect[2], recH = rect[3];
- int y, x;
-
- for (y = 0; y < recH; y++) {
- int sy = (recY + y) * iw;
- for (x = 0; x < recW; x++) {
- int p = (recX + x + sy) * 4;
-
- int b = src[p + 2];
- int g = src[p + 1];
- int r = src[p];
- mask[x + y * recW] = (
- mask[x + y * recW] > 0 && (value(r, g, b) > 240) ? 1 : 0);
-
- }
-
- }
-}
-
-void findReds(unsigned char *src, unsigned char *mask, int iw, int ih,
- short *rect) {
- int recX = rect[0], recY = rect[1], recW = rect[2], recH = rect[3];
- int y, x;
-
- for (y = 0; y < recH; y++) {
- int sy = (recY + y) * iw;
- for (x = 0; x < recW; x++) {
- int p = (recX + x + sy) * 4;
-
- mask[x + y * recW] = ((isRed(src, p)) ? 1 : 0);
-
- }
-
- }
-}
-
-void dialateMaskIfRed(unsigned char *src, int iw, int ih, unsigned char *mask,
- unsigned char *out, short *rect) {
- int recX = rect[0], recY = rect[1], recW = rect[2], recH = rect[3];
- int y, x;
-
- for (y = 1; y < recH - 1; y++) {
- int row = recW * y;
- int sy = (recY + y) * iw;
- for (x = 1; x < recW - 1; x++) {
- int p = (recX + x + sy) * 4;
-
- char b = (mask[row + x] | mask[row + x + 1] | mask[row + x - 1]
- | mask[row + x - recW] | mask[row + x + recW]);
- if (b != 0 && isRed(src, p))
- out[row + x] = 1;
- else
- out[row + x] = mask[row + x];
- }
- }
-}
-
-void dialateMask(unsigned char *mask, unsigned char *out, int mw, int mh) {
- int y, x;
- for (y = 1; y < mh - 1; y++) {
- int row = mw * y;
- for (x = 1; x < mw - 1; x++) {
- out[row + x] = (mask[row + x] | mask[row + x + 1]
- | mask[row + x - 1] | mask[row + x - mw]
- | mask[row + x + mw]);
- }
- }
-}
-
-void stuff(int r, int g, int b, unsigned char *img, int off) {
- img[off + 2] = b;
- img[off + 1] = g;
- img[off] = r;
-}
-
-void filterRedEye(unsigned char *src, unsigned char *dest, int iw, int ih, short *rect) {
- int recX = rect[0], recY = rect[1], recW = rect[2], recH = rect[3];
- unsigned char *mask1 = (unsigned char *) malloc(recW * recH);
- unsigned char *mask2 = (unsigned char *)malloc(recW*recH);
- int QUE_LEN = 100;
- int y, x, i;
-
- rect[0] = MAX(rect[0],0);
- rect[1] = MAX(rect[1],0);
- rect[2] = MIN(rect[2]+rect[0],iw)-rect[0];
- rect[3] = MIN(rect[3]+rect[1],ih)-rect[1];
-
- findReds(src, mask2, iw, ih, rect);
- dialateMask(mask2, mask1, recW, recH);
- dialateMask(mask1, mask2, recW, recH);
- dialateMask(mask2, mask1, recW, recH);
- dialateMask(mask1, mask2, recW, recH);
- findPossible(src, mask2, iw, ih, rect);
- dialateMask(mask2, mask1, recW, recH);
-
- for (i = 0; i < 12; i++) {
- dialateMaskIfRed(src, iw, ih, mask1, mask2, rect);
- dialateMaskIfRed(src, iw, ih, mask2, mask1, rect);
- }
- dialateMask(mask1, mask2, recW, recH);
- dialateMask(mask2, mask1, recW, recH);
-
- for (y = 3; y < recH-3; y++) {
- int sy = (recY + y) * iw;
- for (x = 3; x < recW-3; x++) {
- int p = (recX + x + sy) * 4;
-
- int b = src[p + 2];
- int g = src[p + 1];
- int r = src[p];
-
- if (mask1[x + y * recW] != 0) {
- int m = MAX(g,b);
- float rr = (r - m) / (float) m;
- if (rr > .7f && g < 60 && b < 60) {
- dest[p + 2] = (0);
- dest[p + 1] = (0);
- dest[p] = (0);
- } else {
- if (mask2[x + y * recW] != 0) {
- stuff(r / 2, g / 2, b / 2, dest, p);
- } else
- stuff((2 * r) / 3, (2 * g) / 3, (2 * b) / 3, dest, p);
- }
-
- } else
- stuff(r, g, b, dest, p);
-
- //dest[p + 2] = dest[p + 1] =dest[p]=src[p];
- }
-
- }
-
- free(mask1);
- free(mask2);
-}
-
-
diff --git a/jni/filters/redeye.c b/jni/filters/redeye.c
deleted file mode 100644
index 9a358dd3d..000000000
--- a/jni/filters/redeye.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
- void JNIFUNCF(ImageFilterRedEye, nativeApplyFilter, jobject bitmap, jint width, jint height, jshortArray vrect)
- {
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- short* rect = (*env)->GetShortArrayElements(env, vrect,0);
-
- filterRedEye(rgb,rgb,width,height,rect);
-
- (*env)->ReleaseShortArrayElements(env, vrect, rect, 0);
- AndroidBitmap_unlockPixels(env, bitmap);
- }
diff --git a/jni/filters/saturated.c b/jni/filters/saturated.c
deleted file mode 100644
index 1bc0cc56b..000000000
--- a/jni/filters/saturated.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterSaturated, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat saturation)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- int i;
- int len = width * height * 4;
- float Rf = 0.2999f;
- float Gf = 0.587f;
- float Bf = 0.114f;
- float S = saturation;;
- float MS = 1.0f - S;
- float Rt = Rf * MS;
- float Gt = Gf * MS;
- float Bt = Bf * MS;
- float R, G, B;
- for (i = 0; i < len; i+=4)
- {
- int r = destination[RED];
- int g = destination[GREEN];
- int b = destination[BLUE];
- int t = (r + g) / 2;
- R = r;
- G = g;
- B = b;
-
- float Rc = R * (Rt + S) + G * Gt + B * Bt;
- float Gc = R * Rt + G * (Gt + S) + B * Bt;
- float Bc = R * Rt + G * Gt + B * (Bt + S);
-
- destination[RED] = CLAMP(Rc);
- destination[GREEN] = CLAMP(Gc);
- destination[BLUE] = CLAMP(Bc);
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/shadows.c b/jni/filters/shadows.c
deleted file mode 100644
index 38d64c8b5..000000000
--- a/jni/filters/shadows.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterShadows, nativeApplyFilter, jobject bitmap, jint width, jint height, float scale){
- double shadowFilterMap[] = {
- -0.00591, 0.0001,
- 1.16488, 0.01668,
- -0.18027, -0.06791,
- -0.12625, 0.09001,
- 0.15065, -0.03897
- };
-
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- unsigned char * rgb = (unsigned char * )destination;
- int i;
- double s = (scale>=0)?scale:scale/5;
- int len = width * height * 4;
-
- double *poly = (double *) malloc(5*sizeof(double));
- for (i = 0; i < 5; i++) {
- poly[i] = fastevalPoly(shadowFilterMap+i*2,2 , s);
- }
-
- unsigned short * hsv = (unsigned short *)malloc(3*sizeof(short));
-
- for (i = 0; i < len; i+=4)
- {
- rgb2hsv(rgb,i,hsv,0);
-
- double v = (fastevalPoly(poly,5,hsv[0]/4080.)*4080);
- if (v>4080) v = 4080;
- hsv[0] = (unsigned short) ((v>0)?v:0);
-
- hsv2rgb(hsv,0, rgb,i);
- }
-
- free(poly);
- free(hsv);
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/tinyplanet.cc b/jni/filters/tinyplanet.cc
deleted file mode 100644
index beac0861a..000000000
--- a/jni/filters/tinyplanet.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-#include <math.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define PI_F 3.141592653589f
-
-class ImageRGBA {
- public:
- ImageRGBA(unsigned char* image, int width, int height)
- : image_(image), width_(width), height_(height) {
- width_step_ = width * 4;
- }
-
- int Width() const {
- return width_;
- }
-
- int Height() const {
- return height_;
- }
-
- // Pixel accessor.
- unsigned char* operator()(int x, int y) {
- return image_ + y * width_step_ + x * 4;
- }
- const unsigned char* operator()(int x, int y) const {
- return image_ + y * width_step_ + x * 4;
- }
-
- private:
- unsigned char* image_;
- int width_;
- int height_;
- int width_step_;
-};
-
-// Interpolate a pixel in a 3 channel image.
-inline void InterpolatePixel(const ImageRGBA &image, float x, float y,
- unsigned char* dest) {
- // Get pointers and scale factors for the source pixels.
- float ax = x - floor(x);
- float ay = y - floor(y);
- float axn = 1.0f - ax;
- float ayn = 1.0f - ay;
- const unsigned char *p = image(x, y);
- const unsigned char *p2 = image(x, y + 1);
-
- // Interpolate each image color plane.
- dest[0] = static_cast<unsigned char>(axn * ayn * p[0] + ax * ayn * p[4] +
- ax * ay * p2[4] + axn * ay * p2[0] + 0.5f);
- p++;
- p2++;
-
- dest[1] = static_cast<unsigned char>(axn * ayn * p[0] + ax * ayn * p[4] +
- ax * ay * p2[4] + axn * ay * p2[0] + 0.5f);
- p++;
- p2++;
-
- dest[2] = static_cast<unsigned char>(axn * ayn * p[0] + ax * ayn * p[4] +
- ax * ay * p2[4] + axn * ay * p2[0] + 0.5f);
- p++;
- p2++;
- dest[3] = 0xFF;
-}
-
-// Wrap circular coordinates around the globe
-inline float wrap(float value, float dimension) {
- return value - (dimension * floor(value/dimension));
-}
-
-void StereographicProjection(float scale, float angle, unsigned char* input_image,
- int input_width, int input_height,
- unsigned char* output_image, int output_width,
- int output_height) {
- ImageRGBA input(input_image, input_width, input_height);
- ImageRGBA output(output_image, output_width, output_height);
-
- const float image_scale = output_width * scale;
-
- for (int x = 0; x < output_width; x++) {
- // Center and scale x
- float xf = (x - output_width / 2.0f) / image_scale;
-
- for (int y = 0; y < output_height; y++) {
- // Center and scale y
- float yf = (y - output_height / 2.0f) / image_scale;
-
- // Convert to polar
- float r = hypotf(xf, yf);
- float theta = angle+atan2(yf, xf);
- if (theta>PI_F) theta-=2*PI_F;
-
- // Project onto plane
- float phi = 2 * atan(1 / r);
- // (theta stays the same)
-
- // Map to panorama image
- float px = (theta / (2 * PI_F)) * input_width;
- float py = (phi / PI_F) * input_height;
-
- // Wrap around the globe
- px = wrap(px, input_width);
- py = wrap(py, input_height);
-
- // Write the interpolated pixel
- InterpolatePixel(input, px, py, output(x, y));
- }
- }
-}
-
-
-void JNIFUNCF(ImageFilterTinyPlanet, nativeApplyFilter, jobject bitmap_in, jint width, jint height, jobject bitmap_out, jint output_size, jfloat scale,jfloat angle)
-{
- char* source = 0;
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap_in, (void**) &source);
- AndroidBitmap_lockPixels(env, bitmap_out, (void**) &destination);
- unsigned char * rgb_in = (unsigned char * )source;
- unsigned char * rgb_out = (unsigned char * )destination;
-
- StereographicProjection(scale,angle, rgb_in, width, height, rgb_out, output_size, output_size);
- AndroidBitmap_unlockPixels(env, bitmap_in);
- AndroidBitmap_unlockPixels(env, bitmap_out);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-
diff --git a/jni/filters/vibrance.c b/jni/filters/vibrance.c
deleted file mode 100644
index cb5c536e5..000000000
--- a/jni/filters/vibrance.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <math.h>
-#include "filters.h"
-
-void JNIFUNCF(ImageFilterVibrance, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat vibrance)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- int i;
- int len = width * height * 4;
- float Rf = 0.2999f;
- float Gf = 0.587f;
- float Bf = 0.114f;
- float Vib = vibrance/100.f;
- float S = Vib+1;
- float MS = 1.0f - S;
- float Rt = Rf * MS;
- float Gt = Gf * MS;
- float Bt = Bf * MS;
- float R, G, B;
- for (i = 0; i < len; i+=4)
- {
- int r = destination[RED];
- int g = destination[GREEN];
- int b = destination[BLUE];
- float red = (r-MAX(g, b))/256.f;
- float sx = (float)(Vib/(1+exp(-red*3)));
- S = sx+1;
- MS = 1.0f - S;
- Rt = Rf * MS;
- Gt = Gf * MS;
- Bt = Bf * MS;
- int t = (r + g) / 2;
- R = r;
- G = g;
- B = b;
-
- float Rc = R * (Rt + S) + G * Gt + B * Bt;
- float Gc = R * Rt + G * (Gt + S) + B * Bt;
- float Bc = R * Rt + G * Gt + B * (Bt + S);
-
- destination[RED] = CLAMP(Rc);
- destination[GREEN] = CLAMP(Gc);
- destination[BLUE] = CLAMP(Bc);
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/vignette.c b/jni/filters/vignette.c
deleted file mode 100644
index b9ee3ff01..000000000
--- a/jni/filters/vignette.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-#include <math.h>
-
-static int* gVignetteMap = 0;
-static int gVignetteWidth = 0;
-static int gVignetteHeight = 0;
-
-void JNIFUNCF(ImageFilterVignette, nativeApplyFilter, jobject bitmap, jint width, jint height, jint centerx, jint centery, jfloat radiusx, jfloat radiusy, jfloat strength)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- int i;
- int len = width * height * 4;
- int vignette = 0;
- float d = centerx;
- if (radiusx == 0) radiusx = 10;
- if (radiusy == 0) radiusy = 10;
- float scalex = 1/radiusx;
- float scaley = 1/radiusy;
-
- for (i = 0; i < len; i += 4)
- {
- int p = i/4;
- float x = ((p%width)-centerx)*scalex;
- float y = ((p/width)-centery)*scaley;
- float dist = sqrt(x*x+y*y)-1;
- vignette = (int) (strength*256*MAX(dist,0));
- destination[RED] = CLAMP(destination[RED] - vignette);
- destination[GREEN] = CLAMP(destination[GREEN] - vignette);
- destination[BLUE] = CLAMP(destination[BLUE] - vignette);
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/filters/wbalance.c b/jni/filters/wbalance.c
deleted file mode 100644
index 2b92b9978..000000000
--- a/jni/filters/wbalance.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "filters.h"
-
-void estmateWhite(unsigned char *src, int len, int *wr, int *wb, int *wg){
-
- int STEP = 4;
- int RANGE = 256;
- int *histR = (int *) malloc(256*sizeof(int));
- int *histG = (int *) malloc(256*sizeof(int));
- int *histB = (int *) malloc(256*sizeof(int));
- int i;
- for (i = 0; i < 255; i++) {
- histR[i] = histG[i] = histB[i] =0;
- }
-
- for (i = 0; i < len; i+=STEP) {
- histR[(src[RED])]++;
- histG[(src[GREEN])]++;
- histB[(src[BLUE])]++;
- }
- int min_r = -1, min_g = -1,min_b = -1;
- int max_r = 0, max_g = 0,max_b = 0;
- int sum_r = 0,sum_g=0,sum_b=0;
-
- for (i = 1; i < RANGE-1; i++) {
- int r = histR[i];
- int g = histG[i];
- int b = histB[i];
- sum_r += r;
- sum_g += g;
- sum_b += b;
-
- if (r>0){
- if (min_r < 0) min_r = i;
- max_r = i;
- }
- if (g>0){
- if (min_g < 0) min_g = i;
- max_g = i;
- }
- if (b>0){
- if (min_b < 0) min_b = i;
- max_b = i;
- }
- }
-
- int sum15r = 0,sum15g=0,sum15b=0;
- int count15r = 0,count15g=0,count15b=0;
- int tmp_r = 0,tmp_g=0,tmp_b=0;
-
- for (i = RANGE-2; i >0; i--) {
- int r = histR[i];
- int g = histG[i];
- int b = histB[i];
- tmp_r += r;
- tmp_g += g;
- tmp_b += b;
-
- if ((tmp_r > sum_r/20) && (tmp_r < sum_r/5)) {
- sum15r += r*i;
- count15r += r;
- }
- if ((tmp_g > sum_g/20) && (tmp_g < sum_g/5)) {
- sum15g += g*i;
- count15g += g;
- }
- if ((tmp_b > sum_b/20) && (tmp_b < sum_b/5)) {
- sum15b += b*i;
- count15b += b;
- }
-
- }
- free(histR);
- free(histG);
- free(histB);
-
- if ((count15r>0) && (count15g>0) && (count15b>0) ){
- *wr = sum15r/count15r;
- *wb = sum15g/count15g;
- *wg = sum15b/count15b;
- }else {
- *wg = *wb = *wr=255;
- }
-}
-
-void estmateWhiteBox(unsigned char *src, int iw, int ih, int x,int y, int *wr, int *wb, int *wg){
- int r;
- int g;
- int b;
- int sum;
- int xp,yp;
- int bounds = 5;
- if (x<0) x = bounds;
- if (y<0) y = bounds;
- if (x>=(iw-bounds)) x = (iw-bounds-1);
- if (y>=(ih-bounds)) y = (ih-bounds-1);
- int startx = x - bounds;
- int starty = y - bounds;
- int endx = x + bounds;
- int endy = y + bounds;
-
- for(yp= starty;yp<endy;yp++) {
- for(xp= startx;xp<endx;xp++) {
- int i = 4*(xp+yp*iw);
- r += src[RED];
- g += src[GREEN];
- b += src[BLUE];
- sum++;
- }
- }
- *wr = r/sum;
- *wg = g/sum;
- *wb = b/sum;
-}
-
-void JNIFUNCF(ImageFilterWBalance, nativeApplyFilter, jobject bitmap, jint width, jint height, int locX,int locY)
-{
- char* destination = 0;
- AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
- int i;
- int len = width * height * 4;
- unsigned char * rgb = (unsigned char * )destination;
- int wr;
- int wg;
- int wb;
-
- if (locX==-1)
- estmateWhite(rgb,len,&wr,&wg,&wb);
- else
- estmateWhiteBox(rgb, width, height,locX,locY,&wr,&wg,&wb);
-
- int min = MIN(wr, MIN(wg, wb));
- int max = MAX(wr, MAX(wg, wb));
- float avg = (min+max)/2.f;
- float scaleR = avg/wr;
- float scaleG = avg/wg;
- float scaleB = avg/wb;
-
- for (i = 0; i < len; i+=4)
- {
- int r = rgb[RED];
- int g = rgb[GREEN];
- int b = rgb[BLUE];
-
- float Rc = r*scaleR;
- float Gc = g*scaleG;
- float Bc = b*scaleB;
-
- rgb[RED] = clamp(Rc);
- rgb[GREEN] = clamp(Gc);
- rgb[BLUE] = clamp(Bc);
- }
- AndroidBitmap_unlockPixels(env, bitmap);
-}
diff --git a/jni/jni_egl_fence.cpp b/jni/jni_egl_fence.cpp
deleted file mode 100644
index cf15e2f5d..000000000
--- a/jni/jni_egl_fence.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "jni_egl_fence.h"
-
-#include <android/log.h>
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <string.h>
-
-#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR,"egl_fence",__VA_ARGS__)
-
-typedef EGLSyncKHR EGLAPIENTRY (*TypeEglCreateSyncKHR)(EGLDisplay dpy,
- EGLenum type, const EGLint *attrib_list);
-typedef EGLBoolean EGLAPIENTRY (*TypeEglDestroySyncKHR)(EGLDisplay dpy,
- EGLSyncKHR sync);
-typedef EGLint EGLAPIENTRY (*TypeEglClientWaitSyncKHR)(EGLDisplay dpy,
- EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-static TypeEglCreateSyncKHR FuncEglCreateSyncKHR = NULL;
-static TypeEglClientWaitSyncKHR FuncEglClientWaitSyncKHR = NULL;
-static TypeEglDestroySyncKHR FuncEglDestroySyncKHR = NULL;
-static bool initialized = false;
-static bool egl_khr_fence_sync_supported = false;
-
-bool IsEglKHRFenceSyncSupported() {
- if (!initialized) {
- EGLDisplay display = eglGetCurrentDisplay();
- const char* eglExtensions = eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS);
- if (eglExtensions && strstr(eglExtensions, "EGL_KHR_fence_sync")) {
- FuncEglCreateSyncKHR = (TypeEglCreateSyncKHR) eglGetProcAddress("eglCreateSyncKHR");
- FuncEglClientWaitSyncKHR = (TypeEglClientWaitSyncKHR) eglGetProcAddress("eglClientWaitSyncKHR");
- FuncEglDestroySyncKHR = (TypeEglDestroySyncKHR) eglGetProcAddress("eglDestroySyncKHR");
- if (FuncEglCreateSyncKHR != NULL && FuncEglClientWaitSyncKHR != NULL
- && FuncEglDestroySyncKHR != NULL) {
- egl_khr_fence_sync_supported = true;
- }
- }
- initialized = true;
- }
- return egl_khr_fence_sync_supported;
-}
-
-void
-Java_com_android_gallery3d_photoeditor_FilterStack_nativeEglSetFenceAndWait(JNIEnv* env,
- jobject thiz) {
- if (!IsEglKHRFenceSyncSupported()) return;
- EGLDisplay display = eglGetCurrentDisplay();
-
- // Create a egl fence and wait for egl to return it.
- // Additional reference on egl fence sync can be found in:
- // http://www.khronos.org/registry/vg/extensions/KHR/EGL_KHR_fence_sync.txt
- EGLSyncKHR fence = FuncEglCreateSyncKHR(display, EGL_SYNC_FENCE_KHR, NULL);
- if (fence == EGL_NO_SYNC_KHR) {
- return;
- }
-
- EGLint result = FuncEglClientWaitSyncKHR(display,
- fence,
- EGL_SYNC_FLUSH_COMMANDS_BIT_KHR,
- EGL_FOREVER_KHR);
- if (result == EGL_FALSE) {
- ALOGE("EGL FENCE: error waiting for fence: %#x", eglGetError());
- }
- FuncEglDestroySyncKHR(display, fence);
-}
diff --git a/jni/jni_egl_fence.h b/jni/jni_egl_fence.h
deleted file mode 100644
index 6b2c20ab8..000000000
--- a/jni/jni_egl_fence.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COM_ANDROID_GALLERY3D_PHOTOEDITOR_JNI_EGL_FENSE_H
-#define COM_ANDROID_GALLERY3D_PHOTOEDITOR_JNI_EGL_FENSE_H
-
-#include <jni.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-JNIEXPORT void JNICALL
-Java_com_android_gallery3d_photoeditor_FilterStack_nativeEglSetFenceAndWait(JNIEnv* env,
- jobject thiz);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* COM_ANDROID_GALLERY3D_PHOTOEDITOR_JNI_EGL_FENSE_H */
diff --git a/jni_jpegstream/src/error_codes.h b/jni_jpegstream/src/error_codes.h
deleted file mode 100644
index be55a0099..000000000
--- a/jni_jpegstream/src/error_codes.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JPEG_ERROR_CODES_H_
-#define JPEG_ERROR_CODES_H_
-
-#define J_DONE -4
-#define J_EXCEPTION -3
-#define J_ERROR_BAD_ARGS -2
-#define J_ERROR_FATAL -1
-#define J_SUCCESS 0
-
-#endif // JPEG_ERROR_CODES_H_
diff --git a/jni_jpegstream/src/inputstream_wrapper.cpp b/jni_jpegstream/src/inputstream_wrapper.cpp
deleted file mode 100644
index 98721b066..000000000
--- a/jni_jpegstream/src/inputstream_wrapper.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "inputstream_wrapper.h"
-#include "error_codes.h"
-
-jmethodID InputStreamWrapper::sReadID = NULL;
-jmethodID InputStreamWrapper::sSkipID = NULL;
-
-int32_t InputStreamWrapper::read(int32_t length, int32_t offset) {
- if (offset < 0 || length < 0 || (offset + length) > getBufferSize()) {
- return J_ERROR_BAD_ARGS;
- }
- int32_t bytesRead = 0;
- mEnv->ReleaseByteArrayElements(mByteArray, mBytes, JNI_COMMIT);
- mBytes = NULL;
- if (mEnv->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- bytesRead = static_cast<int32_t>(mEnv->CallIntMethod(mStream, sReadID,
- mByteArray, offset, length));
- if (mEnv->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- mBytes = mEnv->GetByteArrayElements(mByteArray, NULL);
- if (mBytes == NULL || mEnv->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- if (bytesRead == END_OF_STREAM) {
- return J_DONE;
- }
- return bytesRead;
-}
-
-int64_t InputStreamWrapper::skip(int64_t count) {
- int64_t bytesSkipped = 0;
- bytesSkipped = static_cast<int64_t>(mEnv->CallLongMethod(mStream, sSkipID,
- static_cast<jlong>(count)));
- if (mEnv->ExceptionCheck() || bytesSkipped < 0) {
- return J_EXCEPTION;
- }
- return bytesSkipped;
-}
-
-// Acts like a read call that returns the End Of Image marker for a JPEG file.
-int32_t InputStreamWrapper::forceReadEOI() {
- mBytes[0] = (jbyte) 0xFF;
- mBytes[1] = (jbyte) 0xD9;
- return 2;
-}
-
-void InputStreamWrapper::setReadSkipMethodIDs(jmethodID readID,
- jmethodID skipID) {
- sReadID = readID;
- sSkipID = skipID;
-}
diff --git a/jni_jpegstream/src/inputstream_wrapper.h b/jni_jpegstream/src/inputstream_wrapper.h
deleted file mode 100644
index ed9942bab..000000000
--- a/jni_jpegstream/src/inputstream_wrapper.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef INPUTSTREAM_WRAPPER_H_
-#define INPUTSTREAM_WRAPPER_H_
-
-#include "jni_defines.h"
-#include "stream_wrapper.h"
-
-#include <stdint.h>
-
-class InputStreamWrapper : public StreamWrapper {
-public:
- virtual int32_t read(int32_t length, int32_t offset);
- virtual int64_t skip(int64_t count);
- virtual int32_t forceReadEOI();
-
- // Call this in JNI_OnLoad to cache read/skip method IDs
- static void setReadSkipMethodIDs(jmethodID readID, jmethodID skipID);
-protected:
- static jmethodID sReadID;
- static jmethodID sSkipID;
-};
-
-#endif // INPUTSTREAM_WRAPPER_H_
diff --git a/jni_jpegstream/src/jerr_hook.cpp b/jni_jpegstream/src/jerr_hook.cpp
deleted file mode 100644
index f8f864f78..000000000
--- a/jni_jpegstream/src/jerr_hook.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include "jerr_hook.h"
-#include "jni_defines.h"
-
-/**
- * Replaces libjpeg's error_exit function, returns control to
- * the point
- */
-void ErrExit(j_common_ptr cinfo) {
- ErrManager* mgr = reinterpret_cast<ErrManager*>(cinfo->err);
- (*cinfo->err->output_message) (cinfo);
- // Returns control to error handling in jpeg_writer
- longjmp(mgr->setjmp_buf, 1);
-}
-
-/**
- * Replaces libjpeg's output_message function, writes message
- * to logcat's error log.
- */
-void ErrOutput(j_common_ptr cinfo) {
- ErrManager* mgr = reinterpret_cast<ErrManager*>(cinfo->err);
- char buf[JMSG_LENGTH_MAX];
- (*cinfo->err->format_message) (cinfo, buf);
- buf[JMSG_LENGTH_MAX - 1] = '\0'; // Force null terminator
- // Output error message in ndk logcat.
- LOGE("%s\n", buf);
-}
-
-void SetupErrMgr(j_common_ptr cinfo, ErrManager* errMgr) {
- jpeg_std_error(&(errMgr->mgr));
- errMgr->mgr.error_exit = ErrExit;
- errMgr->mgr.output_message = ErrOutput;
- cinfo->err = reinterpret_cast<struct jpeg_error_mgr*>(errMgr);
-}
-
-
diff --git a/jni_jpegstream/src/jerr_hook.h b/jni_jpegstream/src/jerr_hook.h
deleted file mode 100644
index f2ba7cd03..000000000
--- a/jni_jpegstream/src/jerr_hook.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERR_HOOK_H_
-#define JERR_HOOK_H_
-
-extern "C" {
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jerror.h"
-}
-
-#include <setjmp.h>
-
-/**
- * ErrManager replaces libjpeg's default error handling with
- * the following behavior:
- * - libjpeg function calls return to the position set by
- * setjmp for error cleanup.
- * - libjpeg error and warning messages are printed to
- * logcat's error output.
- */
-typedef struct {
- struct jpeg_error_mgr mgr;
- jmp_buf setjmp_buf;
-} ErrManager;
-
-void SetupErrMgr(j_common_ptr cinfo, ErrManager* errMgr);
-
-#endif // JERR_HOOK_H_
diff --git a/jni_jpegstream/src/jni_defines.h b/jni_jpegstream/src/jni_defines.h
deleted file mode 100644
index 8c9bd0430..000000000
--- a/jni_jpegstream/src/jni_defines.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNIDEFINES_H
-#define JNIDEFINES_H
-
-
-#include <jni.h>
-#include <string.h>
-#include <android/log.h>
-
-#define LOGV(msg...) __android_log_print(ANDROID_LOG_VERBOSE, "Native_JPEGStream", msg)
-#define LOGE(msg...) __android_log_print(ANDROID_LOG_ERROR, "Native_JPEGStream", msg)
-#define LOGW(msg...) __android_log_print(ANDROID_LOG_WARN, "Native_JPEGStream", msg)
-
-#endif // JNIDEFINES_H
diff --git a/jni_jpegstream/src/jpeg_config.h b/jni_jpegstream/src/jpeg_config.h
deleted file mode 100644
index a99755275..000000000
--- a/jni_jpegstream/src/jpeg_config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JPEG_CONFIG_H_
-#define JPEG_CONFIG_H_
-namespace Jpeg_Config {
-
-// Pixel format
-enum Format {
- FORMAT_GRAYSCALE = 0x001, // 1 byte/pixel
- FORMAT_RGB = 0x003, // 3 bytes/pixel RGBRGBRGBRGB...
- FORMAT_RGBA = 0x004, // 4 bytes/pixel RGBARGBARGBARGBA...
- FORMAT_ABGR = 0x104 // 4 bytes/pixel ABGRABGRABGR...
-};
-
-} // end namespace Jpeg_Config
-
-#endif // JPEG_CONFIG_H_
diff --git a/jni_jpegstream/src/jpeg_hook.cpp b/jni_jpegstream/src/jpeg_hook.cpp
deleted file mode 100644
index cca54e405..000000000
--- a/jni_jpegstream/src/jpeg_hook.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "error_codes.h"
-#include "jni_defines.h"
-#include "jpeg_hook.h"
-
-#include <stddef.h>
-#include <string.h>
-
-void Mgr_init_destination_fcn(j_compress_ptr cinfo) {
- DestManager *dst = reinterpret_cast<DestManager*>(cinfo->dest);
- dst->mgr.next_output_byte = reinterpret_cast<JOCTET*>(dst->outStream->getBufferPtr());
- dst->mgr.free_in_buffer = dst->outStream->getBufferSize();
-}
-
-boolean Mgr_empty_output_buffer_fcn(j_compress_ptr cinfo) {
- DestManager *dst = reinterpret_cast<DestManager*>(cinfo->dest);
- int32_t len = dst->outStream->getBufferSize();
- if (dst->outStream->write(len, 0) != J_SUCCESS) {
- ERREXIT(cinfo, JERR_FILE_WRITE);
- }
- dst->mgr.next_output_byte = reinterpret_cast<JOCTET*>(dst->outStream->getBufferPtr());
- dst->mgr.free_in_buffer = len;
- return TRUE;
-}
-
-void Mgr_term_destination_fcn(j_compress_ptr cinfo) {
- DestManager *dst = reinterpret_cast<DestManager*>(cinfo->dest);
- int32_t remaining = dst->outStream->getBufferSize() - dst->mgr.free_in_buffer;
- if (dst->outStream->write(remaining, 0) != J_SUCCESS) {
- ERREXIT(cinfo, JERR_FILE_WRITE);
- }
-}
-
-int32_t MakeDst(j_compress_ptr cinfo, JNIEnv *env, jobject outStream) {
- if (cinfo->dest != NULL) {
- LOGE("DestManager already exists, cannot allocate!");
- return J_ERROR_FATAL;
- } else {
- size_t size = sizeof(DestManager);
- cinfo->dest = (struct jpeg_destination_mgr *) (*cinfo->mem->alloc_small)
- ((j_common_ptr) cinfo, JPOOL_PERMANENT, size);
- if (cinfo->dest == NULL) {
- LOGE("Could not allocate memory for DestManager.");
- return J_ERROR_FATAL;
- }
- memset(cinfo->dest, '0', size);
- }
- DestManager *d = reinterpret_cast<DestManager*>(cinfo->dest);
- d->mgr.init_destination = Mgr_init_destination_fcn;
- d->mgr.empty_output_buffer = Mgr_empty_output_buffer_fcn;
- d->mgr.term_destination = Mgr_term_destination_fcn;
- d->outStream = new OutputStreamWrapper();
- if(d->outStream->init(env, outStream)) {
- return J_SUCCESS;
- }
- return J_ERROR_FATAL;
-}
-
-void UpdateDstEnv(j_compress_ptr cinfo, JNIEnv* env) {
- DestManager* d = reinterpret_cast<DestManager*>(cinfo->dest);
- d->outStream->updateEnv(env);
-}
-
-void CleanDst(j_compress_ptr cinfo) {
- if (cinfo != NULL && cinfo->dest != NULL) {
- DestManager *d = reinterpret_cast<DestManager*>(cinfo->dest);
- if (d->outStream != NULL) {
- delete d->outStream;
- d->outStream = NULL;
- }
- }
-}
-
-boolean Mgr_fill_input_buffer_fcn(j_decompress_ptr cinfo) {
- SourceManager *src = reinterpret_cast<SourceManager*>(cinfo->src);
- int32_t bytesRead = src->inStream->read(src->inStream->getBufferSize(), 0);
- if (bytesRead == J_DONE) {
- if (src->start_of_file == TRUE) {
- ERREXIT(cinfo, JERR_INPUT_EMPTY);
- }
- WARNMS(cinfo, JWRN_JPEG_EOF);
- bytesRead = src->inStream->forceReadEOI();
- } else if (bytesRead < 0) {
- ERREXIT(cinfo, JERR_FILE_READ);
- } else if (bytesRead == 0) {
- LOGW("read 0 bytes from InputStream.");
- }
- src->mgr.next_input_byte = reinterpret_cast<JOCTET*>(src->inStream->getBufferPtr());
- src->mgr.bytes_in_buffer = bytesRead;
- if (bytesRead != 0) {
- src->start_of_file = FALSE;
- }
- return TRUE;
-}
-
-void Mgr_init_source_fcn(j_decompress_ptr cinfo) {
- SourceManager *s = reinterpret_cast<SourceManager*>(cinfo->src);
- s->start_of_file = TRUE;
- Mgr_fill_input_buffer_fcn(cinfo);
-}
-
-void Mgr_skip_input_data_fcn(j_decompress_ptr cinfo, long num_bytes) {
- // Cannot skip negative or 0 bytes.
- if (num_bytes <= 0) {
- LOGW("skipping 0 bytes in InputStream");
- return;
- }
- SourceManager *src = reinterpret_cast<SourceManager*>(cinfo->src);
- if (src->mgr.bytes_in_buffer >= num_bytes) {
- src->mgr.bytes_in_buffer -= num_bytes;
- src->mgr.next_input_byte += num_bytes;
- } else {
- // if skipping more bytes than remain in buffer, set skip_bytes
- int64_t skip = num_bytes - src->mgr.bytes_in_buffer;
- src->mgr.next_input_byte += src->mgr.bytes_in_buffer;
- src->mgr.bytes_in_buffer = 0;
- int64_t actual = src->inStream->skip(skip);
- if (actual < 0) {
- ERREXIT(cinfo, JERR_FILE_READ);
- }
- skip -= actual;
- while (skip > 0) {
- actual = src->inStream->skip(skip);
- if (actual < 0) {
- ERREXIT(cinfo, JERR_FILE_READ);
- }
- skip -= actual;
- if (actual == 0) {
- // Multiple zero byte skips, likely EOF
- WARNMS(cinfo, JWRN_JPEG_EOF);
- return;
- }
- }
- }
-}
-
-void Mgr_term_source_fcn(j_decompress_ptr cinfo) {
- //noop
-}
-
-int32_t MakeSrc(j_decompress_ptr cinfo, JNIEnv *env, jobject inStream){
- if (cinfo->src != NULL) {
- LOGE("SourceManager already exists, cannot allocate!");
- return J_ERROR_FATAL;
- } else {
- size_t size = sizeof(SourceManager);
- cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small)
- ((j_common_ptr) cinfo, JPOOL_PERMANENT, size);
- if (cinfo->src == NULL) {
- // Could not allocate memory.
- LOGE("Could not allocate memory for SourceManager.");
- return J_ERROR_FATAL;
- }
- memset(cinfo->src, '0', size);
- }
- SourceManager *s = reinterpret_cast<SourceManager*>(cinfo->src);
- s->start_of_file = TRUE;
- s->mgr.init_source = Mgr_init_source_fcn;
- s->mgr.fill_input_buffer = Mgr_fill_input_buffer_fcn;
- s->mgr.skip_input_data = Mgr_skip_input_data_fcn;
- s->mgr.resync_to_restart = jpeg_resync_to_restart; // use default restart
- s->mgr.term_source = Mgr_term_source_fcn;
- s->inStream = new InputStreamWrapper();
- if(s->inStream->init(env, inStream)) {
- return J_SUCCESS;
- }
- return J_ERROR_FATAL;
-}
-
-void UpdateSrcEnv(j_decompress_ptr cinfo, JNIEnv* env) {
- SourceManager* s = reinterpret_cast<SourceManager*>(cinfo->src);
- s->inStream->updateEnv(env);
-}
-
-void CleanSrc(j_decompress_ptr cinfo) {
- if (cinfo != NULL && cinfo->src != NULL) {
- SourceManager *s = reinterpret_cast<SourceManager*>(cinfo->src);
- if (s->inStream != NULL) {
- delete s->inStream;
- s->inStream = NULL;
- }
- }
-}
diff --git a/jni_jpegstream/src/jpeg_hook.h b/jni_jpegstream/src/jpeg_hook.h
deleted file mode 100644
index b02bb34c0..000000000
--- a/jni_jpegstream/src/jpeg_hook.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef LIBJPEG_HOOK_H_
-#define LIBJPEG_HOOK_H_
-
-extern "C" {
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jerror.h"
-}
-
-#include "inputstream_wrapper.h"
-#include "outputstream_wrapper.h"
-
-#include <stdint.h>
-
-/**
- * DestManager holds the libjpeg destination manager struct and
- * a holder with a java OutputStream.
- */
-typedef struct {
- struct jpeg_destination_mgr mgr;
- OutputStreamWrapper *outStream;
-} DestManager;
-
-// Initializes the DestManager struct, sets up the jni refs
-int32_t MakeDst(j_compress_ptr cinfo, JNIEnv *env, jobject outStream);
-
-/**
- * Updates the jni env pointer. This should be called in the beginning of any
- * JNI method in jpegstream.cpp before CleanDst or any of the libjpeg functions
- * that can trigger a call to an OutputStreamWrapper method.
- */
-void UpdateDstEnv(j_compress_ptr cinfo, JNIEnv* env);
-
-// Cleans the jni refs. To wipe the compress object call jpeg_destroy_compress
-void CleanDst(j_compress_ptr cinfo);
-
-/**
- * SourceManager holds the libjpeg source manager struct and a
- * holder with a java InputStream.
- */
-typedef struct {
- struct jpeg_source_mgr mgr;
- boolean start_of_file;
- InputStreamWrapper *inStream;
-} SourceManager;
-
-// Initializes the SourceManager struct, sets up the jni refs
-int32_t MakeSrc(j_decompress_ptr cinfo, JNIEnv *env, jobject inStream);
-
-/**
- * Updates the jni env pointer. This should be called in the beginning of any
- * JNI method in jpegstream.cpp before CleanSrc or any of the libjpeg functions
- * that can trigger a call to an InputStreamWrapper method.
- */
-void UpdateSrcEnv(j_decompress_ptr cinfo, JNIEnv* env);
-
-// Cleans the jni refs. To wipe the decompress object, call jpeg_destroy_decompress
-void CleanSrc(j_decompress_ptr cinfo);
-
-#endif // LIBJPEG_HOOK_H_
diff --git a/jni_jpegstream/src/jpeg_reader.cpp b/jni_jpegstream/src/jpeg_reader.cpp
deleted file mode 100644
index 4726b6426..000000000
--- a/jni_jpegstream/src/jpeg_reader.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "jpeg_reader.h"
-#include "error_codes.h"
-#include "jpeg_hook.h"
-
-#include <setjmp.h>
-
-JpegReader::JpegReader() :
- mInfo(),
- mErrorManager(),
- mScanlineBuf(NULL),
- mScanlineIter(NULL),
- mScanlineBuflen(0),
- mScanlineUnformattedBuflen(0),
- mScanlineBytesRemaining(0),
- mFormat(),
- mFinished(false),
- mSetup(false) {}
-
-JpegReader::~JpegReader() {
- if (reset() != J_SUCCESS) {
- LOGE("Failed to destroy compress object, JpegReader may leak memory.");
- }
-}
-
-int32_t JpegReader::setup(JNIEnv *env, jobject in, int32_t* width, int32_t* height,
- Jpeg_Config::Format format) {
- if (mFinished || mSetup) {
- return J_ERROR_FATAL;
- }
- if (env->ExceptionCheck()) {
- return J_EXCEPTION;
- }
-
- // Setup error handler
- SetupErrMgr(reinterpret_cast<j_common_ptr>(&mInfo), &mErrorManager);
- // Set jump address for error handling
- if (setjmp(mErrorManager.setjmp_buf)) {
- return J_ERROR_FATAL;
- }
-
- // Call libjpeg setup
- jpeg_create_decompress(&mInfo);
-
- // Setup our data source object, this allocates java global references
- int32_t flags = MakeSrc(&mInfo, env, in);
- if (flags != J_SUCCESS) {
- LOGE("Failed to make source with error code: %d ", flags);
- return flags;
- }
-
- // Reads jpeg file header
- jpeg_read_header(&mInfo, TRUE);
- jpeg_calc_output_dimensions(&mInfo);
-
- const int components = (static_cast<int>(format) & 0xff);
-
- // Do setup for input format
- switch (components) {
- case 1:
- mInfo.out_color_space = JCS_GRAYSCALE;
- mScanlineUnformattedBuflen = mInfo.output_width;
- break;
- case 3:
- case 4:
- mScanlineUnformattedBuflen = mInfo.output_width * components;
- if (mInfo.jpeg_color_space == JCS_CMYK
- || mInfo.jpeg_color_space == JCS_YCCK) {
- // Always use cmyk for output in a 4 channel jpeg.
- // libjpeg has a builtin cmyk->rgb decoder.
- mScanlineUnformattedBuflen = mInfo.output_width * 4;
- mInfo.out_color_space = JCS_CMYK;
- } else {
- mInfo.out_color_space = JCS_RGB;
- }
- break;
- default:
- return J_ERROR_BAD_ARGS;
- }
-
- mScanlineBuflen = mInfo.output_width * components;
- mScanlineBytesRemaining = mScanlineBuflen;
- mScanlineBuf = (JSAMPLE *) (mInfo.mem->alloc_small)(
- reinterpret_cast<j_common_ptr>(&mInfo), JPOOL_PERMANENT,
- mScanlineUnformattedBuflen * sizeof(JSAMPLE));
- mScanlineIter = mScanlineBuf;
- jpeg_start_decompress(&mInfo);
-
- // Output image dimensions
- if (width != NULL) {
- *width = mInfo.output_width;
- }
- if (height != NULL) {
- *height = mInfo.output_height;
- }
-
- mFormat = format;
- mSetup = true;
- return J_SUCCESS;
-}
-
-int32_t JpegReader::read(int8_t* bytes, int32_t offset, int32_t count) {
- if (!mSetup) {
- return J_ERROR_FATAL;
- }
- if (mFinished) {
- return J_DONE;
- }
- // Set jump address for error handling
- if (setjmp(mErrorManager.setjmp_buf)) {
- return J_ERROR_FATAL;
- }
- if (count <= 0) {
- return J_ERROR_BAD_ARGS;
- }
- int32_t total_length = count;
- while (mInfo.output_scanline < mInfo.output_height) {
- if (count < mScanlineBytesRemaining) {
- // read partial scanline and return
- if (bytes != NULL) {
- // Treat NULL bytes as a skip
- memcpy((void*) (bytes + offset), (void*) mScanlineIter,
- count * sizeof(int8_t));
- }
- mScanlineBytesRemaining -= count;
- mScanlineIter += count;
- return total_length;
- } else if (count > 0) {
- // read full scanline
- if (bytes != NULL) {
- // Treat NULL bytes as a skip
- memcpy((void*) (bytes + offset), (void*) mScanlineIter,
- mScanlineBytesRemaining * sizeof(int8_t));
- bytes += mScanlineBytesRemaining;
- }
- count -= mScanlineBytesRemaining;
- mScanlineBytesRemaining = 0;
- }
- // Scanline buffer exhausted, read next scanline
- if (jpeg_read_scanlines(&mInfo, &mScanlineBuf, 1) != 1) {
- // Always read full scanline, no IO suspension
- return J_ERROR_FATAL;
- }
- // Do in-place pixel formatting
- formatPixels(static_cast<uint8_t*>(mScanlineBuf),
- mScanlineUnformattedBuflen);
-
- // Reset iterators
- mScanlineIter = mScanlineBuf;
- mScanlineBytesRemaining = mScanlineBuflen;
- }
-
- // Read all of the scanlines
- jpeg_finish_decompress(&mInfo);
- mFinished = true;
- return total_length - count;
-}
-
-void JpegReader::updateEnv(JNIEnv *env) {
- UpdateSrcEnv(&mInfo, env);
-}
-
-// Does in-place pixel formatting
-void JpegReader::formatPixels(uint8_t* buf, int32_t len) {
- uint8_t *iter = buf;
-
- // Do cmyk->rgb conversion if necessary
- switch (mInfo.out_color_space) {
- case JCS_CMYK:
- // Convert CMYK to RGB
- int r, g, b, c, m, y, k;
- for (int i = 0; i < len; i += 4) {
- c = buf[i + 0];
- m = buf[i + 1];
- y = buf[i + 2];
- k = buf[i + 3];
- // Handle fmt for weird photoshop markers
- if (mInfo.saw_Adobe_marker) {
- r = (k * c) / 255;
- g = (k * m) / 255;
- b = (k * y) / 255;
- } else {
- r = (255 - k) * (255 - c) / 255;
- g = (255 - k) * (255 - m) / 255;
- b = (255 - k) * (255 - y) / 255;
- }
- *iter++ = r;
- *iter++ = g;
- *iter++ = b;
- }
- break;
- case JCS_RGB:
- iter += (len * 3 / 4);
- break;
- case JCS_GRAYSCALE:
- default:
- return;
- }
-
- // Do endianness and alpha for output format
- if (mFormat == Jpeg_Config::FORMAT_RGBA) {
- // Set alphas to 255
- uint8_t* end = buf + len - 1;
- for (int i = len - 1; i >= 0; i -= 4) {
- buf[i] = 255;
- buf[i - 1] = *--iter;
- buf[i - 2] = *--iter;
- buf[i - 3] = *--iter;
- }
- } else if (mFormat == Jpeg_Config::FORMAT_ABGR) {
- // Reverse endianness and set alphas to 255
- uint8_t* end = buf + len - 1;
- int r, g, b;
- for (int i = len - 1; i >= 0; i -= 4) {
- b = *--iter;
- g = *--iter;
- r = *--iter;
- buf[i] = r;
- buf[i - 1] = g;
- buf[i - 2] = b;
- buf[i - 3] = 255;
- }
- }
-}
-
-int32_t JpegReader::reset() {
- // Set jump address for error handling
- if (setjmp(mErrorManager.setjmp_buf)) {
- return J_ERROR_FATAL;
- }
- // Clean up global java references
- CleanSrc(&mInfo);
- // Wipe decompress struct, free memory pools
- jpeg_destroy_decompress(&mInfo);
- mFinished = false;
- mSetup = false;
- return J_SUCCESS;
-}
-
diff --git a/jni_jpegstream/src/jpeg_reader.h b/jni_jpegstream/src/jpeg_reader.h
deleted file mode 100644
index afde27b93..000000000
--- a/jni_jpegstream/src/jpeg_reader.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef JPEG_READER_H_
-#define JPEG_READER_H_
-
-#include "jerr_hook.h"
-#include "jni_defines.h"
-#include "jpeg_config.h"
-
-#include <stdint.h>
-
-/**
- * JpegReader wraps libjpeg's decompression functionality and a
- * java InputStream object. Read calls return data from the
- * InputStream that has been decompressed.
- */
-class JpegReader {
-public:
- JpegReader();
- ~JpegReader();
-
- /**
- * Call setup with a valid InputStream reference and pixel format.
- * If this method is successful, the contents of width and height will
- * be set to the dimensions of the bitmap to be read.
- *
- * ***This method will result in the jpeg file header being read
- * from the InputStream***
- *
- * Returns J_SUCCESS on success or a negative error code.
- */
- int32_t setup(JNIEnv *env, jobject in, int32_t* width, int32_t* height,
- Jpeg_Config::Format format);
-
- /**
- * Decompresses bytes from the InputStream and writes at most count
- * bytes into the buffer, bytes, starting at some offset. Passing a
- * NULL as the bytes pointer effectively skips those bytes.
- *
- * ***This method will result in bytes being read from the InputStream***
- *
- * Returns the number of bytes written into the input buffer or a
- * negative error code.
- */
- int32_t read(int8_t * bytes, int32_t offset, int32_t count);
-
- /**
- * Updates the environment pointer. Call this before read or reset
- * in any jni function call.
- */
- void updateEnv(JNIEnv *env);
-
- /**
- * Frees any java global references held by the JpegReader, destroys
- * the decompress structure, and frees allocations in libjpeg's pools.
- */
- int32_t reset();
-
-private:
- void formatPixels(uint8_t* buf, int32_t len);
- struct jpeg_decompress_struct mInfo;
- ErrManager mErrorManager;
-
- JSAMPLE* mScanlineBuf;
- JSAMPLE* mScanlineIter;
- int32_t mScanlineBuflen;
- int32_t mScanlineUnformattedBuflen;
- int32_t mScanlineBytesRemaining;
-
- Jpeg_Config::Format mFormat;
- bool mFinished;
- bool mSetup;
-};
-
-#endif // JPEG_READER_H_
diff --git a/jni_jpegstream/src/jpeg_writer.cpp b/jni_jpegstream/src/jpeg_writer.cpp
deleted file mode 100644
index 4f7891778..000000000
--- a/jni_jpegstream/src/jpeg_writer.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "jpeg_hook.h"
-#include "jpeg_writer.h"
-#include "error_codes.h"
-
-#include <setjmp.h>
-#include <assert.h>
-
-JpegWriter::JpegWriter() : mInfo(),
- mErrorManager(),
- mScanlineBuf(NULL),
- mScanlineIter(NULL),
- mScanlineBuflen(0),
- mScanlineBytesRemaining(0),
- mFormat(),
- mFinished(false),
- mSetup(false) {}
-
-JpegWriter::~JpegWriter() {
- if (reset() != J_SUCCESS) {
- LOGE("Failed to destroy compress object, may leak memory.");
- }
-}
-
-const int32_t JpegWriter::DEFAULT_X_DENSITY = 300;
-const int32_t JpegWriter::DEFAULT_Y_DENSITY = 300;
-const int32_t JpegWriter::DEFAULT_DENSITY_UNIT = 1;
-
-int32_t JpegWriter::setup(JNIEnv *env, jobject out, int32_t width, int32_t height,
- Jpeg_Config::Format format, int32_t quality) {
- if (mFinished || mSetup) {
- return J_ERROR_FATAL;
- }
- if (env->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- if (height <= 0 || width <= 0 || quality <= 0 || quality > 100) {
- return J_ERROR_BAD_ARGS;
- }
- // Setup error handler
- SetupErrMgr(reinterpret_cast<j_common_ptr>(&mInfo), &mErrorManager);
-
- // Set jump address for error handling
- if (setjmp(mErrorManager.setjmp_buf)) {
- return J_ERROR_FATAL;
- }
-
- // Setup cinfo struct
- jpeg_create_compress(&mInfo);
-
- // Setup global java refs
- int32_t flags = MakeDst(&mInfo, env, out);
- if (flags != J_SUCCESS) {
- return flags;
- }
-
- // Initialize width, height, and color space
- mInfo.image_width = width;
- mInfo.image_height = height;
- const int components = (static_cast<int>(format) & 0xff);
- switch (components) {
- case 1:
- mInfo.input_components = 1;
- mInfo.in_color_space = JCS_GRAYSCALE;
- break;
- case 3:
- case 4:
- mInfo.input_components = 3;
- mInfo.in_color_space = JCS_RGB;
- break;
- default:
- return J_ERROR_BAD_ARGS;
- }
-
- // Set defaults
- jpeg_set_defaults(&mInfo);
- mInfo.density_unit = DEFAULT_DENSITY_UNIT; // JFIF code for pixel size units:
- // 1 = in, 2 = cm
- mInfo.X_density = DEFAULT_X_DENSITY; // Horizontal pixel density
- mInfo.Y_density = DEFAULT_Y_DENSITY; // Vertical pixel density
-
- // Set compress quality
- jpeg_set_quality(&mInfo, quality, TRUE);
-
- mFormat = format;
-
- // Setup scanline buffer
- mScanlineBuflen = width * components;
- mScanlineBytesRemaining = mScanlineBuflen;
- mScanlineBuf = (JSAMPLE *) (mInfo.mem->alloc_small)(
- reinterpret_cast<j_common_ptr>(&mInfo), JPOOL_PERMANENT,
- mScanlineBuflen * sizeof(JSAMPLE));
- mScanlineIter = mScanlineBuf;
-
- // Start compression
- jpeg_start_compress(&mInfo, TRUE);
- mSetup = true;
- return J_SUCCESS;
-}
-
-int32_t JpegWriter::write(int8_t* bytes, int32_t length) {
- if (!mSetup) {
- return J_ERROR_FATAL;
- }
- if (mFinished) {
- return 0;
- }
- // Set jump address for error handling
- if (setjmp(mErrorManager.setjmp_buf)) {
- return J_ERROR_FATAL;
- }
- if (length < 0 || bytes == NULL) {
- return J_ERROR_BAD_ARGS;
- }
-
- int32_t total_length = length;
- JSAMPROW row_pointer[1];
- while (mInfo.next_scanline < mInfo.image_height) {
- if (length < mScanlineBytesRemaining) {
- // read partial scanline and return
- memcpy((void*) mScanlineIter, (void*) bytes,
- length * sizeof(int8_t));
- mScanlineBytesRemaining -= length;
- mScanlineIter += length;
- return total_length;
- } else if (length > 0) {
- // read full scanline
- memcpy((void*) mScanlineIter, (void*) bytes,
- mScanlineBytesRemaining * sizeof(int8_t));
- bytes += mScanlineBytesRemaining;
- length -= mScanlineBytesRemaining;
- mScanlineBytesRemaining = 0;
- }
- // Do in-place pixel formatting
- formatPixels(static_cast<uint8_t*>(mScanlineBuf), mScanlineBuflen);
- row_pointer[0] = mScanlineBuf;
- // Do compression
- if (jpeg_write_scanlines(&mInfo, row_pointer, 1) != 1) {
- return J_ERROR_FATAL;
- }
- // Reset scanline buffer
- mScanlineBytesRemaining = mScanlineBuflen;
- mScanlineIter = mScanlineBuf;
- }
- jpeg_finish_compress(&mInfo);
- mFinished = true;
- return total_length - length;
-}
-
-// Does in-place pixel formatting
-void JpegWriter::formatPixels(uint8_t* buf, int32_t len) {
- // Assumes len is a multiple of 4 for RGBA and ABGR pixels.
- assert((len % 4) == 0);
- uint8_t* d = buf;
- switch (mFormat) {
- case Jpeg_Config::FORMAT_RGBA: {
- // Strips alphas
- for (int i = 0; i < len / 4; ++i, buf += 4) {
- *d++ = buf[0];
- *d++ = buf[1];
- *d++ = buf[2];
- }
- break;
- }
- case Jpeg_Config::FORMAT_ABGR: {
- // Strips alphas and flips endianness
- if (len / 4 >= 1) {
- *d++ = buf[3];
- uint8_t tmp = *d;
- *d++ = buf[2];
- *d++ = tmp;
- }
- for (int i = 1; i < len / 4; ++i, buf += 4) {
- *d++ = buf[3];
- *d++ = buf[2];
- *d++ = buf[1];
- }
- break;
- }
- default: {
- // Do nothing
- break;
- }
- }
-}
-
-void JpegWriter::updateEnv(JNIEnv *env) {
- UpdateDstEnv(&mInfo, env);
-}
-
-int32_t JpegWriter::reset() {
- // Set jump address for error handling
- if (setjmp(mErrorManager.setjmp_buf)) {
- return J_ERROR_FATAL;
- }
- // Clean up global java references
- CleanDst(&mInfo);
- // Wipe compress struct, free memory pools
- jpeg_destroy_compress(&mInfo);
- mFinished = false;
- mSetup = false;
- return J_SUCCESS;
-}
diff --git a/jni_jpegstream/src/jpeg_writer.h b/jni_jpegstream/src/jpeg_writer.h
deleted file mode 100644
index bd9a42d32..000000000
--- a/jni_jpegstream/src/jpeg_writer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef JPEG_WRITER_H_
-#define JPEG_WRITER_H_
-
-#include "jerr_hook.h"
-#include "jni_defines.h"
-#include "jpeg_config.h"
-
-#include <stdint.h>
-
-/**
- * JpegWriter wraps libjpeg's compression functionality and a
- * java OutputStream object. Write calls result in input data
- * being compressed and written to the OuputStream.
- */
-class JpegWriter {
-public:
- JpegWriter();
- ~JpegWriter();
-
- /**
- * Call setup with a valid OutputStream reference, bitmap height and
- * width, pixel format, and compression quality in range (0, 100].
- *
- * Returns J_SUCCESS on success or a negative error code.
- */
- int32_t setup(JNIEnv *env, jobject out, int32_t width, int32_t height,
- Jpeg_Config::Format format, int32_t quality);
-
- /**
- * Compresses bytes from the input buffer.
- *
- * ***This method will result in bytes being written to the OutputStream***
- *
- * Returns J_SUCCESS on success or a negative error code.
- */
- int32_t write(int8_t* bytes, int32_t length);
-
- /**
- * Updates the environment pointer. Call this before write or reset
- * in any jni function call.
- */
- void updateEnv(JNIEnv *env);
-
- /**
- * Frees any java global references held by the JpegWriter, destroys
- * the compress structure, and frees allocations in libjpeg's pools.
- */
- int32_t reset();
-
- static const int32_t DEFAULT_X_DENSITY;
- static const int32_t DEFAULT_Y_DENSITY;
- static const int32_t DEFAULT_DENSITY_UNIT;
-private:
- void formatPixels(uint8_t* buf, int32_t len);
- struct jpeg_compress_struct mInfo;
- ErrManager mErrorManager;
-
- JSAMPLE* mScanlineBuf;
- JSAMPLE* mScanlineIter;
- int32_t mScanlineBuflen;
- int32_t mScanlineBytesRemaining;
-
- Jpeg_Config::Format mFormat;
- bool mFinished;
- bool mSetup;
-};
-
-#endif // JPEG_WRITER_H_
diff --git a/jni_jpegstream/src/jpegstream.cpp b/jni_jpegstream/src/jpegstream.cpp
deleted file mode 100644
index 3b9a6830b..000000000
--- a/jni_jpegstream/src/jpegstream.cpp
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "error_codes.h"
-#include "jni_defines.h"
-#include "jpeg_writer.h"
-#include "jpeg_reader.h"
-#include "jpeg_config.h"
-#include "outputstream_wrapper.h"
-#include "inputstream_wrapper.h"
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static jint OutputStream_setup(JNIEnv* env, jobject thiz, jobject out,
- jint width, jint height, jint format, jint quality) {
- // Get a reference to this object's class
- jclass thisClass = env->GetObjectClass(thiz);
- if (env->ExceptionCheck() || thisClass == NULL) {
- return J_EXCEPTION;
- }
- // Get field for storing C pointer
- jfieldID fidNumber = env->GetFieldID(thisClass, "JNIPointer", "J");
- if (NULL == fidNumber || env->ExceptionCheck()) {
- return J_EXCEPTION;
- }
-
- // Check size
- if (width <= 0 || height <= 0) {
- return J_ERROR_BAD_ARGS;
- }
- Jpeg_Config::Format fmt = static_cast<Jpeg_Config::Format>(format);
- // Check format
- switch (fmt) {
- case Jpeg_Config::FORMAT_GRAYSCALE:
- case Jpeg_Config::FORMAT_RGB:
- case Jpeg_Config::FORMAT_RGBA:
- case Jpeg_Config::FORMAT_ABGR:
- break;
- default:
- return J_ERROR_BAD_ARGS;
- }
-
- uint32_t w = static_cast<uint32_t>(width);
- uint32_t h = static_cast<uint32_t>(height);
- int32_t q = static_cast<int32_t>(quality);
- // Clamp quality to (0, 100]
- q = (q > 100) ? 100 : ((q < 1) ? 1 : q);
-
- JpegWriter* w_ptr = new JpegWriter();
-
- // Do JpegWriter setup.
- int32_t errorFlag = w_ptr->setup(env, out, w, h, fmt, q);
- if (env->ExceptionCheck() || errorFlag != J_SUCCESS) {
- delete w_ptr;
- return errorFlag;
- }
-
- // Store C pointer for writer
- env->SetLongField(thiz, fidNumber, reinterpret_cast<jlong>(w_ptr));
- if (env->ExceptionCheck()) {
- delete w_ptr;
- return J_EXCEPTION;
- }
- return J_SUCCESS;
-}
-
-static jint InputStream_setup(JNIEnv* env, jobject thiz, jobject dimens,
- jobject in, jint format) {
- // Get a reference to this object's class
- jclass thisClass = env->GetObjectClass(thiz);
- if (env->ExceptionCheck() || thisClass == NULL) {
- return J_EXCEPTION;
- }
- jmethodID setMethod = NULL;
-
- // Get dimensions object setter method
- if (dimens != NULL) {
- jclass pointClass = env->GetObjectClass(dimens);
- if (env->ExceptionCheck() || pointClass == NULL) {
- return J_EXCEPTION;
- }
- setMethod = env->GetMethodID(pointClass, "set", "(II)V");
- if (env->ExceptionCheck() || setMethod == NULL) {
- return J_EXCEPTION;
- }
- }
- // Get field for storing C pointer
- jfieldID fidNumber = env->GetFieldID(thisClass, "JNIPointer", "J");
- if (NULL == fidNumber || env->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- Jpeg_Config::Format fmt = static_cast<Jpeg_Config::Format>(format);
- // Check format
- switch (fmt) {
- case Jpeg_Config::FORMAT_GRAYSCALE:
- case Jpeg_Config::FORMAT_RGB:
- case Jpeg_Config::FORMAT_RGBA:
- case Jpeg_Config::FORMAT_ABGR:
- break;
- default:
- return J_ERROR_BAD_ARGS;
- }
-
- JpegReader* r_ptr = new JpegReader();
- int32_t w = 0, h = 0;
- // Do JpegReader setup.
- int32_t errorFlag = r_ptr->setup(env, in, &w, &h, fmt);
- if (env->ExceptionCheck() || errorFlag != J_SUCCESS) {
- delete r_ptr;
- return errorFlag;
- }
-
- // Set dimensions to return
- if (dimens != NULL) {
- env->CallVoidMethod(dimens, setMethod, static_cast<jint>(w),
- static_cast<jint>(h));
- if (env->ExceptionCheck()) {
- delete r_ptr;
- return J_EXCEPTION;
- }
- }
- // Store C pointer for reader
- env->SetLongField(thiz, fidNumber, reinterpret_cast<jlong>(r_ptr));
- if (env->ExceptionCheck()) {
- delete r_ptr;
- return J_EXCEPTION;
- }
- return J_SUCCESS;
-}
-
-static JpegWriter* getWPtr(JNIEnv* env, jobject thiz, jfieldID* fid) {
- jclass thisClass = env->GetObjectClass(thiz);
- if (env->ExceptionCheck() || thisClass == NULL) {
- return NULL;
- }
- jfieldID fidNumber = env->GetFieldID(thisClass, "JNIPointer", "J");
- if (NULL == fidNumber || env->ExceptionCheck()) {
- return NULL;
- }
- jlong ptr = env->GetLongField(thiz, fidNumber);
- if (env->ExceptionCheck()) {
- return NULL;
- }
- // Get writer C pointer out of java field.
- JpegWriter* w_ptr = reinterpret_cast<JpegWriter*>(ptr);
- if (fid != NULL) {
- *fid = fidNumber;
- }
- return w_ptr;
-}
-
-static JpegReader* getRPtr(JNIEnv* env, jobject thiz, jfieldID* fid) {
- jclass thisClass = env->GetObjectClass(thiz);
- if (env->ExceptionCheck() || thisClass == NULL) {
- return NULL;
- }
- jfieldID fidNumber = env->GetFieldID(thisClass, "JNIPointer", "J");
- if (NULL == fidNumber || env->ExceptionCheck()) {
- return NULL;
- }
- jlong ptr = env->GetLongField(thiz, fidNumber);
- if (env->ExceptionCheck()) {
- return NULL;
- }
- // Get reader C pointer out of java field.
- JpegReader* r_ptr = reinterpret_cast<JpegReader*>(ptr);
- if (fid != NULL) {
- *fid = fidNumber;
- }
- return r_ptr;
-}
-
-static void OutputStream_cleanup(JNIEnv* env, jobject thiz) {
- jfieldID fidNumber = NULL;
- JpegWriter* w_ptr = getWPtr(env, thiz, &fidNumber);
- if (w_ptr == NULL) {
- return;
- }
- // Update environment
- w_ptr->updateEnv(env);
- // Destroy writer object
- delete w_ptr;
- w_ptr = NULL;
- // Set the java field to null
- env->SetLongField(thiz, fidNumber, reinterpret_cast<jlong>(w_ptr));
-}
-
-static void InputStream_cleanup(JNIEnv* env, jobject thiz) {
- jfieldID fidNumber = NULL;
- JpegReader* r_ptr = getRPtr(env, thiz, &fidNumber);
- if (r_ptr == NULL) {
- return;
- }
- // Update environment
- r_ptr->updateEnv(env);
- // Destroy the reader object
- delete r_ptr;
- r_ptr = NULL;
- // Set the java field to null
- env->SetLongField(thiz, fidNumber, reinterpret_cast<jlong>(r_ptr));
-}
-
-static jint OutputStream_writeInputBytes(JNIEnv* env, jobject thiz,
- jbyteArray inBuffer, jint offset, jint inCount) {
- JpegWriter* w_ptr = getWPtr(env, thiz, NULL);
- if (w_ptr == NULL) {
- return J_EXCEPTION;
- }
- // Pin input buffer
- jbyte* in_buf = (jbyte*) env->GetByteArrayElements(inBuffer, 0);
- if (env->ExceptionCheck() || in_buf == NULL) {
- return J_EXCEPTION;
- }
-
- int8_t* in_bytes = static_cast<int8_t*>(in_buf);
- int32_t in_len = static_cast<int32_t>(inCount);
- int32_t off = static_cast<int32_t>(offset);
- in_bytes += off;
- int32_t written = 0;
-
- // Update environment
- w_ptr->updateEnv(env);
- // Write out and unpin buffer.
- written = w_ptr->write(in_bytes, in_len);
- env->ReleaseByteArrayElements(inBuffer, in_buf, JNI_ABORT);
- return written;
-}
-
-static jint InputStream_readDecodedBytes(JNIEnv* env, jobject thiz,
- jbyteArray inBuffer, jint offset, jint inCount) {
- JpegReader* r_ptr = getRPtr(env, thiz, NULL);
- if (r_ptr == NULL) {
- return J_EXCEPTION;
- }
- // Pin input buffer
- jbyte* in_buf = (jbyte*) env->GetByteArrayElements(inBuffer, 0);
- if (env->ExceptionCheck() || in_buf == NULL) {
- return J_EXCEPTION;
- }
- int8_t* in_bytes = static_cast<int8_t*>(in_buf);
- int32_t in_len = static_cast<int32_t>(inCount);
- int32_t off = static_cast<int32_t>(offset);
- int32_t read = 0;
-
- // Update environment
- r_ptr->updateEnv(env);
- // Read into buffer
- read = r_ptr->read(in_bytes, off, in_len);
-
- // Unpin buffer
- if (read < 0) {
- env->ReleaseByteArrayElements(inBuffer, in_buf, JNI_ABORT);
- } else {
- env->ReleaseByteArrayElements(inBuffer, in_buf, JNI_COMMIT);
- }
- return read;
-}
-
-static jint InputStream_skipDecodedBytes(JNIEnv* env, jobject thiz,
- jint bytes) {
- if (bytes <= 0) {
- return J_ERROR_BAD_ARGS;
- }
- JpegReader* r_ptr = getRPtr(env, thiz, NULL);
- if (r_ptr == NULL) {
- return J_EXCEPTION;
- }
-
- // Update environment
- r_ptr->updateEnv(env);
- int32_t skip = 0;
- // Read with null buffer to skip
- skip = r_ptr->read(NULL, 0, bytes);
- return skip;
-}
-
-static const char *outClassPathName =
- "com/android/gallery3d/jpegstream/JPEGOutputStream";
-static const char *inClassPathName =
- "com/android/gallery3d/jpegstream/JPEGInputStream";
-
-static JNINativeMethod writeMethods[] = { { "setup",
- "(Ljava/io/OutputStream;IIII)I", (void*) OutputStream_setup }, {
- "cleanup", "()V", (void*) OutputStream_cleanup }, { "writeInputBytes",
- "([BII)I", (void*) OutputStream_writeInputBytes } };
-
-static JNINativeMethod readMethods[] = { { "setup",
- "(Landroid/graphics/Point;Ljava/io/InputStream;I)I",
- (void*) InputStream_setup }, { "cleanup", "()V",
- (void*) InputStream_cleanup }, { "readDecodedBytes", "([BII)I",
- (void*) InputStream_readDecodedBytes }, { "skipDecodedBytes", "(I)I",
- (void*) InputStream_skipDecodedBytes } };
-
-static int registerNativeMethods(JNIEnv* env, const char* className,
- JNINativeMethod* gMethods, int numMethods) {
- jclass clazz;
- clazz = env->FindClass(className);
- if (clazz == NULL) {
- LOGE("Native registration unable to find class '%s'", className);
- return JNI_FALSE;
- }
- if (env->RegisterNatives(clazz, gMethods, numMethods) < 0) {
- LOGE("RegisterNatives failed for '%s'", className);
- return JNI_FALSE;
- }
- return JNI_TRUE;
-}
-
-jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- JNIEnv* env;
- if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
- LOGE("Error: GetEnv failed in JNI_OnLoad");
- return -1;
- }
- if (!registerNativeMethods(env, outClassPathName, writeMethods,
- sizeof(writeMethods) / sizeof(writeMethods[0]))) {
- LOGE("Error: could not register native methods for JPEGOutputStream");
- return -1;
- }
- if (!registerNativeMethods(env, inClassPathName, readMethods,
- sizeof(readMethods) / sizeof(readMethods[0]))) {
- LOGE("Error: could not register native methods for JPEGInputStream");
- return -1;
- }
- // cache method IDs for OutputStream
- jclass outCls = env->FindClass("java/io/OutputStream");
- if (outCls == NULL) {
- LOGE("Unable to find class 'OutputStream'");
- return -1;
- }
- jmethodID cachedWriteFun = env->GetMethodID(outCls, "write", "([BII)V");
- if (cachedWriteFun == NULL) {
- LOGE("Unable to find write function in class 'OutputStream'");
- return -1;
- }
- OutputStreamWrapper::setWriteMethodID(cachedWriteFun);
-
- // cache method IDs for InputStream
- jclass inCls = env->FindClass("java/io/InputStream");
- if (inCls == NULL) {
- LOGE("Unable to find class 'InputStream'");
- return -1;
- }
- jmethodID cachedReadFun = env->GetMethodID(inCls, "read", "([BII)I");
- if (cachedReadFun == NULL) {
- LOGE("Unable to find read function in class 'InputStream'");
- return -1;
- }
- jmethodID cachedSkipFun = env->GetMethodID(inCls, "skip", "(J)J");
- if (cachedSkipFun == NULL) {
- LOGE("Unable to find skip function in class 'InputStream'");
- return -1;
- }
- InputStreamWrapper::setReadSkipMethodIDs(cachedReadFun, cachedSkipFun);
- return JNI_VERSION_1_6;
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/jni_jpegstream/src/outputstream_wrapper.cpp b/jni_jpegstream/src/outputstream_wrapper.cpp
deleted file mode 100644
index 0639b6eea..000000000
--- a/jni_jpegstream/src/outputstream_wrapper.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "outputstream_wrapper.h"
-#include "error_codes.h"
-
-jmethodID OutputStreamWrapper::sWriteID = NULL;
-
-int32_t OutputStreamWrapper::write(int32_t length, int32_t offset) {
- if (offset < 0 || length < 0 || (offset + length) > getBufferSize()) {
- return J_ERROR_BAD_ARGS;
- }
- mEnv->ReleaseByteArrayElements(mByteArray, mBytes, JNI_COMMIT);
- mBytes = NULL;
- if (mEnv->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- if (sWriteID == NULL) {
- LOGE("Uninitialized method ID for OutputStream write function.");
- return J_ERROR_FATAL;
- }
- // Call OutputStream write with byte array.
- mEnv->CallVoidMethod(mStream, sWriteID, mByteArray, offset, length);
- if (mEnv->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- mBytes = mEnv->GetByteArrayElements(mByteArray, NULL);
- if (mBytes == NULL || mEnv->ExceptionCheck()) {
- return J_EXCEPTION;
- }
- return J_SUCCESS;
-}
-
-void OutputStreamWrapper::setWriteMethodID(jmethodID id) {
- sWriteID = id;
-}
diff --git a/jni_jpegstream/src/outputstream_wrapper.h b/jni_jpegstream/src/outputstream_wrapper.h
deleted file mode 100644
index 9b8b0071b..000000000
--- a/jni_jpegstream/src/outputstream_wrapper.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef OUTPUTSTREAM_WRAPPER_H_
-#define OUTPUTSTREAM_WRAPPER_H_
-
-#include "jni_defines.h"
-#include "stream_wrapper.h"
-
-#include <stdint.h>
-
-class OutputStreamWrapper : public StreamWrapper {
-public:
- virtual int32_t write(int32_t length, int32_t offset);
-
- // Call this in JNI_OnLoad to cache write method
- static void setWriteMethodID(jmethodID id);
-protected:
- static jmethodID sWriteID;
-};
-
-#endif // OUTPUTSTREAM_WRAPPER_H_
diff --git a/jni_jpegstream/src/stream_wrapper.cpp b/jni_jpegstream/src/stream_wrapper.cpp
deleted file mode 100644
index 049d84f67..000000000
--- a/jni_jpegstream/src/stream_wrapper.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "stream_wrapper.h"
-
-const int32_t StreamWrapper::END_OF_STREAM = -1;
-const int32_t StreamWrapper::DEFAULT_BUFFER_SIZE = 1 << 16; // 64Kb
-
-StreamWrapper::StreamWrapper() : mEnv(NULL),
- mStream(NULL),
- mByteArray(NULL),
- mBytes(NULL),
- mByteArrayLen(0) {}
-
-StreamWrapper::~StreamWrapper() {
- cleanup();
-}
-
-void StreamWrapper::updateEnv(JNIEnv *env) {
- if (env == NULL) {
- LOGE("Cannot update StreamWrapper with a null JNIEnv pointer!");
- return;
- }
- mEnv = env;
-}
-
-bool StreamWrapper::init(JNIEnv *env, jobject stream) {
- if (mEnv != NULL) {
- LOGW("StreamWrapper already initialized!");
- return false;
- }
- mEnv = env;
- mStream = env->NewGlobalRef(stream);
- if (mStream == NULL || env->ExceptionCheck()) {
- cleanup();
- return false;
- }
- mByteArrayLen = DEFAULT_BUFFER_SIZE;
- jbyteArray tmp = env->NewByteArray(getBufferSize());
- if (tmp == NULL || env->ExceptionCheck()){
- cleanup();
- return false;
- }
- mByteArray = reinterpret_cast<jbyteArray>(env->NewGlobalRef(tmp));
- if (mByteArray == NULL || env->ExceptionCheck()){
- cleanup();
- return false;
- }
- mBytes = env->GetByteArrayElements(mByteArray, NULL);
- if (mBytes == NULL || env->ExceptionCheck()){
- cleanup();
- return false;
- }
- return true;
-}
-
-void StreamWrapper::cleanup() {
- if (mEnv != NULL) {
- if (mStream != NULL) {
- mEnv->DeleteGlobalRef(mStream);
- mStream = NULL;
- }
- if (mByteArray != NULL) {
- if (mBytes != NULL) {
- mEnv->ReleaseByteArrayElements(mByteArray, mBytes, JNI_ABORT);
- mBytes = NULL;
- }
- mEnv->DeleteGlobalRef(mByteArray);
- mByteArray = NULL;
- } else {
- mBytes = NULL;
- }
- mByteArrayLen = 0;
- mEnv = NULL;
- }
-}
-
-int32_t StreamWrapper::getBufferSize() {
- return mByteArrayLen;
-}
-
-jbyte* StreamWrapper::getBufferPtr() {
- return mBytes;
-}
diff --git a/jni_jpegstream/src/stream_wrapper.h b/jni_jpegstream/src/stream_wrapper.h
deleted file mode 100644
index e036a9145..000000000
--- a/jni_jpegstream/src/stream_wrapper.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef STREAM_WRAPPER_H_
-#define STREAM_WRAPPER_H_
-
-#include "jni_defines.h"
-
-#include <stdint.h>
-
-class StreamWrapper {
-public:
- StreamWrapper();
- virtual ~StreamWrapper();
- virtual void updateEnv(JNIEnv *env);
- virtual bool init(JNIEnv *env, jobject stream);
- virtual void cleanup();
- virtual int32_t getBufferSize();
- virtual jbyte* getBufferPtr();
-
- const static int32_t DEFAULT_BUFFER_SIZE;
- const static int32_t END_OF_STREAM;
-protected:
- JNIEnv *mEnv;
- jobject mStream;
- jbyteArray mByteArray;
- jbyte* mBytes;
- int32_t mByteArrayLen;
-};
-
-#endif // STREAM_WRAPPER_H_
diff --git a/proguard-project.txt b/proguard-project.txt
new file mode 100644
index 000000000..f2fe1559a
--- /dev/null
+++ b/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/proguard.flags b/proguard.flags
deleted file mode 100644
index 65104ec1e..000000000
--- a/proguard.flags
+++ /dev/null
@@ -1,86 +0,0 @@
-# Disable the warnings of using dynamic method call in common library.
--dontnote com.android.gallery3d.common.*
-
-# Keep all classes extended from com.android.gallery3d.common.Entry
-# Since we annotate on the fields and use reflection to create SQL
-# according to those field.
-
--keep class * extends com.android.gallery3d.common.Entry {
- @com.android.gallery3d.common.Entry$Column <fields>;
-}
-
-# ctors of subclasses of CameraPreference are called with Java reflection.
--keep class * extends com.android.camera.CameraPreference {
- <init>(...);
-}
-
--keep class com.android.camera.CameraActivity {
- public boolean isRecording();
- public long getAutoFocusTime();
- public long getShutterLag();
- public long getShutterToPictureDisplayedTime();
- public long getPictureDisplayedToJpegCallbackTime();
- public long getJpegCallbackFinishTime();
- public long getCaptureStartTime();
-}
-
--keep class com.android.camera.VideoModule {
- public void onCancelBgTraining(...);
- public void onProtectiveCurtainClick(...);
-}
-
--keep class * extends android.app.Activity {
- @com.android.camera.OnClickAttr <methods>;
-}
-
--keep class com.android.camera.CameraHolder {
- public static void injectMockCamera(...);
-}
-
-# Disable the warnings of using dynamic method calls in EffectsRecorder
--dontnote com.android.camera.EffectsRecorder
-
--keep class android.support.v8.renderscript.** { *; }
-
-# Required for ActionBarSherlock
--keep class android.support.v4.app.** { *; }
--keep interface android.support.v4.app.** { *; }
--keep class com.actionbarsherlock.** { *; }
--keep interface com.actionbarsherlock.** { *; }
--keepattributes *Annotation*
-
-# Required for mp4parser
--keep public class * implements com.coremedia.iso.boxes.Box
-
-#-assumenosideeffects junit.framework.Assert {
-#*;
-#}
-
-# For unit testing:
-
-# - Required for running exif tests on userdebug
--keep class com.android.gallery3d.exif.ExifTag { *; }
--keep class com.android.gallery3d.exif.ExifData { *; }
--keep class com.android.gallery3d.exif.ExifInterface { *; }
--keepclassmembers class com.android.gallery3d.exif.Util {
- *** closeSilently(...);
-}
-
-# - Required for running blobcache tests on userdebug
--keep class com.android.gallery3d.common.BlobCache { *; }
-
-# - Required for running glcanvas tests on userdebug
--keep class com.android.gallery3d.ui.GLPaint { *; }
--keep class com.android.gallery3d.ui.GLCanvas { *; }
--keep class com.android.gallery3d.glrenderer.GLPaint { *; }
--keep class com.android.gallery3d.glrenderer.GLCanvas { *; }
--keep class com.android.gallery3d.ui.GLView { *; }
--keepclassmembers class com.android.gallery3d.util.IntArray {
- *** toArray(...);
-}
--keep class com.android.gallery3d.util.ProfileData { *; }
-
-# - Required for running jpeg stream tests on userdebug
--keep class com.android.gallery3d.jpegstream.JPEGOutputStream { *; }
--keep class com.android.gallery3d.jpegstream.JPEGInputStream { *; }
--keep class com.android.gallery3d.jpegstream.StreamUtils { *; }
diff --git a/project.properties b/project.properties
new file mode 100644
index 000000000..ce39f2d0a
--- /dev/null
+++ b/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-18
diff --git a/res/drawable/action_bar_two_line_background.xml b/res/drawable/action_bar_two_line_background.xml
deleted file mode 100644
index a5a1855bb..000000000
--- a/res/drawable/action_bar_two_line_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_activated="true"
- android:drawable="@drawable/list_selector_background_selected" />
- <item android:drawable="@android:color/transparent" />
-</selector>
diff --git a/res/drawable/border_photo_frame_widget.xml b/res/drawable/border_photo_frame_widget.xml
deleted file mode 100644
index 5d25de533..000000000
--- a/res/drawable/border_photo_frame_widget.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/border_photo_frame_widget_focused_holo" />
- <item android:state_focused="true" android:drawable="@drawable/border_photo_frame_widget_focused_holo" />
- <item android:state_pressed="true" android:drawable="@drawable/border_photo_frame_widget_pressed_holo" />
- <item android:drawable="@drawable/border_photo_frame_widget_holo" />
-</selector>
diff --git a/res/drawable/btn_shutter_video_recording.xml b/res/drawable/btn_shutter_video_recording.xml
deleted file mode 100644
index 55967a1db..000000000
--- a/res/drawable/btn_shutter_video_recording.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/btn_video_shutter_recording_pressed_holo" />
- <item android:drawable="@drawable/btn_video_shutter_recording_holo" />
-</selector>
-
diff --git a/res/drawable/filtershow_addpoint.png b/res/drawable/filtershow_addpoint.png
deleted file mode 100644
index 5abfc7464..000000000
--- a/res/drawable/filtershow_addpoint.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_background.png b/res/drawable/filtershow_background.png
deleted file mode 100644
index 22e1641dd..000000000
--- a/res/drawable/filtershow_background.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_4x5.9.png b/res/drawable/filtershow_border_4x5.9.png
deleted file mode 100644
index 4cddf1550..000000000
--- a/res/drawable/filtershow_border_4x5.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_black.9.png b/res/drawable/filtershow_border_black.9.png
deleted file mode 100755
index 24bb5e11d..000000000
--- a/res/drawable/filtershow_border_black.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_brush.9.png b/res/drawable/filtershow_border_brush.9.png
deleted file mode 100644
index db51d2425..000000000
--- a/res/drawable/filtershow_border_brush.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_film.png b/res/drawable/filtershow_border_film.png
deleted file mode 100755
index 9fbd637c1..000000000
--- a/res/drawable/filtershow_border_film.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_grunge.9.png b/res/drawable/filtershow_border_grunge.9.png
deleted file mode 100644
index fa2d4747d..000000000
--- a/res/drawable/filtershow_border_grunge.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_rounded_black.9.png b/res/drawable/filtershow_border_rounded_black.9.png
deleted file mode 100755
index 590a34393..000000000
--- a/res/drawable/filtershow_border_rounded_black.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_rounded_white.9.png b/res/drawable/filtershow_border_rounded_white.9.png
deleted file mode 100755
index 4ddc97a19..000000000
--- a/res/drawable/filtershow_border_rounded_white.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_sumi_e.9.png b/res/drawable/filtershow_border_sumi_e.9.png
deleted file mode 100644
index 45f109412..000000000
--- a/res/drawable/filtershow_border_sumi_e.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_tape.9.png b/res/drawable/filtershow_border_tape.9.png
deleted file mode 100644
index 3837c5dc0..000000000
--- a/res/drawable/filtershow_border_tape.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_border_white.9.png b/res/drawable/filtershow_border_white.9.png
deleted file mode 100755
index d8c88267e..000000000
--- a/res/drawable/filtershow_border_white.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_background.xml b/res/drawable/filtershow_button_background.xml
deleted file mode 100644
index ee8a92dd9..000000000
--- a/res/drawable/filtershow_button_background.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:drawable="@android:color/holo_blue_light" android:state_pressed="true"/>
- <item android:drawable="@drawable/filtershow_button_selected_background" android:state_selected="true"/>
- <item android:drawable="@android:color/transparent" android:state_selected="false"/>
-
-</selector> \ No newline at end of file
diff --git a/res/drawable/filtershow_button_border.png b/res/drawable/filtershow_button_border.png
deleted file mode 100644
index 69195a902..000000000
--- a/res/drawable/filtershow_button_border.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_colors.png b/res/drawable/filtershow_button_colors.png
deleted file mode 100644
index 566773dbe..000000000
--- a/res/drawable/filtershow_button_colors.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_colors_contrast.png b/res/drawable/filtershow_button_colors_contrast.png
deleted file mode 100644
index ccb2dc630..000000000
--- a/res/drawable/filtershow_button_colors_contrast.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_colors_vignette.png b/res/drawable/filtershow_button_colors_vignette.png
deleted file mode 100644
index ac3d53fa9..000000000
--- a/res/drawable/filtershow_button_colors_vignette.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_current.png b/res/drawable/filtershow_button_current.png
deleted file mode 100644
index 8c4b379b5..000000000
--- a/res/drawable/filtershow_button_current.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_fx.png b/res/drawable/filtershow_button_fx.png
deleted file mode 100644
index c887fe4d1..000000000
--- a/res/drawable/filtershow_button_fx.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_geometry.png b/res/drawable/filtershow_button_geometry.png
deleted file mode 100644
index 4b8f3b881..000000000
--- a/res/drawable/filtershow_button_geometry.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_geometry_crop.png b/res/drawable/filtershow_button_geometry_crop.png
deleted file mode 100644
index eb7da1b21..000000000
--- a/res/drawable/filtershow_button_geometry_crop.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_geometry_flip.png b/res/drawable/filtershow_button_geometry_flip.png
deleted file mode 100644
index dd74813a7..000000000
--- a/res/drawable/filtershow_button_geometry_flip.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_geometry_rotate.png b/res/drawable/filtershow_button_geometry_rotate.png
deleted file mode 100644
index fa50ce26f..000000000
--- a/res/drawable/filtershow_button_geometry_rotate.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_geometry_straighten.png b/res/drawable/filtershow_button_geometry_straighten.png
deleted file mode 100644
index 309eb5ae2..000000000
--- a/res/drawable/filtershow_button_geometry_straighten.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_operations.png b/res/drawable/filtershow_button_operations.png
deleted file mode 100644
index 79e9a446b..000000000
--- a/res/drawable/filtershow_button_operations.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_origin.png b/res/drawable/filtershow_button_origin.png
deleted file mode 100644
index 0cd0bc28b..000000000
--- a/res/drawable/filtershow_button_origin.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_redo.png b/res/drawable/filtershow_button_redo.png
deleted file mode 100644
index 9daa01c34..000000000
--- a/res/drawable/filtershow_button_redo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_selected_background.9.png b/res/drawable/filtershow_button_selected_background.9.png
deleted file mode 100644
index bb412454c..000000000
--- a/res/drawable/filtershow_button_selected_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_settings.png b/res/drawable/filtershow_button_settings.png
deleted file mode 100644
index df3925aca..000000000
--- a/res/drawable/filtershow_button_settings.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_show_original.png b/res/drawable/filtershow_button_show_original.png
deleted file mode 100644
index 925954beb..000000000
--- a/res/drawable/filtershow_button_show_original.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_button_undo.png b/res/drawable/filtershow_button_undo.png
deleted file mode 100644
index 0a7e0d1b8..000000000
--- a/res/drawable/filtershow_button_undo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_color_picker_circle.xml b/res/drawable/filtershow_color_picker_circle.xml
deleted file mode 100644
index 4444e0fcf..000000000
--- a/res/drawable/filtershow_color_picker_circle.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval" >
- <size android:width="20dp" android:height="20dp"/>
- <corners
- android:radius="10dp" />
- <solid android:color="@color/red"/>
-</shape>
-
diff --git a/res/drawable/filtershow_color_picker_roundrect.xml b/res/drawable/filtershow_color_picker_roundrect.xml
deleted file mode 100644
index 89add5e6f..000000000
--- a/res/drawable/filtershow_color_picker_roundrect.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle" >
-
- <size android:width="20dp" android:height="20dp"/>
- <corners android:radius="10dp" />
- <solid android:color="@color/red"/>
-
-</shape>
-
diff --git a/res/drawable/filtershow_delpoint.png b/res/drawable/filtershow_delpoint.png
deleted file mode 100644
index 84f2e5b5d..000000000
--- a/res/drawable/filtershow_delpoint.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_drawing.png b/res/drawable/filtershow_drawing.png
deleted file mode 100644
index 566773dbe..000000000
--- a/res/drawable/filtershow_drawing.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0000_vintage.png b/res/drawable/filtershow_fx_0000_vintage.png
deleted file mode 100644
index 6783bb607..000000000
--- a/res/drawable/filtershow_fx_0000_vintage.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0001_instant.png b/res/drawable/filtershow_fx_0001_instant.png
deleted file mode 100644
index 1652a4b9f..000000000
--- a/res/drawable/filtershow_fx_0001_instant.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0002_bleach.png b/res/drawable/filtershow_fx_0002_bleach.png
deleted file mode 100644
index afb8a82bc..000000000
--- a/res/drawable/filtershow_fx_0002_bleach.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0003_blue_crush.png b/res/drawable/filtershow_fx_0003_blue_crush.png
deleted file mode 100644
index 2b238e3f8..000000000
--- a/res/drawable/filtershow_fx_0003_blue_crush.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0004_bw_contrast.png b/res/drawable/filtershow_fx_0004_bw_contrast.png
deleted file mode 100644
index 40eb397da..000000000
--- a/res/drawable/filtershow_fx_0004_bw_contrast.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0005_punch.png b/res/drawable/filtershow_fx_0005_punch.png
deleted file mode 100644
index e7e080379..000000000
--- a/res/drawable/filtershow_fx_0005_punch.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0006_x_process.png b/res/drawable/filtershow_fx_0006_x_process.png
deleted file mode 100644
index 5de9bb484..000000000
--- a/res/drawable/filtershow_fx_0006_x_process.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0007_washout.png b/res/drawable/filtershow_fx_0007_washout.png
deleted file mode 100644
index 20dfb5e06..000000000
--- a/res/drawable/filtershow_fx_0007_washout.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_fx_0008_washout_color.png b/res/drawable/filtershow_fx_0008_washout_color.png
deleted file mode 100644
index bb6602bda..000000000
--- a/res/drawable/filtershow_fx_0008_washout_color.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_grad_button.xml b/res/drawable/filtershow_grad_button.xml
deleted file mode 100644
index 4bf84c1e6..000000000
--- a/res/drawable/filtershow_grad_button.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_checked="false" android:drawable="@android:color/transparent" />
- <item android:state_checked="true" android:drawable="@android:color/holo_blue_light" />
-
-</selector> \ No newline at end of file
diff --git a/res/drawable/filtershow_menu_marker.png b/res/drawable/filtershow_menu_marker.png
deleted file mode 100644
index 1537a7169..000000000
--- a/res/drawable/filtershow_menu_marker.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_scrubber.xml b/res/drawable/filtershow_scrubber.xml
deleted file mode 100644
index 744d1dad2..000000000
--- a/res/drawable/filtershow_scrubber.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="false" android:drawable="@drawable/filtershow_scrubber_control_disabled" />
- <item android:state_pressed="true" android:drawable="@drawable/filtershow_scrubber_control_pressed" />
- <item android:state_selected="true" android:drawable="@drawable/filtershow_scrubber_control_focused" />
- <item android:drawable="@drawable/filtershow_scrubber_control_normal" />
-</selector> \ No newline at end of file
diff --git a/res/drawable/filtershow_slider.xml b/res/drawable/filtershow_slider.xml
deleted file mode 100644
index 23457a6ef..000000000
--- a/res/drawable/filtershow_slider.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@android:id/background"
- android:drawable="@drawable/filtershow_scrubber_track" />
- <item android:id="@android:id/secondaryProgress">
- <scale android:scaleWidth="100%"
- android:drawable="@drawable/filtershow_scrubber_secondary" />
- </item>
- <item android:id="@android:id/progress">
- <scale android:scaleWidth="100%"
- android:drawable="@drawable/filtershow_scrubber_primary" />
- </item>
-</layer-list> \ No newline at end of file
diff --git a/res/drawable/filtershow_state_button_background b/res/drawable/filtershow_state_button_background
deleted file mode 100644
index e69de29bb..000000000
--- a/res/drawable/filtershow_state_button_background
+++ /dev/null
diff --git a/res/drawable/filtershow_tiled_background.xml b/res/drawable/filtershow_tiled_background.xml
deleted file mode 100644
index 055fbcd63..000000000
--- a/res/drawable/filtershow_tiled_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<bitmap
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/filtershow_background"
- android:tileMode="repeat"
- android:dither="false" /> \ No newline at end of file
diff --git a/res/drawable/filtershow_vertical_bar.png b/res/drawable/filtershow_vertical_bar.png
deleted file mode 100644
index 5ac0a9f61..000000000
--- a/res/drawable/filtershow_vertical_bar.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/filtershow_vertical_line.xml b/res/drawable/filtershow_vertical_line.xml
deleted file mode 100644
index 611c7e03f..000000000
--- a/res/drawable/filtershow_vertical_line.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle" >
- <size android:width="1dp" android:height="20dp"/>
- <corners android:radius="0dp" />
- <solid android:color="@color/toolbar_separation_line"/>
-</shape> \ No newline at end of file
diff --git a/res/drawable/icn_media_pause.xml b/res/drawable/icn_media_pause.xml
deleted file mode 100644
index cb5014f50..000000000
--- a/res/drawable/icn_media_pause.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/icn_media_pause_pressed_holo_dark" />
- <item android:state_focused="true"
- android:drawable="@drawable/icn_media_pause_focused_holo_dark" />
- <item android:drawable="@drawable/icn_media_pause_normal_holo_dark" />
-</selector>
diff --git a/res/drawable/icn_media_play.xml b/res/drawable/icn_media_play.xml
deleted file mode 100644
index a21e0829b..000000000
--- a/res/drawable/icn_media_play.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/icn_media_play_pressed_holo_dark" />
- <item android:state_focused="true"
- android:drawable="@drawable/icn_media_play_focused_holo_dark" />
- <item android:drawable="@drawable/icn_media_play_normal_holo_dark" />
-</selector>
diff --git a/res/drawable/ingest_item_list_selector.xml b/res/drawable/ingest_item_list_selector.xml
deleted file mode 100644
index 1a4541f94..000000000
--- a/res/drawable/ingest_item_list_selector.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@color/ingest_highlight_semitransparent"
- android:state_checked="true" />
- <item android:drawable="@color/ingest_highlight_semitransparent"
- android:state_selected="true" />
- <item android:drawable="@color/ingest_highlight_semitransparent"
- android:state_pressed="true" />
-</selector> \ No newline at end of file
diff --git a/res/drawable/menu_save_photo.xml b/res/drawable/menu_save_photo.xml
deleted file mode 100644
index 0b92ac968..000000000
--- a/res/drawable/menu_save_photo.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="true" android:drawable="@drawable/ic_menu_savephoto" />
- <item android:state_enabled="false" android:drawable="@drawable/ic_menu_savephoto_disabled" />
-</selector>
diff --git a/res/drawable/photoeditor_effect_redeye.png b/res/drawable/photoeditor_effect_redeye.png
deleted file mode 100644
index ba845b5ee..000000000
--- a/res/drawable/photoeditor_effect_redeye.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/photopage_bottom_button_background.xml b/res/drawable/photopage_bottom_button_background.xml
deleted file mode 100644
index 0c772ad21..000000000
--- a/res/drawable/photopage_bottom_button_background.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@android:color/holo_blue_light" android:state_pressed="true"/>
- <item android:drawable="@color/button_dark_transparent_background" android:state_selected="false"/>
-</selector>
diff --git a/res/drawable/white_text_bg_gradient.xml b/res/drawable/white_text_bg_gradient.xml
deleted file mode 100644
index c355ce52f..000000000
--- a/res/drawable/white_text_bg_gradient.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <gradient
- android:startColor="#DD000000"
- android:endColor="#00FFFFFF"
- android:angle="90"
- />
-</shape> \ No newline at end of file
diff --git a/res/interpolator/decelerate_cubic.xml b/res/interpolator/decelerate_cubic.xml
deleted file mode 100644
index 0bdd01d41..000000000
--- a/res/interpolator/decelerate_cubic.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
- android:factor="1.5" />
diff --git a/res/interpolator/decelerate_quint.xml b/res/interpolator/decelerate_quint.xml
deleted file mode 100644
index 1939141b1..000000000
--- a/res/interpolator/decelerate_quint.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
- android:factor="2.5" />
diff --git a/res/layout-land/filtershow_activity.xml b/res/layout-land/filtershow_activity.xml
deleted file mode 100644
index 4d098e6f7..000000000
--- a/res/layout-land/filtershow_activity.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/mainView"
- android:background="@drawable/filtershow_tiled_background">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- android:animateLayoutChanges="true">
-
- <LinearLayout
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:orientation="horizontal">
-
- <FrameLayout
- android:id="@+id/editorContainer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- <com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" />
-
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/mainPanel"
- android:layout_width="350dip"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:animateLayoutChanges="true" >
-
- <FrameLayout android:id="@+id/main_panel_container"
- android:layout_width="350dip"
- android:layout_height="0dip"
- android:layout_weight="1" />
-
- <FrameLayout
- android:layout_gravity="bottom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="gone">
-
-
- <ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.Holo.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:background="@color/background_screen"/>
-
- </FrameLayout>
-
- </LinearLayout>
-
- </LinearLayout>
-
-</FrameLayout>
diff --git a/res/layout-land/filtershow_category_panel_new.xml b/res/layout-land/filtershow_category_panel_new.xml
deleted file mode 100644
index 10a6c97ba..000000000
--- a/res/layout-land/filtershow_category_panel_new.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ListView
- android:id="@+id/listItems"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="8dip"
- android:divider="@android:color/transparent"
- android:dividerHeight="8dip" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-land/filtershow_editor_panel.xml b/res/layout-land/filtershow_editor_panel.xml
deleted file mode 100644
index 015fa26a7..000000000
--- a/res/layout-land/filtershow_editor_panel.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:visibility="visible">
-
- <Button
- android:id="@+id/toggle_state"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/imageState"
- android:background="@color/background_main_toolbar"
- />
-
- <FrameLayout android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:visibility="visible"
- android:layout_gravity="top"
- android:layout_weight="1" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_gravity="bottom">
-
- <LinearLayout
- android:id="@+id/controlArea"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_alignParentBottom="true"
- android:visibility="visible">
-
- <SeekBar
- android:id="@+id/primarySeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- style="@style/FilterShowSlider"/>
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="56dip"
- android:background="@color/background_main_toolbar"
- android:orientation="horizontal"
- android:baselineAligned="false"
- android:visibility="visible">
-
- <ImageButton
- android:id="@+id/cancelFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left|center_vertical"
- android:background="@android:color/transparent"
- android:layout_weight=".1"
- android:gravity="center"
- android:src="@drawable/ic_menu_cancel_holo_light"
- android:textSize="18dip"/>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <LinearLayout
- android:id="@+id/panelAccessoryViewList"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:visibility="visible">
-
- <com.android.gallery3d.filtershow.editors.SwapButton
- android:id="@+id/applyEffect"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:text="@string/apply_effect"
- android:textSize="18dip"
- android:drawableRight="@drawable/filtershow_menu_marker"
- android:textAllCaps="true" />
-
- </LinearLayout>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <ImageButton
- android:id="@+id/applyFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:layout_weight=".1"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:src="@drawable/ic_menu_done_holo_light"
- android:textSize="18dip"/>
- </LinearLayout>
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout-land/filtershow_main_panel.xml b/res/layout-land/filtershow_main_panel.xml
deleted file mode 100644
index 705eb690b..000000000
--- a/res/layout-land/filtershow_main_panel.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:baselineAligned="false"
- android:orientation="vertical"
- android:animateLayoutChanges="true"
- android:visibility="visible" >
-
- <FrameLayout android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:visibility="visible"
- android:layout_gravity="top"
- android:layout_weight="1" />
-
- <FrameLayout android:id="@+id/category_panel_container"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"/>
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
-
- <com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:layout_gravity="center|bottom"
- custom:max_width="400dip"
- android:orientation="vertical">
-
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@color/background_main_toolbar">
-
- <ImageButton
- android:id="@+id/fxButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_effects"/>
-
- <ImageButton
- android:id="@+id/borderButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_border"/>
-
- <ImageButton
- android:id="@+id/geometryButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_fix"/>
-
- <ImageButton
- android:id="@+id/colorsButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_color"/>
-
- </LinearLayout>
-
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-land/filtershow_state_panel_new.xml b/res/layout-land/filtershow_state_panel_new.xml
deleted file mode 100644
index c83cd8833..000000000
--- a/res/layout-land/filtershow_state_panel_new.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- android:scrollbars="none">
-
- <com.android.gallery3d.filtershow.state.StatePanelTrack
- android:id="@+id/listStates"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- custom:elemSize="72dip"
- custom:elemEndSize="32dip"
- android:layout_margin="8dip"
- android:animateLayoutChanges="true" />
-
- </ScrollView>
-
- <View
- android:background="@color/state_panel_separation_line"
- android:layout_height="6dip"
- android:layout_width="match_parent"
- android:paddingTop="8dip"/>
-
-</LinearLayout>
diff --git a/res/layout/action_bar_text.xml b/res/layout/action_bar_text.xml
deleted file mode 100644
index a33264702..000000000
--- a/res/layout/action_bar_text.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/text1"
- android:background="?android:attr/activatedBackgroundIndicator"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center_vertical"
- android:paddingLeft="18dp"
- android:paddingRight="18dp"
- android:singleLine="true"
- android:minHeight="?attr/listPreferredItemHeightSmall"
-/>
diff --git a/res/layout/action_bar_two_line_text.xml b/res/layout/action_bar_two_line_text.xml
deleted file mode 100644
index 92a4af926..000000000
--- a/res/layout/action_bar_two_line_text.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/ActionBarTwoLineItem"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:gravity="center_vertical"
- android:duplicateParentState="false"
- android:layout_alignParentLeft="true"
- android:layout_width="wrap_content" >
- <TextView
- android:id="@android:id/text1"
- style="@style/ActionBarTwoLinePrimary"
- android:singleLine="true"
- android:ellipsize="end"
- android:includeFontPadding="false"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- <TextView
- android:id="@android:id/text2"
- style="@style/ActionBarTwoLineSecondary"
- android:singleLine="true"
- android:ellipsize="end"
- android:includeFontPadding="false"
- android:layout_marginRight="4dp"
- android:layout_below="@android:id/text1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-</TwoLineListItem>
diff --git a/res/layout/action_mode.xml b/res/layout/action_mode.xml
deleted file mode 100644
index 6c516e618..000000000
--- a/res/layout/action_mode.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/navigation_bar"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal">
-
- <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="match_parent">
- <ImageView android:layout_gravity="right"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:src="@drawable/dropdown_ic_arrow_normal_holo_dark" />
- <Button android:id="@+id/selection_menu"
- style="?android:attr/actionButtonStyle"
- android:divider="?android:attr/listDividerAlertDialog"
- android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
- android:textColor="?android:attr/actionMenuTextColor"
- android:singleLine="true"
- android:gravity="left|center_vertical"
- android:paddingRight="25dip"
- android:layout_width="wrap_content"
- android:layout_height="match_parent" />
- </FrameLayout>
- <ImageView android:layout_marginLeft="16dip"
- android:layout_marginRight="8dip"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="bottom"
- android:src="@drawable/cab_divider_vertical_dark" />
-</LinearLayout>
diff --git a/res/layout/album_content.xml b/res/layout/album_content.xml
deleted file mode 100644
index 97509fd3e..000000000
--- a/res/layout/album_content.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <LinearLayout android:id="@+id/progressContainer"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"
- android:gravity="center">
-
- <ProgressBar style="?android:attr/progressBarStyleLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:text="@string/loading"
- android:paddingTop="4dip"
- android:singleLine="true" />
-
- </LinearLayout>
-
- <FrameLayout android:id="@+id/gridContainer"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <com.android.photos.views.HeaderGridView android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:choiceMode="multipleChoiceModal"
- android:numColumns="auto_fit"
- android:stretchMode="columnWidth"
- android:drawSelectorOnTop="true" />
- <TextView android:id="@android:id/empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </FrameLayout>
-
-</FrameLayout> \ No newline at end of file
diff --git a/res/layout/album_header.xml b/res/layout/album_header.xml
deleted file mode 100644
index 76c9a457f..000000000
--- a/res/layout/album_header.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <ImageView
- android:id="@+id/album_header_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="centerCrop" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:paddingLeft="15dip"
- android:paddingBottom="10dip"
- android:paddingTop="20dip"
- android:background="@drawable/white_text_bg_gradient"
- android:layout_gravity="bottom"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/album_header_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@android:color/white"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <TextView
- android:id="@+id/album_header_subtitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@android:color/white"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- </LinearLayout>
-
-</FrameLayout> \ No newline at end of file
diff --git a/res/layout/album_set_item.xml b/res/layout/album_set_item.xml
deleted file mode 100644
index ad0e0db20..000000000
--- a/res/layout/album_set_item.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="?android:attr/activatedBackgroundIndicator"
- android:padding="2dp" >
-
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:padding="10dp"
- android:background="#FFF" >
-
- <TextView
- android:id="@+id/album_set_item_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <TextView
- android:id="@+id/album_set_item_count"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#AAA" />
- </LinearLayout>
-
- <ImageView
- android:id="@+id/album_set_item_image"
- android:layout_width="match_parent"
- android:layout_height="@dimen/album_set_item_image_height"
- android:scaleType="centerCrop" />
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/appwidget_loading_item.xml b/res/layout/appwidget_loading_item.xml
deleted file mode 100644
index ee8a2063a..000000000
--- a/res/layout/appwidget_loading_item.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/appwidget_photo_border">
- <RelativeLayout
- android:layout_width="@dimen/stack_photo_width"
- android:layout_height="@dimen/stack_photo_height"
- android:background="@android:color/darker_gray">
- <ProgressBar
- android:id="@+id/appwidget_loading_item"
- android:layout_centerInParent="true"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
- </RelativeLayout>
-</FrameLayout>
diff --git a/res/layout/appwidget_main.xml b/res/layout/appwidget_main.xml
deleted file mode 100644
index 0accabb50..000000000
--- a/res/layout/appwidget_main.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <RelativeLayout
- android:id="@+id/appwidget_empty_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone">
- <FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:background="@drawable/appwidget_photo_border">
- <TextView
- android:id="@+id/appwidget_photo_item"
- android:layout_width="@dimen/stack_photo_width"
- android:layout_height="@dimen/stack_photo_height"
- android:gravity="center"
- android:text="@string/appwidget_empty_text"/>
- </FrameLayout>
- </RelativeLayout>
- <StackView
- android:id="@+id/appwidget_stack_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:loopViews="true" />
-</FrameLayout>
diff --git a/res/layout/appwidget_photo_item.xml b/res/layout/appwidget_photo_item.xml
deleted file mode 100644
index a56a6d7a5..000000000
--- a/res/layout/appwidget_photo_item.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:background="@drawable/appwidget_photo_border">
- <ImageView
- android:id="@+id/appwidget_photo_item"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:scaleType="fitCenter"
- android:adjustViewBounds="true" />
-</FrameLayout>
diff --git a/res/layout/bg_replacement_training_message.xml b/res/layout/bg_replacement_training_message.xml
deleted file mode 100644
index 8d881d64e..000000000
--- a/res/layout/bg_replacement_training_message.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/bg_replace_message_frame"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:visibility="gone"
- android:onClick="onProtectiveCurtainClick"
- android:background="#77000000">
- <com.android.camera.ui.RotateLayout
- android:id="@+id/bg_replace_message"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_centerInParent="true">
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:orientation="vertical"
- android:background="@drawable/dialog_full_holo_dark">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/bg_replacement_message"
- android:padding="32dp" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1dp"
- android:background="#aaaaaa" />
-
- <Button android:layout_width="match_parent"
- android:layout_height="48dip"
- android:layout_gravity="center"
- android:textAppearance="?android:attr/textAppearanceMedium"
- style="?android:attr/borderlessButtonStyle"
- android:text="@android:string/cancel"
- android:onClick="onCancelBgTraining"
- android:contentDescription="@android:string/cancel" />
- </LinearLayout>
- </com.android.camera.ui.RotateLayout>
-</RelativeLayout>
diff --git a/res/layout/choose_widget_type.xml b/res/layout/choose_widget_type.xml
deleted file mode 100644
index 5f1739ad3..000000000
--- a/res/layout/choose_widget_type.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/widget_type"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <RadioButton android:id="@+id/widget_type_album"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:minHeight="48dp"
- android:text="@string/widget_type_album"/>
- <RadioButton android:id="@+id/widget_type_photo"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:minHeight="48dp"
- android:text="@string/widget_type_photo"/>
- <RadioButton android:id="@+id/widget_type_shuffle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:minHeight="48dp"
- android:text="@string/widget_type_shuffle"/>
- <View android:layout_width="match_parent"
- android:layout_height="1dp"
- android:layout_weight="0"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:background="?android:attr/dividerHorizontal" />
- <Button style="?android:attr/buttonBarButtonStyle"
- android:id="@+id/cancel"
- android:layout_weight="0"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@android:string/cancel" />
-</RadioGroup>
diff --git a/res/layout/crop_activity.xml b/res/layout/crop_activity.xml
deleted file mode 100644
index 9ff223f04..000000000
--- a/res/layout/crop_activity.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/mainView"
- android:background="@drawable/filtershow_tiled_background">
-
- <LinearLayout
- android:id="@+id/mainPanel"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <com.android.gallery3d.filtershow.crop.CropView
- android:id="@+id/cropView"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.Holo.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:background="@android:color/transparent" />
-
- </FrameLayout>
-
- </LinearLayout>
-
-</FrameLayout>
diff --git a/res/layout/cropimage.xml b/res/layout/cropimage.xml
deleted file mode 100644
index c434fb6a6..000000000
--- a/res/layout/cropimage.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <include layout="@layout/gl_root_group"/>
-</FrameLayout>
diff --git a/res/layout/details.xml b/res/layout/details.xml
deleted file mode 100644
index dfda0ee22..000000000
--- a/res/layout/details.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/text1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="left"
-/>
diff --git a/res/layout/details_list.xml b/res/layout/details_list.xml
deleted file mode 100644
index b80ab6ca8..000000000
--- a/res/layout/details_list.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<ListView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="16dp"
- android:dividerHeight="8dp"
-/>
diff --git a/res/layout/dialog_picker.xml b/res/layout/dialog_picker.xml
deleted file mode 100644
index ccc512154..000000000
--- a/res/layout/dialog_picker.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <FrameLayout
- android:layout_weight="1"
- android:layout_width="match_parent"
- android:layout_height="0dp">
- <include layout="@layout/gl_root_group" />
- </FrameLayout>
- <ImageView android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:background="@drawable/list_divider_holo_dark" />
- <Button style="?android:attr/buttonBarButtonStyle"
- android:id="@+id/cancel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@android:string/cancel"
- android:visibility="gone" />
-</LinearLayout>
diff --git a/res/layout/editor_grad_button.xml b/res/layout/editor_grad_button.xml
deleted file mode 100644
index 4d1b10b6b..000000000
--- a/res/layout/editor_grad_button.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_alignParentTop="true"
- android:layout_marginLeft="26dp"
- android:layout_marginTop="21dp"
- android:orientation="horizontal" >
-
- <com.android.gallery3d.filtershow.ui.FramedTextButton
- android:id="@+id/editorGradButton"
- android:layout_width="84dip"
- android:layout_height="84dip"
- android:layout_gravity="center_vertical|left"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:visibility="visible"
- android:text="@string/editor_grad_style" />
-
- <ToggleButton
- android:id="@+id/editor_grad_new"
- android:layout_width="84dip"
- android:layout_height="84dip"
- android:layout_gravity="center_vertical|left"
- android:background="@drawable/filtershow_grad_button"
- android:scaleType="centerInside"
- android:visibility="visible"
- android:textOff="@string/editor_grad_new"
- android:textOn="@string/editor_grad_new" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_actionbar.xml b/res/layout/filtershow_actionbar.xml
deleted file mode 100644
index 5f0aa3ff6..000000000
--- a/res/layout/filtershow_actionbar.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@drawable/filtershow_button_background"
- android:id="@+id/filtershow_done"
- android:textAllCaps="true"
- android:text="@string/save"
- android:gravity="center_vertical"
- android:textSize="14sp"
- android:drawableLeft="@drawable/menu_save_photo"
- android:drawablePadding="8dip" /> \ No newline at end of file
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml
deleted file mode 100644
index f5684ff8a..000000000
--- a/res/layout/filtershow_activity.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/mainView"
- android:background="@drawable/filtershow_tiled_background">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <LinearLayout
- android:layout_weight="1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <FrameLayout
- android:id="@+id/editorContainer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- <com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" />
-
- </LinearLayout>
-
- <com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/mainPanel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center|bottom"
- custom:max_width="650dip"
- android:orientation="vertical" >
-
- <FrameLayout android:id="@+id/main_panel_container"
- android:layout_gravity="center"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1" />
-
- <FrameLayout
- android:layout_gravity="bottom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="gone">
-
-
- <ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.Holo.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:background="@color/background_screen"/>
-
- </FrameLayout>
-
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
-
- </LinearLayout>
-
-</FrameLayout>
diff --git a/res/layout/filtershow_category_panel.xml b/res/layout/filtershow_category_panel.xml
deleted file mode 100644
index c1b8bbe35..000000000
--- a/res/layout/filtershow_category_panel.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:background="@color/background_main_toolbar" >
-
- <ImageButton
- android:id="@+id/fxButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_effects" />
-
- <ImageButton
- android:id="@+id/borderButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_border" />
-
- <ImageButton
- android:id="@+id/geometryButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_fix" />
-
- <ImageButton
- android:id="@+id/colorsButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_color" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_category_panel_new.xml b/res/layout/filtershow_category_panel_new.xml
deleted file mode 100644
index e98f29ea6..000000000
--- a/res/layout/filtershow_category_panel_new.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <HorizontalScrollView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scrollbars="none"
- android:background="@color/background_main_toolbar" >
-
- <com.android.gallery3d.filtershow.category.CategoryTrack
- android:id="@+id/listItems"
- android:layout_width="match_parent"
- android:layout_height="@dimen/category_panel_height"
- custom:iconSize="@dimen/category_panel_icon_size"
- android:divider="@android:color/transparent"
- android:dividerPadding="8dip"
- />
-
- </HorizontalScrollView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_color_gird.xml b/res/layout/filtershow_color_gird.xml
deleted file mode 100644
index 2dbbc5f05..000000000
--- a/res/layout/filtershow_color_gird.xml
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/textView1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <TableLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <TableRow
- android:id="@+id/tableRow1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <Button
- android:id="@+id/cp_grid_button01"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button2"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button03"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button04"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button05"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
- </TableRow>
-
- <TableRow
- android:id="@+id/tableRow2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
-
- <Button
- android:id="@+id/Button06"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button07"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button08"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button09"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button10"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
- </TableRow>
-
- <TableRow
- android:id="@+id/tableRow3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
-
- <Button
- android:id="@+id/Button11"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button12"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button13"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button14"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button15"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
- </TableRow>
-
- <TableRow
- android:id="@+id/tableRow4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
-
- <Button
- android:id="@+id/Button16"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button17"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button18"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button19"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
-
- <Button
- android:id="@+id/button20"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/filtershow_color_picker_circle" />
- </TableRow>
- </TableLayout>
-
- <Button
- android:id="@+id/filtershow_cp_custom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/color_pick_select" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_color_picker.xml b/res/layout/filtershow_color_picker.xml
deleted file mode 100644
index fc4972961..000000000
--- a/res/layout/filtershow_color_picker.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/RelativeLayout1"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/default_background"
- tools:context=".ColorPickerActivity" >
-
- <com.android.gallery3d.filtershow.colorpicker.ColorRectView
- android:id="@+id/colorRectView"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_marginLeft="10dp"
- android:layout_marginTop="10dp"
- android:layout_marginBottom="10dp"
- android:layout_marginRight="1dp"
- android:layout_above="@+id/colorOpacityView"
- android:layout_toLeftOf="@+id/colorValueView" />
-
- <com.android.gallery3d.filtershow.colorpicker.ColorValueView
- android:id="@+id/colorValueView"
- android:layout_width="90dp"
- android:layout_height="fill_parent"
- android:layout_alignParentRight = "true"
- android:layout_above="@+id/colorOpacityView" />
-
- <com.android.gallery3d.filtershow.colorpicker.ColorOpacityView
- android:id="@+id/colorOpacityView"
- android:layout_width="match_parent"
- android:layout_height="90dp"
- android:layout_above="@+id/btnSelect" />
-
- <Button
- android:id="@+id/btnSelect"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/color_pick_select"
- android:layout_alignParentBottom = "true"
- />
-
-</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_control_action_slider.xml b/res/layout/filtershow_control_action_slider.xml
deleted file mode 100644
index a3ef3ed5d..000000000
--- a/res/layout/filtershow_control_action_slider.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res/com.example.imagefilterharness"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal" >
-
- <ImageButton
- android:id="@+id/leftActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left|center_vertical"
- android:scaleType="centerInside"
- android:layout_weight="0"
- android:background="@drawable/filtershow_button_background"
- android:src="@drawable/filtershow_addpoint"
- android:paddingBottom="8dp" />
-
- <SeekBar
- android:id="@+id/controlValueSeekBar"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_weight="1"
- style="@style/FilterShowSlider" />
-
- <ImageButton
- android:id="@+id/rightActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left|center_vertical"
- android:scaleType="centerInside"
- android:layout_weight="0"
- android:background="@drawable/filtershow_button_background"
- android:src="@drawable/ic_menu_trash_holo_light"
- android:paddingBottom="8dp" />
-
-</LinearLayout>
-
diff --git a/res/layout/filtershow_control_style_chooser.xml b/res/layout/filtershow_control_style_chooser.xml
deleted file mode 100644
index a5bc984df..000000000
--- a/res/layout/filtershow_control_style_chooser.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res/com.example.imagefilterharness"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal" >
- <HorizontalScrollView
- android:id="@+id/scrollList"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scrollbars="none" >
-
- <LinearLayout
- android:id="@+id/listStyles"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:orientation="horizontal" >
- </LinearLayout>
- </HorizontalScrollView>
-</LinearLayout>
-
diff --git a/res/layout/filtershow_control_title_slider.xml b/res/layout/filtershow_control_title_slider.xml
deleted file mode 100644
index 584e015fa..000000000
--- a/res/layout/filtershow_control_title_slider.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:columnCount="2"
- android:orientation="horizontal" >
-
- <TextView
- android:id="@+id/controlName"
- android:layout_gravity="left"
- android:layout_marginLeft="8dip" />
-
- <TextView
- android:id="@+id/controlValue"
- android:layout_gravity="right"
- android:layout_marginRight="8dip"
- android:textStyle="bold" />
-
- <SeekBar
- android:id="@+id/controlValueSeekBar"
- android:layout_width="match_parent"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:layout_gravity="fill_horizontal"
- style="@style/FilterShowSlider" />
-</GridLayout>
-
diff --git a/res/layout/filtershow_cp_custom_title.xml b/res/layout/filtershow_cp_custom_title.xml
deleted file mode 100644
index cef8b6c05..000000000
--- a/res/layout/filtershow_cp_custom_title.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/customTitle"
- android:text="@string/color_pick_title"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_marginLeft="20dp"
- android:layout_marginRight="20dp" >
-</TextView> \ No newline at end of file
diff --git a/res/layout/filtershow_crop_button.xml b/res/layout/filtershow_crop_button.xml
deleted file mode 100644
index b42d6b656..000000000
--- a/res/layout/filtershow_crop_button.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<com.android.gallery3d.filtershow.ui.FramedTextButton
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/cropUtilityButton"
- android:layout_width="84dip"
- android:layout_height="84dip"
- android:layout_gravity="center_vertical|left"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:visibility="gone"
- android:text="@string/aspectNone_effect" /> \ No newline at end of file
diff --git a/res/layout/filtershow_curves_button.xml b/res/layout/filtershow_curves_button.xml
deleted file mode 100644
index 31e8aedca..000000000
--- a/res/layout/filtershow_curves_button.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<com.android.gallery3d.filtershow.ui.FramedTextButton
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/curvesUtilityButton"
- android:layout_width="84dip"
- android:layout_height="84dip"
- android:layout_gravity="center_vertical|left"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:visibility="gone"
- android:text="@string/curves_channel_rgb" />
diff --git a/res/layout/filtershow_default_editor.xml b/res/layout/filtershow_default_editor.xml
deleted file mode 100644
index b261ea35f..000000000
--- a/res/layout/filtershow_default_editor.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:iconbutton="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/basicEditor"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </FrameLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_draw_button.xml b/res/layout/filtershow_draw_button.xml
deleted file mode 100644
index dba8100ff..000000000
--- a/res/layout/filtershow_draw_button.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<com.android.gallery3d.filtershow.ui.FramedTextButton
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/drawUtilityButton"
- android:layout_width="84dip"
- android:layout_height="84dip"
- android:layout_gravity="center_vertical|left"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:visibility="gone"
- android:text="@string/draw_style" />
diff --git a/res/layout/filtershow_draw_size.xml b/res/layout/filtershow_draw_size.xml
deleted file mode 100644
index 068493eab..000000000
--- a/res/layout/filtershow_draw_size.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:dividerPadding="20dp"
- android:gravity="center_horizontal"
- android:orientation="vertical" >
-
- <SeekBar
- android:id="@+id/sizeSeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <Button
- android:id="@+id/sizeAcceptButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/draw_size_accept" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_editor_panel.xml b/res/layout/filtershow_editor_panel.xml
deleted file mode 100644
index a6da46a08..000000000
--- a/res/layout/filtershow_editor_panel.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:visibility="visible" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <LinearLayout
- android:id="@+id/controlArea"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_alignParentBottom="true"
- android:visibility="visible">
-
- <SeekBar
- android:id="@+id/primarySeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- style="@style/FilterShowSlider"/>
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="56dip"
- android:background="@color/background_main_toolbar"
- android:orientation="horizontal"
- android:baselineAligned="false"
- android:visibility="visible">
-
- <ImageButton
- android:id="@+id/cancelFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left|center_vertical"
- android:background="@android:color/transparent"
- android:layout_weight=".1"
- android:gravity="center"
- android:src="@drawable/ic_menu_cancel_holo_light"
- android:textSize="18dip"/>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <LinearLayout
- android:id="@+id/panelAccessoryViewList"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:visibility="visible">
-
- <com.android.gallery3d.filtershow.editors.SwapButton
- android:id="@+id/applyEffect"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:text="@string/apply_effect"
- android:textSize="18dip"
- android:drawableRight="@drawable/filtershow_menu_marker"
- android:textAllCaps="true" />
-
- </LinearLayout>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <ImageButton
- android:id="@+id/applyFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:layout_weight=".1"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:src="@drawable/ic_menu_done_holo_light"
- android:textSize="18dip"/>
- </LinearLayout>
-
- <FrameLayout android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible" />
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout/filtershow_export_dialog.xml b/res/layout/filtershow_export_dialog.xml
deleted file mode 100644
index 202107504..000000000
--- a/res/layout/filtershow_export_dialog.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:divider="?android:dividerVertical"
- android:showDividers="middle">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|center_vertical"
- android:layout_margin="7dp"
- android:text="@string/select_compression"/>
-
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <SeekBar
- android:id="@+id/qualitySeekBar"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="3"
- android:layout_margin="7dp"
- android:max="100"
- android:progress="100"/>
-
- <TextView
- android:id="@+id/qualityTextView"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginLeft="7dp"
- android:layout_gravity="center_vertical|center_horizontal"/>
-
- </LinearLayout>
-
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="48dp"
- style="?android:attr/buttonBarStyle">
-
- <Button
- android:id="@+id/cancel"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cancel"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button
- android:id="@+id/done"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/done"
- style="?android:attr/buttonBarButtonStyle"/>
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout/filtershow_grad_editor.xml b/res/layout/filtershow_grad_editor.xml
deleted file mode 100644
index 6c4721e62..000000000
--- a/res/layout/filtershow_grad_editor.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/gradEditor"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <com.android.gallery3d.filtershow.imageshow.ImageGrad
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </FrameLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_history_operation_row.xml b/res/layout/filtershow_history_operation_row.xml
deleted file mode 100644
index 25a0d26f6..000000000
--- a/res/layout/filtershow_history_operation_row.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="120dip"
- android:gravity="center_horizontal"
- android:orientation="horizontal"
- android:padding="0dip"
- android:background="@color/background_main_toolbar">
-
- <ImageView
- android:id="@+id/preview"
- android:layout_width="180dip"
- android:layout_height="120dip"
- android:scaleType="centerCrop"
- android:cropToPadding="true"
- android:visibility="visible"
- />
-
- <TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/rowTextView"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="bottom|right"
- android:padding="10dip"
- android:textSize="16dip"
- android:textStyle="bold">
- </TextView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_history_panel.xml b/res/layout/filtershow_history_panel.xml
deleted file mode 100644
index 392e39cbe..000000000
--- a/res/layout/filtershow_history_panel.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/historyPanel"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:layout_weight="1"
- android:visibility="gone" >
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:padding="2dip"
- android:text="@string/history"
- android:textColor="@android:color/white"
- android:textSize="24sp"
- android:textStyle="bold" />
-
- <ListView
- android:id="@+id/operationsList"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:padding="10dip"
- android:divider="@android:color/transparent"
- android:dividerHeight="10dip" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/resetOperationsButton"
- style="@style/FilterShowHistoryButton"
- android:gravity="center"
- android:text="@string/reset" />
-
- <Button
- android:id="@+id/saveOperationsButton"
- style="@style/FilterShowHistoryButton"
- android:text="@string/save"
- android:visibility="gone" />
- </LinearLayout>
-</LinearLayout>
diff --git a/res/layout/filtershow_main_panel.xml b/res/layout/filtershow_main_panel.xml
deleted file mode 100644
index 53691d319..000000000
--- a/res/layout/filtershow_main_panel.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:baselineAligned="false"
- android:orientation="vertical"
- android:animateLayoutChanges="false"
- android:visibility="visible"
- android:background="@color/background_main_toolbar" >
-
- <FrameLayout android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible"
- android:layout_gravity="top"
- android:layout_weight="1" />
-
- <FrameLayout android:id="@+id/category_panel_container"
- android:layout_width="wrap_content"
- android:visibility="visible"
- android:layout_height="0dip"
- android:layout_gravity="center"
- android:layout_weight="1"/>
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
-
- <com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/bottom_panel"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:layout_gravity="center|bottom"
- custom:max_width="400dip"
- android:orientation="vertical">
-
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@color/background_main_toolbar">
-
- <ImageButton
- android:id="@+id/fxButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_effects"/>
-
- <ImageButton
- android:id="@+id/borderButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_border"/>
-
- <ImageButton
- android:id="@+id/geometryButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_fix"/>
-
- <ImageButton
- android:id="@+id/colorsButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_color"/>
-
- </LinearLayout>
-
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_presets_management_dialog.xml b/res/layout/filtershow_presets_management_dialog.xml
deleted file mode 100644
index f6c6fb764..000000000
--- a/res/layout/filtershow_presets_management_dialog.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:divider="?android:dividerVertical"
- android:showDividers="middle">
-
- <ListView
- android:id="@+id/listItems"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="8dip"
- android:divider="@android:color/transparent"
- android:dividerHeight="8dip"/>
-
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="48dp"
- style="?android:attr/buttonBarStyle">
-
- <Button
- android:id="@+id/cancel"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/cancel"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button
- android:id="@+id/addpreset"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/filtershow_save_preset"
- style="?android:attr/buttonBarButtonStyle"/>
-
- <Button
- android:id="@+id/ok"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="@string/ok"
- style="?android:attr/buttonBarButtonStyle"/>
-
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_presets_management_row.xml b/res/layout/filtershow_presets_management_row.xml
deleted file mode 100644
index 648e8746b..000000000
--- a/res/layout/filtershow_presets_management_row.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ImageView
- android:id="@+id/imageView"
- android:layout_weight=".1"
- android:layout_width="80dip"
- android:layout_height="80dip"
- android:scaleType="fitCenter"
- android:layout_gravity="left|center_vertical"/>
-
- <EditText
- android:id="@+id/editView"
- android:gravity="center"
- android:textSize="18sp"
- android:layout_weight="1"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:focusable="true"
- android:imeOptions="actionDone"
- android:singleLine="true"/>
-
- <ImageButton
- android:id="@+id/deleteUserPreset"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_gravity="right|center_vertical"
- android:background="@android:color/transparent"
- android:layout_weight=".1"
- android:gravity="center"
- android:src="@drawable/ic_menu_trash_holo_light"/>
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_seekbar.xml b/res/layout/filtershow_seekbar.xml
deleted file mode 100644
index 6463ca8e1..000000000
--- a/res/layout/filtershow_seekbar.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:visibility="visible" >
-
- <SeekBar
- android:id="@+id/primarySeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/FilterShowSlider" />
-
-</LinearLayout>
diff --git a/res/layout/filtershow_state_panel.xml b/res/layout/filtershow_state_panel.xml
deleted file mode 100644
index 1f9f970b9..000000000
--- a/res/layout/filtershow_state_panel.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/imageStatePanel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_weight="1"
- android:visibility="visible" >
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:padding="2dip"
- android:text="@string/imageState"
- android:textColor="@android:color/white"
- android:textSize="24sp"
- android:textStyle="bold" />
-
- <ListView
- android:id="@+id/imageStateList"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
- </ListView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_state_panel_new.xml b/res/layout/filtershow_state_panel_new.xml
deleted file mode 100644
index d2d59abc8..000000000
--- a/res/layout/filtershow_state_panel_new.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/background_main_toolbar">
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
-
- <HorizontalScrollView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scrollbars="none">
-
- <com.android.gallery3d.filtershow.state.StatePanelTrack
- android:id="@+id/listStates"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- custom:elemEndSize="128dip"
- custom:elemSize="128dip"
- android:layout_margin="8dip"
- android:animateLayoutChanges="true" />
-
- </HorizontalScrollView>
-
-</LinearLayout>
diff --git a/res/layout/filtershow_tiny_planet_editor.xml b/res/layout/filtershow_tiny_planet_editor.xml
deleted file mode 100644
index fd89f9966..000000000
--- a/res/layout/filtershow_tiny_planet_editor.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:iconbutton="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/tinyPlanetEditor"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <com.android.gallery3d.filtershow.imageshow.ImageTinyPlanet
- android:id="@+id/imageTinyPlanet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </FrameLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_vignette_editor.xml b/res/layout/filtershow_vignette_editor.xml
deleted file mode 100644
index 9c9b4cb59..000000000
--- a/res/layout/filtershow_vignette_editor.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:iconbutton="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/vignetteEditor"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <com.android.gallery3d.filtershow.imageshow.ImageVignette
- android:id="@+id/imageVignette"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </FrameLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_zoom_editor.xml b/res/layout/filtershow_zoom_editor.xml
deleted file mode 100644
index 9813a283d..000000000
--- a/res/layout/filtershow_zoom_editor.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:iconbutton="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/basicEditor"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageZoom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </FrameLayout>
diff --git a/res/layout/gl_root_group.xml b/res/layout/gl_root_group.xml
deleted file mode 100644
index 76ff33b73..000000000
--- a/res/layout/gl_root_group.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <com.android.gallery3d.ui.GLRootView
- android:id="@+id/gl_root_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
- <View android:id="@+id/gl_root_cover"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/black"/>
-</merge>
diff --git a/res/layout/ingest_activity_item_list.xml b/res/layout/ingest_activity_item_list.xml
deleted file mode 100644
index f0e91e8e2..000000000
--- a/res/layout/ingest_activity_item_list.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <com.android.gallery3d.ingest.ui.IngestGridView
- android:id="@+id/ingest_gridview"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:columnWidth="120dip"
- android:numColumns="auto_fit"
- android:fastScrollEnabled="true"
- android:background="@android:color/background_dark"
- android:choiceMode="multipleChoiceModal"
- android:stretchMode="columnWidth" />
-
- <android.support.v4.view.ViewPager
- android:id="@+id/ingest_view_pager"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/background_dark"
- android:visibility="invisible" />
-
- <LinearLayout
- android:id="@+id/ingest_warning_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="20dip"
- android:gravity="center"
- android:orientation="horizontal"
- android:visibility="invisible" >
-
- <ImageView
- android:id="@+id/ingest_warning_view_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:src="@android:drawable/ic_dialog_alert" />
-
- <TextView
- android:id="@+id/ingest_warning_view_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:textAppearance="?android:attr/textAppearanceSmall" />
- </LinearLayout>
-</merge>
-
diff --git a/res/layout/ingest_date_tile.xml b/res/layout/ingest_date_tile.xml
deleted file mode 100644
index 6b5e93445..000000000
--- a/res/layout/ingest_date_tile.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.gallery3d.ingest.ui.DateTileView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/black" >
- <GridLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" >
- <TextView
- android:id="@+id/date_tile_month"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_column="0"
- android:layout_row="0"
- android:layout_gravity="bottom|right"
- android:layout_marginTop="7sp"
- android:includeFontPadding="false"
- android:textSize="16sp"
- android:textAllCaps="true"
- android:fontFamily="sans-serif"
- android:textColor="@color/ingest_date_tile_text" />
- <TextView
- android:id="@+id/date_tile_year"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_column="0"
- android:layout_row="1"
- android:layout_gravity="top|right"
- android:includeFontPadding="false"
- android:textSize="13sp"
- android:fontFamily="sans-serif-light"
- android:textColor="@color/ingest_date_tile_text" />
- <TextView
- android:id="@+id/date_tile_day"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_column="1"
- android:layout_row="0"
- android:layout_rowSpan="2"
- android:layout_gravity="top|left"
- android:layout_marginLeft="5sp"
- android:includeFontPadding="false"
- android:textSize="44sp"
- android:textStyle="bold"
- android:fontFamily="sans-serif"
- android:textColor="@color/ingest_date_tile_text" />
- </GridLayout>
-</com.android.gallery3d.ingest.ui.DateTileView> \ No newline at end of file
diff --git a/res/layout/ingest_fullsize.xml b/res/layout/ingest_fullsize.xml
deleted file mode 100644
index fad596c72..000000000
--- a/res/layout/ingest_fullsize.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.gallery3d.ingest.ui.MtpFullscreenView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <ProgressBar
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="true"
- android:progress="1"
- android:indeterminate="true"
- android:indeterminateOnly="true" />
-
- <com.android.gallery3d.ingest.ui.MtpImageView
- android:id="@+id/ingest_fullsize_image"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:scaleType="matrix" />
-
- <CheckBox
- android:id="@+id/ingest_fullsize_image_checkbox"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
- android:text="@string/Import" />
-
-</com.android.gallery3d.ingest.ui.MtpFullscreenView> \ No newline at end of file
diff --git a/res/layout/ingest_thumbnail.xml b/res/layout/ingest_thumbnail.xml
deleted file mode 100644
index 690714934..000000000
--- a/res/layout/ingest_thumbnail.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.gallery3d.ingest.ui.MtpThumbnailTileView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="centerCrop"
- android:background="@drawable/ingest_item_list_selector">
-</com.android.gallery3d.ingest.ui.MtpThumbnailTileView> \ No newline at end of file
diff --git a/res/layout/main.xml b/res/layout/main.xml
deleted file mode 100644
index 08e595959..000000000
--- a/res/layout/main.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/gallery_root"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <include layout="@layout/gl_root_group"/>
- <FrameLayout android:id="@+id/header"
- android:visibility="gone"
- android:layout_alignParentTop="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- <FrameLayout android:id="@+id/footer"
- android:visibility="gone"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
-</RelativeLayout>
diff --git a/res/layout/manage_offline_bar.xml b/res/layout/manage_offline_bar.xml
deleted file mode 100644
index 5c716133d..000000000
--- a/res/layout/manage_offline_bar.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="40dp">
- <TextView android:id="@+id/status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_centerHorizontal="true" />
- <ProgressBar android:id="@+id/progress"
- style="?android:attr/progressBarStyleHorizontal"
- android:max="100"
- android:progress="30"
- android:secondaryProgress="65"
- android:layout_marginTop="2dp"
- android:layout_marginBottom="2dp"
- android:layout_width="130dp"
- android:layout_height="4dp"
- android:layout_below="@id/status"
- android:layout_centerHorizontal="true"/>
- </RelativeLayout>
- <RelativeLayout android:layout_width="fill_parent"
- android:layout_height="@dimen/manage_cache_bottom_height"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:background="#1f1f1f">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/make_available_offline"
- android:textSize="14sp"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:gravity="center_vertical"
- android:drawableLeft="@drawable/ic_menu_make_offline"
- android:drawablePadding="3dp"/>
- <Button android:id="@+id/done"
- android:layout_width="74dp"
- android:layout_height="match_parent"
- android:text="@string/done"
- android:textSize="14sp"
- android:layout_alignParentRight="true"/>
- </RelativeLayout>
-</LinearLayout>
diff --git a/res/layout/movie_view.xml b/res/layout/movie_view.xml
deleted file mode 100644
index 75b8dfd4f..000000000
--- a/res/layout/movie_view.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/movie_view_root"
- android:background="@android:color/black"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <VideoView android:id="@+id/surface_view"
- android:visibility="invisible"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_centerInParent="true" />
-</RelativeLayout>
diff --git a/res/layout/multigrid_content.xml b/res/layout/multigrid_content.xml
deleted file mode 100644
index b1cb145a2..000000000
--- a/res/layout/multigrid_content.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <LinearLayout android:id="@+id/progressContainer"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"
- android:gravity="center">
-
- <ProgressBar style="?android:attr/progressBarStyleLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:text="@string/loading"
- android:paddingTop="4dip"
- android:singleLine="true" />
-
- </LinearLayout>
-
- <FrameLayout android:id="@+id/gridContainer"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <GridView android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:choiceMode="multipleChoiceModal"
- android:numColumns="auto_fit"
- android:stretchMode="columnWidth"
- android:drawSelectorOnTop="true" />
- <TextView android:id="@android:id/empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </FrameLayout>
-
-</FrameLayout> \ No newline at end of file
diff --git a/res/layout/photo_frame.xml b/res/layout/photo_frame.xml
deleted file mode 100755
index deadaebc1..000000000
--- a/res/layout/photo_frame.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingTop="4dp"
- android:paddingBottom="23dp"
- android:paddingLeft="12dp"
- android:paddingRight="12dp">
- <ImageView android:id="@+id/photo"
- android:layout_gravity="center"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:adjustViewBounds="true"
- android:scaleType="fitCenter"
- android:cropToPadding="true"
- android:background="@drawable/border_photo_frame_widget"/>
-</FrameLayout>
diff --git a/res/layout/photo_set_item.xml b/res/layout/photo_set_item.xml
deleted file mode 100644
index 0f740fad9..000000000
--- a/res/layout/photo_set_item.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="?android:attr/activatedBackgroundIndicator"
- android:padding="2dip">
-
- <com.android.photos.views.SquareImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/thumbnail" />
-
-</FrameLayout> \ No newline at end of file
diff --git a/res/layout/photopage_bottom_controls.xml b/res/layout/photopage_bottom_controls.xml
deleted file mode 100644
index f3226e68c..000000000
--- a/res/layout/photopage_bottom_controls.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/photopage_bottom_controls"
- android:padding="10dp"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:orientation="horizontal"
- android:visibility="gone">
- <ImageButton
- android:id="@+id/photopage_bottom_control_edit"
- android:src="@drawable/ic_menu_edit_holo_dark"
- android:background="@drawable/photopage_bottom_button_background"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:paddingLeft="15dp"
- android:paddingRight="15dp"
- android:visibility="gone"/>
- <ImageButton
- android:id="@+id/photopage_bottom_control_panorama"
- android:src="@drawable/ic_view_photosphere"
- android:background="@drawable/transparent_button_background"
- android:layout_width="70dp"
- android:layout_height="70dp"
- android:layout_centerHorizontal="true"
- android:layout_alignParentBottom="true"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:paddingLeft="5dp"
- android:paddingRight="5dp"
- android:visibility="gone"/>
- <ImageButton
- android:id="@+id/photopage_bottom_control_tiny_planet"
- android:src="@drawable/ic_menu_tiny_planet"
- android:background="@drawable/photopage_bottom_button_background"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:paddingLeft="15dp"
- android:paddingRight="15dp"
- android:visibility="gone"/>
-</RelativeLayout>
diff --git a/res/layout/photopage_progress_bar.xml b/res/layout/photopage_progress_bar.xml
deleted file mode 100644
index 778feb365..000000000
--- a/res/layout/photopage_progress_bar.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/photopage_progress_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:padding="25dp"
- android:visibility="invisible">
- <View
- android:id="@+id/photopage_progress_background"
- android:background="#ff000000"
- android:layout_width="match_parent"
- android:layout_height="8dp"
- android:layout_alignParentBottom="true"
- android:visibility="visible"/>
- <View
- android:id="@+id/photopage_progress_foreground"
- android:background="#ff33b5e5"
- android:layout_width="10dp"
- android:layout_height="8dp"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
- android:visibility="visible"/>
- <TextView
- android:id="@+id/photopage_progress_bar_text"
- android:text="@string/pano_progress_text"
- android:textColor="#ffffffff"
- android:textSize="14dp"
- android:shadowColor="#ff000000"
- android:shadowDx="0"
- android:shadowDy="0"
- android:shadowRadius="2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_above="@id/photopage_progress_background"
- android:paddingBottom="8dp"
- android:visibility="visible"/>
-</RelativeLayout>
diff --git a/res/layout/popup_list_item.xml b/res/layout/popup_list_item.xml
deleted file mode 100644
index 5a87af7cc..000000000
--- a/res/layout/popup_list_item.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/text1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
- android:singleLine="true"
- android:gravity="center_vertical"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:minWidth="196dp"
-/>
diff --git a/res/layout/trim_menu.xml b/res/layout/trim_menu.xml
deleted file mode 100644
index e2333921a..000000000
--- a/res/layout/trim_menu.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_centerVertical="true">
- <TextView
- android:id="@+id/start_trim"
- android:layout_marginLeft="8dp"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="@string/save"
- android:textAllCaps="true"
- android:textSize="14sp"
- android:gravity="left|center_vertical"
- android:drawableLeft="@drawable/menu_save_photo"
- android:drawablePadding="8dp" />
-</FrameLayout>
diff --git a/res/layout/trim_view.xml b/res/layout/trim_view.xml
deleted file mode 100644
index c95c719c1..000000000
--- a/res/layout/trim_view.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/trim_view_root"
- android:background="@android:color/black"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <VideoView android:id="@+id/surface_view"
- android:visibility="visible"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_centerInParent="true" />
-</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/undo_bar.xml b/res/layout/undo_bar.xml
deleted file mode 100644
index 33ec91d85..000000000
--- a/res/layout/undo_bar.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!-- This layout is shared by phone and tablet in portrait or landscape orientation. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- style="@style/UndoBar">
- <TextView android:text="@string/deleted"
- style="@style/UndoBarTextAppearance"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="left|center_vertical" />
- <View style="@style/UndoBarSeparator" />
- <TextView android:id="@+id/undo_button"
- style="@style/UndoButton"
- android:text="@string/undo"
- android:drawableLeft="@drawable/ic_menu_revert_holo_dark"/>
-</LinearLayout>
diff --git a/res/menu/album.xml b/res/menu/album.xml
deleted file mode 100644
index 4db0e5100..000000000
--- a/res/menu/album.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/action_camera"
- android:icon="@drawable/ic_menu_camera_holo_light"
- android:title="@string/switch_to_camera"
- android:showAsAction="ifRoom" />
- <item android:id="@+id/action_slideshow"
- android:icon="@drawable/ic_menu_slideshow_holo_light"
- android:title="@string/slideshow"
- android:showAsAction="never" />
- <item android:id="@+id/action_select"
- android:title="@string/select_item"
- android:showAsAction="never" />
- <item android:id="@+id/action_group_by"
- android:title="@string/group_by"
- android:showAsAction="never"/>
-</menu>
diff --git a/res/menu/albumset.xml b/res/menu/albumset.xml
deleted file mode 100644
index 8ac8cbbd2..000000000
--- a/res/menu/albumset.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/action_camera"
- android:icon="@drawable/ic_menu_camera_holo_light"
- android:title="@string/switch_to_camera"
- android:showAsAction="ifRoom" />
- <item android:id="@+id/action_select"
- android:title="@string/select_album"
- android:showAsAction="never" />
- <item android:id="@+id/action_manage_offline"
- android:title="@string/make_available_offline"
- android:showAsAction="never" />
- <item android:id="@+id/action_sync_picasa_albums"
- android:title="@string/sync_picasa_albums"
- android:showAsAction="never" />
- <item android:id="@+id/action_settings"
- android:title="@string/settings"
- android:showAsAction="never" />
- <item android:id="@+id/action_general_help"
- android:title="@string/help"
- android:visible="false"
- android:showAsAction="never" />
-</menu>
diff --git a/res/menu/crop.xml b/res/menu/crop.xml
deleted file mode 100644
index aa0e03540..000000000
--- a/res/menu/crop.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/cancel"
- android:title="@android:string/cancel"
- android:showAsAction="always|withText">
- </item>
- <item android:id="@+id/save"
- android:title="@string/crop_save_text"
- android:showAsAction="always|withText">
- </item>
-</menu>
diff --git a/res/menu/filterby.xml b/res/menu/filterby.xml
deleted file mode 100644
index 3a72c57b2..000000000
--- a/res/menu/filterby.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/action_filter_all"
- android:title="@string/show_all" />
- <item android:id="@+id/action_filter_image"
- android:title="@string/show_images_only" />
- <item android:id="@+id/action_filter_video"
- android:title="@string/show_videos_only" />
-</menu>
diff --git a/res/menu/filtershow_activity_menu.xml b/res/menu/filtershow_activity_menu.xml
deleted file mode 100644
index 09c6ffe57..000000000
--- a/res/menu/filtershow_activity_menu.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item
- android:id="@+id/menu_share"
- android:actionProviderClass="android.widget.ShareActionProvider"
- android:showAsAction="never"
- android:enabled="false"
- android:visible="false"
- android:title="@string/share"/>
- <item
- android:id="@+id/undoButton"
- android:icon="@drawable/filtershow_button_undo"
- android:showAsAction="always"
- android:title="@string/filtershow_undo"/>
- <item
- android:id="@+id/redoButton"
- android:icon="@drawable/filtershow_button_redo"
- android:showAsAction="always"
- android:title="@string/filtershow_redo"/>
- <item
- android:id="@+id/resetHistoryButton"
- android:title="@string/reset"/>
- <item
- android:id="@+id/showImageStateButton"
- android:showAsAction="never"
- android:visible="true"
- android:title="@string/show_imagestate_panel" />
- <item
- android:id="@+id/manageUserPresets"
- android:showAsAction="never"
- android:visible="true"
- android:title="@string/filtershow_manage_preset" />
- <item
- android:id="@+id/exportFlattenButton"
- android:showAsAction="never"
- android:visible="true"
- android:title="@string/export_flattened" />
-</menu>
diff --git a/res/menu/filtershow_menu_chan_sat.xml b/res/menu/filtershow_menu_chan_sat.xml
deleted file mode 100644
index eae559d41..000000000
--- a/res/menu/filtershow_menu_chan_sat.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <group android:id="@+id/grunge_popupmenu" >
- <item
- android:id="@+id/editor_chan_sat_main"
- android:title="@string/editor_chan_sat_main"/>
- <item
- android:id="@+id/editor_chan_sat_red"
- android:title="@string/editor_chan_sat_red"/>
- <item
- android:id="@+id/editor_chan_sat_yellow"
- android:title="@string/editor_chan_sat_yellow"/>
- <item
- android:id="@+id/editor_chan_sat_green"
- android:title="@string/editor_chan_sat_green"/>
- <item
- android:id="@+id/editor_chan_sat_cyan"
- android:title="@string/editor_chan_sat_cyan"/>
- <item
- android:id="@+id/editor_chan_sat_blue"
- android:title="@string/editor_chan_sat_blue"/>
- <item
- android:id="@+id/editor_chan_sat_magenta"
- android:title="@string/editor_chan_sat_magenta"/>
- </group>
-
-</menu> \ No newline at end of file
diff --git a/res/menu/filtershow_menu_crop.xml b/res/menu/filtershow_menu_crop.xml
deleted file mode 100644
index f8ba3df42..000000000
--- a/res/menu/filtershow_menu_crop.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <group android:id="@+id/crop_popupmenu" >
- <item
- android:id="@+id/crop_menu_1to1"
- android:title="@string/aspect1to1_effect"/>
- <item
- android:id="@+id/crop_menu_4to6"
- android:visible="false"
- android:title="@string/aspect4to6_effect"/>
- <item
- android:id="@+id/crop_menu_4to3"
- android:title="@string/aspect4to3_effect"/>
- <item
- android:id="@+id/crop_menu_3to4"
- android:title="@string/aspect3to4_effect"/>
- <item
- android:id="@+id/crop_menu_5to7"
- android:title="@string/aspect5to7_effect"/>
- <item
- android:id="@+id/crop_menu_7to5"
- android:title="@string/aspect7to5_effect"/>
- <item
- android:id="@+id/crop_menu_9to16"
- android:visible="false"
- android:title="@string/aspect9to16_effect"/>
- <item
- android:id="@+id/crop_menu_none"
- android:title="@string/aspectNone_effect"/>
- <item
- android:id="@+id/crop_menu_original"
- android:title="@string/aspectOriginal_effect"/>
- </group>
-
-</menu>
diff --git a/res/menu/filtershow_menu_curves.xml b/res/menu/filtershow_menu_curves.xml
deleted file mode 100644
index 326df4521..000000000
--- a/res/menu/filtershow_menu_curves.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <group android:id="@+id/curves_popupmenu" >
- <item
- android:id="@+id/curve_menu_rgb"
- android:title="@string/curves_channel_rgb"/>
- <item
- android:id="@+id/curve_menu_red"
- android:title="@string/curves_channel_red"/>
- <item
- android:id="@+id/curve_menu_green"
- android:title="@string/curves_channel_green"/>
- <item
- android:id="@+id/curve_menu_blue"
- android:title="@string/curves_channel_blue"/>
- </group>
-
-</menu> \ No newline at end of file
diff --git a/res/menu/filtershow_menu_draw.xml b/res/menu/filtershow_menu_draw.xml
deleted file mode 100644
index 2960c1f05..000000000
--- a/res/menu/filtershow_menu_draw.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->