diff options
author | Dave Langemak <dlangemak@google.com> | 2013-09-19 05:02:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-19 05:02:55 +0000 |
commit | a2d65108dd32a0836fe08f0c72efdd5c727dad44 (patch) | |
tree | ca5d0dd1998f20455675a5dabde7982276b4daea | |
parent | f1fc0ad39ed59b316b263ac36a742c41df11a6d8 (diff) | |
parent | 563ee0fbe99c234f3364044cb762a75abbbaa797 (diff) | |
download | frameworks_base-a2d65108dd32a0836fe08f0c72efdd5c727dad44.zip frameworks_base-a2d65108dd32a0836fe08f0c72efdd5c727dad44.tar.gz frameworks_base-a2d65108dd32a0836fe08f0c72efdd5c727dad44.tar.bz2 |
Merge "Latest UX asset drop." into klp-dev
52 files changed, 37 insertions, 7 deletions
diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.png Binary files differnew file mode 100644 index 0000000..a1e2b7f --- /dev/null +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_album.png diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.png Binary files differnew file mode 100644 index 0000000..68d973f --- /dev/null +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_generic.png diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png Binary files differindex c86b92d..7e2bef1 100644 --- a/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_doc_pdf.png diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.png Binary files differnew file mode 100644 index 0000000..7c9aee3 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_grid_folder.png diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder.png Binary files differindex 06adf31..490d7ca 100644 --- a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder.png +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_new_folder.png diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.png Binary files differnew file mode 100644 index 0000000..d49b58f --- /dev/null +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_menu_overflow.png diff --git a/packages/DocumentsUI/res/drawable-hdpi/ic_popout.png b/packages/DocumentsUI/res/drawable-hdpi/ic_popout.png Binary files differnew file mode 100644 index 0000000..f89f813 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-hdpi/ic_popout.png diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.png Binary files differnew file mode 100644 index 0000000..adf23f4 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_album.png diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.png Binary files differnew file mode 100644 index 0000000..f73ab71 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_generic.png diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png Binary files differindex ff51096..4fca711 100644 --- a/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png +++ b/packages/DocumentsUI/res/drawable-mdpi/ic_doc_pdf.png diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.png Binary files differnew file mode 100644 index 0000000..7cf9178 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-mdpi/ic_grid_folder.png diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.png Binary files differnew file mode 100644 index 0000000..795a28d --- /dev/null +++ b/packages/DocumentsUI/res/drawable-mdpi/ic_menu_overflow.png diff --git a/packages/DocumentsUI/res/drawable-mdpi/ic_popout.png b/packages/DocumentsUI/res/drawable-mdpi/ic_popout.png Binary files differnew file mode 100644 index 0000000..98a853f --- /dev/null +++ b/packages/DocumentsUI/res/drawable-mdpi/ic_popout.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert.png Binary files differindex d824bb0..7d1468a 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_dialog_alert.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.png Binary files differnew file mode 100644 index 0000000..29e009e --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_album.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.png Binary files differnew file mode 100644 index 0000000..82cf876 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_generic.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png Binary files differindex 518e591..3e94790 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_doc_pdf.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.png Binary files differnew file mode 100644 index 0000000..3344980 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_grid_folder.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png Binary files differindex 946e450..614b1e3 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_copy.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder.png Binary files differindex 4af42d4..f94d3f6 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_new_folder.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.png Binary files differnew file mode 100644 index 0000000..0603bbf --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_overflow.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png Binary files differindex bdd8e20..1cf6dca 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_share.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo.png Binary files differindex 34a0e33..0cadd92 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_undo.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png Binary files differindex c955fc3..8ec013c 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_grid.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png Binary files differindex a23c73a..45dd72f 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_menu_view_list.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_popout.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_popout.png Binary files differnew file mode 100644 index 0000000..3a33bce --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_popout.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download.png Binary files differindex f66739d..6f64d8c 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_download.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent.png Binary files differindex 7e24377..000a521 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_recent.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard.png Binary files differindex 0ce9f9f..223cff1 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_sdcard.png diff --git a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb.png b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb.png Binary files differindex dde7586..d77023b 100644 --- a/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb.png +++ b/packages/DocumentsUI/res/drawable-xhdpi/ic_root_usb.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert.png Binary files differindex 887b1b5..865f3a5 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_dialog_alert.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.png Binary files differnew file mode 100644 index 0000000..7515993 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_album.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.png Binary files differnew file mode 100644 index 0000000..c459556 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_generic.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png Binary files differindex dd94dda..cd46f79 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_doc_pdf.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.png Binary files differnew file mode 100644 index 0000000..86a74cd --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_grid_folder.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png Binary files differindex 2a0cfc2..1f72cce 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_copy.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder.png Binary files differindex fb40707..038a597 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_new_folder.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.png Binary files differnew file mode 100644 index 0000000..58f1381 --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_overflow.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png Binary files differindex 0a3ac2e..9084717 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_share.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo.png Binary files differindex fd0a194..eec1b95 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_undo.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png Binary files differindex 11ec8da..175a76c 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_grid.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png Binary files differindex ed3b0c5..07c7c02 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_menu_view_list.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout.png Binary files differnew file mode 100644 index 0000000..5f5a86f --- /dev/null +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_popout.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download.png Binary files differindex f22a94a..d68f9c5 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_download.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent.png Binary files differindex 09cac0e..d95ebb5 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_recent.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard.png Binary files differindex 5349252..cc27107 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_sdcard.png diff --git a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb.png b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb.png Binary files differindex 6deafc7..1562609 100644 --- a/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb.png +++ b/packages/DocumentsUI/res/drawable-xxhdpi/ic_root_usb.png diff --git a/packages/DocumentsUI/res/values-sw720dp/styles.xml b/packages/DocumentsUI/res/values-sw720dp/styles.xml index 4ff1c60..a581e08 100644 --- a/packages/DocumentsUI/res/values-sw720dp/styles.xml +++ b/packages/DocumentsUI/res/values-sw720dp/styles.xml @@ -16,6 +16,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Theme" parent="@android:style/Theme.Holo.Light"> + <item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item> <item name="android:windowBackground">@*android:drawable/dialog_full_holo_light</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:windowIsTranslucent">true</item> diff --git a/packages/DocumentsUI/res/values/styles.xml b/packages/DocumentsUI/res/values/styles.xml index 945e7ae..0c8f712 100644 --- a/packages/DocumentsUI/res/values/styles.xml +++ b/packages/DocumentsUI/res/values/styles.xml @@ -29,5 +29,12 @@ <!-- Normally just a redirection, but this is used to make ourselves a dialog on large tablets --> - <style name="Theme" parent="@android:style/Theme.Holo.Light" /> + <style name="Theme" parent="@android:style/Theme.Holo.Light"> + <item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item> + </style> + + <style name="DarkerOverflow" parent="@android:style/Widget.Holo.Light.ActionButton.Overflow"> + <item name="android:src">@drawable/ic_menu_overflow</item> + </style> + </resources> diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java index 5b6ec4d..4c2c99c 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java @@ -781,7 +781,8 @@ public class DirectoryFragment extends Fragment { iconMime.setImageDrawable( IconUtils.loadPackageIcon(context, docAuthority, docIcon)); } else { - iconMime.setImageDrawable(IconUtils.loadMimeIcon(context, docMimeType)); + iconMime.setImageDrawable(IconUtils.loadMimeIcon( + context, docMimeType, docAuthority, docId, state.derivedMode)); } } diff --git a/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java b/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java index 5caf9ba..1f7386c 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.Log; import com.google.android.collect.Maps; @@ -206,6 +207,27 @@ public class IconUtils { return null; } + public static Drawable loadMimeIcon( + Context context, String mimeType, String authority, String docId, int mode) { + final Resources res = context.getResources(); + + if (Document.MIME_TYPE_DIR.equals(mimeType)) { + // TODO: eventually move these hacky assets into that package + if ("com.android.providers.media.documents".equals(authority) + && docId.startsWith("album")) { + return res.getDrawable(R.drawable.ic_doc_album); + } + + if (mode == DocumentsActivity.State.MODE_GRID) { + return res.getDrawable(R.drawable.ic_grid_folder); + } else { + return res.getDrawable(R.drawable.ic_root_folder); + } + } + + return loadMimeIcon(context, mimeType); + } + public static Drawable loadMimeIcon(Context context, String mimeType) { final Resources res = context.getResources(); @@ -236,8 +258,7 @@ public class IconUtils { } else if ("video".equals(typeOnly)) { return res.getDrawable(R.drawable.ic_doc_video); } else { - // TODO: generic icon? - return null; + return res.getDrawable(R.drawable.ic_doc_generic); } } } diff --git a/packages/DocumentsUI/src/com/android/documentsui/MimePredicate.java b/packages/DocumentsUI/src/com/android/documentsui/MimePredicate.java index 2d96876..9df55a0 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/MimePredicate.java +++ b/packages/DocumentsUI/src/com/android/documentsui/MimePredicate.java @@ -80,10 +80,10 @@ public class MimePredicate implements Predicate<DocumentInfo> { } public static boolean mimeMatches(String filter, String test) { - if (filter == null || "*/*".equals(filter)) { - return true; - } else if (test == null) { + if (test == null) { return false; + } else if (filter == null || "*/*".equals(filter)) { + return true; } else if (filter.equals(test)) { return true; } else if (filter.endsWith("/*")) { |