Fix media controls notification showing disambiguation drawer

Use direct intent to MainActivity instead of deep link intent.

Backport of fix in https://github.com/OdyseeTeam/odysee-android/pull/212
This commit is contained in:
kt programs 2022-05-23 16:34:05 +08:00
parent 1e3a74cae1
commit 7649e9daac

View file

@ -2083,7 +2083,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
@Override
public PendingIntent createCurrentContentIntent(Player player) {
if (nowPlayingClaimUrl != null) {
Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(nowPlayingClaimUrl));
Intent launchIntent = new Intent(MainActivity.this, MainActivity.class);
launchIntent.setAction(Intent.ACTION_VIEW);
launchIntent.setData(Uri.parse(nowPlayingClaimUrl));
launchIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
return PendingIntent.getActivity(MainActivity.this, 0, launchIntent, 0);
}