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

Commit dd6bfd8b authored by Stephanie Bak's avatar Stephanie Bak Committed by Android (Google) 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" into tm-qpr-dev
parents 2d4001e3 ffc0b153
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ java_library {
        "androidx.annotation_annotation",
        "androidx.appcompat_appcompat",
        "modules-utils-shell-command-handler",
        "bluetooth-nano-protos",
    ],

    apex_available: [
@@ -135,6 +136,23 @@ gensrcs {
    output_extension: "srcjar",
}

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);
    }

    /**