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

Commit 92369529 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Merge changes I455a3fd5,Ie076c1e2,I95c7d996,Id879b427 am: b958e8b5 am: 19506f02 am: 268389a8

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/1382661

Change-Id: I75e309cf0e3f13d0fc08b8f9253ac5a9df33b956
parents bcd0ce2c 268389a8
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -172,10 +172,10 @@ static jmethodID method_setVolume;

static void classInitNative(JNIEnv* env, jclass clazz) {
  method_getCurrentSongInfo = env->GetMethodID(
      clazz, "getCurrentSongInfo", "()Lcom/android/bluetooth/avrcp/Metadata;");
      clazz, "getCurrentSongInfo", "()Lcom/android/bluetooth/audio_util/Metadata;");

  method_getPlaybackStatus = env->GetMethodID(
      clazz, "getPlayStatus", "()Lcom/android/bluetooth/avrcp/PlayStatus;");
      clazz, "getPlayStatus", "()Lcom/android/bluetooth/audio_util/PlayStatus;");

  method_sendMediaKeyEvent =
      env->GetMethodID(clazz, "sendMediaKeyEvent", "(IZ)V");
@@ -676,9 +676,9 @@ static void getFolderItemsResponseNative(JNIEnv* env, jobject object,
      env->GetObjectClass(env->CallObjectMethod(list, method_get, 0));
  jfieldID field_isFolder = env->GetFieldID(class_listItem, "isFolder", "Z");
  jfieldID field_folder = env->GetFieldID(
      class_listItem, "folder", "Lcom/android/bluetooth/avrcp/Folder;");
      class_listItem, "folder", "Lcom/android/bluetooth/audio_util/Folder;");
  jfieldID field_song = env->GetFieldID(
      class_listItem, "song", "Lcom/android/bluetooth/avrcp/Metadata;");
      class_listItem, "song", "Lcom/android/bluetooth/audio_util/Metadata;");

  std::vector<ListItem> ret_list;
  for (jsize i = 0; i < list_size; i++) {
+10 −10
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.bluetooth.avrcp;
package com.android.bluetooth.audio_util;

import android.util.Log;

@@ -23,8 +23,8 @@ import com.android.bluetooth.Utils;
import com.google.common.collect.EvictingQueue;


// This class is to store logs for Avrcp for given size.
public class AvrcpEventLogger {
// This class is to store logs for Audio for given size.
public class BTAudioEventLogger {
    private final String mTitle;
    private final EvictingQueue<Event> mEvents;

@@ -44,34 +44,34 @@ public class AvrcpEventLogger {
        }
    }

    AvrcpEventLogger(int size, String title) {
    public BTAudioEventLogger(int size, String title) {
        mEvents = EvictingQueue.create(size);
        mTitle = title;
    }

    synchronized void add(String msg) {
    public synchronized void add(String msg) {
        Event event = new Event(msg);
        mEvents.add(event);
    }

    synchronized void logv(String tag, String msg) {
    public synchronized void logv(String tag, String msg) {
        add(msg);
        Log.v(tag, msg);
    }

    synchronized void logd(String tag, String msg) {
    public synchronized void logd(String tag, String msg) {
        logd(true, tag, msg);
    }

    synchronized void logd(boolean debug, String tag, String msg) {
    public synchronized void logd(boolean debug, String tag, String msg) {
        add(msg);
        if (debug) {
            Log.d(tag, msg);
        }
    }

    synchronized void dump(StringBuilder sb) {
        sb.append("Avrcp ").append(mTitle).append(":\n");
    public synchronized void dump(StringBuilder sb) {
        sb.append("BTAudio ").append(mTitle).append(":\n");
        for (Event event : mEvents) {
            sb.append("  ").append(event.toString()).append("\n");
        }
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.bluetooth.avrcp;
package com.android.bluetooth.audio_util;

import android.content.Context;
import android.content.pm.ResolveInfo;
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.bluetooth.avrcp;
package com.android.bluetooth.audio_util;

import android.annotation.Nullable;
import android.content.ComponentName;
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.bluetooth.avrcp;
package com.android.bluetooth.audio_util;

import android.media.session.MediaSession;
import android.os.Looper;
Loading