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

Commit 29c10564 authored by Hyundo Moon's avatar Hyundo Moon
Browse files

AML: Make UserHandle.myUserId() available

Since the method UserHandle.myUserId() is a @SystemApi, build error
happens when building the mainline module.

This CL makes it available by building the APK with the system SDK.

Bug: 119749861
Test: mmm . (under frameworks/av/packages/MediaComponents)
Change-Id: Iedecf1a7c7de1279161601c1e88f959e89af73ac
parent 1627871a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ filegroup {
java_library {
    name: "media",
    installable: true,
    sdk_version: "current",
    sdk_version: "system_current",
    srcs: [
        "java/android/media/**/*.java",
        "java/android/service/**/*.java",
+1 −3
Original line number Diff line number Diff line
@@ -150,9 +150,7 @@ public final class MediaSession {
     * @param tag A short name for debugging purposes.
     */
    public MediaSession(@NonNull Context context, @NonNull String tag) {
        //TODO(b/119749861): Resolve hidden API usage, UserHandle.myUserId
        //this(context, tag, UserHandle.myUserId());
        this(context, tag, 0);  //TODO: remove this.
        this(context, tag, UserHandle.myUserId());
    }

    /**