From 3b92d2a5a471c0a6f5dfe4cf2d696b0775b032f9 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Mon, 18 Mar 2013 15:27:06 +0100 Subject: [PATCH] Fix bug in ActionBarSherlock.\nPick up torrent files from the download manager intents. --- .hgignore | 1 + android/AndroidManifest.xml | 18 ++++++++++++++++-- .../internal/view/menu/MenuBuilder.java | 6 ++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.hgignore b/.hgignore index 458cf85b..9f9b6982 100644 --- a/.hgignore +++ b/.hgignore @@ -6,3 +6,4 @@ syntax: glob bin/ gen/ lint.xml +.apt_generated/ diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 38125faf..d89752fc 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -18,8 +18,8 @@ --> @@ -70,8 +70,22 @@ + + + + + + + + + + + + + + diff --git a/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java b/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java index 179b8f03..10c74203 100644 --- a/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java +++ b/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java @@ -31,6 +31,7 @@ import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.util.SparseArray; @@ -353,6 +354,11 @@ public class MenuBuilder implements Menu { SparseArray viewStates = states.getSparseParcelableArray( getActionViewStatesKey()); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB && viewStates == null) { + // Fixes Issue #652 with sdk <= 2.3.6 + return; + } + final int itemCount = size(); for (int i = 0; i < itemCount; i++) { final MenuItem item = getItem(i);