static Notification[] getNotificationArrayFromBundle(Bundle bundle, String key) {
        Parcelable[] array = bundle.getParcelableArray(key);
        if (array instanceof Notification[] || array == null) {
            return (Notification[]) array;
        }
        Notification[] typedArray = new Notification[array.length];
        for (int i = 0; i < array.length; i++) {
            typedArray[i] = (Notification) array[i];
        }
        bundle.putParcelableArray(key, typedArray);
        return typedArray;
    }
Get an array of Notification objects from a parcelable array bundle field.
Update the bundle to have a typed array so fetches in the future don't need
to do an array copy.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/NotificationCompat.java