microg/GmsCore · warning · UnsupportedOperationException

Not yet implemented

Error message

Not yet implemented

What it means

SharedTileProvider extends ContentProvider and implements delete() as a stub that always throws UnsupportedOperationException, since tile deletion is not implemented in this provider. Any caller (framework or app) issuing a delete operation on the tile content URI hits the exception.

Source

Thrown at play-services-maps/core/vtm/src/main/java/org/microg/gms/maps/vtm/data/SharedTileProvider.java:43

import android.net.Uri;

/*
 * TODO: Writing to cache should be protected, tiles should be downloaded by service instead of client app.
 */
public class SharedTileProvider extends ContentProvider {
    private static final String DB_NAME = "tilecache.db";
    public static final String PROVIDER_NAME = "org.microg.gms.maps.vtm.tile";
    public static final Uri PROVIDER_URI = Uri.parse("content://" + PROVIDER_NAME);

    private SQLiteHelper sqLiteHelper;

    public SharedTileProvider() {
    }

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        // Implement this to handle requests to delete one or more rows.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public String getType(Uri uri) {
        return "vnd.android.cursor.item/org.microg.gms.map.tile";
    }

    @Override
    public Uri insert(Uri uri, ContentValues values) {
        sqLiteHelper.getWritableDatabase().insert("tiles", null, values);
        return PROVIDER_URI;
    }

    @Override
    public boolean onCreate() {
        sqLiteHelper = new SQLiteHelper(getContext(), DB_NAME);
        return true;
    }

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Do not issue delete operations against the tile provider; clear tile caches by deleting underlying cache files/directories instead
  2. Catch UnsupportedOperationException around resolver.delete calls targeting this authority
  3. Contribute/patch SharedTileProvider.delete to remove tiles if deletion is required

Example fix

// before
resolver.delete(tileUri, null, null); // throws
// after
try {
    resolver.delete(tileUri, null, null);
} catch (UnsupportedOperationException e) {
    // provider does not support delete; clear file cache instead
}
Defensive patterns

Strategy: try-catch

Validate before calling

// avoid issuing deletes against the tile provider authority
dontCallDeleteOn(tileProviderAuthority);

Try / catch

try { resolver.delete(tileUri, null, null); } catch (UnsupportedOperationException e) { clearTileFileCacheInstead(); }

Prevention

When it happens

Trigger: Calling ContentResolver.delete(...) on the SharedTileProvider authority URI, e.g. attempting to clear cached map tiles through the provider interface.

Common situations: Generic cache-cleanup code that deletes rows from all content providers; tooling that introspects providers and performs delete probes.

Related errors


AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06). Data as JSON: /api/errors/4ca48a237e6484e1. Report an issue: GitHub.