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

Commit e96042de authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use message ID from proto for BT APM notification Bug: 239983569 Test:...

Merge "Use message ID from proto for BT APM notification Bug: 239983569 Test: atest ServiceBluetoothTests Ignore-AOSP-First: resolve merge conflict on internal first"
parents 83bff1a3 f61c87ce
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ java_library {
        "modules-utils-shell-command-handler",
        "bluetooth-manager-service-proto-java-gen",
        "bluetooth-proto-enums-java-gen",
        "bluetooth-nano-protos",
    ],

    apex_available: [
@@ -128,6 +129,23 @@ java_library {
    min_sdk_version: "Tiramisu"
}

java_library {
    name: "bluetooth-nano-protos",
    sdk_version: "system_current",
    min_sdk_version: "Tiramisu",
    proto: {
        type: "nano",
    },
    srcs: [
        ":system-messages-proto-src",
    ],
    libs: ["libprotobuf-java-nano"],
    apex_available: [
        "com.android.bluetooth",
    ],
    lint: { strict_updatability_linting: true },
}

platform_compat_config
{
    name: "bluetooth-compat-config",
+3 −4
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ import android.os.UserHandle;
import android.service.notification.StatusBarNotification;
import android.util.Log;

import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;

import java.util.ArrayList;
import java.util.List;

@@ -38,9 +40,6 @@ public class BluetoothNotificationManager {
    public static final String APM_NOTIFICATION_CHANNEL = "apm_notification_channel";
    private static final String APM_NOTIFICATION_GROUP = "apm_notification_group";

    //TODO: b/239983569 remove hardcoded notification ID
    private static final int NOTE_BT_APM_NOTIFICATION = -1000007;

    private final Context mContext;
    private NotificationManager mNotificationManager;

@@ -137,7 +136,7 @@ public class BluetoothNotificationManager {
                        .setStyle(new Notification.BigTextStyle().bigText(message))
                        .setSmallIcon(android.R.drawable.stat_sys_data_bluetooth)
                        .build();
        notify(NOTE_BT_APM_NOTIFICATION, notification);
        notify(SystemMessage.NOTE_BT_APM_NOTIFICATION, notification);
    }

    /**