launch IITCm in singleTask mode, move let preferenceActivity handle plugin installation
This commit is contained in:
parent
c551c41609
commit
86bec261dc
@ -29,7 +29,7 @@
|
||||
android:name="com.cradle.iitc_mobile.IITC_Mobile"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize|uiMode"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop">
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
@ -72,6 +72,21 @@
|
||||
<data android:scheme="geo"/>
|
||||
</intent-filter>
|
||||
|
||||
<!-- Points to searchable meta data. -->
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.prefs.PreferenceActivity"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
|
||||
android:label="@string/activity_settings"/>
|
||||
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.prefs.PluginPreferenceActivity"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
|
||||
android:label="@string/activity_plugins">
|
||||
<!-- Handles external user plugins -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
@ -107,21 +122,8 @@
|
||||
android:pathPattern=".*\\.user.js"
|
||||
android:scheme="https"/>
|
||||
</intent-filter>
|
||||
|
||||
<!-- Points to searchable meta data. -->
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.prefs.PreferenceActivity"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
|
||||
android:label="@string/activity_settings"/>
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.prefs.PluginPreferenceActivity"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
|
||||
android:label="@string/activity_plugins"/>
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.share.ShareActivity"
|
||||
android:label="@string/activity_share"
|
||||
@ -146,6 +148,7 @@
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.share.SaveToFile"
|
||||
android:enabled="true"
|
||||
|
@ -266,15 +266,6 @@ public class IITC_Mobile extends Activity
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
// intent MIME type and uri path may be null
|
||||
final String type = intent.getType() == null ? "" : intent.getType();
|
||||
final String path = uri.getPath() == null ? "" : uri.getPath();
|
||||
if (path.endsWith(".user.js") || type.contains("javascript")) {
|
||||
final Intent prefIntent = new Intent(this, PluginPreferenceActivity.class);
|
||||
prefIntent.setDataAndType(uri, intent.getType());
|
||||
startActivity(prefIntent);
|
||||
}
|
||||
}
|
||||
|
||||
if (Intent.ACTION_SEARCH.equals(action)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user