Browse Source

Fix bug in ActionBarSherlock.\nPick up torrent files from the download manager intents.

pull/11/head
Eric Kok 12 years ago
parent
commit
3b92d2a5a4
  1. 1
      .hgignore
  2. 18
      android/AndroidManifest.xml
  3. 6
      external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java

1
.hgignore

@ -6,3 +6,4 @@ syntax: glob
bin/ bin/
gen/ gen/
lint.xml lint.xml
.apt_generated/

18
android/AndroidManifest.xml

@ -18,8 +18,8 @@
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.transdroid" package="org.transdroid"
android:versionName="1.1.12" android:versionName="1.1.13"
android:versionCode="154" android:versionCode="155"
android:installLocation="auto"> android:installLocation="auto">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" /> <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />
@ -70,8 +70,22 @@
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" android:pathPattern=".*\\.torrent" /> <data android:scheme="file" android:pathPattern=".*\\.torrent" />
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="application/x-bittorrent" />
<data android:scheme="content" android:mimeType="application/x-bittorrent" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="content" android:pathPattern=".*\\.torrent" />
</intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

6
external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java vendored

@ -31,6 +31,7 @@ import android.content.pm.ResolveInfo;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcelable; import android.os.Parcelable;
import android.util.SparseArray; import android.util.SparseArray;
@ -353,6 +354,11 @@ public class MenuBuilder implements Menu {
SparseArray<Parcelable> viewStates = states.getSparseParcelableArray( SparseArray<Parcelable> viewStates = states.getSparseParcelableArray(
getActionViewStatesKey()); 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(); final int itemCount = size();
for (int i = 0; i < itemCount; i++) { for (int i = 0; i < itemCount; i++) {
final MenuItem item = getItem(i); final MenuItem item = getItem(i);

Loading…
Cancel
Save