Skip to content
This repository was archived by the owner on Sep 13, 2019. It is now read-only.

Commit 0574fc4

Browse files
author
Douglas Sigelbaum
committed
Merge branch 'master' of github.com:googlesamples/android-SliceViewer
2 parents 27f2735 + 3296afb commit 0574fc4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@
6666
android:authorities="com.example.android.sliceviewer"
6767
android:exported="true">
6868
<intent-filter>
69-
<action android:name="androidx.intent.SLICE_ACTION" />
69+
<action android:name="android.intent.action.VIEW" />
70+
71+
<category android:name="android.app.slice.category.SLICE" />
7072

71-
<category android:name="android.intent.category.DEFAULT" />
7273

7374
<data
7475
android:host="sliceviewer.android.example.com"

app/src/main/java/com/example/android/sliceviewer/provider/SampleSliceProvider.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@ class SampleSliceProvider : SliceProvider() {
4444
override fun onCreateSliceProvider() = true
4545

4646
override fun onMapIntentToUri(intent: Intent?): Uri {
47-
super.onMapIntentToUri(intent)
4847
val path = intent?.data?.path ?: ""
4948
return Uri.Builder()
5049
.scheme(ContentResolver.SCHEME_CONTENT)
5150
.authority(context.packageName)
52-
.appendPath(path)
51+
.path(path)
5352
.build()
5453
}
5554

0 commit comments

Comments
 (0)