am a2d65108: Merge "Latest UX asset drop." into klp-dev

* commit 'a2d65108dd32a0836fe08f0c72efdd5c727dad44':
  Latest UX asset drop.
This commit is contained in:
Dave Langemak
2013-09-18 22:04:53 -07:00
committed by Android Git Automerger
52 changed files with 37 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 973 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -16,6 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <resources xmlns:android="http://schemas.android.com/apk/res/android">
<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>
<item name="android:windowBackground">@*android:drawable/dialog_full_holo_light</item> <item name="android:windowBackground">@*android:drawable/dialog_full_holo_light</item>
<item name="android:colorBackgroundCacheHint">@null</item> <item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item> <item name="android:windowIsTranslucent">true</item>

View File

@@ -29,5 +29,12 @@
<!-- Normally just a redirection, but this is used to make ourselves a <!-- Normally just a redirection, but this is used to make ourselves a
dialog on large tablets --> 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> </resources>

View File

@@ -781,7 +781,8 @@ public class DirectoryFragment extends Fragment {
iconMime.setImageDrawable( iconMime.setImageDrawable(
IconUtils.loadPackageIcon(context, docAuthority, docIcon)); IconUtils.loadPackageIcon(context, docAuthority, docIcon));
} else { } else {
iconMime.setImageDrawable(IconUtils.loadMimeIcon(context, docMimeType)); iconMime.setImageDrawable(IconUtils.loadMimeIcon(
context, docMimeType, docAuthority, docId, state.derivedMode));
} }
} }

View File

@@ -22,6 +22,7 @@ import android.content.pm.ProviderInfo;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.provider.DocumentsContract.Document; import android.provider.DocumentsContract.Document;
import android.util.Log;
import com.google.android.collect.Maps; import com.google.android.collect.Maps;
@@ -206,6 +207,27 @@ public class IconUtils {
return null; 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) { public static Drawable loadMimeIcon(Context context, String mimeType) {
final Resources res = context.getResources(); final Resources res = context.getResources();
@@ -236,8 +258,7 @@ public class IconUtils {
} else if ("video".equals(typeOnly)) { } else if ("video".equals(typeOnly)) {
return res.getDrawable(R.drawable.ic_doc_video); return res.getDrawable(R.drawable.ic_doc_video);
} else { } else {
// TODO: generic icon? return res.getDrawable(R.drawable.ic_doc_generic);
return null;
} }
} }
} }

View File

@@ -80,10 +80,10 @@ public class MimePredicate implements Predicate<DocumentInfo> {
} }
public static boolean mimeMatches(String filter, String test) { public static boolean mimeMatches(String filter, String test) {
if (filter == null || "*/*".equals(filter)) { if (test == null) {
return true;
} else if (test == null) {
return false; return false;
} else if (filter == null || "*/*".equals(filter)) {
return true;
} else if (filter.equals(test)) { } else if (filter.equals(test)) {
return true; return true;
} else if (filter.endsWith("/*")) { } else if (filter.endsWith("/*")) {