Code example for ActivityInfo

Methods: getIconResource

0
        } 
        if (DBG) Log.d(TAG, "Finished updating database.");
    } 
 
    private String getActivityIconUri(ActivityInfo activityInfo) {
        int icon = activityInfo.getIconResource();
        if (icon == 0) return null;
        Uri uri = getResourceUri(getContext(), activityInfo.applicationInfo, icon);
        return uri == null ? null : uri.toString();
    } 
 
    private void removeApplications(String packageName) {
        if (packageName == null) {
            mDb.delete(APPLICATIONS_TABLE, null, null);
        } else { 
            mDb.delete(APPLICATIONS_TABLE, PACKAGE + " = ?", new String[] { packageName });
        } 
 
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE