lineage-sdk: Remove NativeHelper class

* Only used by LineageAudioService which was removed.

Change-Id: I81fc67b1bd9e32062f0dc9f763875f832c096c2b
This commit is contained in:
Han Wang
2022-03-19 14:30:07 +01:00
committed by Bruno Martins
parent ca136deee2
commit 6528cae926

View File

@@ -1,44 +0,0 @@
/*
* Copyright (C) 2016, The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.platform.internal;
import android.util.Log;
class NativeHelper {
private static final String TAG = "Lineage-SDK-JNI";
private static Boolean sNativeLibraryLoaded;
/**
* Loads the JNI backend if not already loaded.
*
* @return true if JNI platform library is loaded
*/
synchronized static boolean isNativeLibraryAvailable() {
if (sNativeLibraryLoaded == null) {
try {
System.loadLibrary("lineage-sdk_platform_jni");
sNativeLibraryLoaded = true;
} catch (Throwable t) {
sNativeLibraryLoaded = false;
Log.w(TAG, "Lineage-SDK native library unavailable");
}
}
return sNativeLibraryLoaded;
}
}