Loading core/java/android/net/http/AndroidHttpClient.java→common/java/com/android/common/AndroidHttpClient.java +6 −17 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package android.net.http; package com.android.common; import org.apache.http.Header; import org.apache.http.HttpEntity; Loading Loading @@ -59,11 +59,12 @@ import java.util.zip.GZIPOutputStream; import java.net.URI; import java.security.KeyManagementException; import android.util.Log; import android.content.ContentResolver; import android.os.Looper; import android.os.SystemProperties; import android.provider.Settings; import android.text.TextUtils; import android.os.SystemProperties; import android.util.Log; /** * Subclass of the Apache {@link DefaultHttpClient} that is configured with Loading @@ -86,15 +87,12 @@ public final class AndroidHttpClient implements HttpClient { private static final String TAG = "AndroidHttpClient"; /** Set if HTTP requests are blocked from being executed on this thread */ private static final ThreadLocal<Boolean> sThreadBlocked = new ThreadLocal<Boolean>(); /** Interceptor throws an exception if the executing thread is blocked */ private static final HttpRequestInterceptor sThreadCheckInterceptor = new HttpRequestInterceptor() { public void process(HttpRequest request, HttpContext context) { if (sThreadBlocked.get() != null && sThreadBlocked.get()) { // Prevent the HttpRequest from being sent on the main thread if (Looper.myLooper() != null && Looper.myLooper() == Looper.getMainLooper() ) { throw new RuntimeException("This thread forbids HTTP requests"); } } Loading Loading @@ -220,15 +218,6 @@ public final class AndroidHttpClient implements HttpClient { } } /** * Block this thread from executing HTTP requests. * Used to guard against HTTP requests blocking the main application thread. * @param blocked if HTTP requests run on this thread should be denied */ public static void setThreadBlocked(boolean blocked) { sThreadBlocked.set(blocked); } /** * Modifies a request to indicate to the server that we would like a * gzipped response. (Uses the "Accept-Encoding" HTTP header.) Loading core/java/android/text/util/Rfc822InputFilter.java→common/java/com/android/common/Rfc822InputFilter.java +17 −1 Original line number Diff line number Diff line package android.text.util; /* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.common; import android.text.InputFilter; import android.text.Spanned; Loading core/java/android/text/util/Rfc822Validator.java→common/java/com/android/common/Rfc822Validator.java +5 −3 Original line number Diff line number Diff line Loading @@ -14,9 +14,11 @@ * limitations under the License. */ package android.text.util; package com.android.common; import android.text.TextUtils; import android.text.util.Rfc822Token; import android.text.util.Rfc822Tokenizer; import android.widget.AutoCompleteTextView; import java.util.regex.Pattern; Loading core/java/com/android/internal/widget/NumberPicker.java→common/java/com/android/common/widget/NumberPicker.java +4 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.widget; package com.android.common.widget; import android.content.Context; import android.os.Handler; Loading Loading @@ -104,7 +104,8 @@ public class NumberPicker extends LinearLayout implements OnClickListener, public NumberPicker(Context context, AttributeSet attrs, int defStyle) { super(context, attrs); setOrientation(VERTICAL); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.number_picker, this, true); mHandler = new Handler(); InputFilter inputFilter = new NumberPickerInputFilter(); Loading core/java/com/android/internal/widget/NumberPickerButton.java→common/java/com/android/common/widget/NumberPickerButton.java +7 −7 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.widget; package com.android.common.widget; import android.content.Context; import android.util.AttributeSet; Loading Loading
core/java/android/net/http/AndroidHttpClient.java→common/java/com/android/common/AndroidHttpClient.java +6 −17 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package android.net.http; package com.android.common; import org.apache.http.Header; import org.apache.http.HttpEntity; Loading Loading @@ -59,11 +59,12 @@ import java.util.zip.GZIPOutputStream; import java.net.URI; import java.security.KeyManagementException; import android.util.Log; import android.content.ContentResolver; import android.os.Looper; import android.os.SystemProperties; import android.provider.Settings; import android.text.TextUtils; import android.os.SystemProperties; import android.util.Log; /** * Subclass of the Apache {@link DefaultHttpClient} that is configured with Loading @@ -86,15 +87,12 @@ public final class AndroidHttpClient implements HttpClient { private static final String TAG = "AndroidHttpClient"; /** Set if HTTP requests are blocked from being executed on this thread */ private static final ThreadLocal<Boolean> sThreadBlocked = new ThreadLocal<Boolean>(); /** Interceptor throws an exception if the executing thread is blocked */ private static final HttpRequestInterceptor sThreadCheckInterceptor = new HttpRequestInterceptor() { public void process(HttpRequest request, HttpContext context) { if (sThreadBlocked.get() != null && sThreadBlocked.get()) { // Prevent the HttpRequest from being sent on the main thread if (Looper.myLooper() != null && Looper.myLooper() == Looper.getMainLooper() ) { throw new RuntimeException("This thread forbids HTTP requests"); } } Loading Loading @@ -220,15 +218,6 @@ public final class AndroidHttpClient implements HttpClient { } } /** * Block this thread from executing HTTP requests. * Used to guard against HTTP requests blocking the main application thread. * @param blocked if HTTP requests run on this thread should be denied */ public static void setThreadBlocked(boolean blocked) { sThreadBlocked.set(blocked); } /** * Modifies a request to indicate to the server that we would like a * gzipped response. (Uses the "Accept-Encoding" HTTP header.) Loading
core/java/android/text/util/Rfc822InputFilter.java→common/java/com/android/common/Rfc822InputFilter.java +17 −1 Original line number Diff line number Diff line package android.text.util; /* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.common; import android.text.InputFilter; import android.text.Spanned; Loading
core/java/android/text/util/Rfc822Validator.java→common/java/com/android/common/Rfc822Validator.java +5 −3 Original line number Diff line number Diff line Loading @@ -14,9 +14,11 @@ * limitations under the License. */ package android.text.util; package com.android.common; import android.text.TextUtils; import android.text.util.Rfc822Token; import android.text.util.Rfc822Tokenizer; import android.widget.AutoCompleteTextView; import java.util.regex.Pattern; Loading
core/java/com/android/internal/widget/NumberPicker.java→common/java/com/android/common/widget/NumberPicker.java +4 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.widget; package com.android.common.widget; import android.content.Context; import android.os.Handler; Loading Loading @@ -104,7 +104,8 @@ public class NumberPicker extends LinearLayout implements OnClickListener, public NumberPicker(Context context, AttributeSet attrs, int defStyle) { super(context, attrs); setOrientation(VERTICAL); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.number_picker, this, true); mHandler = new Handler(); InputFilter inputFilter = new NumberPickerInputFilter(); Loading
core/java/com/android/internal/widget/NumberPickerButton.java→common/java/com/android/common/widget/NumberPickerButton.java +7 −7 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.widget; package com.android.common.widget; import android.content.Context; import android.util.AttributeSet; Loading