Permalink
Browse files

Re-arrange android-common so framework no longer links with it.

This is the framework part, moving classes around so the framework
no longer needs to link to android-common.  Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
  • Loading branch information...
1 parent e46145f commit 2269d1572e5fcfb725ea55f5764d8c3280d69f6d Dianne Hackborn committed Feb 25, 2010
Showing with 736 additions and 80 deletions.
  1. +489 −0 api/current.xml
  2. +1 −0 common/java/com/android/common/OperationScheduler.java
  3. +0 −9 common/java/com/android/common/speech/Recognition.java
  4. +2 −1 core/java/android/app/AliasActivity.java
  5. +1 −1 core/java/android/app/ContextImpl.java
  6. +2 −3 core/java/android/app/SearchDialog.java
  7. +2 −1 core/java/android/content/Intent.java
  8. +2 −1 core/java/android/content/IntentFilter.java
  9. +1 −1 core/java/android/content/SyncStorageEngine.java
  10. +2 −1 core/java/android/content/pm/PackageParser.java
  11. +1 −1 core/java/android/content/pm/RegisteredServicesCache.java
  12. +1 −1 core/java/android/content/res/Resources.java
  13. +2 −1 core/java/android/content/res/StringBlock.java
  14. +2 −1 core/java/android/content/res/TypedArray.java
  15. +2 −1 core/java/android/content/res/XmlBlock.java
  16. +2 −1 core/java/android/net/SSLCertificateSocketFactory.java
  17. +1 −1 core/java/android/net/WebAddress.java
  18. +1 −3 {common/java/com/android/common → core/java/android/net/http}/AndroidHttpClient.java
  19. +2 −1 core/java/android/net/http/CertificateChainValidator.java
  20. +4 −3 {common/java/com/android/common → core/java/android/net/http}/HttpDateTime.java
  21. +1 −1 core/java/android/provider/Telephony.java
  22. +9 −0 core/java/android/speech/RecognizerIntent.java
  23. +3 −1 core/java/android/text/AutoText.java
  24. +2 −1 core/java/android/text/Html.java
  25. +1 −1 core/java/android/text/util/Linkify.java
  26. +1 −1 {common/java/com/android/common → core/java/android/util}/Patterns.java
  27. +1 −1 core/java/android/util/TimeUtils.java
  28. +2 −1 core/java/android/util/XmlPullAttributes.java
  29. +1 −1 core/java/android/webkit/CacheManager.java
  30. +1 −1 core/java/android/webkit/CookieManager.java
  31. +4 −1 {common/java/com/android/common → core/java/com/android/internal/net}/DNParser.java
  32. +3 −1 {common/java/com/android/common → core/java/com/android/internal/net}/DomainNameValidator.java
  33. +1 −1 core/java/com/android/internal/os/PowerProfile.java
  34. +1 −1 {common/java/com/android/common → core/java/com/android/internal/util}/FastXmlSerializer.java
  35. +2 −1 {common/java/com/android/common → core/java/com/android/internal/util}/XmlUtils.java
  36. +2 −0 core/tests/coretests/Android.mk
  37. +1 −1 location/java/com/android/internal/location/GpsXtraDownloader.java
  38. +1 −0 mms-common/Android.mk
  39. +1 −1 mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java
  40. +1 −1 packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
  41. +6 −7 preloaded-classes
  42. +1 −1 sax/tests/saxtests/src/android/sax/SafeSaxTest.java
  43. +1 −1 services/java/com/android/server/AppWidgetService.java
  44. +2 −2 services/java/com/android/server/DevicePolicyManagerService.java
  45. +1 −1 services/java/com/android/server/KeyInputQueue.java
  46. +2 −2 services/java/com/android/server/PackageManagerService.java
  47. +1 −1 services/java/com/android/server/WallpaperManagerService.java
  48. +145 −1 telephony/java/com/android/internal/telephony/IccProvider.java
  49. +1 −1 telephony/java/com/android/internal/telephony/cdma/EriManager.java
  50. +1 −1 telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
  51. +1 −1 telephony/java/com/android/internal/telephony/gsm/SpnOverride.java
  52. +2 −1 telephony/java/com/android/internal/telephony/gsm/VoiceMailConstants.java
  53. 0 {common/tests → tests/AndroidTests}/res/raw/alt_ip_only.crt
  54. 0 {common/tests → tests/AndroidTests}/res/raw/subject_alt_only.crt
  55. 0 {common/tests → tests/AndroidTests}/res/raw/subject_only.crt
  56. 0 {common/tests → tests/AndroidTests}/res/raw/subject_with_alt_names.crt
  57. 0 {common/tests → tests/AndroidTests}/res/raw/subject_with_wild_alt_name.crt
  58. 0 {common/tests → tests/AndroidTests}/res/raw/wild_alt_name_only.crt
  59. +3 −1 ...n/tests/src/com/android/common → tests/AndroidTests/src/com/android/unit_tests}/DNParserTest.java
  60. +2 −2 .../com/android/common → tests/AndroidTests/src/com/android/unit_tests}/DomainNameValidatorTest.java
  61. +5 −5 ...n/tests/src/com/android/common → tests/AndroidTests/src/com/android/unit_tests}/PatternsTest.java
  62. +1 −1 tests/SslLoad/src/com/android/sslload/SslLoad.java
  63. +1 −1 tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
  64. +1 −1 tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -17,6 +17,7 @@
package com.android.common;
import android.content.SharedPreferences;
+import android.net.http.HttpDateTime;
import android.text.format.Time;
import java.util.Map;
@@ -23,15 +23,6 @@
* @see android.speech.RecognizerIntent
*/
public class Recognition {
-
- /**
- * The extra key used in an intent to the speech recognizer for voice search. Not
- * generally to be used by developers. The system search dialog uses this, for example,
- * to set a calling package for identification by a voice search API. If this extra
- * is set by anyone but the system process, it should be overridden by the voice search
- * implementation.
- */
- public static final String EXTRA_CALLING_PACKAGE = "calling_package";
/**
* The key to the extra in the Bundle returned by
@@ -26,7 +26,8 @@
import android.os.Bundle;
import android.util.AttributeSet;
import android.util.Xml;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.IOException;
@@ -17,7 +17,7 @@
package android.app;
import com.android.internal.policy.PolicyManager;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import com.google.android.collect.Maps;
import org.xmlpull.v1.XmlPullParserException;
@@ -16,8 +16,6 @@
package android.app;
-import com.android.common.Patterns;
-import com.android.common.speech.Recognition;
import static android.app.SuggestionsAdapter.getColumnString;
@@ -48,6 +46,7 @@
import android.util.AndroidRuntimeException;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.Patterns;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -820,7 +819,7 @@ private Intent createVoiceAppSearchIntent(Intent baseIntent, SearchableInfo sear
voiceIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, prompt);
voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
voiceIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults);
- voiceIntent.putExtra(Recognition.EXTRA_CALLING_PACKAGE,
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
searchActivity == null ? null : searchActivity.toShortString());
// Add the values that configure forwarding the results
@@ -34,7 +34,8 @@
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.IOException;
import java.io.Serializable;
@@ -34,7 +34,8 @@
import android.util.Config;
import android.util.Log;
import android.util.Printer;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* Structured description of Intent values to be matched. An IntentFilter can
@@ -18,7 +18,7 @@
import com.android.internal.os.AtomicFile;
import com.android.internal.util.ArrayUtils;
-import com.android.common.FastXmlSerializer;
+import com.android.internal.util.FastXmlSerializer;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -35,7 +35,8 @@
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.File;
import java.io.IOException;
@@ -43,7 +43,7 @@
import java.io.FileInputStream;
import com.android.internal.os.AtomicFile;
-import com.android.common.FastXmlSerializer;
+import com.android.internal.util.FastXmlSerializer;
import com.google.android.collect.Maps;
import com.google.android.collect.Lists;
@@ -17,7 +17,7 @@
package android.content.res;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -24,7 +24,8 @@
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* Conveniences for retrieving data out of a compiled string resource.
@@ -5,7 +5,8 @@
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.util.Arrays;
@@ -17,7 +17,8 @@
package android.content.res;
import android.util.TypedValue;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParserException;
@@ -16,11 +16,12 @@
package android.net;
+import com.android.internal.net.DomainNameValidator;
+
import android.os.SystemProperties;
import android.util.Config;
import android.util.Log;
-import com.android.common.DomainNameValidator;
import java.io.IOException;
import java.net.InetAddress;
@@ -16,7 +16,7 @@
package android.net;
-import static com.android.common.Patterns.GOOD_IRI_CHAR;
+import static android.util.Patterns.GOOD_IRI_CHAR;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.common;
+package android.net.http;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
@@ -36,7 +36,6 @@
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.RequestWrapper;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
@@ -55,7 +54,6 @@
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import java.net.URI;
-import java.security.KeyManagementException;
import android.content.Context;
import android.content.ContentResolver;
@@ -16,7 +16,8 @@
package android.net.http;
-import com.android.common.DomainNameValidator;
+
+import com.android.internal.net.DomainNameValidator;
import org.apache.harmony.xnet.provider.jsse.SSLParameters;
@@ -14,16 +14,17 @@
* limitations under the License.
*/
-package com.android.common;
+package android.net.http;
import android.text.format.Time;
import java.util.Calendar;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
-/** {@hide} */
+/**
+ * Helper for parsing an HTTP date.
+ */
public final class HttpDateTime {
/*
@@ -29,8 +29,8 @@
import android.text.TextUtils;
import android.util.Config;
import android.util.Log;
+import android.util.Patterns;
-import com.android.common.Patterns;
import java.util.HashSet;
import java.util.Set;
@@ -32,6 +32,15 @@
* Constants for supporting speech recognition through starting an {@link Intent}
*/
public class RecognizerIntent {
+ /**
+ * The extra key used in an intent to the speech recognizer for voice search. Not
+ * generally to be used by developers. The system search dialog uses this, for example,
+ * to set a calling package for identification by a voice search API. If this extra
+ * is set by anyone but the system process, it should be overridden by the voice search
+ * implementation.
+ */
+ public final static String EXTRA_CALLING_PACKAGE = "calling_package";
+
private RecognizerIntent() {
// Not for instantiating.
}
@@ -18,7 +18,9 @@
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
+
import android.view.View;
import org.xmlpull.v1.XmlPullParser;
@@ -46,7 +46,8 @@
import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
import android.util.Log;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.IOException;
import java.io.StringReader;
@@ -22,10 +22,10 @@
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
+import android.util.Patterns;
import android.webkit.WebView;
import android.widget.TextView;
-import com.android.common.Patterns;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.common;
+package android.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -27,7 +27,7 @@
import java.util.TimeZone;
import java.util.Date;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
/**
* A class containing utility methods related to time zones.
@@ -19,7 +19,8 @@
import org.xmlpull.v1.XmlPullParser;
import android.util.AttributeSet;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* Provides an implementation of AttributeSet on top of an XmlPullParser.
@@ -18,6 +18,7 @@
import android.content.Context;
import android.net.http.Headers;
+import android.net.http.HttpDateTime;
import android.os.FileUtils;
import android.util.Log;
import java.io.File;
@@ -30,7 +31,6 @@
import java.util.ArrayList;
import java.util.Map;
-import com.android.common.HttpDateTime;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA1Digest;
@@ -18,9 +18,9 @@
import android.net.ParseException;
import android.net.WebAddress;
+import android.net.http.HttpDateTime;
import android.util.Log;
-import com.android.common.HttpDateTime;
import java.util.ArrayList;
import java.util.Arrays;
@@ -15,7 +15,8 @@
* limitations under the License.
*/
-package com.android.common;
+package com.android.internal.net;
+
import android.util.Log;
@@ -34,6 +35,8 @@
*
* <p>This class is used by {@link DomainNameValidator} only. However, in order to make this
* class visible from unit tests, it's made public.
+ *
+ * @hide
*/
public final class DNParser {
private static final String TAG = "DNParser";
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.common;
+package com.android.internal.net;
+
import android.util.Config;
import android.util.Log;
@@ -30,6 +31,7 @@
import javax.security.auth.x500.X500Principal;
+/** @hide */
public class DomainNameValidator {
private final static String TAG = "DomainNameValidator";
@@ -20,7 +20,7 @@
import android.content.Context;
import android.content.res.XmlResourceParser;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
Oops, something went wrong.

0 comments on commit 2269d15

Please sign in to comment.