Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtAndroidServiceConnection.java
Go to the documentation of this file.
1// Copyright (C) 2017 BogDan Vatra <bogdan@kde.org>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4package org.qtproject.qt.android.extras;
5
6import android.content.ComponentName;
7import android.content.ServiceConnection;
8import android.os.IBinder;
9
11
12class QtAndroidServiceConnection implements ServiceConnection
13{
14 @UsedFromNativeCode
15 public QtAndroidServiceConnection(long id)
16 {
17 m_id = id;
18 }
19
20 public void setId(long id)
21 {
22 synchronized(this)
23 {
24 m_id = id;
25 }
26 }
27
28 @Override
29 public void onServiceConnected(ComponentName name, IBinder service)
30 {
31 synchronized(this) {
32 QtNative.onServiceConnected(m_id, name.flattenToString(), service);
33 }
34 }
35
36 @Override
37 public void onServiceDisconnected(ComponentName name)
38 {
39 synchronized(this) {
40 QtNative.onServiceDisconnected(m_id, name.flattenToString());
41 }
42 }
43
44 private long m_id;
45}
Q_CORE_EXPORT QtJniTypes::Service service()
GLenum GLuint id
[7]
GLuint name