Hook up slice deep links

Device indexing might launch them on occassion.

Test: existing test passes
Test: launch deep link
Change-Id: Ie4d3cef2cc384ca809e74b27638d2c5a1d4d98a2
Fixes: 79435996
This commit is contained in:
Jason Monk
2018-05-15 16:23:49 -04:00
parent ee3142cc87
commit 284ca4f356

View File

@@ -45,7 +45,11 @@ public class SliceDeepLinkSpringBoard extends Activity {
// This shouldn't matter since the slice is shown instead of the device // This shouldn't matter since the slice is shown instead of the device
// index caring about the launch uri. // index caring about the launch uri.
Uri slice = Uri.parse(intent.getStringExtra(EXTRA_SLICE)); Uri slice = Uri.parse(intent.getStringExtra(EXTRA_SLICE));
Log.e(TAG, "Slice intent launched: " + slice); SlicesDatabaseAccessor slicesDatabaseAccessor = new SlicesDatabaseAccessor(this);
// Sadly have to block here because we don't know where to go.
final SliceData sliceData = slicesDatabaseAccessor.getSliceDataFromUri(slice);
Intent launchIntent = SliceBuilderUtils.getContentIntent(this, sliceData);
startActivity(launchIntent);
} else { } else {
startActivity(intent); startActivity(intent);
} }