Search in sources :

Example 51 with App

use of org.fdroid.fdroid.data.App in project fdroidclient by f-droid.

the class ProperMultiIndexUpdaterTest method allApps.

private Map<String, App> allApps() {
    List<App> apps = AppProvider.Helper.all(context.getContentResolver());
    Map<String, App> appsIndexedByPackageName = new HashMap<>(apps.size());
    for (App app : apps) {
        appsIndexedByPackageName.put(app.packageName, app);
    }
    return appsIndexedByPackageName;
}
Also used : App(org.fdroid.fdroid.data.App) HashMap(java.util.HashMap)

Example 52 with App

use of org.fdroid.fdroid.data.App in project fdroidclient by f-droid.

the class ProperMultiIndexUpdaterTest method assert2048Metadata.

private void assert2048Metadata(Repo repo, @RepoIdentifier String id) {
    App a2048 = AppProvider.Helper.findSpecificApp(context.getContentResolver(), "com.uberspot.a2048", repo.getId(), AppMetadataTable.Cols.ALL);
    assert2048Metadata(a2048, id);
}
Also used : App(org.fdroid.fdroid.data.App)

Example 53 with App

use of org.fdroid.fdroid.data.App in project fdroidclient by f-droid.

the class ProperMultiIndexUpdaterTest method assertAdAwayMetadata.

private void assertAdAwayMetadata(Repo repo, @RepoIdentifier String id) {
    App adaway = AppProvider.Helper.findSpecificApp(context.getContentResolver(), "org.adaway", repo.getId(), AppMetadataTable.Cols.ALL);
    assertAdAwayMetadata(adaway, id);
}
Also used : App(org.fdroid.fdroid.data.App)

Aggregations

App (org.fdroid.fdroid.data.App)53 FDroidApp (org.fdroid.fdroid.FDroidApp)10 Apk (org.fdroid.fdroid.data.Apk)10 Test (org.junit.Test)6 Intent (android.content.Intent)5 PackageInfo (android.content.pm.PackageInfo)5 PackageManager (android.content.pm.PackageManager)5 ArrayList (java.util.ArrayList)5 FDroidProviderTest (org.fdroid.fdroid.data.FDroidProviderTest)5 PendingIntent (android.app.PendingIntent)4 SpannableStringBuilder (android.text.SpannableStringBuilder)4 NotificationCompat (androidx.core.app.NotificationCompat)4 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 IOException (java.io.IOException)4 Repo (org.fdroid.fdroid.data.Repo)4 RepoXMLHandlerTest (org.fdroid.fdroid.data.RepoXMLHandlerTest)4 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)4 ContentResolver (android.content.ContentResolver)3 ContentValues (android.content.ContentValues)3 JsonFactory (com.fasterxml.jackson.core.JsonFactory)3