summaryrefslogtreecommitdiff
path: root/chromium/media/base/android/android_util.cc
blob: ca627d9b006ee5a43e542b0d9b553a81ecaff401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/base/android/android_util.h"

#include <stddef.h>
#include <vector>

#include "base/android/jni_android.h"
#include "base/android/jni_array.h"

namespace media {

JavaObjectPtr CreateJavaObjectPtr(jobject object) {
  JavaObjectPtr j_object_ptr(new base::android::ScopedJavaGlobalRef<jobject>());
  j_object_ptr->Reset(base::android::AttachCurrentThread(), object);
  return j_object_ptr;
}

}  // namespace media