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

Commit f129af20 authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "Move apache specific portions of android.net.http to external/apache-http."

parents 0a3dd9c9 3bdd327f
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -614,7 +614,10 @@ $(gen): $(aidl_files) | $(AIDL)
# TODO: deal with com/google/android/googleapps
packages_to_document := \
	android \
	javax/microedition/khronos
	javax/microedition/khronos \
	org/apache/http/conn \
	org/apache/http/params


# Search through the base framework dirs for these packages.
# The result will be relative to frameworks/base.
@@ -635,7 +638,6 @@ include libcore/Docs.mk
include external/junit/Common.mk

non_base_dirs := \
	../../external/apache-http/src/org/apache/http \
	../opt/telephony/src/java/android/provider \
	../opt/telephony/src/java/android/telephony \
	../opt/telephony/src/java/android/telephony/gsm \
@@ -1024,13 +1026,8 @@ include $(BUILD_DROIDDOC)
# Build ext.jar
# ============================================================

# NOTICE notes for non-obvious sections
# apache-http - covered by the Apache Commons section.


ext_dirs := \
	../../external/nist-sip/java \
	../../external/apache-http/src \
	../../external/tagsoup/src \

ext_src_files := $(call all-java-files-under,$(ext_dirs))
+0 −3345

File changed.

Preview size limit exceeded, changes collapsed.

+0 −3345

File changed.

Preview size limit exceeded, changes collapsed.

+24 −4
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.database;

import org.apache.commons.codec.binary.Hex;

import android.content.ContentValues;
import android.content.Context;
import android.content.OperationApplicationException;
@@ -417,10 +415,32 @@ public class DatabaseUtils {
     */
    public static String getHexCollationKey(String name) {
        byte[] arr = getCollationKeyInBytes(name);
        char[] keys = Hex.encodeHex(arr);
        char[] keys = encodeHex(arr);
        return new String(keys, 0, getKeyLen(arr) * 2);
    }


    /**
     * Used building output as Hex
     */
    private static final char[] DIGITS = {
            '0', '1', '2', '3', '4', '5', '6', '7',
            '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
    };

    private static char[] encodeHex(byte[] input) {
        int l = input.length;
        char[] out = new char[l << 1];

        // two characters form the hex value.
        for (int i = 0, j = 0; i < l; i++) {
            out[j++] = DIGITS[(0xF0 & input[i]) >>> 4 ];
            out[j++] = DIGITS[ 0x0F & input[i] ];
        }

        return out;
    }

    private static int getKeyLen(byte[] arr) {
        if (arr[arr.length - 1] != 0) {
            return arr.length;
+3 −4
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

import org.apache.http.client.HttpClient;

import java.net.InetSocketAddress;
import java.net.URLConnection;
import java.util.List;
@@ -31,8 +29,9 @@ import java.util.Locale;
/**
 * Describes a proxy configuration.
 *
 * Proxy configurations are already integrated within the Apache HTTP stack.
 * So {@link URLConnection} and {@link HttpClient} will use them automatically.
 * Proxy configurations are already integrated within the {@code java.net} and
 * Apache HTTP stack. So {@link URLConnection} and Apache's {@code HttpClient} will use
 * them automatically.
 *
 * Other HTTP stacks will need to obtain the proxy info from
 * {@link Proxy#PROXY_CHANGE_ACTION} broadcast as the extra {@link Proxy#EXTRA_PROXY_INFO}.
Loading