Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbf31902 authored by Etienne Ruffieux's avatar Etienne Ruffieux
Browse files

Add empty activity for Pandora MediaPlayer

AVRCP Browsing now requires the package to have an Activity intent with audio
MIME type.

Bug: 319275147
Test: atest pts-bot:AVRCP/TG
Flag: Exempt testing
Change-Id: I5bbc943046cc5120f9dcb40bb5cf1422c16d0b88
parent bf455766
Loading
Loading
Loading
Loading
+26 −21
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.pandora">

    <application>
        <uses-library android:name="android.test.runner" />

@@ -27,8 +26,7 @@
            </intent-filter>
        </service>

      <service
          android:name=".Hfp$PandoraInCallService"
        <service android:name=".Hfp$PandoraInCallService"
                android:permission="android.permission.BIND_INCALL_SERVICE"
                android:exported="true">
            <intent-filter>
@@ -36,6 +34,13 @@
            </intent-filter>
        </service>

        <activity android:name=".MediaPlayerActivity"
                android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <data android:mimeType="audio/*"/>
            </intent-filter>
        </activity>
    </application>

    <uses-permission android:name="android.permission.INTERNET" />
+36 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.pandora

import android.app.Activity
import android.os.Bundle

/**
 * A skeleton class that provides empty implementations for Activity class.
 *
 * <p>This is needed to test AVRCP Browsing as players without an audio activity are filtered out.
 */
class MediaPlayerActivity : Activity() {
    override fun onCreate(icicle: Bundle?) {}

    override fun onDestroy() {}

    override fun onRequestPermissionsResult(
        requestCode: Int,
        permissions: Array<String>,
        grantResults: IntArray
    ) {}
}