summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk5
-rw-r--r--api/current.txt374
-rw-r--r--core/java/android/app/ActivityManager.java2
-rw-r--r--core/java/android/app/ActivityTransitionCoordinator.java145
-rw-r--r--core/java/android/app/ActivityTransitionState.java5
-rw-r--r--core/java/android/app/EnterTransitionCoordinator.java179
-rw-r--r--core/java/android/app/ExitTransitionCoordinator.java60
-rw-r--r--core/java/android/app/INotificationManager.aidl4
-rw-r--r--core/java/android/app/usage/IUsageStatsManager.aidl9
-rw-r--r--core/java/android/app/usage/PackageUsageStats.java95
-rw-r--r--core/java/android/app/usage/TimeSparseArray.java26
-rw-r--r--core/java/android/app/usage/UsageEvents.aidl (renamed from core/java/android/app/usage/UsageStats.aidl)3
-rw-r--r--core/java/android/app/usage/UsageEvents.java283
-rw-r--r--core/java/android/app/usage/UsageStats.java200
-rw-r--r--core/java/android/app/usage/UsageStatsManager.java189
-rw-r--r--core/java/android/app/usage/UsageStatsManagerInternal.java2
-rw-r--r--core/java/android/appwidget/AppWidgetHost.java31
-rw-r--r--core/java/android/appwidget/AppWidgetManager.java37
-rw-r--r--core/java/android/appwidget/AppWidgetProviderInfo.java5
-rw-r--r--core/java/android/content/ContentProvider.java3
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.java7
-rw-r--r--core/java/android/hardware/hdmi/HdmiTvClient.java49
-rw-r--r--core/java/android/hardware/hdmi/IHdmiControlService.aidl2
-rw-r--r--core/java/android/provider/Settings.java17
-rw-r--r--core/java/android/service/notification/INotificationListener.aidl2
-rw-r--r--core/java/android/service/notification/NotificationListenerService.java61
-rw-r--r--core/java/android/service/voice/AlwaysOnHotwordDetector.java33
-rw-r--r--core/java/android/transition/Transition.java4
-rw-r--r--core/java/android/view/GhostView.java41
-rw-r--r--core/java/android/view/View.java3
-rw-r--r--core/java/android/view/ViewGroup.java2
-rw-r--r--core/java/android/view/ViewPropertyAnimator.java3
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java13
-rw-r--r--core/java/com/android/internal/appwidget/IAppWidgetService.aidl7
-rw-r--r--core/res/res/values/attrs.xml4
-rw-r--r--core/res/res/values/public.xml2
-rw-r--r--core/res/res/values/strings.xml4
-rw-r--r--graphics/java/android/graphics/drawable/RippleDrawable.java3
-rw-r--r--libs/hwui/Android.mk3
-rw-r--r--libs/hwui/Animator.cpp12
-rw-r--r--libs/hwui/Animator.h12
-rw-r--r--libs/hwui/AnimatorManager.cpp12
-rw-r--r--libs/hwui/AnimatorManager.h3
-rw-r--r--libs/hwui/DamageAccumulator.cpp5
-rw-r--r--libs/hwui/DamageAccumulator.h5
-rwxr-xr-xlibs/hwui/OpenGLRenderer.cpp1
-rw-r--r--libs/hwui/RenderNode.cpp23
-rw-r--r--libs/hwui/RenderNode.h3
-rw-r--r--media/java/android/media/tv/TvInputInfo.java171
-rw-r--r--media/java/android/media/tv/TvInputService.java68
-rw-r--r--packages/DocumentsUI/AndroidManifest.xml6
-rw-r--r--packages/DocumentsUI/res/color/root_activated.xml5
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am.pngbin441 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am_alpha.pngbin0 -> 486 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept.pngbin636 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept_alpha.pngbin0 -> 569 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel.pngbin763 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel_alpha.pngbin0 -> 587 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item.pngbin875 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item_alpha.pngbin0 -> 897 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_alpha.pngbin0 -> 980 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_dark.pngbin1018 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_light.pngbin1012 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_alpha.pngbin0 -> 970 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_dark.pngbin1139 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_light.pngbin1101 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.pngbin944 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_album_alpha.pngbin0 -> 958 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk.pngbin865 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk_alpha.pngbin0 -> 884 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_alpha.pngbin0 -> 868 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_dark_am.pngbin854 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_light_am.pngbin882 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate.pngbin901 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate_alpha.pngbin0 -> 911 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes.pngbin905 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes_alpha.pngbin0 -> 925 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed.pngbin591 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed_alpha.pngbin0 -> 576 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact.pngbin789 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am.pngbin982 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am_alpha.pngbin0 -> 792 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_event.pngbin653 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am.pngbin748 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am_alpha.pngbin0 -> 650 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel.pngbin794 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel_alpha.pngbin0 -> 811 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_folder_alpha.pngbin0 -> 558 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_font.pngbin926 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_font_alpha.pngbin0 -> 953 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.pngbin687 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am.pngbin754 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am_alpha.pngbin0 -> 675 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_alpha.pngbin0 -> 704 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_dark.pngbin690 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_light.pngbin702 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.pngbin828 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf_alpha.pngbin0 -> 841 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint.pngbin711 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint_alpha.pngbin0 -> 722 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation.pngbin548 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation_alpha.pngbin0 -> 531 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet.pngbin598 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am.pngbin763 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am_alpha.pngbin0 -> 584 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_text.pngbin565 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am.pngbin655 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am_alpha.pngbin0 -> 550 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_am_alpha.pngbin0 -> 721 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_dark_am.pngbin713 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_light_am.pngbin718 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_word.pngbin895 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_doc_word_alpha.pngbin0 -> 926 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_folder.pngbin635 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_folder_alpha.pngbin0 -> 601 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.pngbin863 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder_alpha.pngbin0 -> 865 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_hamburger.pngbin461 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_hamburger_alpha.pngbin0 -> 462 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy.pngbin767 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy_alpha.pngbin0 -> 785 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete.pngbin677 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete_alpha.pngbin0 -> 676 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am.pngbin1088 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am_alpha.pngbin0 -> 1057 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am.pngbin851 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am_alpha.pngbin0 -> 842 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.pngbin531 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow_alpha.pngbin0 -> 540 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am.pngbin852 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am_alpha.pngbin0 -> 868 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_search.pngbin1269 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_search_alpha.pngbin0 -> 1215 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings.pngbin1485 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings_alpha.pngbin0 -> 1279 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_share.pngbin1248 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_share_alpha.pngbin0 -> 1209 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am.pngbin507 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am_alpha.pngbin0 -> 511 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am.pngbin1306 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am_alpha.pngbin0 -> 1292 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid.pngbin513 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid_alpha.pngbin0 -> 519 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list.pngbin511 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list_alpha.pngbin0 -> 511 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_open_am.pngbin734 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_open_am_alpha.pngbin0 -> 722 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_popout_am.pngbin744 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_popout_am_alpha.pngbin0 -> 754 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_download_alpha.pngbin0 -> 1240 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_download_dark.pngbin1647 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_download_light.pngbin1753 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_am_alpha.pngbin0 -> 649 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_dark_am.pngbin644 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_light_am.pngbin659 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_alpha.pngbin0 -> 1294 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_dark.pngbin1556 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_light.pngbin1547 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_alpha.pngbin0 -> 737 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_dark.pngbin713 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_light.pngbin723 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_dark.pngbin1059 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light.pngbin1067 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light_alpha.pngbin0 -> 1064 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am.pngbin638 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am_alpha.pngbin0 -> 661 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am.pngbin433 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am_alpha.pngbin0 -> 403 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept.pngbin537 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept_alpha.pngbin0 -> 457 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel.pngbin603 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel_alpha.pngbin0 -> 464 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item.pngbin706 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item_alpha.pngbin0 -> 705 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_alpha.pngbin0 -> 736 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_dark.pngbin771 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_light.pngbin803 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_alpha.pngbin0 -> 726 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_dark.pngbin828 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_light.pngbin799 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.pngbin717 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_album_alpha.pngbin0 -> 690 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk.pngbin697 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk_alpha.pngbin0 -> 724 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_alpha.pngbin0 -> 698 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_dark_am.pngbin680 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_light_am.pngbin693 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate.pngbin672 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate_alpha.pngbin0 -> 693 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes.pngbin664 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes_alpha.pngbin0 -> 698 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed.pngbin523 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed_alpha.pngbin0 -> 547 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact.pngbin622 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am.pngbin760 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am_alpha.pngbin0 -> 642 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_event.pngbin608 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am.pngbin682 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am_alpha.pngbin0 -> 619 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel.pngbin619 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel_alpha.pngbin0 -> 601 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_folder_alpha.pngbin0 -> 492 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_font.pngbin680 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_font_alpha.pngbin0 -> 708 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.pngbin584 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am.pngbin644 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am_alpha.pngbin0 -> 594 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_alpha.pngbin0 -> 589 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_dark.pngbin564 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_light.pngbin584 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.pngbin611 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf_alpha.pngbin0 -> 657 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint.pngbin592 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint_alpha.pngbin0 -> 622 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation.pngbin497 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation_alpha.pngbin0 -> 517 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet.pngbin576 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am.pngbin630 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am_alpha.pngbin0 -> 594 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_text.pngbin513 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am.pngbin606 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am_alpha.pngbin0 -> 527 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_am_alpha.pngbin0 -> 576 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_dark_am.pngbin556 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_light_am.pngbin562 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_word.pngbin668 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_doc_word_alpha.pngbin0 -> 708 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_folder.pngbin543 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_folder_alpha.pngbin0 -> 516 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.pngbin649 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder_alpha.pngbin0 -> 638 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_hamburger.pngbin511 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_hamburger_alpha.pngbin0 -> 491 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy.pngbin669 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy_alpha.pngbin0 -> 651 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete.pngbin582 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete_alpha.pngbin0 -> 568 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am.pngbin815 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am_alpha.pngbin0 -> 767 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am.pngbin700 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am_alpha.pngbin0 -> 695 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.pngbin425 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow_alpha.pngbin0 -> 409 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am.pngbin704 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am_alpha.pngbin0 -> 711 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_search.pngbin875 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_search_alpha.pngbin0 -> 837 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings.pngbin1041 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings_alpha.pngbin0 -> 908 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_share.pngbin912 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_share_alpha.pngbin0 -> 853 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am.pngbin530 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am_alpha.pngbin0 -> 515 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am.pngbin915 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am_alpha.pngbin0 -> 873 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid.pngbin504 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid_alpha.pngbin0 -> 499 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list.pngbin628 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list_alpha.pngbin0 -> 633 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_open_am.pngbin588 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_open_am_alpha.pngbin0 -> 575 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_popout_am.pngbin650 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_popout_am_alpha.pngbin0 -> 662 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_download_alpha.pngbin0 -> 872 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_download_dark.pngbin1101 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_download_light.pngbin1157 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_am_alpha.pngbin0 -> 547 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_dark_am.pngbin531 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_light_am.pngbin542 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_alpha.pngbin0 -> 864 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_dark.pngbin1035 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_light.pngbin1051 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_alpha.pngbin0 -> 553 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_dark.pngbin560 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_light.pngbin574 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_dark.pngbin814 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light.pngbin843 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light_alpha.pngbin0 -> 813 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am.pngbin545 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am_alpha.pngbin0 -> 549 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am.pngbin528 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am_alpha.pngbin0 -> 568 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept.pngbin839 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept_alpha.pngbin0 -> 668 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel.pngbin961 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel_alpha.pngbin0 -> 671 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item.pngbin1042 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item_alpha.pngbin0 -> 1042 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_alpha.pngbin0 -> 1247 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_dark.pngbin1257 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_light.pngbin1308 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_alpha.pngbin0 -> 1177 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_dark.pngbin1350 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_light.pngbin1312 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.pngbin1212 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album_alpha.pngbin0 -> 1091 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk.pngbin1089 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk_alpha.pngbin0 -> 1139 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_alpha.pngbin0 -> 1043 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_dark_am.pngbin1041 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_light_am.pngbin1090 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate.pngbin1168 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate_alpha.pngbin0 -> 1149 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes.pngbin1127 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes_alpha.pngbin0 -> 1164 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed.pngbin690 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed_alpha.pngbin0 -> 683 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact.pngbin932 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am.pngbin1218 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am_alpha.pngbin0 -> 905 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event.pngbin743 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am.pngbin873 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am_alpha.pngbin0 -> 740 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel.pngbin1017 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel_alpha.pngbin0 -> 987 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_folder_alpha.pngbin0 -> 610 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font.pngbin1213 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font_alpha.pngbin0 -> 1260 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.pngbin778 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am.pngbin923 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am_alpha.pngbin0 -> 756 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_alpha.pngbin0 -> 831 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_dark.pngbin840 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_light.pngbin878 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.pngbin1055 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf_alpha.pngbin0 -> 1095 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint.pngbin833 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint_alpha.pngbin0 -> 859 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation.pngbin615 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation_alpha.pngbin0 -> 602 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet.pngbin712 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am.pngbin910 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am_alpha.pngbin0 -> 706 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text.pngbin645 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am.pngbin791 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am_alpha.pngbin0 -> 633 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_am_alpha.pngbin0 -> 801 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_dark_am.pngbin787 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_light_am.pngbin762 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word.pngbin1150 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word_alpha.pngbin0 -> 1207 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_folder.pngbin768 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_folder_alpha.pngbin0 -> 752 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.pngbin1066 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder_alpha.pngbin0 -> 1066 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger.pngbin576 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger_alpha.pngbin0 -> 555 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.pngbin950 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy_alpha.pngbin0 -> 965 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete.pngbin780 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete_alpha.pngbin0 -> 777 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am.pngbin1366 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am_alpha.pngbin0 -> 1306 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am.pngbin988 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am_alpha.pngbin0 -> 955 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.pngbin610 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow_alpha.pngbin0 -> 564 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am.pngbin1057 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am_alpha.pngbin0 -> 1075 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search.pngbin1670 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search_alpha.pngbin0 -> 1564 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings.pngbin1788 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings_alpha.pngbin0 -> 1584 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.pngbin1666 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share_alpha.pngbin0 -> 1598 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am.pngbin587 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am_alpha.pngbin0 -> 570 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am.pngbin1672 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am_alpha.pngbin0 -> 1590 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.pngbin600 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid_alpha.pngbin0 -> 596 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.pngbin807 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list_alpha.pngbin0 -> 824 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_open_am.pngbin885 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_open_am_alpha.pngbin0 -> 853 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am.pngbin911 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am_alpha.pngbin0 -> 954 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_alpha.pngbin0 -> 1573 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_dark.pngbin2212 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_light.pngbin2362 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_am_alpha.pngbin0 -> 785 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_dark_am.pngbin770 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_light_am.pngbin786 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_alpha.pngbin0 -> 1617 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_dark.pngbin2000 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_light.pngbin1982 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_alpha.pngbin0 -> 836 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_dark.pngbin828 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_light.pngbin837 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_dark.pngbin1303 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light.pngbin1372 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light_alpha.pngbin0 -> 1312 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am.pngbin802 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am_alpha.pngbin0 -> 777 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am.pngbin336 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am_alpha.pngbin0 -> 412 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept.pngbin649 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept_alpha.pngbin0 -> 573 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel.pngbin737 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel_alpha.pngbin0 -> 579 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item.pngbin789 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item_alpha.pngbin0 -> 776 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_alpha.pngbin0 -> 1072 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_dark.pngbin1023 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_light.pngbin997 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_alpha.pngbin0 -> 1056 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_dark.pngbin1157 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_light.pngbin1124 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.pngbin1169 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album_alpha.pngbin0 -> 840 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk.pngbin966 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk_alpha.pngbin0 -> 942 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_alpha.pngbin0 -> 757 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_dark_am.pngbin833 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_light_am.pngbin822 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate.pngbin1134 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate_alpha.pngbin0 -> 903 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes.pngbin1085 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes_alpha.pngbin0 -> 967 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed.pngbin483 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed_alpha.pngbin0 -> 422 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact.pngbin729 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am.pngbin1169 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am_alpha.pngbin0 -> 671 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event.pngbin509 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am.pngbin548 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am_alpha.pngbin0 -> 437 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel.pngbin963 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel_alpha.pngbin0 -> 667 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_folder_alpha.pngbin0 -> 404 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font.pngbin1235 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font_alpha.pngbin0 -> 1079 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.pngbin516 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am.pngbin590 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am_alpha.pngbin0 -> 483 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_alpha.pngbin0 -> 633 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_dark.pngbin683 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_light.pngbin660 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.pngbin1090 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf_alpha.pngbin0 -> 1082 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint.pngbin665 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint_alpha.pngbin0 -> 628 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation.pngbin451 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation_alpha.pngbin0 -> 395 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet.pngbin445 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am.pngbin674 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am_alpha.pngbin0 -> 393 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text.pngbin421 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am.pngbin519 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am_alpha.pngbin0 -> 398 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_am_alpha.pngbin0 -> 413 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_dark_am.pngbin492 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_light_am.pngbin478 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word.pngbin975 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word_alpha.pngbin0 -> 996 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_folder.pngbin559 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_folder_alpha.pngbin0 -> 506 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.pngbin904 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder_alpha.pngbin0 -> 962 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger.pngbin299 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger_alpha.pngbin0 -> 311 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.pngbin665 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy_alpha.pngbin0 -> 694 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete.pngbin510 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete_alpha.pngbin0 -> 556 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am.pngbin1240 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am_alpha.pngbin0 -> 1254 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am.pngbin669 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am_alpha.pngbin0 -> 702 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.pngbin525 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow_alpha.pngbin0 -> 590 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am.pngbin774 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am_alpha.pngbin0 -> 821 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search.pngbin1507 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search_alpha.pngbin0 -> 1399 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings.pngbin1639 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings_alpha.pngbin0 -> 1506 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.pngbin1521 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share_alpha.pngbin0 -> 1440 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am.pngbin320 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am_alpha.pngbin0 -> 331 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am.pngbin1515 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am_alpha.pngbin0 -> 1527 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.pngbin317 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid_alpha.pngbin0 -> 317 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.pngbin364 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list_alpha.pngbin0 -> 376 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am.pngbin636 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am_alpha.pngbin0 -> 667 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am.pngbin555 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am_alpha.pngbin0 -> 609 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_alpha.pngbin0 -> 1300 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_dark.pngbin2179 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_light.pngbin2165 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_am_alpha.pngbin0 -> 612 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_dark_am.pngbin601 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_light_am.pngbin581 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_alpha.pngbin0 -> 1490 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_dark.pngbin1810 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_light.pngbin1796 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_alpha.pngbin0 -> 628 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_dark.pngbin603 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_light.pngbin584 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_dark.pngbin1050 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light.pngbin1103 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light_alpha.pngbin0 -> 1090 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am.pngbin655 -> 0 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am_alpha.pngbin0 -> 617 bytes
-rw-r--r--packages/DocumentsUI/res/drawable/ic_breadcrumb_arrow.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_cab_accept.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_cab_cancel.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_cab_select_item.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_dialog_alert.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_dialog_info.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_album.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_apk.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_audio.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_audio_dark.xml23
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_audio_light.xml23
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_certificate.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_codes.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_compressed.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_contact.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_event.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_excel.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_folder.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_font.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_generic.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_image.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_pdf.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_powerpoint.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_presentation.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_text.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_video.xml5
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_video_dark.xml23
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_video_light.xml23
-rw-r--r--packages/DocumentsUI/res/drawable/ic_doc_word.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_folder.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_grid_folder.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_hamburger.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_copy.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_delete.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_disconnect.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_new_folder.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_overflow.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_rename.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_search.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_settings.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_share.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_sortby.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_undo.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_view_grid.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_menu_view_list.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_open.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_popout.xml24
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_download.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_folder.xml5
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_folder_dark.xml23
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_folder_light.xml23
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_recent.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_sdcard.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_root_usb_light.xml4
-rw-r--r--packages/DocumentsUI/res/drawable/ic_subdirectory_arrow.xml24
-rw-r--r--packages/DocumentsUI/res/menu/activity.xml7
-rw-r--r--packages/DocumentsUI/res/values/strings.xml20
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java17
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java66
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/IconUtils.java59
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java (renamed from packages/DocumentsUI/src/com/android/documentsui/SettingsActivity.java)40
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/RootsCache.java3
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java5
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java39
-rw-r--r--packages/DocumentsUI/wrap_alpha.py47
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java136
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java11
-rw-r--r--services/core/java/com/android/server/hdmi/Constants.java30
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java4
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiControlService.java141
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java107
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java35
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java2
-rw-r--r--services/core/java/com/android/server/wm/WindowStateAnimator.java2
-rw-r--r--services/usage/java/com/android/server/usage/IntervalStats.java81
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsDatabase.java151
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsService.java67
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsUtils.java10
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsXml.java95
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsXmlV1.java183
-rw-r--r--services/usage/java/com/android/server/usage/UserUsageStatsService.java240
-rw-r--r--telecomm/java/android/telecomm/Call.java4
-rw-r--r--telecomm/java/android/telecomm/CallState.java5
-rw-r--r--telecomm/java/android/telecomm/ConnectionService.java6
-rw-r--r--telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl16
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSession.aidl8
-rw-r--r--telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl47
-rw-r--r--telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl64
-rw-r--r--tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java13
-rw-r--r--tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java13
-rw-r--r--tests/UsageStatsTest/AndroidManifest.xml2
-rw-r--r--tests/UsageStatsTest/res/menu/main.xml5
-rw-r--r--tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java135
-rw-r--r--tests/UsageStatsTest/src/com/android/tests/usagestats/UsageStatsActivity.java52
603 files changed, 3018 insertions, 1813 deletions
diff --git a/Android.mk b/Android.mk
index 5485e9f..4a97c28 100644
--- a/Android.mk
+++ b/Android.mk
@@ -368,6 +368,8 @@ LOCAL_SRC_FILES += \
telephony/java/com/android/ims/internal/IImsStreamMediaSession.aidl \
telephony/java/com/android/ims/internal/IImsUt.aidl \
telephony/java/com/android/ims/internal/IImsUtListener.aidl \
+ telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl \
+ telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl \
telephony/java/com/android/ims/ImsConfigListener.aidl \
telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \
telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
@@ -452,7 +454,7 @@ aidl_files := \
frameworks/base/core/java/android/os/DropBoxManager.aidl \
frameworks/base/core/java/android/os/ParcelFileDescriptor.aidl \
frameworks/base/core/java/android/os/ParcelUuid.aidl \
- frameworks/base/core/java/android/os/PersistableBundle.aidl \
+ frameworks/base/core/java/android/os/PersistableBundle.aidl \
frameworks/base/core/java/android/print/PrinterInfo.aidl \
frameworks/base/core/java/android/print/PageRange.aidl \
frameworks/base/core/java/android/print/PrintAttributes.aidl \
@@ -460,6 +462,7 @@ aidl_files := \
frameworks/base/core/java/android/print/PrinterId.aidl \
frameworks/base/core/java/android/print/PrintJobId.aidl \
frameworks/base/core/java/android/print/PrintJobInfo.aidl \
+ frameworks/base/core/java/android/service/notification/StatusBarNotification.aidl \
frameworks/base/core/java/android/view/accessibility/AccessibilityEvent.aidl \
frameworks/base/core/java/android/view/accessibility/AccessibilityNodeInfo.aidl \
frameworks/base/core/java/android/view/accessibility/AccessibilityRecord.aidl \
diff --git a/api/current.txt b/api/current.txt
index da1ebae..87fd7df 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -272,14 +272,14 @@ package android {
field public static final int action = 16842797; // 0x101002d
field public static final int actionBarDivider = 16843675; // 0x101039b
field public static final int actionBarItemBackground = 16843676; // 0x101039c
- field public static final int actionBarPopupTheme = 16843919; // 0x101048f
+ field public static final int actionBarPopupTheme = 16843917; // 0x101048d
field public static final int actionBarSize = 16843499; // 0x10102eb
field public static final int actionBarSplitStyle = 16843656; // 0x1010388
field public static final int actionBarStyle = 16843470; // 0x10102ce
field public static final int actionBarTabBarStyle = 16843508; // 0x10102f4
field public static final int actionBarTabStyle = 16843507; // 0x10102f3
field public static final int actionBarTabTextStyle = 16843509; // 0x10102f5
- field public static final int actionBarTheme = 16843827; // 0x1010433
+ field public static final int actionBarTheme = 16843825; // 0x1010431
field public static final int actionBarWidgetTheme = 16843671; // 0x1010397
field public static final int actionButtonStyle = 16843480; // 0x10102d8
field public static final int actionDropDownStyle = 16843479; // 0x10102d7
@@ -291,15 +291,15 @@ package android {
field public static final int actionModeCloseDrawable = 16843484; // 0x10102dc
field public static final int actionModeCopyDrawable = 16843538; // 0x1010312
field public static final int actionModeCutDrawable = 16843537; // 0x1010311
- field public static final int actionModeFindDrawable = 16843900; // 0x101047c
+ field public static final int actionModeFindDrawable = 16843898; // 0x101047a
field public static final int actionModePasteDrawable = 16843539; // 0x1010313
field public static final int actionModeSelectAllDrawable = 16843646; // 0x101037e
- field public static final int actionModeShareDrawable = 16843899; // 0x101047b
+ field public static final int actionModeShareDrawable = 16843897; // 0x1010479
field public static final int actionModeSplitBackground = 16843677; // 0x101039d
field public static final int actionModeStyle = 16843668; // 0x1010394
- field public static final int actionModeWebSearchDrawable = 16843901; // 0x101047d
+ field public static final int actionModeWebSearchDrawable = 16843899; // 0x101047b
field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6
- field public static final int actionOverflowMenuStyle = 16843846; // 0x1010446
+ field public static final int actionOverflowMenuStyle = 16843844; // 0x1010444
field public static final int actionProviderClass = 16843657; // 0x1010389
field public static final int actionViewClass = 16843516; // 0x10102fc
field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd
@@ -326,8 +326,8 @@ package android {
field public static final int alphabeticShortcut = 16843235; // 0x10101e3
field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
- field public static final int amPmBackgroundColor = 16843944; // 0x10104a8
- field public static final int amPmTextColor = 16843943; // 0x10104a7
+ field public static final int amPmBackgroundColor = 16843942; // 0x10104a6
+ field public static final int amPmTextColor = 16843941; // 0x10104a5
field public static final int angle = 16843168; // 0x10101a0
field public static final int animateFirstView = 16843477; // 0x10102d5
field public static final int animateLayoutChanges = 16843506; // 0x10102f2
@@ -347,7 +347,7 @@ package android {
field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b
field public static final int autoLink = 16842928; // 0x10100b0
field public static final int autoMirrored = 16843754; // 0x10103ea
- field public static final int autoRemoveFromRecents = 16843849; // 0x1010449
+ field public static final int autoRemoveFromRecents = 16843847; // 0x1010447
field public static final int autoStart = 16843445; // 0x10102b5
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
@@ -356,8 +356,8 @@ package android {
field public static final int backgroundDimEnabled = 16843295; // 0x101021f
field public static final int backgroundSplit = 16843659; // 0x101038b
field public static final int backgroundStacked = 16843658; // 0x101038a
- field public static final int backgroundTint = 16843885; // 0x101046d
- field public static final int backgroundTintMode = 16843886; // 0x101046e
+ field public static final int backgroundTint = 16843883; // 0x101046b
+ field public static final int backgroundTintMode = 16843884; // 0x101046c
field public static final int backupAgent = 16843391; // 0x101027f
field public static final int banner = 16843762; // 0x10103f2
field public static final int baseline = 16843548; // 0x101031c
@@ -377,18 +377,18 @@ package android {
field public static final int bufferType = 16843086; // 0x101014e
field public static final int button = 16843015; // 0x1010107
field public static final int buttonBarButtonStyle = 16843567; // 0x101032f
- field public static final int buttonBarNegativeButtonStyle = 16843917; // 0x101048d
- field public static final int buttonBarNeutralButtonStyle = 16843916; // 0x101048c
- field public static final int buttonBarPositiveButtonStyle = 16843915; // 0x101048b
+ field public static final int buttonBarNegativeButtonStyle = 16843915; // 0x101048b
+ field public static final int buttonBarNeutralButtonStyle = 16843914; // 0x101048a
+ field public static final int buttonBarPositiveButtonStyle = 16843913; // 0x1010489
field public static final int buttonBarStyle = 16843566; // 0x101032e
field public static final int buttonStyle = 16842824; // 0x1010048
field public static final int buttonStyleInset = 16842826; // 0x101004a
field public static final int buttonStyleSmall = 16842825; // 0x1010049
field public static final int buttonStyleToggle = 16842827; // 0x101004b
- field public static final int buttonTint = 16843889; // 0x1010471
- field public static final int buttonTintMode = 16843890; // 0x1010472
+ field public static final int buttonTint = 16843887; // 0x101046f
+ field public static final int buttonTintMode = 16843888; // 0x1010470
field public static final int cacheColorHint = 16843009; // 0x1010101
- field public static final int calendarTextColor = 16843933; // 0x101049d
+ field public static final int calendarTextColor = 16843931; // 0x101049b
field public static final int calendarViewShown = 16843596; // 0x101034c
field public static final int calendarViewStyle = 16843613; // 0x101035d
field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
@@ -406,8 +406,8 @@ package android {
field public static final int centerY = 16843171; // 0x10101a3
field public static final int checkBoxPreferenceStyle = 16842895; // 0x101008f
field public static final int checkMark = 16843016; // 0x1010108
- field public static final int checkMarkTint = 16843946; // 0x10104aa
- field public static final int checkMarkTintMode = 16843947; // 0x10104ab
+ field public static final int checkMarkTint = 16843944; // 0x10104a8
+ field public static final int checkMarkTintMode = 16843945; // 0x10104a9
field public static final int checkable = 16843237; // 0x10101e5
field public static final int checkableBehavior = 16843232; // 0x10101e0
field public static final int checkboxStyle = 16842860; // 0x101006c
@@ -426,31 +426,31 @@ package android {
field public static final int clipChildren = 16842986; // 0x10100ea
field public static final int clipOrientation = 16843274; // 0x101020a
field public static final int clipToPadding = 16842987; // 0x10100eb
- field public static final int closeIcon = 16843907; // 0x1010483
+ field public static final int closeIcon = 16843905; // 0x1010481
field public static final int codes = 16843330; // 0x1010242
field public static final int collapseColumns = 16843083; // 0x101014b
field public static final int color = 16843173; // 0x10101a5
- field public static final int colorAccent = 16843831; // 0x1010437
+ field public static final int colorAccent = 16843829; // 0x1010435
field public static final int colorActivatedHighlight = 16843664; // 0x1010390
field public static final int colorBackground = 16842801; // 0x1010031
field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
- field public static final int colorButtonNormal = 16843821; // 0x101042d
- field public static final int colorControlActivated = 16843820; // 0x101042c
- field public static final int colorControlHighlight = 16843822; // 0x101042e
- field public static final int colorControlNormal = 16843819; // 0x101042b
+ field public static final int colorButtonNormal = 16843819; // 0x101042b
+ field public static final int colorControlActivated = 16843818; // 0x101042a
+ field public static final int colorControlHighlight = 16843820; // 0x101042c
+ field public static final int colorControlNormal = 16843817; // 0x1010429
field public static final int colorFocusedHighlight = 16843663; // 0x101038f
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
field public static final int colorLongPressedHighlight = 16843662; // 0x101038e
field public static final int colorMultiSelectHighlight = 16843665; // 0x1010391
field public static final int colorPressedHighlight = 16843661; // 0x101038d
- field public static final int colorPrimary = 16843829; // 0x1010435
- field public static final int colorPrimaryDark = 16843830; // 0x1010436
+ field public static final int colorPrimary = 16843827; // 0x1010433
+ field public static final int colorPrimaryDark = 16843828; // 0x1010434
field public static final int columnCount = 16843639; // 0x1010377
field public static final int columnDelay = 16843215; // 0x10101cf
field public static final int columnOrderPreserved = 16843640; // 0x1010378
field public static final int columnWidth = 16843031; // 0x1010117
- field public static final int commitIcon = 16843911; // 0x1010487
+ field public static final int commitIcon = 16843909; // 0x1010485
field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365
field public static final int completionHint = 16843122; // 0x1010172
field public static final int completionHintView = 16843123; // 0x1010173
@@ -461,11 +461,11 @@ package android {
field public static final int content = 16843355; // 0x101025b
field public static final int contentAuthority = 16843408; // 0x1010290
field public static final int contentDescription = 16843379; // 0x1010273
- field public static final int contentInsetEnd = 16843862; // 0x1010456
- field public static final int contentInsetLeft = 16843863; // 0x1010457
- field public static final int contentInsetRight = 16843864; // 0x1010458
- field public static final int contentInsetStart = 16843861; // 0x1010455
- field public static final int contentRatingSystemXml = 16843957; // 0x10104b5
+ field public static final int contentInsetEnd = 16843860; // 0x1010454
+ field public static final int contentInsetLeft = 16843861; // 0x1010455
+ field public static final int contentInsetRight = 16843862; // 0x1010456
+ field public static final int contentInsetStart = 16843859; // 0x1010453
+ field public static final int contentRatingSystemXml = 16843955; // 0x10104b3
field public static final int controlX1 = 16843798; // 0x1010416
field public static final int controlX2 = 16843800; // 0x1010418
field public static final int controlY1 = 16843799; // 0x1010417
@@ -478,12 +478,12 @@ package android {
field public static final int dashGap = 16843175; // 0x10101a7
field public static final int dashWidth = 16843174; // 0x10101a6
field public static final int data = 16842798; // 0x101002e
- field public static final int datePickerDialogTheme = 16843951; // 0x10104af
- field public static final int datePickerMode = 16843958; // 0x10104b6
+ field public static final int datePickerDialogTheme = 16843949; // 0x10104ad
+ field public static final int datePickerMode = 16843956; // 0x10104b4
field public static final int datePickerStyle = 16843612; // 0x101035c
field public static final int dateTextAppearance = 16843593; // 0x1010349
- field public static final int dayOfWeekBackgroundColor = 16843926; // 0x1010496
- field public static final int dayOfWeekTextAppearance = 16843927; // 0x1010497
+ field public static final int dayOfWeekBackgroundColor = 16843924; // 0x1010494
+ field public static final int dayOfWeekTextAppearance = 16843925; // 0x1010495
field public static final int debuggable = 16842767; // 0x101000f
field public static final int defaultValue = 16843245; // 0x10101ed
field public static final int delay = 16843212; // 0x10101cc
@@ -514,7 +514,7 @@ package android {
field public static final int dividerHorizontal = 16843564; // 0x101032c
field public static final int dividerPadding = 16843562; // 0x101032a
field public static final int dividerVertical = 16843530; // 0x101030a
- field public static final int documentLaunchMode = 16843847; // 0x1010447
+ field public static final int documentLaunchMode = 16843845; // 0x1010445
field public static final int drawSelectorOnTop = 16843004; // 0x10100fc
field public static final int drawable = 16843161; // 0x1010199
field public static final int drawableBottom = 16843118; // 0x101016e
@@ -543,8 +543,8 @@ package android {
field public static final int editTextStyle = 16842862; // 0x101006e
field public static final deprecated int editable = 16843115; // 0x101016b
field public static final int editorExtras = 16843300; // 0x1010224
- field public static final int elegantTextHeight = 16843871; // 0x101045f
- field public static final int elevation = 16843842; // 0x1010442
+ field public static final int elegantTextHeight = 16843869; // 0x101045d
+ field public static final int elevation = 16843840; // 0x1010440
field public static final int ellipsize = 16842923; // 0x10100ab
field public static final int ems = 16843096; // 0x1010158
field public static final int enabled = 16842766; // 0x101000e
@@ -554,10 +554,10 @@ package android {
field public static final int entries = 16842930; // 0x10100b2
field public static final int entryValues = 16843256; // 0x10101f8
field public static final int eventsInterceptionEnabled = 16843389; // 0x101027d
- field public static final int excludeClass = 16843844; // 0x1010444
+ field public static final int excludeClass = 16843842; // 0x1010442
field public static final int excludeFromRecents = 16842775; // 0x1010017
- field public static final int excludeId = 16843843; // 0x1010443
- field public static final int excludeName = 16843856; // 0x1010450
+ field public static final int excludeId = 16843841; // 0x1010441
+ field public static final int excludeName = 16843854; // 0x101044e
field public static final int exitFadeDuration = 16843533; // 0x101030d
field public static final int expandableListPreferredChildIndicatorLeft = 16842834; // 0x1010052
field public static final int expandableListPreferredChildIndicatorRight = 16842835; // 0x1010053
@@ -588,7 +588,7 @@ package android {
field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
field public static final int fillAfter = 16843197; // 0x10101bd
field public static final int fillBefore = 16843196; // 0x10101bc
- field public static final int fillColor = 16843807; // 0x101041f
+ field public static final int fillColor = 16843806; // 0x101041e
field public static final int fillEnabled = 16843343; // 0x101024f
field public static final int fillViewport = 16843130; // 0x101017a
field public static final int filter = 16843035; // 0x101011b
@@ -602,12 +602,12 @@ package android {
field public static final int focusableInTouchMode = 16842971; // 0x10100db
field public static final int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int fontFamily = 16843692; // 0x10103ac
- field public static final int fontFeatureSettings = 16843962; // 0x10104ba
+ field public static final int fontFeatureSettings = 16843960; // 0x10104b8
field public static final int footerDividersEnabled = 16843311; // 0x101022f
field public static final int foreground = 16843017; // 0x1010109
field public static final int foregroundGravity = 16843264; // 0x1010200
- field public static final int foregroundTint = 16843887; // 0x101046f
- field public static final int foregroundTintMode = 16843888; // 0x1010470
+ field public static final int foregroundTint = 16843885; // 0x101046d
+ field public static final int foregroundTintMode = 16843886; // 0x101046e
field public static final int format = 16843013; // 0x1010105
field public static final int format12Hour = 16843722; // 0x10103ca
field public static final int format24Hour = 16843723; // 0x10103cb
@@ -621,13 +621,13 @@ package android {
field public static final int freezesText = 16843116; // 0x101016c
field public static final int fromAlpha = 16843210; // 0x10101ca
field public static final int fromDegrees = 16843187; // 0x10101b3
- field public static final int fromId = 16843852; // 0x101044c
+ field public static final int fromId = 16843850; // 0x101044a
field public static final int fromScene = 16843741; // 0x10103dd
field public static final int fromXDelta = 16843206; // 0x10101c6
field public static final int fromXScale = 16843202; // 0x10101c2
field public static final int fromYDelta = 16843208; // 0x10101c8
field public static final int fromYScale = 16843204; // 0x10101c4
- field public static final int fullBackupOnly = 16843893; // 0x1010475
+ field public static final int fullBackupOnly = 16843891; // 0x1010473
field public static final int fullBright = 16842954; // 0x10100ca
field public static final int fullDark = 16842950; // 0x10100c6
field public static final int functionalTest = 16842787; // 0x1010023
@@ -640,7 +640,7 @@ package android {
field public static final int gestureStrokeType = 16843385; // 0x1010279
field public static final int gestureStrokeWidth = 16843380; // 0x1010274
field public static final int glEsVersion = 16843393; // 0x1010281
- field public static final int goIcon = 16843908; // 0x1010484
+ field public static final int goIcon = 16843906; // 0x1010482
field public static final int gradientRadius = 16843172; // 0x10101a4
field public static final int grantUriPermissions = 16842779; // 0x101001b
field public static final int gravity = 16842927; // 0x10100af
@@ -653,16 +653,16 @@ package android {
field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
field public static final int hardwareAccelerated = 16843475; // 0x10102d3
field public static final int hasCode = 16842764; // 0x101000c
- field public static final int headerAmPmTextAppearance = 16843938; // 0x10104a2
+ field public static final int headerAmPmTextAppearance = 16843936; // 0x10104a0
field public static final int headerBackground = 16843055; // 0x101012f
- field public static final int headerBackgroundColor = 16843939; // 0x10104a3
- field public static final int headerDayOfMonthTextAppearance = 16843929; // 0x1010499
+ field public static final int headerBackgroundColor = 16843937; // 0x10104a1
+ field public static final int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
field public static final int headerDividersEnabled = 16843310; // 0x101022e
- field public static final int headerMonthTextAppearance = 16843928; // 0x1010498
- field public static final int headerTimeTextAppearance = 16843937; // 0x10104a1
- field public static final int headerYearTextAppearance = 16843930; // 0x101049a
+ field public static final int headerMonthTextAppearance = 16843926; // 0x1010496
+ field public static final int headerTimeTextAppearance = 16843935; // 0x101049f
+ field public static final int headerYearTextAppearance = 16843928; // 0x1010498
field public static final int height = 16843093; // 0x1010155
- field public static final int hideOnContentScroll = 16843845; // 0x1010445
+ field public static final int hideOnContentScroll = 16843843; // 0x1010443
field public static final int hint = 16843088; // 0x1010150
field public static final int homeAsUpIndicator = 16843531; // 0x101030b
field public static final int homeLayout = 16843549; // 0x101031d
@@ -698,8 +698,8 @@ package android {
field public static final int indeterminateDuration = 16843069; // 0x101013d
field public static final int indeterminateOnly = 16843066; // 0x101013a
field public static final int indeterminateProgressStyle = 16843544; // 0x1010318
- field public static final int indeterminateTint = 16843883; // 0x101046b
- field public static final int indeterminateTintMode = 16843884; // 0x101046c
+ field public static final int indeterminateTint = 16843881; // 0x1010469
+ field public static final int indeterminateTintMode = 16843882; // 0x101046a
field public static final int indicatorEnd = 16843730; // 0x10103d2
field public static final int indicatorLeft = 16843021; // 0x101010d
field public static final int indicatorRight = 16843022; // 0x101010e
@@ -712,7 +712,7 @@ package android {
field public static final int innerRadiusRatio = 16843163; // 0x101019b
field public static final deprecated int inputMethod = 16843112; // 0x1010168
field public static final int inputType = 16843296; // 0x1010220
- field public static final int inset = 16843960; // 0x10104b8
+ field public static final int inset = 16843958; // 0x10104b6
field public static final int insetBottom = 16843194; // 0x10101ba
field public static final int insetLeft = 16843191; // 0x10101b7
field public static final int insetRight = 16843192; // 0x10101b8
@@ -786,8 +786,8 @@ package android {
field public static final int largeScreens = 16843398; // 0x1010286
field public static final int largestWidthLimitDp = 16843622; // 0x1010366
field public static final int launchMode = 16842781; // 0x101001d
- field public static final int launchTaskBehindBackgroundAnimation = 16843923; // 0x1010493
- field public static final int launchTaskBehindSourceAnimation = 16843924; // 0x1010494
+ field public static final int launchTaskBehindBackgroundAnimation = 16843921; // 0x1010491
+ field public static final int launchTaskBehindSourceAnimation = 16843922; // 0x1010492
field public static final int layerType = 16843604; // 0x1010354
field public static final int layout = 16842994; // 0x10100f2
field public static final int layoutAnimation = 16842988; // 0x10100ec
@@ -814,7 +814,7 @@ package android {
field public static final int layout_centerVertical = 16843153; // 0x1010191
field public static final int layout_column = 16843084; // 0x101014c
field public static final int layout_columnSpan = 16843645; // 0x101037d
- field public static final int layout_columnWeight = 16843867; // 0x101045b
+ field public static final int layout_columnWeight = 16843865; // 0x1010459
field public static final int layout_gravity = 16842931; // 0x10100b3
field public static final int layout_height = 16842997; // 0x10100f5
field public static final int layout_margin = 16842998; // 0x10100f6
@@ -826,7 +826,7 @@ package android {
field public static final int layout_marginTop = 16843000; // 0x10100f8
field public static final int layout_row = 16843643; // 0x101037b
field public static final int layout_rowSpan = 16843644; // 0x101037c
- field public static final int layout_rowWeight = 16843866; // 0x101045a
+ field public static final int layout_rowWeight = 16843864; // 0x1010458
field public static final int layout_scale = 16843155; // 0x1010193
field public static final int layout_span = 16843085; // 0x101014d
field public static final int layout_toEndOf = 16843704; // 0x10103b8
@@ -838,7 +838,7 @@ package android {
field public static final int layout_x = 16843135; // 0x101017f
field public static final int layout_y = 16843136; // 0x1010180
field public static final int left = 16843181; // 0x10101ad
- field public static final int letterSpacing = 16843961; // 0x10104b9
+ field public static final int letterSpacing = 16843959; // 0x10104b7
field public static final int lineSpacingExtra = 16843287; // 0x1010217
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
field public static final int lines = 16843092; // 0x1010154
@@ -866,7 +866,7 @@ package android {
field public static final int manageSpaceActivity = 16842756; // 0x1010004
field public static final int mapViewStyle = 16842890; // 0x101008a
field public static final int marqueeRepeatLimit = 16843293; // 0x101021d
- field public static final int matchOrder = 16843857; // 0x1010451
+ field public static final int matchOrder = 16843855; // 0x101044f
field public static final int max = 16843062; // 0x1010136
field public static final int maxDate = 16843584; // 0x1010340
field public static final int maxEms = 16843095; // 0x1010157
@@ -875,11 +875,11 @@ package android {
field public static final int maxLength = 16843104; // 0x1010160
field public static final int maxLevel = 16843186; // 0x10101b2
field public static final int maxLines = 16843091; // 0x1010153
- field public static final int maxRecents = 16843848; // 0x1010448
+ field public static final int maxRecents = 16843846; // 0x1010446
field public static final int maxRows = 16843059; // 0x1010133
field public static final int maxSdkVersion = 16843377; // 0x1010271
field public static final int maxWidth = 16843039; // 0x101011f
- field public static final int maximumAngle = 16843905; // 0x1010481
+ field public static final int maximumAngle = 16843903; // 0x101047f
field public static final int measureAllChildren = 16843018; // 0x101010a
field public static final int measureWithLargestChild = 16843476; // 0x10102d4
field public static final int mediaRouteButtonStyle = 16843693; // 0x10103ad
@@ -895,19 +895,19 @@ package android {
field public static final int minResizeWidth = 16843669; // 0x1010395
field public static final int minSdkVersion = 16843276; // 0x101020c
field public static final int minWidth = 16843071; // 0x101013f
- field public static final int minimumHorizontalAngle = 16843903; // 0x101047f
- field public static final int minimumVerticalAngle = 16843904; // 0x1010480
+ field public static final int minimumHorizontalAngle = 16843901; // 0x101047d
+ field public static final int minimumVerticalAngle = 16843902; // 0x101047e
field public static final int mipMap = 16843725; // 0x10103cd
field public static final int mirrorForRtl = 16843726; // 0x10103ce
field public static final int mode = 16843134; // 0x101017e
field public static final int moreIcon = 16843061; // 0x1010135
- field public static final int multiArch = 16843920; // 0x1010490
+ field public static final int multiArch = 16843918; // 0x101048e
field public static final int multiprocess = 16842771; // 0x1010013
field public static final int name = 16842755; // 0x1010003
- field public static final int navigationBarColor = 16843860; // 0x1010454
+ field public static final int navigationBarColor = 16843858; // 0x1010452
field public static final int navigationMode = 16843471; // 0x10102cf
field public static final int negativeButtonText = 16843254; // 0x10101f6
- field public static final int nestedScrollingEnabled = 16843832; // 0x1010438
+ field public static final int nestedScrollingEnabled = 16843830; // 0x1010436
field public static final int nextFocusDown = 16842980; // 0x10100e4
field public static final int nextFocusForward = 16843580; // 0x101033c
field public static final int nextFocusLeft = 16842977; // 0x10100e1
@@ -918,9 +918,9 @@ package android {
field public static final int notificationTimeout = 16843651; // 0x1010383
field public static final int numColumns = 16843032; // 0x1010118
field public static final int numStars = 16843076; // 0x1010144
- field public static final int numbersBackgroundColor = 16843941; // 0x10104a5
- field public static final int numbersSelectorColor = 16843942; // 0x10104a6
- field public static final int numbersTextColor = 16843940; // 0x10104a4
+ field public static final int numbersBackgroundColor = 16843939; // 0x10104a3
+ field public static final int numbersSelectorColor = 16843940; // 0x10104a4
+ field public static final int numbersTextColor = 16843938; // 0x10104a2
field public static final deprecated int numeric = 16843109; // 0x1010165
field public static final int numericShortcut = 16843236; // 0x10101e4
field public static final int onClick = 16843375; // 0x101026f
@@ -935,14 +935,14 @@ package android {
field public static final int overScrollFooter = 16843459; // 0x10102c3
field public static final int overScrollHeader = 16843458; // 0x10102c2
field public static final int overScrollMode = 16843457; // 0x10102c1
- field public static final int overlapAnchor = 16843876; // 0x1010464
+ field public static final int overlapAnchor = 16843874; // 0x1010462
field public static final int overridesImplicitlyEnabledSubtype = 16843682; // 0x10103a2
field public static final int packageNames = 16843649; // 0x1010381
field public static final int padding = 16842965; // 0x10100d5
field public static final int paddingBottom = 16842969; // 0x10100d9
field public static final int paddingEnd = 16843700; // 0x10103b4
field public static final int paddingLeft = 16842966; // 0x10100d6
- field public static final int paddingMode = 16843865; // 0x1010459
+ field public static final int paddingMode = 16843863; // 0x1010457
field public static final int paddingRight = 16842968; // 0x10100d8
field public static final int paddingStart = 16843699; // 0x10103b3
field public static final int paddingTop = 16842967; // 0x10100d7
@@ -954,14 +954,14 @@ package android {
field public static final int parentActivityName = 16843687; // 0x10103a7
field public static final deprecated int password = 16843100; // 0x101015c
field public static final int path = 16842794; // 0x101002a
- field public static final int pathData = 16843808; // 0x1010420
+ field public static final int pathData = 16843807; // 0x101041f
field public static final int pathPattern = 16842796; // 0x101002c
field public static final int pathPrefix = 16842795; // 0x101002b
field public static final int permission = 16842758; // 0x1010006
field public static final int permissionFlags = 16843719; // 0x10103c7
field public static final int permissionGroup = 16842762; // 0x101000a
field public static final int permissionGroupFlags = 16843717; // 0x10103c5
- field public static final int persistableMode = 16843823; // 0x101042f
+ field public static final int persistableMode = 16843821; // 0x101042d
field public static final int persistent = 16842765; // 0x101000d
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
@@ -970,11 +970,11 @@ package android {
field public static final int popupAnimationStyle = 16843465; // 0x10102c9
field public static final int popupBackground = 16843126; // 0x1010176
field public static final int popupCharacters = 16843332; // 0x1010244
- field public static final int popupElevation = 16843918; // 0x101048e
+ field public static final int popupElevation = 16843916; // 0x101048c
field public static final int popupKeyboard = 16843331; // 0x1010243
field public static final int popupLayout = 16843323; // 0x101023b
field public static final int popupMenuStyle = 16843520; // 0x1010300
- field public static final int popupTheme = 16843948; // 0x10104ac
+ field public static final int popupTheme = 16843946; // 0x10104aa
field public static final int popupWindowStyle = 16842870; // 0x1010076
field public static final int port = 16842793; // 0x1010029
field public static final int positiveButtonText = 16843253; // 0x10101f5
@@ -989,8 +989,8 @@ package android {
field public static final int privateImeOptions = 16843299; // 0x1010223
field public static final int process = 16842769; // 0x1010011
field public static final int progress = 16843063; // 0x1010137
- field public static final int progressBackgroundTint = 16843879; // 0x1010467
- field public static final int progressBackgroundTintMode = 16843880; // 0x1010468
+ field public static final int progressBackgroundTint = 16843877; // 0x1010465
+ field public static final int progressBackgroundTintMode = 16843878; // 0x1010466
field public static final int progressBarPadding = 16843545; // 0x1010319
field public static final int progressBarStyle = 16842871; // 0x1010077
field public static final int progressBarStyleHorizontal = 16842872; // 0x1010078
@@ -1001,17 +1001,17 @@ package android {
field public static final int progressBarStyleSmallInverse = 16843400; // 0x1010288
field public static final int progressBarStyleSmallTitle = 16843279; // 0x101020f
field public static final int progressDrawable = 16843068; // 0x101013c
- field public static final int progressTint = 16843877; // 0x1010465
- field public static final int progressTintMode = 16843878; // 0x1010466
+ field public static final int progressTint = 16843875; // 0x1010463
+ field public static final int progressTintMode = 16843876; // 0x1010464
field public static final int prompt = 16843131; // 0x101017b
field public static final int propertyName = 16843489; // 0x10102e1
- field public static final int propertyXName = 16843894; // 0x1010476
- field public static final int propertyYName = 16843895; // 0x1010477
+ field public static final int propertyXName = 16843892; // 0x1010474
+ field public static final int propertyYName = 16843893; // 0x1010475
field public static final int protectionLevel = 16842761; // 0x1010009
field public static final int publicKey = 16843686; // 0x10103a6
field public static final int queryActionMsg = 16843227; // 0x10101db
field public static final int queryAfterZeroResults = 16843394; // 0x1010282
- field public static final int queryBackground = 16843913; // 0x1010489
+ field public static final int queryBackground = 16843911; // 0x1010487
field public static final int queryHint = 16843608; // 0x1010358
field public static final int quickContactBadgeStyleSmallWindowLarge = 16843443; // 0x10102b3
field public static final int quickContactBadgeStyleSmallWindowMedium = 16843442; // 0x10102b2
@@ -1026,8 +1026,8 @@ package android {
field public static final int ratingBarStyleIndicator = 16843280; // 0x1010210
field public static final int ratingBarStyleSmall = 16842877; // 0x101007d
field public static final int readPermission = 16842759; // 0x1010007
- field public static final int recognitionService = 16843934; // 0x101049e
- field public static final int relinquishTaskIdentity = 16843896; // 0x1010478
+ field public static final int recognitionService = 16843932; // 0x101049c
+ field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
field public static final int repeatCount = 16843199; // 0x10101bf
field public static final int repeatMode = 16843200; // 0x10101c0
field public static final int reqFiveWayNav = 16843314; // 0x1010232
@@ -1039,7 +1039,7 @@ package android {
field public static final int required = 16843406; // 0x101028e
field public static final int requiredAccountType = 16843734; // 0x10103d6
field public static final int requiredForAllUsers = 16843728; // 0x10103d0
- field public static final int requiredForProfile = 16843818; // 0x101042a
+ field public static final int requiredForProfile = 16843816; // 0x1010428
field public static final int requiresFadingEdge = 16843685; // 0x10103a5
field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364
field public static final int resizeMode = 16843619; // 0x1010363
@@ -1048,8 +1048,8 @@ package android {
field public static final int restoreAnyVersion = 16843450; // 0x10102ba
field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
field public static final int restrictedAccountType = 16843733; // 0x10103d5
- field public static final int restrictionType = 16843925; // 0x1010495
- field public static final int reversible = 16843853; // 0x101044d
+ field public static final int restrictionType = 16843923; // 0x1010493
+ field public static final int reversible = 16843851; // 0x101044b
field public static final int right = 16843183; // 0x10101af
field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
field public static final int ringtoneType = 16843257; // 0x10101f9
@@ -1089,7 +1089,7 @@ package android {
field public static final int scrollbars = 16842974; // 0x10100de
field public static final int scrollingCache = 16843006; // 0x10100fe
field public static final deprecated int searchButtonText = 16843269; // 0x1010205
- field public static final int searchIcon = 16843909; // 0x1010485
+ field public static final int searchIcon = 16843907; // 0x1010483
field public static final int searchMode = 16843221; // 0x10101d5
field public static final int searchSettingsDescription = 16843402; // 0x101028a
field public static final int searchSuggestAuthority = 16843222; // 0x10101d6
@@ -1098,19 +1098,19 @@ package android {
field public static final int searchSuggestPath = 16843223; // 0x10101d7
field public static final int searchSuggestSelection = 16843224; // 0x10101d8
field public static final int searchSuggestThreshold = 16843373; // 0x101026d
- field public static final int searchViewStyle = 16843906; // 0x1010482
+ field public static final int searchViewStyle = 16843904; // 0x1010480
field public static final int secondaryProgress = 16843064; // 0x1010138
- field public static final int secondaryProgressTint = 16843881; // 0x1010469
- field public static final int secondaryProgressTintMode = 16843882; // 0x101046a
+ field public static final int secondaryProgressTint = 16843879; // 0x1010467
+ field public static final int secondaryProgressTintMode = 16843880; // 0x1010468
field public static final int seekBarStyle = 16842875; // 0x101007b
field public static final int segmentedButtonStyle = 16843568; // 0x1010330
field public static final int selectAllOnFocus = 16843102; // 0x101015e
field public static final int selectable = 16843238; // 0x10101e6
field public static final int selectableItemBackground = 16843534; // 0x101030e
- field public static final int selectableItemBackgroundBorderless = 16843870; // 0x101045e
+ field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c
field public static final int selectedDateVerticalBar = 16843591; // 0x1010347
field public static final int selectedWeekBackgroundColor = 16843586; // 0x1010342
- field public static final int sessionService = 16843839; // 0x101043f
+ field public static final int sessionService = 16843837; // 0x101043d
field public static final int settingsActivity = 16843301; // 0x1010225
field public static final int setupActivity = 16843766; // 0x10103f6
field public static final int shadowColor = 16843105; // 0x1010161
@@ -1127,13 +1127,13 @@ package android {
field public static final int showDividers = 16843561; // 0x1010329
field public static final int showOnLockScreen = 16843721; // 0x10103c9
field public static final int showSilent = 16843259; // 0x10101fb
- field public static final int showText = 16843952; // 0x10104b0
+ field public static final int showText = 16843950; // 0x10104ae
field public static final int showWeekNumber = 16843582; // 0x101033e
field public static final int shownWeekCount = 16843585; // 0x1010341
field public static final int shrinkColumns = 16843082; // 0x101014a
field public static final deprecated int singleLine = 16843101; // 0x101015d
field public static final int singleUser = 16843711; // 0x10103bf
- field public static final int slideEdge = 16843826; // 0x1010432
+ field public static final int slideEdge = 16843824; // 0x1010430
field public static final int smallIcon = 16843422; // 0x101029e
field public static final int smallScreens = 16843396; // 0x1010284
field public static final int smoothScrollbar = 16843313; // 0x1010231
@@ -1145,19 +1145,19 @@ package android {
field public static final int spinnerStyle = 16842881; // 0x1010081
field public static final int spinnersShown = 16843595; // 0x101034b
field public static final int splitMotionEvents = 16843503; // 0x10102ef
- field public static final int splitTrack = 16843854; // 0x101044e
+ field public static final int splitTrack = 16843852; // 0x101044c
field public static final int src = 16843033; // 0x1010119
field public static final int ssp = 16843747; // 0x10103e3
field public static final int sspPattern = 16843749; // 0x10103e5
field public static final int sspPrefix = 16843748; // 0x10103e4
field public static final int stackFromBottom = 16843005; // 0x10100fd
- field public static final int stackViewStyle = 16843840; // 0x1010440
+ field public static final int stackViewStyle = 16843838; // 0x101043e
field public static final int starStyle = 16842882; // 0x1010082
field public static final int startColor = 16843165; // 0x101019d
field public static final int startDelay = 16843746; // 0x10103e2
field public static final int startOffset = 16843198; // 0x10101be
field public static final deprecated int startYear = 16843132; // 0x101017c
- field public static final int stateListAnimator = 16843850; // 0x101044a
+ field public static final int stateListAnimator = 16843848; // 0x1010448
field public static final int stateNotNeeded = 16842774; // 0x1010016
field public static final int state_above_anchor = 16842922; // 0x10100aa
field public static final int state_accelerated = 16843547; // 0x101031b
@@ -1182,27 +1182,27 @@ package android {
field public static final int state_single = 16842915; // 0x10100a3
field public static final int state_window_focused = 16842909; // 0x101009d
field public static final int staticWallpaperPreview = 16843569; // 0x1010331
- field public static final int statusBarColor = 16843859; // 0x1010453
+ field public static final int statusBarColor = 16843857; // 0x1010451
field public static final int stepSize = 16843078; // 0x1010146
field public static final int stopWithTask = 16843626; // 0x101036a
field public static final int streamType = 16843273; // 0x1010209
field public static final int stretchColumns = 16843081; // 0x1010149
field public static final int stretchMode = 16843030; // 0x1010116
- field public static final int strokeColor = 16843809; // 0x1010421
- field public static final int strokeLineCap = 16843815; // 0x1010427
- field public static final int strokeLineJoin = 16843816; // 0x1010428
- field public static final int strokeMiterLimit = 16843817; // 0x1010429
- field public static final int strokeWidth = 16843811; // 0x1010423
- field public static final int submitBackground = 16843914; // 0x101048a
+ field public static final int strokeColor = 16843808; // 0x1010420
+ field public static final int strokeLineCap = 16843813; // 0x1010425
+ field public static final int strokeLineJoin = 16843814; // 0x1010426
+ field public static final int strokeMiterLimit = 16843815; // 0x1010427
+ field public static final int strokeWidth = 16843809; // 0x1010421
+ field public static final int submitBackground = 16843912; // 0x1010488
field public static final int subtitle = 16843473; // 0x10102d1
- field public static final int subtitleTextAppearance = 16843825; // 0x1010431
+ field public static final int subtitleTextAppearance = 16843823; // 0x101042f
field public static final int subtitleTextStyle = 16843513; // 0x10102f9
field public static final int subtypeExtraValue = 16843674; // 0x101039a
field public static final int subtypeId = 16843713; // 0x10103c1
field public static final int subtypeLocale = 16843673; // 0x1010399
field public static final int suggestActionMsg = 16843228; // 0x10101dc
field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd
- field public static final int suggestionRowLayout = 16843912; // 0x1010488
+ field public static final int suggestionRowLayout = 16843910; // 0x1010486
field public static final int summary = 16843241; // 0x10101e9
field public static final int summaryColumn = 16843426; // 0x10102a2
field public static final int summaryOff = 16843248; // 0x10101f0
@@ -1213,7 +1213,7 @@ package android {
field public static final int switchMinWidth = 16843632; // 0x1010370
field public static final int switchPadding = 16843633; // 0x1010371
field public static final int switchPreferenceStyle = 16843629; // 0x101036d
- field public static final int switchStyle = 16843841; // 0x1010441
+ field public static final int switchStyle = 16843839; // 0x101043f
field public static final int switchTextAppearance = 16843630; // 0x101036e
field public static final int switchTextOff = 16843628; // 0x101036c
field public static final int switchTextOn = 16843627; // 0x101036b
@@ -1227,7 +1227,7 @@ package android {
field public static final int targetClass = 16842799; // 0x101002f
field public static final int targetDescriptions = 16843680; // 0x10103a0
field public static final int targetId = 16843740; // 0x10103dc
- field public static final int targetName = 16843855; // 0x101044f
+ field public static final int targetName = 16843853; // 0x101044d
field public static final int targetPackage = 16842785; // 0x1010021
field public static final int targetSdkVersion = 16843376; // 0x1010270
field public static final int taskAffinity = 16842770; // 0x1010012
@@ -1251,7 +1251,7 @@ package android {
field public static final int textAppearanceLargeInverse = 16842819; // 0x1010043
field public static final int textAppearanceLargePopupMenu = 16843521; // 0x1010301
field public static final int textAppearanceListItem = 16843678; // 0x101039e
- field public static final int textAppearanceListItemSecondary = 16843828; // 0x1010434
+ field public static final int textAppearanceListItemSecondary = 16843826; // 0x1010432
field public static final int textAppearanceListItemSmall = 16843679; // 0x101039f
field public static final int textAppearanceMedium = 16842817; // 0x1010041
field public static final int textAppearanceMediumInverse = 16842820; // 0x1010044
@@ -1308,38 +1308,38 @@ package android {
field public static final int thumb = 16843074; // 0x1010142
field public static final int thumbOffset = 16843075; // 0x1010143
field public static final int thumbTextPadding = 16843634; // 0x1010372
- field public static final int thumbTint = 16843891; // 0x1010473
- field public static final int thumbTintMode = 16843892; // 0x1010474
+ field public static final int thumbTint = 16843889; // 0x1010471
+ field public static final int thumbTintMode = 16843890; // 0x1010472
field public static final int thumbnail = 16843429; // 0x10102a5
field public static final int tileMode = 16843265; // 0x1010201
- field public static final int tileModeX = 16843897; // 0x1010479
- field public static final int tileModeY = 16843898; // 0x101047a
- field public static final int timePickerDialogTheme = 16843936; // 0x10104a0
- field public static final int timePickerMode = 16843959; // 0x10104b7
- field public static final int timePickerStyle = 16843935; // 0x101049f
+ field public static final int tileModeX = 16843895; // 0x1010477
+ field public static final int tileModeY = 16843896; // 0x1010478
+ field public static final int timePickerDialogTheme = 16843934; // 0x101049e
+ field public static final int timePickerMode = 16843957; // 0x10104b5
+ field public static final int timePickerStyle = 16843933; // 0x101049d
field public static final int timeZone = 16843724; // 0x10103cc
field public static final int tint = 16843041; // 0x1010121
field public static final int tintMode = 16843797; // 0x1010415
field public static final int title = 16843233; // 0x10101e1
field public static final int titleCondensed = 16843234; // 0x10101e2
- field public static final int titleTextAppearance = 16843824; // 0x1010430
+ field public static final int titleTextAppearance = 16843822; // 0x101042e
field public static final int titleTextStyle = 16843512; // 0x10102f8
field public static final int toAlpha = 16843211; // 0x10101cb
field public static final int toDegrees = 16843188; // 0x10101b4
- field public static final int toId = 16843851; // 0x101044b
+ field public static final int toId = 16843849; // 0x1010449
field public static final int toScene = 16843742; // 0x10103de
field public static final int toXDelta = 16843207; // 0x10101c7
field public static final int toXScale = 16843203; // 0x10101c3
field public static final int toYDelta = 16843209; // 0x10101c9
field public static final int toYScale = 16843205; // 0x10101c5
- field public static final int toolbarStyle = 16843949; // 0x10104ad
+ field public static final int toolbarStyle = 16843947; // 0x10104ab
field public static final int top = 16843182; // 0x10101ae
field public static final int topBright = 16842955; // 0x10100cb
field public static final int topDark = 16842951; // 0x10100c7
field public static final int topLeftRadius = 16843177; // 0x10101a9
field public static final int topOffset = 16843352; // 0x1010258
field public static final int topRightRadius = 16843178; // 0x10101aa
- field public static final int touchscreenBlocksFocus = 16843921; // 0x1010491
+ field public static final int touchscreenBlocksFocus = 16843919; // 0x101048f
field public static final int track = 16843631; // 0x101036f
field public static final int transcriptMode = 16843008; // 0x1010100
field public static final int transformPivotX = 16843552; // 0x1010320
@@ -1348,14 +1348,14 @@ package android {
field public static final int transitionGroup = 16843803; // 0x101041b
field public static final int transitionName = 16843802; // 0x101041a
field public static final int transitionOrdering = 16843744; // 0x10103e0
- field public static final int translateX = 16843868; // 0x101045c
- field public static final int translateY = 16843869; // 0x101045d
+ field public static final int translateX = 16843866; // 0x101045a
+ field public static final int translateY = 16843867; // 0x101045b
field public static final int translationX = 16843554; // 0x1010322
field public static final int translationY = 16843555; // 0x1010323
field public static final int translationZ = 16843796; // 0x1010414
- field public static final int trimPathEnd = 16843813; // 0x1010425
- field public static final int trimPathOffset = 16843814; // 0x1010426
- field public static final int trimPathStart = 16843812; // 0x1010424
+ field public static final int trimPathEnd = 16843811; // 0x1010423
+ field public static final int trimPathOffset = 16843812; // 0x1010424
+ field public static final int trimPathStart = 16843810; // 0x1010422
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
@@ -1383,10 +1383,10 @@ package android {
field public static final int viewportHeight = 16843805; // 0x101041d
field public static final int viewportWidth = 16843804; // 0x101041c
field public static final int visibility = 16842972; // 0x10100dc
- field public static final int visibilityMode = 16843902; // 0x101047e
+ field public static final int visibilityMode = 16843900; // 0x101047c
field public static final int visible = 16843156; // 0x1010194
field public static final int vmSafeMode = 16843448; // 0x10102b8
- field public static final int voiceIcon = 16843910; // 0x1010486
+ field public static final int voiceIcon = 16843908; // 0x1010484
field public static final int voiceLanguage = 16843349; // 0x1010255
field public static final int voiceLanguageModel = 16843347; // 0x1010253
field public static final int voiceMaxResults = 16843350; // 0x1010256
@@ -1412,23 +1412,23 @@ package android {
field public static final int windowActionBar = 16843469; // 0x10102cd
field public static final int windowActionBarOverlay = 16843492; // 0x10102e4
field public static final int windowActionModeOverlay = 16843485; // 0x10102dd
- field public static final int windowAllowEnterTransitionOverlap = 16843838; // 0x101043e
- field public static final int windowAllowExitTransitionOverlap = 16843837; // 0x101043d
+ field public static final int windowAllowEnterTransitionOverlap = 16843836; // 0x101043c
+ field public static final int windowAllowExitTransitionOverlap = 16843835; // 0x101043b
field public static final int windowAnimationStyle = 16842926; // 0x10100ae
field public static final int windowBackground = 16842836; // 0x1010054
- field public static final int windowClipToOutline = 16843950; // 0x10104ae
+ field public static final int windowClipToOutline = 16843948; // 0x10104ac
field public static final int windowCloseOnTouchOutside = 16843611; // 0x101035b
field public static final int windowContentOverlay = 16842841; // 0x1010059
field public static final int windowContentTransitionManager = 16843795; // 0x1010413
field public static final int windowContentTransitions = 16843794; // 0x1010412
field public static final int windowDisablePreview = 16843298; // 0x1010222
- field public static final int windowDrawsSystemBarBackgrounds = 16843858; // 0x1010452
- field public static final int windowElevation = 16843922; // 0x1010492
+ field public static final int windowDrawsSystemBarBackgrounds = 16843856; // 0x1010450
+ field public static final int windowElevation = 16843920; // 0x1010490
field public static final int windowEnableSplitTouch = 16843543; // 0x1010317
field public static final int windowEnterAnimation = 16842932; // 0x10100b4
- field public static final int windowEnterTransition = 16843833; // 0x1010439
+ field public static final int windowEnterTransition = 16843831; // 0x1010437
field public static final int windowExitAnimation = 16842933; // 0x10100b5
- field public static final int windowExitTransition = 16843834; // 0x101043a
+ field public static final int windowExitTransition = 16843832; // 0x1010438
field public static final int windowFrame = 16842837; // 0x1010055
field public static final int windowFullscreen = 16843277; // 0x101020d
field public static final int windowHideAnimation = 16842935; // 0x10100b7
@@ -1439,12 +1439,12 @@ package android {
field public static final int windowNoDisplay = 16843294; // 0x101021e
field public static final int windowNoTitle = 16842838; // 0x1010056
field public static final int windowOverscan = 16843727; // 0x10103cf
- field public static final int windowReenterTransition = 16843954; // 0x10104b2
- field public static final int windowReturnTransition = 16843953; // 0x10104b1
- field public static final int windowSharedElementEnterTransition = 16843835; // 0x101043b
- field public static final int windowSharedElementExitTransition = 16843836; // 0x101043c
- field public static final int windowSharedElementReenterTransition = 16843956; // 0x10104b4
- field public static final int windowSharedElementReturnTransition = 16843955; // 0x10104b3
+ field public static final int windowReenterTransition = 16843952; // 0x10104b0
+ field public static final int windowReturnTransition = 16843951; // 0x10104af
+ field public static final int windowSharedElementEnterTransition = 16843833; // 0x1010439
+ field public static final int windowSharedElementExitTransition = 16843834; // 0x101043a
+ field public static final int windowSharedElementReenterTransition = 16843954; // 0x10104b2
+ field public static final int windowSharedElementReturnTransition = 16843953; // 0x10104b1
field public static final int windowShowAnimation = 16842934; // 0x10100b6
field public static final int windowShowWallpaper = 16843410; // 0x1010292
field public static final int windowSoftInputMode = 16843307; // 0x101022b
@@ -1452,15 +1452,15 @@ package android {
field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c
field public static final int windowTitleSize = 16842842; // 0x101005a
field public static final int windowTitleStyle = 16842843; // 0x101005b
- field public static final int windowTransitionBackgroundFadeDuration = 16843875; // 0x1010463
+ field public static final int windowTransitionBackgroundFadeDuration = 16843873; // 0x1010461
field public static final int windowTranslucentNavigation = 16843760; // 0x10103f0
field public static final int windowTranslucentStatus = 16843759; // 0x10103ef
field public static final int writePermission = 16842760; // 0x1010008
field public static final int x = 16842924; // 0x10100ac
field public static final int xlargeScreens = 16843455; // 0x10102bf
field public static final int y = 16842925; // 0x10100ad
- field public static final int yearListItemTextAppearance = 16843931; // 0x101049b
- field public static final int yearListSelectorColor = 16843932; // 0x101049c
+ field public static final int yearListItemTextAppearance = 16843929; // 0x1010499
+ field public static final int yearListSelectorColor = 16843930; // 0x101049a
field public static final int yesNoPreferenceStyle = 16842896; // 0x1010090
field public static final int zAdjustment = 16843201; // 0x10101c1
}
@@ -3673,6 +3673,7 @@ package android.app {
field public int id;
field public android.content.ComponentName origActivity;
field public int persistentId;
+ field public android.app.ActivityManager.TaskDescription taskDescription;
}
public static class ActivityManager.RunningAppProcessInfo implements android.os.Parcelable {
@@ -5690,46 +5691,47 @@ package android.app.job {
package android.app.usage {
- public final class PackageUsageStats implements android.os.Parcelable {
+ public final class UsageEvents implements android.os.Parcelable {
method public int describeContents();
- method public long getLastTimeUsed();
- method public java.lang.String getPackageName();
- method public long getTotalTimeSpent();
+ method public boolean getNextEvent(android.app.usage.UsageEvents.Event);
+ method public boolean hasNextEvent();
+ method public void resetToStart();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
}
+ public static final class UsageEvents.Event {
+ ctor public UsageEvents.Event();
+ method public android.content.ComponentName getComponent();
+ method public int getEventType();
+ method public long getTimeStamp();
+ field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
+ field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
+ field public static final int NONE = 0; // 0x0
+ }
+
public final class UsageStats implements android.os.Parcelable {
ctor public UsageStats(android.app.usage.UsageStats);
+ method public void add(android.app.usage.UsageStats);
method public int describeContents();
method public long getFirstTimeStamp();
method public long getLastTimeStamp();
- method public android.app.usage.PackageUsageStats getPackage(int);
- method public android.app.usage.PackageUsageStats getPackage(java.lang.String);
- method public int getPackageCount();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator CREATOR;
- }
-
- public static class UsageStats.Event implements android.os.Parcelable {
- ctor public UsageStats.Event();
- method public int describeContents();
+ method public long getLastTimeUsed();
+ method public java.lang.String getPackageName();
+ method public long getTotalTimeInForeground();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
- field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
- field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
- field public static final int NONE = 0; // 0x0
- field public int eventType;
- field public java.lang.String packageName;
- field public long timeStamp;
}
public final class UsageStatsManager {
- method public android.app.usage.UsageStats[] getDailyStatsSince(long);
- method public android.app.usage.UsageStats[] getMonthlyStatsSince(long);
- method public android.app.usage.UsageStats getRecentStatsSince(long);
- method public android.app.usage.UsageStats[] getWeeklyStatsSince(long);
- method public android.app.usage.UsageStats[] getYearlyStatsSince(long);
+ method public android.util.ArrayMap<java.lang.String, android.app.usage.UsageStats> queryAndAggregateUsageStats(long, long);
+ method public android.app.usage.UsageEvents queryEvents(long, long);
+ method public java.util.List<android.app.usage.UsageStats> queryUsageStats(int, long, long);
+ field public static final int INTERVAL_BEST = 4; // 0x4
+ field public static final int INTERVAL_DAILY = 0; // 0x0
+ field public static final int INTERVAL_MONTHLY = 2; // 0x2
+ field public static final int INTERVAL_WEEKLY = 1; // 0x1
+ field public static final int INTERVAL_YEARLY = 3; // 0x3
}
}
@@ -5747,7 +5749,7 @@ package android.appwidget {
method protected android.appwidget.AppWidgetHostView onCreateView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo);
method protected void onProviderChanged(int, android.appwidget.AppWidgetProviderInfo);
method protected void onProvidersChanged();
- method public final void startAppWidgetConfigureActivityForResult(android.app.Activity, android.content.Intent, int);
+ method public final void startAppWidgetConfigureActivityForResult(android.app.Activity, int, int, int, android.os.Bundle);
method public void startListening();
method public void stopListening();
}
@@ -5775,7 +5777,7 @@ package android.appwidget {
method public android.appwidget.AppWidgetProviderInfo getAppWidgetInfo(int);
method public android.os.Bundle getAppWidgetOptions(int);
method public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProviders();
- method public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProvidersForProfiles(android.os.UserHandle[]);
+ method public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProvidersForProfile(android.os.UserHandle);
method public static android.appwidget.AppWidgetManager getInstance(android.content.Context);
method public void notifyAppWidgetViewDataChanged(int[], int);
method public void notifyAppWidgetViewDataChanged(int, int);
@@ -27450,19 +27452,23 @@ package android.service.notification {
method public final void cancelNotification(java.lang.String);
method public final void cancelNotifications(java.lang.String[]);
method public android.service.notification.StatusBarNotification[] getActiveNotifications();
- method public final int getCurrentListenerFlags();
+ method public final int getCurrentListenerHints();
method public android.service.notification.NotificationListenerService.RankingMap getCurrentRanking();
method public android.os.IBinder onBind(android.content.Intent);
method public void onListenerConnected();
- method public void onListenerFlagsChanged(int);
+ method public void onListenerHintsChanged(int);
method public void onNotificationPosted(android.service.notification.StatusBarNotification);
method public void onNotificationPosted(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
method public void onNotificationRankingUpdate(android.service.notification.NotificationListenerService.RankingMap);
method public void onNotificationRemoved(android.service.notification.StatusBarNotification);
method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
- method public final void requestListenerFlags(int);
- field public static final int FLAG_DISABLE_HOST_ALERTS = 1; // 0x1
- field public static final int FLAG_NONE = 0; // 0x0
+ method public final void requestListenerHints(int);
+ field public static final int HINTS_NONE = 0; // 0x0
+ field public static final int HINT_HOST_DISABLE_EFFECTS = 4; // 0x4
+ field public static final int HINT_HOST_INTERRUPTION_LEVEL_ALL = 1; // 0x1
+ field public static final int HINT_HOST_INTERRUPTION_LEVEL_NONE = 3; // 0x3
+ field public static final int HINT_HOST_INTERRUPTION_LEVEL_PRIORITY = 2; // 0x2
+ field public static final int HOST_INTERRUPTION_LEVEL_MASK = 3; // 0x3
field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService";
}
@@ -27559,7 +27565,7 @@ package android.service.voice {
public static class AlwaysOnHotwordDetector.EventPayload {
field public final android.media.AudioFormat audioFormat;
field public final byte[] data;
- field public final boolean isTriggerAudio;
+ field public final boolean triggerAvailable;
}
public class VoiceInteractionService extends android.app.Service {
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 3bf8e2e..4b022ff 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -690,8 +690,6 @@ public class ActivityManager {
/**
* The recent activity values for the highest activity in the stack to have set the values.
* {@link Activity#setTaskDescription(android.app.ActivityManager.TaskDescription)}.
- *
- * @hide
*/
public TaskDescription taskDescription;
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java
index 75af2df..a765dd1 100644
--- a/core/java/android/app/ActivityTransitionCoordinator.java
+++ b/core/java/android/app/ActivityTransitionCoordinator.java
@@ -29,8 +29,11 @@ import android.os.ResultReceiver;
import android.transition.Transition;
import android.transition.TransitionSet;
import android.util.ArrayMap;
+import android.view.GhostView;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewGroupOverlay;
+import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.widget.ImageView;
@@ -202,6 +205,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
final protected boolean mIsReturning;
private Runnable mPendingTransition;
private boolean mIsStartingTransition;
+ private ArrayList<GhostViewListeners> mGhostViewListeners =
+ new ArrayList<GhostViewListeners>();
public ActivityTransitionCoordinator(Window window,
ArrayList<String> allSharedElementNames,
@@ -301,6 +306,12 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
// By adding the transition after addTarget, we prevent addTarget from
// affecting transition.
set.addTransition(transition);
+
+ if (!add && mTransitioningViews != null && !mTransitioningViews.isEmpty()) {
+ // Allow children of excluded transitioning views, but not the views themselves
+ set = new TransitionSet().addTransition(set);
+ }
+
return set;
}
@@ -362,7 +373,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
protected abstract Transition getViewsTransition();
- private static void setSharedElementState(View view, String name, Bundle transitionArgs,
+ private void setSharedElementState(View view, String name, Bundle transitionArgs,
Matrix tempMatrix, RectF tempRect, int[] decorLoc) {
Bundle sharedElementBundle = transitionArgs.getBundle(name);
if (sharedElementBundle == null) {
@@ -396,9 +407,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
top -= decorLoc[1];
} else {
// Find the location in the view's parent
- ViewGroup parent = (ViewGroup) view.getParent();
- tempMatrix.reset();
- parent.transformMatrixToLocal(tempMatrix);
+ getSharedElementParentMatrix(view, tempMatrix);
tempRect.set(left, top, right, bottom);
tempMatrix.mapRect(tempRect);
@@ -418,6 +427,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
tempRect.set(0, 0, width, height);
view.getMatrix().mapRect(tempRect);
+ ViewGroup parent = (ViewGroup) view.getParent();
left = leftInParent - tempRect.left + parent.getScrollX();
top = topInParent - tempRect.top + parent.getScrollY();
right = left + width;
@@ -435,6 +445,13 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
view.layout(x, y, x + width, y + height);
}
+ protected void getSharedElementParentMatrix(View view, Matrix matrix) {
+ // Find the location in the view's parent
+ ViewGroup parent = (ViewGroup) view.getParent();
+ matrix.reset();
+ parent.transformMatrixToLocal(matrix);
+ }
+
protected ArrayList<SharedElementOriginalState> setSharedElementState(
Bundle sharedElementState, final ArrayList<View> snapshots) {
ArrayList<SharedElementOriginalState> originalImageState =
@@ -453,19 +470,24 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
}
}
mListener.setSharedElementStart(mSharedElementNames, mSharedElements, snapshots);
+ return originalImageState;
+ }
+
+ protected void notifySharedElementEnd(ArrayList<View> snapshots) {
+ mListener.setSharedElementEnd(mSharedElementNames, mSharedElements, snapshots);
+ }
+ protected void scheduleSetSharedElementEnd(final ArrayList<View> snapshots) {
getDecor().getViewTreeObserver().addOnPreDrawListener(
new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
- mListener.setSharedElementEnd(mSharedElementNames, mSharedElements,
- snapshots);
+ notifySharedElementEnd(snapshots);
return true;
}
}
);
- return originalImageState;
}
private static SharedElementOriginalState getOldSharedElementState(View view, String name,
@@ -572,8 +594,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
}
protected static void setTransitionAlpha(ArrayList<View> views, float alpha) {
- int numSharedElements = views.size();
- for (int i = 0; i < numSharedElements; i++) {
+ int count = views.size();
+ for (int i = 0; i < count; i++) {
views.get(i).setTransitionAlpha(alpha);
}
}
@@ -639,6 +661,82 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
mIsStartingTransition = false;
}
+ protected void moveSharedElementsToOverlay() {
+ int numSharedElements = mSharedElements.size();
+ ViewGroup decor = getDecor();
+ if (decor != null) {
+ boolean moveWithParent = moveSharedElementWithParent();
+ for (int i = 0; i < numSharedElements; i++) {
+ View view = mSharedElements.get(i);
+ GhostView.addGhost(view, decor);
+ ViewGroup parent = (ViewGroup) view.getParent();
+ if (moveWithParent && !isInTransitionGroup(parent, decor)) {
+ GhostViewListeners listener =
+ new GhostViewListeners(view, decor);
+ parent.getViewTreeObserver().addOnPreDrawListener(listener);
+ mGhostViewListeners.add(listener);
+ }
+ }
+ }
+ }
+
+ protected boolean moveSharedElementWithParent() {
+ return true;
+ }
+
+ public static boolean isInTransitionGroup(ViewParent viewParent, ViewGroup decor) {
+ if (viewParent == decor || !(viewParent instanceof ViewGroup)) {
+ return false;
+ }
+ ViewGroup parent = (ViewGroup) viewParent;
+ if (parent.isTransitionGroup()) {
+ return true;
+ } else {
+ return isInTransitionGroup(parent.getParent(), decor);
+ }
+ }
+
+ protected void moveSharedElementsFromOverlay() {
+ ViewGroup decor = getDecor();
+ if (decor != null) {
+ ViewGroupOverlay overlay = decor.getOverlay();
+ int count = mSharedElements.size();
+ for (int i = 0; i < count; i++) {
+ View sharedElement = mSharedElements.get(i);
+ GhostView.removeGhost(sharedElement);
+ }
+ }
+ int numListeners = mGhostViewListeners.size();
+ for (int i = 0; i < numListeners; i++) {
+ GhostViewListeners listener = mGhostViewListeners.get(i);
+ ViewGroup parent = (ViewGroup) listener.getView().getParent();
+ parent.getViewTreeObserver().removeOnPreDrawListener(listener);
+ }
+ mGhostViewListeners.clear();
+ }
+
+ protected void setGhostVisibility(int visibility) {
+ int numSharedElements = mSharedElements.size();
+ for (int i = 0; i < numSharedElements; i++) {
+ GhostView ghostView = GhostView.getGhost(mSharedElements.get(i));
+ if (ghostView != null) {
+ ghostView.setVisibility(visibility);
+ }
+ }
+ }
+
+ protected void scheduleGhostVisibilityChange(final int visibility) {
+ getDecor().getViewTreeObserver()
+ .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+ setGhostVisibility(visibility);
+ return true;
+ }
+ });
+ }
+
protected class ContinueTransitionListener extends Transition.TransitionListenerAdapter {
@Override
public void onTransitionStart(Transition transition) {
@@ -671,6 +769,34 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
}
}
+ private static class GhostViewListeners implements ViewTreeObserver.OnPreDrawListener {
+ private View mView;
+ private ViewGroup mDecor;
+ private Matrix mMatrix = new Matrix();
+
+ public GhostViewListeners(View view, ViewGroup decor) {
+ mView = view;
+ mDecor = decor;
+ }
+
+ public View getView() {
+ return mView;
+ }
+
+ @Override
+ public boolean onPreDraw() {
+ ViewGroup parent = ((ViewGroup) mView.getParent());
+ GhostView ghostView = GhostView.getGhost(mView);
+ if (ghostView == null) {
+ parent.getViewTreeObserver().removeOnPreDrawListener(this);
+ } else {
+ GhostView.calculateMatrix(mView, mDecor, mMatrix);
+ ghostView.setMatrix(mMatrix);
+ }
+ return true;
+ }
+ }
+
static class SharedElementOriginalState {
int mLeft;
int mTop;
@@ -681,5 +807,4 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
ImageView.ScaleType mScaleType;
Matrix mMatrix;
}
-
}
diff --git a/core/java/android/app/ActivityTransitionState.java b/core/java/android/app/ActivityTransitionState.java
index 4f556a8..4f3b02c 100644
--- a/core/java/android/app/ActivityTransitionState.java
+++ b/core/java/android/app/ActivityTransitionState.java
@@ -193,7 +193,8 @@ class ActivityTransitionState {
private void startEnter() {
if (mEnterActivityOptions.isReturning()) {
if (mExitingToView != null) {
- mEnterTransitionCoordinator.viewInstancesReady(mExitingFrom, mExitingToView);
+ mEnterTransitionCoordinator.viewInstancesReady(mExitingFrom, mExitingTo,
+ mExitingToView);
} else {
mEnterTransitionCoordinator.namedViewsReady(mExitingFrom, mExitingTo);
}
@@ -248,8 +249,6 @@ class ActivityTransitionState {
mEnterTransitionCoordinator.cancelEnter();
mEnterTransitionCoordinator = null;
}
- ArrayMap<String, View> sharedElements = new ArrayMap<String, View>();
- activity.getWindow().getDecorView().findNamedViews(sharedElements);
ExitTransitionCoordinator exitCoordinator =
new ExitTransitionCoordinator(activity, mEnteringNames, null, null, true);
diff --git a/core/java/android/app/EnterTransitionCoordinator.java b/core/java/android/app/EnterTransitionCoordinator.java
index b5d362d..54c5bc4 100644
--- a/core/java/android/app/EnterTransitionCoordinator.java
+++ b/core/java/android/app/EnterTransitionCoordinator.java
@@ -24,15 +24,14 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.ResultReceiver;
+import android.text.TextUtils;
import android.transition.Transition;
import android.transition.TransitionManager;
import android.util.ArrayMap;
-import android.util.Pair;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroupOverlay;
import android.view.ViewTreeObserver;
-import android.widget.ImageView;
import java.util.ArrayList;
@@ -44,13 +43,11 @@ import java.util.ArrayList;
class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
private static final String TAG = "EnterTransitionCoordinator";
- private static final long MAX_WAIT_MS = 1000;
private static final int MIN_ANIMATION_FRAMES = 2;
private boolean mSharedElementTransitionStarted;
private Activity mActivity;
private boolean mHasStopped;
- private Handler mHandler;
private boolean mIsCanceled;
private ObjectAnimator mBackgroundAnimator;
private boolean mIsExitTransitionComplete;
@@ -59,6 +56,9 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
private boolean mWasOpaque;
private boolean mAreViewsReady;
private boolean mIsViewsTransitionStarted;
+ private boolean mIsViewsTransitionComplete;
+ private boolean mIsSharedElementTransitionComplete;
+ private ArrayList<Matrix> mSharedElementParentMatrices;
public EnterTransitionCoordinator(Activity activity, ResultReceiver resultReceiver,
ArrayList<String> sharedElementNames, boolean isReturning) {
@@ -82,8 +82,22 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
});
}
- public void viewInstancesReady(ArrayList<String> accepted, ArrayList<View> localViews) {
- triggerViewsReady(mapSharedElements(accepted, localViews));
+ public void viewInstancesReady(ArrayList<String> accepted, ArrayList<String> localNames,
+ ArrayList<View> localViews) {
+ boolean remap = false;
+ for (int i = 0; i < localViews.size(); i++) {
+ View view = localViews.get(i);
+ if (!TextUtils.equals(view.getTransitionName(), localNames.get(i))
+ || !view.isAttachedToWindow()) {
+ remap = true;
+ break;
+ }
+ }
+ if (remap) {
+ triggerViewsReady(mapNamedElements(accepted, localNames));
+ } else {
+ triggerViewsReady(mapSharedElements(accepted, localViews));
+ }
}
public void namedViewsReady(ArrayList<String> accepted, ArrayList<String> localNames) {
@@ -94,20 +108,16 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
protected void viewsReady(ArrayMap<String, View> sharedElements) {
super.viewsReady(sharedElements);
mIsReadyForTransition = true;
- if (mIsReturning) {
- mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- cancel();
- }
- };
- mHandler.sendEmptyMessageDelayed(MSG_CANCEL, MAX_WAIT_MS);
- send(MSG_SEND_SHARED_ELEMENT_DESTINATION, null);
- }
setTransitionAlpha(mSharedElements, 0);
if (getViewsTransition() != null) {
setTransitionAlpha(mTransitioningViews, 0);
}
+ if (mIsReturning) {
+ sendSharedElementDestination();
+ } else {
+ setSharedElementMatrices();
+ moveSharedElementsToOverlay();
+ }
if (mSharedElementsBundle != null) {
onTakeSharedElements();
}
@@ -154,18 +164,24 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
}
private void sendSharedElementDestination() {
- ViewGroup decor = getDecor();
- boolean allReady = !decor.isLayoutRequested();
- if (allReady) {
- for (int i = 0; i < mSharedElements.size(); i++) {
- if (mSharedElements.get(i).isLayoutRequested()) {
- allReady = false;
- break;
+ boolean allReady;
+ if (allowOverlappingTransitions()) {
+ allReady = false;
+ } else {
+ allReady = !getDecor().isLayoutRequested();
+ if (allReady) {
+ for (int i = 0; i < mSharedElements.size(); i++) {
+ if (mSharedElements.get(i).isLayoutRequested()) {
+ allReady = false;
+ break;
+ }
}
}
}
if (allReady) {
Bundle state = captureSharedElementState();
+ setSharedElementMatrices();
+ moveSharedElementsToOverlay();
mResultReceiver.send(MSG_SHARED_ELEMENT_DESTINATION, state);
} else {
getDecor().getViewTreeObserver()
@@ -174,6 +190,8 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
public boolean onPreDraw() {
getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
Bundle state = captureSharedElementState();
+ setSharedElementMatrices();
+ moveSharedElementsToOverlay();
mResultReceiver.send(MSG_SHARED_ELEMENT_DESTINATION, state);
return true;
}
@@ -193,9 +211,6 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
switch (resultCode) {
case MSG_TAKE_SHARED_ELEMENTS:
if (!mIsCanceled) {
- if (mHandler != null) {
- mHandler.removeMessages(MSG_CANCEL);
- }
mSharedElementsBundle = resultData;
onTakeSharedElements();
}
@@ -211,9 +226,6 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
case MSG_CANCEL:
cancel();
break;
- case MSG_SEND_SHARED_ELEMENT_DESTINATION:
- sendSharedElementDestination();
- break;
}
}
@@ -282,13 +294,18 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
ArrayList<View> sharedElementSnapshots = createSnapshots(sharedElementState,
mSharedElementNames);
setTransitionAlpha(mSharedElements, 1);
+ scheduleSetSharedElementEnd(sharedElementSnapshots);
ArrayList<SharedElementOriginalState> originalImageViewState =
setSharedElementState(sharedElementState, sharedElementSnapshots);
requestLayoutForSharedElements();
boolean startEnterTransition = allowOverlappingTransitions() && !mIsReturning;
boolean startSharedElementTransition = true;
+ setGhostVisibility(View.INVISIBLE);
+ scheduleGhostVisibilityChange(View.INVISIBLE);
Transition transition = beginTransition(startEnterTransition, startSharedElementTransition);
+ scheduleGhostVisibilityChange(View.VISIBLE);
+ setGhostVisibility(View.VISIBLE);
if (startEnterTransition) {
startEnterTransition(transition);
@@ -347,39 +364,56 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
private Transition beginTransition(boolean startEnterTransition,
boolean startSharedElementTransition) {
Transition sharedElementTransition = null;
- if (startSharedElementTransition && !mSharedElementNames.isEmpty()) {
- sharedElementTransition = configureTransition(getSharedElementTransition(), false);
- }
- Transition viewsTransition = null;
- if (startEnterTransition && !mTransitioningViews.isEmpty()) {
- viewsTransition = configureTransition(getViewsTransition(), true);
- if (viewsTransition != null) {
- stripOffscreenViews();
- viewsTransition.forceVisibility(View.INVISIBLE, true);
- setTransitionAlpha(mTransitioningViews, 1);
- }
- }
- mIsViewsTransitionStarted = mIsViewsTransitionStarted || startEnterTransition;
-
- Transition transition = mergeTransitions(sharedElementTransition, viewsTransition);
if (startSharedElementTransition) {
- if (transition == null) {
+ if (!mSharedElementNames.isEmpty()) {
+ sharedElementTransition = configureTransition(getSharedElementTransition(), false);
+ }
+ if (sharedElementTransition == null) {
sharedElementTransitionStarted();
+ sharedElementTransitionComplete();
} else {
- transition.addListener(new ContinueTransitionListener() {
+ sharedElementTransition.addListener(new Transition.TransitionListenerAdapter() {
@Override
public void onTransitionStart(Transition transition) {
- super.onTransitionStart(transition);
- transition.removeListener(this);
sharedElementTransitionStarted();
}
+
+ @Override
+ public void onTransitionEnd(Transition transition) {
+ transition.removeListener(this);
+ sharedElementTransitionComplete();
+ }
});
}
}
- if (transition != null) {
- if (sharedElementTransition == null) {
- transition.addListener(new ContinueTransitionListener());
+ Transition viewsTransition = null;
+ if (startEnterTransition) {
+ mIsViewsTransitionStarted = true;
+ if (!mTransitioningViews.isEmpty()) {
+ viewsTransition = configureTransition(getViewsTransition(), true);
+ if (viewsTransition != null && !mIsReturning) {
+ stripOffscreenViews();
+ }
+ }
+ if (viewsTransition == null) {
+ viewTransitionComplete();
+ } else {
+ viewsTransition.forceVisibility(View.INVISIBLE, true);
+ setTransitionAlpha(mTransitioningViews, 1);
+ viewsTransition.addListener(new ContinueTransitionListener() {
+ @Override
+ public void onTransitionEnd(Transition transition) {
+ transition.removeListener(this);
+ viewTransitionComplete();
+ super.onTransitionEnd(transition);
+ }
+ });
}
+ }
+
+ Transition transition = mergeTransitions(sharedElementTransition, viewsTransition);
+ if (transition != null) {
+ transition.addListener(new ContinueTransitionListener());
TransitionManager.beginDelayedTransition(getDecor(), transition);
if (startSharedElementTransition && !mSharedElementNames.isEmpty()) {
mSharedElements.get(0).invalidate();
@@ -392,6 +426,20 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
return transition;
}
+ private void viewTransitionComplete() {
+ mIsViewsTransitionComplete = true;
+ if (mIsSharedElementTransitionComplete) {
+ moveSharedElementsFromOverlay();
+ }
+ }
+
+ private void sharedElementTransitionComplete() {
+ mIsSharedElementTransitionComplete = true;
+ if (mIsViewsTransitionComplete) {
+ moveSharedElementsFromOverlay();
+ }
+ }
+
private void sharedElementTransitionStarted() {
mSharedElementTransitionStarted = true;
if (mIsExitTransitionComplete) {
@@ -436,10 +484,12 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
mBackgroundAnimator = null;
}
mActivity = null;
+ moveSharedElementsFromOverlay();
clearState();
}
public void cancelEnter() {
+ setGhostVisibility(View.INVISIBLE);
mHasStopped = true;
mIsCanceled = true;
mResultReceiver = null;
@@ -508,4 +558,31 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
}
});
}
+
+ private void setSharedElementMatrices() {
+ int numSharedElements = mSharedElements.size();
+ if (numSharedElements > 0) {
+ mSharedElementParentMatrices = new ArrayList<Matrix>(numSharedElements);
+ }
+ for (int i = 0; i < numSharedElements; i++) {
+ View view = mSharedElements.get(i);
+
+ // Find the location in the view's parent
+ ViewGroup parent = (ViewGroup) view.getParent();
+ Matrix matrix = new Matrix();
+ parent.transformMatrixToLocal(matrix);
+
+ mSharedElementParentMatrices.add(matrix);
+ }
+ }
+
+ @Override
+ protected void getSharedElementParentMatrix(View view, Matrix matrix) {
+ int index = mSharedElementParentMatrices == null ? -1 : mSharedElements.indexOf(view);
+ if (index < 0) {
+ super.getSharedElementParentMatrix(view, matrix);
+ } else {
+ matrix.set(mSharedElementParentMatrices.get(index));
+ }
+ }
}
diff --git a/core/java/android/app/ExitTransitionCoordinator.java b/core/java/android/app/ExitTransitionCoordinator.java
index b3fdcc7..43b9ea8 100644
--- a/core/java/android/app/ExitTransitionCoordinator.java
+++ b/core/java/android/app/ExitTransitionCoordinator.java
@@ -71,8 +71,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
public ExitTransitionCoordinator(Activity activity, ArrayList<String> names,
ArrayList<String> accepted, ArrayList<View> mapped, boolean isReturning) {
- super(activity.getWindow(), names, getListener(activity, isReturning),
- isReturning);
+ super(activity.getWindow(), names, getListener(activity, isReturning), isReturning);
viewsReady(mapSharedElements(accepted, mapped));
stripOffscreenViews();
mIsBackgroundReady = !isReturning;
@@ -87,23 +86,23 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
protected void onReceiveResult(int resultCode, Bundle resultData) {
switch (resultCode) {
case MSG_SET_REMOTE_RECEIVER:
+ stopCancel();
mResultReceiver = resultData.getParcelable(KEY_REMOTE_RECEIVER);
if (mIsCanceled) {
mResultReceiver.send(MSG_CANCEL, null);
mResultReceiver = null;
} else {
- if (mHandler != null) {
- mHandler.removeMessages(MSG_CANCEL);
- }
notifyComplete();
}
break;
case MSG_HIDE_SHARED_ELEMENTS:
+ stopCancel();
if (!mIsCanceled) {
hideSharedElements();
}
break;
case MSG_START_EXIT_TRANSITION:
+ mHandler.removeMessages(MSG_CANCEL);
startExit();
break;
case MSG_SHARED_ELEMENT_DESTINATION:
@@ -113,6 +112,18 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
}
}
+ private void stopCancel() {
+ if (mHandler != null) {
+ mHandler.removeMessages(MSG_CANCEL);
+ }
+ }
+
+ private void delayCancel() {
+ if (mHandler != null) {
+ mHandler.sendEmptyMessageDelayed(MSG_CANCEL, MAX_WAIT_MS);
+ }
+ }
+
public void resetViews() {
setTransitionAlpha(mTransitioningViews, 1);
setTransitionAlpha(mSharedElements, 1);
@@ -120,6 +131,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
if (!mIsReturning && getDecor() != null) {
getDecor().suppressLayout(false);
}
+ moveSharedElementsFromOverlay();
clearState();
}
@@ -140,6 +152,15 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
private void startSharedElementExit() {
Transition transition = getSharedElementExitTransition();
+ transition.addListener(new Transition.TransitionListenerAdapter() {
+ @Override
+ public void onTransitionEnd(Transition transition) {
+ transition.removeListener(this);
+ if (mExitComplete) {
+ delayCancel();
+ }
+ }
+ });
final ArrayList<View> sharedElementSnapshots = createSnapshots(mExitSharedElementBundle,
mSharedElementNames);
getDecor().getViewTreeObserver()
@@ -151,11 +172,16 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
return true;
}
});
+ setGhostVisibility(View.INVISIBLE);
+ scheduleGhostVisibilityChange(View.INVISIBLE);
TransitionManager.beginDelayedTransition(getDecor(), transition);
+ scheduleGhostVisibilityChange(View.VISIBLE);
+ setGhostVisibility(View.VISIBLE);
getDecor().invalidate();
}
private void hideSharedElements() {
+ moveSharedElementsFromOverlay();
if (!mIsHidden) {
setTransitionAlpha(mSharedElements, 0);
}
@@ -169,6 +195,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
if (getDecor() != null) {
getDecor().suppressLayout(true);
}
+ moveSharedElementsToOverlay();
startTransition(new Runnable() {
@Override
public void run() {
@@ -191,7 +218,8 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
finish();
}
};
- mHandler.sendEmptyMessageDelayed(MSG_CANCEL, MAX_WAIT_MS);
+ delayCancel();
+ moveSharedElementsToOverlay();
if (getDecor().getBackground() == null) {
ColorDrawable black = new ColorDrawable(0xFF000000);
black.setAlpha(0);
@@ -267,11 +295,10 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
if (mIsHidden) {
setTransitionAlpha(mTransitioningViews, 1);
}
- }
-
- @Override
- public void onTransitionCancel(Transition transition) {
- super.onTransitionCancel(transition);
+ if (mSharedElementBundle != null) {
+ delayCancel();
+ }
+ super.onTransitionEnd(transition);
}
});
viewsTransition.forceVisibility(View.INVISIBLE, false);
@@ -308,7 +335,11 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
Transition transition = mergeTransitions(sharedElementTransition, viewsTransition);
if (transition != null) {
+ setGhostVisibility(View.INVISIBLE);
+ scheduleGhostVisibilityChange(View.INVISIBLE);
TransitionManager.beginDelayedTransition(getDecor(), transition);
+ scheduleGhostVisibilityChange(View.VISIBLE);
+ setGhostVisibility(View.VISIBLE);
getDecor().invalidate();
} else {
transitionStarted();
@@ -351,6 +382,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
if (isReadyToNotify()) {
if (!mSharedElementNotified) {
mSharedElementNotified = true;
+ delayCancel();
mResultReceiver.send(MSG_TAKE_SHARED_ELEMENTS, mSharedElementBundle);
}
if (!mExitNotified && mExitComplete) {
@@ -376,6 +408,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
}
private void finish() {
+ stopCancel();
mActivity.mActivityTransitionState.clear();
// Clear the state so that we can't hold any references accidentally and leak memory.
mHandler.removeMessages(MSG_CANCEL);
@@ -393,6 +426,11 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
}
@Override
+ protected boolean moveSharedElementWithParent() {
+ return !mIsReturning;
+ }
+
+ @Override
protected Transition getViewsTransition() {
if (mIsReturning) {
return getWindow().getReturnTransition();
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index 113c533..4b65934 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -59,8 +59,8 @@ interface INotificationManager
void cancelNotificationsFromListener(in INotificationListener token, in String[] keys);
ParceledListSlice getActiveNotificationsFromListener(in INotificationListener token);
- void requestFlagsFromListener(in INotificationListener token, int flags);
- int getFlagsFromListener(in INotificationListener token);
+ void requestHintsFromListener(in INotificationListener token, int hints);
+ int getHintsFromListener(in INotificationListener token);
ZenModeConfig getZenModeConfig();
boolean setZenModeConfig(in ZenModeConfig config);
diff --git a/core/java/android/app/usage/IUsageStatsManager.aidl b/core/java/android/app/usage/IUsageStatsManager.aidl
index 0924210..3b09888 100644
--- a/core/java/android/app/usage/IUsageStatsManager.aidl
+++ b/core/java/android/app/usage/IUsageStatsManager.aidl
@@ -16,8 +16,8 @@
package android.app.usage;
-import android.app.usage.UsageStats;
-import android.content.ComponentName;
+import android.app.usage.UsageEvents;
+import android.content.pm.ParceledListSlice;
/**
* System private API for talking with the UsageStatsManagerService.
@@ -25,6 +25,7 @@ import android.content.ComponentName;
* {@hide}
*/
interface IUsageStatsManager {
- UsageStats[] getStatsSince(int bucketType, long time, String callingPackage);
- UsageStats.Event[] getEventsSince(long time, String callingPackage);
+ ParceledListSlice queryUsageStats(int bucketType, long beginTime, long endTime,
+ String callingPackage);
+ UsageEvents queryEvents(long beginTime, long endTime, String callingPackage);
}
diff --git a/core/java/android/app/usage/PackageUsageStats.java b/core/java/android/app/usage/PackageUsageStats.java
deleted file mode 100644
index ba4fa21..0000000
--- a/core/java/android/app/usage/PackageUsageStats.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package android.app.usage;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public final class PackageUsageStats implements Parcelable {
-
- /**
- * {@hide}
- */
- public String mPackageName;
-
- /**
- * {@hide}
- */
- public long mTotalTimeSpent;
-
- /**
- * {@hide}
- */
- public long mLastTimeUsed;
-
- /**
- * {@hide}
- */
- public int mLastEvent;
-
- PackageUsageStats() {
- }
-
- PackageUsageStats(PackageUsageStats stats) {
- mPackageName = stats.mPackageName;
- mTotalTimeSpent = stats.mTotalTimeSpent;
- mLastTimeUsed = stats.mLastTimeUsed;
- mLastEvent = stats.mLastEvent;
- }
-
- public long getTotalTimeSpent() {
- return mTotalTimeSpent;
- }
-
- public long getLastTimeUsed() {
- return mLastTimeUsed;
- }
-
- public String getPackageName() {
- return mPackageName;
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(mPackageName);
- dest.writeLong(mTotalTimeSpent);
- dest.writeLong(mLastTimeUsed);
- dest.writeInt(mLastEvent);
- }
-
- public static final Creator<PackageUsageStats> CREATOR = new Creator<PackageUsageStats>() {
- @Override
- public PackageUsageStats createFromParcel(Parcel in) {
- PackageUsageStats stats = new PackageUsageStats();
- stats.mPackageName = in.readString();
- stats.mTotalTimeSpent = in.readLong();
- stats.mLastTimeUsed = in.readLong();
- stats.mLastEvent = in.readInt();
- return stats;
- }
-
- @Override
- public PackageUsageStats[] newArray(int size) {
- return new PackageUsageStats[size];
- }
- };
-}
diff --git a/core/java/android/app/usage/TimeSparseArray.java b/core/java/android/app/usage/TimeSparseArray.java
index 5a72d02..7974fa7 100644
--- a/core/java/android/app/usage/TimeSparseArray.java
+++ b/core/java/android/app/usage/TimeSparseArray.java
@@ -39,16 +39,16 @@ public class TimeSparseArray<E> extends LongSparseArray<E> {
* @param time The timestamp for which to search the array.
* @return The index of the matched element, or -1 if no such match exists.
*/
- public int closestIndexAfter(long time) {
+ public int closestIndexOnOrAfter(long time) {
// This is essentially a binary search, except that if no match is found
// the closest index is returned.
final int size = size();
int lo = 0;
- int hi = size;
+ int hi = size - 1;
int mid = -1;
long key = -1;
while (lo <= hi) {
- mid = (lo + hi) >>> 1;
+ mid = lo + ((hi - lo) / 2);
key = keyAt(mid);
if (time > key) {
@@ -68,4 +68,24 @@ public class TimeSparseArray<E> extends LongSparseArray<E> {
return -1;
}
}
+
+ /**
+ * Finds the index of the first element whose timestamp is less than or equal to
+ * the given time.
+ *
+ * @param time The timestamp for which to search the array.
+ * @return The index of the matched element, or -1 if no such match exists.
+ */
+ public int closestIndexOnOrBefore(long time) {
+ final int index = closestIndexOnOrAfter(time);
+ if (index < 0) {
+ // Everything is larger, so we use the last element, or -1 if the list is empty.
+ return size() - 1;
+ }
+
+ if (keyAt(index) == time) {
+ return index;
+ }
+ return index - 1;
+ }
}
diff --git a/core/java/android/app/usage/UsageStats.aidl b/core/java/android/app/usage/UsageEvents.aidl
index 60dbd1c..f1bceba 100644
--- a/core/java/android/app/usage/UsageStats.aidl
+++ b/core/java/android/app/usage/UsageEvents.aidl
@@ -16,5 +16,4 @@
package android.app.usage;
-parcelable UsageStats;
-parcelable UsageStats.Event;
+parcelable UsageEvents;
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
new file mode 100644
index 0000000..d1ebc5f
--- /dev/null
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -0,0 +1,283 @@
+/**
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package android.app.usage;
+
+import android.content.ComponentName;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A result returned from {@link android.app.usage.UsageStatsManager#queryEvents(long, long)}
+ * from which to read {@link android.app.usage.UsageEvents.Event} objects.
+ */
+public final class UsageEvents implements Parcelable {
+
+ /**
+ * An event representing a state change for a component.
+ */
+ public static final class Event {
+
+ /**
+ * No event type.
+ */
+ public static final int NONE = 0;
+
+ /**
+ * An event type denoting that a component moved to the foreground.
+ */
+ public static final int MOVE_TO_FOREGROUND = 1;
+
+ /**
+ * An event type denoting that a component moved to the background.
+ */
+ public static final int MOVE_TO_BACKGROUND = 2;
+
+ /**
+ * An event type denoting that a component was in the foreground when the stats
+ * rolled-over. This is effectively treated as a {@link #MOVE_TO_BACKGROUND}.
+ * {@hide}
+ */
+ public static final int END_OF_DAY = 3;
+
+ /**
+ * An event type denoting that a component was in the foreground the previous day.
+ * This is effectively treated as a {@link #MOVE_TO_FOREGROUND}.
+ * {@hide}
+ */
+ public static final int CONTINUE_PREVIOUS_DAY = 4;
+
+ /**
+ * {@hide}
+ */
+ public ComponentName mComponent;
+
+ /**
+ * {@hide}
+ */
+ public long mTimeStamp;
+
+ /**
+ * {@hide}
+ */
+ public int mEventType;
+
+ /**
+ * The component this event represents.
+ */
+ public ComponentName getComponent() {
+ return mComponent;
+ }
+
+ /**
+ * The time at which this event occurred.
+ */
+ public long getTimeStamp() {
+ return mTimeStamp;
+ }
+
+ /**
+ * The event type.
+ *
+ * See {@link #MOVE_TO_BACKGROUND}
+ * See {@link #MOVE_TO_FOREGROUND}
+ */
+ public int getEventType() {
+ return mEventType;
+ }
+ }
+
+ // Only used when creating the resulting events. Not used for reading/unparceling.
+ private List<Event> mEventsToWrite = null;
+
+ // Only used for reading/unparceling events.
+ private Parcel mParcel = null;
+ private final int mEventCount;
+
+ private int mIndex = 0;
+
+ /*
+ * In order to save space, since ComponentNames will be duplicated everywhere,
+ * we use a map and index into it.
+ */
+ private ComponentName[] mComponentNameTable;
+
+ /**
+ * Construct the iterator from a parcel.
+ * {@hide}
+ */
+ public UsageEvents(Parcel in) {
+ mEventCount = in.readInt();
+ mIndex = in.readInt();
+ if (mEventCount > 0) {
+ mComponentNameTable = in.createTypedArray(ComponentName.CREATOR);
+
+ final int listByteLength = in.readInt();
+ final int positionInParcel = in.readInt();
+ mParcel = Parcel.obtain();
+ mParcel.setDataPosition(0);
+ mParcel.appendFrom(in, in.dataPosition(), listByteLength);
+ mParcel.setDataSize(mParcel.dataPosition());
+ mParcel.setDataPosition(positionInParcel);
+ }
+ }
+
+ /**
+ * Create an empty iterator.
+ * {@hide}
+ */
+ UsageEvents() {
+ mEventCount = 0;
+ }
+
+ /**
+ * Construct the iterator in preparation for writing it to a parcel.
+ * {@hide}
+ */
+ public UsageEvents(List<Event> events, ComponentName[] nameTable) {
+ mComponentNameTable = nameTable;
+ mEventCount = events.size();
+ mEventsToWrite = events;
+ }
+
+ /**
+ * Returns whether or not there are more events to read using
+ * {@link #getNextEvent(android.app.usage.UsageEvents.Event)}.
+ *
+ * @return true if there are more events, false otherwise.
+ */
+ public boolean hasNextEvent() {
+ return mIndex < mEventCount;
+ }
+
+ /**
+ * Retrieve the next {@link android.app.usage.UsageEvents.Event} from the collection and put the
+ * resulting data into {@code eventOut}.
+ *
+ * @param eventOut The {@link android.app.usage.UsageEvents.Event} object that will receive the
+ * next event data.
+ * @return true if an event was available, false if there are no more events.
+ */
+ public boolean getNextEvent(Event eventOut) {
+ if (mIndex >= mEventCount) {
+ return false;
+ }
+
+ final int index = mParcel.readInt();
+ eventOut.mComponent = mComponentNameTable[index];
+ eventOut.mEventType = mParcel.readInt();
+ eventOut.mTimeStamp = mParcel.readLong();
+ mIndex++;
+
+ if (mIndex >= mEventCount) {
+ mParcel.recycle();
+ mParcel = null;
+ }
+ return true;
+ }
+
+ /**
+ * Resets the collection so that it can be iterated over from the beginning.
+ */
+ public void resetToStart() {
+ mIndex = 0;
+ if (mParcel != null) {
+ mParcel.setDataPosition(0);
+ }
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mEventCount);
+ dest.writeInt(mIndex);
+ if (mEventCount > 0) {
+ dest.writeTypedArray(mComponentNameTable, flags);
+
+ if (mEventsToWrite != null) {
+ // Write out the events
+ Parcel p = Parcel.obtain();
+ try {
+ p.setDataPosition(0);
+ for (int i = 0; i < mEventCount; i++) {
+ final Event event = mEventsToWrite.get(i);
+
+ int index = Arrays.binarySearch(mComponentNameTable, event.getComponent());
+ if (index < 0) {
+ throw new IllegalStateException(event.getComponent().toShortString() +
+ " is not in the component name table");
+ }
+ p.writeInt(index);
+ p.writeInt(event.getEventType());
+ p.writeLong(event.getTimeStamp());
+ }
+ final int listByteLength = p.dataPosition();
+
+ // Write the total length of the data.
+ dest.writeInt(listByteLength);
+
+ // Write our current position into the data.
+ dest.writeInt(0);
+
+ // Write the data.
+ dest.appendFrom(p, 0, listByteLength);
+ } finally {
+ p.recycle();
+ }
+
+ } else if (mParcel != null) {
+ // Write the total length of the data.
+ dest.writeInt(mParcel.dataSize());
+
+ // Write out current position into the data.
+ dest.writeInt(mParcel.dataPosition());
+
+ // Write the data.
+ dest.appendFrom(mParcel, 0, mParcel.dataSize());
+ } else {
+ throw new IllegalStateException(
+ "Either mParcel or mEventsToWrite must not be null");
+ }
+ }
+ }
+
+ public static final Creator<UsageEvents> CREATOR = new Creator<UsageEvents>() {
+ @Override
+ public UsageEvents createFromParcel(Parcel source) {
+ return new UsageEvents(source);
+ }
+
+ @Override
+ public UsageEvents[] newArray(int size) {
+ return new UsageEvents[size];
+ }
+ };
+
+ @Override
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (mParcel != null) {
+ mParcel.recycle();
+ mParcel = null;
+ }
+ }
+}
diff --git a/core/java/android/app/usage/UsageStats.java b/core/java/android/app/usage/UsageStats.java
index 57d2011..e47a802 100644
--- a/core/java/android/app/usage/UsageStats.java
+++ b/core/java/android/app/usage/UsageStats.java
@@ -18,76 +18,17 @@ package android.app.usage;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.ArrayMap;
+/**
+ * Contains usage statistics for an app package for a specific
+ * time range.
+ */
public final class UsageStats implements Parcelable {
- public static class Event implements Parcelable {
- /**
- * {@hide}
- */
- public static final Event[] EMPTY_EVENTS = new Event[0];
-
- public static final int NONE = 0;
- public static final int MOVE_TO_FOREGROUND = 1;
- public static final int MOVE_TO_BACKGROUND = 2;
-
- /**
- * {@hide}
- */
- public static final int END_OF_DAY = 3;
-
- /**
- * {@hide}
- */
- public static final int CONTINUE_PREVIOUS_DAY = 4;
-
- public Event() {}
-
- /**
- * {@hide}
- */
- public Event(String packageName, long timeStamp, int eventType) {
- this.packageName = packageName;
- this.timeStamp = timeStamp;
- this.eventType = eventType;
- }
-
- public String packageName;
- public long timeStamp;
- public int eventType;
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeLong(timeStamp);
- dest.writeInt(eventType);
- dest.writeString(packageName);
- }
-
- public static final Creator<Event> CREATOR = new Creator<Event>() {
- @Override
- public Event createFromParcel(Parcel source) {
- final long time = source.readLong();
- final int type = source.readInt();
- final String name = source.readString();
- return new Event(name, time, type);
- }
-
- @Override
- public Event[] newArray(int size) {
- return new Event[size];
- }
- };
- }
/**
* {@hide}
*/
- public static final UsageStats[] EMPTY_STATS = new UsageStats[0];
+ public String mPackageName;
/**
* {@hide}
@@ -102,25 +43,22 @@ public final class UsageStats implements Parcelable {
/**
* {@hide}
*/
- public long mLastTimeSaved;
+ public long mLastTimeUsed;
- private ArrayMap<String, PackageUsageStats> mPackageStats = new ArrayMap<>();
+ /**
+ * {@hide}
+ */
+ public long mTotalTimeInForeground;
/**
- * Can be null
* {@hide}
*/
- public TimeSparseArray<Event> mEvents;
+ public int mLaunchCount;
/**
* {@hide}
*/
- public static UsageStats create(long beginTimeStamp, long endTimeStamp) {
- UsageStats stats = new UsageStats();
- stats.mBeginTimeStamp = beginTimeStamp;
- stats.mEndTimeStamp = endTimeStamp;
- return stats;
- }
+ public int mLastEvent;
/**
* {@hide}
@@ -129,57 +67,68 @@ public final class UsageStats implements Parcelable {
}
public UsageStats(UsageStats stats) {
+ mPackageName = stats.mPackageName;
mBeginTimeStamp = stats.mBeginTimeStamp;
mEndTimeStamp = stats.mEndTimeStamp;
- mLastTimeSaved = stats.mLastTimeSaved;
-
- final int pkgCount = stats.mPackageStats.size();
- mPackageStats.ensureCapacity(pkgCount);
- for (int i = 0; i < pkgCount; i++) {
- PackageUsageStats pkgStats = stats.mPackageStats.valueAt(i);
- mPackageStats.append(stats.mPackageStats.keyAt(i), new PackageUsageStats(pkgStats));
- }
+ mLastTimeUsed = stats.mLastTimeUsed;
+ mTotalTimeInForeground = stats.mTotalTimeInForeground;
+ mLaunchCount = stats.mLaunchCount;
+ mLastEvent = stats.mLastEvent;
+ }
- final int eventCount = stats.mEvents == null ? 0 : stats.mEvents.size();
- if (eventCount > 0) {
- mEvents = new TimeSparseArray<>();
- for (int i = 0; i < eventCount; i++) {
- mEvents.append(stats.mEvents.keyAt(i), stats.mEvents.valueAt(i));
- }
- }
+ public String getPackageName() {
+ return mPackageName;
}
+ /**
+ * Get the beginning of the time range this {@link android.app.usage.UsageStats} represents.
+ */
public long getFirstTimeStamp() {
return mBeginTimeStamp;
}
+ /**
+ * Get the end of the time range this {@link android.app.usage.UsageStats} represents.
+ */
public long getLastTimeStamp() {
return mEndTimeStamp;
}
- public int getPackageCount() {
- return mPackageStats.size();
- }
-
- public PackageUsageStats getPackage(int index) {
- return mPackageStats.valueAt(index);
+ /**
+ * Get the last time this package was used.
+ */
+ public long getLastTimeUsed() {
+ return mLastTimeUsed;
}
- public PackageUsageStats getPackage(String packageName) {
- return mPackageStats.get(packageName);
+ /**
+ * Get the total time this package spent in the foreground.
+ */
+ public long getTotalTimeInForeground() {
+ return mTotalTimeInForeground;
}
/**
- * {@hide}
+ * Add the statistics from the right {@link UsageStats} to the left. The package name for
+ * both {@link UsageStats} objects must be the same.
+ * @param right The {@link UsageStats} object to merge into this one.
+ * @throws java.lang.IllegalArgumentException if the package names of the two
+ * {@link UsageStats} objects are different.
*/
- public PackageUsageStats getOrCreatePackageUsageStats(String packageName) {
- PackageUsageStats pkgStats = mPackageStats.get(packageName);
- if (pkgStats == null) {
- pkgStats = new PackageUsageStats();
- pkgStats.mPackageName = packageName;
- mPackageStats.put(packageName, pkgStats);
+ public void add(UsageStats right) {
+ if (!mPackageName.equals(right.mPackageName)) {
+ throw new IllegalArgumentException("Can't merge UsageStats for package '" +
+ mPackageName + "' with UsageStats for package '" + right.mPackageName + "'.");
}
- return pkgStats;
+
+ if (right.mEndTimeStamp > mEndTimeStamp) {
+ mLastEvent = right.mLastEvent;
+ mEndTimeStamp = right.mEndTimeStamp;
+ mLastTimeUsed = right.mLastTimeUsed;
+ }
+ mBeginTimeStamp = Math.min(mBeginTimeStamp, right.mBeginTimeStamp);
+ mTotalTimeInForeground += right.mTotalTimeInForeground;
+ mLaunchCount += right.mLaunchCount;
}
@Override
@@ -189,47 +138,26 @@ public final class UsageStats implements Parcelable {
@Override
public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(mPackageName);
dest.writeLong(mBeginTimeStamp);
dest.writeLong(mEndTimeStamp);
- dest.writeLong(mLastTimeSaved);
-
- int size = mPackageStats.size();
- dest.writeInt(size);
- for (int i = 0; i < size; i++) {
- mPackageStats.valueAt(i).writeToParcel(dest, flags);
- }
-
- size = mEvents == null ? 0 : mEvents.size();
- dest.writeInt(size);
- for (int i = 0; i < size; i++) {
- mEvents.valueAt(i).writeToParcel(dest, flags);
- }
+ dest.writeLong(mLastTimeUsed);
+ dest.writeLong(mTotalTimeInForeground);
+ dest.writeInt(mLaunchCount);
+ dest.writeInt(mLastEvent);
}
public static final Creator<UsageStats> CREATOR = new Creator<UsageStats>() {
@Override
public UsageStats createFromParcel(Parcel in) {
UsageStats stats = new UsageStats();
+ stats.mPackageName = in.readString();
stats.mBeginTimeStamp = in.readLong();
stats.mEndTimeStamp = in.readLong();
- stats.mLastTimeSaved = in.readLong();
-
- int size = in.readInt();
- stats.mPackageStats.ensureCapacity(size);
- for (int i = 0; i < size; i++) {
- final PackageUsageStats pkgStats = PackageUsageStats.CREATOR.createFromParcel(in);
- stats.mPackageStats.put(pkgStats.mPackageName, pkgStats);
- }
-
- size = in.readInt();
- if (size > 0) {
- stats.mEvents = new TimeSparseArray<>(size);
- for (int i = 0; i < size; i++) {
- final Event event = Event.CREATOR.createFromParcel(in);
- stats.mEvents.put(event.timeStamp, event);
- }
- }
-
+ stats.mLastTimeUsed = in.readLong();
+ stats.mTotalTimeInForeground = in.readLong();
+ stats.mLaunchCount = in.readInt();
+ stats.mLastEvent = in.readInt();
return stats;
}
diff --git a/core/java/android/app/usage/UsageStatsManager.java b/core/java/android/app/usage/UsageStatsManager.java
index fe02637..f9b8928 100644
--- a/core/java/android/app/usage/UsageStatsManager.java
+++ b/core/java/android/app/usage/UsageStatsManager.java
@@ -17,33 +17,73 @@
package android.app.usage;
import android.content.Context;
+import android.content.pm.ParceledListSlice;
import android.os.RemoteException;
+import android.util.ArrayMap;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Provides access to device usage history and statistics. Usage data is aggregated into
+ * time intervals: days, weeks, months, and years.
+ * <p />
+ * When requesting usage data since a particular time, the request might look something like this:
+ * <pre>
+ * PAST REQUEST_TIME TODAY FUTURE
+ * ————————————————————————————||———————————————————————————¦-----------------------|
+ * YEAR || ¦ |
+ * ————————————————————————————||———————————————————————————¦-----------------------|
+ * MONTH | || MONTH ¦ |
+ * ——————————————————|—————————||———————————————————————————¦-----------------------|
+ * | WEEK | WEEK|| | WEEK | WE¦EK | WEEK |
+ * ————————————————————————————||———————————————————|———————¦-----------------------|
+ * || |DAY|DAY|DAY|DAY¦DAY|DAY|DAY|DAY|DAY|DAY|
+ * ————————————————————————————||———————————————————————————¦-----------------------|
+ * </pre>
+ * A request for data in the middle of a time interval will include that interval.
+ * <p/>
+ * <b>NOTE:</b> This API requires the permission android.permission.PACKAGE_USAGE_STATS, which
+ * is a system-level permission and will not be granted to third-party apps. However, declaring
+ * the permission implies intention to use the API and the user of the device can grant permission
+ * through the Settings application.
+ */
public final class UsageStatsManager {
+
/**
- * {@hide}
+ * An interval type that spans a day. See {@link #queryUsageStats(int, long, long)}.
*/
- public static final int DAILY_BUCKET = 0;
+ public static final int INTERVAL_DAILY = 0;
/**
- * {@hide}
+ * An interval type that spans a week. See {@link #queryUsageStats(int, long, long)}.
*/
- public static final int WEEKLY_BUCKET = 1;
+ public static final int INTERVAL_WEEKLY = 1;
/**
- * {@hide}
+ * An interval type that spans a month. See {@link #queryUsageStats(int, long, long)}.
*/
- public static final int MONTHLY_BUCKET = 2;
+ public static final int INTERVAL_MONTHLY = 2;
/**
- * {@hide}
+ * An interval type that spans a year. See {@link #queryUsageStats(int, long, long)}.
*/
- public static final int YEARLY_BUCKET = 3;
+ public static final int INTERVAL_YEARLY = 3;
/**
+ * An interval type that will use the best fit interval for the given time range.
+ * See {@link #queryUsageStats(int, long, long)}.
+ */
+ public static final int INTERVAL_BEST = 4;
+
+ /**
+ * The number of available intervals. Does not include {@link #INTERVAL_BEST}, since it
+ * is a pseudo interval (it actually selects a real interval).
* {@hide}
*/
- public static final int BUCKET_COUNT = 4;
+ public static final int INTERVAL_COUNT = 4;
+
+ private static final UsageEvents sEmptyResults = new UsageEvents();
private final Context mContext;
private final IUsageStatsManager mService;
@@ -56,67 +96,100 @@ public final class UsageStatsManager {
mService = service;
}
- public UsageStats[] getDailyStatsSince(long time) {
- try {
- return mService.getStatsSince(DAILY_BUCKET, time, mContext.getOpPackageName());
- } catch (RemoteException e) {
- return null;
- }
- }
-
- public UsageStats[] getWeeklyStatsSince(long time) {
+ /**
+ * Gets application usage stats for the given time range, aggregated by the specified interval.
+ * <p>The returned list will contain a {@link UsageStats} object for each package that
+ * has data for an interval that is a subset of the time range given. To illustrate:</p>
+ * <pre>
+ * intervalType = INTERVAL_YEARLY
+ * beginTime = 2013
+ * endTime = 2015 (exclusive)
+ *
+ * Results:
+ * 2013 - com.example.alpha
+ * 2013 - com.example.beta
+ * 2014 - com.example.alpha
+ * 2014 - com.example.beta
+ * 2014 - com.example.charlie
+ * </pre>
+ *
+ * @param intervalType The time interval by which the stats are aggregated.
+ * @param beginTime The inclusive beginning of the range of stats to include in the results.
+ * @param endTime The exclusive end of the range of stats to include in the results.
+ * @return A list of {@link UsageStats} or null if none are available.
+ *
+ * @see #INTERVAL_DAILY
+ * @see #INTERVAL_WEEKLY
+ * @see #INTERVAL_MONTHLY
+ * @see #INTERVAL_YEARLY
+ * @see #INTERVAL_BEST
+ */
+ @SuppressWarnings("unchecked")
+ public List<UsageStats> queryUsageStats(int intervalType, long beginTime, long endTime) {
try {
- return mService.getStatsSince(WEEKLY_BUCKET, time, mContext.getOpPackageName());
+ ParceledListSlice<UsageStats> slice = mService.queryUsageStats(intervalType, beginTime,
+ endTime, mContext.getOpPackageName());
+ if (slice != null) {
+ return slice.getList();
+ }
} catch (RemoteException e) {
- return null;
+ // fallthrough and return null.
}
+ return Collections.EMPTY_LIST;
}
- public UsageStats[] getMonthlyStatsSince(long time) {
+ /**
+ * Query for events in the given time range. Events are only kept by the system for a few
+ * days.
+ * <p />
+ * <b>NOTE:</b> The last few minutes of the event log will be truncated to prevent abuse
+ * by applications.
+ *
+ * @param beginTime The inclusive beginning of the range of events to include in the results.
+ * @param endTime The exclusive end of the range of events to include in the results.
+ * @return A {@link UsageEvents}.
+ */
+ @SuppressWarnings("unchecked")
+ public UsageEvents queryEvents(long beginTime, long endTime) {
try {
- return mService.getStatsSince(MONTHLY_BUCKET, time, mContext.getOpPackageName());
+ UsageEvents iter = mService.queryEvents(beginTime, endTime,
+ mContext.getOpPackageName());
+ if (iter != null) {
+ return iter;
+ }
} catch (RemoteException e) {
- return null;
+ // fallthrough and return null
}
+ return sEmptyResults;
}
- public UsageStats[] getYearlyStatsSince(long time) {
- try {
- return mService.getStatsSince(YEARLY_BUCKET, time, mContext.getOpPackageName());
- } catch (RemoteException e) {
- return null;
+ /**
+ * A convenience method that queries for all stats in the given range (using the best interval
+ * for that range), merges the resulting data, and keys it by package name.
+ * See {@link #queryUsageStats(int, long, long)}.
+ *
+ * @param beginTime The inclusive beginning of the range of stats to include in the results.
+ * @param endTime The exclusive end of the range of stats to include in the results.
+ * @return An {@link android.util.ArrayMap} keyed by package name or null if no stats are
+ * available.
+ */
+ public ArrayMap<String, UsageStats> queryAndAggregateUsageStats(long beginTime, long endTime) {
+ List<UsageStats> stats = queryUsageStats(INTERVAL_BEST, beginTime, endTime);
+ if (stats.isEmpty()) {
+ @SuppressWarnings("unchecked")
+ ArrayMap<String, UsageStats> emptyStats = ArrayMap.EMPTY;
+ return emptyStats;
}
- }
-
- public UsageStats getRecentStatsSince(long time) {
- UsageStats aggregatedStats = null;
- long lastTime = time;
- UsageStats[] stats;
- while (true) {
- stats = getDailyStatsSince(lastTime);
- if (stats == null || stats.length == 0) {
- break;
- }
- for (UsageStats stat : stats) {
- lastTime = stat.mEndTimeStamp;
-
- if (aggregatedStats == null) {
- aggregatedStats = new UsageStats();
- aggregatedStats.mBeginTimeStamp = stat.mBeginTimeStamp;
- }
-
- aggregatedStats.mEndTimeStamp = stat.mEndTimeStamp;
-
- final int pkgCount = stat.getPackageCount();
- for (int i = 0; i < pkgCount; i++) {
- final PackageUsageStats pkgStats = stat.getPackage(i);
- final PackageUsageStats aggPkgStats =
- aggregatedStats.getOrCreatePackageUsageStats(pkgStats.mPackageName);
- aggPkgStats.mTotalTimeSpent += pkgStats.mTotalTimeSpent;
- aggPkgStats.mLastTimeUsed = pkgStats.mLastTimeUsed;
- aggPkgStats.mLastEvent = pkgStats.mLastEvent;
- }
+ ArrayMap<String, UsageStats> aggregatedStats = new ArrayMap<>();
+ final int statCount = stats.size();
+ for (int i = 0; i < statCount; i++) {
+ UsageStats newStat = stats.get(i);
+ UsageStats existingStat = aggregatedStats.get(newStat.getPackageName());
+ if (existingStat == null) {
+ aggregatedStats.put(newStat.mPackageName, newStat);
+ } else {
+ existingStat.add(newStat);
}
}
return aggregatedStats;
diff --git a/core/java/android/app/usage/UsageStatsManagerInternal.java b/core/java/android/app/usage/UsageStatsManagerInternal.java
index 0d41be2..119d705 100644
--- a/core/java/android/app/usage/UsageStatsManagerInternal.java
+++ b/core/java/android/app/usage/UsageStatsManagerInternal.java
@@ -32,7 +32,7 @@ public abstract class UsageStatsManagerInternal {
* @param userId The user id to which the component belongs to.
* @param timeStamp The time at which this event ocurred.
* @param eventType The event that occured. Valid values can be found at
- * {@link android.app.usage.UsageStats.Event}
+ * {@link UsageEvents}
*/
public abstract void reportEvent(ComponentName component, int userId,
long timeStamp, int eventType);
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index 66a6eb6..69716e5 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -19,12 +19,15 @@ package android.appwidget;
import java.util.ArrayList;
import java.util.HashMap;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Binder;
+import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -199,32 +202,30 @@ public class AppWidgetHost {
/**
* Starts an app widget provider configure activity for result on behalf of the caller.
* Use this method if the provider is in another profile as you are not allowed to start
- * an activity in another profile. The provided intent must have action {@link
- * AppWidgetManager#ACTION_APPWIDGET_CONFIGURE}. The widget id must be specified by
- * the {@link AppWidgetManager#EXTRA_APPWIDGET_ID} extra. The provider configure
- * activity must be specified as the component name of the intent via {@link
- * Intent#setComponent(android.content.ComponentName)}. The user profile under which
- * the provider operates is specified via the {@link
- * AppWidgetManager#EXTRA_APPWIDGET_PROVIDER_PROFILE} extra. If a user profile is
- * not provided, the current user is used. Finally, you can optionally provide a
- * request code that is returned in {@link Activity#onActivityResult(int, int,
- * android.content.Intent)}.
+ * an activity in another profile. You can optionally provide a request code that is
+ * returned in {@link Activity#onActivityResult(int, int, android.content.Intent)} and
+ * an options bundle to be passed to the started activity.
+ * <p>
+ * Note that the provided app widget has to be bound for this method to work.
+ * </p>
*
* @param activity The activity from which to start the configure one.
- * @param intent Properly populated intent for launching the configuration activity.
+ * @param appWidgetId The bound app widget whose provider's config activity to start.
* @param requestCode Optional request code retuned with the result.
+ * @param intentFlags Optional intent flags.
*
* @throws android.content.ActivityNotFoundException If the activity is not found.
*
* @see AppWidgetProviderInfo#getProfile()
*/
- public final void startAppWidgetConfigureActivityForResult(Activity activity, Intent intent,
- int requestCode) {
+ public final void startAppWidgetConfigureActivityForResult(@NonNull Activity activity,
+ int appWidgetId, int intentFlags, int requestCode, @Nullable Bundle options) {
try {
IntentSender intentSender = sService.createAppWidgetConfigIntentSender(
- mContext.getPackageName(), intent);
+ mContext.getPackageName(), appWidgetId, intentFlags);
if (intentSender != null) {
- activity.startIntentSenderForResult(intentSender, requestCode, null, 0, 0, 0);
+ activity.startIntentSenderForResult(intentSender, requestCode, null, 0, 0, 0,
+ options);
} else {
throw new ActivityNotFoundException();
}
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index e5d1d95..086eb7d 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -16,6 +16,7 @@
package android.appwidget;
+import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -673,24 +674,24 @@ public class AppWidgetManager {
}
/**
- * Gets the AppWidget providers for the given user profiles. User profiles can only
+ * Gets the AppWidget providers for the given user profile. User profile can only
* be the current user or a profile of the current user. For example, the current
* user may have a corporate profile. In this case the parent user profile has a
* child profile, the corporate one.
*
- * @param profiles The profiles for which to get providers. Passing null is equivaled
+ * @param profile The profile for which to get providers. Passing null is equivaled
* to passing only the current user handle.
* @return The intalled providers.
*
* @see android.os.Process#myUserHandle()
* @see android.os.UserManager#getUserProfiles()
*/
- public List<AppWidgetProviderInfo> getInstalledProvidersForProfiles(UserHandle[] profiles) {
+ public List<AppWidgetProviderInfo> getInstalledProvidersForProfile(@Nullable UserHandle profile) {
if (mService == null) {
return Collections.emptyList();
}
- return getInstalledProvidersForProfiles(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
- profiles);
+ return getInstalledProvidersForProfile(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
+ profile);
}
/**
@@ -700,7 +701,7 @@ public class AppWidgetManager {
if (mService == null) {
return Collections.emptyList();
}
- return getInstalledProvidersForProfiles(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
+ return getInstalledProvidersForProfile(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
null);
}
@@ -720,18 +721,18 @@ public class AppWidgetManager {
if (mService == null) {
return Collections.emptyList();
}
- return getInstalledProvidersForProfiles(categoryFilter, null);
+ return getInstalledProvidersForProfile(categoryFilter, null);
}
/**
- * Gets the AppWidget providers for the given user profiles. User profiles can only
+ * Gets the AppWidget providers for the given user profile. User profile can only
* be the current user or a profile of the current user. For example, the current
* user may have a corporate profile. In this case the parent user profile has a
* child profile, the corporate one.
*
* @param categoryFilter Will only return providers which register as any of the specified
* specified categories. See {@link AppWidgetProviderInfo#widgetCategory}.
- * @param profiles Child profiles of the current user which to be queried. The user
+ * @param profile A profile of the current user which to be queried. The user
* is itself also a profile. If null, the providers only for the current user
* are returned.
* @return The intalled providers.
@@ -741,25 +742,19 @@ public class AppWidgetManager {
*
* @hide
*/
- public List<AppWidgetProviderInfo> getInstalledProvidersForProfiles(int categoryFilter,
- UserHandle[] profiles) {
+ public List<AppWidgetProviderInfo> getInstalledProvidersForProfile(int categoryFilter,
+ UserHandle profile) {
if (mService == null) {
return Collections.emptyList();
}
- int[] profileIds = null;
-
- if (profiles != null) {
- final int profileCount = profiles.length;
- profileIds = new int[profileCount];
- for (int i = 0; i < profileCount; i++) {
- profileIds[i] = profiles[i].getIdentifier();
- }
+ if (profile == null) {
+ profile = Process.myUserHandle();
}
try {
- List<AppWidgetProviderInfo> providers = mService.getInstalledProviders(categoryFilter,
- profileIds);
+ List<AppWidgetProviderInfo> providers = mService.getInstalledProvidersForProfile(
+ categoryFilter, profile.getIdentifier());
if (providers == null) {
return Collections.emptyList();
}
diff --git a/core/java/android/appwidget/AppWidgetProviderInfo.java b/core/java/android/appwidget/AppWidgetProviderInfo.java
index 6835368..a767246 100644
--- a/core/java/android/appwidget/AppWidgetProviderInfo.java
+++ b/core/java/android/appwidget/AppWidgetProviderInfo.java
@@ -16,6 +16,7 @@
package android.appwidget;
+import android.annotation.NonNull;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
@@ -269,7 +270,7 @@ public class AppWidgetProviderInfo implements Parcelable {
* {@link android.util.DisplayMetrics#densityDpi}.
* @return The provider icon.
*/
- public final Drawable loadIcon(Context context, int density) {
+ public final Drawable loadIcon(@NonNull Context context, int density) {
return loadDrawable(context, density, providerInfo.getIconResource());
}
@@ -289,7 +290,7 @@ public class AppWidgetProviderInfo implements Parcelable {
* {@link android.util.DisplayMetrics#densityDpi}.
* @return The widget preview image.
*/
- public final Drawable loadPreviewImage(Context context, int density) {
+ public final Drawable loadPreviewImage(@NonNull Context context, int density) {
return loadDrawable(context, density, previewImage);
}
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index 5b722e2..fde8b2e 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -107,6 +107,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
private PathPermission[] mPathPermissions;
private boolean mExported;
private boolean mNoPerms;
+ private boolean mSingleUser;
private final ThreadLocal<String> mCallingPackage = new ThreadLocal<String>();
@@ -460,6 +461,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
boolean checkUser(int pid, int uid, Context context) {
return UserHandle.getUserId(uid) == context.getUserId()
+ || mSingleUser
|| context.checkPermission(INTERACT_ACROSS_USERS, pid, uid)
== PERMISSION_GRANTED;
}
@@ -1674,6 +1676,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
setWritePermission(info.writePermission);
setPathPermissions(info.pathPermissions);
mExported = info.exported;
+ mSingleUser = (info.flags & ProviderInfo.FLAG_SINGLE_USER) != 0;
setAuthorities(info.authority);
}
ContentProvider.this.onCreate();
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index fbca395..9bdfe8b 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -50,7 +50,7 @@ import java.util.List;
public abstract class CameraMetadata<TKey> {
private static final String TAG = "CameraMetadataAb";
- private static final boolean VERBOSE = false;
+ private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE);
/**
* Set a camera metadata field to a value. The field definitions can be
@@ -131,6 +131,11 @@ public abstract class CameraMetadata<TKey> {
if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type);
+ // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
+ if (type.equals(TotalCaptureResult.class)) {
+ type = CaptureResult.class;
+ }
+
if (filterTags != null) {
Arrays.sort(filterTags);
}
diff --git a/core/java/android/hardware/hdmi/HdmiTvClient.java b/core/java/android/hardware/hdmi/HdmiTvClient.java
index a9040cf..a3f6c00 100644
--- a/core/java/android/hardware/hdmi/HdmiTvClient.java
+++ b/core/java/android/hardware/hdmi/HdmiTvClient.java
@@ -35,55 +35,6 @@ import libcore.util.EmptyArray;
public final class HdmiTvClient extends HdmiClient {
private static final String TAG = "HdmiTvClient";
- // Definitions used for setOption(). These should be in sync with the definition
- // in hardware/libhardware/include/hardware/{hdmi_cec.h,mhl.h}.
-
- /**
- * TV gets turned on by incoming &lt;Text/Image View On&gt;. {@code ENABLED} by default.
- * If set to {@code DISABLED}, TV won't turn on automatically.
- */
- public static final int OPTION_CEC_AUTO_WAKEUP = 1;
-
- /**
- * If set to {@code DISABLED}, all CEC commands are discarded.
- *
- * <p> This option is for internal use only, not supposed to be used by other components.
- * @hide
- */
- public static final int OPTION_CEC_ENABLE = 2;
-
- /**
- * If set to {@code DISABLED}, system service yields control of CEC to sub-microcontroller.
- * If {@code ENABLED}, it take the control back.
- *
- * <p> This option is for internal use only, not supposed to be used by other components.
- * @hide
- */
- public static final int OPTION_CEC_SERVICE_CONTROL = 3;
-
- /**
- * Put other devices to standby when TV goes to standby. {@code ENABLED} by default.
- * If set to {@code DISABLED}, TV doesn't send &lt;Standby&gt; to other devices.
- */
- public static final int OPTION_CEC_AUTO_DEVICE_OFF = 4;
-
- /** If set to {@code DISABLED}, TV does not switch ports when mobile device is connected. */
- public static final int OPTION_MHL_INPUT_SWITCHING = 101;
-
- /** If set to {@code ENABLED}, TV disables power charging for mobile device. */
- public static final int OPTION_MHL_POWER_CHARGE = 102;
-
- /**
- * If set to {@code DISABLED}, all MHL commands are discarded.
- *
- * <p> This option is for internal use only, not supposed to be used by other components.
- * @hide
- */
- public static final int OPTION_MHL_ENABLE = 103;
-
- public static final int DISABLED = 0;
- public static final int ENABLED = 1;
-
HdmiTvClient(IHdmiControlService service) {
super(service);
}
diff --git a/core/java/android/hardware/hdmi/IHdmiControlService.aidl b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
index d6cb492..5422bc2 100644
--- a/core/java/android/hardware/hdmi/IHdmiControlService.aidl
+++ b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
@@ -52,9 +52,7 @@ interface IHdmiControlService {
void setSystemAudioMode(boolean enabled, IHdmiControlCallback callback);
void addSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener);
void removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener);
- void setControlEnabled(boolean enabled);
void setArcMode(boolean enabled);
- void setOption(int option, int value);
void setProhibitMode(boolean enabled);
void setSystemAudioVolume(int oldIndex, int newIndex, int maxIndex);
void setSystemAudioMute(boolean mute);
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 733ab32..23b23af 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4739,6 +4739,23 @@ public final class Settings {
"lock_screen_show_notifications";
/**
+ * List of TV inputs that are currently hidden. This is a string
+ * containing the IDs of all hidden TV inputs. Each ID is separated by ':'.
+ *
+ * @hide
+ */
+ public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs";
+
+ /**
+ * List of custom TV input labels. This is a string containing <TV input id, custom name>
+ * pairs. Each pair is separated by ':' and TV input id and custom name are separated by
+ * ','.
+ *
+ * @hide
+ */
+ public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels";
+
+ /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear
diff --git a/core/java/android/service/notification/INotificationListener.aidl b/core/java/android/service/notification/INotificationListener.aidl
index 19a8ef5..93b2d3b 100644
--- a/core/java/android/service/notification/INotificationListener.aidl
+++ b/core/java/android/service/notification/INotificationListener.aidl
@@ -28,5 +28,5 @@ oneway interface INotificationListener
void onNotificationRemoved(in StatusBarNotification notification,
in NotificationRankingUpdate update);
void onNotificationRankingUpdate(in NotificationRankingUpdate update);
- void onListenerFlagsChanged(int flags);
+ void onListenerHintsChanged(int hints);
} \ No newline at end of file
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index f807ad6..119f7f6 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -58,11 +58,26 @@ public abstract class NotificationListenerService extends Service {
private final String TAG = NotificationListenerService.class.getSimpleName()
+ "[" + getClass().getSimpleName() + "]";
- /** {@link #getCurrentListenerFlags() Listener flags} constant - default state. **/
- public static final int FLAG_NONE = 0;
- /** {@link #getCurrentListenerFlags() Listener flags} constant - the primary device UI
- * should disable notification sound, vibrating and other visual or aural effects. **/
- public static final int FLAG_DISABLE_HOST_ALERTS = 1;
+ /** {@link #getCurrentListenerHints() Listener hints} constant - default state. */
+ public static final int HINTS_NONE = 0;
+
+ /** Bitmask range for {@link #getCurrentListenerHints() Listener hints} host interruption level
+ * constants. */
+ public static final int HOST_INTERRUPTION_LEVEL_MASK = 0x3;
+
+ /** {@link #getCurrentListenerHints() Listener hints} constant - Normal interruption level. */
+ public static final int HINT_HOST_INTERRUPTION_LEVEL_ALL = 1;
+
+ /** {@link #getCurrentListenerHints() Listener hints} constant - Priority interruption level. */
+ public static final int HINT_HOST_INTERRUPTION_LEVEL_PRIORITY = 2;
+
+ /** {@link #getCurrentListenerHints() Listener hints} constant - No interruptions level. */
+ public static final int HINT_HOST_INTERRUPTION_LEVEL_NONE = 3;
+
+ /** {@link #getCurrentListenerHints() Listener hints} constant - the primary device UI
+ * should disable notification sound, vibrating and other visual or aural effects.
+ * This does not change the interruption level, only the effects. **/
+ public static final int HINT_HOST_DISABLE_EFFECTS = 1 << 2;
private INotificationListenerWrapper mWrapper = null;
private RankingMap mRankingMap;
@@ -174,11 +189,11 @@ public abstract class NotificationListenerService extends Service {
/**
* Implement this method to be notified when the
- * {@link #getCurrentListenerFlags() listener flags} change.
+ * {@link #getCurrentListenerHints() Listener hints} change.
*
- * @param flags The current {@link #getCurrentListenerFlags() listener flags}.
+ * @param hints The current {@link #getCurrentListenerHints() listener hints}.
*/
- public void onListenerFlagsChanged(int flags) {
+ public void onListenerHintsChanged(int hints) {
// optional
}
@@ -311,40 +326,40 @@ public abstract class NotificationListenerService extends Service {
}
/**
- * Gets the set of flags representing current state.
+ * Gets the set of hints representing current state.
*
* <p>
- * The current state may differ from the requested state if the flag represents state
+ * The current state may differ from the requested state if the hint represents state
* shared across all listeners or a feature the notification host does not support or refuses
* to grant.
*
- * @return One or more of the FLAG_ constants.
+ * @return One or more of the HINT_ constants.
*/
- public final int getCurrentListenerFlags() {
- if (!isBound()) return FLAG_NONE;
+ public final int getCurrentListenerHints() {
+ if (!isBound()) return HINTS_NONE;
try {
- return getNotificationInterface().getFlagsFromListener(mWrapper);
+ return getNotificationInterface().getHintsFromListener(mWrapper);
} catch (android.os.RemoteException ex) {
Log.v(TAG, "Unable to contact notification manager", ex);
- return FLAG_NONE;
+ return HINTS_NONE;
}
}
/**
- * Sets the desired {@link #getCurrentListenerFlags() listener flags}.
+ * Sets the desired {@link #getCurrentListenerHints() listener hints}.
*
* <p>
* This is merely a request, the host may or not choose to take action depending
* on other listener requests or other global state.
* <p>
- * Listen for updates using {@link #onListenerFlagsChanged(int)}.
+ * Listen for updates using {@link #onListenerHintsChanged(int)}.
*
- * @param flags One or more of the FLAG_ constants.
+ * @param hints One or more of the HINT_ constants.
*/
- public final void requestListenerFlags(int flags) {
+ public final void requestListenerHints(int hints) {
if (!isBound()) return;
try {
- getNotificationInterface().requestFlagsFromListener(mWrapper, flags);
+ getNotificationInterface().requestHintsFromListener(mWrapper, hints);
} catch (android.os.RemoteException ex) {
Log.v(TAG, "Unable to contact notification manager", ex);
}
@@ -480,11 +495,11 @@ public abstract class NotificationListenerService extends Service {
}
}
@Override
- public void onListenerFlagsChanged(int flags) throws RemoteException {
+ public void onListenerHintsChanged(int hints) throws RemoteException {
try {
- NotificationListenerService.this.onListenerFlagsChanged(flags);
+ NotificationListenerService.this.onListenerHintsChanged(hints);
} catch (Throwable t) {
- Log.w(TAG, "Error running onListenerFlagsChanged", t);
+ Log.w(TAG, "Error running onListenerHintsChanged", t);
}
}
}
diff --git a/core/java/android/service/voice/AlwaysOnHotwordDetector.java b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
index 4860b44..f1e1943 100644
--- a/core/java/android/service/voice/AlwaysOnHotwordDetector.java
+++ b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
@@ -188,9 +188,28 @@ public class AlwaysOnHotwordDetector {
/**
* Indicates if {@code data} is the audio that triggered the keyphrase.
*/
- public final boolean isTriggerAudio;
+ public final boolean triggerAvailable;
/**
- * Format of {@code data}. May be null if {@code isTriggerAudio} is false.
+ * Indicates if {@code captureSession} can be used to continue capturing more audio from
+ * the DSP hardware.
+ *
+ * Candidate for public API
+ * @hide
+ */
+ public final boolean captureAvailable;
+ /**
+ * The session to use when attempting to capture more audio from the DSP hardware.
+ *
+ * Candidate for public API
+ * TODO: When unhiding, change javadoc of audioFormat to -
+ * "Format of {@code data} or the audio that may be captured using {@code captureSession}.
+ * May be null if {@code triggerAvailable} and {@code captureAvailable} are false."
+ * @hide
+ */
+ public final int captureSession;
+ /**
+ * Format of {@code data}.
+ * May be null if {@code triggerAvailable} is false.
*/
@Nullable
public final AudioFormat audioFormat;
@@ -201,8 +220,11 @@ public class AlwaysOnHotwordDetector {
@Nullable
public final byte[] data;
- private EventPayload(boolean _isTriggerAudio, AudioFormat _audioFormat, byte[] _data) {
- isTriggerAudio = _isTriggerAudio;
+ private EventPayload(boolean _triggerAvailable, boolean _captureAvailable,
+ AudioFormat _audioFormat, int _captureSession, byte[] _data) {
+ triggerAvailable = _triggerAvailable;
+ captureAvailable = _captureAvailable;
+ captureSession = _captureSession;
audioFormat = _audioFormat;
data = _data;
}
@@ -513,7 +535,8 @@ public class AlwaysOnHotwordDetector {
Slog.i(TAG, "onDetected");
}
Message.obtain(mHandler, MSG_HOTWORD_DETECTED,
- new EventPayload(event.triggerInData, event.captureFormat, event.data))
+ new EventPayload(event.triggerInData, event.captureAvailable,
+ event.captureFormat, event.captureSession, event.data))
.sendToTarget();
}
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index 53220d0..2fa8d2a 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -1686,12 +1686,12 @@ public abstract class Transition implements Cloneable {
void playTransition(ViewGroup sceneRoot) {
ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
int numOldAnims = runningAnimators.size();
+ WindowId windowId = sceneRoot.getWindowId();
for (int i = numOldAnims - 1; i >= 0; i--) {
Animator anim = runningAnimators.keyAt(i);
if (anim != null) {
AnimationInfo oldInfo = runningAnimators.get(anim);
- if (oldInfo != null && oldInfo.view != null &&
- oldInfo.view.getContext() == sceneRoot.getContext()) {
+ if (oldInfo != null && oldInfo.view != null && oldInfo.windowId == windowId) {
TransitionValues oldValues = oldInfo.values;
View oldView = oldInfo.view;
TransitionValues newValues = mEndValues.viewValues.get(oldView);
diff --git a/core/java/android/view/GhostView.java b/core/java/android/view/GhostView.java
index 1aa8d99..a79838f 100644
--- a/core/java/android/view/GhostView.java
+++ b/core/java/android/view/GhostView.java
@@ -27,14 +27,13 @@ import android.graphics.Matrix;
* @hide
*/
public class GhostView extends View {
- private final Matrix mMatrix = new Matrix();
private final View mView;
- private GhostView(View view, ViewGroup host) {
+ private GhostView(View view, ViewGroup host, Matrix matrix) {
super(view.getContext());
mView = view;
- setMatrix(host);
mView.mGhostView = this;
+ mRenderNode.setAnimationMatrix(matrix);
final ViewGroup parent = (ViewGroup) mView.getParent();
setLeft(0);
setTop(0);
@@ -49,17 +48,18 @@ public class GhostView extends View {
protected void onDraw(Canvas canvas) {
if (canvas instanceof HardwareCanvas) {
HardwareCanvas hwCanvas = (HardwareCanvas) canvas;
- int saveCount = hwCanvas.save(Canvas.MATRIX_SAVE_FLAG);
- canvas.concat(mMatrix);
mView.mRecreateDisplayList = true;
RenderNode renderNode = mView.getDisplayList();
if (renderNode.isValid()) {
hwCanvas.drawRenderNode(renderNode);
}
- hwCanvas.restoreToCount(saveCount);
}
}
+ public void setMatrix(Matrix matrix) {
+ mRenderNode.setAnimationMatrix(matrix);
+ }
+
@Override
public void setVisibility(@Visibility int visibility) {
super.setVisibility(visibility);
@@ -79,18 +79,21 @@ public class GhostView extends View {
setGhostedVisibility(View.VISIBLE);
mView.mGhostView = null;
final ViewGroup parent = (ViewGroup) mView.getParent();
- parent.mRecreateDisplayList = true;
- parent.getDisplayList();
+ if (parent != null) {
+ parent.mRecreateDisplayList = true;
+ parent.getDisplayList();
+ }
}
- private void setMatrix(ViewGroup host) {
- host.transformMatrixToLocal(mMatrix);
- ViewGroup parent = (ViewGroup) mView.getParent();
- parent.transformMatrixToGlobal(mMatrix);
- mMatrix.postTranslate(-parent.getScrollX(), -parent.getScrollY());
+ public static void calculateMatrix(View view, ViewGroup host, Matrix matrix) {
+ ViewGroup parent = (ViewGroup) view.getParent();
+ matrix.reset();
+ parent.transformMatrixToGlobal(matrix);
+ matrix.preTranslate(-parent.getScrollX(), -parent.getScrollY());
+ host.transformMatrixToLocal(matrix);
}
- public static GhostView addGhost(View view, ViewGroup viewGroup) {
+ public static GhostView addGhost(View view, ViewGroup viewGroup, Matrix matrix) {
if (!(view.getParent() instanceof ViewGroup)) {
throw new IllegalArgumentException("Ghosted views must be parented by a ViewGroup");
}
@@ -105,12 +108,20 @@ public class GhostView extends View {
}
}
if (ghostView == null) {
- ghostView = new GhostView(view, (ViewGroup) overlayViewGroup.mHostView);
+ if (matrix == null) {
+ matrix = new Matrix();
+ calculateMatrix(view, viewGroup, matrix);
+ }
+ ghostView = new GhostView(view, (ViewGroup) overlayViewGroup.mHostView, matrix);
overlay.add(ghostView);
}
return ghostView;
}
+ public static GhostView addGhost(View view, ViewGroup viewGroup) {
+ return addGhost(view, viewGroup, null);
+ }
+
public static void removeGhost(View view) {
GhostView ghostView = view.mGhostView;
if (ghostView != null) {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 8c2048d..01c7467 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6901,6 +6901,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*
* @return true if the view is currently pressed, false otherwise
*/
+ @ViewDebug.ExportedProperty
public boolean isPressed() {
return (mPrivateFlags & PFLAG_PRESSED) == PFLAG_PRESSED;
}
@@ -19007,7 +19008,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @hide
*/
public void findNamedViews(Map<String, View> namedElements) {
- if (getVisibility() == VISIBLE) {
+ if (getVisibility() == VISIBLE || mGhostView != null) {
String transitionName = getTransitionName();
if (transitionName != null) {
namedElements.put(transitionName, this);
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 77f4b90..7f15381 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -6123,7 +6123,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
/** @hide */
@Override
public void findNamedViews(Map<String, View> namedElements) {
- if (getVisibility() != VISIBLE) {
+ if (getVisibility() != VISIBLE && mGhostView == null) {
return;
}
super.findNamedViews(namedElements);
diff --git a/core/java/android/view/ViewPropertyAnimator.java b/core/java/android/view/ViewPropertyAnimator.java
index 326d1dd..bae0cfb 100644
--- a/core/java/android/view/ViewPropertyAnimator.java
+++ b/core/java/android/view/ViewPropertyAnimator.java
@@ -253,9 +253,6 @@ public class ViewPropertyAnimator {
ViewPropertyAnimator(View view) {
mView = view;
view.ensureTransformationInfo();
- if (view.getContext().getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.L) {
- mRTBackend = new ViewPropertyAnimatorRT(view);
- }
}
/**
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 59891d6..b1727fa 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -17,10 +17,10 @@
package com.android.internal.app;
import android.app.Activity;
-import android.app.usage.PackageUsageStats;
import android.app.usage.UsageStats;
import android.app.usage.UsageStatsManager;
import android.os.AsyncTask;
+import android.util.ArrayMap;
import android.widget.AbsListView;
import android.widget.GridView;
import com.android.internal.R;
@@ -95,7 +95,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic
private boolean mResolvingHome = false;
private UsageStatsManager mUsm;
- private UsageStats mStats;
+ private ArrayMap<String, UsageStats> mStats;
private static final long USAGE_STATS_PERIOD = 1000 * 60 * 60 * 24 * 14;
private boolean mRegistered;
@@ -205,7 +205,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic
mUsm = (UsageStatsManager) getSystemService(Context.USAGE_STATS_SERVICE);
final long sinceTime = System.currentTimeMillis() - USAGE_STATS_PERIOD;
- mStats = mUsm.getRecentStatsSince(sinceTime);
+ mStats = mUsm.queryAndAggregateUsageStats(sinceTime, System.currentTimeMillis());
Log.d(TAG, "sinceTime=" + sinceTime);
mMaxColumns = getResources().getInteger(R.integer.config_maxResolverActivityColumns);
@@ -1018,9 +1018,6 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic
if (lhs.targetUserId != UserHandle.USER_CURRENT) {
return 1;
}
- if (lhs.targetUserId != UserHandle.USER_CURRENT) {
- return -1;
- }
if (mStats != null) {
final long timeDiff =
@@ -1042,9 +1039,9 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic
private long getPackageTimeSpent(String packageName) {
if (mStats != null) {
- final PackageUsageStats stats = mStats.getPackage(packageName);
+ final UsageStats stats = mStats.get(packageName);
if (stats != null) {
- return stats.getTotalTimeSpent();
+ return stats.getTotalTimeInForeground();
}
}
diff --git a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
index 9da1c9d..008d38b 100644
--- a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
+++ b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
@@ -41,7 +41,8 @@ interface IAppWidgetService {
void deleteAllHosts();
RemoteViews getAppWidgetViews(String callingPackage, int appWidgetId);
int[] getAppWidgetIdsForHost(String callingPackage, int hostId);
- IntentSender createAppWidgetConfigIntentSender(String callingPackage, in Intent intent);
+ IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId,
+ int intentFlags);
//
// for AppWidgetManager
@@ -53,8 +54,8 @@ interface IAppWidgetService {
in RemoteViews views);
void updateAppWidgetProvider(in ComponentName provider, in RemoteViews views);
void notifyAppWidgetViewDataChanged(String packageName, in int[] appWidgetIds, int viewId);
- List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter,
- in int[] profileIds);
+ List<AppWidgetProviderInfo> getInstalledProvidersForProfile(int categoryFilter,
+ int profileId);
AppWidgetProviderInfo getAppWidgetInfo(String callingPackage, int appWidgetId);
boolean hasBindAppWidgetPermission(in String packageName, int userId);
void setBindAppWidgetPermission(in String packageName, int userId, in boolean permission);
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f6c0d71..e81ec69 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -5209,14 +5209,10 @@
<attr name="name" />
<!-- The width a path stroke -->
<attr name="strokeWidth" format="float" />
- <!-- The opacity of a path stroke @hide-->
- <attr name="strokeOpacity" format="float" />
<!-- The color to stroke the path if not defined implies no stroke-->
<attr name="strokeColor" format="color" />
<!-- The color to fill the path if not defined implies no fill-->
<attr name="fillColor" format="color" />
- <!-- The level of opacity of the filled area of the path @hide-->
- <attr name="fillOpacity" format="float" />
<!-- The specification of the operations that define the path -->
<attr name="pathData" format="string" />
<!-- The fraction of the path to trim from the start from 0 to 1 -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 67352d7..60aacf2 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2118,11 +2118,9 @@
<public type="attr" name="transitionGroup" />
<public type="attr" name="viewportWidth" />
<public type="attr" name="viewportHeight" />
- <public type="attr" name="fillOpacity" />
<public type="attr" name="fillColor" />
<public type="attr" name="pathData" />
<public type="attr" name="strokeColor" />
- <public type="attr" name="strokeOpacity" />
<public type="attr" name="strokeWidth" />
<public type="attr" name="trimPathStart" />
<public type="attr" name="trimPathEnd" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index dd1d433..4659ace 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2107,9 +2107,9 @@
<string name="permdesc_cache_filesystem">Allows the app to read and write the cache filesystem.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_use_sip">make/receive Internet calls</string>
+ <string name="permlab_use_sip">make/receive SIP calls</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_use_sip">Allows the app to use the SIP service to make/receive Internet calls.</string>
+ <string name="permdesc_use_sip">Allows the app to make and receive SIP calls.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_bind_call_service">interact with in-call screen</string>
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index cf675ed..f097239 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -225,8 +225,7 @@ public class RippleDrawable extends LayerDrawable {
if (stateSet[i] == R.attr.state_enabled) {
enabled = true;
}
- if (stateSet[i] == R.attr.state_focused
- || stateSet[i] == R.attr.state_selected) {
+ if (stateSet[i] == R.attr.state_focused) {
focused = true;
}
if (stateSet[i] == R.attr.state_pressed) {
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 1a96b2f..d9f7941 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -100,6 +100,9 @@ ifeq ($(USE_OPENGL_RENDERER),true)
LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
endif
+ # Defaults for ATRACE_TAG and LOG_TAG for libhwui
+ LOCAL_CFLAGS += -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\"
+
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index dd2e2fd..5ecd77a 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -249,6 +249,10 @@ void CanvasPropertyPrimitiveAnimator::setValue(RenderNode* target, float value)
mProperty->value = value;
}
+uint32_t CanvasPropertyPrimitiveAnimator::dirtyMask() {
+ return RenderNode::DISPLAY_LIST;
+}
+
/************************************************************
* CanvasPropertySkPaintAnimator
************************************************************/
@@ -288,6 +292,10 @@ void CanvasPropertyPaintAnimator::setValue(RenderNode* target, float value) {
LOG_ALWAYS_FATAL("Unknown field %d", (int) mField);
}
+uint32_t CanvasPropertyPaintAnimator::dirtyMask() {
+ return RenderNode::DISPLAY_LIST;
+}
+
RevealAnimator::RevealAnimator(int centerX, int centerY,
float startValue, float finalValue)
: BaseRenderNodeAnimator(finalValue)
@@ -305,5 +313,9 @@ void RevealAnimator::setValue(RenderNode* target, float value) {
mCenterX, mCenterY, value);
}
+uint32_t RevealAnimator::dirtyMask() {
+ return RenderNode::GENERIC;
+}
+
} /* namespace uirenderer */
} /* namespace android */
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index b0dcf2d..6dfe7b4 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -62,7 +62,7 @@ public:
bool isFinished() { return mPlayState == FINISHED; }
float finalValue() { return mFinalValue; }
- ANDROID_API virtual uint32_t dirtyMask() { return 0; }
+ ANDROID_API virtual uint32_t dirtyMask() = 0;
protected:
BaseRenderNodeAnimator(float finalValue);
@@ -145,6 +145,9 @@ class CanvasPropertyPrimitiveAnimator : public BaseRenderNodeAnimator {
public:
ANDROID_API CanvasPropertyPrimitiveAnimator(CanvasPropertyPrimitive* property,
float finalValue);
+
+ ANDROID_API virtual uint32_t dirtyMask();
+
protected:
virtual float getValue(RenderNode* target) const;
virtual void setValue(RenderNode* target, float value);
@@ -161,6 +164,9 @@ public:
ANDROID_API CanvasPropertyPaintAnimator(CanvasPropertyPaint* property,
PaintField field, float finalValue);
+
+ ANDROID_API virtual uint32_t dirtyMask();
+
protected:
virtual float getValue(RenderNode* target) const;
virtual void setValue(RenderNode* target, float value);
@@ -173,13 +179,15 @@ class RevealAnimator : public BaseRenderNodeAnimator {
public:
ANDROID_API RevealAnimator(int centerX, int centerY,
float startValue, float finalValue);
+
+ ANDROID_API virtual uint32_t dirtyMask();
+
protected:
virtual float getValue(RenderNode* target) const;
virtual void setValue(RenderNode* target, float value);
private:
int mCenterX, mCenterY;
- bool mInverseClip;
};
} /* namespace uirenderer */
diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp
index 27b0893..7221295a4 100644
--- a/libs/hwui/AnimatorManager.cpp
+++ b/libs/hwui/AnimatorManager.cpp
@@ -66,22 +66,26 @@ void AnimatorManager::pushStaging(TreeInfo& info) {
class AnimateFunctor {
public:
AnimateFunctor(RenderNode& target, TreeInfo& info)
- : mTarget(target), mInfo(info) {}
+ : dirtyMask(0), mTarget(target), mInfo(info) {}
bool operator() (BaseRenderNodeAnimator* animator) {
+ dirtyMask |= animator->dirtyMask();
bool remove = animator->animate(mInfo);
if (remove) {
animator->decStrong(0);
}
return remove;
}
+
+ uint32_t dirtyMask;
+
private:
RenderNode& mTarget;
TreeInfo& mInfo;
};
-void AnimatorManager::animate(TreeInfo& info) {
- if (!mAnimators.size()) return;
+uint32_t AnimatorManager::animate(TreeInfo& info) {
+ if (!mAnimators.size()) return 0;
// TODO: Can we target this better? For now treat it like any other staging
// property push and just damage self before and after animators are run
@@ -97,6 +101,8 @@ void AnimatorManager::animate(TreeInfo& info) {
mParent.mProperties.updateMatrix();
info.damageAccumulator->pushTransform(&mParent);
mParent.damageSelf(info);
+
+ return functor.dirtyMask;
}
} /* namespace uirenderer */
diff --git a/libs/hwui/AnimatorManager.h b/libs/hwui/AnimatorManager.h
index 2568121..0d177c5 100644
--- a/libs/hwui/AnimatorManager.h
+++ b/libs/hwui/AnimatorManager.h
@@ -40,7 +40,8 @@ public:
void addAnimator(const sp<BaseRenderNodeAnimator>& animator);
void pushStaging(TreeInfo& info);
- void animate(TreeInfo& info);
+ // Returns the combined dirty mask of all animators run
+ uint32_t animate(TreeInfo& info);
private:
RenderNode& mParent;
diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp
index 8b32c40..15bed58 100644
--- a/libs/hwui/DamageAccumulator.cpp
+++ b/libs/hwui/DamageAccumulator.cpp
@@ -83,11 +83,6 @@ void DamageAccumulator::pushTransform(const Matrix4* transform) {
mHead->matrix4 = transform;
}
-void DamageAccumulator::pushNullTransform() {
- pushCommon();
- mHead->type = TransformNone;
-}
-
void DamageAccumulator::popTransform() {
LOG_ALWAYS_FATAL_IF(mHead->prev == mHead, "Cannot pop the root frame!");
DirtyStack* dirtyFrame = mHead;
diff --git a/libs/hwui/DamageAccumulator.h b/libs/hwui/DamageAccumulator.h
index fc9b41b..90d9425 100644
--- a/libs/hwui/DamageAccumulator.h
+++ b/libs/hwui/DamageAccumulator.h
@@ -35,7 +35,6 @@ class IDamageAccumulator {
public:
virtual void pushTransform(const RenderNode* transform) = 0;
virtual void pushTransform(const Matrix4* transform) = 0;
- virtual void pushNullTransform() = 0;
virtual void popTransform() = 0;
virtual void dirty(float left, float top, float right, float bottom) = 0;
virtual void peekAtDirty(SkRect* dest) = 0;
@@ -54,9 +53,6 @@ public:
// will be affected by the transform when popTransform() is called.
virtual void pushTransform(const RenderNode* transform);
virtual void pushTransform(const Matrix4* transform);
- // This is used in combination with peekAtDirty to inspect the damage
- // area of a subtree
- virtual void pushNullTransform();
// Pops a transform node from the stack, propagating the dirty rect
// up to the parent node. Returns the IDamageTransform that was just applied
@@ -83,7 +79,6 @@ class NullDamageAccumulator : public IDamageAccumulator {
public:
virtual void pushTransform(const RenderNode* transform) { }
virtual void pushTransform(const Matrix4* transform) { }
- virtual void pushNullTransform() { }
virtual void popTransform() { }
virtual void dirty(float left, float top, float right, float bottom) { }
virtual void peekAtDirty(SkRect* dest) { dest->setEmpty(); }
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 396c7f3..636f218 100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -598,6 +598,7 @@ void OpenGLRenderer::clearLayerUpdates() {
}
void OpenGLRenderer::flushLayerUpdates() {
+ ATRACE_CALL();
syncState();
updateLayers();
flushLayers();
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 23940ee..c59b010 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -136,13 +136,18 @@ void RenderNode::damageSelf(TreeInfo& info) {
}
}
-void RenderNode::prepareLayer(TreeInfo& info) {
+void RenderNode::prepareLayer(TreeInfo& info, uint32_t dirtyMask) {
LayerType layerType = properties().layerProperties().type();
if (CC_UNLIKELY(layerType == kLayerTypeRenderLayer)) {
- // We push a null transform here as we don't care what the existing dirty
- // area is, only what our display list dirty is as well as our children's
- // dirty area
- info.damageAccumulator->pushNullTransform();
+ // Damage applied so far needs to affect our parent, but does not require
+ // the layer to be updated. So we pop/push here to clear out the current
+ // damage and get a clean state for display list or children updates to
+ // affect, which will require the layer to be updated
+ info.damageAccumulator->popTransform();
+ info.damageAccumulator->pushTransform(this);
+ if (dirtyMask & DISPLAY_LIST) {
+ damageSelf(info);
+ }
}
}
@@ -151,9 +156,6 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) {
// If we are not a layer OR we cannot be rendered (eg, view was detached)
// we need to destroy any Layers we may have had previously
if (CC_LIKELY(layerType != kLayerTypeRenderLayer) || CC_UNLIKELY(!isRenderable())) {
- if (layerType == kLayerTypeRenderLayer) {
- info.damageAccumulator->popTransform();
- }
if (CC_UNLIKELY(mLayer)) {
LayerRenderer::destroyLayer(mLayer);
mLayer = NULL;
@@ -175,7 +177,6 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) {
SkRect dirty;
info.damageAccumulator->peekAtDirty(&dirty);
- info.damageAccumulator->popTransform();
if (!mLayer) {
if (info.errorHandler) {
@@ -204,8 +205,8 @@ void RenderNode::prepareTreeImpl(TreeInfo& info) {
if (info.mode == TreeInfo::MODE_FULL) {
pushStagingPropertiesChanges(info);
}
- mAnimatorManager.animate(info);
- prepareLayer(info);
+ uint32_t animatorDirtyMask = mAnimatorManager.animate(info);
+ prepareLayer(info, animatorDirtyMask);
if (info.mode == TreeInfo::MODE_FULL) {
pushStagingDisplayListChanges(info);
}
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index 8cc65b2..fa310e0 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -90,6 +90,7 @@ public:
Y = 1 << 11,
Z = 1 << 12,
ALPHA = 1 << 13,
+ DISPLAY_LIST = 1 << 14,
};
ANDROID_API RenderNode();
@@ -244,7 +245,7 @@ private:
void pushStagingDisplayListChanges(TreeInfo& info);
void prepareSubTree(TreeInfo& info, DisplayListData* subtree);
void applyLayerPropertiesToLayer(TreeInfo& info);
- void prepareLayer(TreeInfo& info);
+ void prepareLayer(TreeInfo& info, uint32_t dirtyMask);
void pushLayerUpdate(TreeInfo& info);
void deleteDisplayListData();
void damageSelf(TreeInfo& info);
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 8d0e986..94e9b41 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -33,9 +33,12 @@ import android.hardware.hdmi.HdmiDeviceInfo;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.UserHandle;
+import android.provider.Settings;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.Pair;
import android.util.SparseIntArray;
import android.util.Xml;
@@ -44,6 +47,9 @@ import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
/**
* This class is used to specify meta information of a TV input.
@@ -390,7 +396,20 @@ public final class TvInputInfo implements Parcelable {
}
/**
- * Loads the user-displayed label for this TV input service.
+ * Checks if this TV input is marked hidden by the user in the settings.
+ *
+ * @param context Supplies a {@link Context} used to check if this TV input is hidden.
+ * @return {@code true} if the user marked this TV input hidden in settings. {@code false}
+ * otherwise.
+ * @hide
+ */
+ @SystemApi
+ public boolean isHidden(Context context) {
+ return TvInputSettings.isHidden(context, mId, UserHandle.USER_CURRENT);
+ }
+
+ /**
+ * Loads the user-displayed label for this TV input.
*
* @param context Supplies a {@link Context} used to load the label.
* @return a CharSequence containing the TV input's label. If the TV input does not have
@@ -405,7 +424,20 @@ public final class TvInputInfo implements Parcelable {
}
/**
- * Loads the user-displayed icon for this TV input service.
+ * Loads the custom label set by user in settings.
+ *
+ * @param context Supplies a {@link Context} used to load the custom label.
+ * @return a CharSequence containing the TV input's custom label. {@code null} if there is no
+ * custom label.
+ * @hide
+ */
+ @SystemApi
+ public CharSequence loadCustomLabel(Context context) {
+ return TvInputSettings.getCustomLabel(context, mId, UserHandle.USER_CURRENT);
+ }
+
+ /**
+ * Loads the user-displayed icon for this TV input.
*
* @param context Supplies a {@link Context} used to load the icon.
* @return a Drawable containing the TV input's icon. If the TV input does not have
@@ -551,4 +583,139 @@ public final class TvInputInfo implements Parcelable {
mIsConnectedToHdmiSwitch = in.readByte() == 1 ? true : false;
mRatingSystemXmlUri = in.readParcelable(null);
}
+
+ /**
+ * Utility class for putting and getting settings for TV input.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final class TvInputSettings {
+ private static final String TV_INPUT_SEPARATOR = ":";
+ private static final String CUSTOM_NAME_SEPARATOR = ",";
+
+ private TvInputSettings() { }
+
+ private static boolean isHidden(Context context, String inputId, int userId) {
+ return getHiddenTvInputIds(context, userId).contains(inputId);
+ }
+
+ private static String getCustomLabel(Context context, String inputId, int userId) {
+ for (Pair<String, String> pair : getCustomLabelList(context, userId)) {
+ if (pair.first.equals(inputId)) {
+ return pair.second;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns a list of TV input IDs which are marked as hidden by user in the settings.
+ *
+ * @param context The application context
+ * @param userId The user ID for the stored hidden input list
+ * @hide
+ */
+ @SystemApi
+ public static List<String> getHiddenTvInputIds(Context context, int userId) {
+ String hiddenIdsString = Settings.Secure.getStringForUser(
+ context.getContentResolver(), Settings.Secure.TV_INPUT_HIDDEN_INPUTS, userId);
+ if (TextUtils.isEmpty(hiddenIdsString)) {
+ return new ArrayList<String>();
+ }
+ String[] ids = hiddenIdsString.split(TV_INPUT_SEPARATOR);
+ return Arrays.asList(ids);
+ }
+
+ /**
+ * Returns a list of TV input ID/custom label pairs set by the user in the settings.
+ *
+ * @param context The application context
+ * @param userId The user ID for the stored hidden input list
+ * @hide
+ */
+ @SystemApi
+ public static List<Pair<String, String>> getCustomLabelList(Context context, int userId) {
+ String labelsString = Settings.Secure.getStringForUser(
+ context.getContentResolver(), Settings.Secure.TV_INPUT_CUSTOM_LABELS, userId);
+ List<Pair<String, String>> list = new ArrayList<Pair<String, String>>();
+ if (TextUtils.isEmpty(labelsString)) {
+ return list;
+ }
+ String[] pairs = labelsString.split(TV_INPUT_SEPARATOR);
+ for (String pairString : pairs) {
+ String[] pair = pairString.split(CUSTOM_NAME_SEPARATOR);
+ list.add(new Pair<String, String>(pair[0], pair[1]));
+ }
+ return list;
+ }
+
+ /**
+ * Stores a list of TV input IDs which are marked as hidden by user. This is expected to
+ * be called from the settings app.
+ *
+ * @param context The application context
+ * @param hiddenInputIds A list including all the hidden TV input IDs
+ * @param userId The user ID for the stored hidden input list
+ * @hide
+ */
+ @SystemApi
+ public static void putHiddenTvInputList(Context context, List<String> hiddenInputIds,
+ int userId) {
+ StringBuilder builder = new StringBuilder();
+ boolean firstItem = true;
+ for (String inputId : hiddenInputIds) {
+ ensureSeparatorIsNotIncluded(inputId);
+ if (firstItem) {
+ firstItem = false;
+ } else {
+ builder.append(TV_INPUT_SEPARATOR);
+ }
+ builder.append(inputId);
+ }
+ Settings.Secure.putStringForUser(context.getContentResolver(),
+ Settings.Secure.TV_INPUT_HIDDEN_INPUTS, builder.toString(), userId);
+ }
+
+ /**
+ * Stores a list of TV input ID/custom label pairs set by user. This is expected to be
+ * called from the settings app.
+ *
+ * @param context The application context.
+ * @param customLabels A list of TV input ID/custom label pairs
+ * @param userId The user ID for the stored hidden input list
+ * @hide
+ */
+ @SystemApi
+ public static void putCustomLabelList(Context context,
+ List<Pair<String, String>> customLabels, int userId) {
+ StringBuilder builder = new StringBuilder();
+ boolean firstItem = true;
+ for (Pair<String, String> pair : customLabels) {
+ ensureSeparatorIsNotIncluded(pair.first);
+ ensureSeparatorIsNotIncluded(pair.second);
+ if (firstItem) {
+ firstItem = false;
+ } else {
+ builder.append(TV_INPUT_SEPARATOR);
+ }
+ builder.append(pair.first);
+ builder.append(CUSTOM_NAME_SEPARATOR);
+ builder.append(pair.second);
+ }
+ Settings.Secure.putStringForUser(context.getContentResolver(),
+ Settings.Secure.TV_INPUT_CUSTOM_LABELS, builder.toString(), userId);
+ }
+
+ private static void ensureSeparatorIsNotIncluded(String value) {
+ if (value.contains(TV_INPUT_SEPARATOR)) {
+ throw new IllegalArgumentException( value + " should not include "
+ + TV_INPUT_SEPARATOR);
+ }
+ if (value.contains(CUSTOM_NAME_SEPARATOR)) {
+ throw new IllegalArgumentException( value + " should not include "
+ + CUSTOM_NAME_SEPARATOR);
+ }
+ }
+ }
}
diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java
index 408ee7b..8783648 100644
--- a/media/java/android/media/tv/TvInputService.java
+++ b/media/java/android/media/tv/TvInputService.java
@@ -1057,6 +1057,7 @@ public abstract class TvInputService extends Service {
private TvInputManager.Session mHardwareSession;
private ITvInputSession mProxySession;
private ITvInputSessionCallback mProxySessionCallback;
+ private Handler mServiceHandler;
/**
* Returns the hardware TV input ID the external device is connected to.
@@ -1085,7 +1086,7 @@ public abstract class TvInputService extends Service {
args.arg3 = null;
onRelease();
}
- mHandler.obtainMessage(ServiceHandler.DO_NOTIFY_SESSION_CREATED, args)
+ mServiceHandler.obtainMessage(ServiceHandler.DO_NOTIFY_SESSION_CREATED, args)
.sendToTarget();
}
@@ -1209,8 +1210,8 @@ public abstract class TvInputService extends Service {
InputChannel channel = (InputChannel) args.arg1;
ITvInputSessionCallback cb = (ITvInputSessionCallback) args.arg2;
String inputId = (String) args.arg3;
- Session sessionImpl = onCreateSession(inputId);
args.recycle();
+ Session sessionImpl = onCreateSession(inputId);
if (sessionImpl == null) {
try {
// Failed to create a session.
@@ -1218,39 +1219,40 @@ public abstract class TvInputService extends Service {
} catch (RemoteException e) {
Log.e(TAG, "error in onSessionCreated");
}
- } else {
- sessionImpl.setSessionCallback(cb);
- ITvInputSession stub = new ITvInputSessionWrapper(TvInputService.this,
- sessionImpl, channel);
- if (sessionImpl instanceof HardwareSession) {
- HardwareSession proxySession =
- ((HardwareSession) sessionImpl);
- String harewareInputId = proxySession.getHardwareInputId();
- if (!TextUtils.isEmpty(harewareInputId)) {
- // TODO: check if the given ID is really hardware TV input.
- proxySession.mProxySession = stub;
- proxySession.mProxySessionCallback = cb;
- TvInputManager manager = (TvInputManager) getSystemService(
- Context.TV_INPUT_SERVICE);
- manager.createSession(harewareInputId,
- proxySession.mHardwareSessionCallback, mServiceHandler);
- } else {
- sessionImpl.onRelease();
- Log.w(TAG, "Hardware input id is not setup yet.");
- try {
- cb.onSessionCreated(null, null);
- } catch (RemoteException e) {
- Log.e(TAG, "error in onSessionCreated");
- }
+ return;
+ }
+ sessionImpl.setSessionCallback(cb);
+ ITvInputSession stub = new ITvInputSessionWrapper(TvInputService.this,
+ sessionImpl, channel);
+ if (sessionImpl instanceof HardwareSession) {
+ HardwareSession proxySession =
+ ((HardwareSession) sessionImpl);
+ String harewareInputId = proxySession.getHardwareInputId();
+ if (TextUtils.isEmpty(harewareInputId)) {
+ sessionImpl.onRelease();
+ Log.w(TAG, "Hardware input id is not setup yet.");
+ try {
+ cb.onSessionCreated(null, null);
+ } catch (RemoteException e) {
+ Log.e(TAG, "error in onSessionCreated");
}
- } else {
- SomeArgs someArgs = SomeArgs.obtain();
- someArgs.arg1 = stub;
- someArgs.arg2 = cb;
- someArgs.arg3 = null;
- mServiceHandler.obtainMessage(ServiceHandler.DO_NOTIFY_SESSION_CREATED,
- someArgs).sendToTarget();
+ return;
}
+ // TODO: check if the given ID is really hardware TV input.
+ proxySession.mProxySession = stub;
+ proxySession.mProxySessionCallback = cb;
+ proxySession.mServiceHandler = mServiceHandler;
+ TvInputManager manager = (TvInputManager) getSystemService(
+ Context.TV_INPUT_SERVICE);
+ manager.createSession(harewareInputId,
+ proxySession.mHardwareSessionCallback, mServiceHandler);
+ } else {
+ SomeArgs someArgs = SomeArgs.obtain();
+ someArgs.arg1 = stub;
+ someArgs.arg2 = cb;
+ someArgs.arg3 = null;
+ mServiceHandler.obtainMessage(ServiceHandler.DO_NOTIFY_SESSION_CREATED,
+ someArgs).sendToTarget();
}
return;
}
diff --git a/packages/DocumentsUI/AndroidManifest.xml b/packages/DocumentsUI/AndroidManifest.xml
index 915e2f9..e95e5ec 100644
--- a/packages/DocumentsUI/AndroidManifest.xml
+++ b/packages/DocumentsUI/AndroidManifest.xml
@@ -42,12 +42,6 @@
</intent-filter>
</activity>
- <activity
- android:name=".SettingsActivity"
- android:label="@string/menu_settings"
- android:theme="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge"
- android:exported="false" />
-
<provider
android:name=".RecentsProvider"
android:authorities="com.android.documentsui.recents"
diff --git a/packages/DocumentsUI/res/color/root_activated.xml b/packages/DocumentsUI/res/color/root_activated.xml
new file mode 100644
index 0000000..36a016d
--- /dev/null
+++ b/packages/DocumentsUI/res/color/root_activated.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_activated="true" android:color="?android:attr/colorAccent" />
+ <item android:color="@*android:color/secondary_text_material_light" />
+</selector>
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am.png
deleted file mode 100644
index 54d76c1..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am_alpha.png
new file mode 100644
index 0000000..95b2b6d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_breadcrumb_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept.png b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept.png
deleted file mode 100644
index 1330240..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept_alpha.png
new file mode 100644
index 0000000..ddf9a80
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_accept_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel.png b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel.png
deleted file mode 100644
index 6369d18..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel_alpha.png
new file mode 100644
index 0000000..7168197
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_cancel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item.png b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item.png
deleted file mode 100644
index 063009d..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item_alpha.png
new file mode 100644
index 0000000..1c6ec6a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_cab_select_item_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_alpha.png
new file mode 100644
index 0000000..11546a7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_dark.png
deleted file mode 100644
index bea0eec..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_light.png
deleted file mode 100644
index c4c264e..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_alert_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_alpha.png
new file mode 100644
index 0000000..de5c113
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_dark.png
deleted file mode 100644
index f7e59a5..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_light.png
deleted file mode 100644
index ae50d74..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_dialog_info_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.png
deleted file mode 100644
index bf0ac6c..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album_alpha.png
new file mode 100644
index 0000000..769144a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk.png
deleted file mode 100644
index d4de3bd..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk_alpha.png
new file mode 100644
index 0000000..22f95b9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_apk_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_alpha.png
new file mode 100644
index 0000000..c5152f4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_dark_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_dark_am.png
deleted file mode 100644
index 1e3a623..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_light_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_light_am.png
deleted file mode 100644
index 7d320fc..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_audio_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate.png
deleted file mode 100644
index 250208d..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate_alpha.png
new file mode 100644
index 0000000..3086a69
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_certificate_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes.png
deleted file mode 100644
index 1bbdb21..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes_alpha.png
new file mode 100644
index 0000000..b86f0f7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_codes_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed.png
deleted file mode 100644
index 124486d..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed_alpha.png
new file mode 100644
index 0000000..9d0988d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_compressed_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact.png
deleted file mode 100644
index f1af4bd..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am.png
deleted file mode 100644
index 7ad6c37..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am_alpha.png
new file mode 100644
index 0000000..6c31360
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_contact_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event.png
deleted file mode 100644
index 9639efc..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am.png
deleted file mode 100644
index bb7e584..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am_alpha.png
new file mode 100644
index 0000000..1450ff0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_event_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel.png
deleted file mode 100644
index c744499..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel_alpha.png
new file mode 100644
index 0000000..4ad54bb
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_excel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_folder_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_folder_alpha.png
new file mode 100644
index 0000000..7f7c636
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_font.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_font.png
deleted file mode 100644
index 206d95f..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_font.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_font_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_font_alpha.png
new file mode 100644
index 0000000..d867847
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_font_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.png
deleted file mode 100644
index 484288a..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am.png
deleted file mode 100644
index a799a83..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am_alpha.png
new file mode 100644
index 0000000..5459767
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_alpha.png
new file mode 100644
index 0000000..0cbd992
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_dark.png
deleted file mode 100644
index d2e5e6a..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_light.png
deleted file mode 100644
index a1badcf..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_image_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png
deleted file mode 100644
index 1e9ad7b..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf_alpha.png
new file mode 100644
index 0000000..db46702
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint.png
deleted file mode 100644
index fa425d3..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint_alpha.png
new file mode 100644
index 0000000..b9f7af5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_powerpoint_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation.png
deleted file mode 100644
index 5274bb3..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation_alpha.png
new file mode 100644
index 0000000..1218c2f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_presentation_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet.png
deleted file mode 100644
index 82ffc32..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am.png
deleted file mode 100644
index 7abe436..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am_alpha.png
new file mode 100644
index 0000000..46d755f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_spreadsheet_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text.png
deleted file mode 100644
index a741027..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am.png
deleted file mode 100644
index 737cca7..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am_alpha.png
new file mode 100644
index 0000000..933570b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_text_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_am_alpha.png
new file mode 100644
index 0000000..30cea25
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_dark_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_dark_am.png
deleted file mode 100644
index f2cad34..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_light_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_light_am.png
deleted file mode 100644
index 75c1f0d..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_video_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_word.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_word.png
deleted file mode 100644
index 9d5b864..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_word.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_word_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_word_alpha.png
new file mode 100644
index 0000000..67b60de
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_word_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_folder.png b/packages/DocumentsUI/res/drawable-hdpi/ic_folder.png
deleted file mode 100644
index 3c88982..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_folder_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_folder_alpha.png
new file mode 100644
index 0000000..eb71f81
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.png
deleted file mode 100644
index 59bf931..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder_alpha.png
new file mode 100644
index 0000000..874fde7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_hamburger.png b/packages/DocumentsUI/res/drawable-hdpi/ic_hamburger.png
deleted file mode 100644
index 4527667..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_hamburger.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_hamburger_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_hamburger_alpha.png
new file mode 100644
index 0000000..b38e5ee
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_hamburger_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy.png
deleted file mode 100644
index f4f9df2..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy_alpha.png
new file mode 100644
index 0000000..4997173
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_copy_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete.png
deleted file mode 100644
index 396ce59..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete_alpha.png
new file mode 100644
index 0000000..b63eecd
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_delete_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am.png
deleted file mode 100644
index ddf9f9a..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am_alpha.png
new file mode 100644
index 0000000..59eef4d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_disconnect_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am.png
deleted file mode 100644
index 503b982..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am_alpha.png
new file mode 100644
index 0000000..cd8987a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.png
deleted file mode 100644
index 6b01137..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow_alpha.png
new file mode 100644
index 0000000..95716b3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am.png
deleted file mode 100644
index ceeb8c6..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am_alpha.png
new file mode 100644
index 0000000..76394c4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_rename_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_search.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_search.png
deleted file mode 100644
index dca23e6..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_search.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_search_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_search_alpha.png
new file mode 100644
index 0000000..941b93c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_search_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings.png
deleted file mode 100644
index d52840f..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings_alpha.png
new file mode 100644
index 0000000..4f5bcea
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_settings_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_share.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_share.png
deleted file mode 100644
index 8ff9ea5..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_share.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_share_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_share_alpha.png
new file mode 100644
index 0000000..b7093a0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_share_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am.png
deleted file mode 100644
index 0864867..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am_alpha.png
new file mode 100644
index 0000000..fad19c1
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_sortby_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am.png
deleted file mode 100644
index b66e252..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am_alpha.png
new file mode 100644
index 0000000..df94033
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_undo_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid.png
deleted file mode 100644
index 3035ac4..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid_alpha.png
new file mode 100644
index 0000000..87154ad
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_grid_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list.png
deleted file mode 100644
index d1f26a6..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list_alpha.png
new file mode 100644
index 0000000..9b40dae
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_view_list_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_open_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_open_am.png
deleted file mode 100644
index b0a5f73..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_open_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_open_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_open_am_alpha.png
new file mode 100644
index 0000000..6b0d909
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_open_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_popout_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_popout_am.png
deleted file mode 100644
index 9497fb0b..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_popout_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_popout_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_popout_am_alpha.png
new file mode 100644
index 0000000..e1c39f8
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_popout_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_alpha.png
new file mode 100644
index 0000000..092556a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_dark.png
deleted file mode 100644
index 96d23be..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_light.png
deleted file mode 100644
index 032fb17..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_download_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_am_alpha.png
new file mode 100644
index 0000000..223e619
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_dark_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_dark_am.png
deleted file mode 100644
index e2001f7..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_light_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_light_am.png
deleted file mode 100644
index f2cec4f..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_folder_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_alpha.png
new file mode 100644
index 0000000..37fbdf7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_dark.png
deleted file mode 100644
index 6954b42..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_light.png
deleted file mode 100644
index 3ede991..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_recent_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_alpha.png
new file mode 100644
index 0000000..0929f93
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_dark.png
deleted file mode 100644
index b43fddd..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_light.png
deleted file mode 100644
index f0a8402..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_sdcard_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_dark.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_dark.png
deleted file mode 100644
index 92fa552..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light.png
deleted file mode 100644
index bf6e373..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light_alpha.png
new file mode 100644
index 0000000..738ef84
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_root_usb_light_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am.png b/packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am.png
deleted file mode 100644
index 61bb371..0000000
--- a/packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am_alpha.png
new file mode 100644
index 0000000..e4881dd
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-hdpi/ic_subdirectory_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am.png
deleted file mode 100644
index 821667e..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am_alpha.png
new file mode 100644
index 0000000..897f7a9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_breadcrumb_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept.png b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept.png
deleted file mode 100644
index 4e954c4..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept_alpha.png
new file mode 100644
index 0000000..c9224a6
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_accept_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel.png b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel.png
deleted file mode 100644
index 6ec1234..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel_alpha.png
new file mode 100644
index 0000000..3bb74f9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_cancel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item.png b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item.png
deleted file mode 100644
index 73e1081..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item_alpha.png
new file mode 100644
index 0000000..2d47376
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_cab_select_item_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_alpha.png
new file mode 100644
index 0000000..3868210
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_dark.png
deleted file mode 100644
index dbe4cb7..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_light.png
deleted file mode 100644
index e9ae097..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_alert_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_alpha.png
new file mode 100644
index 0000000..a74854d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_dark.png
deleted file mode 100644
index f8f9eaf..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_light.png
deleted file mode 100644
index f8635fe..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_dialog_info_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.png
deleted file mode 100644
index d4f5814..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album_alpha.png
new file mode 100644
index 0000000..f5e45a7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk.png
deleted file mode 100644
index 37379f8..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk_alpha.png
new file mode 100644
index 0000000..67e33ce
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_apk_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_alpha.png
new file mode 100644
index 0000000..34093d0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_dark_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_dark_am.png
deleted file mode 100644
index 994d04f..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_light_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_light_am.png
deleted file mode 100644
index 00526e5..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_audio_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate.png
deleted file mode 100644
index ca1e4ed..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate_alpha.png
new file mode 100644
index 0000000..26beb79
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_certificate_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes.png
deleted file mode 100644
index 8ba2307..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes_alpha.png
new file mode 100644
index 0000000..ed9cab7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_codes_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed.png
deleted file mode 100644
index c0b9bce..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed_alpha.png
new file mode 100644
index 0000000..451d287
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_compressed_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact.png
deleted file mode 100644
index da4d0ce..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am.png
deleted file mode 100644
index e137ca0..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am_alpha.png
new file mode 100644
index 0000000..7bc02c9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_contact_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event.png
deleted file mode 100644
index ada1bfa..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am.png
deleted file mode 100644
index db55b74..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am_alpha.png
new file mode 100644
index 0000000..de39cd4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_event_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel.png
deleted file mode 100644
index 822815d..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel_alpha.png
new file mode 100644
index 0000000..c3eb845
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_excel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_folder_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_folder_alpha.png
new file mode 100644
index 0000000..97f6e50
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_font.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_font.png
deleted file mode 100644
index 97fe282..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_font.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_font_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_font_alpha.png
new file mode 100644
index 0000000..b2f043f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_font_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.png
deleted file mode 100644
index 2a02045..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am.png
deleted file mode 100644
index 1dce216..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am_alpha.png
new file mode 100644
index 0000000..483d7fb
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_alpha.png
new file mode 100644
index 0000000..2941b8a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_dark.png
deleted file mode 100644
index 58542b9..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_light.png
deleted file mode 100644
index dc94502..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_image_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png
deleted file mode 100644
index 90d624d..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf_alpha.png
new file mode 100644
index 0000000..d3ac072
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint.png
deleted file mode 100644
index 3b72269..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint_alpha.png
new file mode 100644
index 0000000..a43f902
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_powerpoint_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation.png
deleted file mode 100644
index 72751e2..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation_alpha.png
new file mode 100644
index 0000000..c572cd1
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_presentation_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet.png
deleted file mode 100644
index 75de220..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am.png
deleted file mode 100644
index a2f9116..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am_alpha.png
new file mode 100644
index 0000000..7ae671b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_spreadsheet_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text.png
deleted file mode 100644
index dc4c7ac..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am.png
deleted file mode 100644
index 4aa3a0e..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am_alpha.png
new file mode 100644
index 0000000..a5ebd51
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_text_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_am_alpha.png
new file mode 100644
index 0000000..89ac434
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_dark_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_dark_am.png
deleted file mode 100644
index 64f34c3..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_light_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_light_am.png
deleted file mode 100644
index 955755e..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_video_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_word.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_word.png
deleted file mode 100644
index b56b2e9..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_word.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_word_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_word_alpha.png
new file mode 100644
index 0000000..855c44b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_word_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_folder.png b/packages/DocumentsUI/res/drawable-mdpi/ic_folder.png
deleted file mode 100644
index 17cb056..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_folder_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_folder_alpha.png
new file mode 100644
index 0000000..5ecddc5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.png
deleted file mode 100644
index 9453739..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder_alpha.png
new file mode 100644
index 0000000..44e0e37
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_hamburger.png b/packages/DocumentsUI/res/drawable-mdpi/ic_hamburger.png
deleted file mode 100644
index 440c0f6..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_hamburger.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_hamburger_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_hamburger_alpha.png
new file mode 100644
index 0000000..d4f9222
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_hamburger_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy.png
deleted file mode 100644
index fbd5c21..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy_alpha.png
new file mode 100644
index 0000000..f8a5262
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_copy_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete.png
deleted file mode 100644
index 1939ed7..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete_alpha.png
new file mode 100644
index 0000000..29c9990
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_delete_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am.png
deleted file mode 100644
index bb06624..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am_alpha.png
new file mode 100644
index 0000000..d8ebf49
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_disconnect_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am.png
deleted file mode 100644
index fa934b3..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am_alpha.png
new file mode 100644
index 0000000..62c47d5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_new_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.png
deleted file mode 100644
index c7f60c4..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow_alpha.png
new file mode 100644
index 0000000..0825647
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am.png
deleted file mode 100644
index 415134a..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am_alpha.png
new file mode 100644
index 0000000..9d9e3d7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_rename_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_search.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_search.png
deleted file mode 100644
index 1f45b99..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_search.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_search_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_search_alpha.png
new file mode 100644
index 0000000..9fc1df6
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_search_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings.png
deleted file mode 100644
index db6321d..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings_alpha.png
new file mode 100644
index 0000000..c95381b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_settings_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_share.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_share.png
deleted file mode 100644
index f370056..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_share.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_share_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_share_alpha.png
new file mode 100644
index 0000000..7008f67
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_share_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am.png
deleted file mode 100644
index 15fa247..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am_alpha.png
new file mode 100644
index 0000000..f95d30d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_sortby_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am.png
deleted file mode 100644
index 470dbf3..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am_alpha.png
new file mode 100644
index 0000000..47c00dd
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_undo_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid.png
deleted file mode 100644
index 6af4222..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid_alpha.png
new file mode 100644
index 0000000..fe2c78c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_grid_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list.png
deleted file mode 100644
index 20197f4..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list_alpha.png
new file mode 100644
index 0000000..8b3a303
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_view_list_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_open_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_open_am.png
deleted file mode 100644
index dab578b..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_open_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_open_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_open_am_alpha.png
new file mode 100644
index 0000000..5923c08
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_open_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_popout_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_popout_am.png
deleted file mode 100644
index 12e873d..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_popout_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_popout_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_popout_am_alpha.png
new file mode 100644
index 0000000..0e45037
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_popout_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_alpha.png
new file mode 100644
index 0000000..a55f4ca
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_dark.png
deleted file mode 100644
index d3f3e08..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_light.png
deleted file mode 100644
index 23663d7..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_download_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_am_alpha.png
new file mode 100644
index 0000000..993e060
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_dark_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_dark_am.png
deleted file mode 100644
index 8d9de3d..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_light_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_light_am.png
deleted file mode 100644
index 35505fe..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_folder_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_alpha.png
new file mode 100644
index 0000000..f359c4b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_dark.png
deleted file mode 100644
index 67789a3..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_light.png
deleted file mode 100644
index 6f8d9a5..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_recent_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_alpha.png
new file mode 100644
index 0000000..dd76d07
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_dark.png
deleted file mode 100644
index 3b945e1..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_light.png
deleted file mode 100644
index 7032d5f..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_sdcard_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_dark.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_dark.png
deleted file mode 100644
index b11b60c..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light.png
deleted file mode 100644
index 5594a20..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light_alpha.png
new file mode 100644
index 0000000..fccd45e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_root_usb_light_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am.png b/packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am.png
deleted file mode 100644
index 43df5af..0000000
--- a/packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am_alpha.png
new file mode 100644
index 0000000..66725e5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-mdpi/ic_subdirectory_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am.png
deleted file mode 100644
index 74fdc2b..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am_alpha.png
new file mode 100644
index 0000000..5d0805e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_breadcrumb_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept.png
deleted file mode 100644
index 6f8f34f..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept_alpha.png
new file mode 100644
index 0000000..1a3d7c4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_accept_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel.png
deleted file mode 100644
index d360431..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel_alpha.png
new file mode 100644
index 0000000..14b9aef
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_cancel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item.png
deleted file mode 100644
index 21319d8..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item_alpha.png
new file mode 100644
index 0000000..953ab62
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_cab_select_item_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_alpha.png
new file mode 100644
index 0000000..5198b84
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_dark.png
deleted file mode 100644
index eeef696..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_light.png
deleted file mode 100644
index 0b52ce4..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_alpha.png
new file mode 100644
index 0000000..cdf8c95
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_dark.png
deleted file mode 100644
index 7006326..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_light.png
deleted file mode 100644
index 28b69c6..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_info_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.png
deleted file mode 100644
index b7aafac..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album_alpha.png
new file mode 100644
index 0000000..aecd4cf
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk.png
deleted file mode 100644
index 01e761c..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk_alpha.png
new file mode 100644
index 0000000..24ad2dd
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_apk_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_alpha.png
new file mode 100644
index 0000000..bf9dbde
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_dark_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_dark_am.png
deleted file mode 100644
index 5fb0de6..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_light_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_light_am.png
deleted file mode 100644
index 3600694..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_audio_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate.png
deleted file mode 100644
index 0a9e49c..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate_alpha.png
new file mode 100644
index 0000000..fabc8c3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_certificate_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes.png
deleted file mode 100644
index b99e8cf..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes_alpha.png
new file mode 100644
index 0000000..d8ba6e0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_codes_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed.png
deleted file mode 100644
index cf113e2..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed_alpha.png
new file mode 100644
index 0000000..1b5111a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_compressed_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact.png
deleted file mode 100644
index 5c5d658..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am.png
deleted file mode 100644
index a6f91b5..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am_alpha.png
new file mode 100644
index 0000000..e7b7460
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_contact_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event.png
deleted file mode 100644
index 15f864f..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am.png
deleted file mode 100644
index cff0ab6..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am_alpha.png
new file mode 100644
index 0000000..3183bfc
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_event_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel.png
deleted file mode 100644
index f6b4862..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel_alpha.png
new file mode 100644
index 0000000..9a4e844
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_excel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_folder_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_folder_alpha.png
new file mode 100644
index 0000000..96d5721
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font.png
deleted file mode 100644
index 2419ef8..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font_alpha.png
new file mode 100644
index 0000000..23a1302
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_font_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.png
deleted file mode 100644
index abcf342..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am.png
deleted file mode 100644
index 7fb5ef6..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am_alpha.png
new file mode 100644
index 0000000..b0811f1
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_alpha.png
new file mode 100644
index 0000000..5f1f537
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_dark.png
deleted file mode 100644
index da85005..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_light.png
deleted file mode 100644
index e3ed4ee..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_image_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png
deleted file mode 100644
index 7f713dc..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf_alpha.png
new file mode 100644
index 0000000..8083584
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint.png
deleted file mode 100644
index c69cd9a..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint_alpha.png
new file mode 100644
index 0000000..898e26a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_powerpoint_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation.png
deleted file mode 100644
index c09c36d..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation_alpha.png
new file mode 100644
index 0000000..2e9c667
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_presentation_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet.png
deleted file mode 100644
index f91abe85..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am.png
deleted file mode 100644
index faa648d4..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am_alpha.png
new file mode 100644
index 0000000..56951c3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_spreadsheet_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text.png
deleted file mode 100644
index 81d3267..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am.png
deleted file mode 100644
index 872a67b..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am_alpha.png
new file mode 100644
index 0000000..08ed9f0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_text_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_am_alpha.png
new file mode 100644
index 0000000..cd64e56
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_dark_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_dark_am.png
deleted file mode 100644
index 0d16830..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_light_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_light_am.png
deleted file mode 100644
index b808ee1..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_video_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word.png
deleted file mode 100644
index a05532e..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word_alpha.png
new file mode 100644
index 0000000..0bc40de
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_word_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_folder.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_folder.png
deleted file mode 100644
index 0d3f869..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_folder_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_folder_alpha.png
new file mode 100644
index 0000000..cd24dfe
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.png
deleted file mode 100644
index 890fda9..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder_alpha.png
new file mode 100644
index 0000000..1a4e7c4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger.png
deleted file mode 100644
index f7a1779..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger_alpha.png
new file mode 100644
index 0000000..aec4d00
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_hamburger_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png
deleted file mode 100644
index 295576c..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy_alpha.png
new file mode 100644
index 0000000..9afd1a1
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete.png
deleted file mode 100644
index 19c19ba..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete_alpha.png
new file mode 100644
index 0000000..2c81000
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_delete_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am.png
deleted file mode 100644
index 22cbd7b..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am_alpha.png
new file mode 100644
index 0000000..95b0bb8
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_disconnect_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am.png
deleted file mode 100644
index d2717ab..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am_alpha.png
new file mode 100644
index 0000000..14e96e2
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.png
deleted file mode 100644
index 7a050c9..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow_alpha.png
new file mode 100644
index 0000000..311e4dc
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am.png
deleted file mode 100644
index d87a0b1..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am_alpha.png
new file mode 100644
index 0000000..e2e3925
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_rename_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search.png
deleted file mode 100644
index 4c87e59..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search_alpha.png
new file mode 100644
index 0000000..6b2ddad
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_search_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings.png
deleted file mode 100644
index d0929cf..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings_alpha.png
new file mode 100644
index 0000000..304435a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_settings_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png
deleted file mode 100644
index e55b347..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share_alpha.png
new file mode 100644
index 0000000..afb2f3d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am.png
deleted file mode 100644
index 902f6ab..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am_alpha.png
new file mode 100644
index 0000000..27e6acf
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_sortby_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am.png
deleted file mode 100644
index d4b0341..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am_alpha.png
new file mode 100644
index 0000000..146b196
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png
deleted file mode 100644
index 47b5333..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid_alpha.png
new file mode 100644
index 0000000..cc4d40c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png
deleted file mode 100644
index 62ab8fb..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list_alpha.png
new file mode 100644
index 0000000..6c897c4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_open_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_open_am.png
deleted file mode 100644
index f969418..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_open_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_open_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_open_am_alpha.png
new file mode 100644
index 0000000..be6fb5d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_open_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am.png
deleted file mode 100644
index 204b04d..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am_alpha.png
new file mode 100644
index 0000000..7ba284f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_popout_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_alpha.png
new file mode 100644
index 0000000..9bda62c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_dark.png
deleted file mode 100644
index 2460761..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_light.png
deleted file mode 100644
index 1de0247..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_am_alpha.png
new file mode 100644
index 0000000..24dce60
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_dark_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_dark_am.png
deleted file mode 100644
index f9788b1..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_light_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_light_am.png
deleted file mode 100644
index ff307cd..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_folder_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_alpha.png
new file mode 100644
index 0000000..5ef3288
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_dark.png
deleted file mode 100644
index be89734..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_light.png
deleted file mode 100644
index 90d1e15..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_alpha.png
new file mode 100644
index 0000000..99b8054
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_dark.png
deleted file mode 100644
index f788f23..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_light.png
deleted file mode 100644
index bc2acbe..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_dark.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_dark.png
deleted file mode 100644
index 15014a5..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light.png
deleted file mode 100644
index f16b81f..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light_alpha.png
new file mode 100644
index 0000000..80717e4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb_light_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am.png
deleted file mode 100644
index ef81618..0000000
--- a/packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am_alpha.png
new file mode 100644
index 0000000..cdf21b1
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_subdirectory_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am.png
deleted file mode 100644
index 21272f4..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am_alpha.png
new file mode 100644
index 0000000..02a988b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_breadcrumb_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept.png
deleted file mode 100644
index 6824bce..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept_alpha.png
new file mode 100644
index 0000000..a23a9ae
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_accept_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel.png
deleted file mode 100644
index 81d7816..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel_alpha.png
new file mode 100644
index 0000000..b10db3e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_cancel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item.png
deleted file mode 100644
index 99c3dbb..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item_alpha.png
new file mode 100644
index 0000000..3606fb3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_cab_select_item_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_alpha.png
new file mode 100644
index 0000000..0a54598
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_dark.png
deleted file mode 100644
index a91cd76..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_light.png
deleted file mode 100644
index 73e440a..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_alpha.png
new file mode 100644
index 0000000..6d3260c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_dark.png
deleted file mode 100644
index aff4bc4..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_light.png
deleted file mode 100644
index 7e0fa62..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_info_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.png
deleted file mode 100644
index 5487507..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album_alpha.png
new file mode 100644
index 0000000..31dc7a4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk.png
deleted file mode 100644
index 36ce5d4..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk_alpha.png
new file mode 100644
index 0000000..5d0f0db
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_apk_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_alpha.png
new file mode 100644
index 0000000..8116b62
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_dark_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_dark_am.png
deleted file mode 100644
index 0e911f5..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_light_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_light_am.png
deleted file mode 100644
index e96cec7..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_audio_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate.png
deleted file mode 100644
index 0bd6576..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate_alpha.png
new file mode 100644
index 0000000..e65d74c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_certificate_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes.png
deleted file mode 100644
index 27f551b..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes_alpha.png
new file mode 100644
index 0000000..7d32801
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_codes_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed.png
deleted file mode 100644
index 22ddd69..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed_alpha.png
new file mode 100644
index 0000000..d528708
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_compressed_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact.png
deleted file mode 100644
index 0decac8..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am.png
deleted file mode 100644
index e809fe6..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am_alpha.png
new file mode 100644
index 0000000..274c524
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_contact_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event.png
deleted file mode 100644
index 0d2a932..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am.png
deleted file mode 100644
index 5ed0373..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am_alpha.png
new file mode 100644
index 0000000..6053b0a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_event_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel.png
deleted file mode 100644
index bbd6617..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel_alpha.png
new file mode 100644
index 0000000..78ee13b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_excel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_folder_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_folder_alpha.png
new file mode 100644
index 0000000..dcf9cc2
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font.png
deleted file mode 100644
index 817032b..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font_alpha.png
new file mode 100644
index 0000000..74fbbbc
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_font_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.png
deleted file mode 100644
index ebb9cc2..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am.png
deleted file mode 100644
index b5ba48b..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am_alpha.png
new file mode 100644
index 0000000..11a219a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_alpha.png
new file mode 100644
index 0000000..9a461c9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_dark.png
deleted file mode 100644
index 6754891..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_light.png
deleted file mode 100644
index d802d7f..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_image_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png
deleted file mode 100644
index 3a7bb41..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf_alpha.png
new file mode 100644
index 0000000..9a67956
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint.png
deleted file mode 100644
index 2bbf482..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint_alpha.png
new file mode 100644
index 0000000..853aa8c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_powerpoint_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation.png
deleted file mode 100644
index 7da0b8b..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation_alpha.png
new file mode 100644
index 0000000..84ae9ae
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_presentation_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet.png
deleted file mode 100644
index b1f2097..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am.png
deleted file mode 100644
index 372abc9..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am_alpha.png
new file mode 100644
index 0000000..111439e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_spreadsheet_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text.png
deleted file mode 100644
index 210060e..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am.png
deleted file mode 100644
index e535ca3..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am_alpha.png
new file mode 100644
index 0000000..b876f86
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_text_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_am_alpha.png
new file mode 100644
index 0000000..7cf656a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_dark_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_dark_am.png
deleted file mode 100644
index 2914c85..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_light_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_light_am.png
deleted file mode 100644
index ab104b7..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_video_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word.png
deleted file mode 100644
index 6b58983..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word_alpha.png
new file mode 100644
index 0000000..acc3d7b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_word_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_folder.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_folder.png
deleted file mode 100644
index 9bedcd9..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_folder_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_folder_alpha.png
new file mode 100644
index 0000000..02249d2
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.png
deleted file mode 100644
index 6215385..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder_alpha.png
new file mode 100644
index 0000000..d7b2bfb
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger.png
deleted file mode 100644
index 355f61f..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger_alpha.png
new file mode 100644
index 0000000..6891749
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_hamburger_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png
deleted file mode 100644
index 7f483e1..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy_alpha.png
new file mode 100644
index 0000000..90d1a09
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete.png
deleted file mode 100644
index c19988f..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete_alpha.png
new file mode 100644
index 0000000..c2fbdc4a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_delete_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am.png
deleted file mode 100644
index d10bec8..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am_alpha.png
new file mode 100644
index 0000000..7a993b9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_disconnect_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am.png
deleted file mode 100644
index c336147..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am_alpha.png
new file mode 100644
index 0000000..12d279b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.png
deleted file mode 100644
index 036127c..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow_alpha.png
new file mode 100644
index 0000000..325c48a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am.png
deleted file mode 100644
index 414e199..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am_alpha.png
new file mode 100644
index 0000000..ee2465db
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_rename_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search.png
deleted file mode 100644
index af79507..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search_alpha.png
new file mode 100644
index 0000000..538fbe5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_search_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings.png
deleted file mode 100644
index db2ef7b..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings_alpha.png
new file mode 100644
index 0000000..d99206c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_settings_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png
deleted file mode 100644
index e6befad..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share_alpha.png
new file mode 100644
index 0000000..f8a5a1a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am.png
deleted file mode 100644
index 473e2da..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am_alpha.png
new file mode 100644
index 0000000..4f1355c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_sortby_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am.png
deleted file mode 100644
index 9c3cc28..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am_alpha.png
new file mode 100644
index 0000000..d5cc56f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png
deleted file mode 100644
index 0bee75a..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid_alpha.png
new file mode 100644
index 0000000..de96c3f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png
deleted file mode 100644
index da13073..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list_alpha.png
new file mode 100644
index 0000000..7805834
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am.png
deleted file mode 100644
index 7196ee5..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am_alpha.png
new file mode 100644
index 0000000..7ed919c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_open_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am.png
deleted file mode 100644
index 6fa2216..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am_alpha.png
new file mode 100644
index 0000000..756b684
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_alpha.png
new file mode 100644
index 0000000..ffb9841
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_dark.png
deleted file mode 100644
index 067aa65..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_light.png
deleted file mode 100644
index 40437a8..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_am_alpha.png
new file mode 100644
index 0000000..305a6b8
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_dark_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_dark_am.png
deleted file mode 100644
index 069d951..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_dark_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_light_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_light_am.png
deleted file mode 100644
index 1725025..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_folder_light_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_alpha.png
new file mode 100644
index 0000000..dc1425d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_dark.png
deleted file mode 100644
index d149239..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_light.png
deleted file mode 100644
index 9a06663..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_alpha.png
new file mode 100644
index 0000000..cea8ac0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_dark.png
deleted file mode 100644
index 429f3c5..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_light.png
deleted file mode 100644
index bcfe7fd..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_dark.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_dark.png
deleted file mode 100644
index 657a116..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_dark.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light.png
deleted file mode 100644
index 75fb374..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light_alpha.png
new file mode 100644
index 0000000..e0a1d23
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb_light_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am.png
deleted file mode 100644
index 755a79c..0000000
--- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am.png
+++ /dev/null
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am_alpha.png
new file mode 100644
index 0000000..050313f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_subdirectory_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable/ic_breadcrumb_arrow.xml b/packages/DocumentsUI/res/drawable/ic_breadcrumb_arrow.xml
index 0de7ddc..76c0e1f 100644
--- a/packages/DocumentsUI/res/drawable/ic_breadcrumb_arrow.xml
+++ b/packages/DocumentsUI/res/drawable/ic_breadcrumb_arrow.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_breadcrumb_arrow_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_breadcrumb_arrow_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_cab_accept.xml b/packages/DocumentsUI/res/drawable/ic_cab_accept.xml
new file mode 100644
index 0000000..cda2845
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_cab_accept.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_cab_accept_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_cab_cancel.xml b/packages/DocumentsUI/res/drawable/ic_cab_cancel.xml
new file mode 100644
index 0000000..629100c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_cab_cancel.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_cab_cancel_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_cab_select_item.xml b/packages/DocumentsUI/res/drawable/ic_cab_select_item.xml
new file mode 100644
index 0000000..e440ee9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_cab_select_item.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_cab_select_item_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_dialog_alert.xml b/packages/DocumentsUI/res/drawable/ic_dialog_alert.xml
new file mode 100644
index 0000000..5132df3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_dialog_alert.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_dialog_alert_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_dialog_info.xml b/packages/DocumentsUI/res/drawable/ic_dialog_info.xml
new file mode 100644
index 0000000..a029cca
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_dialog_info.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_dialog_info_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_album.xml b/packages/DocumentsUI/res/drawable/ic_doc_album.xml
new file mode 100644
index 0000000..6b80a33
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_album.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_album_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_apk.xml b/packages/DocumentsUI/res/drawable/ic_doc_apk.xml
new file mode 100644
index 0000000..d1ba313
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_apk.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_apk_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_audio.xml b/packages/DocumentsUI/res/drawable/ic_doc_audio.xml
new file mode 100644
index 0000000..24bd9fa
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_audio.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_audio_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_audio_dark.xml b/packages/DocumentsUI/res/drawable/ic_doc_audio_dark.xml
deleted file mode 100644
index 768d409..0000000
--- a/packages/DocumentsUI/res/drawable/ic_doc_audio_dark.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_audio_dark_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_audio_light.xml b/packages/DocumentsUI/res/drawable/ic_doc_audio_light.xml
deleted file mode 100644
index bdb6983..0000000
--- a/packages/DocumentsUI/res/drawable/ic_doc_audio_light.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_audio_light_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_certificate.xml b/packages/DocumentsUI/res/drawable/ic_doc_certificate.xml
new file mode 100644
index 0000000..3e5b9e6
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_certificate.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_certificate_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_codes.xml b/packages/DocumentsUI/res/drawable/ic_doc_codes.xml
new file mode 100644
index 0000000..441c669
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_codes.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_codes_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_compressed.xml b/packages/DocumentsUI/res/drawable/ic_doc_compressed.xml
new file mode 100644
index 0000000..15ecb6b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_compressed.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_compressed_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_contact.xml b/packages/DocumentsUI/res/drawable/ic_doc_contact.xml
index e645551..361666a 100644
--- a/packages/DocumentsUI/res/drawable/ic_doc_contact.xml
+++ b/packages/DocumentsUI/res/drawable/ic_doc_contact.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_contact_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_doc_contact_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_event.xml b/packages/DocumentsUI/res/drawable/ic_doc_event.xml
index dcbd912..a17018b 100644
--- a/packages/DocumentsUI/res/drawable/ic_doc_event.xml
+++ b/packages/DocumentsUI/res/drawable/ic_doc_event.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_event_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_doc_event_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_excel.xml b/packages/DocumentsUI/res/drawable/ic_doc_excel.xml
new file mode 100644
index 0000000..7d05361
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_excel.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_excel_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_folder.xml b/packages/DocumentsUI/res/drawable/ic_doc_folder.xml
new file mode 100644
index 0000000..85f5e7c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_folder.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_folder_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_font.xml b/packages/DocumentsUI/res/drawable/ic_doc_font.xml
new file mode 100644
index 0000000..e79ed0c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_font.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_font_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_generic.xml b/packages/DocumentsUI/res/drawable/ic_doc_generic.xml
index d5f64ed..d0d999f 100644
--- a/packages/DocumentsUI/res/drawable/ic_doc_generic.xml
+++ b/packages/DocumentsUI/res/drawable/ic_doc_generic.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_generic_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_doc_generic_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_image.xml b/packages/DocumentsUI/res/drawable/ic_doc_image.xml
new file mode 100644
index 0000000..fa949e0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_image.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_image_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_pdf.xml b/packages/DocumentsUI/res/drawable/ic_doc_pdf.xml
new file mode 100644
index 0000000..51620f5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_pdf.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_pdf_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_powerpoint.xml b/packages/DocumentsUI/res/drawable/ic_doc_powerpoint.xml
new file mode 100644
index 0000000..2a048c8
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_powerpoint.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_powerpoint_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_presentation.xml b/packages/DocumentsUI/res/drawable/ic_doc_presentation.xml
new file mode 100644
index 0000000..71bb853
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_presentation.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_presentation_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml b/packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml
index 8c6e056..4b4cd99 100644
--- a/packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml
+++ b/packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_spreadsheet_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_doc_spreadsheet_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_text.xml b/packages/DocumentsUI/res/drawable/ic_doc_text.xml
index ac63ecb..8224a21 100644
--- a/packages/DocumentsUI/res/drawable/ic_doc_text.xml
+++ b/packages/DocumentsUI/res/drawable/ic_doc_text.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_text_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_doc_text_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_video.xml b/packages/DocumentsUI/res/drawable/ic_doc_video.xml
new file mode 100644
index 0000000..1fed041
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_video.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_video_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_video_dark.xml b/packages/DocumentsUI/res/drawable/ic_doc_video_dark.xml
deleted file mode 100644
index 4fb82bb..0000000
--- a/packages/DocumentsUI/res/drawable/ic_doc_video_dark.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_video_dark_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_video_light.xml b/packages/DocumentsUI/res/drawable/ic_doc_video_light.xml
deleted file mode 100644
index 290c3f1..0000000
--- a/packages/DocumentsUI/res/drawable/ic_doc_video_light.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_doc_video_light_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_word.xml b/packages/DocumentsUI/res/drawable/ic_doc_word.xml
new file mode 100644
index 0000000..addfb47
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_doc_word.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_doc_word_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_folder.xml b/packages/DocumentsUI/res/drawable/ic_folder.xml
new file mode 100644
index 0000000..8adaf3b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_folder.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_folder_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_grid_folder.xml b/packages/DocumentsUI/res/drawable/ic_grid_folder.xml
new file mode 100644
index 0000000..344d558
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_grid_folder.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_grid_folder_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_hamburger.xml b/packages/DocumentsUI/res/drawable/ic_hamburger.xml
new file mode 100644
index 0000000..7cda32e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_hamburger.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_hamburger_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_copy.xml b/packages/DocumentsUI/res/drawable/ic_menu_copy.xml
new file mode 100644
index 0000000..e0abe07
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_copy.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_copy_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_delete.xml b/packages/DocumentsUI/res/drawable/ic_menu_delete.xml
new file mode 100644
index 0000000..e52ed97
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_delete.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_delete_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_disconnect.xml b/packages/DocumentsUI/res/drawable/ic_menu_disconnect.xml
index e5b4c8d..15c5c39 100644
--- a/packages/DocumentsUI/res/drawable/ic_menu_disconnect.xml
+++ b/packages/DocumentsUI/res/drawable/ic_menu_disconnect.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_disconnect_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_menu_disconnect_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_new_folder.xml b/packages/DocumentsUI/res/drawable/ic_menu_new_folder.xml
index 42e7f90..b105535 100644
--- a/packages/DocumentsUI/res/drawable/ic_menu_new_folder.xml
+++ b/packages/DocumentsUI/res/drawable/ic_menu_new_folder.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_new_folder_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_menu_new_folder_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_overflow.xml b/packages/DocumentsUI/res/drawable/ic_menu_overflow.xml
new file mode 100644
index 0000000..a579b60
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_overflow.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_overflow_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_rename.xml b/packages/DocumentsUI/res/drawable/ic_menu_rename.xml
index e332313..b5ba30c 100644
--- a/packages/DocumentsUI/res/drawable/ic_menu_rename.xml
+++ b/packages/DocumentsUI/res/drawable/ic_menu_rename.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_rename_am"
- android:autoMirrored="true">
-</bitmap>
+ android:src="@drawable/ic_menu_rename_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_search.xml b/packages/DocumentsUI/res/drawable/ic_menu_search.xml
new file mode 100644
index 0000000..33f548b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_search.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_search_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_settings.xml b/packages/DocumentsUI/res/drawable/ic_menu_settings.xml
new file mode 100644
index 0000000..7606e75
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_settings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_settings_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_share.xml b/packages/DocumentsUI/res/drawable/ic_menu_share.xml
new file mode 100644
index 0000000..927e7d3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_share.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_share_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_sortby.xml b/packages/DocumentsUI/res/drawable/ic_menu_sortby.xml
index d908582..065ea87 100644
--- a/packages/DocumentsUI/res/drawable/ic_menu_sortby.xml
+++ b/packages/DocumentsUI/res/drawable/ic_menu_sortby.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_sortby_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_menu_sortby_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_undo.xml b/packages/DocumentsUI/res/drawable/ic_menu_undo.xml
index f25d90d..d66ba6d 100644
--- a/packages/DocumentsUI/res/drawable/ic_menu_undo.xml
+++ b/packages/DocumentsUI/res/drawable/ic_menu_undo.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_undo_am"
- android:autoMirrored="true">
-</bitmap>
+ android:src="@drawable/ic_menu_undo_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_view_grid.xml b/packages/DocumentsUI/res/drawable/ic_menu_view_grid.xml
new file mode 100644
index 0000000..dc09a0c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_view_grid.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_view_grid_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_menu_view_list.xml b/packages/DocumentsUI/res/drawable/ic_menu_view_list.xml
new file mode 100644
index 0000000..23c5777
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_menu_view_list.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_view_list_alpha"
+ android:tint="?android:attr/colorControlNormal" />
diff --git a/packages/DocumentsUI/res/drawable/ic_open.xml b/packages/DocumentsUI/res/drawable/ic_open.xml
index faeb03d..e3f1faf 100644
--- a/packages/DocumentsUI/res/drawable/ic_open.xml
+++ b/packages/DocumentsUI/res/drawable/ic_open.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_open_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_open_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_popout.xml b/packages/DocumentsUI/res/drawable/ic_popout.xml
index 223598d..e7d0f75 100644
--- a/packages/DocumentsUI/res/drawable/ic_popout.xml
+++ b/packages/DocumentsUI/res/drawable/ic_popout.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_popout_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_popout_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_root_download.xml b/packages/DocumentsUI/res/drawable/ic_root_download.xml
new file mode 100644
index 0000000..a7642f9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_root_download.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_root_download_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_root_folder.xml b/packages/DocumentsUI/res/drawable/ic_root_folder.xml
new file mode 100644
index 0000000..cda9db8
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_root_folder.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_root_folder_am_alpha"
+ android:tint="@*android:color/secondary_text_material_light"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/drawable/ic_root_folder_dark.xml b/packages/DocumentsUI/res/drawable/ic_root_folder_dark.xml
deleted file mode 100644
index 8e29d1d..0000000
--- a/packages/DocumentsUI/res/drawable/ic_root_folder_dark.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_root_folder_dark_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
diff --git a/packages/DocumentsUI/res/drawable/ic_root_folder_light.xml b/packages/DocumentsUI/res/drawable/ic_root_folder_light.xml
deleted file mode 100644
index a750f1f..0000000
--- a/packages/DocumentsUI/res/drawable/ic_root_folder_light.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_root_folder_light_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
diff --git a/packages/DocumentsUI/res/drawable/ic_root_recent.xml b/packages/DocumentsUI/res/drawable/ic_root_recent.xml
new file mode 100644
index 0000000..d6b33c9
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_root_recent.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_root_recent_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_root_sdcard.xml b/packages/DocumentsUI/res/drawable/ic_root_sdcard.xml
new file mode 100644
index 0000000..0b9523b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_root_sdcard.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_root_sdcard_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_root_usb_light.xml b/packages/DocumentsUI/res/drawable/ic_root_usb_light.xml
new file mode 100644
index 0000000..ff2b197
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable/ic_root_usb_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_root_usb_light_alpha"
+ android:tint="@*android:color/secondary_text_material_light" />
diff --git a/packages/DocumentsUI/res/drawable/ic_subdirectory_arrow.xml b/packages/DocumentsUI/res/drawable/ic_subdirectory_arrow.xml
index 0f66e2a..5723233 100644
--- a/packages/DocumentsUI/res/drawable/ic_subdirectory_arrow.xml
+++ b/packages/DocumentsUI/res/drawable/ic_subdirectory_arrow.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_subdirectory_arrow_am"
- android:autoMirrored="true">
-</bitmap> \ No newline at end of file
+ android:src="@drawable/ic_subdirectory_arrow_am_alpha"
+ android:tint="?android:attr/colorControlNormal"
+ android:autoMirrored="true" />
diff --git a/packages/DocumentsUI/res/menu/activity.xml b/packages/DocumentsUI/res/menu/activity.xml
index d995376..b9b8054 100644
--- a/packages/DocumentsUI/res/menu/activity.xml
+++ b/packages/DocumentsUI/res/menu/activity.xml
@@ -55,8 +55,9 @@
android:icon="@drawable/ic_menu_view_list"
android:showAsAction="never" />
<item
- android:id="@+id/menu_settings"
- android:title="@string/menu_settings"
- android:icon="@drawable/ic_menu_settings"
+ android:id="@+id/menu_advanced"
+ android:showAsAction="never" />
+ <item
+ android:id="@+id/menu_file_size"
android:showAsAction="never" />
</menu>
diff --git a/packages/DocumentsUI/res/values/strings.xml b/packages/DocumentsUI/res/values/strings.xml
index c1a9d72..268ce18 100644
--- a/packages/DocumentsUI/res/values/strings.xml
+++ b/packages/DocumentsUI/res/values/strings.xml
@@ -47,6 +47,20 @@
<!-- Menu item title that selects the current directory [CHAR LIMIT=48] -->
<string name="menu_select">Select \"<xliff:g id="directory" example="My Directory">^1</xliff:g>\"</string>
+ <!-- Menu item that reveals internal storage built into the device [CHAR LIMIT=24] -->
+ <string name="menu_advanced_show" product="nosdcard">Show internal storage</string>
+ <!-- Menu item that reveals SD cards built into the device [CHAR LIMIT=24] -->
+ <string name="menu_advanced_show" product="default">Show SD card</string>
+ <!-- Menu item that hides internal storage built into the device [CHAR LIMIT=24] -->
+ <string name="menu_advanced_hide" product="nosdcard">Hide internal storage</string>
+ <!-- Menu item that hides SD cards built into the device [CHAR LIMIT=24] -->
+ <string name="menu_advanced_hide" product="default">Hide SD card</string>
+
+ <!-- Menu item that reveals the sizes of displayed files [CHAR LIMIT=24] -->
+ <string name="menu_file_size_show">Show file size</string>
+ <!-- Menu item that hides the sizes of displayed files [CHAR LIMIT=24] -->
+ <string name="menu_file_size_hide">Hide file size</string>
+
<!-- Action mode title summarizing the number of documents selected [CHAR LIMIT=32] -->
<string name="mode_selected_count"><xliff:g id="count" example="3">%1$d</xliff:g> selected</string>
@@ -83,12 +97,6 @@
<!-- Header title for list of additional apps that can provide documents [CHAR LIMIT=24] -->
<string name="root_type_apps">More apps</string>
- <!-- Title for setting that will show all advanced storage devices [CHAR LIMIT=32] -->
- <string name="pref_advanced_devices">Display advanced devices</string>
- <!-- Title for setting that will show file sizes for all documents [CHAR LIMIT=32] -->
- <string name="pref_file_size">Display file size</string>
- <string name="pref_device_size">Display device size</string>
-
<!-- Text shown when a directory of documents is empty [CHAR LIMIT=24] -->
<string name="empty">No items</string>
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
index 001cac4..caa07ab 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
@@ -70,7 +70,6 @@ import android.widget.AbsListView.RecyclerListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
-import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ListView;
@@ -352,6 +351,10 @@ public class DirectoryFragment extends Fragment {
updateDisplayState();
}
+ public void onDisplayStateChanged() {
+ updateDisplayState();
+ }
+
public void onUserSortOrderChanged() {
// Sort order change always triggers reload; we'll trigger state change
// on the flip side.
@@ -705,11 +708,11 @@ public class DirectoryFragment extends Fragment {
if (extras != null) {
final String info = extras.getString(DocumentsContract.EXTRA_INFO);
if (info != null) {
- mFooters.add(new MessageFooter(2, R.drawable.ic_dialog_info_dark, info));
+ mFooters.add(new MessageFooter(2, R.drawable.ic_dialog_info, info));
}
final String error = extras.getString(DocumentsContract.EXTRA_ERROR);
if (error != null) {
- mFooters.add(new MessageFooter(3, R.drawable.ic_dialog_alert_dark, error));
+ mFooters.add(new MessageFooter(3, R.drawable.ic_dialog_alert, error));
}
if (extras.getBoolean(DocumentsContract.EXTRA_LOADING, false)) {
mFooters.add(new LoadingFooter());
@@ -718,7 +721,7 @@ public class DirectoryFragment extends Fragment {
if (result != null && result.exception != null) {
mFooters.add(new MessageFooter(
- 3, R.drawable.ic_dialog_alert_dark, getString(R.string.query_error)));
+ 3, R.drawable.ic_dialog_alert, getString(R.string.query_error)));
}
if (isEmpty()) {
@@ -854,7 +857,7 @@ public class DirectoryFragment extends Fragment {
// be shown, so this will never block.
final RootInfo root = roots.getRootBlocking(docAuthority, docRootId);
if (state.derivedMode == MODE_GRID) {
- iconDrawable = root.loadLightIcon(context);
+ iconDrawable = root.loadGridIcon(context);
} else {
iconDrawable = root.loadIcon(context);
}
@@ -883,8 +886,8 @@ public class DirectoryFragment extends Fragment {
// hint to remind user they're a directory.
if (Document.MIME_TYPE_DIR.equals(docMimeType) && state.derivedMode == MODE_GRID
&& showThumbnail) {
- iconDrawable = context.getResources().getDrawable(
- R.drawable.ic_root_folder_light);
+ iconDrawable = IconUtils.applyTint(context, R.drawable.ic_doc_folder,
+ android.R.attr.textColorPrimaryInverse);
}
if (summary != null) {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
index a2e8432..0ed82d9 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
@@ -254,7 +254,13 @@ public class DocumentsActivity extends Activity {
mState.localOnly = intent.getBooleanExtra(Intent.EXTRA_LOCAL_ONLY, false);
mState.forceAdvanced = intent.getBooleanExtra(DocumentsContract.EXTRA_SHOW_ADVANCED, false);
mState.showAdvanced = mState.forceAdvanced
- | SettingsActivity.getDisplayAdvancedDevices(this);
+ | LocalPreferences.getDisplayAdvancedDevices(this);
+
+ if (mState.action == ACTION_MANAGE) {
+ mState.showSize = true;
+ } else {
+ mState.showSize = LocalPreferences.getDisplayFileSize(this);
+ }
}
private class RestoreRootTask extends AsyncTask<Void, Void, RootInfo> {
@@ -352,18 +358,6 @@ public class DocumentsActivity extends Activity {
}
}
- @Override
- public void onResume() {
- super.onResume();
-
- if (mState.action == ACTION_MANAGE) {
- mState.showSize = true;
- } else {
- mState.showSize = SettingsActivity.getDisplayFileSize(this);
- invalidateOptionsMenu();
- }
- }
-
private DrawerListener mDrawerListener = new DrawerListener() {
@Override
public void onDrawerSlide(View drawerView, float slideOffset) {
@@ -425,7 +419,8 @@ public class DocumentsActivity extends Activity {
final RootInfo root = getCurrentRoot();
final boolean showRootIcon = mShowAsDialog || (mState.action == ACTION_MANAGE);
if (showRootIcon) {
- mToolbar.setNavigationIcon(root != null ? root.loadLightIcon(this) : null);
+ mToolbar.setNavigationIcon(
+ root != null ? root.loadToolbarIcon(mToolbar.getContext()) : null);
mToolbar.setNavigationOnClickListener(null);
} else {
mToolbar.setNavigationIcon(R.drawable.ic_hamburger);
@@ -462,10 +457,17 @@ public class DocumentsActivity extends Activity {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.activity, menu);
- // Actions are always visible when showing as dialog
+ // Most actions are visible when showing as dialog
if (mShowAsDialog) {
for (int i = 0; i < menu.size(); i++) {
- menu.getItem(i).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
+ final MenuItem item = menu.getItem(i);
+ switch (item.getItemId()) {
+ case R.id.menu_advanced:
+ case R.id.menu_file_size:
+ break;
+ default:
+ item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
+ }
}
}
@@ -542,7 +544,8 @@ public class DocumentsActivity extends Activity {
final MenuItem sortSize = menu.findItem(R.id.menu_sort_size);
final MenuItem grid = menu.findItem(R.id.menu_grid);
final MenuItem list = menu.findItem(R.id.menu_list);
- final MenuItem settings = menu.findItem(R.id.menu_settings);
+ final MenuItem advanced = menu.findItem(R.id.menu_advanced);
+ final MenuItem fileSize = menu.findItem(R.id.menu_file_size);
sort.setVisible(cwd != null);
grid.setVisible(mState.derivedMode != MODE_GRID);
@@ -593,7 +596,13 @@ public class DocumentsActivity extends Activity {
// TODO: close any search in-progress when hiding
search.setVisible(searchVisible);
- settings.setVisible(mState.action != ACTION_MANAGE);
+ advanced.setTitle(LocalPreferences.getDisplayAdvancedDevices(this)
+ ? R.string.menu_advanced_hide : R.string.menu_advanced_show);
+ fileSize.setTitle(LocalPreferences.getDisplayFileSize(this)
+ ? R.string.menu_file_size_hide : R.string.menu_file_size_show);
+
+ advanced.setVisible(mState.action != ACTION_MANAGE);
+ fileSize.setVisible(mState.action != ACTION_MANAGE);
return true;
}
@@ -628,14 +637,31 @@ public class DocumentsActivity extends Activity {
} else if (id == R.id.menu_list) {
setUserMode(State.MODE_LIST);
return true;
- } else if (id == R.id.menu_settings) {
- startActivity(new Intent(this, SettingsActivity.class));
+ } else if (id == R.id.menu_advanced) {
+ setDisplayAdvancedDevices(!LocalPreferences.getDisplayAdvancedDevices(this));
+ return true;
+ } else if (id == R.id.menu_file_size) {
+ setDisplayFileSize(!LocalPreferences.getDisplayFileSize(this));
return true;
} else {
return super.onOptionsItemSelected(item);
}
}
+ private void setDisplayAdvancedDevices(boolean display) {
+ LocalPreferences.setDisplayAdvancedDevices(this, display);
+ mState.showAdvanced = mState.forceAdvanced | display;
+ RootsFragment.get(getFragmentManager()).onDisplayStateChanged();
+ invalidateOptionsMenu();
+ }
+
+ private void setDisplayFileSize(boolean display) {
+ LocalPreferences.setDisplayFileSize(this, display);
+ mState.showSize = display;
+ DirectoryFragment.get(getFragmentManager()).onDisplayStateChanged();
+ invalidateOptionsMenu();
+ }
+
/**
* Update UI to reflect internal state changes not from user.
*/
diff --git a/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java b/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java
index eaa74eb..3038323 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java
@@ -22,6 +22,7 @@ import android.content.pm.ProviderInfo;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.provider.DocumentsContract.Document;
+import android.util.TypedValue;
import com.google.android.collect.Maps;
@@ -45,7 +46,7 @@ public class IconUtils {
add("application/vnd.android.package-archive", icon);
// Audio
- icon = R.drawable.ic_doc_audio_dark;
+ icon = R.drawable.ic_doc_audio;
add("application/ogg", icon);
add("application/x-flac", icon);
@@ -132,7 +133,7 @@ public class IconUtils {
add("application/x-font-ttf", icon);
// Image
- icon = R.drawable.ic_doc_image_dark;
+ icon = R.drawable.ic_doc_image;
add("application/vnd.oasis.opendocument.graphics", icon);
add("application/vnd.oasis.opendocument.graphics-template", icon);
add("application/vnd.oasis.opendocument.image", icon);
@@ -146,10 +147,6 @@ public class IconUtils {
// Presentation
icon = R.drawable.ic_doc_presentation;
- add("application/vnd.ms-powerpoint", icon);
- add("application/vnd.openxmlformats-officedocument.presentationml.presentation", icon);
- add("application/vnd.openxmlformats-officedocument.presentationml.template", icon);
- add("application/vnd.openxmlformats-officedocument.presentationml.slideshow", icon);
add("application/vnd.stardivision.impress", icon);
add("application/vnd.sun.xml.impress", icon);
add("application/vnd.sun.xml.impress.template", icon);
@@ -160,9 +157,6 @@ public class IconUtils {
icon = R.drawable.ic_doc_spreadsheet;
add("application/vnd.oasis.opendocument.spreadsheet", icon);
add("application/vnd.oasis.opendocument.spreadsheet-template", icon);
- add("application/vnd.ms-excel", icon);
- add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", icon);
- add("application/vnd.openxmlformats-officedocument.spreadsheetml.template", icon);
add("application/vnd.stardivision.calc", icon);
add("application/vnd.sun.xml.calc", icon);
add("application/vnd.sun.xml.calc.template", icon);
@@ -174,9 +168,6 @@ public class IconUtils {
add("application/vnd.oasis.opendocument.text-master", icon);
add("application/vnd.oasis.opendocument.text-template", icon);
add("application/vnd.oasis.opendocument.text-web", icon);
- add("application/msword", icon);
- add("application/vnd.openxmlformats-officedocument.wordprocessingml.document", icon);
- add("application/vnd.openxmlformats-officedocument.wordprocessingml.template", icon);
add("application/vnd.stardivision.writer", icon);
add("application/vnd.stardivision.writer-global", icon);
add("application/vnd.sun.xml.writer", icon);
@@ -186,9 +177,28 @@ public class IconUtils {
add("application/x-kword", icon);
// Video
- icon = R.drawable.ic_doc_video_dark;
+ icon = R.drawable.ic_doc_video;
add("application/x-quicktimeplayer", icon);
add("application/x-shockwave-flash", icon);
+
+ // Word
+ icon = R.drawable.ic_doc_word;
+ add("application/msword", icon);
+ add("application/vnd.openxmlformats-officedocument.wordprocessingml.document", icon);
+ add("application/vnd.openxmlformats-officedocument.wordprocessingml.template", icon);
+
+ // Excel
+ icon = R.drawable.ic_doc_excel;
+ add("application/vnd.ms-excel", icon);
+ add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", icon);
+ add("application/vnd.openxmlformats-officedocument.spreadsheetml.template", icon);
+
+ // Powerpoint
+ icon = R.drawable.ic_doc_powerpoint;
+ add("application/vnd.ms-powerpoint", icon);
+ add("application/vnd.openxmlformats-officedocument.presentationml.presentation", icon);
+ add("application/vnd.openxmlformats-officedocument.presentationml.template", icon);
+ add("application/vnd.openxmlformats-officedocument.presentationml.slideshow", icon);
}
public static Drawable loadPackageIcon(Context context, String authority, int icon) {
@@ -220,7 +230,7 @@ public class IconUtils {
if (mode == DocumentsActivity.State.MODE_GRID) {
return res.getDrawable(R.drawable.ic_grid_folder);
} else {
- return res.getDrawable(R.drawable.ic_root_folder_dark);
+ return res.getDrawable(R.drawable.ic_doc_folder);
}
}
@@ -231,8 +241,7 @@ public class IconUtils {
final Resources res = context.getResources();
if (Document.MIME_TYPE_DIR.equals(mimeType)) {
- // TODO: return a mipmap, since this is used for grid
- return res.getDrawable(R.drawable.ic_root_folder_dark);
+ return res.getDrawable(R.drawable.ic_doc_folder);
}
// Look for exact match first
@@ -249,15 +258,27 @@ public class IconUtils {
// Otherwise look for partial match
final String typeOnly = mimeType.split("/")[0];
if ("audio".equals(typeOnly)) {
- return res.getDrawable(R.drawable.ic_doc_audio_dark);
+ return res.getDrawable(R.drawable.ic_doc_audio);
} else if ("image".equals(typeOnly)) {
- return res.getDrawable(R.drawable.ic_doc_image_dark);
+ return res.getDrawable(R.drawable.ic_doc_image);
} else if ("text".equals(typeOnly)) {
return res.getDrawable(R.drawable.ic_doc_text);
} else if ("video".equals(typeOnly)) {
- return res.getDrawable(R.drawable.ic_doc_video_dark);
+ return res.getDrawable(R.drawable.ic_doc_video);
} else {
return res.getDrawable(R.drawable.ic_doc_generic);
}
}
+
+ public static Drawable applyTint(Context context, int drawableId, int tintAttrId) {
+ final Resources res = context.getResources();
+
+ final TypedValue outValue = new TypedValue();
+ context.getTheme().resolveAttribute(tintAttrId, outValue, true);
+
+ final Drawable icon = res.getDrawable(drawableId);
+ icon.mutate();
+ icon.setTintList(res.getColorStateList(outValue.resourceId));
+ return icon;
+ }
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/SettingsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java
index d423e3f..e6c5ae2 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/SettingsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java
@@ -16,15 +16,10 @@
package com.android.documentsui;
-import android.app.ActionBar;
-import android.app.Activity;
import android.content.Context;
-import android.os.Bundle;
-import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
-import android.view.MenuItem;
-public class SettingsActivity extends Activity {
+public class LocalPreferences {
private static final String KEY_ADVANCED_DEVICES = "advancedDevices";
private static final String KEY_FILE_SIZE = "fileSize";
@@ -38,34 +33,13 @@ public class SettingsActivity extends Activity {
.getBoolean(KEY_FILE_SIZE, false);
}
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- getFragmentManager()
- .beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
-
- final ActionBar bar = getActionBar();
- if (bar != null) {
- bar.setDisplayShowHomeEnabled(false);
- bar.setDisplayHomeAsUpEnabled(true);
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == android.R.id.home) {
- finish();
- return true;
- }
- return super.onOptionsItemSelected(item);
+ public static void setDisplayAdvancedDevices(Context context, boolean display) {
+ PreferenceManager.getDefaultSharedPreferences(context).edit()
+ .putBoolean(KEY_ADVANCED_DEVICES, display).apply();
}
- public static class SettingsFragment extends PreferenceFragment {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.preferences);
- }
+ public static void setDisplayFileSize(Context context, boolean display) {
+ PreferenceManager.getDefaultSharedPreferences(context).edit()
+ .putBoolean(KEY_FILE_SIZE, display).apply();
}
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
index 1235c9b..a465ecd 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
@@ -103,8 +103,7 @@ public class RootsCache {
// Special root for recents
mRecentsRoot.authority = null;
mRecentsRoot.rootId = null;
- mRecentsRoot.icon = R.drawable.ic_root_recent_dark;
- mRecentsRoot.lightIcon = R.drawable.ic_root_recent_light;
+ mRecentsRoot.derivedIcon = R.drawable.ic_root_recent;
mRecentsRoot.flags = Root.FLAG_LOCAL_ONLY | Root.FLAG_SUPPORTS_CREATE
| Root.FLAG_SUPPORTS_IS_CHILD;
mRecentsRoot.title = mContext.getString(R.string.root_recent);
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java b/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java
index 923c79c..b19e028 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java
@@ -133,11 +133,12 @@ public class RootsFragment extends Fragment {
@Override
public void onResume() {
super.onResume();
+ onDisplayStateChanged();
+ }
+ public void onDisplayStateChanged() {
final Context context = getActivity();
final State state = ((DocumentsActivity) context).getDisplayState();
- state.showAdvanced = state.forceAdvanced
- | SettingsActivity.getDisplayAdvancedDevices(context);
if (state.action == ACTION_GET_CONTENT) {
mList.setOnItemLongClickListener(mItemLongClickListener);
diff --git a/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java b/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
index 79cbf26..a358798 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
@@ -48,7 +48,6 @@ public class RootInfo implements Durable, Parcelable {
public String rootId;
public int flags;
public int icon;
- public int lightIcon;
public String title;
public String summary;
public String documentId;
@@ -59,7 +58,6 @@ public class RootInfo implements Durable, Parcelable {
public String derivedPackageName;
public String[] derivedMimeTypes;
public int derivedIcon;
- public int derivedLightIcon;
public RootInfo() {
reset();
@@ -71,7 +69,6 @@ public class RootInfo implements Durable, Parcelable {
rootId = null;
flags = 0;
icon = 0;
- lightIcon = 0;
title = null;
summary = null;
documentId = null;
@@ -81,7 +78,6 @@ public class RootInfo implements Durable, Parcelable {
derivedPackageName = null;
derivedMimeTypes = null;
derivedIcon = 0;
- derivedLightIcon = 0;
}
@Override
@@ -163,20 +159,15 @@ public class RootInfo implements Durable, Parcelable {
// TODO: remove these special case icons
if (isExternalStorage()) {
- derivedIcon = R.drawable.ic_root_sdcard_dark;
- derivedLightIcon = R.drawable.ic_root_sdcard_light;
+ derivedIcon = R.drawable.ic_root_sdcard;
} else if (isDownloads()) {
- derivedIcon = R.drawable.ic_root_download_dark;
- derivedLightIcon = R.drawable.ic_root_download_light;
+ derivedIcon = R.drawable.ic_root_download;
} else if (isImages()) {
- derivedIcon = R.drawable.ic_doc_image_dark;
- derivedLightIcon = R.drawable.ic_doc_image_light;
+ derivedIcon = R.drawable.ic_doc_image;
} else if (isVideos()) {
- derivedIcon = R.drawable.ic_doc_video_dark;
- derivedLightIcon = R.drawable.ic_doc_video_light;
+ derivedIcon = R.drawable.ic_doc_video;
} else if (isAudio()) {
- derivedIcon = R.drawable.ic_doc_audio_dark;
- derivedLightIcon = R.drawable.ic_doc_audio_light;
+ derivedIcon = R.drawable.ic_doc_audio;
}
}
@@ -220,13 +211,21 @@ public class RootInfo implements Durable, Parcelable {
}
}
- public Drawable loadLightIcon(Context context) {
- if (derivedLightIcon != 0) {
- return context.getResources().getDrawable(derivedLightIcon);
- } else if (lightIcon != 0) {
- return IconUtils.loadPackageIcon(context, authority, lightIcon);
+ public Drawable loadGridIcon(Context context) {
+ if (derivedIcon != 0) {
+ return IconUtils.applyTint(context, derivedIcon,
+ android.R.attr.textColorPrimaryInverse);
+ } else {
+ return IconUtils.loadPackageIcon(context, authority, icon);
+ }
+ }
+
+ public Drawable loadToolbarIcon(Context context) {
+ if (derivedIcon != 0) {
+ return IconUtils.applyTint(context, derivedIcon,
+ android.R.attr.colorControlNormal);
} else {
- return loadIcon(context);
+ return IconUtils.loadPackageIcon(context, authority, icon);
}
}
diff --git a/packages/DocumentsUI/wrap_alpha.py b/packages/DocumentsUI/wrap_alpha.py
new file mode 100644
index 0000000..92a3d59
--- /dev/null
+++ b/packages/DocumentsUI/wrap_alpha.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+
+import os
+
+"""
+# assume everything needs alpha suffixes
+for root, dirs, files in os.walk('.'):
+ if "res/drawable-" not in root: continue
+
+ for before in files:
+ if "_alpha.png" in before: continue
+
+ after = before.replace(".png", "_alpha.png")
+ os.rename(os.path.join(root, before), os.path.join(root, after))
+"""
+
+# build xml redirection
+for root, dirs, files in os.walk('.'):
+ if "res/drawable-" not in root: continue
+
+ for src in files:
+ if not src.endswith(".png"): continue
+ src = src[0:-4]
+
+ src_clause = '\n android:src="@drawable/%s"' % (src)
+
+ alpha = src.endswith("_alpha")
+ if alpha:
+ src = src[0:-6]
+ if "ic_doc" in src or "ic_root" in src or "ic_grid_folder" in src:
+ alpha_clause = '\n android:tint="@*android:color/secondary_text_material_light"'
+ else:
+ alpha_clause = '\n android:tint="?android:attr/colorControlNormal"'
+ else:
+ alpha_clause = ''
+
+ am = src.endswith("_am")
+ if am:
+ src = src[0:-3]
+ am_clause = '\n android:autoMirrored="true"'
+ else:
+ am_clause = ''
+
+ with open("res/drawable/%s.xml" % (src), 'w') as xml:
+ xml.write("""<?xml version="1.0" encoding="utf-8"?>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"%s%s%s />
+""" % (src_clause, alpha_clause, am_clause))
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 4315e0d..609ffda 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -121,8 +121,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
private static final int LOADED_PROFILE_ID = -1;
- private static final int DISABLED_PROFILE = -1;
-
private static final int UNKNOWN_USER_ID = -10;
// Bump if the stored widgets need to be upgraded.
@@ -660,7 +658,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
@Override
- public IntentSender createAppWidgetConfigIntentSender(String callingPackage, Intent intent) {
+ public IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId,
+ int intentFlags) {
final int userId = UserHandle.getCallingUserId();
if (DEBUG) {
@@ -670,57 +669,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
// Make sure the package runs under the caller uid.
mSecurityPolicy.enforceCallFromPackage(callingPackage);
- // The only allowed action is the one to start the configure activity.
- if (!AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(intent.getAction())) {
- throw new IllegalArgumentException("Only allowed action is "
- + AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
- }
-
- // Verify that widget id is provided.
- final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
- AppWidgetManager.INVALID_APPWIDGET_ID);
- if (appWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {
- throw new IllegalArgumentException("Widget id required");
- }
-
- // Make sure a component name is provided.
- ComponentName component = intent.getComponent();
- if (component == null) {
- throw new IllegalArgumentException("Component name required");
- }
-
- // Verify the user handle.
- UserHandle userHandle = intent.getParcelableExtra(
- AppWidgetManager.EXTRA_APPWIDGET_PROVIDER_PROFILE);
- if (userHandle != null) {
- // Remove the profile extra as the receiver already runs under this
- // user and this information is of no use to this receiver.
- intent.removeExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER_PROFILE);
-
- // If the user handle is not the caller, check if it is an enabled
- // profile for which the package is white-listed.
- final int profileId = userHandle.getIdentifier();
- if (profileId != userId) {
- // Make sure the passed user handle is a profile in the group.
- final int[] profileIds = mSecurityPolicy.resolveCallerEnabledGroupProfiles(
- new int[]{profileId});
- if (profileIds.length <= 0) {
- // The profile is not in the group or not enabled, done.
- return null;
- }
-
- // Make sure the provider is white-listed.
- if (!mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed(
- component.getPackageName(), profileId)) {
- throw new IllegalArgumentException("Cannot access provider "
- + component + " in user " + profileIds);
- }
- }
- } else {
- // If a profile is not specified use the caller user id.
- userHandle = new UserHandle(userId);
- }
-
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
@@ -738,19 +686,18 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
throw new IllegalArgumentException("Widget not bound " + appWidgetId);
}
- // Make sure the component refers to the provider config activity.
- if (!component.equals(provider.info.configure)
- || !provider.info.getProfile().equals(userHandle)) {
- throw new IllegalArgumentException("No component" + component
- + " for user " + userHandle.getIdentifier());
- }
+ Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
+ intent.setComponent(provider.info.configure);
+ intent.setFlags(intentFlags);
// All right, create the sender.
final long identity = Binder.clearCallingIdentity();
try {
return PendingIntent.getActivityAsUser(
mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT
- | PendingIntent.FLAG_CANCEL_CURRENT, null, userHandle)
+ | PendingIntent.FLAG_CANCEL_CURRENT, null,
+ new UserHandle(provider.getUserId()))
.getIntentSender();
} finally {
Binder.restoreCallingIdentity(identity);
@@ -771,9 +718,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
mSecurityPolicy.enforceCallFromPackage(callingPackage);
// Check that if a cross-profile binding is attempted, it is allowed.
- final int[] profileIds = mSecurityPolicy.resolveCallerEnabledGroupProfiles(
- new int[] {providerProfileId});
- if (profileIds.length <= 0) {
+ if (!mSecurityPolicy.isEnabledGroupProfile(providerProfileId)) {
return false;
}
@@ -1309,28 +1254,23 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
@Override
- public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter, int[] profileIds) {
+ public List<AppWidgetProviderInfo> getInstalledProvidersForProfile(int categoryFilter,
+ int profileId) {
final int userId = UserHandle.getCallingUserId();
if (DEBUG) {
Slog.i(TAG, "getInstalledProvidersForProfiles() " + userId);
}
- if (profileIds != null && profileIds.length > 0) {
- // Make sure the profile ids are children of the calling user.
- profileIds = mSecurityPolicy.resolveCallerEnabledGroupProfiles(profileIds);
- } else {
- profileIds = new int[] {userId};
- }
-
- if (profileIds.length == 0) {
+ // Ensure the profile is in the group and enabled.
+ if (!mSecurityPolicy.isEnabledGroupProfile(profileId)) {
return null;
}
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
- ArrayList<AppWidgetProviderInfo> result = new ArrayList<>();
+ ArrayList<AppWidgetProviderInfo> result = null;
final int providerCount = mProviders.size();
for (int i = 0; i < providerCount; i++) {
@@ -1342,19 +1282,15 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
continue;
}
- // Add providers only for the requested profiles ...
+ // Add providers only for the requested profile that are white-listed.
final int providerProfileId = info.getProfile().getIdentifier();
- final int profileCount = profileIds.length;
- for (int j = 0; j < profileCount; j++) {
- final int profileId = profileIds[j];
- if (providerProfileId == profileId) {
- // ... that are white-listed by the profile manager.
- if (mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed(
- provider.id.componentName.getPackageName(), providerProfileId)) {
- result.add(cloneIfLocalBinder(info));
- }
- break;
+ if (providerProfileId == profileId
+ && mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed(
+ provider.id.componentName.getPackageName(), providerProfileId)) {
+ if (result == null) {
+ result = new ArrayList<>();
}
+ result.add(cloneIfLocalBinder(info));
}
}
@@ -2967,35 +2903,9 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
private final class SecurityPolicy {
- public int[] resolveCallerEnabledGroupProfiles(int[] profileIds) {
+ public boolean isEnabledGroupProfile(int profileId) {
final int parentId = UserHandle.getCallingUserId();
-
- int enabledProfileCount = 0;
- final int profileCount = profileIds.length;
- for (int i = 0; i < profileCount; i++) {
- final int profileId = profileIds[i];
- if (!isParentOrProfile(parentId, profileId)) {
- throw new SecurityException("Not the current user or"
- + " a child profile: " + profileId);
- }
- if (!isProfileEnabled(profileId)) {
- profileIds[i] = DISABLED_PROFILE;
- } else {
- enabledProfileCount++;
- }
- }
-
- int resolvedProfileIndex = 0;
- final int[] resolvedProfiles = new int[enabledProfileCount];
- for (int i = 0; i < profileCount; i++) {
- final int profileId = profileIds[i];
- if (profileId != DISABLED_PROFILE) {
- resolvedProfiles[resolvedProfileIndex] = profileId;
- resolvedProfileIndex++;
- }
- }
-
- return resolvedProfiles;
+ return isParentOrProfile(parentId, profileId) && isProfileEnabled(profileId);
}
public int[] getEnabledGroupProfileIds(int userId) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 4455901..1d684df 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -37,7 +37,7 @@ import android.app.IActivityContainer;
import android.app.IActivityContainerCallback;
import android.app.IAppTask;
import android.app.admin.DevicePolicyManager;
-import android.app.usage.UsageStats;
+import android.app.usage.UsageEvents;
import android.app.usage.UsageStatsManagerInternal;
import android.appwidget.AppWidgetManager;
import android.graphics.Rect;
@@ -3160,7 +3160,7 @@ public final class ActivityManagerService extends ActivityManagerNative
if (mUsageStatsService != null) {
mUsageStatsService.reportEvent(component.realActivity, component.userId,
System.currentTimeMillis(),
- UsageStats.Event.MOVE_TO_FOREGROUND);
+ UsageEvents.Event.MOVE_TO_FOREGROUND);
}
synchronized (stats) {
stats.noteActivityResumedLocked(component.app.uid);
@@ -3169,7 +3169,7 @@ public final class ActivityManagerService extends ActivityManagerNative
if (mUsageStatsService != null) {
mUsageStatsService.reportEvent(component.realActivity, component.userId,
System.currentTimeMillis(),
- UsageStats.Event.MOVE_TO_BACKGROUND);
+ UsageEvents.Event.MOVE_TO_BACKGROUND);
}
synchronized (stats) {
stats.noteActivityPausedLocked(component.app.uid);
@@ -17354,11 +17354,6 @@ public final class ActivityManagerService extends ActivityManagerNative
if ((userInfo.flags&UserInfo.FLAG_INITIALIZED) == 0) {
if (userId != UserHandle.USER_OWNER) {
- // Send PRE_BOOT_COMPLETED broadcasts for this new user
- final ArrayList<ComponentName> doneReceivers
- = new ArrayList<ComponentName>();
- deliverPreBootCompleted(null, doneReceivers, userId);
-
Intent intent = new Intent(Intent.ACTION_USER_INITIALIZE);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
broadcastIntentLocked(null, null, intent, null,
diff --git a/services/core/java/com/android/server/hdmi/Constants.java b/services/core/java/com/android/server/hdmi/Constants.java
index 0b57474..0003210 100644
--- a/services/core/java/com/android/server/hdmi/Constants.java
+++ b/services/core/java/com/android/server/hdmi/Constants.java
@@ -214,5 +214,35 @@ final class Constants {
static final int RECORDING_TYPE_EXTERNAL_PHYSICAL_ADDRESS = 3;
static final int RECORDING_TYPE_OWN_SOURCE = 4;
+ // Definitions used for setOption(). These should be in sync with the definition
+ // in hardware/libhardware/include/hardware/{hdmi_cec.h,mhl.h}.
+
+ // TV gets turned on by incoming <Text/Image View On>. enabled by default.
+ // If set to disabled, TV won't turn on automatically.
+ static final int OPTION_CEC_AUTO_WAKEUP = 1;
+
+ // If set to disabled, all CEC commands are discarded.
+ static final int OPTION_CEC_ENABLE = 2;
+
+ // If set to disabled, system service yields control of CEC to sub-microcontroller.
+ // If enabled, it take the control back.
+ static final int OPTION_CEC_SERVICE_CONTROL = 3;
+
+ // Put other devices to standby when TV goes to standby. enabled by default.
+ // If set to disabled, TV doesn't send <Standby> to other devices.
+ static final int OPTION_CEC_AUTO_DEVICE_OFF = 4;
+
+ // If set to disabled, TV does not switch ports when mobile device is connected.
+ static final int OPTION_MHL_INPUT_SWITCHING = 101;
+
+ // If set to enabled, TV disables power charging for mobile device.
+ static final int OPTION_MHL_POWER_CHARGE = 102;
+
+ // If set to disabled, all MHL commands are discarded.
+ static final int OPTION_MHL_ENABLE = 103;
+
+ static final int DISABLED = 0;
+ static final int ENABLED = 1;
+
private Constants() { /* cannot be instantiated */ }
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index ad5b2ba..183f299 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -30,8 +30,8 @@ import static android.hardware.hdmi.HdmiControlManager.TIMER_RECORDING_TYPE_DIGI
import static android.hardware.hdmi.HdmiControlManager.TIMER_RECORDING_TYPE_EXTERNAL;
import android.content.Intent;
-import android.hardware.hdmi.HdmiDeviceInfo;
import android.hardware.hdmi.HdmiControlManager;
+import android.hardware.hdmi.HdmiDeviceInfo;
import android.hardware.hdmi.HdmiRecordSources;
import android.hardware.hdmi.HdmiTimerRecordSources;
import android.hardware.hdmi.IHdmiControlCallback;
@@ -1274,14 +1274,12 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
void setAutoDeviceOff(boolean enabled) {
assertRunOnServiceThread();
mAutoDeviceOff = enabled;
- mService.writeBooleanSetting(Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED, enabled);
}
@ServiceThreadOnly
void setAutoWakeup(boolean enabled) {
assertRunOnServiceThread();
mAutoWakeup = enabled;
- mService.writeBooleanSetting(Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED, enabled);
}
@ServiceThreadOnly
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index 81b99f0..6f68bd8 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -16,17 +16,27 @@
package com.android.server.hdmi;
+import static com.android.server.hdmi.Constants.DISABLED;
+import static com.android.server.hdmi.Constants.ENABLED;
+import static com.android.server.hdmi.Constants.OPTION_CEC_AUTO_DEVICE_OFF;
+import static com.android.server.hdmi.Constants.OPTION_CEC_AUTO_WAKEUP;
+import static com.android.server.hdmi.Constants.OPTION_CEC_ENABLE;
+import static com.android.server.hdmi.Constants.OPTION_CEC_SERVICE_CONTROL;
+import static com.android.server.hdmi.Constants.OPTION_MHL_ENABLE;
+import static com.android.server.hdmi.Constants.OPTION_MHL_INPUT_SWITCHING;
+import static com.android.server.hdmi.Constants.OPTION_MHL_POWER_CHARGE;
+
import android.annotation.Nullable;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.database.ContentObserver;
import android.hardware.hdmi.HdmiDeviceInfo;
import android.hardware.hdmi.HdmiControlManager;
import android.hardware.hdmi.HdmiHotplugEvent;
import android.hardware.hdmi.HdmiPortInfo;
-import android.hardware.hdmi.HdmiTvClient;
import android.hardware.hdmi.IHdmiControlCallback;
import android.hardware.hdmi.IHdmiControlService;
import android.hardware.hdmi.IHdmiDeviceEventListener;
@@ -36,6 +46,7 @@ import android.hardware.hdmi.IHdmiRecordListener;
import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener;
import android.hardware.hdmi.IHdmiVendorCommandListener;
import android.media.AudioManager;
+import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.HandlerThread;
@@ -44,6 +55,7 @@ import android.os.Looper;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.os.UserHandle;
import android.provider.Settings.Global;
import android.util.ArraySet;
import android.util.Slog;
@@ -196,6 +208,8 @@ public final class HdmiControlService extends SystemService {
// Handler used to run a task in service thread.
private final Handler mHandler = new Handler();
+ private final SettingsObserver mSettingsObserver;
+
@Nullable
private HdmiCecController mCecController;
@@ -229,6 +243,7 @@ public final class HdmiControlService extends SystemService {
super(context);
mLocalDevices = HdmiUtils.asImmutableList(getContext().getResources().getIntArray(
com.android.internal.R.array.config_hdmiCecLogicalDeviceType));
+ mSettingsObserver = new SettingsObserver(mHandler);
}
@Override
@@ -241,8 +256,7 @@ public final class HdmiControlService extends SystemService {
mCecController = HdmiCecController.create(this);
if (mCecController != null) {
// TODO: Remove this as soon as OEM's HAL implementation is corrected.
- mCecController.setOption(HdmiTvClient.OPTION_CEC_ENABLE,
- HdmiTvClient.ENABLED);
+ mCecController.setOption(OPTION_CEC_ENABLE, ENABLED);
// TODO: load value for mHdmiControlEnabled from preference.
if (mHdmiControlEnabled) {
@@ -279,24 +293,78 @@ public final class HdmiControlService extends SystemService {
mWakeUpMessageReceived = false;
if (isTvDevice()) {
- mCecController.setOption(HdmiTvClient.OPTION_CEC_AUTO_WAKEUP,
- tv().getAutoWakeup() ? HdmiTvClient.ENABLED : HdmiTvClient.DISABLED);
+ mCecController.setOption(OPTION_CEC_AUTO_WAKEUP, toInt(tv().getAutoWakeup()));
+ registerContentObserver();
}
}
+
+ private void registerContentObserver() {
+ ContentResolver resolver = getContext().getContentResolver();
+ String[] settings = new String[] {
+ Global.HDMI_CONTROL_ENABLED,
+ Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED,
+ Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED,
+ Global.MHL_INPUT_SWITCHING_ENABLED,
+ Global.MHL_POWER_CHARGE_ENABLED
+ };
+ for (String s: settings) {
+ resolver.registerContentObserver(Global.getUriFor(s), false, mSettingsObserver,
+ UserHandle.USER_ALL);
+ }
+ }
+
+ private class SettingsObserver extends ContentObserver {
+ public SettingsObserver(Handler handler) {
+ super(handler);
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ String option = uri.getLastPathSegment();
+ boolean enabled = readBooleanSetting(option, true);
+ switch (option) {
+ case Global.HDMI_CONTROL_ENABLED:
+ setControlEnabled(enabled);
+ break;
+ case Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED:
+ tv().setAutoWakeup(enabled);
+ setOption(OPTION_CEC_AUTO_WAKEUP, toInt(enabled));
+ break;
+ case Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED:
+ tv().setAutoDeviceOff(enabled);
+ // No need to propagate to HAL.
+ break;
+ case Global.MHL_INPUT_SWITCHING_ENABLED:
+ setOption(OPTION_MHL_INPUT_SWITCHING, toInt(enabled));
+ break;
+ case Global.MHL_POWER_CHARGE_ENABLED:
+ setOption(OPTION_MHL_POWER_CHARGE, toInt(enabled));
+ break;
+ }
+ }
+ }
+
+ private static int toInt(boolean enabled) {
+ return enabled ? ENABLED : DISABLED;
+ }
+
boolean readBooleanSetting(String key, boolean defVal) {
ContentResolver cr = getContext().getContentResolver();
- return Global.getInt(cr, key, defVal ? Constants.TRUE : Constants.FALSE) == Constants.TRUE;
+ return Global.getInt(cr, key, toInt(defVal)) == ENABLED;
}
void writeBooleanSetting(String key, boolean value) {
ContentResolver cr = getContext().getContentResolver();
- Global.putInt(cr, key, value ? Constants.TRUE : Constants.FALSE);
+ Global.putInt(cr, key, toInt(value));
+ }
+
+ private void unregisterSettingsObserver() {
+ getContext().getContentResolver().unregisterContentObserver(mSettingsObserver);
}
private void initializeCec(int initiatedBy) {
- mCecController.setOption(HdmiTvClient.OPTION_CEC_SERVICE_CONTROL,
- HdmiTvClient.ENABLED);
+ mCecController.setOption(OPTION_CEC_SERVICE_CONTROL, ENABLED);
initializeLocalDevices(mLocalDevices, initiatedBy);
}
@@ -965,18 +1033,6 @@ public final class HdmiControlService extends SystemService {
}
@Override
- public void setControlEnabled(final boolean enabled) {
- enforceAccessPermission();
- runOnServiceThread(new Runnable() {
- @Override
- public void run() {
- handleHdmiControlStatusChanged(enabled);
-
- }
- });
- }
-
- @Override
public void setSystemAudioVolume(final int oldIndex, final int newIndex,
final int maxIndex) {
enforceAccessPermission();
@@ -1025,30 +1081,6 @@ public final class HdmiControlService extends SystemService {
}
@Override
- public void setOption(final int key, final int value) {
- enforceAccessPermission();
- if (!isTvDevice()) {
- return;
- }
- switch (key) {
- case HdmiTvClient.OPTION_CEC_AUTO_WAKEUP:
- tv().setAutoWakeup(value == HdmiTvClient.ENABLED);
- mCecController.setOption(key, value);
- break;
- case HdmiTvClient.OPTION_CEC_AUTO_DEVICE_OFF:
- // No need to pass this option to HAL.
- tv().setAutoDeviceOff(value == HdmiTvClient.ENABLED);
- break;
- case HdmiTvClient.OPTION_MHL_INPUT_SWITCHING: // Fall through
- case HdmiTvClient.OPTION_MHL_POWER_CHARGE:
- if (mMhlController != null) {
- mMhlController.setOption(key, value);
- }
- break;
- }
- }
-
- @Override
public void setProhibitMode(final boolean enabled) {
enforceAccessPermission();
if (!isTvDevice()) {
@@ -1502,6 +1534,9 @@ public final class HdmiControlService extends SystemService {
for (HdmiCecLocalDevice device : mCecController.getLocalDeviceList()) {
device.disableDevice(mStandbyMessageReceived, callback);
}
+ if (isTvDevice()) {
+ unregisterSettingsObserver();
+ }
}
@ServiceThreadOnly
@@ -1527,7 +1562,7 @@ public final class HdmiControlService extends SystemService {
device.onStandby(mStandbyMessageReceived);
}
mStandbyMessageReceived = false;
- mCecController.setOption(HdmiTvClient.OPTION_CEC_SERVICE_CONTROL, HdmiTvClient.DISABLED);
+ mCecController.setOption(OPTION_CEC_SERVICE_CONTROL, DISABLED);
}
private void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType) {
@@ -1572,13 +1607,19 @@ public final class HdmiControlService extends SystemService {
}
@ServiceThreadOnly
- private void handleHdmiControlStatusChanged(boolean enabled) {
+ void setOption(int key, int value) {
+ assertRunOnServiceThread();
+ mCecController.setOption(key, value);
+ }
+
+ @ServiceThreadOnly
+ void setControlEnabled(boolean enabled) {
assertRunOnServiceThread();
- int value = enabled ? HdmiTvClient.ENABLED : HdmiTvClient.DISABLED;
- mCecController.setOption(HdmiTvClient.OPTION_CEC_ENABLE, value);
+ int value = toInt(enabled);
+ mCecController.setOption(OPTION_CEC_ENABLE, value);
if (mMhlController != null) {
- mMhlController.setOption(HdmiTvClient.OPTION_MHL_ENABLE, value);
+ mMhlController.setOption(OPTION_MHL_ENABLE, value);
}
synchronized (mLock) {
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 743abc8..3eb2b7e 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -16,7 +16,7 @@
package com.android.server.notification;
-import static android.service.notification.NotificationListenerService.FLAG_DISABLE_HOST_ALERTS;
+import static android.service.notification.NotificationListenerService.HINT_HOST_DISABLE_EFFECTS;
import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
import static org.xmlpull.v1.XmlPullParser.END_TAG;
import static org.xmlpull.v1.XmlPullParser.START_TAG;
@@ -125,7 +125,7 @@ public class NotificationManagerService extends SystemService {
static final int MESSAGE_RECONSIDER_RANKING = 4;
static final int MESSAGE_RANKING_CONFIG_CHANGE = 5;
static final int MESSAGE_SEND_RANKING_UPDATE = 6;
- static final int MESSAGE_LISTENER_FLAGS_CHANGED = 7;
+ static final int MESSAGE_LISTENER_HINTS_CHANGED = 7;
static final int LONG_DELAY = 3500; // 3.5 seconds
static final int SHORT_DELAY = 2000; // 2 seconds
@@ -170,12 +170,12 @@ public class NotificationManagerService extends SystemService {
private boolean mUseAttentionLight;
boolean mSystemReady;
- private boolean mDisableNotificationAlerts;
+ private boolean mDisableNotificationEffects;
NotificationRecord mSoundNotification;
NotificationRecord mVibrateNotification;
- private final ArraySet<ManagedServiceInfo> mListenersDisablingAlerts = new ArraySet<>();
- private int mListenerFlags; // right now, all flags are global
+ private final ArraySet<ManagedServiceInfo> mListenersDisablingEffects = new ArraySet<>();
+ private int mListenerHints; // right now, all hints are global
// for enabling and disabling notification pulse behavior
private boolean mScreenOn = true;
@@ -470,8 +470,9 @@ public class NotificationManagerService extends SystemService {
@Override
public void onSetDisabled(int status) {
synchronized (mNotificationList) {
- mDisableNotificationAlerts = (status & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0;
- if (disableNotificationAlerts()) {
+ mDisableNotificationEffects =
+ (status & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0;
+ if (disableNotificationEffects()) {
// cancel whatever's going on
long identity = Binder.clearCallingIdentity();
try {
@@ -804,6 +805,13 @@ public class NotificationManagerService extends SystemService {
public void onConfigChanged() {
savePolicyFile();
}
+
+ @Override
+ void onZenModeChanged() {
+ synchronized(mNotificationList) {
+ updateListenerHintsLocked();
+ }
+ }
});
final File systemDir = new File(Environment.getDataDirectory(), "system");
mPolicyFile = new AtomicFile(new File(systemDir, "notification_policy.xml"));
@@ -846,7 +854,7 @@ public class NotificationManagerService extends SystemService {
// flag at least once and we'll go back to 0 after that.
if (0 == Settings.Global.getInt(getContext().getContentResolver(),
Settings.Global.DEVICE_PROVISIONED, 0)) {
- mDisableNotificationAlerts = true;
+ mDisableNotificationEffects = true;
}
mZenModeHelper.updateZenMode();
@@ -932,11 +940,12 @@ public class NotificationManagerService extends SystemService {
}
}
- private void updateListenerFlagsLocked() {
- final int flags = mListenersDisablingAlerts.isEmpty() ? 0 : FLAG_DISABLE_HOST_ALERTS;
- if (flags == mListenerFlags) return;
- mListenerFlags = flags;
- scheduleListenerFlagsChanged(flags);
+ private void updateListenerHintsLocked() {
+ final int hints = (mListenersDisablingEffects.isEmpty() ? 0 : HINT_HOST_DISABLE_EFFECTS) |
+ mZenModeHelper.getZenModeListenerHint();
+ if (hints == mListenerHints) return;
+ mListenerHints = hints;
+ scheduleListenerHintsChanged(hints);
}
private final IBinder mService = new INotificationManager.Stub() {
@@ -1284,23 +1293,29 @@ public class NotificationManagerService extends SystemService {
}
@Override
- public void requestFlagsFromListener(INotificationListener token, int flags) {
- synchronized (mNotificationList) {
- final ManagedServiceInfo info = mListeners.checkServiceTokenLocked(token);
- final boolean disableAlerts = (flags & FLAG_DISABLE_HOST_ALERTS) != 0;
- if (disableAlerts) {
- mListenersDisablingAlerts.add(info);
- } else {
- mListenersDisablingAlerts.remove(info);
+ public void requestHintsFromListener(INotificationListener token, int hints) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ synchronized (mNotificationList) {
+ final ManagedServiceInfo info = mListeners.checkServiceTokenLocked(token);
+ final boolean disableEffects = (hints & HINT_HOST_DISABLE_EFFECTS) != 0;
+ if (disableEffects) {
+ mListenersDisablingEffects.add(info);
+ } else {
+ mListenersDisablingEffects.remove(info);
+ }
+ mZenModeHelper.requestFromListener(hints);
+ updateListenerHintsLocked();
}
- updateListenerFlagsLocked();
+ } finally {
+ Binder.restoreCallingIdentity(identity);
}
}
@Override
- public int getFlagsFromListener(INotificationListener token) {
+ public int getHintsFromListener(INotificationListener token) {
synchronized (mNotificationList) {
- return mListenerFlags;
+ return mListenerHints;
}
}
@@ -1395,8 +1410,8 @@ public class NotificationManagerService extends SystemService {
return keys.toArray(new String[keys.size()]);
}
- private boolean disableNotificationAlerts() {
- return mDisableNotificationAlerts || (mListenerFlags & FLAG_DISABLE_HOST_ALERTS) != 0;
+ private boolean disableNotificationEffects() {
+ return mDisableNotificationEffects || (mListenerHints & HINT_HOST_DISABLE_EFFECTS) != 0;
}
void dumpImpl(PrintWriter pw, DumpFilter filter) {
@@ -1447,7 +1462,7 @@ public class NotificationManagerService extends SystemService {
pw.println(" mNotificationPulseEnabled=" + mNotificationPulseEnabled);
pw.println(" mSoundNotification=" + mSoundNotification);
pw.println(" mVibrateNotification=" + mVibrateNotification);
- pw.println(" mDisableNotificationAlerts=" + mDisableNotificationAlerts);
+ pw.println(" mDisableNotificationEffects=" + mDisableNotificationEffects);
pw.println(" mSystemReady=" + mSystemReady);
}
pw.println(" mArchive=" + mArchive.toString());
@@ -1483,11 +1498,11 @@ public class NotificationManagerService extends SystemService {
pw.println("\n Notification listeners:");
mListeners.dump(pw, filter);
- pw.print(" mListenerFlags: "); pw.println(mListenerFlags);
- pw.print(" mListenersDisablingAlerts: (");
- N = mListenersDisablingAlerts.size();
+ pw.print(" mListenerHints: "); pw.println(mListenerHints);
+ pw.print(" mListenersDisablingEffects: (");
+ N = mListenersDisablingEffects.size();
for (int i = 0; i < N; i++) {
- final ManagedServiceInfo listener = mListenersDisablingAlerts.valueAt(i);
+ final ManagedServiceInfo listener = mListenersDisablingEffects.valueAt(i);
if (i > 0) pw.print(',');
pw.print(listener.component);
}
@@ -1705,7 +1720,7 @@ public class NotificationManagerService extends SystemService {
}
// If we're not supposed to beep, vibrate, etc. then don't.
- if (!disableNotificationAlerts()
+ if (!disableNotificationEffects()
&& (!(record.isUpdate
&& (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
&& (record.getUserId() == UserHandle.USER_ALL ||
@@ -2021,14 +2036,14 @@ public class NotificationManagerService extends SystemService {
}
}
- private void scheduleListenerFlagsChanged(int state) {
- mHandler.removeMessages(MESSAGE_LISTENER_FLAGS_CHANGED);
- mHandler.obtainMessage(MESSAGE_LISTENER_FLAGS_CHANGED, state, 0).sendToTarget();
+ private void scheduleListenerHintsChanged(int state) {
+ mHandler.removeMessages(MESSAGE_LISTENER_HINTS_CHANGED);
+ mHandler.obtainMessage(MESSAGE_LISTENER_HINTS_CHANGED, state, 0).sendToTarget();
}
- private void handleListenerFlagsChanged(int state) {
+ private void handleListenerHintsChanged(int hints) {
synchronized (mNotificationList) {
- mListeners.notifyListenerFlagsChangedLocked(state);
+ mListeners.notifyListenerHintsChangedLocked(hints);
}
}
@@ -2048,8 +2063,8 @@ public class NotificationManagerService extends SystemService {
case MESSAGE_SEND_RANKING_UPDATE:
handleSendRankingUpdate();
break;
- case MESSAGE_LISTENER_FLAGS_CHANGED:
- handleListenerFlagsChanged(msg.arg1);
+ case MESSAGE_LISTENER_HINTS_CHANGED:
+ handleListenerHintsChanged(msg.arg1);
break;
}
}
@@ -2570,8 +2585,8 @@ public class NotificationManagerService extends SystemService {
@Override
protected void onServiceRemovedLocked(ManagedServiceInfo removed) {
- if (mListenersDisablingAlerts.remove(removed)) {
- updateListenerFlagsLocked();
+ if (mListenersDisablingEffects.remove(removed)) {
+ updateListenerHintsLocked();
}
}
@@ -2655,7 +2670,7 @@ public class NotificationManagerService extends SystemService {
}
}
- public void notifyListenerFlagsChangedLocked(final int flags) {
+ public void notifyListenerHintsChangedLocked(final int hints) {
for (final ManagedServiceInfo serviceInfo : mServices) {
if (!serviceInfo.isEnabledForCurrentProfiles()) {
continue;
@@ -2663,7 +2678,7 @@ public class NotificationManagerService extends SystemService {
mHandler.post(new Runnable() {
@Override
public void run() {
- notifyListenerFlagsChanged(serviceInfo, flags);
+ notifyListenerHintsChanged(serviceInfo, hints);
}
});
}
@@ -2702,12 +2717,12 @@ public class NotificationManagerService extends SystemService {
}
}
- private void notifyListenerFlagsChanged(ManagedServiceInfo info, int state) {
+ private void notifyListenerHintsChanged(ManagedServiceInfo info, int hints) {
final INotificationListener listener = (INotificationListener) info.service;
try {
- listener.onListenerFlagsChanged(state);
+ listener.onListenerHintsChanged(hints);
} catch (RemoteException ex) {
- Log.e(TAG, "unable to notify listener (listener flags): " + listener, ex);
+ Log.e(TAG, "unable to notify listener (listener hints): " + listener, ex);
}
}
}
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 9f97583..9282283 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -41,6 +41,7 @@ import android.os.IBinder;
import android.os.UserHandle;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
+import android.service.notification.NotificationListenerService;
import android.service.notification.ZenModeConfig;
import android.telecomm.TelecommManager;
import android.util.Slog;
@@ -125,6 +126,40 @@ public class ZenModeHelper {
mAudioManager = audioManager;
}
+ public int getZenModeListenerHint() {
+ switch(mZenMode) {
+ case Global.ZEN_MODE_OFF:
+ return NotificationListenerService.HINT_HOST_INTERRUPTION_LEVEL_ALL;
+ case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
+ return NotificationListenerService.HINT_HOST_INTERRUPTION_LEVEL_PRIORITY;
+ case Global.ZEN_MODE_NO_INTERRUPTIONS:
+ return NotificationListenerService.HINT_HOST_INTERRUPTION_LEVEL_NONE;
+ default:
+ return 0;
+ }
+ }
+
+ private static int zenFromListenerHint(int hints, int defValue) {
+ final int level = hints & NotificationListenerService.HOST_INTERRUPTION_LEVEL_MASK;
+ switch(level) {
+ case NotificationListenerService.HINT_HOST_INTERRUPTION_LEVEL_ALL:
+ return Global.ZEN_MODE_OFF;
+ case NotificationListenerService.HINT_HOST_INTERRUPTION_LEVEL_PRIORITY:
+ return Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
+ case NotificationListenerService.HINT_HOST_INTERRUPTION_LEVEL_NONE:
+ return Global.ZEN_MODE_NO_INTERRUPTIONS;
+ default:
+ return defValue;
+ }
+ }
+
+ public void requestFromListener(int hints) {
+ final int newZen = zenFromListenerHint(hints, -1);
+ if (newZen != -1) {
+ setZenMode(newZen);
+ }
+ }
+
public boolean shouldIntercept(NotificationRecord record) {
if (mZenMode != Global.ZEN_MODE_OFF) {
if (isSystem(record)) {
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 23ab73c..e74de38 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -1142,8 +1142,6 @@ final class WindowState implements WindowManagerPolicy.WindowState {
boolean showLw(boolean doAnimation, boolean requestAnim) {
if (isHiddenFromUserLocked()) {
- Slog.w(TAG, "current user violation " + mService.mCurrentUserId + " trying to display "
- + this + ", type " + mAttrs.type + ", belonging to " + mOwnerUid);
return false;
}
if (!mAppOpVisibility) {
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 3f07dd9..85dc810 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -1533,8 +1533,6 @@ class WindowStateAnimator {
// This must be called while inside a transaction.
boolean performShowLocked() {
if (mWin.isHiddenFromUserLocked()) {
- Slog.w(TAG, "current user violation " + mService.mCurrentUserId + " trying to display "
- + this + ", type " + mWin.mAttrs.type + ", belonging to " + mWin.mOwnerUid);
return false;
}
if (DEBUG_VISIBILITY || (DEBUG_STARTING_WINDOW &&
diff --git a/services/usage/java/com/android/server/usage/IntervalStats.java b/services/usage/java/com/android/server/usage/IntervalStats.java
new file mode 100644
index 0000000..43027ad
--- /dev/null
+++ b/services/usage/java/com/android/server/usage/IntervalStats.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.android.server.usage;
+
+import android.app.usage.TimeSparseArray;
+import android.app.usage.UsageEvents;
+import android.app.usage.UsageStats;
+import android.content.ComponentName;
+import android.util.ArrayMap;
+
+class IntervalStats {
+ public long beginTime;
+ public long endTime;
+ public long lastTimeSaved;
+ public final ArrayMap<String, UsageStats> stats = new ArrayMap<>();
+ public TimeSparseArray<UsageEvents.Event> events;
+
+ // Maps flattened string representations of component names to ComponentName.
+ // This helps save memory from using many duplicate ComponentNames and
+ // parse time when reading XML.
+ private final ArrayMap<String, ComponentName> mComponentNames = new ArrayMap<>();
+
+ UsageStats getOrCreateUsageStats(String packageName) {
+ UsageStats usageStats = stats.get(packageName);
+ if (usageStats == null) {
+ usageStats = new UsageStats();
+ usageStats.mPackageName = packageName;
+ usageStats.mBeginTimeStamp = beginTime;
+ usageStats.mEndTimeStamp = endTime;
+ stats.put(packageName, usageStats);
+ }
+ return usageStats;
+ }
+
+ void update(String packageName, long timeStamp, int eventType) {
+ UsageStats usageStats = getOrCreateUsageStats(packageName);
+
+ // TODO(adamlesinski): Ensure that we recover from incorrect event sequences
+ // like double MOVE_TO_BACKGROUND, etc.
+ if (eventType == UsageEvents.Event.MOVE_TO_BACKGROUND ||
+ eventType == UsageEvents.Event.END_OF_DAY) {
+ if (usageStats.mLastEvent == UsageEvents.Event.MOVE_TO_FOREGROUND ||
+ usageStats.mLastEvent == UsageEvents.Event.CONTINUE_PREVIOUS_DAY) {
+ usageStats.mTotalTimeInForeground += timeStamp - usageStats.mLastTimeUsed;
+ }
+ }
+ usageStats.mLastEvent = eventType;
+ usageStats.mLastTimeUsed = timeStamp;
+ usageStats.mEndTimeStamp = timeStamp;
+ endTime = timeStamp;
+ }
+
+ /**
+ * Return a ComponentName for the given string representation. This will use a cached
+ * copy of the ComponentName if possible, otherwise it will parse and add it to the
+ * internal cache.
+ */
+ ComponentName getCachedComponentName(String str) {
+ ComponentName name = mComponentNames.get(str);
+ if (name == null) {
+ name = ComponentName.unflattenFromString(str);
+ if (name != null) {
+ mComponentNames.put(str, name);
+ }
+ }
+ return name;
+ }
+}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
index 4e75f61..e6ce0fe 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
@@ -27,30 +27,37 @@ import java.io.FilenameFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.List;
+/**
+ * Provides an interface to query for UsageStat data from an XML database.
+ */
class UsageStatsDatabase {
private static final String TAG = "UsageStatsDatabase";
private static final boolean DEBUG = UsageStatsService.DEBUG;
private final Object mLock = new Object();
- private final File[] mBucketDirs;
+ private final File[] mIntervalDirs;
private final TimeSparseArray<AtomicFile>[] mSortedStatFiles;
private final Calendar mCal;
public UsageStatsDatabase(File dir) {
- mBucketDirs = new File[] {
+ mIntervalDirs = new File[] {
new File(dir, "daily"),
new File(dir, "weekly"),
new File(dir, "monthly"),
new File(dir, "yearly"),
};
- mSortedStatFiles = new TimeSparseArray[mBucketDirs.length];
+ mSortedStatFiles = new TimeSparseArray[mIntervalDirs.length];
mCal = Calendar.getInstance();
}
+ /**
+ * Initialize any directories required and index what stats are available.
+ */
void init() {
synchronized (mLock) {
- for (File f : mBucketDirs) {
+ for (File f : mIntervalDirs) {
f.mkdirs();
if (!f.exists()) {
throw new IllegalStateException("Failed to create directory "
@@ -68,10 +75,10 @@ class UsageStatsDatabase {
// Index the available usage stat files on disk.
for (int i = 0; i < mSortedStatFiles.length; i++) {
mSortedStatFiles[i] = new TimeSparseArray<>();
- File[] files = mBucketDirs[i].listFiles(backupFileFilter);
+ File[] files = mIntervalDirs[i].listFiles(backupFileFilter);
if (files != null) {
if (DEBUG) {
- Slog.d(TAG, "Found " + files.length + " stat files for bucket " + i);
+ Slog.d(TAG, "Found " + files.length + " stat files for interval " + i);
}
for (File f : files) {
@@ -82,21 +89,24 @@ class UsageStatsDatabase {
}
}
- public UsageStats getLatestUsageStats(int bucketType) {
+ /**
+ * Get the latest stats that exist for this interval type.
+ */
+ public IntervalStats getLatestUsageStats(int intervalType) {
synchronized (mLock) {
- if (bucketType < 0 || bucketType >= mBucketDirs.length) {
- throw new IllegalArgumentException("Bad bucket type " + bucketType);
+ if (intervalType < 0 || intervalType >= mIntervalDirs.length) {
+ throw new IllegalArgumentException("Bad interval type " + intervalType);
}
- final int fileCount = mSortedStatFiles[bucketType].size();
+ final int fileCount = mSortedStatFiles[intervalType].size();
if (fileCount == 0) {
return null;
}
try {
- final AtomicFile f = mSortedStatFiles[bucketType].valueAt(fileCount - 1);
- UsageStats stats = UsageStatsXml.read(f);
- stats.mLastTimeSaved = f.getLastModifiedTime();
+ final AtomicFile f = mSortedStatFiles[intervalType].valueAt(fileCount - 1);
+ IntervalStats stats = new IntervalStats();
+ UsageStatsXml.read(f, stats);
return stats;
} catch (IOException e) {
Slog.e(TAG, "Failed to read usage stats file", e);
@@ -105,62 +115,114 @@ class UsageStatsDatabase {
return null;
}
- public UsageStats[] getUsageStats(int bucketType, long beginTime, int limit) {
+ /**
+ * Get the time at which the latest stats begin for this interval type.
+ */
+ public long getLatestUsageStatsBeginTime(int intervalType) {
synchronized (mLock) {
- if (bucketType < 0 || bucketType >= mBucketDirs.length) {
- throw new IllegalArgumentException("Bad bucket type " + bucketType);
+ if (intervalType < 0 || intervalType >= mIntervalDirs.length) {
+ throw new IllegalArgumentException("Bad interval type " + intervalType);
}
- if (limit <= 0) {
- return UsageStats.EMPTY_STATS;
+ final int statsFileCount = mSortedStatFiles[intervalType].size();
+ if (statsFileCount > 0) {
+ return mSortedStatFiles[intervalType].keyAt(statsFileCount - 1);
}
+ return -1;
+ }
+ }
- int startIndex = mSortedStatFiles[bucketType].closestIndexAfter(beginTime);
+ /**
+ * Find all {@link UsageStats} for the given range and interval type.
+ */
+ public List<UsageStats> queryUsageStats(int intervalType, long beginTime, long endTime) {
+ synchronized (mLock) {
+ if (intervalType < 0 || intervalType >= mIntervalDirs.length) {
+ throw new IllegalArgumentException("Bad interval type " + intervalType);
+ }
+
+ if (endTime < beginTime) {
+ return null;
+ }
+
+ final int startIndex = mSortedStatFiles[intervalType].closestIndexOnOrBefore(beginTime);
if (startIndex < 0) {
- return UsageStats.EMPTY_STATS;
+ return null;
+ }
+
+ int endIndex = mSortedStatFiles[intervalType].closestIndexOnOrAfter(endTime);
+ if (endIndex < 0) {
+ endIndex = mSortedStatFiles[intervalType].size() - 1;
}
- final int realLimit = Math.min(limit, mSortedStatFiles[bucketType].size() - startIndex);
try {
- ArrayList<UsageStats> stats = new ArrayList<>(realLimit);
- for (int i = 0; i < realLimit; i++) {
- final AtomicFile f = mSortedStatFiles[bucketType].valueAt(startIndex + i);
+ IntervalStats stats = new IntervalStats();
+ ArrayList<UsageStats> results = new ArrayList<>();
+ for (int i = startIndex; i <= endIndex; i++) {
+ final AtomicFile f = mSortedStatFiles[intervalType].valueAt(i);
if (DEBUG) {
Slog.d(TAG, "Reading stat file " + f.getBaseFile().getAbsolutePath());
}
- UsageStats stat = UsageStatsXml.read(f);
- if (beginTime < stat.mEndTimeStamp) {
- stat.mLastTimeSaved = f.getLastModifiedTime();
- stats.add(stat);
+ UsageStatsXml.read(f, stats);
+ if (beginTime < stats.endTime) {
+ results.addAll(stats.stats.values());
}
}
- return stats.toArray(new UsageStats[stats.size()]);
+ return results;
} catch (IOException e) {
Slog.e(TAG, "Failed to read usage stats file", e);
- return UsageStats.EMPTY_STATS;
+ return null;
}
}
}
+ /**
+ * Find the interval that best matches this range.
+ *
+ * TODO(adamlesinski): Use endTimeStamp in best fit calculation.
+ */
+ public int findBestFitBucket(long beginTimeStamp, long endTimeStamp) {
+ synchronized (mLock) {
+ int bestBucket = -1;
+ long smallestDiff = Long.MAX_VALUE;
+ for (int i = mSortedStatFiles.length - 1; i >= 0; i--) {
+ final int index = mSortedStatFiles[i].closestIndexOnOrBefore(beginTimeStamp);
+ int size = mSortedStatFiles[i].size();
+ if (index >= 0 && index < size) {
+ // We have some results here, check if they are better than our current match.
+ long diff = Math.abs(mSortedStatFiles[i].keyAt(index) - beginTimeStamp);
+ if (diff < smallestDiff) {
+ smallestDiff = diff;
+ bestBucket = i;
+ }
+ }
+ }
+ return bestBucket;
+ }
+ }
+
+ /**
+ * Remove any usage stat files that are too old.
+ */
public void prune() {
synchronized (mLock) {
long timeNow = System.currentTimeMillis();
mCal.setTimeInMillis(timeNow);
mCal.add(Calendar.MONTH, -6);
- pruneFilesOlderThan(mBucketDirs[UsageStatsManager.MONTHLY_BUCKET],
+ pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_MONTHLY],
mCal.getTimeInMillis());
mCal.setTimeInMillis(timeNow);
mCal.add(Calendar.WEEK_OF_YEAR, -4);
- pruneFilesOlderThan(mBucketDirs[UsageStatsManager.WEEKLY_BUCKET],
+ pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_WEEKLY],
mCal.getTimeInMillis());
mCal.setTimeInMillis(timeNow);
mCal.add(Calendar.DAY_OF_YEAR, -7);
- pruneFilesOlderThan(mBucketDirs[UsageStatsManager.DAILY_BUCKET],
+ pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_DAILY],
mCal.getTimeInMillis());
}
}
@@ -177,23 +239,24 @@ class UsageStatsDatabase {
}
}
- public void putUsageStats(int bucketType, UsageStats stats)
- throws IOException {
+ /**
+ * Update the stats in the database. They may not be written to disk immediately.
+ */
+ public void putUsageStats(int intervalType, IntervalStats stats) throws IOException {
synchronized (mLock) {
- if (bucketType < 0 || bucketType >= mBucketDirs.length) {
- throw new IllegalArgumentException("Bad bucket type " + bucketType);
+ if (intervalType < 0 || intervalType >= mIntervalDirs.length) {
+ throw new IllegalArgumentException("Bad interval type " + intervalType);
}
- AtomicFile f = mSortedStatFiles[bucketType].get(stats.mBeginTimeStamp);
+ AtomicFile f = mSortedStatFiles[intervalType].get(stats.beginTime);
if (f == null) {
- f = new AtomicFile(new File(mBucketDirs[bucketType],
- Long.toString(stats.mBeginTimeStamp)));
- mSortedStatFiles[bucketType].append(stats.mBeginTimeStamp, f);
+ f = new AtomicFile(new File(mIntervalDirs[intervalType],
+ Long.toString(stats.beginTime)));
+ mSortedStatFiles[intervalType].put(stats.beginTime, f);
}
- UsageStatsXml.write(stats, f);
- stats.mLastTimeSaved = f.getLastModifiedTime();
+ UsageStatsXml.write(f, stats);
+ stats.lastTimeSaved = f.getLastModifiedTime();
}
}
-
}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 1c20d5d..c38391a 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -19,8 +19,8 @@ package com.android.server.usage;
import android.Manifest;
import android.app.AppOpsManager;
import android.app.usage.IUsageStatsManager;
+import android.app.usage.UsageEvents;
import android.app.usage.UsageStats;
-import android.app.usage.UsageStatsManager;
import android.app.usage.UsageStatsManagerInternal;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -28,6 +28,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
+import android.content.pm.ParceledListSlice;
import android.content.pm.UserInfo;
import android.os.Binder;
import android.os.Environment;
@@ -47,6 +48,10 @@ import java.io.File;
import java.util.Arrays;
import java.util.List;
+/**
+ * A service that collects, aggregates, and persists application usage data.
+ * This data can be queried by apps that have been granted permission by AppOps.
+ */
public class UsageStatsService extends SystemService implements
UserUsageStatsService.StatsUpdatedListener {
static final String TAG = "UsageStatsService";
@@ -54,8 +59,9 @@ public class UsageStatsService extends SystemService implements
static final boolean DEBUG = false;
private static final long TEN_SECONDS = 10 * 1000;
private static final long TWENTY_MINUTES = 20 * 60 * 1000;
+ private static final long TWO_MINUTES = 2 * 60 * 1000;
private static final long FLUSH_INTERVAL = DEBUG ? TEN_SECONDS : TWENTY_MINUTES;
- static final int USAGE_STAT_RESULT_LIMIT = 10;
+ private static final long END_TIME_DELAY = DEBUG ? 0 : TWO_MINUTES;
// Handler message types.
static final int MSG_REPORT_EVENT = 0;
@@ -181,7 +187,7 @@ public class UsageStatsService extends SystemService implements
/**
* Called by the Binder stub.
*/
- void reportEvent(UsageStats.Event event, int userId) {
+ void reportEvent(UsageEvents.Event event, int userId) {
synchronized (mLock) {
final UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
service.reportEvent(event);
@@ -211,27 +217,37 @@ public class UsageStatsService extends SystemService implements
/**
* Called by the Binder stub.
*/
- UsageStats[] getUsageStats(int userId, int bucketType, long beginTime) {
- if (bucketType < 0 || bucketType >= UsageStatsManager.BUCKET_COUNT) {
- return UsageStats.EMPTY_STATS;
- }
-
+ List<UsageStats> queryUsageStats(int userId, int bucketType, long beginTime, long endTime) {
final long timeNow = System.currentTimeMillis();
if (beginTime > timeNow) {
- return UsageStats.EMPTY_STATS;
+ return null;
}
synchronized (mLock) {
UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
- return service.getUsageStats(bucketType, beginTime);
+ return service.queryUsageStats(bucketType, beginTime, endTime);
}
}
/**
* Called by the Binder stub.
*/
- UsageStats.Event[] getEvents(int userId, long time) {
- return UsageStats.Event.EMPTY_EVENTS;
+ UsageEvents queryEvents(int userId, long beginTime, long endTime) {
+ final long timeNow = System.currentTimeMillis();
+
+ // Adjust the endTime so that we don't query for the latest events.
+ // This is to prevent apps from making decision based on what app launched them,
+ // etc.
+ endTime = Math.min(endTime, timeNow - END_TIME_DELAY);
+
+ if (beginTime > endTime) {
+ return null;
+ }
+
+ synchronized (mLock) {
+ UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
+ return service.queryEvents(beginTime, endTime);
+ }
}
private void flushToDiskLocked() {
@@ -253,7 +269,7 @@ public class UsageStatsService extends SystemService implements
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_REPORT_EVENT:
- reportEvent((UsageStats.Event) msg.obj, msg.arg1);
+ reportEvent((UsageEvents.Event) msg.obj, msg.arg1);
break;
case MSG_FLUSH_TO_DISK:
@@ -286,30 +302,32 @@ public class UsageStatsService extends SystemService implements
}
@Override
- public UsageStats[] getStatsSince(int bucketType, long time, String callingPackage) {
+ public ParceledListSlice<UsageStats> queryUsageStats(int bucketType, long beginTime,
+ long endTime, String callingPackage) {
if (!hasPermission(callingPackage)) {
- return UsageStats.EMPTY_STATS;
+ return null;
}
final int userId = UserHandle.getCallingUserId();
final long token = Binder.clearCallingIdentity();
try {
- return getUsageStats(userId, bucketType, time);
+ return new ParceledListSlice<>(UsageStatsService.this.queryUsageStats(
+ userId, bucketType, beginTime, endTime));
} finally {
Binder.restoreCallingIdentity(token);
}
}
@Override
- public UsageStats.Event[] getEventsSince(long time, String callingPackage) {
+ public UsageEvents queryEvents(long beginTime, long endTime, String callingPackage) {
if (!hasPermission(callingPackage)) {
- return UsageStats.Event.EMPTY_EVENTS;
+ return null;
}
final int userId = UserHandle.getCallingUserId();
final long token = Binder.clearCallingIdentity();
try {
- return getEvents(userId, time);
+ return UsageStatsService.this.queryEvents(userId, beginTime, endTime);
} finally {
Binder.restoreCallingIdentity(token);
}
@@ -326,8 +344,15 @@ public class UsageStatsService extends SystemService implements
@Override
public void reportEvent(ComponentName component, int userId,
long timeStamp, int eventType) {
- UsageStats.Event event = new UsageStats.Event(component.getPackageName(), timeStamp,
- eventType);
+ if (component == null) {
+ Slog.w(TAG, "Event reported without a component name");
+ return;
+ }
+
+ UsageEvents.Event event = new UsageEvents.Event();
+ event.mComponent = component;
+ event.mTimeStamp = timeStamp;
+ event.mEventType = eventType;
mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsUtils.java b/services/usage/java/com/android/server/usage/UsageStatsUtils.java
index 887e016..dd5f3b9 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsUtils.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsUtils.java
@@ -28,7 +28,7 @@ final class UsageStatsUtils {
/**
* Truncates the date to the given UsageStats bucket. For example, if the bucket is
- * {@link UsageStatsManager#YEARLY_BUCKET}, the date is truncated to the 1st day of the year,
+ * {@link UsageStatsManager#INTERVAL_YEARLY}, the date is truncated to the 1st day of the year,
* with the time set to 00:00:00.
*
* @param bucket The UsageStats bucket to truncate to.
@@ -41,19 +41,19 @@ final class UsageStatsUtils {
cal.set(Calendar.MILLISECOND, 0);
switch (bucket) {
- case UsageStatsManager.YEARLY_BUCKET:
+ case UsageStatsManager.INTERVAL_YEARLY:
cal.set(Calendar.DAY_OF_YEAR, 0);
break;
- case UsageStatsManager.MONTHLY_BUCKET:
+ case UsageStatsManager.INTERVAL_MONTHLY:
cal.set(Calendar.DAY_OF_MONTH, 0);
break;
- case UsageStatsManager.WEEKLY_BUCKET:
+ case UsageStatsManager.INTERVAL_WEEKLY:
cal.set(Calendar.DAY_OF_WEEK, 0);
break;
- case UsageStatsManager.DAILY_BUCKET:
+ case UsageStatsManager.INTERVAL_DAILY:
break;
default:
diff --git a/services/usage/java/com/android/server/usage/UsageStatsXml.java b/services/usage/java/com/android/server/usage/UsageStatsXml.java
index 78f89d0..48881d0 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsXml.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsXml.java
@@ -16,8 +16,6 @@
package com.android.server.usage;
-import android.app.usage.PackageUsageStats;
-import android.app.usage.UsageStats;
import android.util.AtomicFile;
import android.util.Slog;
import android.util.Xml;
@@ -32,17 +30,19 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.net.ProtocolException;
public class UsageStatsXml {
private static final String TAG = "UsageStatsXml";
private static final int CURRENT_VERSION = 1;
+ private static final String USAGESTATS_TAG = "usagestats";
+ private static final String VERSION_ATTR = "version";
- public static UsageStats read(AtomicFile file) throws IOException {
+ public static void read(AtomicFile file, IntervalStats statsOut) throws IOException {
try {
FileInputStream in = file.openRead();
try {
- return read(in);
+ read(in, statsOut);
+ statsOut.lastTimeSaved = file.getLastModifiedTime();
} finally {
try {
in.close();
@@ -56,17 +56,19 @@ public class UsageStatsXml {
}
}
- private static final String USAGESTATS_TAG = "usagestats";
- private static final String VERSION_ATTR = "version";
- private static final String BEGIN_TIME_ATTR = "beginTime";
- private static final String END_TIME_ATTR = "endTime";
- private static final String PACKAGE_TAG = "package";
- private static final String NAME_ATTR = "name";
- private static final String TOTAL_TIME_ACTIVE_ATTR = "totalTimeActive";
- private static final String LAST_TIME_ACTIVE_ATTR = "lastTimeActive";
- private static final String LAST_EVENT_ATTR = "lastEvent";
+ public static void write(AtomicFile file, IntervalStats stats) throws IOException {
+ FileOutputStream fos = file.startWrite();
+ try {
+ write(fos, stats);
+ file.finishWrite(fos);
+ fos = null;
+ } finally {
+ // When fos is null (successful write), this will no-op
+ file.failWrite(fos);
+ }
+ }
- public static UsageStats read(InputStream in) throws IOException {
+ private static void read(InputStream in, IntervalStats statsOut) throws IOException {
XmlPullParser parser = Xml.newPullParser();
try {
parser.setInput(in, "utf-8");
@@ -75,7 +77,9 @@ public class UsageStatsXml {
try {
switch (Integer.parseInt(versionStr)) {
case 1:
- return loadVersion1(parser);
+ UsageStatsXmlV1.read(parser, statsOut);
+ break;
+
default:
Slog.e(TAG, "Unrecognized version " + versionStr);
throw new IOException("Unrecognized version " + versionStr);
@@ -90,70 +94,15 @@ public class UsageStatsXml {
}
}
- private static UsageStats loadVersion1(XmlPullParser parser)
- throws IOException, XmlPullParserException {
- long beginTime = XmlUtils.readLongAttribute(parser, BEGIN_TIME_ATTR);
- long endTime = XmlUtils.readLongAttribute(parser, END_TIME_ATTR);
- UsageStats stats = UsageStats.create(beginTime, endTime);
-
- XmlUtils.nextElement(parser);
-
- while (parser.getEventType() != XmlPullParser.END_DOCUMENT) {
- if (parser.getName().equals(PACKAGE_TAG)) {
- String name = parser.getAttributeValue(null, NAME_ATTR);
- if (name == null) {
- throw new ProtocolException("no " + NAME_ATTR + " attribute present");
- }
-
- PackageUsageStats pkgStats = stats.getOrCreatePackageUsageStats(name);
- pkgStats.mTotalTimeSpent = XmlUtils.readLongAttribute(parser,
- TOTAL_TIME_ACTIVE_ATTR);
- pkgStats.mLastTimeUsed = XmlUtils.readLongAttribute(parser, LAST_TIME_ACTIVE_ATTR);
- pkgStats.mLastEvent = XmlUtils.readIntAttribute(parser, LAST_EVENT_ATTR);
- }
-
- // TODO(adamlesinski): Read in events here if there are any.
-
- XmlUtils.skipCurrentTag(parser);
- }
- return stats;
- }
-
- public static void write(UsageStats stats, AtomicFile file) throws IOException {
- FileOutputStream fos = file.startWrite();
- try {
- write(stats, fos);
- file.finishWrite(fos);
- fos = null;
- } finally {
- // When fos is null (successful write), this will no-op
- file.failWrite(fos);
- }
- }
-
- public static void write(UsageStats stats, OutputStream out) throws IOException {
+ private static void write(OutputStream out, IntervalStats stats) throws IOException {
FastXmlSerializer xml = new FastXmlSerializer();
xml.setOutput(out, "utf-8");
xml.startDocument("utf-8", true);
xml.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true);
xml.startTag(null, USAGESTATS_TAG);
xml.attribute(null, VERSION_ATTR, Integer.toString(CURRENT_VERSION));
- xml.attribute(null, BEGIN_TIME_ATTR, Long.toString(stats.mBeginTimeStamp));
- xml.attribute(null, END_TIME_ATTR, Long.toString(stats.mEndTimeStamp));
-
- // Body of the stats
- final int pkgCount = stats.getPackageCount();
- for (int i = 0; i < pkgCount; i++) {
- final PackageUsageStats pkgStats = stats.getPackage(i);
- xml.startTag(null, PACKAGE_TAG);
- xml.attribute(null, NAME_ATTR, pkgStats.mPackageName);
- xml.attribute(null, TOTAL_TIME_ACTIVE_ATTR, Long.toString(pkgStats.mTotalTimeSpent));
- xml.attribute(null, LAST_TIME_ACTIVE_ATTR, Long.toString(pkgStats.mLastTimeUsed));
- xml.attribute(null, LAST_EVENT_ATTR, Integer.toString(pkgStats.mLastEvent));
- xml.endTag(null, PACKAGE_TAG);
- }
- // TODO(adamlesinski): Write out events here if there are any.
+ UsageStatsXmlV1.write(xml, stats);
xml.endTag(null, USAGESTATS_TAG);
xml.endDocument();
diff --git a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
new file mode 100644
index 0000000..916601b
--- /dev/null
+++ b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
@@ -0,0 +1,183 @@
+/**
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.android.server.usage;
+
+import com.android.internal.util.FastXmlSerializer;
+import com.android.internal.util.XmlUtils;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.app.usage.TimeSparseArray;
+import android.app.usage.UsageEvents;
+import android.app.usage.UsageStats;
+import android.content.ComponentName;
+
+import java.io.IOException;
+import java.net.ProtocolException;
+
+/**
+ * UsageStats reader/writer for version 1 of the XML format.
+ */
+final class UsageStatsXmlV1 {
+ private static final String BEGIN_TIME_ATTR = "beginTime";
+ private static final String END_TIME_ATTR = "endTime";
+ private static final String PACKAGE_TAG = "package";
+ private static final String NAME_ATTR = "name";
+ private static final String TOTAL_TIME_ACTIVE_ATTR = "totalTimeActive";
+ private static final String LAST_TIME_ACTIVE_ATTR = "lastTimeActive";
+ private static final String LAST_EVENT_ATTR = "lastEvent";
+ private static final String EVENT_LOG_TAG = "event-log";
+ private static final String TYPE_ATTR = "type";
+ private static final String TIME_ATTR = "time";
+
+ private static UsageStats readNextUsageStats(XmlPullParser parser)
+ throws XmlPullParserException, IOException {
+ if (parser.getEventType() != XmlPullParser.START_TAG) {
+ XmlUtils.nextElement(parser);
+ }
+
+ if (parser.getEventType() != XmlPullParser.START_TAG ||
+ !parser.getName().equals(PACKAGE_TAG)) {
+ return null;
+ }
+
+ final String name = parser.getAttributeValue(null, NAME_ATTR);
+ if (name == null) {
+ throw new ProtocolException("no " + NAME_ATTR + " attribute present");
+ }
+
+ UsageStats stats = new UsageStats();
+ stats.mPackageName = name;
+ stats.mTotalTimeInForeground = XmlUtils.readLongAttribute(parser, TOTAL_TIME_ACTIVE_ATTR);
+ stats.mLastTimeUsed = XmlUtils.readLongAttribute(parser, LAST_TIME_ACTIVE_ATTR);
+ stats.mLastEvent = XmlUtils.readIntAttribute(parser, LAST_EVENT_ATTR);
+ XmlUtils.skipCurrentTag(parser);
+ return stats;
+ }
+
+ private static UsageEvents.Event readNextEvent(XmlPullParser parser, IntervalStats statsOut)
+ throws XmlPullParserException, IOException {
+ if (parser.getEventType() != XmlPullParser.START_TAG) {
+ XmlUtils.nextElement(parser);
+ }
+
+ if (parser.getEventType() != XmlPullParser.START_TAG ||
+ !parser.getName().equals(EVENT_LOG_TAG)) {
+ return null;
+ }
+
+ final String componentName = XmlUtils.readStringAttribute(parser, NAME_ATTR);
+ if (componentName == null) {
+ throw new ProtocolException("no " + NAME_ATTR + " attribute present");
+ }
+
+ ComponentName component = statsOut.getCachedComponentName(componentName);
+ if (component == null) {
+ throw new ProtocolException("ComponentName " + componentName + " is invalid");
+ }
+
+ UsageEvents.Event event = new UsageEvents.Event();
+ event.mComponent = component;
+ event.mEventType = XmlUtils.readIntAttribute(parser, TYPE_ATTR);
+ event.mTimeStamp = XmlUtils.readLongAttribute(parser, TIME_ATTR);
+ XmlUtils.skipCurrentTag(parser);
+ return event;
+ }
+
+ private static void writeUsageStats(FastXmlSerializer serializer, UsageStats stats)
+ throws IOException {
+ serializer.startTag(null, PACKAGE_TAG);
+ serializer.attribute(null, NAME_ATTR, stats.mPackageName);
+ serializer.attribute(null, TOTAL_TIME_ACTIVE_ATTR,
+ Long.toString(stats.mTotalTimeInForeground));
+ serializer.attribute(null, LAST_TIME_ACTIVE_ATTR, Long.toString(stats.mLastTimeUsed));
+ serializer.attribute(null, LAST_EVENT_ATTR, Integer.toString(stats.mLastEvent));
+ serializer.endTag(null, PACKAGE_TAG);
+ }
+
+ private static void writeEvent(FastXmlSerializer serializer, UsageEvents.Event event)
+ throws IOException {
+ serializer.startTag(null, EVENT_LOG_TAG);
+ serializer.attribute(null, NAME_ATTR, event.getComponent().flattenToString());
+ serializer.attribute(null, TYPE_ATTR, Integer.toString(event.getEventType()));
+ serializer.attribute(null, TIME_ATTR, Long.toString(event.getTimeStamp()));
+ serializer.endTag(null, EVENT_LOG_TAG);
+ }
+
+ /**
+ * Reads from the {@link XmlPullParser}, assuming that it is already on the
+ * <code><usagestats></code> tag.
+ *
+ * @param parser The parser from which to read events.
+ * @param statsOut The stats object to populate with the data from the XML file.
+ */
+ public static void read(XmlPullParser parser, IntervalStats statsOut)
+ throws XmlPullParserException, IOException {
+ statsOut.stats.clear();
+
+ if (statsOut.events != null) {
+ statsOut.events.clear();
+ }
+
+ statsOut.beginTime = XmlUtils.readLongAttribute(parser, BEGIN_TIME_ATTR);
+ statsOut.endTime = XmlUtils.readLongAttribute(parser, END_TIME_ATTR);
+ XmlUtils.nextElement(parser);
+
+ UsageStats pkgStats;
+ while ((pkgStats = readNextUsageStats(parser)) != null) {
+ pkgStats.mBeginTimeStamp = statsOut.beginTime;
+ pkgStats.mEndTimeStamp = statsOut.endTime;
+ statsOut.stats.put(pkgStats.mPackageName, pkgStats);
+ }
+
+ UsageEvents.Event event;
+ while ((event = readNextEvent(parser, statsOut)) != null) {
+ if (statsOut.events == null) {
+ statsOut.events = new TimeSparseArray<>();
+ }
+ statsOut.events.put(event.getTimeStamp(), event);
+ }
+ }
+
+ /**
+ * Writes the stats object to an XML file. The {@link FastXmlSerializer}
+ * has already written the <code><usagestats></code> tag, but attributes may still
+ * be added.
+ *
+ * @param serializer The serializer to which to write the stats data.
+ * @param stats The stats object to write to the XML file.
+ */
+ public static void write(FastXmlSerializer serializer, IntervalStats stats) throws IOException {
+ serializer.attribute(null, BEGIN_TIME_ATTR, Long.toString(stats.beginTime));
+ serializer.attribute(null, END_TIME_ATTR, Long.toString(stats.endTime));
+
+ final int statsCount = stats.stats.size();
+ for (int i = 0; i < statsCount; i++) {
+ writeUsageStats(serializer, stats.stats.valueAt(i));
+ }
+
+ if (stats.events != null) {
+ final int eventCount = stats.events.size();
+ for (int i = 0; i < eventCount; i++) {
+ writeEvent(serializer, stats.events.valueAt(i));
+ }
+ }
+ }
+
+ private UsageStatsXmlV1() {
+ }
+}
diff --git a/services/usage/java/com/android/server/usage/UserUsageStatsService.java b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
index d124188..2dfd0f6 100644
--- a/services/usage/java/com/android/server/usage/UserUsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
@@ -1,15 +1,36 @@
+/**
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
package com.android.server.usage;
-import android.app.usage.PackageUsageStats;
+import android.app.usage.TimeSparseArray;
+import android.app.usage.UsageEvents;
import android.app.usage.UsageStats;
import android.app.usage.UsageStatsManager;
+import android.content.ComponentName;
import android.util.ArraySet;
import android.util.Slog;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Calendar;
+import java.util.List;
/**
* A per-user UsageStatsService. All methods are meant to be called with the main lock held
@@ -21,7 +42,7 @@ class UserUsageStatsService {
private static final SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private final UsageStatsDatabase mDatabase;
- private final UsageStats[] mCurrentStats = new UsageStats[UsageStatsManager.BUCKET_COUNT];
+ private final IntervalStats[] mCurrentStats;
private boolean mStatsChanged = false;
private final Calendar mDailyExpiryDate;
private final StatsUpdatedListener mListener;
@@ -34,6 +55,7 @@ class UserUsageStatsService {
UserUsageStatsService(int userId, File usageStatsDir, StatsUpdatedListener listener) {
mDailyExpiryDate = Calendar.getInstance();
mDatabase = new UsageStatsDatabase(usageStatsDir);
+ mCurrentStats = new IntervalStats[UsageStatsManager.INTERVAL_COUNT];
mListener = listener;
mLogPrefix = "User[" + Integer.toString(userId) + "] ";
}
@@ -45,6 +67,8 @@ class UserUsageStatsService {
for (int i = 0; i < mCurrentStats.length; i++) {
mCurrentStats[i] = mDatabase.getLatestUsageStats(i);
if (mCurrentStats[i] == null) {
+ // Find out how many intervals we don't have data for.
+ // Ideally it should be all or none.
nullCount++;
}
}
@@ -66,85 +90,138 @@ class UserUsageStatsService {
// This may actually be today and we will rollover on the first event
// that is reported.
mDailyExpiryDate.setTimeInMillis(
- mCurrentStats[UsageStatsManager.DAILY_BUCKET].mBeginTimeStamp);
+ mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime);
mDailyExpiryDate.add(Calendar.DAY_OF_YEAR, 1);
- UsageStatsUtils.truncateDateTo(UsageStatsManager.DAILY_BUCKET, mDailyExpiryDate);
+ UsageStatsUtils.truncateDateTo(UsageStatsManager.INTERVAL_DAILY, mDailyExpiryDate);
Slog.i(TAG, mLogPrefix + "Rollover scheduled for "
+ sDateFormat.format(mDailyExpiryDate.getTime()));
}
// Now close off any events that were open at the time this was saved.
- for (UsageStats stat : mCurrentStats) {
- final int pkgCount = stat.getPackageCount();
+ for (IntervalStats stat : mCurrentStats) {
+ final int pkgCount = stat.stats.size();
for (int i = 0; i < pkgCount; i++) {
- PackageUsageStats pkgStats = stat.getPackage(i);
- if (pkgStats.mLastEvent == UsageStats.Event.MOVE_TO_FOREGROUND ||
- pkgStats.mLastEvent == UsageStats.Event.CONTINUE_PREVIOUS_DAY) {
- updateStats(stat, pkgStats.mPackageName, stat.mLastTimeSaved,
- UsageStats.Event.END_OF_DAY);
+ UsageStats pkgStats = stat.stats.valueAt(i);
+ if (pkgStats.mLastEvent == UsageEvents.Event.MOVE_TO_FOREGROUND ||
+ pkgStats.mLastEvent == UsageEvents.Event.CONTINUE_PREVIOUS_DAY) {
+ stat.update(pkgStats.mPackageName, stat.lastTimeSaved,
+ UsageEvents.Event.END_OF_DAY);
notifyStatsChanged();
}
}
}
}
- void reportEvent(UsageStats.Event event) {
+ void reportEvent(UsageEvents.Event event) {
if (DEBUG) {
- Slog.d(TAG, mLogPrefix + "Got usage event for " + event.packageName
- + "[" + event.timeStamp + "]: "
- + eventToString(event.eventType));
+ Slog.d(TAG, mLogPrefix + "Got usage event for " + event.getComponent().getPackageName()
+ + "[" + event.getTimeStamp() + "]: "
+ + eventToString(event.getEventType()));
}
- if (event.timeStamp >= mDailyExpiryDate.getTimeInMillis()) {
+ if (event.getTimeStamp() >= mDailyExpiryDate.getTimeInMillis()) {
// Need to rollover
rolloverStats();
}
- for (UsageStats stats : mCurrentStats) {
- updateStats(stats, event.packageName, event.timeStamp, event.eventType);
+ if (mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events == null) {
+ mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events = new TimeSparseArray<>();
+ }
+ mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events.put(event.getTimeStamp(), event);
+
+ for (IntervalStats stats : mCurrentStats) {
+ stats.update(event.getComponent().getPackageName(), event.getTimeStamp(),
+ event.getEventType());
}
notifyStatsChanged();
}
- UsageStats[] getUsageStats(int bucketType, long beginTime) {
- if (beginTime >= mCurrentStats[bucketType].mEndTimeStamp) {
+ List<UsageStats> queryUsageStats(int bucketType, long beginTime, long endTime) {
+ if (bucketType == UsageStatsManager.INTERVAL_BEST) {
+ bucketType = mDatabase.findBestFitBucket(beginTime, endTime);
+ }
+
+ if (bucketType < 0 || bucketType >= mCurrentStats.length) {
+ if (DEBUG) {
+ Slog.d(TAG, mLogPrefix + "Bad bucketType used " + bucketType);
+ }
+ return null;
+ }
+
+ if (beginTime >= mCurrentStats[bucketType].endTime) {
if (DEBUG) {
Slog.d(TAG, mLogPrefix + "Requesting stats after " + beginTime + " but latest is "
- + mCurrentStats[bucketType].mEndTimeStamp);
+ + mCurrentStats[bucketType].endTime);
}
// Nothing newer available.
- return UsageStats.EMPTY_STATS;
+ return null;
- } else if (beginTime >= mCurrentStats[bucketType].mBeginTimeStamp) {
+ } else if (beginTime >= mCurrentStats[bucketType].beginTime) {
if (DEBUG) {
- Slog.d(TAG, mLogPrefix + "Returning in-memory stats");
+ Slog.d(TAG, mLogPrefix + "Returning in-memory stats for bucket " + bucketType);
}
// Fast path for retrieving in-memory state.
- // TODO(adamlesinski): This copy just to parcel the object is wasteful.
- // It would be nice to parcel it here and send that back, but the Binder API
- // would need to change.
- return new UsageStats[] { new UsageStats(mCurrentStats[bucketType]) };
-
- } else {
- // Flush any changes that were made to disk before we do a disk query.
- persistActiveStats();
+ ArrayList<UsageStats> results = new ArrayList<>();
+ final int packageCount = mCurrentStats[bucketType].stats.size();
+ for (int i = 0; i < packageCount; i++) {
+ results.add(new UsageStats(mCurrentStats[bucketType].stats.valueAt(i)));
+ }
+ return results;
}
+ // Flush any changes that were made to disk before we do a disk query.
+ // If we're not grabbing the ongoing stats, no need to persist.
+ persistActiveStats();
+
if (DEBUG) {
Slog.d(TAG, mLogPrefix + "SELECT * FROM " + bucketType + " WHERE beginTime >= "
- + beginTime + " LIMIT " + UsageStatsService.USAGE_STAT_RESULT_LIMIT);
+ + beginTime + " AND endTime < " + endTime);
}
- final UsageStats[] results = mDatabase.getUsageStats(bucketType, beginTime,
- UsageStatsService.USAGE_STAT_RESULT_LIMIT);
-
+ final List<UsageStats> results = mDatabase.queryUsageStats(bucketType, beginTime, endTime);
if (DEBUG) {
- Slog.d(TAG, mLogPrefix + "Results: " + results.length);
+ Slog.d(TAG, mLogPrefix + "Results: " + results.size());
}
return results;
}
+ UsageEvents queryEvents(long beginTime, long endTime) {
+ if (endTime > mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime) {
+ if (beginTime > mCurrentStats[UsageStatsManager.INTERVAL_DAILY].endTime) {
+ return null;
+ }
+
+ TimeSparseArray<UsageEvents.Event> events =
+ mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events;
+ if (events == null) {
+ return null;
+ }
+
+ final int startIndex = events.closestIndexOnOrAfter(beginTime);
+ if (startIndex < 0) {
+ return null;
+ }
+
+ ArraySet<ComponentName> names = new ArraySet<>();
+ ArrayList<UsageEvents.Event> results = new ArrayList<>();
+ final int size = events.size();
+ for (int i = startIndex; i < size; i++) {
+ if (events.keyAt(i) >= endTime) {
+ break;
+ }
+ names.add(events.valueAt(i).getComponent());
+ results.add(events.valueAt(i));
+ }
+ ComponentName[] table = names.toArray(new ComponentName[names.size()]);
+ Arrays.sort(table);
+ return new UsageEvents(results, table);
+ }
+
+ // TODO(adamlesinski): Query the previous days.
+ return null;
+ }
+
void persistActiveStats() {
if (mStatsChanged) {
Slog.i(TAG, mLogPrefix + "Flushing usage stats to disk");
@@ -166,15 +243,15 @@ class UserUsageStatsService {
// Finish any ongoing events with an END_OF_DAY event. Make a note of which components
// need a new CONTINUE_PREVIOUS_DAY entry.
ArraySet<String> continuePreviousDay = new ArraySet<>();
- for (UsageStats stat : mCurrentStats) {
- final int pkgCount = stat.getPackageCount();
+ for (IntervalStats stat : mCurrentStats) {
+ final int pkgCount = stat.stats.size();
for (int i = 0; i < pkgCount; i++) {
- PackageUsageStats pkgStats = stat.getPackage(i);
- if (pkgStats.mLastEvent == UsageStats.Event.MOVE_TO_FOREGROUND ||
- pkgStats.mLastEvent == UsageStats.Event.CONTINUE_PREVIOUS_DAY) {
+ UsageStats pkgStats = stat.stats.valueAt(i);
+ if (pkgStats.mLastEvent == UsageEvents.Event.MOVE_TO_FOREGROUND ||
+ pkgStats.mLastEvent == UsageEvents.Event.CONTINUE_PREVIOUS_DAY) {
continuePreviousDay.add(pkgStats.mPackageName);
- updateStats(stat, pkgStats.mPackageName,
- mDailyExpiryDate.getTimeInMillis() - 1, UsageStats.Event.END_OF_DAY);
+ stat.update(pkgStats.mPackageName,
+ mDailyExpiryDate.getTimeInMillis() - 1, UsageEvents.Event.END_OF_DAY);
mStatsChanged = true;
}
}
@@ -187,10 +264,9 @@ class UserUsageStatsService {
final int continueCount = continuePreviousDay.size();
for (int i = 0; i < continueCount; i++) {
String name = continuePreviousDay.valueAt(i);
- for (UsageStats stat : mCurrentStats) {
- updateStats(stat, name,
- mCurrentStats[UsageStatsManager.DAILY_BUCKET].mBeginTimeStamp,
- UsageStats.Event.CONTINUE_PREVIOUS_DAY);
+ for (IntervalStats stat : mCurrentStats) {
+ stat.update(name, mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime,
+ UsageEvents.Event.CONTINUE_PREVIOUS_DAY);
mStatsChanged = true;
}
}
@@ -212,61 +288,67 @@ class UserUsageStatsService {
final long timeNow = System.currentTimeMillis();
Calendar tempCal = mDailyExpiryDate;
- for (int i = 0; i < mCurrentStats.length; i++) {
+ for (int bucketType = 0; bucketType < mCurrentStats.length; bucketType++) {
tempCal.setTimeInMillis(timeNow);
- UsageStatsUtils.truncateDateTo(i, tempCal);
+ UsageStatsUtils.truncateDateTo(bucketType, tempCal);
- if (mCurrentStats[i] != null &&
- mCurrentStats[i].mBeginTimeStamp == tempCal.getTimeInMillis()) {
+ if (mCurrentStats[bucketType] != null &&
+ mCurrentStats[bucketType].beginTime == tempCal.getTimeInMillis()) {
// These are the same, no need to load them (in memory stats are always newer
// than persisted stats).
continue;
}
- UsageStats[] stats = mDatabase.getUsageStats(i, timeNow, 1);
- if (stats != null && stats.length > 0) {
- mCurrentStats[i] = stats[stats.length - 1];
+ final long lastBeginTime = mDatabase.getLatestUsageStatsBeginTime(bucketType);
+ if (lastBeginTime >= tempCal.getTimeInMillis()) {
+ if (DEBUG) {
+ Slog.d(TAG, mLogPrefix + "Loading existing stats (" + lastBeginTime +
+ ") for bucket " + bucketType);
+ }
+ mCurrentStats[bucketType] = mDatabase.getLatestUsageStats(bucketType);
+ if (DEBUG) {
+ if (mCurrentStats[bucketType] != null) {
+ Slog.d(TAG, mLogPrefix + "Found " +
+ (mCurrentStats[bucketType].events == null ?
+ 0 : mCurrentStats[bucketType].events.size()) +
+ " events");
+ }
+ }
} else {
- mCurrentStats[i] = UsageStats.create(tempCal.getTimeInMillis(), timeNow);
+ mCurrentStats[bucketType] = null;
+ }
+
+ if (mCurrentStats[bucketType] == null) {
+ if (DEBUG) {
+ Slog.d(TAG, "Creating new stats (" + tempCal.getTimeInMillis() +
+ ") for bucket " + bucketType);
+
+ }
+ mCurrentStats[bucketType] = new IntervalStats();
+ mCurrentStats[bucketType].beginTime = tempCal.getTimeInMillis();
+ mCurrentStats[bucketType].endTime = timeNow;
}
}
mStatsChanged = false;
mDailyExpiryDate.setTimeInMillis(timeNow);
mDailyExpiryDate.add(Calendar.DAY_OF_YEAR, 1);
- UsageStatsUtils.truncateDateTo(UsageStatsManager.DAILY_BUCKET, mDailyExpiryDate);
+ UsageStatsUtils.truncateDateTo(UsageStatsManager.INTERVAL_DAILY, mDailyExpiryDate);
Slog.i(TAG, mLogPrefix + "Rollover scheduled for "
+ sDateFormat.format(mDailyExpiryDate.getTime()));
}
- private void updateStats(UsageStats stats, String packageName, long timeStamp,
- int eventType) {
- PackageUsageStats pkgStats = stats.getOrCreatePackageUsageStats(packageName);
-
- // TODO(adamlesinski): Ensure that we recover from incorrect event sequences
- // like double MOVE_TO_BACKGROUND, etc.
- if (eventType == UsageStats.Event.MOVE_TO_BACKGROUND ||
- eventType == UsageStats.Event.END_OF_DAY) {
- if (pkgStats.mLastEvent == UsageStats.Event.MOVE_TO_FOREGROUND ||
- pkgStats.mLastEvent == UsageStats.Event.CONTINUE_PREVIOUS_DAY) {
- pkgStats.mTotalTimeSpent += timeStamp - pkgStats.mLastTimeUsed;
- }
- }
- pkgStats.mLastEvent = eventType;
- pkgStats.mLastTimeUsed = timeStamp;
- stats.mEndTimeStamp = timeStamp;
- }
private static String eventToString(int eventType) {
switch (eventType) {
- case UsageStats.Event.NONE:
+ case UsageEvents.Event.NONE:
return "NONE";
- case UsageStats.Event.MOVE_TO_BACKGROUND:
+ case UsageEvents.Event.MOVE_TO_BACKGROUND:
return "MOVE_TO_BACKGROUND";
- case UsageStats.Event.MOVE_TO_FOREGROUND:
+ case UsageEvents.Event.MOVE_TO_FOREGROUND:
return "MOVE_TO_FOREGROUND";
- case UsageStats.Event.END_OF_DAY:
+ case UsageEvents.Event.END_OF_DAY:
return "END_OF_DAY";
- case UsageStats.Event.CONTINUE_PREVIOUS_DAY:
+ case UsageEvents.Event.CONTINUE_PREVIOUS_DAY:
return "CONTINUE_PREVIOUS_DAY";
default:
return "UNKNOWN";
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java
index 55cb8b1..0a54c71 100644
--- a/telecomm/java/android/telecomm/Call.java
+++ b/telecomm/java/android/telecomm/Call.java
@@ -70,7 +70,9 @@ public final class Call {
public static final int STATE_PRE_DIAL_WAIT = 8;
/**
- * The state of an outgoing {@code Call}, before Telecomm broadcast intent has returned.
+ * The initial state of an outgoing {@code Call}.
+ * Common transitions are to {@link #STATE_DIALING} state for a successful call or
+ * {@link #STATE_DISCONNECTED} if it failed.
*/
public static final int STATE_CONNECTING = 9;
diff --git a/telecomm/java/android/telecomm/CallState.java b/telecomm/java/android/telecomm/CallState.java
index cfa78d4..0ca4840 100644
--- a/telecomm/java/android/telecomm/CallState.java
+++ b/telecomm/java/android/telecomm/CallState.java
@@ -32,8 +32,9 @@ public enum CallState {
NEW,
/**
- * Indicates an outgoing call has been initiated and is waiting for the broadcast intent to
- * return and provide call details before proceeding.
+ * The initial state of an outgoing {@code Call}.
+ * Common transitions are to {@link #DIALING} state for a successful call or
+ * {@link #DISCONNECTED} if it failed.
*/
CONNECTING,
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index 5e6bf87..34d35bf 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecomm/ConnectionService.java
@@ -1073,7 +1073,7 @@ public abstract class ConnectionService extends Service {
// To be implemented by subclass.
}
- /**te
+ /**
* Provides a response to a request to change the current call session video
* properties.
* This is in response to a request the InCall UI has received via
@@ -1139,8 +1139,8 @@ public abstract class ConnectionService extends Service {
* @param requestedProfile The original request which was sent to the remote device.
* @param responseProfile The actual profile changes made by the remote device.
*/
- public void receiveSessionModifyResponse(int status,
- VideoCallProfile requestedProfile, VideoCallProfile responseProfile) {
+ public void receiveSessionModifyResponse(
+ int status, VideoCallProfile requestedProfile, VideoCallProfile responseProfile) {
if (mVideoCallListener != null) {
try {
mVideoCallListener.receiveSessionModifyResponse(
diff --git a/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl b/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl
index a71ab0a..1a8f68e 100644
--- a/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl
@@ -19,14 +19,14 @@ package com.android.internal.telecomm;
import android.telecomm.CallCameraCapabilities;
import android.telecomm.VideoCallProfile;
- /**
- * Internal definition of the a callback interface, used for an InCallUi to respond to video
- * telephony changes.
- *
- * @see android.telecomm.InCallService.VideoCall.Listener
- *
- * {@hide}
- */
+/**
+ * Internal definition of a callback interface, used for an InCallUi to respond to video telephony
+ * changes.
+ *
+ * @see android.telecomm.InCallService.VideoCall.Listener
+ *
+ * {@hide}
+ */
oneway interface IVideoCallCallback {
void receiveSessionModifyRequest(in VideoCallProfile videoCallProfile);
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index 5f2ff36..ba4cb01 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -19,6 +19,7 @@ package com.android.ims.internal;
import com.android.ims.ImsCallProfile;
import com.android.ims.ImsStreamMediaProfile;
import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsVideoCallProvider;
/**
* An IMS session that is associated with a SIP dialog which is established from/to
@@ -216,4 +217,11 @@ interface IImsCallSession {
* @param ussdMessage USSD message to send
*/
void sendUssd(String ussdMessage);
+
+ /**
+ * Returns a binder for the video call provider implementation contained within the IMS service
+ * process. This binder is used by the VideoCallProvider subclass in Telephony which
+ * intermediates between the propriety implementation and Telecomm/InCall.
+ */
+ IImsVideoCallProvider getVideoCallProvider();
}
diff --git a/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl b/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl
new file mode 100644
index 0000000..6b8ec52
--- /dev/null
+++ b/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.ims.internal;
+
+import android.telecomm.CallCameraCapabilities;
+import android.telecomm.VideoCallProfile;
+
+/**
+ * Internal remote interface for IMS's video call provider.
+ *
+ * At least initially, this aidl mirrors telecomm's {@link VideoCallCallback}. We created a
+ * separate aidl interface for invoking callbacks in Telephony from the IMS Service to without
+ * accessing internal interfaces. See {@link IImsVideoCallProvider} for additional detail.
+ *
+ * @see android.telecomm.internal.IVideoCallCallback
+ * @see android.telecomm.VideoCallImpl
+ *
+ * {@hide}
+ */
+oneway interface IImsVideoCallCallback {
+ void receiveSessionModifyRequest(in VideoCallProfile videoCallProfile);
+
+ void receiveSessionModifyResponse(int status, in VideoCallProfile requestedProfile,
+ in VideoCallProfile responseProfile);
+
+ void handleCallSessionEvent(int event);
+
+ void changePeerDimensions(int width, int height);
+
+ void changeCallDataUsage(int dataUsage);
+
+ void changeCameraCapabilities(in CallCameraCapabilities callCameraCapabilities);
+}
diff --git a/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl b/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl
new file mode 100644
index 0000000..f8389ec
--- /dev/null
+++ b/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.ims.internal;
+
+import android.view.Surface;
+import android.telecomm.VideoCallProfile;
+
+import com.android.ims.internal.IImsVideoCallCallback;
+
+/**
+ * Internal remote interface for IMS's video call provider.
+ *
+ * At least initially, this aidl mirrors telecomm's {@link IVideoCallProvider}. We created a
+ * separate aidl interface even though the methods and parameters are same because the
+ * {@link IVideoCallProvider} was specifically created as a binder for inter-process communication
+ * between Telecomm and Telephony.
+ *
+ * We don't want to use the same aidl in other places for communication, namely communication
+ * between Telephony and the IMS Service, even if that communication may be for similar methods.
+ * This decouples the communication among these processes. Similarly, third parties implementing a
+ * video call provider will not have the benefit of accessing the internal
+ * {@link IVideoCallProvider} aidl for interprocess communication.
+ *
+ * @see android.telecomm.internal.IVideoCallProvider
+ * @see android.telecomm.VideoCallProvider
+ * @hide
+ */
+oneway interface IImsVideoCallProvider {
+ void setCallback(IImsVideoCallCallback callback);
+
+ void setCamera(String cameraId);
+
+ void setPreviewSurface(in Surface surface);
+
+ void setDisplaySurface(in Surface surface);
+
+ void setDeviceOrientation(int rotation);
+
+ void setZoom(float value);
+
+ void sendSessionModifyRequest(in VideoCallProfile reqProfile);
+
+ void sendSessionModifyResponse(in VideoCallProfile responseProfile);
+
+ void requestCameraCapabilities();
+
+ void requestCallDataUsage();
+
+ void setPauseImage(String uri);
+}
diff --git a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
index dfb8070..a209d6c 100644
--- a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
@@ -22,6 +22,7 @@ import android.app.ActivityManager.ProcessErrorStateInfo;
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
import android.app.IActivityManager.WaitResult;
+import android.app.UiAutomation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -72,6 +73,18 @@ public class AppLaunch extends InstrumentationTestCase {
private Bundle mResult = new Bundle();
private Set<String> mRequiredAccounts;
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_FREEZE_0);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_UNFREEZE);
+ super.tearDown();
+ }
+
public void testMeasureStartUpTime() throws RemoteException, NameNotFoundException {
InstrumentationTestRunner instrumentation =
(InstrumentationTestRunner)getInstrumentation();
diff --git a/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java b/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
index 051ed0e..f582a91 100644
--- a/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
+++ b/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
@@ -20,6 +20,7 @@ import android.app.ActivityManager.ProcessErrorStateInfo;
import android.app.ActivityManager.RunningAppProcessInfo;
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
+import android.app.UiAutomation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -67,6 +68,18 @@ public class MemoryUsageTest extends InstrumentationTestCase {
private Set<String> mPersistentProcesses;
private IActivityManager mAm;
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_FREEZE_0);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ getInstrumentation().getUiAutomation().setRotation(UiAutomation.ROTATION_UNFREEZE);
+ super.tearDown();
+ }
+
public void testMemory() {
MemoryUsageInstrumentation instrumentation =
(MemoryUsageInstrumentation) getInstrumentation();
diff --git a/tests/UsageStatsTest/AndroidManifest.xml b/tests/UsageStatsTest/AndroidManifest.xml
index fac5810..589674a 100644
--- a/tests/UsageStatsTest/AndroidManifest.xml
+++ b/tests/UsageStatsTest/AndroidManifest.xml
@@ -13,5 +13,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
+
+ <activity android:name=".UsageLogActivity" />
</application>
</manifest>
diff --git a/tests/UsageStatsTest/res/menu/main.xml b/tests/UsageStatsTest/res/menu/main.xml
new file mode 100644
index 0000000..e781058
--- /dev/null
+++ b/tests/UsageStatsTest/res/menu/main.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/log"
+ android:title="View Log"/>
+</menu>
diff --git a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
new file mode 100644
index 0000000..5d8fc9e
--- /dev/null
+++ b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.android.tests.usagestats;
+
+import android.app.ListActivity;
+import android.app.usage.UsageEvents;
+import android.app.usage.UsageStatsManager;
+import android.content.Context;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+public class UsageLogActivity extends ListActivity implements Runnable {
+ private static final long USAGE_STATS_PERIOD = 1000 * 60 * 60 * 24 * 14;
+
+ private UsageStatsManager mUsageStatsManager;
+ private Adapter mAdapter;
+ private Handler mHandler = new Handler();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mUsageStatsManager = (UsageStatsManager) getSystemService(Context.USAGE_STATS_SERVICE);
+ mAdapter = new Adapter();
+ setListAdapter(mAdapter);
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ run();
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ mHandler.removeCallbacks(this);
+ }
+
+ @Override
+ public void run() {
+ long now = System.currentTimeMillis();
+ long beginTime = now - USAGE_STATS_PERIOD;
+ UsageEvents events = mUsageStatsManager.queryEvents(beginTime, now);
+ mAdapter.update(events);
+ mHandler.postDelayed(this, 1000 * 5);
+ }
+
+ private class Adapter extends BaseAdapter {
+
+ private final ArrayList<UsageEvents.Event> mEvents = new ArrayList<>();
+
+ public void update(UsageEvents results) {
+ mEvents.clear();
+ while (results.hasNextEvent()) {
+ UsageEvents.Event event = new UsageEvents.Event();
+ results.getNextEvent(event);
+ mEvents.add(event);
+ }
+ notifyDataSetChanged();
+ }
+
+ @Override
+ public int getCount() {
+ return mEvents.size();
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return mEvents.get(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ final ViewHolder holder;
+ if (convertView == null) {
+ convertView = LayoutInflater.from(UsageLogActivity.this)
+ .inflate(R.layout.row_item, parent, false);
+ holder = new ViewHolder();
+ holder.packageName = (TextView) convertView.findViewById(android.R.id.text1);
+ holder.state = (TextView) convertView.findViewById(android.R.id.text2);
+ convertView.setTag(holder);
+ } else {
+ holder = (ViewHolder) convertView.getTag();
+ }
+
+ holder.packageName.setText(mEvents.get(position).getComponent().toShortString());
+ String state;
+ switch (mEvents.get(position).getEventType()) {
+ case UsageEvents.Event.MOVE_TO_FOREGROUND:
+ state = "Foreground";
+ break;
+
+ case UsageEvents.Event.MOVE_TO_BACKGROUND:
+ state = "Background";
+ break;
+
+ default:
+ state = "Unknown: " + mEvents.get(position).getEventType();
+ break;
+ }
+ holder.state.setText(state);
+ return convertView;
+ }
+ }
+
+ static class ViewHolder {
+ public TextView packageName;
+ public TextView state;
+ }
+}
diff --git a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageStatsActivity.java b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageStatsActivity.java
index 73143c5..b6591bd 100644
--- a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageStatsActivity.java
+++ b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageStatsActivity.java
@@ -17,31 +17,34 @@
package com.android.tests.usagestats;
import android.app.ListActivity;
-import android.app.usage.PackageUsageStats;
import android.app.usage.UsageStats;
import android.app.usage.UsageStatsManager;
import android.content.Context;
+import android.content.Intent;
import android.os.Bundle;
import android.text.format.DateUtils;
+import android.util.ArrayMap;
import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
public class UsageStatsActivity extends ListActivity {
-
+ private static final long USAGE_STATS_PERIOD = 1000 * 60 * 60 * 24 * 14;
private UsageStatsManager mUsageStatsManager;
private Adapter mAdapter;
- private Comparator<PackageUsageStats> mComparator = new Comparator<PackageUsageStats>() {
+ private Comparator<UsageStats> mComparator = new Comparator<UsageStats>() {
@Override
- public int compare(PackageUsageStats o1, PackageUsageStats o2) {
- return Long.compare(o2.getTotalTimeSpent(), o1.getTotalTimeSpent());
+ public int compare(UsageStats o1, UsageStats o2) {
+ return Long.compare(o2.getTotalTimeInForeground(), o1.getTotalTimeInForeground());
}
};
@@ -50,35 +53,54 @@ public class UsageStatsActivity extends ListActivity {
super.onCreate(savedInstanceState);
mUsageStatsManager = (UsageStatsManager) getSystemService(Context.USAGE_STATS_SERVICE);
mAdapter = new Adapter();
- updateAdapter();
setListAdapter(mAdapter);
}
@Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.main, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.log:
+ startActivity(new Intent(this, UsageLogActivity.class));
+ return true;
+
+ default:
+ return super.onOptionsItemSelected(item);
+ }
+ }
+
+ @Override
protected void onResume() {
super.onResume();
updateAdapter();
}
private void updateAdapter() {
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.DAY_OF_YEAR, -14);
- UsageStats stats = mUsageStatsManager.getRecentStatsSince(cal.getTimeInMillis());
+ long now = System.currentTimeMillis();
+ long beginTime = now - USAGE_STATS_PERIOD;
+ ArrayMap<String, UsageStats> stats = mUsageStatsManager.queryAndAggregateUsageStats(
+ beginTime, now);
mAdapter.update(stats);
}
private class Adapter extends BaseAdapter {
- private ArrayList<PackageUsageStats> mStats = new ArrayList<>();
+ private ArrayList<UsageStats> mStats = new ArrayList<>();
- public void update(UsageStats stats) {
+ public void update(ArrayMap<String, UsageStats> stats) {
mStats.clear();
if (stats == null) {
return;
}
- final int packageCount = stats.getPackageCount();
+ final int packageCount = stats.size();
for (int i = 0; i < packageCount; i++) {
- mStats.add(stats.getPackage(i));
+ mStats.add(stats.valueAt(i));
}
Collections.sort(mStats, mComparator);
@@ -116,7 +138,7 @@ public class UsageStatsActivity extends ListActivity {
holder.packageName.setText(mStats.get(position).getPackageName());
holder.usageTime.setText(DateUtils.formatDuration(
- mStats.get(position).getTotalTimeSpent()));
+ mStats.get(position).getTotalTimeInForeground()));
return convertView;
}
}