Fix exceptions being thrown when retrieving project icons.

This commit is contained in:
Isira Seneviratne 2020-07-13 16:40:58 +05:30
parent 97e5d63146
commit f5f5007733
2 changed files with 5 additions and 2 deletions

View File

@ -29,6 +29,7 @@ import android.os.PowerManager.WakeLock;
import android.text.format.DateUtils;
import android.util.Log;
import androidx.annotation.Nullable;
import androidx.collection.ArraySet;
import androidx.core.content.ContextCompat;
@ -450,6 +451,7 @@ public class ClientStatus {
// returns project icon for given master url
// bitmap: 40 * 40 pixel, symbolic link in /projects/PNAME/stat_icon
@Nullable
public synchronized Bitmap getProjectIcon(String masterUrl) {
if(Logging.VERBOSE) {
Log.v(Logging.TAG, "getProjectIcon for: " + masterUrl);
@ -486,6 +488,7 @@ public class ClientStatus {
// returns project icon for given project name
// bitmap: 40 * 40 pixel, symbolic link in /projects/PNAME/stat_icon
@Nullable
public synchronized Bitmap getProjectIconByName(String projectName) {
if(Logging.VERBOSE) {
Log.v(Logging.TAG, "getProjectIconByName for: " + projectName);

View File

@ -1102,12 +1102,12 @@ class Monitor : LifecycleService() {
}
@Throws(RemoteException::class)
override fun getProjectIconByName(name: String): Bitmap {
override fun getProjectIconByName(name: String): Bitmap? {
return clientStatus.getProjectIconByName(name)
}
@Throws(RemoteException::class)
override fun getProjectIcon(id: String): Bitmap {
override fun getProjectIcon(id: String): Bitmap? {
return clientStatus.getProjectIcon(id)
}