Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5cefda4 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'gingerbread' into gingerbread-release

parents 52a9c48e 692cac9f
Loading
Loading
Loading
Loading
+11 −16
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.provider.BaseColumns;
import android.provider.Downloads;
import android.util.Log;
import android.util.Pair;

import java.io.File;
@@ -53,6 +54,8 @@ import java.util.Set;
 * download in a notification or from the downloads UI.
 */
public class DownloadManager {
    private static final String TAG = "DownloadManager";

    /**
     * An identifier for a particular download, unique across the system.  Clients use this ID to
     * make subsequent calls related to the download.
@@ -748,20 +751,11 @@ public class DownloadManager {
     * @return the number of downloads actually removed
     */
    public int remove(long... ids) {
        StringBuilder whereClause = new StringBuilder();
        String[] whereArgs = new String[ids.length];

        whereClause.append(Downloads.Impl._ID + " IN (");
        for (int i = 0; i < ids.length; i++) {
            if (i > 0) {
                whereClause.append(",");
            }
            whereClause.append("?");
            whereArgs[i] = Long.toString(ids[i]);
        if (ids == null || ids.length == 0) {
            // called with nothing to remove!
            throw new IllegalArgumentException("input param 'ids' can't be null");
        }
        whereClause.append(")");

        return mResolver.delete(mBaseUri, whereClause.toString(), whereArgs);
        return mResolver.delete(mBaseUri, getWhereClauseForIds(ids), getWhereArgsForIds(ids));
    }

    /**
@@ -828,12 +822,13 @@ public class DownloadManager {
     */
    static String getWhereClauseForIds(long[] ids) {
        StringBuilder whereClause = new StringBuilder();
        whereClause.append(Downloads.Impl._ID + " IN (");
        whereClause.append("(");
        for (int i = 0; i < ids.length; i++) {
            if (i > 0) {
                whereClause.append(",");
                whereClause.append("OR ");
            }
            whereClause.append("?");
            whereClause.append(Downloads.Impl._ID);
            whereClause.append(" = ? ");
        }
        whereClause.append(")");
        return whereClause.toString();
+2 −7
Original line number Diff line number Diff line
@@ -17,14 +17,14 @@
package android.widget;

import com.android.internal.R;

import android.content.Context;
import android.content.res.Resources;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageParser;
import android.content.pm.PermissionGroupInfo;
import android.content.pm.PermissionInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.LayoutInflater;
@@ -329,11 +329,6 @@ public class AppSecurityPermissions implements View.OnClickListener {

        TextView permGrpView = (TextView) permView.findViewById(R.id.permission_group);
        TextView permDescView = (TextView) permView.findViewById(R.id.permission_list);
        if (dangerous) {
            final Resources resources = context.getResources();
            permGrpView.setTextColor(resources.getColor(R.color.perms_dangerous_grp_color));
            permDescView.setTextColor(resources.getColor(R.color.perms_dangerous_perm_color));
        }

        ImageView imgView = (ImageView)permView.findViewById(R.id.perm_icon);
        imgView.setImageDrawable(icon);
−1.86 KiB (1.1 KiB)
Loading image diff...
+1.15 KiB (2.06 KiB)
Loading image diff...
+1.22 KiB (2.14 KiB)
Loading image diff...
Loading