Commit 540b7b48 authored by Adrien Béraud's avatar Adrien Béraud

device runtime: cleanup

Change-Id: Ieec68304fb7989dad1a40e408486c7aa97753b2d
parent 98d0250e
......@@ -55,7 +55,6 @@ public class DeviceRuntimeServiceImpl extends DeviceRuntimeService {
@Inject
@Named("DaemonExecutor")
ScheduledExecutorService mExecutor;
private long mDaemonThreadId = -1;
private void copyAssets() {
File pluginsPath = new File(mContext.getFilesDir(), "plugins");
......@@ -64,22 +63,17 @@ public class DeviceRuntimeServiceImpl extends DeviceRuntimeService {
AndroidFileUtils.copyAssetFolder(mContext.getAssets(), "plugins", pluginsPath);
}
@Override
public void loadNativeLibrary() {
mExecutor.submit(() -> {
mExecutor.execute(() -> {
try {
mDaemonThreadId = Thread.currentThread().getId();
System.loadLibrary("ring");
return true;
} catch (Exception e) {
Log.e(TAG, "Could not load Jami library", e);
return false;
}
});
}
@Override
public File provideFilesDir() {
return mContext.getFilesDir();
......@@ -135,11 +129,6 @@ public class DeviceRuntimeServiceImpl extends DeviceRuntimeService {
return isNetworkConnectedForType(ConnectivityManager.TYPE_ETHERNET);
}
@Override
public long provideDaemonThreadId() {
return mDaemonThreadId;
}
@Override
public boolean hasVideoPermission() {
return checkPermission(Manifest.permission.CAMERA);
......
......@@ -42,8 +42,6 @@ public abstract class DeviceRuntimeService implements DaemonService.SystemInfoCa
public abstract boolean isConnectedBluetooth();
public abstract long provideDaemonThreadId();
public abstract boolean hasVideoPermission();
public abstract boolean hasAudioPermission();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment