mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 11:09:49 +08:00
Remove support for ACTION_GET_CONTENT
As we have a document provider now we can remove ACTION_GET_CONTENT. "The ACTION_OPEN_DOCUMENT intent is only available on devices running Android 4.4 and higher. If you want your application to support ACTION_GET_CONTENT to accommodate devices that are running Android 4.3 and lower, you should disable the ACTION_GET_CONTENT intent filter in your manifest for devices running Android 4.4 or higher. A document provider and ACTION_GET_CONTENT should be considered mutually exclusive. If you support both of them simultaneously, your app will appear twice in the system picker UI, offering two different ways of accessing your stored data. This would be confusing for users." - http://developer.android.com/guide/topics/providers/document-provider.html#43
This commit is contained in:
@@ -73,31 +73,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.termux.filepicker.TermuxFilePickerActivity"
|
||||
android:label="@string/application_name"
|
||||
android:theme="@android:style/Theme.Material.Light.DarkActionBar"
|
||||
android:noHistory="true">
|
||||
<intent-filter>
|
||||
<!--
|
||||
http://stackoverflow.com/questions/6486716/using-intent-action-pick-for-specific-path
|
||||
"That said, you should consider ACTION_PICK deprecated. The modern action is ACTION_GET_CONTENT
|
||||
which is much better supported; you will find support of ACTION_PICK spotty and inconsistent.
|
||||
Unfortunately ACTION_GET_CONTENT also does not let you specify a directory."
|
||||
-->
|
||||
<action android:name="android.intent.action.GET_CONTENT" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.OPENABLE" />
|
||||
<data android:mimeType="*/*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider android:authorities="com.termux.filepicker.provider"
|
||||
android:readPermission="com.termux.filepicker.READ"
|
||||
android:exported="true"
|
||||
android:grantUriPermissions="true"
|
||||
android:name="com.termux.filepicker.TermuxFilePickerProvider" />
|
||||
|
||||
<provider
|
||||
android:name=".filepicker.TermuxDocumentsProvider"
|
||||
android:authorities="com.termux.documents"
|
||||
|
Reference in New Issue
Block a user