Api 24 Based on https://gitlab.com/fdroid/fdroidclient/merge_requests/352 with fixes for robolectric See merge request !360