Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtServiceLoader.java
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// Copyright (c) 2016, BogDan Vatra <bogdan@kde.org>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5package org.qtproject.qt.android;
6
7import android.app.Service;
8import android.content.ContextWrapper;
9
10import java.lang.IllegalArgumentException;
11
12class QtServiceLoader extends QtLoader {
13 QtServiceLoader(Service service) throws IllegalArgumentException {
14 super(new ContextWrapper(service));
15 extractContextMetaData(service);
16 }
17
18 static QtServiceLoader getServiceLoader(Service service) throws IllegalArgumentException {
19 if (m_instance == null)
20 m_instance = new QtServiceLoader(service);
21 return (QtServiceLoader) m_instance;
22 }
23}