mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
Fix build with older Java < 7
This commit is contained in:
parent
856ce2ffb1
commit
2095dae95d
@ -29,7 +29,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
import android.app.ActivityManager;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class RetroShareServiceAndroid extends Service
|
||||
{
|
||||
@ -70,8 +70,11 @@ public class RetroShareServiceAndroid extends Service
|
||||
public static Context getServiceContext()
|
||||
{
|
||||
if(sServiceContext == null)
|
||||
{
|
||||
Log.e(TAG, "getServiceContext() called before onCreate");
|
||||
return Objects.requireNonNull(sServiceContext);
|
||||
throw new NullPointerException();
|
||||
}
|
||||
return sServiceContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user