Skip to content
Snippets Groups Projects
Commit 540b7b48 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

device runtime: cleanup

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