Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-08-10 22:20:38 +02:00
parent 7aa4743a32
commit 4ea5f2e226
2 changed files with 12 additions and 8 deletions

View File

@ -299,10 +299,14 @@ public class CallNotificationController extends BaseController {
renderScript = RenderScript.create(getActivity()); renderScript = RenderScript.create(getActivity());
try { if (handler == null) {
cache.evictAll(); handler = new Handler();
} catch (IOException e) {
Log.e(TAG, "Failed to evict cache"); try {
cache.evictAll();
} catch (IOException e) {
Log.e(TAG, "Failed to evict cache");
}
} }
if (currentConversation == null) { if (currentConversation == null) {

View File

@ -38,8 +38,8 @@ import autodagger.AutoInjector;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@AutoInjector(NextcloudTalkApplication.class) @AutoInjector(NextcloudTalkApplication.class)
public class ApiHolder { public class ApplicationWideApiHolder {
private static final String TAG = "ApiHolder"; private static final String TAG = "ApplicationWideApiHolder";
@SuppressLint("UseSparseArrays") @SuppressLint("UseSparseArrays")
private Map<Long, NcApi> ncApiHashMap; private Map<Long, NcApi> ncApiHashMap;
@ -50,9 +50,9 @@ public class ApiHolder {
@Inject @Inject
Retrofit retrofit; Retrofit retrofit;
private static final ApiHolder holder = new ApiHolder(); private static final ApplicationWideApiHolder holder = new ApplicationWideApiHolder();
public static ApiHolder getInstance() { public static ApplicationWideApiHolder getInstance() {
return holder; return holder;
} }