gametel 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/features/main_screen.feature +1 -1
- data/features/step_definitions/button_steps.rb +1 -1
- data/features/step_definitions/main_screen_steps.rb +1 -2
- data/features/support/env.rb +24 -1
- data/features/text.feature +0 -12
- data/features/view.feature +0 -1
- data/lib/gametel.rb +3 -4
- data/lib/gametel/accessors.rb +0 -1
- data/lib/gametel/platforms/brazenhead/basic.rb +17 -0
- data/lib/gametel/platforms/brazenhead/spinner.rb +17 -0
- data/lib/gametel/platforms/brazenhead/text.rb +39 -0
- data/lib/gametel/platforms/brazenhead/view.rb +24 -0
- data/lib/gametel/platforms/brazenhead_platform.rb +139 -0
- data/lib/gametel/version.rb +1 -1
- data/spec/lib/gametel/accessors_spec.rb +46 -31
- data/spec/lib/gametel_spec.rb +30 -12
- data/spec/spec_helper.rb +4 -2
- metadata +32 -897
- data/.calabash_settings +0 -1
- data/.gitignore +0 -26
- data/.irbrc +0 -16
- data/.rspec +0 -2
- data/.rvmrc +0 -1
- data/.travis.yml +0 -5
- data/ApiDemos/.classpath +0 -8
- data/ApiDemos/.project +0 -33
- data/ApiDemos/.settings/org.eclipse.jdt.core.prefs +0 -4
- data/ApiDemos/AndroidManifest.xml +0 -2715
- data/ApiDemos/README.txt +0 -19
- data/ApiDemos/assets/HelloActivity.apk +0 -0
- data/ApiDemos/assets/fonts/samplefont.ttf +0 -0
- data/ApiDemos/assets/read_asset.txt +0 -3
- data/ApiDemos/build.xml +0 -83
- data/ApiDemos/proguard-project.txt +0 -20
- data/ApiDemos/project.properties +0 -14
- data/ApiDemos/res/anim/animator.xml +0 -23
- data/ApiDemos/res/anim/animator_set.xml +0 -32
- data/ApiDemos/res/anim/color_animator.xml +0 -23
- data/ApiDemos/res/anim/cycle_7.xml +0 -17
- data/ApiDemos/res/anim/fade.xml +0 -20
- data/ApiDemos/res/anim/hold.xml +0 -20
- data/ApiDemos/res/anim/hyperspace_in.xml +0 -17
- data/ApiDemos/res/anim/hyperspace_out.xml +0 -61
- data/ApiDemos/res/anim/layout_animation_row_left_slide.xml +0 -19
- data/ApiDemos/res/anim/layout_animation_row_right_slide.xml +0 -20
- data/ApiDemos/res/anim/layout_animation_table.xml +0 -19
- data/ApiDemos/res/anim/layout_bottom_to_top_slide.xml +0 -20
- data/ApiDemos/res/anim/layout_grid_fade.xml +0 -20
- data/ApiDemos/res/anim/layout_grid_inverse_fade.xml +0 -21
- data/ApiDemos/res/anim/layout_random_fade.xml +0 -20
- data/ApiDemos/res/anim/layout_wave_scale.xml +0 -21
- data/ApiDemos/res/anim/object_animator.xml +0 -23
- data/ApiDemos/res/anim/push_left_in.xml +0 -20
- data/ApiDemos/res/anim/push_left_out.xml +0 -20
- data/ApiDemos/res/anim/push_up_in.xml +0 -20
- data/ApiDemos/res/anim/push_up_out.xml +0 -20
- data/ApiDemos/res/anim/shake.xml +0 -17
- data/ApiDemos/res/anim/slide_left.xml +0 -20
- data/ApiDemos/res/anim/slide_right.xml +0 -20
- data/ApiDemos/res/anim/slide_top_to_bottom.xml +0 -20
- data/ApiDemos/res/anim/wave_scale.xml +0 -33
- data/ApiDemos/res/anim/zoom_enter.xml +0 -28
- data/ApiDemos/res/anim/zoom_exit.xml +0 -33
- data/ApiDemos/res/animator/fragment_slide_left_enter.xml +0 -32
- data/ApiDemos/res/animator/fragment_slide_left_exit.xml +0 -32
- data/ApiDemos/res/animator/fragment_slide_right_enter.xml +0 -32
- data/ApiDemos/res/animator/fragment_slide_right_exit.xml +0 -32
- data/ApiDemos/res/drawable-hdpi/alert_dialog_icon.png +0 -0
- data/ApiDemos/res/drawable-hdpi/apidemo_androidlogo.png +0 -0
- data/ApiDemos/res/drawable-hdpi/app_sample_code.png +0 -0
- data/ApiDemos/res/drawable-hdpi/arrow_down_float.png +0 -0
- data/ApiDemos/res/drawable-hdpi/arrow_up_float.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_check_off.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_check_on.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_circle_normal.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_default_normal.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/button.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/ic_contact_picture.png +0 -0
- data/ApiDemos/res/drawable-hdpi/ic_launcher_settings.png +0 -0
- data/ApiDemos/res/drawable-hdpi/ic_popup_reminder.png +0 -0
- data/ApiDemos/res/drawable-hdpi/icon48x48_2.png +0 -0
- data/ApiDemos/res/drawable-hdpi/logo240dpi.png +0 -0
- data/ApiDemos/res/drawable-hdpi/npatch240dpi.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/progress_circular_background.png +0 -0
- data/ApiDemos/res/drawable-hdpi/progress_particle.png +0 -0
- data/ApiDemos/res/drawable-hdpi/reslogo240dpi.png +0 -0
- data/ApiDemos/res/drawable-hdpi/scrollbar_state2.png +0 -0
- data/ApiDemos/res/drawable-hdpi/smlnpatch240dpi.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/star_big_on.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_happy.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_neutral.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_sad.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_sample.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stylogo240dpi.png +0 -0
- data/ApiDemos/res/drawable-ldpi/logo120dpi.png +0 -0
- data/ApiDemos/res/drawable-ldpi/npatch120dpi.9.png +0 -0
- data/ApiDemos/res/drawable-ldpi/reslogo120dpi.png +0 -0
- data/ApiDemos/res/drawable-ldpi/smlnpatch120dpi.9.png +0 -0
- data/ApiDemos/res/drawable-ldpi/stylogo120dpi.png +0 -0
- data/ApiDemos/res/drawable-mdpi/alert_dialog_icon.png +0 -0
- data/ApiDemos/res/drawable-mdpi/apidemo_androidlogo.png +0 -0
- data/ApiDemos/res/drawable-mdpi/app_sample_code.png +0 -0
- data/ApiDemos/res/drawable-mdpi/arrow_down_float.png +0 -0
- data/ApiDemos/res/drawable-mdpi/arrow_up_float.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_check_off.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_check_on.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_circle_normal.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_default_normal.9.png +0 -0
- data/ApiDemos/res/drawable-mdpi/button.9.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_contact_picture.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_launcher_settings.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_popup_reminder.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_settings_applications.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_settings_display.png +0 -0
- data/ApiDemos/res/drawable-mdpi/icon48x48_2.png +0 -0
- data/ApiDemos/res/drawable-mdpi/progress_circular_background.png +0 -0
- data/ApiDemos/res/drawable-mdpi/progress_particle.png +0 -0
- data/ApiDemos/res/drawable-mdpi/scrollbar_state2.png +0 -0
- data/ApiDemos/res/drawable-mdpi/star_big_on.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_happy.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_neutral.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_sad.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_sample.png +0 -0
- data/ApiDemos/res/drawable-nodpi/frantic.jpg +0 -0
- data/ApiDemos/res/drawable-nodpi/logonodpi120.png +0 -0
- data/ApiDemos/res/drawable-nodpi/logonodpi160.png +0 -0
- data/ApiDemos/res/drawable-nodpi/logonodpi240.png +0 -0
- data/ApiDemos/res/drawable-xhdpi/ic_launcher_settings.png +0 -0
- data/ApiDemos/res/drawable/animated_gif.gif +0 -0
- data/ApiDemos/res/drawable/balloons.jpg +0 -0
- data/ApiDemos/res/drawable/beach.jpg +0 -0
- data/ApiDemos/res/drawable/black_box.xml +0 -21
- data/ApiDemos/res/drawable/black_opaque_box.xml +0 -21
- data/ApiDemos/res/drawable/box.xml +0 -24
- data/ApiDemos/res/drawable/circular_progress.xml +0 -29
- data/ApiDemos/res/drawable/filled_box.xml +0 -25
- data/ApiDemos/res/drawable/frog.gif +0 -0
- data/ApiDemos/res/drawable/gallery_background_1.xml +0 -20
- data/ApiDemos/res/drawable/gallery_photo_1.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_2.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_3.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_4.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_5.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_6.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_7.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_8.jpg +0 -0
- data/ApiDemos/res/drawable/hover_background.xml +0 -20
- data/ApiDemos/res/drawable/hover_background_active.xml +0 -23
- data/ApiDemos/res/drawable/hover_background_inactive.xml +0 -23
- data/ApiDemos/res/drawable/icon48x48_1.png +0 -0
- data/ApiDemos/res/drawable/line.xml +0 -21
- data/ApiDemos/res/drawable/logo160dpi.png +0 -0
- data/ApiDemos/res/drawable/magnifying_glass.png +0 -0
- data/ApiDemos/res/drawable/npatch160dpi.9.png +0 -0
- data/ApiDemos/res/drawable/photo1.jpg +0 -0
- data/ApiDemos/res/drawable/photo2.jpg +0 -0
- data/ApiDemos/res/drawable/photo3.jpg +0 -0
- data/ApiDemos/res/drawable/photo4.jpg +0 -0
- data/ApiDemos/res/drawable/photo5.jpg +0 -0
- data/ApiDemos/res/drawable/photo6.jpg +0 -0
- data/ApiDemos/res/drawable/picture_frame.png +0 -0
- data/ApiDemos/res/drawable/reslogo160dpi.png +0 -0
- data/ApiDemos/res/drawable/sample_0.jpg +0 -0
- data/ApiDemos/res/drawable/sample_1.jpg +0 -0
- data/ApiDemos/res/drawable/sample_2.jpg +0 -0
- data/ApiDemos/res/drawable/sample_3.jpg +0 -0
- data/ApiDemos/res/drawable/sample_4.jpg +0 -0
- data/ApiDemos/res/drawable/sample_5.jpg +0 -0
- data/ApiDemos/res/drawable/sample_6.jpg +0 -0
- data/ApiDemos/res/drawable/sample_7.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_0.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_1.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_2.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_3.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_4.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_5.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_6.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_7.jpg +0 -0
- data/ApiDemos/res/drawable/scrollbar_vertical_thumb.xml +0 -21
- data/ApiDemos/res/drawable/scrollbar_vertical_track.xml +0 -21
- data/ApiDemos/res/drawable/shape_1.xml +0 -22
- data/ApiDemos/res/drawable/shape_2.xml +0 -24
- data/ApiDemos/res/drawable/shape_3.xml +0 -24
- data/ApiDemos/res/drawable/shape_4.xml +0 -20
- data/ApiDemos/res/drawable/shape_5.xml +0 -23
- data/ApiDemos/res/drawable/smlnpatch160dpi.9.png +0 -0
- data/ApiDemos/res/drawable/stylogo160dpi.png +0 -0
- data/ApiDemos/res/layout-h550dp/resources_height.xml +0 -53
- data/ApiDemos/res/layout-h670dp/resources_height.xml +0 -63
- data/ApiDemos/res/layout-h974dp/resources_height.xml +0 -83
- data/ApiDemos/res/layout-land/fragment_arguments.xml +0 -57
- data/ApiDemos/res/layout-land/fragment_layout.xml +0 -34
- data/ApiDemos/res/layout-sw480dp/resources_smallest_width_inner.xml +0 -43
- data/ApiDemos/res/layout-sw480dp/resources_smallest_width_row.xml +0 -43
- data/ApiDemos/res/layout-sw600dp/resources_smallest_width_inner.xml +0 -53
- data/ApiDemos/res/layout-sw600dp/resources_smallest_width_row.xml +0 -53
- data/ApiDemos/res/layout-sw720dp/resources_smallest_width_inner.xml +0 -63
- data/ApiDemos/res/layout-sw720dp/resources_smallest_width_row.xml +0 -63
- data/ApiDemos/res/layout-w1024dp/resources_width.xml +0 -83
- data/ApiDemos/res/layout-w600dp/resources_width.xml +0 -53
- data/ApiDemos/res/layout-w720dp/resources_width.xml +0 -63
- data/ApiDemos/res/layout/accessibility_service.xml +0 -36
- data/ApiDemos/res/layout/action_bar_display_options.xml +0 -48
- data/ApiDemos/res/layout/action_bar_display_options_custom.xml +0 -17
- data/ApiDemos/res/layout/action_bar_settings_action_provider.xml +0 -34
- data/ApiDemos/res/layout/action_bar_tab_content.xml +0 -19
- data/ApiDemos/res/layout/action_bar_tabs.xml +0 -49
- data/ApiDemos/res/layout/activity_animation.xml +0 -42
- data/ApiDemos/res/layout/activity_recreate.xml +0 -37
- data/ApiDemos/res/layout/alarm_controller.xml +0 -45
- data/ApiDemos/res/layout/alarm_service.xml +0 -41
- data/ApiDemos/res/layout/alert_dialog.xml +0 -60
- data/ApiDemos/res/layout/alert_dialog_text_entry.xml +0 -67
- data/ApiDemos/res/layout/animation_1.xml +0 -44
- data/ApiDemos/res/layout/animation_2.xml +0 -67
- data/ApiDemos/res/layout/animation_3.xml +0 -44
- data/ApiDemos/res/layout/animation_cloning.xml +0 -28
- data/ApiDemos/res/layout/animation_custom_evaluator.xml +0 -28
- data/ApiDemos/res/layout/animation_loading.xml +0 -28
- data/ApiDemos/res/layout/animation_multi_property.xml +0 -28
- data/ApiDemos/res/layout/animation_reversing.xml +0 -40
- data/ApiDemos/res/layout/animation_seeking.xml +0 -40
- data/ApiDemos/res/layout/animations_main_screen.xml +0 -36
- data/ApiDemos/res/layout/animator_custom_evaluator.xml +0 -34
- data/ApiDemos/res/layout/animator_events.xml +0 -122
- data/ApiDemos/res/layout/appwidget_configure.xml +0 -42
- data/ApiDemos/res/layout/appwidget_provider.xml +0 -24
- data/ApiDemos/res/layout/autocomplete_1.xml +0 -48
- data/ApiDemos/res/layout/autocomplete_2.xml +0 -44
- data/ApiDemos/res/layout/autocomplete_3.xml +0 -165
- data/ApiDemos/res/layout/autocomplete_4.xml +0 -49
- data/ApiDemos/res/layout/autocomplete_5.xml +0 -45
- data/ApiDemos/res/layout/autocomplete_6.xml +0 -48
- data/ApiDemos/res/layout/baseline_1.xml +0 -40
- data/ApiDemos/res/layout/baseline_2.xml +0 -43
- data/ApiDemos/res/layout/baseline_3.xml +0 -56
- data/ApiDemos/res/layout/baseline_4.xml +0 -55
- data/ApiDemos/res/layout/baseline_6.xml +0 -34
- data/ApiDemos/res/layout/baseline_7.xml +0 -36
- data/ApiDemos/res/layout/baseline_nested_1.xml +0 -85
- data/ApiDemos/res/layout/baseline_nested_2.xml +0 -85
- data/ApiDemos/res/layout/baseline_nested_3.xml +0 -96
- data/ApiDemos/res/layout/bouncing_balls.xml +0 -22
- data/ApiDemos/res/layout/buttons_1.xml +0 -53
- data/ApiDemos/res/layout/chronometer.xml +0 -64
- data/ApiDemos/res/layout/clipboard.xml +0 -107
- data/ApiDemos/res/layout/contacts_filter.xml +0 -37
- data/ApiDemos/res/layout/controls_1.xml +0 -154
- data/ApiDemos/res/layout/custom_dialog_activity.xml +0 -24
- data/ApiDemos/res/layout/custom_title.xml +0 -57
- data/ApiDemos/res/layout/custom_title_1.xml +0 -33
- data/ApiDemos/res/layout/custom_view_1.xml +0 -44
- data/ApiDemos/res/layout/custom_view_accessibility.xml +0 -44
- data/ApiDemos/res/layout/date_widgets_example_1.xml +0 -40
- data/ApiDemos/res/layout/date_widgets_example_2.xml +0 -33
- data/ApiDemos/res/layout/density_image_views.xml +0 -37
- data/ApiDemos/res/layout/density_styled_image_views.xml +0 -26
- data/ApiDemos/res/layout/dialog_activity.xml +0 -53
- data/ApiDemos/res/layout/drag_layout.xml +0 -93
- data/ApiDemos/res/layout/external_storage.xml +0 -27
- data/ApiDemos/res/layout/external_storage_item.xml +0 -58
- data/ApiDemos/res/layout/focus_1.xml +0 -42
- data/ApiDemos/res/layout/focus_2.xml +0 -41
- data/ApiDemos/res/layout/focus_3.xml +0 -64
- data/ApiDemos/res/layout/focus_5.xml +0 -60
- data/ApiDemos/res/layout/foreground_dispatch.xml +0 -23
- data/ApiDemos/res/layout/foreground_service_controller.xml +0 -49
- data/ApiDemos/res/layout/forward_target.xml +0 -30
- data/ApiDemos/res/layout/forwarding.xml +0 -37
- data/ApiDemos/res/layout/fragment_arguments.xml +0 -54
- data/ApiDemos/res/layout/fragment_context_menu.xml +0 -38
- data/ApiDemos/res/layout/fragment_dialog.xml +0 -40
- data/ApiDemos/res/layout/fragment_dialog_or_activity.xml +0 -64
- data/ApiDemos/res/layout/fragment_hide_show.xml +0 -57
- data/ApiDemos/res/layout/fragment_layout.xml +0 -27
- data/ApiDemos/res/layout/fragment_menu.xml +0 -46
- data/ApiDemos/res/layout/fragment_pager_support.xml +0 -44
- data/ApiDemos/res/layout/fragment_pager_support_list.xml +0 -52
- data/ApiDemos/res/layout/fragment_retain_instance.xml +0 -46
- data/ApiDemos/res/layout/fragment_stack.xml +0 -38
- data/ApiDemos/res/layout/gallery_1.xml +0 -32
- data/ApiDemos/res/layout/gallery_2.xml +0 -38
- data/ApiDemos/res/layout/game_controller_input.xml +0 -52
- data/ApiDemos/res/layout/game_controller_input_heading.xml +0 -21
- data/ApiDemos/res/layout/game_controller_input_text_column.xml +0 -34
- data/ApiDemos/res/layout/google_login.xml +0 -60
- data/ApiDemos/res/layout/grid_1.xml +0 -29
- data/ApiDemos/res/layout/grid_2.xml +0 -30
- data/ApiDemos/res/layout/grid_layout_1.xml +0 -87
- data/ApiDemos/res/layout/hello_world.xml +0 -26
- data/ApiDemos/res/layout/horizontal_scroll_view1.xml +0 -26
- data/ApiDemos/res/layout/hover.xml +0 -64
- data/ApiDemos/res/layout/image_button_1.xml +0 -36
- data/ApiDemos/res/layout/image_switcher_1.xml +0 -40
- data/ApiDemos/res/layout/image_view_1.xml +0 -144
- data/ApiDemos/res/layout/incoming_message.xml +0 -50
- data/ApiDemos/res/layout/incoming_message_info.xml +0 -38
- data/ApiDemos/res/layout/incoming_message_interstitial.xml +0 -37
- data/ApiDemos/res/layout/incoming_message_panel.xml +0 -42
- data/ApiDemos/res/layout/incoming_message_view.xml +0 -80
- data/ApiDemos/res/layout/install_apk.xml +0 -56
- data/ApiDemos/res/layout/intent_activity_flags.xml +0 -43
- data/ApiDemos/res/layout/intents.xml +0 -37
- data/ApiDemos/res/layout/labeled_text_edit.xml +0 -38
- data/ApiDemos/res/layout/launcher_shortcuts.xml +0 -40
- data/ApiDemos/res/layout/layout_animation_1.xml +0 -30
- data/ApiDemos/res/layout/layout_animation_3.xml +0 -21
- data/ApiDemos/res/layout/layout_animation_4.xml +0 -30
- data/ApiDemos/res/layout/layout_animation_5.xml +0 -30
- data/ApiDemos/res/layout/layout_animation_6.xml +0 -29
- data/ApiDemos/res/layout/layout_animation_7.xml +0 -57
- data/ApiDemos/res/layout/layout_animations.xml +0 -80
- data/ApiDemos/res/layout/layout_animations_by_default.xml +0 -34
- data/ApiDemos/res/layout/layout_animations_hideshow.xml +0 -52
- data/ApiDemos/res/layout/linear_layout_1.xml +0 -46
- data/ApiDemos/res/layout/linear_layout_10.xml +0 -122
- data/ApiDemos/res/layout/linear_layout_2.xml +0 -47
- data/ApiDemos/res/layout/linear_layout_3.xml +0 -51
- data/ApiDemos/res/layout/linear_layout_4.xml +0 -50
- data/ApiDemos/res/layout/linear_layout_5.xml +0 -76
- data/ApiDemos/res/layout/linear_layout_6.xml +0 -53
- data/ApiDemos/res/layout/linear_layout_7.xml +0 -54
- data/ApiDemos/res/layout/linear_layout_8.xml +0 -53
- data/ApiDemos/res/layout/linear_layout_9.xml +0 -38
- data/ApiDemos/res/layout/link.xml +0 -68
- data/ApiDemos/res/layout/list_12.xml +0 -35
- data/ApiDemos/res/layout/list_13.xml +0 -34
- data/ApiDemos/res/layout/list_7.xml +0 -35
- data/ApiDemos/res/layout/list_8.xml +0 -61
- data/ApiDemos/res/layout/list_item_checkbox.xml +0 -22
- data/ApiDemos/res/layout/list_item_icon_text.xml +0 -32
- data/ApiDemos/res/layout/list_position.xml +0 -25
- data/ApiDemos/res/layout/local_sample.xml +0 -37
- data/ApiDemos/res/layout/local_service_binding.xml +0 -42
- data/ApiDemos/res/layout/local_service_controller.xml +0 -42
- data/ApiDemos/res/layout/log_text_box_1.xml +0 -42
- data/ApiDemos/res/layout/mapview.xml +0 -31
- data/ApiDemos/res/layout/marquee.xml +0 -46
- data/ApiDemos/res/layout/mediaplayer_1.xml +0 -31
- data/ApiDemos/res/layout/mediaplayer_2.xml +0 -13
- data/ApiDemos/res/layout/messenger_service_binding.xml +0 -47
- data/ApiDemos/res/layout/morse_code.xml +0 -37
- data/ApiDemos/res/layout/notify_with_text.xml +0 -34
- data/ApiDemos/res/layout/notifying_controller.xml +0 -41
- data/ApiDemos/res/layout/overscan.xml +0 -79
- data/ApiDemos/res/layout/pick_contact.xml +0 -48
- data/ApiDemos/res/layout/popup_menu_1.xml +0 -25
- data/ApiDemos/res/layout/preference_widget_mypreference.xml +0 -25
- data/ApiDemos/res/layout/progressbar_1.xml +0 -74
- data/ApiDemos/res/layout/progressbar_2.xml +0 -41
- data/ApiDemos/res/layout/progressbar_3.xml +0 -32
- data/ApiDemos/res/layout/progressbar_4.xml +0 -27
- data/ApiDemos/res/layout/quick_contacts.xml +0 -47
- data/ApiDemos/res/layout/radio_group_1.xml +0 -49
- data/ApiDemos/res/layout/ratingbar_1.xml +0 -60
- data/ApiDemos/res/layout/read_asset.xml +0 -29
- data/ApiDemos/res/layout/receive_result.xml +0 -50
- data/ApiDemos/res/layout/redirect_enter.xml +0 -36
- data/ApiDemos/res/layout/redirect_getter.xml +0 -42
- data/ApiDemos/res/layout/redirect_main.xml +0 -47
- data/ApiDemos/res/layout/relative_layout_1.xml +0 -54
- data/ApiDemos/res/layout/relative_layout_2.xml +0 -78
- data/ApiDemos/res/layout/remote_binding_options.xml +0 -82
- data/ApiDemos/res/layout/remote_service_binding.xml +0 -52
- data/ApiDemos/res/layout/remote_service_controller.xml +0 -42
- data/ApiDemos/res/layout/reorder_four.xml +0 -38
- data/ApiDemos/res/layout/reorder_on_launch.xml +0 -38
- data/ApiDemos/res/layout/reorder_three.xml +0 -38
- data/ApiDemos/res/layout/reorder_two.xml +0 -38
- data/ApiDemos/res/layout/resources.xml +0 -55
- data/ApiDemos/res/layout/resources_height.xml +0 -33
- data/ApiDemos/res/layout/resources_layout_reference.xml +0 -35
- data/ApiDemos/res/layout/resources_layout_reference_tablet.xml +0 -35
- data/ApiDemos/res/layout/resources_smallest_width.xml +0 -35
- data/ApiDemos/res/layout/resources_smallest_width_inner.xml +0 -33
- data/ApiDemos/res/layout/resources_smallest_width_row.xml +0 -33
- data/ApiDemos/res/layout/resources_width.xml +0 -33
- data/ApiDemos/res/layout/resources_width_and_height.xml +0 -35
- data/ApiDemos/res/layout/rotating_list.xml +0 -37
- data/ApiDemos/res/layout/rotating_view.xml +0 -160
- data/ApiDemos/res/layout/save_restore_state.xml +0 -58
- data/ApiDemos/res/layout/screen_orientation.xml +0 -37
- data/ApiDemos/res/layout/scroll_view_1.xml +0 -90
- data/ApiDemos/res/layout/scroll_view_2.xml +0 -41
- data/ApiDemos/res/layout/scrollbar1.xml +0 -169
- data/ApiDemos/res/layout/scrollbar2.xml +0 -172
- data/ApiDemos/res/layout/scrollbar3.xml +0 -136
- data/ApiDemos/res/layout/search_invoke.xml +0 -96
- data/ApiDemos/res/layout/search_query_results.xml +0 -76
- data/ApiDemos/res/layout/search_view.xml +0 -19
- data/ApiDemos/res/layout/searchview_actionbar.xml +0 -28
- data/ApiDemos/res/layout/searchview_filter.xml +0 -31
- data/ApiDemos/res/layout/secure_view.xml +0 -112
- data/ApiDemos/res/layout/secure_view_overlay.xml +0 -50
- data/ApiDemos/res/layout/seekbar_1.xml +0 -36
- data/ApiDemos/res/layout/select_dialog.xml +0 -29
- data/ApiDemos/res/layout/send_result.xml +0 -45
- data/ApiDemos/res/layout/service_start_arguments_controller.xml +0 -57
- data/ApiDemos/res/layout/shape_drawable_1.xml +0 -73
- data/ApiDemos/res/layout/simple_list_item_checkable_1.xml +0 -29
- data/ApiDemos/res/layout/sms_demo.xml +0 -67
- data/ApiDemos/res/layout/soft_input_modes.xml +0 -64
- data/ApiDemos/res/layout/spinner_1.xml +0 -51
- data/ApiDemos/res/layout/split_touch_view.xml +0 -42
- data/ApiDemos/res/layout/status_bar_balloon.xml +0 -32
- data/ApiDemos/res/layout/status_bar_notifications.xml +0 -157
- data/ApiDemos/res/layout/styled_text.xml +0 -52
- data/ApiDemos/res/layout/surface_view_overlay.xml +0 -84
- data/ApiDemos/res/layout/switches.xml +0 -82
- data/ApiDemos/res/layout/table_layout_1.xml +0 -56
- data/ApiDemos/res/layout/table_layout_10.xml +0 -58
- data/ApiDemos/res/layout/table_layout_11.xml +0 -93
- data/ApiDemos/res/layout/table_layout_12.xml +0 -85
- data/ApiDemos/res/layout/table_layout_2.xml +0 -40
- data/ApiDemos/res/layout/table_layout_3.xml +0 -62
- data/ApiDemos/res/layout/table_layout_4.xml +0 -42
- data/ApiDemos/res/layout/table_layout_5.xml +0 -82
- data/ApiDemos/res/layout/table_layout_6.xml +0 -92
- data/ApiDemos/res/layout/table_layout_7.xml +0 -106
- data/ApiDemos/res/layout/table_layout_8.xml +0 -87
- data/ApiDemos/res/layout/table_layout_9.xml +0 -92
- data/ApiDemos/res/layout/tabs1.xml +0 -39
- data/ApiDemos/res/layout/tabs_right_gravity.xml +0 -37
- data/ApiDemos/res/layout/tabs_scroll.xml +0 -41
- data/ApiDemos/res/layout/tasklist_main.xml +0 -47
- data/ApiDemos/res/layout/tasklist_row.xml +0 -38
- data/ApiDemos/res/layout/text_switcher_1.xml +0 -31
- data/ApiDemos/res/layout/text_to_speech.xml +0 -26
- data/ApiDemos/res/layout/translucent_background.xml +0 -24
- data/ApiDemos/res/layout/videoview.xml +0 -14
- data/ApiDemos/res/layout/visibility_1.xml +0 -71
- data/ApiDemos/res/layout/voice_recognition.xml +0 -61
- data/ApiDemos/res/layout/wallpaper_2.xml +0 -27
- data/ApiDemos/res/layout/webview_1.xml +0 -79
- data/ApiDemos/res/menu/action_bar_settings_action_provider.xml +0 -28
- data/ApiDemos/res/menu/action_bar_share_action_provider.xml +0 -28
- data/ApiDemos/res/menu/actions.xml +0 -48
- data/ApiDemos/res/menu/camera_menu.xml +0 -5
- data/ApiDemos/res/menu/category_order.xml +0 -57
- data/ApiDemos/res/menu/checkable.xml +0 -91
- data/ApiDemos/res/menu/disabled.xml +0 -55
- data/ApiDemos/res/menu/display_options_actions.xml +0 -19
- data/ApiDemos/res/menu/groups.xml +0 -45
- data/ApiDemos/res/menu/list_select_menu.xml +0 -22
- data/ApiDemos/res/menu/order.xml +0 -38
- data/ApiDemos/res/menu/popup.xml +0 -32
- data/ApiDemos/res/menu/searchview_in_menu.xml +0 -22
- data/ApiDemos/res/menu/shortcuts.xml +0 -60
- data/ApiDemos/res/menu/submenu.xml +0 -44
- data/ApiDemos/res/menu/title_icon.xml +0 -31
- data/ApiDemos/res/menu/title_only.xml +0 -25
- data/ApiDemos/res/menu/visible.xml +0 -37
- data/ApiDemos/res/raw/androids.pkm +0 -0
- data/ApiDemos/res/raw/robot.png +0 -0
- data/ApiDemos/res/raw/skycubemap0.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap1.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap2.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap3.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap4.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap5.jpg +0 -0
- data/ApiDemos/res/raw/sound_ringer_normal.ogg +0 -0
- data/ApiDemos/res/raw/sound_ringer_silent.ogg +0 -0
- data/ApiDemos/res/raw/sound_ringer_vibrate.ogg +0 -0
- data/ApiDemos/res/raw/sound_screen_off.ogg +0 -0
- data/ApiDemos/res/raw/sound_screen_on.ogg +0 -0
- data/ApiDemos/res/raw/sound_view_clicked.ogg +0 -0
- data/ApiDemos/res/raw/sound_view_focused_or_selected.ogg +0 -0
- data/ApiDemos/res/raw/sound_view_hover_enter.ogg +0 -0
- data/ApiDemos/res/raw/sound_window_state_changed.ogg +0 -0
- data/ApiDemos/res/raw/test_cbr.mp3 +0 -0
- data/ApiDemos/res/values-hdpi/strings.xml +0 -19
- data/ApiDemos/res/values-ldpi/strings.xml +0 -19
- data/ApiDemos/res/values-mdpi/strings.xml +0 -19
- data/ApiDemos/res/values-sw600dp/layout.xml +0 -22
- data/ApiDemos/res/values-v11/bools.xml +0 -20
- data/ApiDemos/res/values-v11/styles.xml +0 -29
- data/ApiDemos/res/values-v13/bools.xml +0 -20
- data/ApiDemos/res/values-v14/bools.xml +0 -20
- data/ApiDemos/res/values-xhdpi/strings.xml +0 -19
- data/ApiDemos/res/values-xlarge/layout.xml +0 -22
- data/ApiDemos/res/values/arrays.xml +0 -149
- data/ApiDemos/res/values/attrs.xml +0 -55
- data/ApiDemos/res/values/bools.xml +0 -32
- data/ApiDemos/res/values/colors.xml +0 -32
- data/ApiDemos/res/values/ids.xml +0 -19
- data/ApiDemos/res/values/strings.xml +0 -1343
- data/ApiDemos/res/values/styles.xml +0 -124
- data/ApiDemos/res/xml/advanced_preferences.xml +0 -38
- data/ApiDemos/res/xml/appwidget_provider.xml +0 -28
- data/ApiDemos/res/xml/default_values.xml +0 -44
- data/ApiDemos/res/xml/device_admin_encryption.xml +0 -34
- data/ApiDemos/res/xml/device_admin_expiration.xml +0 -53
- data/ApiDemos/res/xml/device_admin_general.xml +0 -40
- data/ApiDemos/res/xml/device_admin_headers.xml +0 -41
- data/ApiDemos/res/xml/device_admin_lock_wipe.xml +0 -50
- data/ApiDemos/res/xml/device_admin_quality.xml +0 -79
- data/ApiDemos/res/xml/device_admin_sample.xml +0 -30
- data/ApiDemos/res/xml/filter_nfc.xml +0 -28
- data/ApiDemos/res/xml/fragmented_preferences.xml +0 -97
- data/ApiDemos/res/xml/fragmented_preferences_inner.xml +0 -26
- data/ApiDemos/res/xml/preference_dependencies.xml +0 -35
- data/ApiDemos/res/xml/preference_headers.xml +0 -44
- data/ApiDemos/res/xml/preference_switch +0 -46
- data/ApiDemos/res/xml/preferences.xml +0 -101
- data/ApiDemos/res/xml/searchable.xml +0 -30
- data/ApiDemos/res/xml/taskbackconfig.xml +0 -24
- data/ApiDemos/src/com/example/android/apis/ApiDemos.java +0 -149
- data/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java +0 -36
- data/ApiDemos/src/com/example/android/apis/Shakespeare.java +0 -223
- data/ApiDemos/src/com/example/android/apis/accessibility/ClockBackActivity.java +0 -54
- data/ApiDemos/src/com/example/android/apis/accessibility/ClockBackService.java +0 -575
- data/ApiDemos/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java +0 -280
- data/ApiDemos/src/com/example/android/apis/accessibility/TaskBackService.java +0 -190
- data/ApiDemos/src/com/example/android/apis/accessibility/TaskListActivity.java +0 -58
- data/ApiDemos/src/com/example/android/apis/accessibility/TaskListView.java +0 -115
- data/ApiDemos/src/com/example/android/apis/animation/AnimationCloning.java +0 -148
- data/ApiDemos/src/com/example/android/apis/animation/AnimationLoading.java +0 -165
- data/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java +0 -173
- data/ApiDemos/src/com/example/android/apis/animation/AnimatorEvents.java +0 -237
- data/ApiDemos/src/com/example/android/apis/animation/BouncingBalls.java +0 -184
- data/ApiDemos/src/com/example/android/apis/animation/CustomEvaluator.java +0 -174
- data/ApiDemos/src/com/example/android/apis/animation/FixedGridLayout.java +0 -108
- data/ApiDemos/src/com/example/android/apis/animation/LayoutAnimations.java +0 -210
- data/ApiDemos/src/com/example/android/apis/animation/LayoutAnimationsByDefault.java +0 -61
- data/ApiDemos/src/com/example/android/apis/animation/LayoutAnimationsHideShow.java +0 -178
- data/ApiDemos/src/com/example/android/apis/animation/ListFlipper.java +0 -126
- data/ApiDemos/src/com/example/android/apis/animation/MultiPropertyAnimation.java +0 -178
- data/ApiDemos/src/com/example/android/apis/animation/ReversingAnimation.java +0 -135
- data/ApiDemos/src/com/example/android/apis/animation/Rotate3dAnimation.java +0 -92
- data/ApiDemos/src/com/example/android/apis/animation/ShapeHolder.java +0 -100
- data/ApiDemos/src/com/example/android/apis/animation/Transition3d.java +0 -175
- data/ApiDemos/src/com/example/android/apis/app/ActionBarDisplayOptions.java +0 -124
- data/ApiDemos/src/com/example/android/apis/app/ActionBarMechanics.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/ActionBarSettingsActionProviderActivity.java +0 -111
- data/ApiDemos/src/com/example/android/apis/app/ActionBarShareActionProviderActivity.java +0 -125
- data/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.java +0 -131
- data/ApiDemos/src/com/example/android/apis/app/ActionBarUsage.java +0 -93
- data/ApiDemos/src/com/example/android/apis/app/ActivityRecreate.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/AlarmController.java +0 -168
- data/ApiDemos/src/com/example/android/apis/app/AlarmService.java +0 -89
- data/ApiDemos/src/com/example/android/apis/app/AlarmService_Service.java +0 -131
- data/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.java +0 -423
- data/ApiDemos/src/com/example/android/apis/app/Animation.java +0 -74
- data/ApiDemos/src/com/example/android/apis/app/AppUpdateReceiver.java +0 -34
- data/ApiDemos/src/com/example/android/apis/app/ContactsFilter.java +0 -53
- data/ApiDemos/src/com/example/android/apis/app/ContactsFilterInstrumentation.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/ContactsSelectInstrumentation.java +0 -86
- data/ApiDemos/src/com/example/android/apis/app/CustomDialogActivity.java +0 -48
- data/ApiDemos/src/com/example/android/apis/app/CustomTitle.java +0 -85
- data/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java +0 -934
- data/ApiDemos/src/com/example/android/apis/app/DialogActivity.java +0 -86
- data/ApiDemos/src/com/example/android/apis/app/ForegroundService.java +0 -240
- data/ApiDemos/src/com/example/android/apis/app/ForwardTarget.java +0 -41
- data/ApiDemos/src/com/example/android/apis/app/Forwarding.java +0 -85
- data/ApiDemos/src/com/example/android/apis/app/FragmentAlertDialog.java +0 -109
- data/ApiDemos/src/com/example/android/apis/app/FragmentArguments.java +0 -108
- data/ApiDemos/src/com/example/android/apis/app/FragmentContextMenu.java +0 -77
- data/ApiDemos/src/com/example/android/apis/app/FragmentCustomAnimations.java +0 -131
- data/ApiDemos/src/com/example/android/apis/app/FragmentDialog.java +0 -168
- data/ApiDemos/src/com/example/android/apis/app/FragmentDialogOrActivity.java +0 -82
- data/ApiDemos/src/com/example/android/apis/app/FragmentHideShow.java +0 -113
- data/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java +0 -220
- data/ApiDemos/src/com/example/android/apis/app/FragmentListArray.java +0 -60
- data/ApiDemos/src/com/example/android/apis/app/FragmentMenu.java +0 -132
- data/ApiDemos/src/com/example/android/apis/app/FragmentReceiveResult.java +0 -133
- data/ApiDemos/src/com/example/android/apis/app/FragmentRetainInstance.java +0 -232
- data/ApiDemos/src/com/example/android/apis/app/FragmentStack.java +0 -124
- data/ApiDemos/src/com/example/android/apis/app/FragmentTabs.java +0 -118
- data/ApiDemos/src/com/example/android/apis/app/HelloWorld.java +0 -66
- data/ApiDemos/src/com/example/android/apis/app/IRemoteService.aidl +0 -37
- data/ApiDemos/src/com/example/android/apis/app/IRemoteServiceCallback.aidl +0 -29
- data/ApiDemos/src/com/example/android/apis/app/ISecondary.aidl +0 -36
- data/ApiDemos/src/com/example/android/apis/app/IncomingMessage.java +0 -197
- data/ApiDemos/src/com/example/android/apis/app/IncomingMessageInterstitial.java +0 -64
- data/ApiDemos/src/com/example/android/apis/app/IncomingMessageView.java +0 -59
- data/ApiDemos/src/com/example/android/apis/app/IntentActivityFlags.java +0 -86
- data/ApiDemos/src/com/example/android/apis/app/Intents.java +0 -47
- data/ApiDemos/src/com/example/android/apis/app/LauncherShortcuts.java +0 -141
- data/ApiDemos/src/com/example/android/apis/app/LoaderCursor.java +0 -177
- data/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java +0 -481
- data/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.java +0 -512
- data/ApiDemos/src/com/example/android/apis/app/LocalSample.java +0 -53
- data/ApiDemos/src/com/example/android/apis/app/LocalSampleInstrumentation.java +0 -92
- data/ApiDemos/src/com/example/android/apis/app/LocalService.java +0 -120
- data/ApiDemos/src/com/example/android/apis/app/LocalServiceActivities.java +0 -171
- data/ApiDemos/src/com/example/android/apis/app/MenuInflateFromXml.java +0 -174
- data/ApiDemos/src/com/example/android/apis/app/MessengerService.java +0 -169
- data/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java +0 -178
- data/ApiDemos/src/com/example/android/apis/app/NotificationDisplay.java +0 -82
- data/ApiDemos/src/com/example/android/apis/app/NotifyWithText.java +0 -80
- data/ApiDemos/src/com/example/android/apis/app/NotifyingController.java +0 -61
- data/ApiDemos/src/com/example/android/apis/app/NotifyingService.java +0 -128
- data/ApiDemos/src/com/example/android/apis/app/OneShotAlarm.java +0 -42
- data/ApiDemos/src/com/example/android/apis/app/PersistentState.java +0 -128
- data/ApiDemos/src/com/example/android/apis/app/QuickContactsDemo.java +0 -104
- data/ApiDemos/src/com/example/android/apis/app/ReceiveResult.java +0 -153
- data/ApiDemos/src/com/example/android/apis/app/RedirectEnter.java +0 -59
- data/ApiDemos/src/com/example/android/apis/app/RedirectGetter.java +0 -87
- data/ApiDemos/src/com/example/android/apis/app/RedirectMain.java +0 -122
- data/ApiDemos/src/com/example/android/apis/app/RemoteService.java +0 -652
- data/ApiDemos/src/com/example/android/apis/app/ReorderFour.java +0 -46
- data/ApiDemos/src/com/example/android/apis/app/ReorderOnLaunch.java +0 -44
- data/ApiDemos/src/com/example/android/apis/app/ReorderThree.java +0 -44
- data/ApiDemos/src/com/example/android/apis/app/ReorderTwo.java +0 -44
- data/ApiDemos/src/com/example/android/apis/app/RepeatingAlarm.java +0 -40
- data/ApiDemos/src/com/example/android/apis/app/SaveRestoreState.java +0 -98
- data/ApiDemos/src/com/example/android/apis/app/ScreenOrientation.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/SearchInvoke.java +0 -241
- data/ApiDemos/src/com/example/android/apis/app/SearchQueryResults.java +0 -118
- data/ApiDemos/src/com/example/android/apis/app/SearchSuggestionSampleProvider.java +0 -50
- data/ApiDemos/src/com/example/android/apis/app/SendResult.java +0 -81
- data/ApiDemos/src/com/example/android/apis/app/ServiceStartArguments.java +0 -272
- data/ApiDemos/src/com/example/android/apis/app/SetWallpaperActivity.java +0 -89
- data/ApiDemos/src/com/example/android/apis/app/SoftInputModes.java +0 -67
- data/ApiDemos/src/com/example/android/apis/app/StatusBarNotifications.java +0 -270
- data/ApiDemos/src/com/example/android/apis/app/TextToSpeechActivity.java +0 -136
- data/ApiDemos/src/com/example/android/apis/app/TranslucentActivity.java +0 -48
- data/ApiDemos/src/com/example/android/apis/app/TranslucentBlurActivity.java +0 -55
- data/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.java +0 -226
- data/ApiDemos/src/com/example/android/apis/app/WallpaperActivity.java +0 -48
- data/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java +0 -134
- data/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java +0 -122
- data/ApiDemos/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java +0 -56
- data/ApiDemos/src/com/example/android/apis/content/ClipboardSample.java +0 -144
- data/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java +0 -376
- data/ApiDemos/src/com/example/android/apis/content/FileProvider.java +0 -114
- data/ApiDemos/src/com/example/android/apis/content/InstallApk.java +0 -179
- data/ApiDemos/src/com/example/android/apis/content/PickContact.java +0 -114
- data/ApiDemos/src/com/example/android/apis/content/ReadAsset.java +0 -73
- data/ApiDemos/src/com/example/android/apis/content/ResourcesLayoutReference.java +0 -33
- data/ApiDemos/src/com/example/android/apis/content/ResourcesSample.java +0 -90
- data/ApiDemos/src/com/example/android/apis/content/ResourcesSmallestWidth.java +0 -33
- data/ApiDemos/src/com/example/android/apis/content/ResourcesWidthAndHeight.java +0 -33
- data/ApiDemos/src/com/example/android/apis/content/StyledText.java +0 -51
- data/ApiDemos/src/com/example/android/apis/graphics/AlphaBitmap.java +0 -91
- data/ApiDemos/src/com/example/android/apis/graphics/AnimateDrawable.java +0 -72
- data/ApiDemos/src/com/example/android/apis/graphics/AnimateDrawables.java +0 -67
- data/ApiDemos/src/com/example/android/apis/graphics/Arcs.java +0 -118
- data/ApiDemos/src/com/example/android/apis/graphics/BitmapDecode.java +0 -144
- data/ApiDemos/src/com/example/android/apis/graphics/BitmapMesh.java +0 -130
- data/ApiDemos/src/com/example/android/apis/graphics/BitmapPixels.java +0 -161
- data/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.java +0 -311
- data/ApiDemos/src/com/example/android/apis/graphics/Clipping.java +0 -111
- data/ApiDemos/src/com/example/android/apis/graphics/ColorFilters.java +0 -180
- data/ApiDemos/src/com/example/android/apis/graphics/ColorMatrixSample.java +0 -122
- data/ApiDemos/src/com/example/android/apis/graphics/ColorPickerDialog.java +0 -233
- data/ApiDemos/src/com/example/android/apis/graphics/Compass.java +0 -130
- data/ApiDemos/src/com/example/android/apis/graphics/CompressedTextureActivity.java +0 -157
- data/ApiDemos/src/com/example/android/apis/graphics/CreateBitmap.java +0 -126
- data/ApiDemos/src/com/example/android/apis/graphics/Cube.java +0 -100
- data/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java +0 -416
- data/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java +0 -108
- data/ApiDemos/src/com/example/android/apis/graphics/DensityActivity.java +0 -220
- data/ApiDemos/src/com/example/android/apis/graphics/DrawPoints.java +0 -79
- data/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.java +0 -208
- data/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java +0 -282
- data/ApiDemos/src/com/example/android/apis/graphics/GLES20Activity.java +0 -72
- data/ApiDemos/src/com/example/android/apis/graphics/GLES20TriangleRenderer.java +0 -255
- data/ApiDemos/src/com/example/android/apis/graphics/GLSurfaceViewActivity.java +0 -56
- data/ApiDemos/src/com/example/android/apis/graphics/GradientDrawable1.java +0 -31
- data/ApiDemos/src/com/example/android/apis/graphics/GraphicsActivity.java +0 -43
- data/ApiDemos/src/com/example/android/apis/graphics/Layers.java +0 -65
- data/ApiDemos/src/com/example/android/apis/graphics/MatrixPaletteActivity.java +0 -52
- data/ApiDemos/src/com/example/android/apis/graphics/MatrixPaletteRenderer.java +0 -408
- data/ApiDemos/src/com/example/android/apis/graphics/MeasureText.java +0 -112
- data/ApiDemos/src/com/example/android/apis/graphics/PathEffects.java +0 -121
- data/ApiDemos/src/com/example/android/apis/graphics/PathFillTypes.java +0 -77
- data/ApiDemos/src/com/example/android/apis/graphics/Patterns.java +0 -125
- data/ApiDemos/src/com/example/android/apis/graphics/PictureLayout.java +0 -161
- data/ApiDemos/src/com/example/android/apis/graphics/Pictures.java +0 -81
- data/ApiDemos/src/com/example/android/apis/graphics/PolyToPoly.java +0 -107
- data/ApiDemos/src/com/example/android/apis/graphics/ProxyDrawable.java +0 -102
- data/ApiDemos/src/com/example/android/apis/graphics/PurgeableBitmap.java +0 -118
- data/ApiDemos/src/com/example/android/apis/graphics/PurgeableBitmapView.java +0 -116
- data/ApiDemos/src/com/example/android/apis/graphics/Regions.java +0 -126
- data/ApiDemos/src/com/example/android/apis/graphics/RoundRects.java +0 -113
- data/ApiDemos/src/com/example/android/apis/graphics/ScaleToFit.java +0 -121
- data/ApiDemos/src/com/example/android/apis/graphics/SensorTest.java +0 -213
- data/ApiDemos/src/com/example/android/apis/graphics/ShapeDrawable1.java +0 -136
- data/ApiDemos/src/com/example/android/apis/graphics/StaticTriangleRenderer.java +0 -274
- data/ApiDemos/src/com/example/android/apis/graphics/SurfaceViewOverlay.java +0 -116
- data/ApiDemos/src/com/example/android/apis/graphics/Sweep.java +0 -97
- data/ApiDemos/src/com/example/android/apis/graphics/TextAlign.java +0 -161
- data/ApiDemos/src/com/example/android/apis/graphics/TouchPaint.java +0 -528
- data/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java +0 -184
- data/ApiDemos/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java +0 -63
- data/ApiDemos/src/com/example/android/apis/graphics/TriangleActivity.java +0 -49
- data/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java +0 -241
- data/ApiDemos/src/com/example/android/apis/graphics/Typefaces.java +0 -55
- data/ApiDemos/src/com/example/android/apis/graphics/UnicodeChart.java +0 -119
- data/ApiDemos/src/com/example/android/apis/graphics/Vertices.java +0 -103
- data/ApiDemos/src/com/example/android/apis/graphics/WindowSurface.java +0 -271
- data/ApiDemos/src/com/example/android/apis/graphics/Xfermodes.java +0 -171
- data/ApiDemos/src/com/example/android/apis/graphics/kube/Cube.java +0 -57
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLColor.java +0 -51
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLFace.java +0 -94
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLShape.java +0 -102
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLVertex.java +0 -89
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLWorld.java +0 -98
- data/ApiDemos/src/com/example/android/apis/graphics/kube/Kube.java +0 -342
- data/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java +0 -116
- data/ApiDemos/src/com/example/android/apis/graphics/kube/Layer.java +0 -101
- data/ApiDemos/src/com/example/android/apis/graphics/kube/M4.java +0 -80
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/Grid.java +0 -140
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/LabelMaker.java +0 -411
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixGrabber.java +0 -63
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixStack.java +0 -179
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java +0 -1086
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/NumericSprite.java +0 -99
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/Projector.java +0 -84
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextActivity.java +0 -52
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java +0 -354
- data/ApiDemos/src/com/example/android/apis/media/AudioFxDemo.java +0 -252
- data/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.java +0 -102
- data/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java +0 -102
- data/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java +0 -219
- data/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.java +0 -61
- data/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.java +0 -93
- data/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.java +0 -86
- data/ApiDemos/src/com/example/android/apis/nfc/TechFilter.java +0 -51
- data/ApiDemos/src/com/example/android/apis/os/MorseCode.java +0 -93
- data/ApiDemos/src/com/example/android/apis/os/MorseCodeConverter.java +0 -141
- data/ApiDemos/src/com/example/android/apis/os/RotationVectorDemo.java +0 -216
- data/ApiDemos/src/com/example/android/apis/os/Sensors.java +0 -241
- data/ApiDemos/src/com/example/android/apis/os/SmsMessageReceiver.java +0 -78
- data/ApiDemos/src/com/example/android/apis/os/SmsMessagingDemo.java +0 -159
- data/ApiDemos/src/com/example/android/apis/os/SmsReceivedDialog.java +0 -115
- data/ApiDemos/src/com/example/android/apis/preference/AdvancedPreferences.java +0 -94
- data/ApiDemos/src/com/example/android/apis/preference/DefaultValues.java +0 -61
- data/ApiDemos/src/com/example/android/apis/preference/FragmentPreferences.java +0 -52
- data/ApiDemos/src/com/example/android/apis/preference/LaunchingPreferences.java +0 -100
- data/ApiDemos/src/com/example/android/apis/preference/MyPreference.java +0 -171
- data/ApiDemos/src/com/example/android/apis/preference/PreferenceDependencies.java +0 -33
- data/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java +0 -108
- data/ApiDemos/src/com/example/android/apis/preference/PreferencesFromCode.java +0 -151
- data/ApiDemos/src/com/example/android/apis/preference/PreferencesFromXml.java +0 -34
- data/ApiDemos/src/com/example/android/apis/preference/SwitchPreference.java +0 -38
- data/ApiDemos/src/com/example/android/apis/text/Link.java +0 -84
- data/ApiDemos/src/com/example/android/apis/text/LogTextBox.java +0 -64
- data/ApiDemos/src/com/example/android/apis/text/LogTextBox1.java +0 -50
- data/ApiDemos/src/com/example/android/apis/text/Marquee.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/Animation1.java +0 -45
- data/ApiDemos/src/com/example/android/apis/view/Animation2.java +0 -90
- data/ApiDemos/src/com/example/android/apis/view/Animation3.java +0 -101
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete1.java +0 -82
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete2.java +0 -41
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete3.java +0 -43
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete4.java +0 -103
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete5.java +0 -44
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete6.java +0 -83
- data/ApiDemos/src/com/example/android/apis/view/Baseline1.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline2.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline3.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/Baseline4.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline6.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline7.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/BaselineNested1.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/BaselineNested2.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/BaselineNested3.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/Buttons1.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/CheckableFrameLayout.java +0 -49
- data/ApiDemos/src/com/example/android/apis/view/Cheeses.java +0 -155
- data/ApiDemos/src/com/example/android/apis/view/ChronometerDemo.java +0 -90
- data/ApiDemos/src/com/example/android/apis/view/Controls1.java +0 -54
- data/ApiDemos/src/com/example/android/apis/view/Controls2.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls3.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls4.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls5.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls6.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/CustomView1.java +0 -40
- data/ApiDemos/src/com/example/android/apis/view/DateWidgets1.java +0 -156
- data/ApiDemos/src/com/example/android/apis/view/DateWidgets2.java +0 -68
- data/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.java +0 -72
- data/ApiDemos/src/com/example/android/apis/view/DraggableDot.java +0 -261
- data/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java +0 -160
- data/ApiDemos/src/com/example/android/apis/view/ExpandableList2.java +0 -138
- data/ApiDemos/src/com/example/android/apis/view/ExpandableList3.java +0 -76
- data/ApiDemos/src/com/example/android/apis/view/Focus1.java +0 -47
- data/ApiDemos/src/com/example/android/apis/view/Focus2.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/Focus3.java +0 -45
- data/ApiDemos/src/com/example/android/apis/view/Focus5.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/Gallery1.java +0 -139
- data/ApiDemos/src/com/example/android/apis/view/Gallery2.java +0 -61
- data/ApiDemos/src/com/example/android/apis/view/GameControllerInput.java +0 -460
- data/ApiDemos/src/com/example/android/apis/view/GameView.java +0 -747
- data/ApiDemos/src/com/example/android/apis/view/Grid1.java +0 -95
- data/ApiDemos/src/com/example/android/apis/view/Grid2.java +0 -166
- data/ApiDemos/src/com/example/android/apis/view/Grid3.java +0 -164
- data/ApiDemos/src/com/example/android/apis/view/GridLayout0.java +0 -113
- data/ApiDemos/src/com/example/android/apis/view/GridLayout1.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/HorizontalScrollView1.java +0 -33
- data/ApiDemos/src/com/example/android/apis/view/Hover.java +0 -96
- data/ApiDemos/src/com/example/android/apis/view/HoverInterceptorView.java +0 -71
- data/ApiDemos/src/com/example/android/apis/view/ImageButton1.java +0 -33
- data/ApiDemos/src/com/example/android/apis/view/ImageSwitcher1.java +0 -120
- data/ApiDemos/src/com/example/android/apis/view/ImageView1.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/InternalSelectionFocus.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/InternalSelectionScroll.java +0 -64
- data/ApiDemos/src/com/example/android/apis/view/InternalSelectionView.java +0 -272
- data/ApiDemos/src/com/example/android/apis/view/LabelView.java +0 -194
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation1.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.java +0 -64
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation3.java +0 -44
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation4.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation5.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation6.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation7.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout1.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout10.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout2.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout3.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout4.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout5.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout6.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout7.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout8.java +0 -106
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout9.java +0 -41
- data/ApiDemos/src/com/example/android/apis/view/List1.java +0 -42
- data/ApiDemos/src/com/example/android/apis/view/List10.java +0 -49
- data/ApiDemos/src/com/example/android/apis/view/List11.java +0 -49
- data/ApiDemos/src/com/example/android/apis/view/List12.java +0 -83
- data/ApiDemos/src/com/example/android/apis/view/List13.java +0 -341
- data/ApiDemos/src/com/example/android/apis/view/List14.java +0 -141
- data/ApiDemos/src/com/example/android/apis/view/List15.java +0 -104
- data/ApiDemos/src/com/example/android/apis/view/List16.java +0 -100
- data/ApiDemos/src/com/example/android/apis/view/List17.java +0 -57
- data/ApiDemos/src/com/example/android/apis/view/List2.java +0 -57
- data/ApiDemos/src/com/example/android/apis/view/List3.java +0 -84
- data/ApiDemos/src/com/example/android/apis/view/List4.java +0 -154
- data/ApiDemos/src/com/example/android/apis/view/List5.java +0 -118
- data/ApiDemos/src/com/example/android/apis/view/List6.java +0 -410
- data/ApiDemos/src/com/example/android/apis/view/List7.java +0 -99
- data/ApiDemos/src/com/example/android/apis/view/List8.java +0 -133
- data/ApiDemos/src/com/example/android/apis/view/List9.java +0 -144
- data/ApiDemos/src/com/example/android/apis/view/OverscanActivity.java +0 -184
- data/ApiDemos/src/com/example/android/apis/view/PopupMenu1.java +0 -53
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar1.java +0 -84
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar2.java +0 -44
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar3.java +0 -84
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar4.java +0 -51
- data/ApiDemos/src/com/example/android/apis/view/RadioGroup1.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/RatingBar1.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/RelativeLayout1.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/RelativeLayout2.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/RotatingButton.java +0 -152
- data/ApiDemos/src/com/example/android/apis/view/ScrollBar1.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/ScrollBar2.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/ScrollBar3.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/ScrollView1.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/ScrollView2.java +0 -52
- data/ApiDemos/src/com/example/android/apis/view/SearchViewActionBar.java +0 -115
- data/ApiDemos/src/com/example/android/apis/view/SearchViewAlwaysVisible.java +0 -46
- data/ApiDemos/src/com/example/android/apis/view/SearchViewFilterMode.java +0 -78
- data/ApiDemos/src/com/example/android/apis/view/SecureView.java +0 -144
- data/ApiDemos/src/com/example/android/apis/view/SecureViewOverlay.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/SeekBar1.java +0 -60
- data/ApiDemos/src/com/example/android/apis/view/Spinner1.java +0 -78
- data/ApiDemos/src/com/example/android/apis/view/SplitTouchView.java +0 -66
- data/ApiDemos/src/com/example/android/apis/view/Switches.java +0 -47
- data/ApiDemos/src/com/example/android/apis/view/TableLayout1.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout10.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/TableLayout11.java +0 -34
- data/ApiDemos/src/com/example/android/apis/view/TableLayout12.java +0 -34
- data/ApiDemos/src/com/example/android/apis/view/TableLayout2.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout3.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout4.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout5.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout6.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout7.java +0 -80
- data/ApiDemos/src/com/example/android/apis/view/TableLayout8.java +0 -71
- data/ApiDemos/src/com/example/android/apis/view/TableLayout9.java +0 -48
- data/ApiDemos/src/com/example/android/apis/view/Tabs1.java +0 -50
- data/ApiDemos/src/com/example/android/apis/view/Tabs2.java +0 -57
- data/ApiDemos/src/com/example/android/apis/view/Tabs3.java +0 -50
- data/ApiDemos/src/com/example/android/apis/view/Tabs4.java +0 -23
- data/ApiDemos/src/com/example/android/apis/view/Tabs5.java +0 -54
- data/ApiDemos/src/com/example/android/apis/view/Tabs6.java +0 -55
- data/ApiDemos/src/com/example/android/apis/view/TextSwitcher1.java +0 -79
- data/ApiDemos/src/com/example/android/apis/view/Visibility1.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/WebView1.java +0 -71
- data/ApiDemos/tests/AndroidManifest.xml +0 -37
- data/ApiDemos/tests/ant.properties +0 -18
- data/ApiDemos/tests/build.xml +0 -83
- data/ApiDemos/tests/local.properties +0 -10
- data/ApiDemos/tests/proguard-project.txt +0 -20
- data/ApiDemos/tests/project.properties +0 -14
- data/ApiDemos/tests/src/com/example/android/apis/AllTests.java +0 -53
- data/ApiDemos/tests/src/com/example/android/apis/ApiDemosApplicationTests.java +0 -62
- data/ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java +0 -40
- data/ApiDemos/tests/src/com/example/android/apis/app/ForwardingTest.java +0 -129
- data/ApiDemos/tests/src/com/example/android/apis/app/LocalServiceTest.java +0 -80
- data/ApiDemos/tests/src/com/example/android/apis/os/MorseCodeConverterTest.java +0 -54
- data/ApiDemos/tests/src/com/example/android/apis/view/Focus2ActivityTest.java +0 -111
- data/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java +0 -113
- data/ChangeLog +0 -16
- data/Gemfile +0 -12
- data/Guardfile +0 -17
- data/LICENSE +0 -22
- data/README.md +0 -72
- data/Rakefile +0 -24
- data/cucumber.yml +0 -14
- data/features/step_definitions/calabash_steps.rb +0 -1
- data/features/support/app_installation_hooks.rb +0 -23
- data/features/support/app_life_cycle_hooks.rb +0 -11
- data/gametel.gemspec +0 -23
- data/irb_android.sh +0 -2
- data/lib/gametel/platforms/calabash.rb +0 -155
@@ -1,34 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2011 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
import com.example.android.apis.R;
|
20
|
-
|
21
|
-
import android.content.BroadcastReceiver;
|
22
|
-
import android.content.Context;
|
23
|
-
import android.content.Intent;
|
24
|
-
import android.widget.Toast;
|
25
|
-
|
26
|
-
/**
|
27
|
-
* Executed when a new version of the application is is installed.
|
28
|
-
*/
|
29
|
-
public class AppUpdateReceiver extends BroadcastReceiver {
|
30
|
-
@Override
|
31
|
-
public void onReceive(Context context, Intent intent) {
|
32
|
-
Toast.makeText(context, R.string.app_update_received, Toast.LENGTH_SHORT).show();
|
33
|
-
}
|
34
|
-
}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2007 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
// Need the following import to get access to the app resources, since this
|
20
|
-
// class is in a sub-package.
|
21
|
-
import android.app.Activity;
|
22
|
-
import android.content.ComponentName;
|
23
|
-
import android.os.Bundle;
|
24
|
-
import android.view.View;
|
25
|
-
import android.view.View.OnClickListener;
|
26
|
-
import android.widget.Button;
|
27
|
-
|
28
|
-
import com.example.android.apis.R;
|
29
|
-
|
30
|
-
/**
|
31
|
-
* Front-end for launching {@link ContactsFilterInstrumentation} example
|
32
|
-
* instrumentation class.
|
33
|
-
*/
|
34
|
-
public class ContactsFilter extends Activity {
|
35
|
-
@Override
|
36
|
-
protected void onCreate(Bundle savedInstanceState) {
|
37
|
-
super.onCreate(savedInstanceState);
|
38
|
-
|
39
|
-
setContentView(R.layout.contacts_filter);
|
40
|
-
|
41
|
-
// Watch for button clicks.
|
42
|
-
Button button = (Button)findViewById(R.id.go);
|
43
|
-
button.setOnClickListener(mGoListener);
|
44
|
-
}
|
45
|
-
|
46
|
-
private OnClickListener mGoListener = new OnClickListener() {
|
47
|
-
public void onClick(View v) {
|
48
|
-
startInstrumentation(new ComponentName(ContactsFilter.this,
|
49
|
-
ContactsFilterInstrumentation.class), null, null);
|
50
|
-
}
|
51
|
-
};
|
52
|
-
}
|
53
|
-
|
@@ -1,73 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2007 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
import android.app.Activity;
|
20
|
-
import android.app.Instrumentation;
|
21
|
-
import android.content.Intent;
|
22
|
-
import android.view.KeyEvent;
|
23
|
-
import android.os.Bundle;
|
24
|
-
import android.util.Log;
|
25
|
-
|
26
|
-
/**
|
27
|
-
* This is an example implementation of the {@link android.app.Instrumentation}
|
28
|
-
* class, allowing you to run tests against application code. The
|
29
|
-
* instrumentation implementation here is loaded into the application's
|
30
|
-
* process, for controlling and monitoring what it does.
|
31
|
-
*/
|
32
|
-
public class ContactsFilterInstrumentation extends Instrumentation {
|
33
|
-
@Override
|
34
|
-
public void onCreate(Bundle arguments) {
|
35
|
-
super.onCreate(arguments);
|
36
|
-
|
37
|
-
// When this instrumentation is created, we simply want to start
|
38
|
-
// its test code off in a separate thread, which will call back
|
39
|
-
// to us in onStart().
|
40
|
-
start();
|
41
|
-
}
|
42
|
-
|
43
|
-
@Override
|
44
|
-
public void onStart() {
|
45
|
-
super.onStart();
|
46
|
-
// First start the activity we are instrumenting -- the contacts
|
47
|
-
// list.
|
48
|
-
Intent intent = new Intent(Intent.ACTION_MAIN);
|
49
|
-
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
50
|
-
intent.setClassName(getTargetContext(),
|
51
|
-
"com.android.phone.Dialer");
|
52
|
-
Activity activity = startActivitySync(intent);
|
53
|
-
|
54
|
-
// This is the Activity object that was started, to do with as we want.
|
55
|
-
Log.i("ContactsFilterInstrumentation", "Started: " + activity);
|
56
|
-
|
57
|
-
// We are going to enqueue a couple key events to simulate the user
|
58
|
-
// filtering the list. This is the low-level API so we must send both
|
59
|
-
// down and up events.
|
60
|
-
sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_M));
|
61
|
-
sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_M));
|
62
|
-
sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_A));
|
63
|
-
sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_A));
|
64
|
-
|
65
|
-
// Wait for the activity to finish all of its processing.
|
66
|
-
waitForIdleSync();
|
67
|
-
|
68
|
-
// And we are done!
|
69
|
-
Log.i("ContactsFilterInstrumentation", "Done!");
|
70
|
-
finish(Activity.RESULT_OK, null);
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
@@ -1,86 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2007 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
import android.app.Activity;
|
20
|
-
import android.app.Instrumentation;
|
21
|
-
import android.content.Intent;
|
22
|
-
import android.content.IntentFilter;
|
23
|
-
import android.view.KeyEvent;
|
24
|
-
import android.provider.ContactsContract;
|
25
|
-
import android.os.Bundle;
|
26
|
-
import android.util.Log;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* This is an example implementation of the {@link android.app.Instrumentation}
|
30
|
-
* class, allowing you to run tests against application code. The
|
31
|
-
* instrumentation implementation here is loaded into the application's
|
32
|
-
* process, for controlling and monitoring what it does.
|
33
|
-
*/
|
34
|
-
public class ContactsSelectInstrumentation extends Instrumentation {
|
35
|
-
@Override
|
36
|
-
public void onCreate(Bundle arguments) {
|
37
|
-
super.onCreate(arguments);
|
38
|
-
|
39
|
-
// When this instrumentation is created, we simply want to start
|
40
|
-
// its test code off in a separate thread, which will call back
|
41
|
-
// to us in onStart().
|
42
|
-
start();
|
43
|
-
}
|
44
|
-
|
45
|
-
@Override
|
46
|
-
public void onStart() {
|
47
|
-
super.onStart();
|
48
|
-
// First start the activity we are instrumenting -- the contacts
|
49
|
-
// list.
|
50
|
-
Intent intent = new Intent(Intent.ACTION_MAIN);
|
51
|
-
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
52
|
-
intent.setClassName(getTargetContext(),
|
53
|
-
"com.android.phone.Dialer");
|
54
|
-
Activity activity = startActivitySync(intent);
|
55
|
-
|
56
|
-
// This is the Activity object that was started, to do with as we want.
|
57
|
-
Log.i("ContactsSelectInstrumentation", "Started: " + activity);
|
58
|
-
|
59
|
-
// Monitor for the expected start activity call.
|
60
|
-
ActivityMonitor am = addMonitor(IntentFilter.create(
|
61
|
-
Intent.ACTION_VIEW, ContactsContract.Contacts.CONTENT_ITEM_TYPE), null, true);
|
62
|
-
|
63
|
-
// We are going to enqueue a couple key events to simulate the user
|
64
|
-
// selecting an item in the list.
|
65
|
-
sendKeySync(new KeyEvent(
|
66
|
-
KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_DOWN));
|
67
|
-
sendKeySync(new KeyEvent(
|
68
|
-
KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_DOWN));
|
69
|
-
sendKeySync(new KeyEvent(
|
70
|
-
KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER));
|
71
|
-
sendKeySync(new KeyEvent(
|
72
|
-
KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_CENTER));
|
73
|
-
|
74
|
-
// Was the expected activity started?
|
75
|
-
if (checkMonitorHit(am, 1)) {
|
76
|
-
Log.i("ContactsSelectInstrumentation", "Activity started!");
|
77
|
-
} else {
|
78
|
-
Log.i("ContactsSelectInstrumentation", "*** ACTIVITY NOT STARTED!");
|
79
|
-
}
|
80
|
-
|
81
|
-
// And we are done!
|
82
|
-
Log.i("ContactsSelectInstrumentation", "Done!");
|
83
|
-
finish(Activity.RESULT_OK, null);
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
@@ -1,48 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2008 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
// Need the following import to get access to the app resources, since this
|
20
|
-
// class is in a sub-package.
|
21
|
-
import com.example.android.apis.R;
|
22
|
-
|
23
|
-
import android.app.Activity;
|
24
|
-
import android.os.Bundle;
|
25
|
-
|
26
|
-
/**
|
27
|
-
* <h3>Dialog Activity</h3>
|
28
|
-
*
|
29
|
-
* <p>This demonstrates the how to write an activity that looks like
|
30
|
-
* a pop-up dialog with a custom theme using a different text color.</p>
|
31
|
-
*/
|
32
|
-
public class CustomDialogActivity extends Activity {
|
33
|
-
/**
|
34
|
-
* Initialization of the Activity after it is first created. Must at least
|
35
|
-
* call {@link android.app.Activity#setContentView setContentView()} to
|
36
|
-
* describe what is to be displayed in the screen.
|
37
|
-
*/
|
38
|
-
@Override
|
39
|
-
protected void onCreate(Bundle savedInstanceState) {
|
40
|
-
// Be sure to call the super class.
|
41
|
-
super.onCreate(savedInstanceState);
|
42
|
-
|
43
|
-
// See assets/res/any/layout/dialog_activity.xml for this
|
44
|
-
// view layout definition, which is being set here as
|
45
|
-
// the content of our screen.
|
46
|
-
setContentView(R.layout.custom_dialog_activity);
|
47
|
-
}
|
48
|
-
}
|
@@ -1,85 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2007 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
import android.app.Activity;
|
20
|
-
import android.os.Bundle;
|
21
|
-
import android.view.View;
|
22
|
-
import android.view.Window;
|
23
|
-
import android.view.View.OnClickListener;
|
24
|
-
import android.widget.Button;
|
25
|
-
import android.widget.EditText;
|
26
|
-
import android.widget.TextView;
|
27
|
-
|
28
|
-
import com.example.android.apis.R;
|
29
|
-
|
30
|
-
|
31
|
-
/**
|
32
|
-
* Example of how to use a custom title {@link android.view.Window#FEATURE_CUSTOM_TITLE}.
|
33
|
-
* <h3>CustomTitle</h3>
|
34
|
-
|
35
|
-
<p>This demonstrates how a custom title can be used.</p>
|
36
|
-
|
37
|
-
<h4>Demo</h4>
|
38
|
-
App/Title/Custom Title
|
39
|
-
|
40
|
-
<h4>Source files</h4>
|
41
|
-
* <table class="LinkTable">
|
42
|
-
* <tr>
|
43
|
-
* <td >src/com.example.android.apis/app/CustomTitle.java</td>
|
44
|
-
* <td >The Custom Title implementation</td>
|
45
|
-
* </tr>
|
46
|
-
* <tr>
|
47
|
-
* <td >/res/any/layout/custom_title.xml</td>
|
48
|
-
* <td >Defines contents of the screen</td>
|
49
|
-
* </tr>
|
50
|
-
* </table>
|
51
|
-
*/
|
52
|
-
public class CustomTitle extends Activity {
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Initialization of the Activity after it is first created. Must at least
|
56
|
-
* call {@link android.app.Activity#setContentView(int)} to
|
57
|
-
* describe what is to be displayed in the screen.
|
58
|
-
*/
|
59
|
-
@Override
|
60
|
-
protected void onCreate(Bundle savedInstanceState) {
|
61
|
-
super.onCreate(savedInstanceState);
|
62
|
-
|
63
|
-
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
|
64
|
-
setContentView(R.layout.custom_title);
|
65
|
-
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_1);
|
66
|
-
|
67
|
-
final TextView leftText = (TextView) findViewById(R.id.left_text);
|
68
|
-
final TextView rightText = (TextView) findViewById(R.id.right_text);
|
69
|
-
final EditText leftTextEdit = (EditText) findViewById(R.id.left_text_edit);
|
70
|
-
final EditText rightTextEdit = (EditText) findViewById(R.id.right_text_edit);
|
71
|
-
Button leftButton = (Button) findViewById(R.id.left_text_button);
|
72
|
-
Button rightButton = (Button) findViewById(R.id.right_text_button);
|
73
|
-
|
74
|
-
leftButton.setOnClickListener(new OnClickListener() {
|
75
|
-
public void onClick(View v) {
|
76
|
-
leftText.setText(leftTextEdit.getText());
|
77
|
-
}
|
78
|
-
});
|
79
|
-
rightButton.setOnClickListener(new OnClickListener() {
|
80
|
-
public void onClick(View v) {
|
81
|
-
rightText.setText(rightTextEdit.getText());
|
82
|
-
}
|
83
|
-
});
|
84
|
-
}
|
85
|
-
}
|
@@ -1,934 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2010 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.app;
|
18
|
-
|
19
|
-
import com.example.android.apis.R;
|
20
|
-
|
21
|
-
import android.app.ActivityManager;
|
22
|
-
import android.app.AlertDialog;
|
23
|
-
import android.app.admin.DeviceAdminReceiver;
|
24
|
-
import android.app.admin.DevicePolicyManager;
|
25
|
-
import android.content.ComponentName;
|
26
|
-
import android.content.Context;
|
27
|
-
import android.content.DialogInterface;
|
28
|
-
import android.content.Intent;
|
29
|
-
import android.os.Bundle;
|
30
|
-
import android.preference.CheckBoxPreference;
|
31
|
-
import android.preference.EditTextPreference;
|
32
|
-
import android.preference.ListPreference;
|
33
|
-
import android.preference.Preference;
|
34
|
-
import android.preference.Preference.OnPreferenceChangeListener;
|
35
|
-
import android.preference.Preference.OnPreferenceClickListener;
|
36
|
-
import android.preference.PreferenceActivity;
|
37
|
-
import android.preference.PreferenceCategory;
|
38
|
-
import android.preference.PreferenceFragment;
|
39
|
-
import android.preference.PreferenceScreen;
|
40
|
-
import android.text.TextUtils;
|
41
|
-
import android.util.Log;
|
42
|
-
import android.widget.Toast;
|
43
|
-
|
44
|
-
import java.util.List;
|
45
|
-
|
46
|
-
/**
|
47
|
-
* This activity provides a comprehensive UI for exploring and operating the DevicePolicyManager
|
48
|
-
* api. It consists of two primary modules:
|
49
|
-
*
|
50
|
-
* 1: A device policy controller, implemented here as a series of preference fragments. Each
|
51
|
-
* one contains code to monitor and control a particular subset of device policies.
|
52
|
-
*
|
53
|
-
* 2: A DeviceAdminReceiver, to receive updates from the DevicePolicyManager when certain aspects
|
54
|
-
* of the device security status have changed.
|
55
|
-
*/
|
56
|
-
public class DeviceAdminSample extends PreferenceActivity {
|
57
|
-
|
58
|
-
// Miscellaneous utilities and definitions
|
59
|
-
private static final String TAG = "DeviceAdminSample";
|
60
|
-
|
61
|
-
private static final int REQUEST_CODE_ENABLE_ADMIN = 1;
|
62
|
-
private static final int REQUEST_CODE_START_ENCRYPTION = 2;
|
63
|
-
|
64
|
-
private static final long MS_PER_MINUTE = 60 * 1000;
|
65
|
-
private static final long MS_PER_HOUR = 60 * MS_PER_MINUTE;
|
66
|
-
private static final long MS_PER_DAY = 24 * MS_PER_HOUR;
|
67
|
-
|
68
|
-
// The following keys are used to find each preference item
|
69
|
-
private static final String KEY_ENABLE_ADMIN = "key_enable_admin";
|
70
|
-
private static final String KEY_DISABLE_CAMERA = "key_disable_camera";
|
71
|
-
|
72
|
-
private static final String KEY_CATEGORY_QUALITY = "key_category_quality";
|
73
|
-
private static final String KEY_SET_PASSWORD = "key_set_password";
|
74
|
-
private static final String KEY_RESET_PASSWORD = "key_reset_password";
|
75
|
-
private static final String KEY_QUALITY = "key_quality";
|
76
|
-
private static final String KEY_MIN_LENGTH = "key_minimum_length";
|
77
|
-
private static final String KEY_MIN_LETTERS = "key_minimum_letters";
|
78
|
-
private static final String KEY_MIN_NUMERIC = "key_minimum_numeric";
|
79
|
-
private static final String KEY_MIN_LOWER_CASE = "key_minimum_lower_case";
|
80
|
-
private static final String KEY_MIN_UPPER_CASE = "key_minimum_upper_case";
|
81
|
-
private static final String KEY_MIN_SYMBOLS = "key_minimum_symbols";
|
82
|
-
private static final String KEY_MIN_NON_LETTER = "key_minimum_non_letter";
|
83
|
-
|
84
|
-
private static final String KEY_CATEGORY_EXPIRATION = "key_category_expiration";
|
85
|
-
private static final String KEY_HISTORY = "key_history";
|
86
|
-
private static final String KEY_EXPIRATION_TIMEOUT = "key_expiration_timeout";
|
87
|
-
private static final String KEY_EXPIRATION_STATUS = "key_expiration_status";
|
88
|
-
|
89
|
-
private static final String KEY_CATEGORY_LOCK_WIPE = "key_category_lock_wipe";
|
90
|
-
private static final String KEY_MAX_TIME_SCREEN_LOCK = "key_max_time_screen_lock";
|
91
|
-
private static final String KEY_MAX_FAILS_BEFORE_WIPE = "key_max_fails_before_wipe";
|
92
|
-
private static final String KEY_LOCK_SCREEN = "key_lock_screen";
|
93
|
-
private static final String KEY_WIPE_DATA = "key_wipe_data";
|
94
|
-
private static final String KEY_WIP_DATA_ALL = "key_wipe_data_all";
|
95
|
-
|
96
|
-
private static final String KEY_CATEGORY_ENCRYPTION = "key_category_encryption";
|
97
|
-
private static final String KEY_REQUIRE_ENCRYPTION = "key_require_encryption";
|
98
|
-
private static final String KEY_ACTIVATE_ENCRYPTION = "key_activate_encryption";
|
99
|
-
|
100
|
-
// Interaction with the DevicePolicyManager
|
101
|
-
DevicePolicyManager mDPM;
|
102
|
-
ComponentName mDeviceAdminSample;
|
103
|
-
|
104
|
-
@Override
|
105
|
-
protected void onCreate(Bundle savedInstanceState) {
|
106
|
-
super.onCreate(savedInstanceState);
|
107
|
-
|
108
|
-
// Prepare to work with the DPM
|
109
|
-
mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
|
110
|
-
mDeviceAdminSample = new ComponentName(this, DeviceAdminSampleReceiver.class);
|
111
|
-
}
|
112
|
-
|
113
|
-
/**
|
114
|
-
* We override this method to provide PreferenceActivity with the top-level preference headers.
|
115
|
-
*/
|
116
|
-
@Override
|
117
|
-
public void onBuildHeaders(List<Header> target) {
|
118
|
-
loadHeadersFromResource(R.xml.device_admin_headers, target);
|
119
|
-
}
|
120
|
-
|
121
|
-
/**
|
122
|
-
* Helper to determine if we are an active admin
|
123
|
-
*/
|
124
|
-
private boolean isActiveAdmin() {
|
125
|
-
return mDPM.isAdminActive(mDeviceAdminSample);
|
126
|
-
}
|
127
|
-
|
128
|
-
/**
|
129
|
-
* Common fragment code for DevicePolicyManager access. Provides two shared elements:
|
130
|
-
*
|
131
|
-
* 1. Provides instance variables to access activity/context, DevicePolicyManager, etc.
|
132
|
-
* 2. Provides support for the "set password" button(s) shared by multiple fragments.
|
133
|
-
*/
|
134
|
-
public static class AdminSampleFragment extends PreferenceFragment
|
135
|
-
implements OnPreferenceChangeListener, OnPreferenceClickListener{
|
136
|
-
|
137
|
-
// Useful instance variables
|
138
|
-
protected DeviceAdminSample mActivity;
|
139
|
-
protected DevicePolicyManager mDPM;
|
140
|
-
protected ComponentName mDeviceAdminSample;
|
141
|
-
protected boolean mAdminActive;
|
142
|
-
|
143
|
-
// Optional shared UI
|
144
|
-
private PreferenceScreen mSetPassword;
|
145
|
-
private EditTextPreference mResetPassword;
|
146
|
-
|
147
|
-
@Override
|
148
|
-
public void onActivityCreated(Bundle savedInstanceState) {
|
149
|
-
super.onActivityCreated(savedInstanceState);
|
150
|
-
|
151
|
-
// Retrieve the useful instance variables
|
152
|
-
mActivity = (DeviceAdminSample) getActivity();
|
153
|
-
mDPM = mActivity.mDPM;
|
154
|
-
mDeviceAdminSample = mActivity.mDeviceAdminSample;
|
155
|
-
mAdminActive = mActivity.isActiveAdmin();
|
156
|
-
|
157
|
-
// Configure the shared UI elements (if they exist)
|
158
|
-
mResetPassword = (EditTextPreference) findPreference(KEY_RESET_PASSWORD);
|
159
|
-
mSetPassword = (PreferenceScreen) findPreference(KEY_SET_PASSWORD);
|
160
|
-
|
161
|
-
if (mResetPassword != null) {
|
162
|
-
mResetPassword.setOnPreferenceChangeListener(this);
|
163
|
-
}
|
164
|
-
if (mSetPassword != null) {
|
165
|
-
mSetPassword.setOnPreferenceClickListener(this);
|
166
|
-
}
|
167
|
-
}
|
168
|
-
|
169
|
-
@Override
|
170
|
-
public void onResume() {
|
171
|
-
super.onResume();
|
172
|
-
mAdminActive = mActivity.isActiveAdmin();
|
173
|
-
reloadSummaries();
|
174
|
-
// Resetting the password via API is available only to active admins
|
175
|
-
if (mResetPassword != null) {
|
176
|
-
mResetPassword.setEnabled(mAdminActive);
|
177
|
-
}
|
178
|
-
}
|
179
|
-
|
180
|
-
/**
|
181
|
-
* Called automatically at every onResume. Should also call explicitly any time a
|
182
|
-
* policy changes that may affect other policy values.
|
183
|
-
*/
|
184
|
-
protected void reloadSummaries() {
|
185
|
-
if (mSetPassword != null) {
|
186
|
-
if (mAdminActive) {
|
187
|
-
// Show password-sufficient status under Set Password button
|
188
|
-
boolean sufficient = mDPM.isActivePasswordSufficient();
|
189
|
-
mSetPassword.setSummary(sufficient ?
|
190
|
-
R.string.password_sufficient : R.string.password_insufficient);
|
191
|
-
} else {
|
192
|
-
mSetPassword.setSummary(null);
|
193
|
-
}
|
194
|
-
}
|
195
|
-
}
|
196
|
-
|
197
|
-
public boolean onPreferenceClick(Preference preference) {
|
198
|
-
if (mSetPassword != null && preference == mSetPassword) {
|
199
|
-
Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
|
200
|
-
startActivity(intent);
|
201
|
-
return true;
|
202
|
-
}
|
203
|
-
return false;
|
204
|
-
}
|
205
|
-
|
206
|
-
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
207
|
-
if (mResetPassword != null && preference == mResetPassword) {
|
208
|
-
doResetPassword((String)newValue);
|
209
|
-
return true;
|
210
|
-
}
|
211
|
-
return false;
|
212
|
-
}
|
213
|
-
|
214
|
-
/**
|
215
|
-
* This is dangerous, so we prevent automated tests from doing it, and we
|
216
|
-
* remind the user after we do it.
|
217
|
-
*/
|
218
|
-
private void doResetPassword(String newPassword) {
|
219
|
-
if (alertIfMonkey(mActivity, R.string.monkey_reset_password)) {
|
220
|
-
return;
|
221
|
-
}
|
222
|
-
mDPM.resetPassword(newPassword, DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY);
|
223
|
-
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
224
|
-
String message = mActivity.getString(R.string.reset_password_warning, newPassword);
|
225
|
-
builder.setMessage(message);
|
226
|
-
builder.setPositiveButton(R.string.reset_password_ok, null);
|
227
|
-
builder.show();
|
228
|
-
}
|
229
|
-
|
230
|
-
/**
|
231
|
-
* Simple helper for summaries showing local & global (aggregate) policy settings
|
232
|
-
*/
|
233
|
-
protected String localGlobalSummary(Object local, Object global) {
|
234
|
-
return getString(R.string.status_local_global, local, global);
|
235
|
-
}
|
236
|
-
}
|
237
|
-
|
238
|
-
/**
|
239
|
-
* PreferenceFragment for "general" preferences.
|
240
|
-
*/
|
241
|
-
public static class GeneralFragment extends AdminSampleFragment
|
242
|
-
implements OnPreferenceChangeListener {
|
243
|
-
// UI elements
|
244
|
-
private CheckBoxPreference mEnableCheckbox;
|
245
|
-
private CheckBoxPreference mDisableCameraCheckbox;
|
246
|
-
|
247
|
-
@Override
|
248
|
-
public void onCreate(Bundle savedInstanceState) {
|
249
|
-
super.onCreate(savedInstanceState);
|
250
|
-
addPreferencesFromResource(R.xml.device_admin_general);
|
251
|
-
mEnableCheckbox = (CheckBoxPreference) findPreference(KEY_ENABLE_ADMIN);
|
252
|
-
mEnableCheckbox.setOnPreferenceChangeListener(this);
|
253
|
-
mDisableCameraCheckbox = (CheckBoxPreference) findPreference(KEY_DISABLE_CAMERA);
|
254
|
-
mDisableCameraCheckbox.setOnPreferenceChangeListener(this);
|
255
|
-
}
|
256
|
-
|
257
|
-
// At onResume time, reload UI with current values as required
|
258
|
-
@Override
|
259
|
-
public void onResume() {
|
260
|
-
super.onResume();
|
261
|
-
mEnableCheckbox.setChecked(mAdminActive);
|
262
|
-
enableDeviceCapabilitiesArea(mAdminActive);
|
263
|
-
|
264
|
-
if (mAdminActive) {
|
265
|
-
mDPM.setCameraDisabled(mDeviceAdminSample, mDisableCameraCheckbox.isChecked());
|
266
|
-
reloadSummaries();
|
267
|
-
}
|
268
|
-
}
|
269
|
-
|
270
|
-
@Override
|
271
|
-
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
272
|
-
if (super.onPreferenceChange(preference, newValue)) {
|
273
|
-
return true;
|
274
|
-
}
|
275
|
-
boolean value = (Boolean) newValue;
|
276
|
-
if (preference == mEnableCheckbox) {
|
277
|
-
if (value != mAdminActive) {
|
278
|
-
if (value) {
|
279
|
-
// Launch the activity to have the user enable our admin.
|
280
|
-
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
|
281
|
-
intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, mDeviceAdminSample);
|
282
|
-
intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION,
|
283
|
-
mActivity.getString(R.string.add_admin_extra_app_text));
|
284
|
-
startActivityForResult(intent, REQUEST_CODE_ENABLE_ADMIN);
|
285
|
-
// return false - don't update checkbox until we're really active
|
286
|
-
return false;
|
287
|
-
} else {
|
288
|
-
mDPM.removeActiveAdmin(mDeviceAdminSample);
|
289
|
-
enableDeviceCapabilitiesArea(false);
|
290
|
-
mAdminActive = false;
|
291
|
-
}
|
292
|
-
}
|
293
|
-
} else if (preference == mDisableCameraCheckbox) {
|
294
|
-
mDPM.setCameraDisabled(mDeviceAdminSample, value);
|
295
|
-
reloadSummaries();
|
296
|
-
}
|
297
|
-
return true;
|
298
|
-
}
|
299
|
-
|
300
|
-
@Override
|
301
|
-
protected void reloadSummaries() {
|
302
|
-
super.reloadSummaries();
|
303
|
-
String cameraSummary = getString(mDPM.getCameraDisabled(mDeviceAdminSample)
|
304
|
-
? R.string.camera_disabled : R.string.camera_enabled);
|
305
|
-
mDisableCameraCheckbox.setSummary(cameraSummary);
|
306
|
-
}
|
307
|
-
|
308
|
-
/** Updates the device capabilities area (dis/enabling) as the admin is (de)activated */
|
309
|
-
private void enableDeviceCapabilitiesArea(boolean enabled) {
|
310
|
-
mDisableCameraCheckbox.setEnabled(enabled);
|
311
|
-
}
|
312
|
-
}
|
313
|
-
|
314
|
-
/**
|
315
|
-
* PreferenceFragment for "password quality" preferences.
|
316
|
-
*/
|
317
|
-
public static class QualityFragment extends AdminSampleFragment
|
318
|
-
implements OnPreferenceChangeListener {
|
319
|
-
|
320
|
-
// Password quality values
|
321
|
-
// This list must match the list found in samples/ApiDemos/res/values/arrays.xml
|
322
|
-
final static int[] mPasswordQualityValues = new int[] {
|
323
|
-
DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED,
|
324
|
-
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING,
|
325
|
-
DevicePolicyManager.PASSWORD_QUALITY_NUMERIC,
|
326
|
-
DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC,
|
327
|
-
DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC,
|
328
|
-
DevicePolicyManager.PASSWORD_QUALITY_COMPLEX
|
329
|
-
};
|
330
|
-
|
331
|
-
// Password quality values (as strings, for the ListPreference entryValues)
|
332
|
-
// This list must match the list found in samples/ApiDemos/res/values/arrays.xml
|
333
|
-
final static String[] mPasswordQualityValueStrings = new String[] {
|
334
|
-
String.valueOf(DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED),
|
335
|
-
String.valueOf(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING),
|
336
|
-
String.valueOf(DevicePolicyManager.PASSWORD_QUALITY_NUMERIC),
|
337
|
-
String.valueOf(DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC),
|
338
|
-
String.valueOf(DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC),
|
339
|
-
String.valueOf(DevicePolicyManager.PASSWORD_QUALITY_COMPLEX)
|
340
|
-
};
|
341
|
-
|
342
|
-
// UI elements
|
343
|
-
private PreferenceCategory mQualityCategory;
|
344
|
-
private ListPreference mPasswordQuality;
|
345
|
-
private EditTextPreference mMinLength;
|
346
|
-
private EditTextPreference mMinLetters;
|
347
|
-
private EditTextPreference mMinNumeric;
|
348
|
-
private EditTextPreference mMinLowerCase;
|
349
|
-
private EditTextPreference mMinUpperCase;
|
350
|
-
private EditTextPreference mMinSymbols;
|
351
|
-
private EditTextPreference mMinNonLetter;
|
352
|
-
|
353
|
-
@Override
|
354
|
-
public void onCreate(Bundle savedInstanceState) {
|
355
|
-
super.onCreate(savedInstanceState);
|
356
|
-
addPreferencesFromResource(R.xml.device_admin_quality);
|
357
|
-
|
358
|
-
mQualityCategory = (PreferenceCategory) findPreference(KEY_CATEGORY_QUALITY);
|
359
|
-
mPasswordQuality = (ListPreference) findPreference(KEY_QUALITY);
|
360
|
-
mMinLength = (EditTextPreference) findPreference(KEY_MIN_LENGTH);
|
361
|
-
mMinLetters = (EditTextPreference) findPreference(KEY_MIN_LETTERS);
|
362
|
-
mMinNumeric = (EditTextPreference) findPreference(KEY_MIN_NUMERIC);
|
363
|
-
mMinLowerCase = (EditTextPreference) findPreference(KEY_MIN_LOWER_CASE);
|
364
|
-
mMinUpperCase = (EditTextPreference) findPreference(KEY_MIN_UPPER_CASE);
|
365
|
-
mMinSymbols = (EditTextPreference) findPreference(KEY_MIN_SYMBOLS);
|
366
|
-
mMinNonLetter = (EditTextPreference) findPreference(KEY_MIN_NON_LETTER);
|
367
|
-
|
368
|
-
mPasswordQuality.setOnPreferenceChangeListener(this);
|
369
|
-
mMinLength.setOnPreferenceChangeListener(this);
|
370
|
-
mMinLetters.setOnPreferenceChangeListener(this);
|
371
|
-
mMinNumeric.setOnPreferenceChangeListener(this);
|
372
|
-
mMinLowerCase.setOnPreferenceChangeListener(this);
|
373
|
-
mMinUpperCase.setOnPreferenceChangeListener(this);
|
374
|
-
mMinSymbols.setOnPreferenceChangeListener(this);
|
375
|
-
mMinNonLetter.setOnPreferenceChangeListener(this);
|
376
|
-
|
377
|
-
// Finish setup of the quality dropdown
|
378
|
-
mPasswordQuality.setEntryValues(mPasswordQualityValueStrings);
|
379
|
-
}
|
380
|
-
|
381
|
-
@Override
|
382
|
-
public void onResume() {
|
383
|
-
super.onResume();
|
384
|
-
mQualityCategory.setEnabled(mAdminActive);
|
385
|
-
}
|
386
|
-
|
387
|
-
/**
|
388
|
-
* Update the summaries of each item to show the local setting and the global setting.
|
389
|
-
*/
|
390
|
-
@Override
|
391
|
-
protected void reloadSummaries() {
|
392
|
-
super.reloadSummaries();
|
393
|
-
// Show numeric settings for each policy API
|
394
|
-
int local, global;
|
395
|
-
local = mDPM.getPasswordQuality(mDeviceAdminSample);
|
396
|
-
global = mDPM.getPasswordQuality(null);
|
397
|
-
mPasswordQuality.setSummary(
|
398
|
-
localGlobalSummary(qualityValueToString(local), qualityValueToString(global)));
|
399
|
-
local = mDPM.getPasswordMinimumLength(mDeviceAdminSample);
|
400
|
-
global = mDPM.getPasswordMinimumLength(null);
|
401
|
-
mMinLength.setSummary(localGlobalSummary(local, global));
|
402
|
-
local = mDPM.getPasswordMinimumLetters(mDeviceAdminSample);
|
403
|
-
global = mDPM.getPasswordMinimumLetters(null);
|
404
|
-
mMinLetters.setSummary(localGlobalSummary(local, global));
|
405
|
-
local = mDPM.getPasswordMinimumNumeric(mDeviceAdminSample);
|
406
|
-
global = mDPM.getPasswordMinimumNumeric(null);
|
407
|
-
mMinNumeric.setSummary(localGlobalSummary(local, global));
|
408
|
-
local = mDPM.getPasswordMinimumLowerCase(mDeviceAdminSample);
|
409
|
-
global = mDPM.getPasswordMinimumLowerCase(null);
|
410
|
-
mMinLowerCase.setSummary(localGlobalSummary(local, global));
|
411
|
-
local = mDPM.getPasswordMinimumUpperCase(mDeviceAdminSample);
|
412
|
-
global = mDPM.getPasswordMinimumUpperCase(null);
|
413
|
-
mMinUpperCase.setSummary(localGlobalSummary(local, global));
|
414
|
-
local = mDPM.getPasswordMinimumSymbols(mDeviceAdminSample);
|
415
|
-
global = mDPM.getPasswordMinimumSymbols(null);
|
416
|
-
mMinSymbols.setSummary(localGlobalSummary(local, global));
|
417
|
-
local = mDPM.getPasswordMinimumNonLetter(mDeviceAdminSample);
|
418
|
-
global = mDPM.getPasswordMinimumNonLetter(null);
|
419
|
-
mMinNonLetter.setSummary(localGlobalSummary(local, global));
|
420
|
-
}
|
421
|
-
|
422
|
-
@Override
|
423
|
-
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
424
|
-
if (super.onPreferenceChange(preference, newValue)) {
|
425
|
-
return true;
|
426
|
-
}
|
427
|
-
String valueString = (String)newValue;
|
428
|
-
if (TextUtils.isEmpty(valueString)) {
|
429
|
-
return false;
|
430
|
-
}
|
431
|
-
int value = 0;
|
432
|
-
try {
|
433
|
-
value = Integer.parseInt(valueString);
|
434
|
-
} catch (NumberFormatException nfe) {
|
435
|
-
String warning = mActivity.getString(R.string.number_format_warning, valueString);
|
436
|
-
Toast.makeText(mActivity, warning, Toast.LENGTH_SHORT).show();
|
437
|
-
}
|
438
|
-
if (preference == mPasswordQuality) {
|
439
|
-
mDPM.setPasswordQuality(mDeviceAdminSample, value);
|
440
|
-
} else if (preference == mMinLength) {
|
441
|
-
mDPM.setPasswordMinimumLength(mDeviceAdminSample, value);
|
442
|
-
} else if (preference == mMinLetters) {
|
443
|
-
mDPM.setPasswordMinimumLetters(mDeviceAdminSample, value);
|
444
|
-
} else if (preference == mMinNumeric) {
|
445
|
-
mDPM.setPasswordMinimumNumeric(mDeviceAdminSample, value);
|
446
|
-
} else if (preference == mMinLowerCase) {
|
447
|
-
mDPM.setPasswordMinimumLowerCase(mDeviceAdminSample, value);
|
448
|
-
} else if (preference == mMinUpperCase) {
|
449
|
-
mDPM.setPasswordMinimumUpperCase(mDeviceAdminSample, value);
|
450
|
-
} else if (preference == mMinSymbols) {
|
451
|
-
mDPM.setPasswordMinimumSymbols(mDeviceAdminSample, value);
|
452
|
-
} else if (preference == mMinNonLetter) {
|
453
|
-
mDPM.setPasswordMinimumNonLetter(mDeviceAdminSample, value);
|
454
|
-
}
|
455
|
-
reloadSummaries();
|
456
|
-
return true;
|
457
|
-
}
|
458
|
-
|
459
|
-
private String qualityValueToString(int quality) {
|
460
|
-
for (int i= 0; i < mPasswordQualityValues.length; i++) {
|
461
|
-
if (mPasswordQualityValues[i] == quality) {
|
462
|
-
String[] qualities =
|
463
|
-
mActivity.getResources().getStringArray(R.array.password_qualities);
|
464
|
-
return qualities[i];
|
465
|
-
}
|
466
|
-
}
|
467
|
-
return "(0x" + Integer.toString(quality, 16) + ")";
|
468
|
-
}
|
469
|
-
}
|
470
|
-
|
471
|
-
/**
|
472
|
-
* PreferenceFragment for "password expiration" preferences.
|
473
|
-
*/
|
474
|
-
public static class ExpirationFragment extends AdminSampleFragment
|
475
|
-
implements OnPreferenceChangeListener, OnPreferenceClickListener {
|
476
|
-
private PreferenceCategory mExpirationCategory;
|
477
|
-
private EditTextPreference mHistory;
|
478
|
-
private EditTextPreference mExpirationTimeout;
|
479
|
-
private PreferenceScreen mExpirationStatus;
|
480
|
-
|
481
|
-
@Override
|
482
|
-
public void onCreate(Bundle savedInstanceState) {
|
483
|
-
super.onCreate(savedInstanceState);
|
484
|
-
addPreferencesFromResource(R.xml.device_admin_expiration);
|
485
|
-
|
486
|
-
mExpirationCategory = (PreferenceCategory) findPreference(KEY_CATEGORY_EXPIRATION);
|
487
|
-
mHistory = (EditTextPreference) findPreference(KEY_HISTORY);
|
488
|
-
mExpirationTimeout = (EditTextPreference) findPreference(KEY_EXPIRATION_TIMEOUT);
|
489
|
-
mExpirationStatus = (PreferenceScreen) findPreference(KEY_EXPIRATION_STATUS);
|
490
|
-
|
491
|
-
mHistory.setOnPreferenceChangeListener(this);
|
492
|
-
mExpirationTimeout.setOnPreferenceChangeListener(this);
|
493
|
-
mExpirationStatus.setOnPreferenceClickListener(this);
|
494
|
-
}
|
495
|
-
|
496
|
-
@Override
|
497
|
-
public void onResume() {
|
498
|
-
super.onResume();
|
499
|
-
mExpirationCategory.setEnabled(mAdminActive);
|
500
|
-
}
|
501
|
-
|
502
|
-
/**
|
503
|
-
* Update the summaries of each item to show the local setting and the global setting.
|
504
|
-
*/
|
505
|
-
@Override
|
506
|
-
protected void reloadSummaries() {
|
507
|
-
super.reloadSummaries();
|
508
|
-
|
509
|
-
int local, global;
|
510
|
-
local = mDPM.getPasswordHistoryLength(mDeviceAdminSample);
|
511
|
-
global = mDPM.getPasswordHistoryLength(null);
|
512
|
-
mHistory.setSummary(localGlobalSummary(local, global));
|
513
|
-
|
514
|
-
long localLong, globalLong;
|
515
|
-
localLong = mDPM.getPasswordExpirationTimeout(mDeviceAdminSample);
|
516
|
-
globalLong = mDPM.getPasswordExpirationTimeout(null);
|
517
|
-
mExpirationTimeout.setSummary(localGlobalSummary(
|
518
|
-
localLong / MS_PER_MINUTE, globalLong / MS_PER_MINUTE));
|
519
|
-
|
520
|
-
String expirationStatus = getExpirationStatus();
|
521
|
-
mExpirationStatus.setSummary(expirationStatus);
|
522
|
-
}
|
523
|
-
|
524
|
-
@Override
|
525
|
-
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
526
|
-
if (super.onPreferenceChange(preference, newValue)) {
|
527
|
-
return true;
|
528
|
-
}
|
529
|
-
String valueString = (String)newValue;
|
530
|
-
if (TextUtils.isEmpty(valueString)) {
|
531
|
-
return false;
|
532
|
-
}
|
533
|
-
int value = 0;
|
534
|
-
try {
|
535
|
-
value = Integer.parseInt(valueString);
|
536
|
-
} catch (NumberFormatException nfe) {
|
537
|
-
String warning = mActivity.getString(R.string.number_format_warning, valueString);
|
538
|
-
Toast.makeText(mActivity, warning, Toast.LENGTH_SHORT).show();
|
539
|
-
}
|
540
|
-
if (preference == mHistory) {
|
541
|
-
mDPM.setPasswordHistoryLength(mDeviceAdminSample, value);
|
542
|
-
} else if (preference == mExpirationTimeout) {
|
543
|
-
mDPM.setPasswordExpirationTimeout(mDeviceAdminSample, value * MS_PER_MINUTE);
|
544
|
-
}
|
545
|
-
reloadSummaries();
|
546
|
-
return true;
|
547
|
-
}
|
548
|
-
|
549
|
-
@Override
|
550
|
-
public boolean onPreferenceClick(Preference preference) {
|
551
|
-
if (super.onPreferenceClick(preference)) {
|
552
|
-
return true;
|
553
|
-
}
|
554
|
-
if (preference == mExpirationStatus) {
|
555
|
-
String expirationStatus = getExpirationStatus();
|
556
|
-
mExpirationStatus.setSummary(expirationStatus);
|
557
|
-
return true;
|
558
|
-
}
|
559
|
-
return false;
|
560
|
-
}
|
561
|
-
|
562
|
-
/**
|
563
|
-
* Create a summary string describing the expiration status for the sample app,
|
564
|
-
* as well as the global (aggregate) status.
|
565
|
-
*/
|
566
|
-
private String getExpirationStatus() {
|
567
|
-
// expirations are absolute; convert to relative for display
|
568
|
-
long localExpiration = mDPM.getPasswordExpiration(mDeviceAdminSample);
|
569
|
-
long globalExpiration = mDPM.getPasswordExpiration(null);
|
570
|
-
long now = System.currentTimeMillis();
|
571
|
-
|
572
|
-
// local expiration
|
573
|
-
String local;
|
574
|
-
if (localExpiration == 0) {
|
575
|
-
local = mActivity.getString(R.string.expiration_status_none);
|
576
|
-
} else {
|
577
|
-
localExpiration -= now;
|
578
|
-
String dms = timeToDaysMinutesSeconds(mActivity, Math.abs(localExpiration));
|
579
|
-
if (localExpiration >= 0) {
|
580
|
-
local = mActivity.getString(R.string.expiration_status_future, dms);
|
581
|
-
} else {
|
582
|
-
local = mActivity.getString(R.string.expiration_status_past, dms);
|
583
|
-
}
|
584
|
-
}
|
585
|
-
|
586
|
-
// global expiration
|
587
|
-
String global;
|
588
|
-
if (globalExpiration == 0) {
|
589
|
-
global = mActivity.getString(R.string.expiration_status_none);
|
590
|
-
} else {
|
591
|
-
globalExpiration -= now;
|
592
|
-
String dms = timeToDaysMinutesSeconds(mActivity, Math.abs(globalExpiration));
|
593
|
-
if (globalExpiration >= 0) {
|
594
|
-
global = mActivity.getString(R.string.expiration_status_future, dms);
|
595
|
-
} else {
|
596
|
-
global = mActivity.getString(R.string.expiration_status_past, dms);
|
597
|
-
}
|
598
|
-
}
|
599
|
-
return mActivity.getString(R.string.status_local_global, local, global);
|
600
|
-
}
|
601
|
-
}
|
602
|
-
|
603
|
-
/**
|
604
|
-
* PreferenceFragment for "lock screen & wipe" preferences.
|
605
|
-
*/
|
606
|
-
public static class LockWipeFragment extends AdminSampleFragment
|
607
|
-
implements OnPreferenceChangeListener, OnPreferenceClickListener {
|
608
|
-
private PreferenceCategory mLockWipeCategory;
|
609
|
-
private EditTextPreference mMaxTimeScreenLock;
|
610
|
-
private EditTextPreference mMaxFailures;
|
611
|
-
private PreferenceScreen mLockScreen;
|
612
|
-
private PreferenceScreen mWipeData;
|
613
|
-
private PreferenceScreen mWipeAppData;
|
614
|
-
|
615
|
-
@Override
|
616
|
-
public void onCreate(Bundle savedInstanceState) {
|
617
|
-
super.onCreate(savedInstanceState);
|
618
|
-
addPreferencesFromResource(R.xml.device_admin_lock_wipe);
|
619
|
-
|
620
|
-
mLockWipeCategory = (PreferenceCategory) findPreference(KEY_CATEGORY_LOCK_WIPE);
|
621
|
-
mMaxTimeScreenLock = (EditTextPreference) findPreference(KEY_MAX_TIME_SCREEN_LOCK);
|
622
|
-
mMaxFailures = (EditTextPreference) findPreference(KEY_MAX_FAILS_BEFORE_WIPE);
|
623
|
-
mLockScreen = (PreferenceScreen) findPreference(KEY_LOCK_SCREEN);
|
624
|
-
mWipeData = (PreferenceScreen) findPreference(KEY_WIPE_DATA);
|
625
|
-
mWipeAppData = (PreferenceScreen) findPreference(KEY_WIP_DATA_ALL);
|
626
|
-
|
627
|
-
mMaxTimeScreenLock.setOnPreferenceChangeListener(this);
|
628
|
-
mMaxFailures.setOnPreferenceChangeListener(this);
|
629
|
-
mLockScreen.setOnPreferenceClickListener(this);
|
630
|
-
mWipeData.setOnPreferenceClickListener(this);
|
631
|
-
mWipeAppData.setOnPreferenceClickListener(this);
|
632
|
-
}
|
633
|
-
|
634
|
-
@Override
|
635
|
-
public void onResume() {
|
636
|
-
super.onResume();
|
637
|
-
mLockWipeCategory.setEnabled(mAdminActive);
|
638
|
-
}
|
639
|
-
|
640
|
-
/**
|
641
|
-
* Update the summaries of each item to show the local setting and the global setting.
|
642
|
-
*/
|
643
|
-
@Override
|
644
|
-
protected void reloadSummaries() {
|
645
|
-
super.reloadSummaries();
|
646
|
-
|
647
|
-
long localLong, globalLong;
|
648
|
-
localLong = mDPM.getMaximumTimeToLock(mDeviceAdminSample);
|
649
|
-
globalLong = mDPM.getMaximumTimeToLock(null);
|
650
|
-
mMaxTimeScreenLock.setSummary(localGlobalSummary(
|
651
|
-
localLong / MS_PER_MINUTE, globalLong / MS_PER_MINUTE));
|
652
|
-
|
653
|
-
int local, global;
|
654
|
-
local = mDPM.getMaximumFailedPasswordsForWipe(mDeviceAdminSample);
|
655
|
-
global = mDPM.getMaximumFailedPasswordsForWipe(null);
|
656
|
-
mMaxFailures.setSummary(localGlobalSummary(local, global));
|
657
|
-
}
|
658
|
-
|
659
|
-
@Override
|
660
|
-
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
661
|
-
if (super.onPreferenceChange(preference, newValue)) {
|
662
|
-
return true;
|
663
|
-
}
|
664
|
-
String valueString = (String)newValue;
|
665
|
-
if (TextUtils.isEmpty(valueString)) {
|
666
|
-
return false;
|
667
|
-
}
|
668
|
-
int value = 0;
|
669
|
-
try {
|
670
|
-
value = Integer.parseInt(valueString);
|
671
|
-
} catch (NumberFormatException nfe) {
|
672
|
-
String warning = mActivity.getString(R.string.number_format_warning, valueString);
|
673
|
-
Toast.makeText(mActivity, warning, Toast.LENGTH_SHORT).show();
|
674
|
-
}
|
675
|
-
if (preference == mMaxTimeScreenLock) {
|
676
|
-
mDPM.setMaximumTimeToLock(mDeviceAdminSample, value * MS_PER_MINUTE);
|
677
|
-
} else if (preference == mMaxFailures) {
|
678
|
-
if (alertIfMonkey(mActivity, R.string.monkey_wipe_data)) {
|
679
|
-
return true;
|
680
|
-
}
|
681
|
-
mDPM.setMaximumFailedPasswordsForWipe(mDeviceAdminSample, value);
|
682
|
-
}
|
683
|
-
reloadSummaries();
|
684
|
-
return true;
|
685
|
-
}
|
686
|
-
|
687
|
-
@Override
|
688
|
-
public boolean onPreferenceClick(Preference preference) {
|
689
|
-
if (super.onPreferenceClick(preference)) {
|
690
|
-
return true;
|
691
|
-
}
|
692
|
-
if (preference == mLockScreen) {
|
693
|
-
if (alertIfMonkey(mActivity, R.string.monkey_lock_screen)) {
|
694
|
-
return true;
|
695
|
-
}
|
696
|
-
mDPM.lockNow();
|
697
|
-
return true;
|
698
|
-
} else if (preference == mWipeData || preference == mWipeAppData) {
|
699
|
-
if (alertIfMonkey(mActivity, R.string.monkey_wipe_data)) {
|
700
|
-
return true;
|
701
|
-
}
|
702
|
-
promptForRealDeviceWipe(preference == mWipeAppData);
|
703
|
-
return true;
|
704
|
-
}
|
705
|
-
return false;
|
706
|
-
}
|
707
|
-
|
708
|
-
/**
|
709
|
-
* Wiping data is real, so we don't want it to be easy. Show two alerts before wiping.
|
710
|
-
*/
|
711
|
-
private void promptForRealDeviceWipe(final boolean wipeAllData) {
|
712
|
-
final DeviceAdminSample activity = mActivity;
|
713
|
-
|
714
|
-
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
715
|
-
builder.setMessage(R.string.wipe_warning_first);
|
716
|
-
builder.setPositiveButton(R.string.wipe_warning_first_ok,
|
717
|
-
new DialogInterface.OnClickListener() {
|
718
|
-
public void onClick(DialogInterface dialog, int which) {
|
719
|
-
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
720
|
-
if (wipeAllData) {
|
721
|
-
builder.setMessage(R.string.wipe_warning_second_full);
|
722
|
-
} else {
|
723
|
-
builder.setMessage(R.string.wipe_warning_second);
|
724
|
-
}
|
725
|
-
builder.setPositiveButton(R.string.wipe_warning_second_ok,
|
726
|
-
new DialogInterface.OnClickListener() {
|
727
|
-
public void onClick(DialogInterface dialog, int which) {
|
728
|
-
boolean stillActive = mActivity.isActiveAdmin();
|
729
|
-
if (stillActive) {
|
730
|
-
mDPM.wipeData(wipeAllData
|
731
|
-
? DevicePolicyManager.WIPE_EXTERNAL_STORAGE : 0);
|
732
|
-
}
|
733
|
-
}
|
734
|
-
});
|
735
|
-
builder.setNegativeButton(R.string.wipe_warning_second_no, null);
|
736
|
-
builder.show();
|
737
|
-
}
|
738
|
-
});
|
739
|
-
builder.setNegativeButton(R.string.wipe_warning_first_no, null);
|
740
|
-
builder.show();
|
741
|
-
}
|
742
|
-
}
|
743
|
-
|
744
|
-
/**
|
745
|
-
* PreferenceFragment for "encryption" preferences.
|
746
|
-
*/
|
747
|
-
public static class EncryptionFragment extends AdminSampleFragment
|
748
|
-
implements OnPreferenceChangeListener, OnPreferenceClickListener {
|
749
|
-
private PreferenceCategory mEncryptionCategory;
|
750
|
-
private CheckBoxPreference mRequireEncryption;
|
751
|
-
private PreferenceScreen mActivateEncryption;
|
752
|
-
|
753
|
-
@Override
|
754
|
-
public void onCreate(Bundle savedInstanceState) {
|
755
|
-
super.onCreate(savedInstanceState);
|
756
|
-
addPreferencesFromResource(R.xml.device_admin_encryption);
|
757
|
-
|
758
|
-
mEncryptionCategory = (PreferenceCategory) findPreference(KEY_CATEGORY_ENCRYPTION);
|
759
|
-
mRequireEncryption = (CheckBoxPreference) findPreference(KEY_REQUIRE_ENCRYPTION);
|
760
|
-
mActivateEncryption = (PreferenceScreen) findPreference(KEY_ACTIVATE_ENCRYPTION);
|
761
|
-
|
762
|
-
mRequireEncryption.setOnPreferenceChangeListener(this);
|
763
|
-
mActivateEncryption.setOnPreferenceClickListener(this);
|
764
|
-
}
|
765
|
-
|
766
|
-
@Override
|
767
|
-
public void onResume() {
|
768
|
-
super.onResume();
|
769
|
-
mEncryptionCategory.setEnabled(mAdminActive);
|
770
|
-
mRequireEncryption.setChecked(mDPM.getStorageEncryption(mDeviceAdminSample));
|
771
|
-
}
|
772
|
-
|
773
|
-
/**
|
774
|
-
* Update the summaries of each item to show the local setting and the global setting.
|
775
|
-
*/
|
776
|
-
@Override
|
777
|
-
protected void reloadSummaries() {
|
778
|
-
super.reloadSummaries();
|
779
|
-
|
780
|
-
boolean local, global;
|
781
|
-
local = mDPM.getStorageEncryption(mDeviceAdminSample);
|
782
|
-
global = mDPM.getStorageEncryption(null);
|
783
|
-
mRequireEncryption.setSummary(localGlobalSummary(local, global));
|
784
|
-
|
785
|
-
int deviceStatusCode = mDPM.getStorageEncryptionStatus();
|
786
|
-
String deviceStatus = statusCodeToString(deviceStatusCode);
|
787
|
-
String status = mActivity.getString(R.string.status_device_encryption, deviceStatus);
|
788
|
-
mActivateEncryption.setSummary(status);
|
789
|
-
}
|
790
|
-
|
791
|
-
@Override
|
792
|
-
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
793
|
-
if (super.onPreferenceChange(preference, newValue)) {
|
794
|
-
return true;
|
795
|
-
}
|
796
|
-
if (preference == mRequireEncryption) {
|
797
|
-
boolean newActive = (Boolean) newValue;
|
798
|
-
mDPM.setStorageEncryption(mDeviceAdminSample, newActive);
|
799
|
-
reloadSummaries();
|
800
|
-
return true;
|
801
|
-
}
|
802
|
-
return true;
|
803
|
-
}
|
804
|
-
|
805
|
-
@Override
|
806
|
-
public boolean onPreferenceClick(Preference preference) {
|
807
|
-
if (super.onPreferenceClick(preference)) {
|
808
|
-
return true;
|
809
|
-
}
|
810
|
-
if (preference == mActivateEncryption) {
|
811
|
-
if (alertIfMonkey(mActivity, R.string.monkey_encryption)) {
|
812
|
-
return true;
|
813
|
-
}
|
814
|
-
// Check to see if encryption is even supported on this device (it's optional).
|
815
|
-
if (mDPM.getStorageEncryptionStatus() ==
|
816
|
-
DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED) {
|
817
|
-
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
818
|
-
builder.setMessage(R.string.encryption_not_supported);
|
819
|
-
builder.setPositiveButton(R.string.encryption_not_supported_ok, null);
|
820
|
-
builder.show();
|
821
|
-
return true;
|
822
|
-
}
|
823
|
-
// Launch the activity to activate encryption. May or may not return!
|
824
|
-
Intent intent = new Intent(DevicePolicyManager.ACTION_START_ENCRYPTION);
|
825
|
-
startActivityForResult(intent, REQUEST_CODE_START_ENCRYPTION);
|
826
|
-
return true;
|
827
|
-
}
|
828
|
-
return false;
|
829
|
-
}
|
830
|
-
|
831
|
-
private String statusCodeToString(int newStatusCode) {
|
832
|
-
int newStatus = R.string.encryption_status_unknown;
|
833
|
-
switch (newStatusCode) {
|
834
|
-
case DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED:
|
835
|
-
newStatus = R.string.encryption_status_unsupported;
|
836
|
-
break;
|
837
|
-
case DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE:
|
838
|
-
newStatus = R.string.encryption_status_inactive;
|
839
|
-
break;
|
840
|
-
case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING:
|
841
|
-
newStatus = R.string.encryption_status_activating;
|
842
|
-
break;
|
843
|
-
case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE:
|
844
|
-
newStatus = R.string.encryption_status_active;
|
845
|
-
break;
|
846
|
-
}
|
847
|
-
return mActivity.getString(newStatus);
|
848
|
-
}
|
849
|
-
}
|
850
|
-
|
851
|
-
/**
|
852
|
-
* Simple converter used for long expiration times reported in mSec.
|
853
|
-
*/
|
854
|
-
private static String timeToDaysMinutesSeconds(Context context, long time) {
|
855
|
-
long days = time / MS_PER_DAY;
|
856
|
-
long hours = (time / MS_PER_HOUR) % 24;
|
857
|
-
long minutes = (time / MS_PER_MINUTE) % 60;
|
858
|
-
return context.getString(R.string.status_days_hours_minutes, days, hours, minutes);
|
859
|
-
}
|
860
|
-
|
861
|
-
/**
|
862
|
-
* If the "user" is a monkey, post an alert and notify the caller. This prevents automated
|
863
|
-
* test frameworks from stumbling into annoying or dangerous operations.
|
864
|
-
*/
|
865
|
-
private static boolean alertIfMonkey(Context context, int stringId) {
|
866
|
-
if (ActivityManager.isUserAMonkey()) {
|
867
|
-
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
868
|
-
builder.setMessage(stringId);
|
869
|
-
builder.setPositiveButton(R.string.monkey_ok, null);
|
870
|
-
builder.show();
|
871
|
-
return true;
|
872
|
-
} else {
|
873
|
-
return false;
|
874
|
-
}
|
875
|
-
}
|
876
|
-
|
877
|
-
/**
|
878
|
-
* Sample implementation of a DeviceAdminReceiver. Your controller must provide one,
|
879
|
-
* although you may or may not implement all of the methods shown here.
|
880
|
-
*
|
881
|
-
* All callbacks are on the UI thread and your implementations should not engage in any
|
882
|
-
* blocking operations, including disk I/O.
|
883
|
-
*/
|
884
|
-
public static class DeviceAdminSampleReceiver extends DeviceAdminReceiver {
|
885
|
-
void showToast(Context context, String msg) {
|
886
|
-
String status = context.getString(R.string.admin_receiver_status, msg);
|
887
|
-
Toast.makeText(context, status, Toast.LENGTH_SHORT).show();
|
888
|
-
}
|
889
|
-
|
890
|
-
@Override
|
891
|
-
public void onEnabled(Context context, Intent intent) {
|
892
|
-
showToast(context, context.getString(R.string.admin_receiver_status_enabled));
|
893
|
-
}
|
894
|
-
|
895
|
-
@Override
|
896
|
-
public CharSequence onDisableRequested(Context context, Intent intent) {
|
897
|
-
return context.getString(R.string.admin_receiver_status_disable_warning);
|
898
|
-
}
|
899
|
-
|
900
|
-
@Override
|
901
|
-
public void onDisabled(Context context, Intent intent) {
|
902
|
-
showToast(context, context.getString(R.string.admin_receiver_status_disabled));
|
903
|
-
}
|
904
|
-
|
905
|
-
@Override
|
906
|
-
public void onPasswordChanged(Context context, Intent intent) {
|
907
|
-
showToast(context, context.getString(R.string.admin_receiver_status_pw_changed));
|
908
|
-
}
|
909
|
-
|
910
|
-
@Override
|
911
|
-
public void onPasswordFailed(Context context, Intent intent) {
|
912
|
-
showToast(context, context.getString(R.string.admin_receiver_status_pw_failed));
|
913
|
-
}
|
914
|
-
|
915
|
-
@Override
|
916
|
-
public void onPasswordSucceeded(Context context, Intent intent) {
|
917
|
-
showToast(context, context.getString(R.string.admin_receiver_status_pw_succeeded));
|
918
|
-
}
|
919
|
-
|
920
|
-
@Override
|
921
|
-
public void onPasswordExpiring(Context context, Intent intent) {
|
922
|
-
DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(
|
923
|
-
Context.DEVICE_POLICY_SERVICE);
|
924
|
-
long expr = dpm.getPasswordExpiration(
|
925
|
-
new ComponentName(context, DeviceAdminSampleReceiver.class));
|
926
|
-
long delta = expr - System.currentTimeMillis();
|
927
|
-
boolean expired = delta < 0L;
|
928
|
-
String message = context.getString(expired ?
|
929
|
-
R.string.expiration_status_past : R.string.expiration_status_future);
|
930
|
-
showToast(context, message);
|
931
|
-
Log.v(TAG, message);
|
932
|
-
}
|
933
|
-
}
|
934
|
-
}
|