diff options
246 files changed, 8587 insertions, 21113 deletions
@@ -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)) diff --git a/api/current.txt b/api/current.txt index 80a2dd8..009fc51 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2086,6 +2086,21 @@ package android { field public static final int Theme_Light_Panel = 16973914; // 0x103005a field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062 field public static final int Theme_Material = 16974372; // 0x1030224 + field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4 + field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5 + field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6 + field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc + field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd + field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7 + field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8 + field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9 + field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da + field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db + field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de + field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df + field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0 + field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1 + field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2 field public static final int Theme_Material_Dialog = 16974373; // 0x1030225 field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c @@ -11986,8 +12001,10 @@ package android.graphics.drawable { public class LayerDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback { ctor public LayerDrawable(android.graphics.drawable.Drawable[]); + method public int addLayer(android.graphics.drawable.Drawable); method public void draw(android.graphics.Canvas); method public android.graphics.drawable.Drawable findDrawableByLayerId(int); + method public int findIndexByLayerId(int); method public android.graphics.drawable.Drawable getDrawable(int); method public int getId(int); method public int getLayerGravity(int); @@ -12000,6 +12017,7 @@ package android.graphics.drawable { method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long); method public void setAlpha(int); method public void setColorFilter(android.graphics.ColorFilter); + method public void setDrawable(int, android.graphics.drawable.Drawable); method public boolean setDrawableByLayerId(int, android.graphics.drawable.Drawable); method public void setId(int, int); method public void setLayerGravity(int, int); @@ -17907,30 +17925,6 @@ package android.net { package android.net.http { - public final deprecated class AndroidHttpClient implements org.apache.http.client.HttpClient { - method public void close(); - method public void disableCurlLogging(); - method public void enableCurlLogging(java.lang.String, int); - method public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest) throws java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) throws java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest) throws java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public static org.apache.http.entity.AbstractHttpEntity getCompressedEntity(byte[], android.content.ContentResolver) throws java.io.IOException; - method public org.apache.http.conn.ClientConnectionManager getConnectionManager(); - method public static long getMinGzipSize(android.content.ContentResolver); - method public org.apache.http.params.HttpParams getParams(); - method public static java.io.InputStream getUngzippedContent(org.apache.http.HttpEntity) throws java.io.IOException; - method public static void modifyRequestToAcceptGzipResponse(org.apache.http.HttpRequest); - method public static deprecated android.net.http.AndroidHttpClient newInstance(java.lang.String, android.content.Context); - method public static deprecated android.net.http.AndroidHttpClient newInstance(java.lang.String); - method public static long parseDate(java.lang.String); - field public static long DEFAULT_SYNC_MIN_GZIP_BYTES; - } - public final class HttpResponseCache extends java.net.ResponseCache implements java.io.Closeable { method public void close() throws java.io.IOException; method public void delete() throws java.io.IOException; @@ -27537,6 +27531,7 @@ package android.service.notification { field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2 + field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0 field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService"; } @@ -31790,6 +31785,7 @@ package android.transition { method public android.transition.Transition addTarget(java.lang.String); method public android.transition.Transition addTarget(java.lang.Class); method public android.transition.Transition addTarget(android.view.View); + method protected boolean areValuesChanged(android.transition.TransitionValues, android.transition.TransitionValues); method public boolean canRemoveViews(); method public abstract void captureEndValues(android.transition.TransitionValues); method public abstract void captureStartValues(android.transition.TransitionValues); @@ -32044,6 +32040,7 @@ package android.util { method public boolean equals(android.util.DisplayMetrics); method public void setTo(android.util.DisplayMetrics); method public void setToDefaults(); + field public static final int DENSITY_280 = 280; // 0x118 field public static final int DENSITY_400 = 400; // 0x190 field public static final int DENSITY_560 = 560; // 0x230 field public static final int DENSITY_DEFAULT = 160; // 0xa0 @@ -37786,6 +37783,7 @@ package android.widget { ctor public CompoundButton(android.content.Context, android.util.AttributeSet); ctor public CompoundButton(android.content.Context, android.util.AttributeSet, int); ctor public CompoundButton(android.content.Context, android.util.AttributeSet, int, int); + method public android.graphics.drawable.Drawable getButtonDrawable(); method public android.content.res.ColorStateList getButtonTintList(); method public android.graphics.PorterDuff.Mode getButtonTintMode(); method public boolean isChecked(); @@ -54866,1105 +54864,13 @@ package junit.runner { } -package org.apache.commons.logging { - - public abstract deprecated interface Log { - method public abstract void debug(java.lang.Object); - method public abstract void debug(java.lang.Object, java.lang.Throwable); - method public abstract void error(java.lang.Object); - method public abstract void error(java.lang.Object, java.lang.Throwable); - method public abstract void fatal(java.lang.Object); - method public abstract void fatal(java.lang.Object, java.lang.Throwable); - method public abstract void info(java.lang.Object); - method public abstract void info(java.lang.Object, java.lang.Throwable); - method public abstract boolean isDebugEnabled(); - method public abstract boolean isErrorEnabled(); - method public abstract boolean isFatalEnabled(); - method public abstract boolean isInfoEnabled(); - method public abstract boolean isTraceEnabled(); - method public abstract boolean isWarnEnabled(); - method public abstract void trace(java.lang.Object); - method public abstract void trace(java.lang.Object, java.lang.Throwable); - method public abstract void warn(java.lang.Object); - method public abstract void warn(java.lang.Object, java.lang.Throwable); - } - -} - -package org.apache.http { - - public deprecated class ConnectionClosedException extends java.io.IOException { - ctor public ConnectionClosedException(java.lang.String); - } - - public abstract deprecated interface ConnectionReuseStrategy { - method public abstract boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public abstract deprecated interface FormattedHeader implements org.apache.http.Header { - method public abstract org.apache.http.util.CharArrayBuffer getBuffer(); - method public abstract int getValuePos(); - } - - public abstract deprecated interface Header { - method public abstract org.apache.http.HeaderElement[] getElements() throws org.apache.http.ParseException; - method public abstract java.lang.String getName(); - method public abstract java.lang.String getValue(); - } - - public abstract deprecated interface HeaderElement { - method public abstract java.lang.String getName(); - method public abstract org.apache.http.NameValuePair getParameter(int); - method public abstract org.apache.http.NameValuePair getParameterByName(java.lang.String); - method public abstract int getParameterCount(); - method public abstract org.apache.http.NameValuePair[] getParameters(); - method public abstract java.lang.String getValue(); - } - - public abstract deprecated interface HeaderElementIterator implements java.util.Iterator { - method public abstract boolean hasNext(); - method public abstract org.apache.http.HeaderElement nextElement(); - } - - public abstract deprecated interface HeaderIterator implements java.util.Iterator { - method public abstract boolean hasNext(); - method public abstract org.apache.http.Header nextHeader(); - } - - public abstract deprecated interface HttpClientConnection implements org.apache.http.HttpConnection { - method public abstract void flush() throws java.io.IOException; - method public abstract boolean isResponseAvailable(int) throws java.io.IOException; - method public abstract void receiveResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public abstract org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpConnection { - method public abstract void close() throws java.io.IOException; - method public abstract org.apache.http.HttpConnectionMetrics getMetrics(); - method public abstract int getSocketTimeout(); - method public abstract boolean isOpen(); - method public abstract boolean isStale(); - method public abstract void setSocketTimeout(int); - method public abstract void shutdown() throws java.io.IOException; - } - - public abstract deprecated interface HttpConnectionMetrics { - method public abstract java.lang.Object getMetric(java.lang.String); - method public abstract long getReceivedBytesCount(); - method public abstract long getRequestCount(); - method public abstract long getResponseCount(); - method public abstract long getSentBytesCount(); - method public abstract void reset(); - } - - public abstract deprecated interface HttpEntity { - method public abstract void consumeContent() throws java.io.IOException; - method public abstract java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException; - method public abstract org.apache.http.Header getContentEncoding(); - method public abstract long getContentLength(); - method public abstract org.apache.http.Header getContentType(); - method public abstract boolean isChunked(); - method public abstract boolean isRepeatable(); - method public abstract boolean isStreaming(); - method public abstract void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public abstract deprecated interface HttpEntityEnclosingRequest implements org.apache.http.HttpRequest { - method public abstract boolean expectContinue(); - method public abstract org.apache.http.HttpEntity getEntity(); - method public abstract void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class HttpException extends java.lang.Exception { - ctor public HttpException(); - ctor public HttpException(java.lang.String); - ctor public HttpException(java.lang.String, java.lang.Throwable); - } - - public final deprecated class HttpHost implements java.lang.Cloneable { - ctor public HttpHost(java.lang.String, int, java.lang.String); - ctor public HttpHost(java.lang.String, int); - ctor public HttpHost(java.lang.String); - ctor public HttpHost(org.apache.http.HttpHost); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getHostName(); - method public int getPort(); - method public java.lang.String getSchemeName(); - method public java.lang.String toHostString(); - method public java.lang.String toURI(); - field public static final java.lang.String DEFAULT_SCHEME_NAME = "http"; - field protected final java.lang.String hostname; - field protected final java.lang.String lcHostname; - field protected final int port; - field protected final java.lang.String schemeName; - } - - public abstract deprecated interface HttpInetConnection implements org.apache.http.HttpConnection { - method public abstract java.net.InetAddress getLocalAddress(); - method public abstract int getLocalPort(); - method public abstract java.net.InetAddress getRemoteAddress(); - method public abstract int getRemotePort(); - } - - public abstract deprecated interface HttpMessage { - method public abstract void addHeader(org.apache.http.Header); - method public abstract void addHeader(java.lang.String, java.lang.String); - method public abstract boolean containsHeader(java.lang.String); - method public abstract org.apache.http.Header[] getAllHeaders(); - method public abstract org.apache.http.Header getFirstHeader(java.lang.String); - method public abstract org.apache.http.Header[] getHeaders(java.lang.String); - method public abstract org.apache.http.Header getLastHeader(java.lang.String); - method public abstract org.apache.http.params.HttpParams getParams(); - method public abstract org.apache.http.ProtocolVersion getProtocolVersion(); - method public abstract org.apache.http.HeaderIterator headerIterator(); - method public abstract org.apache.http.HeaderIterator headerIterator(java.lang.String); - method public abstract void removeHeader(org.apache.http.Header); - method public abstract void removeHeaders(java.lang.String); - method public abstract void setHeader(org.apache.http.Header); - method public abstract void setHeader(java.lang.String, java.lang.String); - method public abstract void setHeaders(org.apache.http.Header[]); - method public abstract void setParams(org.apache.http.params.HttpParams); - } - - public abstract deprecated interface HttpRequest implements org.apache.http.HttpMessage { - method public abstract org.apache.http.RequestLine getRequestLine(); - } - - public abstract deprecated interface HttpRequestFactory { - method public abstract org.apache.http.HttpRequest newHttpRequest(org.apache.http.RequestLine) throws org.apache.http.MethodNotSupportedException; - method public abstract org.apache.http.HttpRequest newHttpRequest(java.lang.String, java.lang.String) throws org.apache.http.MethodNotSupportedException; - } - - public abstract deprecated interface HttpRequestInterceptor { - method public abstract void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpResponse implements org.apache.http.HttpMessage { - method public abstract org.apache.http.HttpEntity getEntity(); - method public abstract java.util.Locale getLocale(); - method public abstract org.apache.http.StatusLine getStatusLine(); - method public abstract void setEntity(org.apache.http.HttpEntity); - method public abstract void setLocale(java.util.Locale); - method public abstract void setReasonPhrase(java.lang.String) throws java.lang.IllegalStateException; - method public abstract void setStatusCode(int) throws java.lang.IllegalStateException; - method public abstract void setStatusLine(org.apache.http.StatusLine); - method public abstract void setStatusLine(org.apache.http.ProtocolVersion, int); - method public abstract void setStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - } - - public abstract deprecated interface HttpResponseFactory { - method public abstract org.apache.http.HttpResponse newHttpResponse(org.apache.http.ProtocolVersion, int, org.apache.http.protocol.HttpContext); - method public abstract org.apache.http.HttpResponse newHttpResponse(org.apache.http.StatusLine, org.apache.http.protocol.HttpContext); - } - - public abstract deprecated interface HttpResponseInterceptor { - method public abstract void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpServerConnection implements org.apache.http.HttpConnection { - method public abstract void flush() throws java.io.IOException; - method public abstract void receiveRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public abstract org.apache.http.HttpRequest receiveRequestHeader() throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendResponseHeader(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpStatus { - field public static final int SC_ACCEPTED = 202; // 0xca - field public static final int SC_BAD_GATEWAY = 502; // 0x1f6 - field public static final int SC_BAD_REQUEST = 400; // 0x190 - field public static final int SC_CONFLICT = 409; // 0x199 - field public static final int SC_CONTINUE = 100; // 0x64 - field public static final int SC_CREATED = 201; // 0xc9 - field public static final int SC_EXPECTATION_FAILED = 417; // 0x1a1 - field public static final int SC_FAILED_DEPENDENCY = 424; // 0x1a8 - field public static final int SC_FORBIDDEN = 403; // 0x193 - field public static final int SC_GATEWAY_TIMEOUT = 504; // 0x1f8 - field public static final int SC_GONE = 410; // 0x19a - field public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505; // 0x1f9 - field public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419; // 0x1a3 - field public static final int SC_INSUFFICIENT_STORAGE = 507; // 0x1fb - field public static final int SC_INTERNAL_SERVER_ERROR = 500; // 0x1f4 - field public static final int SC_LENGTH_REQUIRED = 411; // 0x19b - field public static final int SC_LOCKED = 423; // 0x1a7 - field public static final int SC_METHOD_FAILURE = 420; // 0x1a4 - field public static final int SC_METHOD_NOT_ALLOWED = 405; // 0x195 - field public static final int SC_MOVED_PERMANENTLY = 301; // 0x12d - field public static final int SC_MOVED_TEMPORARILY = 302; // 0x12e - field public static final int SC_MULTIPLE_CHOICES = 300; // 0x12c - field public static final int SC_MULTI_STATUS = 207; // 0xcf - field public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203; // 0xcb - field public static final int SC_NOT_ACCEPTABLE = 406; // 0x196 - field public static final int SC_NOT_FOUND = 404; // 0x194 - field public static final int SC_NOT_IMPLEMENTED = 501; // 0x1f5 - field public static final int SC_NOT_MODIFIED = 304; // 0x130 - field public static final int SC_NO_CONTENT = 204; // 0xcc - field public static final int SC_OK = 200; // 0xc8 - field public static final int SC_PARTIAL_CONTENT = 206; // 0xce - field public static final int SC_PAYMENT_REQUIRED = 402; // 0x192 - field public static final int SC_PRECONDITION_FAILED = 412; // 0x19c - field public static final int SC_PROCESSING = 102; // 0x66 - field public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407; // 0x197 - field public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; // 0x1a0 - field public static final int SC_REQUEST_TIMEOUT = 408; // 0x198 - field public static final int SC_REQUEST_TOO_LONG = 413; // 0x19d - field public static final int SC_REQUEST_URI_TOO_LONG = 414; // 0x19e - field public static final int SC_RESET_CONTENT = 205; // 0xcd - field public static final int SC_SEE_OTHER = 303; // 0x12f - field public static final int SC_SERVICE_UNAVAILABLE = 503; // 0x1f7 - field public static final int SC_SWITCHING_PROTOCOLS = 101; // 0x65 - field public static final int SC_TEMPORARY_REDIRECT = 307; // 0x133 - field public static final int SC_UNAUTHORIZED = 401; // 0x191 - field public static final int SC_UNPROCESSABLE_ENTITY = 422; // 0x1a6 - field public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415; // 0x19f - field public static final int SC_USE_PROXY = 305; // 0x131 - } - - public final deprecated class HttpVersion extends org.apache.http.ProtocolVersion implements java.io.Serializable { - ctor public HttpVersion(int, int); - field public static final java.lang.String HTTP = "HTTP"; - field public static final org.apache.http.HttpVersion HTTP_0_9; - field public static final org.apache.http.HttpVersion HTTP_1_0; - field public static final org.apache.http.HttpVersion HTTP_1_1; - } - - public deprecated class MalformedChunkCodingException extends java.io.IOException { - ctor public MalformedChunkCodingException(); - ctor public MalformedChunkCodingException(java.lang.String); - } - - public deprecated class MethodNotSupportedException extends org.apache.http.HttpException { - ctor public MethodNotSupportedException(java.lang.String); - ctor public MethodNotSupportedException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface NameValuePair { - method public abstract java.lang.String getName(); - method public abstract java.lang.String getValue(); - } - - public deprecated class NoHttpResponseException extends java.io.IOException { - ctor public NoHttpResponseException(java.lang.String); - } - - public deprecated class ParseException extends java.lang.RuntimeException { - ctor public ParseException(); - ctor public ParseException(java.lang.String); - } - - public deprecated class ProtocolException extends org.apache.http.HttpException { - ctor public ProtocolException(); - ctor public ProtocolException(java.lang.String); - ctor public ProtocolException(java.lang.String, java.lang.Throwable); - } - - public deprecated class ProtocolVersion implements java.lang.Cloneable java.io.Serializable { - ctor public ProtocolVersion(java.lang.String, int, int); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public int compareToVersion(org.apache.http.ProtocolVersion); - method public final boolean equals(java.lang.Object); - method public org.apache.http.ProtocolVersion forVersion(int, int); - method public final int getMajor(); - method public final int getMinor(); - method public final java.lang.String getProtocol(); - method public final boolean greaterEquals(org.apache.http.ProtocolVersion); - method public final int hashCode(); - method public boolean isComparable(org.apache.http.ProtocolVersion); - method public final boolean lessEquals(org.apache.http.ProtocolVersion); - field protected final int major; - field protected final int minor; - field protected final java.lang.String protocol; - } - - public abstract deprecated interface ReasonPhraseCatalog { - method public abstract java.lang.String getReason(int, java.util.Locale); - } - - public abstract deprecated interface RequestLine { - method public abstract java.lang.String getMethod(); - method public abstract org.apache.http.ProtocolVersion getProtocolVersion(); - method public abstract java.lang.String getUri(); - } - - public abstract deprecated interface StatusLine { - method public abstract org.apache.http.ProtocolVersion getProtocolVersion(); - method public abstract java.lang.String getReasonPhrase(); - method public abstract int getStatusCode(); - } - - public abstract deprecated interface TokenIterator implements java.util.Iterator { - method public abstract boolean hasNext(); - method public abstract java.lang.String nextToken(); - } - - public deprecated class UnsupportedHttpVersionException extends org.apache.http.ProtocolException { - ctor public UnsupportedHttpVersionException(); - ctor public UnsupportedHttpVersionException(java.lang.String); - } - -} - -package org.apache.http.auth { - - public final deprecated class AUTH { - field public static final java.lang.String PROXY_AUTH = "Proxy-Authenticate"; - field public static final java.lang.String PROXY_AUTH_RESP = "Proxy-Authorization"; - field public static final java.lang.String WWW_AUTH = "WWW-Authenticate"; - field public static final java.lang.String WWW_AUTH_RESP = "Authorization"; - } - - public abstract deprecated interface AuthScheme { - method public abstract org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public abstract java.lang.String getParameter(java.lang.String); - method public abstract java.lang.String getRealm(); - method public abstract java.lang.String getSchemeName(); - method public abstract boolean isComplete(); - method public abstract boolean isConnectionBased(); - method public abstract void processChallenge(org.apache.http.Header) throws org.apache.http.auth.MalformedChallengeException; - } - - public abstract deprecated interface AuthSchemeFactory { - method public abstract org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams); - } - - public final deprecated class AuthSchemeRegistry { - ctor public AuthSchemeRegistry(); - method public synchronized org.apache.http.auth.AuthScheme getAuthScheme(java.lang.String, org.apache.http.params.HttpParams) throws java.lang.IllegalStateException; - method public synchronized java.util.List<java.lang.String> getSchemeNames(); - method public synchronized void register(java.lang.String, org.apache.http.auth.AuthSchemeFactory); - method public synchronized void setItems(java.util.Map<java.lang.String, org.apache.http.auth.AuthSchemeFactory>); - method public synchronized void unregister(java.lang.String); - } - - public deprecated class AuthScope { - ctor public AuthScope(java.lang.String, int, java.lang.String, java.lang.String); - ctor public AuthScope(java.lang.String, int, java.lang.String); - ctor public AuthScope(java.lang.String, int); - ctor public AuthScope(org.apache.http.auth.AuthScope); - method public java.lang.String getHost(); - method public int getPort(); - method public java.lang.String getRealm(); - method public java.lang.String getScheme(); - method public int match(org.apache.http.auth.AuthScope); - field public static final org.apache.http.auth.AuthScope ANY; - field public static final java.lang.String ANY_HOST; - field public static final int ANY_PORT = -1; // 0xffffffff - field public static final java.lang.String ANY_REALM; - field public static final java.lang.String ANY_SCHEME; - } - - public deprecated class AuthState { - ctor public AuthState(); - method public org.apache.http.auth.AuthScheme getAuthScheme(); - method public org.apache.http.auth.AuthScope getAuthScope(); - method public org.apache.http.auth.Credentials getCredentials(); - method public void invalidate(); - method public boolean isValid(); - method public void setAuthScheme(org.apache.http.auth.AuthScheme); - method public void setAuthScope(org.apache.http.auth.AuthScope); - method public void setCredentials(org.apache.http.auth.Credentials); - } - - public deprecated class AuthenticationException extends org.apache.http.ProtocolException { - ctor public AuthenticationException(); - ctor public AuthenticationException(java.lang.String); - ctor public AuthenticationException(java.lang.String, java.lang.Throwable); - } - - public final deprecated class BasicUserPrincipal implements java.security.Principal { - ctor public BasicUserPrincipal(java.lang.String); - method public java.lang.String getName(); - } - - public abstract deprecated interface Credentials { - method public abstract java.lang.String getPassword(); - method public abstract java.security.Principal getUserPrincipal(); - } - - public deprecated class InvalidCredentialsException extends org.apache.http.auth.AuthenticationException { - ctor public InvalidCredentialsException(); - ctor public InvalidCredentialsException(java.lang.String); - ctor public InvalidCredentialsException(java.lang.String, java.lang.Throwable); - } - - public deprecated class MalformedChallengeException extends org.apache.http.ProtocolException { - ctor public MalformedChallengeException(); - ctor public MalformedChallengeException(java.lang.String); - ctor public MalformedChallengeException(java.lang.String, java.lang.Throwable); - } - - public deprecated class NTCredentials implements org.apache.http.auth.Credentials { - ctor public NTCredentials(java.lang.String); - ctor public NTCredentials(java.lang.String, java.lang.String, java.lang.String, java.lang.String); - method public java.lang.String getDomain(); - method public java.lang.String getPassword(); - method public java.lang.String getUserName(); - method public java.security.Principal getUserPrincipal(); - method public java.lang.String getWorkstation(); - } - - public deprecated class NTUserPrincipal implements java.security.Principal { - ctor public NTUserPrincipal(java.lang.String, java.lang.String); - method public java.lang.String getDomain(); - method public java.lang.String getName(); - method public java.lang.String getUsername(); - } - - public deprecated class UsernamePasswordCredentials implements org.apache.http.auth.Credentials { - ctor public UsernamePasswordCredentials(java.lang.String); - ctor public UsernamePasswordCredentials(java.lang.String, java.lang.String); - method public java.lang.String getPassword(); - method public java.lang.String getUserName(); - method public java.security.Principal getUserPrincipal(); - } - -} - -package org.apache.http.auth.params { - - public abstract deprecated interface AuthPNames { - field public static final java.lang.String CREDENTIAL_CHARSET = "http.auth.credential-charset"; - } - - public deprecated class AuthParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public AuthParamBean(org.apache.http.params.HttpParams); - method public void setCredentialCharset(java.lang.String); - } - - public final deprecated class AuthParams { - method public static java.lang.String getCredentialCharset(org.apache.http.params.HttpParams); - method public static void setCredentialCharset(org.apache.http.params.HttpParams, java.lang.String); - } - -} - -package org.apache.http.client { - - public abstract deprecated interface AuthenticationHandler { - method public abstract java.util.Map<java.lang.String, org.apache.http.Header> getChallenges(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.MalformedChallengeException; - method public abstract boolean isAuthenticationRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - method public abstract org.apache.http.auth.AuthScheme selectScheme(java.util.Map<java.lang.String, org.apache.http.Header>, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.AuthenticationException; - } - - public deprecated class CircularRedirectException extends org.apache.http.client.RedirectException { - ctor public CircularRedirectException(); - ctor public CircularRedirectException(java.lang.String); - ctor public CircularRedirectException(java.lang.String, java.lang.Throwable); - } - - public deprecated class ClientProtocolException extends java.io.IOException { - ctor public ClientProtocolException(); - ctor public ClientProtocolException(java.lang.String); - ctor public ClientProtocolException(java.lang.Throwable); - ctor public ClientProtocolException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface CookieStore { - method public abstract void addCookie(org.apache.http.cookie.Cookie); - method public abstract void clear(); - method public abstract boolean clearExpired(java.util.Date); - method public abstract java.util.List<org.apache.http.cookie.Cookie> getCookies(); - } - - public abstract deprecated interface CredentialsProvider { - method public abstract void clear(); - method public abstract org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope); - method public abstract void setCredentials(org.apache.http.auth.AuthScope, org.apache.http.auth.Credentials); - } - - public abstract deprecated interface HttpClient { - method public abstract org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.conn.ClientConnectionManager getConnectionManager(); - method public abstract org.apache.http.params.HttpParams getParams(); - } - - public abstract deprecated interface HttpRequestRetryHandler { - method public abstract boolean retryRequest(java.io.IOException, int, org.apache.http.protocol.HttpContext); - } - - public deprecated class HttpResponseException extends org.apache.http.client.ClientProtocolException { - ctor public HttpResponseException(int, java.lang.String); - method public int getStatusCode(); - } - - public deprecated class NonRepeatableRequestException extends org.apache.http.ProtocolException { - ctor public NonRepeatableRequestException(); - ctor public NonRepeatableRequestException(java.lang.String); - } - - public deprecated class RedirectException extends org.apache.http.ProtocolException { - ctor public RedirectException(); - ctor public RedirectException(java.lang.String); - ctor public RedirectException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface RedirectHandler { - method public abstract java.net.URI getLocationURI(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.ProtocolException; - method public abstract boolean isRedirectRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public abstract deprecated interface RequestDirector { - method public abstract org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface ResponseHandler { - method public abstract T handleResponse(org.apache.http.HttpResponse) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - } - - public abstract deprecated interface UserTokenHandler { - method public abstract java.lang.Object getUserToken(org.apache.http.protocol.HttpContext); - } - -} - -package org.apache.http.client.entity { - - public deprecated class UrlEncodedFormEntity extends org.apache.http.entity.StringEntity { - ctor public UrlEncodedFormEntity(java.util.List<? extends org.apache.http.NameValuePair>, java.lang.String) throws java.io.UnsupportedEncodingException; - ctor public UrlEncodedFormEntity(java.util.List<? extends org.apache.http.NameValuePair>) throws java.io.UnsupportedEncodingException; - } - -} - -package org.apache.http.client.methods { - - public abstract deprecated interface AbortableHttpRequest { - method public abstract void abort(); - method public abstract void setConnectionRequest(org.apache.http.conn.ClientConnectionRequest) throws java.io.IOException; - method public abstract void setReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger) throws java.io.IOException; - } - - public deprecated class HttpDelete extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpDelete(); - ctor public HttpDelete(java.net.URI); - ctor public HttpDelete(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "DELETE"; - } - - public abstract deprecated class HttpEntityEnclosingRequestBase extends org.apache.http.client.methods.HttpRequestBase implements org.apache.http.HttpEntityEnclosingRequest { - ctor public HttpEntityEnclosingRequestBase(); - method public boolean expectContinue(); - method public org.apache.http.HttpEntity getEntity(); - method public void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class HttpGet extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpGet(); - ctor public HttpGet(java.net.URI); - ctor public HttpGet(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "GET"; - } - - public deprecated class HttpHead extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpHead(); - ctor public HttpHead(java.net.URI); - ctor public HttpHead(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "HEAD"; - } - - public deprecated class HttpOptions extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpOptions(); - ctor public HttpOptions(java.net.URI); - ctor public HttpOptions(java.lang.String); - method public java.util.Set<java.lang.String> getAllowedMethods(org.apache.http.HttpResponse); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "OPTIONS"; - } - - public deprecated class HttpPost extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase { - ctor public HttpPost(); - ctor public HttpPost(java.net.URI); - ctor public HttpPost(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "POST"; - } - - public deprecated class HttpPut extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase { - ctor public HttpPut(); - ctor public HttpPut(java.net.URI); - ctor public HttpPut(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "PUT"; - } - - public abstract deprecated class HttpRequestBase extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.client.methods.AbortableHttpRequest java.lang.Cloneable org.apache.http.client.methods.HttpUriRequest { - ctor public HttpRequestBase(); - method public void abort(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public abstract java.lang.String getMethod(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public org.apache.http.RequestLine getRequestLine(); - method public java.net.URI getURI(); - method public boolean isAborted(); - method public void setConnectionRequest(org.apache.http.conn.ClientConnectionRequest) throws java.io.IOException; - method public void setReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger) throws java.io.IOException; - method public void setURI(java.net.URI); - } - - public deprecated class HttpTrace extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpTrace(); - ctor public HttpTrace(java.net.URI); - ctor public HttpTrace(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "TRACE"; - } - - public abstract deprecated interface HttpUriRequest implements org.apache.http.HttpRequest { - method public abstract void abort() throws java.lang.UnsupportedOperationException; - method public abstract java.lang.String getMethod(); - method public abstract java.net.URI getURI(); - method public abstract boolean isAborted(); - } - -} - -package org.apache.http.client.params { - - public abstract deprecated interface AllClientPNames implements org.apache.http.auth.params.AuthPNames org.apache.http.client.params.ClientPNames org.apache.http.conn.params.ConnConnectionPNames org.apache.http.conn.params.ConnManagerPNames org.apache.http.conn.params.ConnRoutePNames org.apache.http.cookie.params.CookieSpecPNames org.apache.http.params.CoreConnectionPNames org.apache.http.params.CoreProtocolPNames { - } - - public final deprecated class AuthPolicy { - field public static final java.lang.String BASIC = "Basic"; - field public static final java.lang.String DIGEST = "Digest"; - field public static final java.lang.String NTLM = "NTLM"; - } - - public abstract deprecated interface ClientPNames { - field public static final java.lang.String ALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects"; - field public static final java.lang.String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory-object"; - field public static final java.lang.String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name"; - field public static final java.lang.String COOKIE_POLICY = "http.protocol.cookie-policy"; - field public static final java.lang.String DEFAULT_HEADERS = "http.default-headers"; - field public static final java.lang.String DEFAULT_HOST = "http.default-host"; - field public static final java.lang.String HANDLE_AUTHENTICATION = "http.protocol.handle-authentication"; - field public static final java.lang.String HANDLE_REDIRECTS = "http.protocol.handle-redirects"; - field public static final java.lang.String MAX_REDIRECTS = "http.protocol.max-redirects"; - field public static final java.lang.String REJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect"; - field public static final java.lang.String VIRTUAL_HOST = "http.virtual-host"; - } - - public deprecated class ClientParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ClientParamBean(org.apache.http.params.HttpParams); - method public void setAllowCircularRedirects(boolean); - method public void setConnectionManagerFactory(org.apache.http.conn.ClientConnectionManagerFactory); - method public void setConnectionManagerFactoryClassName(java.lang.String); - method public void setCookiePolicy(java.lang.String); - method public void setDefaultHeaders(java.util.Collection<org.apache.http.Header>); - method public void setDefaultHost(org.apache.http.HttpHost); - method public void setHandleAuthentication(boolean); - method public void setHandleRedirects(boolean); - method public void setMaxRedirects(int); - method public void setRejectRelativeRedirect(boolean); - method public void setVirtualHost(org.apache.http.HttpHost); - } - - public final deprecated class CookiePolicy { - field public static final java.lang.String BEST_MATCH = "best-match"; - field public static final java.lang.String BROWSER_COMPATIBILITY = "compatibility"; - field public static final java.lang.String NETSCAPE = "netscape"; - field public static final java.lang.String RFC_2109 = "rfc2109"; - field public static final java.lang.String RFC_2965 = "rfc2965"; - } - - public deprecated class HttpClientParams { - method public static java.lang.String getCookiePolicy(org.apache.http.params.HttpParams); - method public static boolean isAuthenticating(org.apache.http.params.HttpParams); - method public static boolean isRedirecting(org.apache.http.params.HttpParams); - method public static void setAuthenticating(org.apache.http.params.HttpParams, boolean); - method public static void setCookiePolicy(org.apache.http.params.HttpParams, java.lang.String); - method public static void setRedirecting(org.apache.http.params.HttpParams, boolean); - } - -} - -package org.apache.http.client.protocol { - - public abstract deprecated interface ClientContext { - field public static final java.lang.String AUTHSCHEME_REGISTRY = "http.authscheme-registry"; - field public static final java.lang.String AUTH_SCHEME_PREF = "http.auth.scheme-pref"; - field public static final java.lang.String COOKIESPEC_REGISTRY = "http.cookiespec-registry"; - field public static final java.lang.String COOKIE_ORIGIN = "http.cookie-origin"; - field public static final java.lang.String COOKIE_SPEC = "http.cookie-spec"; - field public static final java.lang.String COOKIE_STORE = "http.cookie-store"; - field public static final java.lang.String CREDS_PROVIDER = "http.auth.credentials-provider"; - field public static final java.lang.String PROXY_AUTH_STATE = "http.auth.proxy-scope"; - field public static final java.lang.String TARGET_AUTH_STATE = "http.auth.target-scope"; - field public static final java.lang.String USER_TOKEN = "http.user-token"; - } - - public deprecated class ClientContextConfigurer implements org.apache.http.client.protocol.ClientContext { - ctor public ClientContextConfigurer(org.apache.http.protocol.HttpContext); - method public void setAuthSchemePref(java.util.List<java.lang.String>); - method public void setAuthSchemeRegistry(org.apache.http.auth.AuthSchemeRegistry); - method public void setCookieSpecRegistry(org.apache.http.cookie.CookieSpecRegistry); - method public void setCookieStore(org.apache.http.client.CookieStore); - method public void setCredentialsProvider(org.apache.http.client.CredentialsProvider); - } - - public deprecated class RequestAddCookies implements org.apache.http.HttpRequestInterceptor { - ctor public RequestAddCookies(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestDefaultHeaders implements org.apache.http.HttpRequestInterceptor { - ctor public RequestDefaultHeaders(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestProxyAuthentication implements org.apache.http.HttpRequestInterceptor { - ctor public RequestProxyAuthentication(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestTargetAuthentication implements org.apache.http.HttpRequestInterceptor { - ctor public RequestTargetAuthentication(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseProcessCookies implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseProcessCookies(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - -} - -package org.apache.http.client.utils { - - public deprecated class CloneUtils { - method public static java.lang.Object clone(java.lang.Object) throws java.lang.CloneNotSupportedException; - } - - public deprecated class URIUtils { - method public static java.net.URI createURI(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String) throws java.net.URISyntaxException; - method public static java.net.URI resolve(java.net.URI, java.lang.String); - method public static java.net.URI resolve(java.net.URI, java.net.URI); - method public static java.net.URI rewriteURI(java.net.URI, org.apache.http.HttpHost, boolean) throws java.net.URISyntaxException; - method public static java.net.URI rewriteURI(java.net.URI, org.apache.http.HttpHost) throws java.net.URISyntaxException; - } - - public deprecated class URLEncodedUtils { - ctor public URLEncodedUtils(); - method public static java.lang.String format(java.util.List<? extends org.apache.http.NameValuePair>, java.lang.String); - method public static boolean isEncoded(org.apache.http.HttpEntity); - method public static java.util.List<org.apache.http.NameValuePair> parse(java.net.URI, java.lang.String); - method public static java.util.List<org.apache.http.NameValuePair> parse(org.apache.http.HttpEntity) throws java.io.IOException; - method public static void parse(java.util.List<org.apache.http.NameValuePair>, java.util.Scanner, java.lang.String); - field public static final java.lang.String CONTENT_TYPE = "application/x-www-form-urlencoded"; - } - -} - package org.apache.http.conn { - public deprecated class BasicEofSensorWatcher implements org.apache.http.conn.EofSensorWatcher { - ctor public BasicEofSensorWatcher(org.apache.http.conn.ManagedClientConnection, boolean); - method public boolean eofDetected(java.io.InputStream) throws java.io.IOException; - method public boolean streamAbort(java.io.InputStream) throws java.io.IOException; - method public boolean streamClosed(java.io.InputStream) throws java.io.IOException; - field protected boolean attemptReuse; - field protected org.apache.http.conn.ManagedClientConnection managedConn; - } - - public deprecated class BasicManagedEntity extends org.apache.http.entity.HttpEntityWrapper implements org.apache.http.conn.ConnectionReleaseTrigger org.apache.http.conn.EofSensorWatcher { - ctor public BasicManagedEntity(org.apache.http.HttpEntity, org.apache.http.conn.ManagedClientConnection, boolean); - method public void abortConnection() throws java.io.IOException; - method public boolean eofDetected(java.io.InputStream) throws java.io.IOException; - method public void releaseConnection() throws java.io.IOException; - method protected void releaseManagedConnection() throws java.io.IOException; - method public boolean streamAbort(java.io.InputStream) throws java.io.IOException; - method public boolean streamClosed(java.io.InputStream) throws java.io.IOException; - field protected final boolean attemptReuse; - field protected org.apache.http.conn.ManagedClientConnection managedConn; - } - - public abstract deprecated interface ClientConnectionManager { - method public abstract void closeExpiredConnections(); - method public abstract void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method public abstract org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry(); - method public abstract void releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit); - method public abstract org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public abstract void shutdown(); - } - - public abstract deprecated interface ClientConnectionManagerFactory { - method public abstract org.apache.http.conn.ClientConnectionManager newInstance(org.apache.http.params.HttpParams, org.apache.http.conn.scheme.SchemeRegistry); - } - - public abstract deprecated interface ClientConnectionOperator { - method public abstract org.apache.http.conn.OperatedClientConnection createConnection(); - method public abstract void openConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void updateSecureConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public abstract deprecated interface ClientConnectionRequest { - method public abstract void abortRequest(); - method public abstract org.apache.http.conn.ManagedClientConnection getConnection(long, java.util.concurrent.TimeUnit) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - } - public deprecated class ConnectTimeoutException extends java.io.InterruptedIOException { ctor public ConnectTimeoutException(); ctor public ConnectTimeoutException(java.lang.String); } - public abstract deprecated interface ConnectionKeepAliveStrategy { - method public abstract long getKeepAliveDuration(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class ConnectionPoolTimeoutException extends org.apache.http.conn.ConnectTimeoutException { - ctor public ConnectionPoolTimeoutException(); - ctor public ConnectionPoolTimeoutException(java.lang.String); - } - - public abstract deprecated interface ConnectionReleaseTrigger { - method public abstract void abortConnection() throws java.io.IOException; - method public abstract void releaseConnection() throws java.io.IOException; - } - - public deprecated class EofSensorInputStream extends java.io.InputStream implements org.apache.http.conn.ConnectionReleaseTrigger { - ctor public EofSensorInputStream(java.io.InputStream, org.apache.http.conn.EofSensorWatcher); - method public void abortConnection() throws java.io.IOException; - method protected void checkAbort() throws java.io.IOException; - method protected void checkClose() throws java.io.IOException; - method protected void checkEOF(int) throws java.io.IOException; - method protected boolean isReadAllowed() throws java.io.IOException; - method public int read() throws java.io.IOException; - method public void releaseConnection() throws java.io.IOException; - field protected java.io.InputStream wrappedStream; - } - - public abstract deprecated interface EofSensorWatcher { - method public abstract boolean eofDetected(java.io.InputStream) throws java.io.IOException; - method public abstract boolean streamAbort(java.io.InputStream) throws java.io.IOException; - method public abstract boolean streamClosed(java.io.InputStream) throws java.io.IOException; - } - - public deprecated class HttpHostConnectException extends java.net.ConnectException { - ctor public HttpHostConnectException(org.apache.http.HttpHost, java.net.ConnectException); - method public org.apache.http.HttpHost getHost(); - } - - public abstract deprecated interface ManagedClientConnection implements org.apache.http.conn.ConnectionReleaseTrigger org.apache.http.HttpClientConnection org.apache.http.HttpInetConnection { - method public abstract org.apache.http.conn.routing.HttpRoute getRoute(); - method public abstract javax.net.ssl.SSLSession getSSLSession(); - method public abstract java.lang.Object getState(); - method public abstract boolean isMarkedReusable(); - method public abstract boolean isSecure(); - method public abstract void layerProtocol(org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void markReusable(); - method public abstract void open(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void setIdleDuration(long, java.util.concurrent.TimeUnit); - method public abstract void setState(java.lang.Object); - method public abstract void tunnelProxy(org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void tunnelTarget(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void unmarkReusable(); - } - - public final deprecated class MultihomePlainSocketFactory implements org.apache.http.conn.scheme.SocketFactory { - method public java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.Socket createSocket(); - method public static org.apache.http.conn.MultihomePlainSocketFactory getSocketFactory(); - method public final boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException; - } - - public abstract deprecated interface OperatedClientConnection implements org.apache.http.HttpClientConnection org.apache.http.HttpInetConnection { - method public abstract java.net.Socket getSocket(); - method public abstract org.apache.http.HttpHost getTargetHost(); - method public abstract boolean isSecure(); - method public abstract void openCompleted(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void opening(java.net.Socket, org.apache.http.HttpHost) throws java.io.IOException; - method public abstract void update(java.net.Socket, org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - } - -} - -package org.apache.http.conn.params { - - public abstract deprecated interface ConnConnectionPNames { - field public static final java.lang.String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage"; - } - - public deprecated class ConnConnectionParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ConnConnectionParamBean(org.apache.http.params.HttpParams); - method public void setMaxStatusLineGarbage(int); - } - - public abstract deprecated interface ConnManagerPNames { - field public static final java.lang.String MAX_CONNECTIONS_PER_ROUTE = "http.conn-manager.max-per-route"; - field public static final java.lang.String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total"; - field public static final java.lang.String TIMEOUT = "http.conn-manager.timeout"; - } - - public deprecated class ConnManagerParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ConnManagerParamBean(org.apache.http.params.HttpParams); - method public void setConnectionsPerRoute(org.apache.http.conn.params.ConnPerRouteBean); - method public void setMaxTotalConnections(int); - method public void setTimeout(long); - } - - public final deprecated class ConnManagerParams implements org.apache.http.conn.params.ConnManagerPNames { - ctor public ConnManagerParams(); - method public static org.apache.http.conn.params.ConnPerRoute getMaxConnectionsPerRoute(org.apache.http.params.HttpParams); - method public static int getMaxTotalConnections(org.apache.http.params.HttpParams); - method public static long getTimeout(org.apache.http.params.HttpParams); - method public static void setMaxConnectionsPerRoute(org.apache.http.params.HttpParams, org.apache.http.conn.params.ConnPerRoute); - method public static void setMaxTotalConnections(org.apache.http.params.HttpParams, int); - method public static void setTimeout(org.apache.http.params.HttpParams, long); - field public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20; // 0x14 - } - - public abstract deprecated interface ConnPerRoute { - method public abstract int getMaxForRoute(org.apache.http.conn.routing.HttpRoute); - } - - public final deprecated class ConnPerRouteBean implements org.apache.http.conn.params.ConnPerRoute { - ctor public ConnPerRouteBean(int); - ctor public ConnPerRouteBean(); - method public int getDefaultMax(); - method public int getMaxForRoute(org.apache.http.conn.routing.HttpRoute); - method public void setDefaultMaxPerRoute(int); - method public void setMaxForRoute(org.apache.http.conn.routing.HttpRoute, int); - method public void setMaxForRoutes(java.util.Map<org.apache.http.conn.routing.HttpRoute, java.lang.Integer>); - field public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 2; // 0x2 - } - - public abstract deprecated interface ConnRoutePNames { - field public static final java.lang.String DEFAULT_PROXY = "http.route.default-proxy"; - field public static final java.lang.String FORCED_ROUTE = "http.route.forced-route"; - field public static final java.lang.String LOCAL_ADDRESS = "http.route.local-address"; - } - - public deprecated class ConnRouteParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ConnRouteParamBean(org.apache.http.params.HttpParams); - method public void setDefaultProxy(org.apache.http.HttpHost); - method public void setForcedRoute(org.apache.http.conn.routing.HttpRoute); - method public void setLocalAddress(java.net.InetAddress); - } - - public deprecated class ConnRouteParams implements org.apache.http.conn.params.ConnRoutePNames { - method public static org.apache.http.HttpHost getDefaultProxy(org.apache.http.params.HttpParams); - method public static org.apache.http.conn.routing.HttpRoute getForcedRoute(org.apache.http.params.HttpParams); - method public static java.net.InetAddress getLocalAddress(org.apache.http.params.HttpParams); - method public static void setDefaultProxy(org.apache.http.params.HttpParams, org.apache.http.HttpHost); - method public static void setForcedRoute(org.apache.http.params.HttpParams, org.apache.http.conn.routing.HttpRoute); - method public static void setLocalAddress(org.apache.http.params.HttpParams, java.net.InetAddress); - field public static final org.apache.http.HttpHost NO_HOST; - field public static final org.apache.http.conn.routing.HttpRoute NO_ROUTE; - } - -} - -package org.apache.http.conn.routing { - - public deprecated class BasicRouteDirector implements org.apache.http.conn.routing.HttpRouteDirector { - ctor public BasicRouteDirector(); - method protected int directStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - method protected int firstStep(org.apache.http.conn.routing.RouteInfo); - method public int nextStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - method protected int proxiedStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - } - - public final deprecated class HttpRoute implements java.lang.Cloneable org.apache.http.conn.routing.RouteInfo { - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.HttpHost[], boolean, org.apache.http.conn.routing.RouteInfo.TunnelType, org.apache.http.conn.routing.RouteInfo.LayerType); - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.HttpHost, boolean, org.apache.http.conn.routing.RouteInfo.TunnelType, org.apache.http.conn.routing.RouteInfo.LayerType); - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, boolean); - ctor public HttpRoute(org.apache.http.HttpHost); - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.HttpHost, boolean); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public final boolean equals(java.lang.Object); - method public final int getHopCount(); - method public final org.apache.http.HttpHost getHopTarget(int); - method public final org.apache.http.conn.routing.RouteInfo.LayerType getLayerType(); - method public final java.net.InetAddress getLocalAddress(); - method public final org.apache.http.HttpHost getProxyHost(); - method public final org.apache.http.HttpHost getTargetHost(); - method public final org.apache.http.conn.routing.RouteInfo.TunnelType getTunnelType(); - method public final int hashCode(); - method public final boolean isLayered(); - method public final boolean isSecure(); - method public final boolean isTunnelled(); - method public final java.lang.String toString(); - } - - public abstract deprecated interface HttpRouteDirector { - method public abstract int nextStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - field public static final int COMPLETE = 0; // 0x0 - field public static final int CONNECT_PROXY = 2; // 0x2 - field public static final int CONNECT_TARGET = 1; // 0x1 - field public static final int LAYER_PROTOCOL = 5; // 0x5 - field public static final int TUNNEL_PROXY = 4; // 0x4 - field public static final int TUNNEL_TARGET = 3; // 0x3 - field public static final int UNREACHABLE = -1; // 0xffffffff - } - - public abstract deprecated interface HttpRoutePlanner { - method public abstract org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - } - - public abstract deprecated interface RouteInfo { - method public abstract int getHopCount(); - method public abstract org.apache.http.HttpHost getHopTarget(int); - method public abstract org.apache.http.conn.routing.RouteInfo.LayerType getLayerType(); - method public abstract java.net.InetAddress getLocalAddress(); - method public abstract org.apache.http.HttpHost getProxyHost(); - method public abstract org.apache.http.HttpHost getTargetHost(); - method public abstract org.apache.http.conn.routing.RouteInfo.TunnelType getTunnelType(); - method public abstract boolean isLayered(); - method public abstract boolean isSecure(); - method public abstract boolean isTunnelled(); - } - - public static final class RouteInfo.LayerType extends java.lang.Enum { - method public static org.apache.http.conn.routing.RouteInfo.LayerType valueOf(java.lang.String); - method public static final org.apache.http.conn.routing.RouteInfo.LayerType[] values(); - enum_constant public static final org.apache.http.conn.routing.RouteInfo.LayerType LAYERED; - enum_constant public static final org.apache.http.conn.routing.RouteInfo.LayerType PLAIN; - } - - public static final class RouteInfo.TunnelType extends java.lang.Enum { - method public static org.apache.http.conn.routing.RouteInfo.TunnelType valueOf(java.lang.String); - method public static final org.apache.http.conn.routing.RouteInfo.TunnelType[] values(); - enum_constant public static final org.apache.http.conn.routing.RouteInfo.TunnelType PLAIN; - enum_constant public static final org.apache.http.conn.routing.RouteInfo.TunnelType TUNNELLED; - } - - public final deprecated class RouteTracker implements java.lang.Cloneable org.apache.http.conn.routing.RouteInfo { - ctor public RouteTracker(org.apache.http.HttpHost, java.net.InetAddress); - ctor public RouteTracker(org.apache.http.conn.routing.HttpRoute); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public final void connectProxy(org.apache.http.HttpHost, boolean); - method public final void connectTarget(boolean); - method public final boolean equals(java.lang.Object); - method public final int getHopCount(); - method public final org.apache.http.HttpHost getHopTarget(int); - method public final org.apache.http.conn.routing.RouteInfo.LayerType getLayerType(); - method public final java.net.InetAddress getLocalAddress(); - method public final org.apache.http.HttpHost getProxyHost(); - method public final org.apache.http.HttpHost getTargetHost(); - method public final org.apache.http.conn.routing.RouteInfo.TunnelType getTunnelType(); - method public final int hashCode(); - method public final boolean isConnected(); - method public final boolean isLayered(); - method public final boolean isSecure(); - method public final boolean isTunnelled(); - method public final void layerProtocol(boolean); - method public final org.apache.http.conn.routing.HttpRoute toRoute(); - method public final java.lang.String toString(); - method public final void tunnelProxy(org.apache.http.HttpHost, boolean); - method public final void tunnelTarget(boolean); - } - } package org.apache.http.conn.scheme { @@ -55977,37 +54883,6 @@ package org.apache.http.conn.scheme { method public abstract java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException, java.net.UnknownHostException; } - public final deprecated class PlainSocketFactory implements org.apache.http.conn.scheme.SocketFactory { - ctor public PlainSocketFactory(org.apache.http.conn.scheme.HostNameResolver); - ctor public PlainSocketFactory(); - method public java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.Socket createSocket(); - method public static org.apache.http.conn.scheme.PlainSocketFactory getSocketFactory(); - method public final boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException; - } - - public final deprecated class Scheme { - ctor public Scheme(java.lang.String, org.apache.http.conn.scheme.SocketFactory, int); - method public final boolean equals(java.lang.Object); - method public final int getDefaultPort(); - method public final java.lang.String getName(); - method public final org.apache.http.conn.scheme.SocketFactory getSocketFactory(); - method public final boolean isLayered(); - method public final int resolvePort(int); - method public final java.lang.String toString(); - } - - public final deprecated class SchemeRegistry { - ctor public SchemeRegistry(); - method public final synchronized org.apache.http.conn.scheme.Scheme get(java.lang.String); - method public final synchronized org.apache.http.conn.scheme.Scheme getScheme(java.lang.String); - method public final synchronized org.apache.http.conn.scheme.Scheme getScheme(org.apache.http.HttpHost); - method public final synchronized java.util.List<java.lang.String> getSchemeNames(); - method public final synchronized org.apache.http.conn.scheme.Scheme register(org.apache.http.conn.scheme.Scheme); - method public synchronized void setItems(java.util.Map<java.lang.String, org.apache.http.conn.scheme.Scheme>); - method public final synchronized org.apache.http.conn.scheme.Scheme unregister(java.lang.String); - } - public abstract deprecated interface SocketFactory { method public abstract java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws org.apache.http.conn.ConnectTimeoutException, java.io.IOException, java.net.UnknownHostException; method public abstract java.net.Socket createSocket() throws java.io.IOException; @@ -56077,1818 +54952,8 @@ package org.apache.http.conn.ssl { } -package org.apache.http.conn.util { - - public deprecated class InetAddressUtils { - method public static boolean isIPv4Address(java.lang.String); - method public static boolean isIPv6Address(java.lang.String); - method public static boolean isIPv6HexCompressedAddress(java.lang.String); - method public static boolean isIPv6StdAddress(java.lang.String); - } - -} - -package org.apache.http.cookie { - - public abstract deprecated interface ClientCookie implements org.apache.http.cookie.Cookie { - method public abstract boolean containsAttribute(java.lang.String); - method public abstract java.lang.String getAttribute(java.lang.String); - field public static final java.lang.String COMMENTURL_ATTR = "commenturl"; - field public static final java.lang.String COMMENT_ATTR = "comment"; - field public static final java.lang.String DISCARD_ATTR = "discard"; - field public static final java.lang.String DOMAIN_ATTR = "domain"; - field public static final java.lang.String EXPIRES_ATTR = "expires"; - field public static final java.lang.String MAX_AGE_ATTR = "max-age"; - field public static final java.lang.String PATH_ATTR = "path"; - field public static final java.lang.String PORT_ATTR = "port"; - field public static final java.lang.String SECURE_ATTR = "secure"; - field public static final java.lang.String VERSION_ATTR = "version"; - } - - public abstract deprecated interface Cookie { - method public abstract java.lang.String getComment(); - method public abstract java.lang.String getCommentURL(); - method public abstract java.lang.String getDomain(); - method public abstract java.util.Date getExpiryDate(); - method public abstract java.lang.String getName(); - method public abstract java.lang.String getPath(); - method public abstract int[] getPorts(); - method public abstract java.lang.String getValue(); - method public abstract int getVersion(); - method public abstract boolean isExpired(java.util.Date); - method public abstract boolean isPersistent(); - method public abstract boolean isSecure(); - } - - public abstract deprecated interface CookieAttributeHandler { - method public abstract boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public abstract void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public abstract void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class CookieIdentityComparator implements java.util.Comparator java.io.Serializable { - ctor public CookieIdentityComparator(); - method public int compare(org.apache.http.cookie.Cookie, org.apache.http.cookie.Cookie); - } - - public final deprecated class CookieOrigin { - ctor public CookieOrigin(java.lang.String, int, java.lang.String, boolean); - method public java.lang.String getHost(); - method public java.lang.String getPath(); - method public int getPort(); - method public boolean isSecure(); - } - - public deprecated class CookiePathComparator implements java.util.Comparator java.io.Serializable { - ctor public CookiePathComparator(); - method public int compare(org.apache.http.cookie.Cookie, org.apache.http.cookie.Cookie); - } - - public abstract deprecated interface CookieSpec { - method public abstract java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public abstract int getVersion(); - method public abstract org.apache.http.Header getVersionHeader(); - method public abstract boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public abstract java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - method public abstract void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public abstract deprecated interface CookieSpecFactory { - method public abstract org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public final deprecated class CookieSpecRegistry { - ctor public CookieSpecRegistry(); - method public synchronized org.apache.http.cookie.CookieSpec getCookieSpec(java.lang.String, org.apache.http.params.HttpParams) throws java.lang.IllegalStateException; - method public synchronized org.apache.http.cookie.CookieSpec getCookieSpec(java.lang.String) throws java.lang.IllegalStateException; - method public synchronized java.util.List<java.lang.String> getSpecNames(); - method public synchronized void register(java.lang.String, org.apache.http.cookie.CookieSpecFactory); - method public synchronized void setItems(java.util.Map<java.lang.String, org.apache.http.cookie.CookieSpecFactory>); - method public synchronized void unregister(java.lang.String); - } - - public deprecated class MalformedCookieException extends org.apache.http.ProtocolException { - ctor public MalformedCookieException(); - ctor public MalformedCookieException(java.lang.String); - ctor public MalformedCookieException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface SM { - field public static final java.lang.String COOKIE = "Cookie"; - field public static final java.lang.String COOKIE2 = "Cookie2"; - field public static final java.lang.String SET_COOKIE = "Set-Cookie"; - field public static final java.lang.String SET_COOKIE2 = "Set-Cookie2"; - } - - public abstract deprecated interface SetCookie implements org.apache.http.cookie.Cookie { - method public abstract void setComment(java.lang.String); - method public abstract void setDomain(java.lang.String); - method public abstract void setExpiryDate(java.util.Date); - method public abstract void setPath(java.lang.String); - method public abstract void setSecure(boolean); - method public abstract void setValue(java.lang.String); - method public abstract void setVersion(int); - } - - public abstract deprecated interface SetCookie2 implements org.apache.http.cookie.SetCookie { - method public abstract void setCommentURL(java.lang.String); - method public abstract void setDiscard(boolean); - method public abstract void setPorts(int[]); - } - -} - -package org.apache.http.cookie.params { - - public abstract deprecated interface CookieSpecPNames { - field public static final java.lang.String DATE_PATTERNS = "http.protocol.cookie-datepatterns"; - field public static final java.lang.String SINGLE_COOKIE_HEADER = "http.protocol.single-cookie-header"; - } - - public deprecated class CookieSpecParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public CookieSpecParamBean(org.apache.http.params.HttpParams); - method public void setDatePatterns(java.util.Collection<java.lang.String>); - method public void setSingleHeader(boolean); - } - -} - -package org.apache.http.entity { - - public abstract deprecated class AbstractHttpEntity implements org.apache.http.HttpEntity { - ctor protected AbstractHttpEntity(); - method public void consumeContent() throws java.io.IOException, java.lang.UnsupportedOperationException; - method public org.apache.http.Header getContentEncoding(); - method public org.apache.http.Header getContentType(); - method public boolean isChunked(); - method public void setChunked(boolean); - method public void setContentEncoding(org.apache.http.Header); - method public void setContentEncoding(java.lang.String); - method public void setContentType(org.apache.http.Header); - method public void setContentType(java.lang.String); - field protected boolean chunked; - field protected org.apache.http.Header contentEncoding; - field protected org.apache.http.Header contentType; - } - - public deprecated class BasicHttpEntity extends org.apache.http.entity.AbstractHttpEntity { - ctor public BasicHttpEntity(); - method public java.io.InputStream getContent() throws java.lang.IllegalStateException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void setContent(java.io.InputStream); - method public void setContentLength(long); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class BufferedHttpEntity extends org.apache.http.entity.HttpEntityWrapper { - ctor public BufferedHttpEntity(org.apache.http.HttpEntity) throws java.io.IOException; - } - - public deprecated class ByteArrayEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { - ctor public ByteArrayEntity(byte[]); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.io.InputStream getContent(); - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected final byte[] content; - } - - public abstract deprecated interface ContentLengthStrategy { - method public abstract long determineLength(org.apache.http.HttpMessage) throws org.apache.http.HttpException; - field public static final int CHUNKED = -2; // 0xfffffffe - field public static final int IDENTITY = -1; // 0xffffffff - } - - public abstract deprecated interface ContentProducer { - method public abstract void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class EntityTemplate extends org.apache.http.entity.AbstractHttpEntity { - ctor public EntityTemplate(org.apache.http.entity.ContentProducer); - method public java.io.InputStream getContent(); - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class FileEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { - ctor public FileEntity(java.io.File, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.io.InputStream getContent() throws java.io.IOException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected final java.io.File file; - } - - public deprecated class HttpEntityWrapper implements org.apache.http.HttpEntity { - ctor public HttpEntityWrapper(org.apache.http.HttpEntity); - method public void consumeContent() throws java.io.IOException; - method public java.io.InputStream getContent() throws java.io.IOException; - method public org.apache.http.Header getContentEncoding(); - method public long getContentLength(); - method public org.apache.http.Header getContentType(); - method public boolean isChunked(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected org.apache.http.HttpEntity wrappedEntity; - } - - public deprecated class InputStreamEntity extends org.apache.http.entity.AbstractHttpEntity { - ctor public InputStreamEntity(java.io.InputStream, long); - method public java.io.InputStream getContent() throws java.io.IOException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class SerializableEntity extends org.apache.http.entity.AbstractHttpEntity { - ctor public SerializableEntity(java.io.Serializable, boolean) throws java.io.IOException; - method public java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class StringEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { - ctor public StringEntity(java.lang.String, java.lang.String) throws java.io.UnsupportedEncodingException; - ctor public StringEntity(java.lang.String) throws java.io.UnsupportedEncodingException; - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.io.InputStream getContent() throws java.io.IOException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected final byte[] content; - } - -} - -package org.apache.http.impl { - - public abstract deprecated class AbstractHttpClientConnection implements org.apache.http.HttpClientConnection { - ctor public AbstractHttpClientConnection(); - method protected abstract void assertOpen() throws java.lang.IllegalStateException; - method protected org.apache.http.impl.entity.EntityDeserializer createEntityDeserializer(); - method protected org.apache.http.impl.entity.EntitySerializer createEntitySerializer(); - method protected org.apache.http.HttpResponseFactory createHttpResponseFactory(); - method protected org.apache.http.io.HttpMessageWriter createRequestWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method protected org.apache.http.io.HttpMessageParser createResponseParser(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpResponseFactory, org.apache.http.params.HttpParams); - method protected void doFlush() throws java.io.IOException; - method public void flush() throws java.io.IOException; - method public org.apache.http.HttpConnectionMetrics getMetrics(); - method protected void init(org.apache.http.io.SessionInputBuffer, org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method public boolean isResponseAvailable(int) throws java.io.IOException; - method public boolean isStale(); - method public void receiveResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, java.io.IOException; - method public void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated class AbstractHttpServerConnection implements org.apache.http.HttpServerConnection { - ctor public AbstractHttpServerConnection(); - method protected abstract void assertOpen() throws java.lang.IllegalStateException; - method protected org.apache.http.impl.entity.EntityDeserializer createEntityDeserializer(); - method protected org.apache.http.impl.entity.EntitySerializer createEntitySerializer(); - method protected org.apache.http.HttpRequestFactory createHttpRequestFactory(); - method protected org.apache.http.io.HttpMessageParser createRequestParser(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpRequestFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.io.HttpMessageWriter createResponseWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method protected void doFlush() throws java.io.IOException; - method public void flush() throws java.io.IOException; - method public org.apache.http.HttpConnectionMetrics getMetrics(); - method protected void init(org.apache.http.io.SessionInputBuffer, org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method public boolean isStale(); - method public void receiveRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpRequest receiveRequestHeader() throws org.apache.http.HttpException, java.io.IOException; - method public void sendResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public void sendResponseHeader(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class DefaultConnectionReuseStrategy implements org.apache.http.ConnectionReuseStrategy { - ctor public DefaultConnectionReuseStrategy(); - method protected org.apache.http.TokenIterator createTokenIterator(org.apache.http.HeaderIterator); - method public boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultHttpClientConnection extends org.apache.http.impl.SocketHttpClientConnection { - ctor public DefaultHttpClientConnection(); - method public void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public deprecated class DefaultHttpRequestFactory implements org.apache.http.HttpRequestFactory { - ctor public DefaultHttpRequestFactory(); - method public org.apache.http.HttpRequest newHttpRequest(org.apache.http.RequestLine) throws org.apache.http.MethodNotSupportedException; - method public org.apache.http.HttpRequest newHttpRequest(java.lang.String, java.lang.String) throws org.apache.http.MethodNotSupportedException; - } - - public deprecated class DefaultHttpResponseFactory implements org.apache.http.HttpResponseFactory { - ctor public DefaultHttpResponseFactory(org.apache.http.ReasonPhraseCatalog); - ctor public DefaultHttpResponseFactory(); - method protected java.util.Locale determineLocale(org.apache.http.protocol.HttpContext); - method public org.apache.http.HttpResponse newHttpResponse(org.apache.http.ProtocolVersion, int, org.apache.http.protocol.HttpContext); - method public org.apache.http.HttpResponse newHttpResponse(org.apache.http.StatusLine, org.apache.http.protocol.HttpContext); - field protected final org.apache.http.ReasonPhraseCatalog reasonCatalog; - } - - public deprecated class DefaultHttpServerConnection extends org.apache.http.impl.SocketHttpServerConnection { - ctor public DefaultHttpServerConnection(); - method public void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public deprecated class EnglishReasonPhraseCatalog implements org.apache.http.ReasonPhraseCatalog { - ctor protected EnglishReasonPhraseCatalog(); - method public java.lang.String getReason(int, java.util.Locale); - field public static final org.apache.http.impl.EnglishReasonPhraseCatalog INSTANCE; - } - - public deprecated class HttpConnectionMetricsImpl implements org.apache.http.HttpConnectionMetrics { - ctor public HttpConnectionMetricsImpl(org.apache.http.io.HttpTransportMetrics, org.apache.http.io.HttpTransportMetrics); - method public java.lang.Object getMetric(java.lang.String); - method public long getReceivedBytesCount(); - method public long getRequestCount(); - method public long getResponseCount(); - method public long getSentBytesCount(); - method public void incrementRequestCount(); - method public void incrementResponseCount(); - method public void reset(); - method public void setMetric(java.lang.String, java.lang.Object); - field public static final java.lang.String RECEIVED_BYTES_COUNT = "http.received-bytes-count"; - field public static final java.lang.String REQUEST_COUNT = "http.request-count"; - field public static final java.lang.String RESPONSE_COUNT = "http.response-count"; - field public static final java.lang.String SENT_BYTES_COUNT = "http.sent-bytes-count"; - } - - public deprecated class NoConnectionReuseStrategy implements org.apache.http.ConnectionReuseStrategy { - ctor public NoConnectionReuseStrategy(); - method public boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class SocketHttpClientConnection extends org.apache.http.impl.AbstractHttpClientConnection implements org.apache.http.HttpInetConnection { - ctor public SocketHttpClientConnection(); - method protected void assertNotOpen(); - method protected void assertOpen(); - method protected void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void close() throws java.io.IOException; - method protected org.apache.http.io.SessionInputBuffer createSessionInputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method protected org.apache.http.io.SessionOutputBuffer createSessionOutputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.InetAddress getLocalAddress(); - method public int getLocalPort(); - method public java.net.InetAddress getRemoteAddress(); - method public int getRemotePort(); - method protected java.net.Socket getSocket(); - method public int getSocketTimeout(); - method public boolean isOpen(); - method public void setSocketTimeout(int); - method public void shutdown() throws java.io.IOException; - } - - public deprecated class SocketHttpServerConnection extends org.apache.http.impl.AbstractHttpServerConnection implements org.apache.http.HttpInetConnection { - ctor public SocketHttpServerConnection(); - method protected void assertNotOpen(); - method protected void assertOpen(); - method protected void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void close() throws java.io.IOException; - method protected org.apache.http.io.SessionInputBuffer createHttpDataReceiver(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method protected org.apache.http.io.SessionOutputBuffer createHttpDataTransmitter(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.InetAddress getLocalAddress(); - method public int getLocalPort(); - method public java.net.InetAddress getRemoteAddress(); - method public int getRemotePort(); - method protected java.net.Socket getSocket(); - method public int getSocketTimeout(); - method public boolean isOpen(); - method public void setSocketTimeout(int); - method public void shutdown() throws java.io.IOException; - } - -} - -package org.apache.http.impl.auth { - - public abstract deprecated class AuthSchemeBase implements org.apache.http.auth.AuthScheme { - ctor public AuthSchemeBase(); - method public boolean isProxy(); - method protected abstract void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException; - method public void processChallenge(org.apache.http.Header) throws org.apache.http.auth.MalformedChallengeException; - } - - public deprecated class BasicScheme extends org.apache.http.impl.auth.RFC2617Scheme { - ctor public BasicScheme(); - method public org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public static org.apache.http.Header authenticate(org.apache.http.auth.Credentials, java.lang.String, boolean); - method public java.lang.String getSchemeName(); - method public boolean isComplete(); - method public boolean isConnectionBased(); - } - - public deprecated class BasicSchemeFactory implements org.apache.http.auth.AuthSchemeFactory { - ctor public BasicSchemeFactory(); - method public org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class DigestScheme extends org.apache.http.impl.auth.RFC2617Scheme { - ctor public DigestScheme(); - method public org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public static java.lang.String createCnonce(); - method public java.lang.String getSchemeName(); - method public boolean isComplete(); - method public boolean isConnectionBased(); - method public void overrideParamter(java.lang.String, java.lang.String); - } - - public deprecated class DigestSchemeFactory implements org.apache.http.auth.AuthSchemeFactory { - ctor public DigestSchemeFactory(); - method public org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams); - } - - public abstract deprecated interface NTLMEngine { - method public abstract java.lang.String generateType1Msg(java.lang.String, java.lang.String) throws org.apache.http.impl.auth.NTLMEngineException; - method public abstract java.lang.String generateType3Msg(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.apache.http.impl.auth.NTLMEngineException; - } - - public deprecated class NTLMEngineException extends org.apache.http.auth.AuthenticationException { - ctor public NTLMEngineException(); - ctor public NTLMEngineException(java.lang.String); - ctor public NTLMEngineException(java.lang.String, java.lang.Throwable); - } - - public deprecated class NTLMScheme extends org.apache.http.impl.auth.AuthSchemeBase { - ctor public NTLMScheme(org.apache.http.impl.auth.NTLMEngine); - method public org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public java.lang.String getParameter(java.lang.String); - method public java.lang.String getRealm(); - method public java.lang.String getSchemeName(); - method public boolean isComplete(); - method public boolean isConnectionBased(); - method protected void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException; - } - - public abstract deprecated class RFC2617Scheme extends org.apache.http.impl.auth.AuthSchemeBase { - ctor public RFC2617Scheme(); - method public java.lang.String getParameter(java.lang.String); - method protected java.util.Map<java.lang.String, java.lang.String> getParameters(); - method public java.lang.String getRealm(); - method protected void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException; - } - - public deprecated class UnsupportedDigestAlgorithmException extends java.lang.RuntimeException { - ctor public UnsupportedDigestAlgorithmException(); - ctor public UnsupportedDigestAlgorithmException(java.lang.String); - ctor public UnsupportedDigestAlgorithmException(java.lang.String, java.lang.Throwable); - } - -} - -package org.apache.http.impl.client { - - public abstract deprecated class AbstractAuthenticationHandler implements org.apache.http.client.AuthenticationHandler { - ctor public AbstractAuthenticationHandler(); - method protected java.util.List<java.lang.String> getAuthPreferences(); - method protected java.util.Map<java.lang.String, org.apache.http.Header> parseChallenges(org.apache.http.Header[]) throws org.apache.http.auth.MalformedChallengeException; - method public org.apache.http.auth.AuthScheme selectScheme(java.util.Map<java.lang.String, org.apache.http.Header>, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.AuthenticationException; - } - - public abstract deprecated class AbstractHttpClient implements org.apache.http.client.HttpClient { - ctor protected AbstractHttpClient(org.apache.http.conn.ClientConnectionManager, org.apache.http.params.HttpParams); - method public synchronized void addRequestInterceptor(org.apache.http.HttpRequestInterceptor); - method public synchronized void addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public synchronized void addResponseInterceptor(org.apache.http.HttpResponseInterceptor); - method public synchronized void addResponseInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public synchronized void clearRequestInterceptors(); - method public synchronized void clearResponseInterceptors(); - method protected abstract org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry(); - method protected abstract org.apache.http.conn.ClientConnectionManager createClientConnectionManager(); - method protected org.apache.http.client.RequestDirector createClientRequestDirector(org.apache.http.protocol.HttpRequestExecutor, org.apache.http.conn.ClientConnectionManager, org.apache.http.ConnectionReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy, org.apache.http.conn.routing.HttpRoutePlanner, org.apache.http.protocol.HttpProcessor, org.apache.http.client.HttpRequestRetryHandler, org.apache.http.client.RedirectHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.UserTokenHandler, org.apache.http.params.HttpParams); - method protected abstract org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy(); - method protected abstract org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy(); - method protected abstract org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry(); - method protected abstract org.apache.http.client.CookieStore createCookieStore(); - method protected abstract org.apache.http.client.CredentialsProvider createCredentialsProvider(); - method protected abstract org.apache.http.protocol.HttpContext createHttpContext(); - method protected abstract org.apache.http.params.HttpParams createHttpParams(); - method protected abstract org.apache.http.protocol.BasicHttpProcessor createHttpProcessor(); - method protected abstract org.apache.http.client.HttpRequestRetryHandler createHttpRequestRetryHandler(); - method protected abstract org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner(); - method protected abstract org.apache.http.client.AuthenticationHandler createProxyAuthenticationHandler(); - method protected abstract org.apache.http.client.RedirectHandler createRedirectHandler(); - method protected abstract org.apache.http.protocol.HttpRequestExecutor createRequestExecutor(); - method protected abstract org.apache.http.client.AuthenticationHandler createTargetAuthenticationHandler(); - method protected abstract org.apache.http.client.UserTokenHandler createUserTokenHandler(); - method protected org.apache.http.params.HttpParams determineParams(org.apache.http.HttpRequest); - method public final org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final synchronized org.apache.http.auth.AuthSchemeRegistry getAuthSchemes(); - method public final synchronized org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy(); - method public final synchronized org.apache.http.conn.ClientConnectionManager getConnectionManager(); - method public final synchronized org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy(); - method public final synchronized org.apache.http.cookie.CookieSpecRegistry getCookieSpecs(); - method public final synchronized org.apache.http.client.CookieStore getCookieStore(); - method public final synchronized org.apache.http.client.CredentialsProvider getCredentialsProvider(); - method protected final synchronized org.apache.http.protocol.BasicHttpProcessor getHttpProcessor(); - method public final synchronized org.apache.http.client.HttpRequestRetryHandler getHttpRequestRetryHandler(); - method public final synchronized org.apache.http.params.HttpParams getParams(); - method public final synchronized org.apache.http.client.AuthenticationHandler getProxyAuthenticationHandler(); - method public final synchronized org.apache.http.client.RedirectHandler getRedirectHandler(); - method public final synchronized org.apache.http.protocol.HttpRequestExecutor getRequestExecutor(); - method public synchronized org.apache.http.HttpRequestInterceptor getRequestInterceptor(int); - method public synchronized int getRequestInterceptorCount(); - method public synchronized org.apache.http.HttpResponseInterceptor getResponseInterceptor(int); - method public synchronized int getResponseInterceptorCount(); - method public final synchronized org.apache.http.conn.routing.HttpRoutePlanner getRoutePlanner(); - method public final synchronized org.apache.http.client.AuthenticationHandler getTargetAuthenticationHandler(); - method public final synchronized org.apache.http.client.UserTokenHandler getUserTokenHandler(); - method public void removeRequestInterceptorByClass(java.lang.Class<? extends org.apache.http.HttpRequestInterceptor>); - method public void removeResponseInterceptorByClass(java.lang.Class<? extends org.apache.http.HttpResponseInterceptor>); - method public synchronized void setAuthSchemes(org.apache.http.auth.AuthSchemeRegistry); - method public synchronized void setCookieSpecs(org.apache.http.cookie.CookieSpecRegistry); - method public synchronized void setCookieStore(org.apache.http.client.CookieStore); - method public synchronized void setCredentialsProvider(org.apache.http.client.CredentialsProvider); - method public synchronized void setHttpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler); - method public synchronized void setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy); - method public synchronized void setParams(org.apache.http.params.HttpParams); - method public synchronized void setProxyAuthenticationHandler(org.apache.http.client.AuthenticationHandler); - method public synchronized void setRedirectHandler(org.apache.http.client.RedirectHandler); - method public synchronized void setReuseStrategy(org.apache.http.ConnectionReuseStrategy); - method public synchronized void setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner); - method public synchronized void setTargetAuthenticationHandler(org.apache.http.client.AuthenticationHandler); - method public synchronized void setUserTokenHandler(org.apache.http.client.UserTokenHandler); - } - - public deprecated class BasicCookieStore implements org.apache.http.client.CookieStore { - ctor public BasicCookieStore(); - method public synchronized void addCookie(org.apache.http.cookie.Cookie); - method public synchronized void addCookies(org.apache.http.cookie.Cookie[]); - method public synchronized void clear(); - method public synchronized boolean clearExpired(java.util.Date); - method public synchronized java.util.List<org.apache.http.cookie.Cookie> getCookies(); - } - - public deprecated class BasicCredentialsProvider implements org.apache.http.client.CredentialsProvider { - ctor public BasicCredentialsProvider(); - method public synchronized void clear(); - method public synchronized org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope); - method public synchronized void setCredentials(org.apache.http.auth.AuthScope, org.apache.http.auth.Credentials); - } - - public deprecated class BasicResponseHandler implements org.apache.http.client.ResponseHandler { - ctor public BasicResponseHandler(); - method public java.lang.String handleResponse(org.apache.http.HttpResponse) throws org.apache.http.client.HttpResponseException, java.io.IOException; - } - - public deprecated class ClientParamsStack extends org.apache.http.params.AbstractHttpParams { - ctor public ClientParamsStack(org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams); - ctor public ClientParamsStack(org.apache.http.impl.client.ClientParamsStack); - ctor public ClientParamsStack(org.apache.http.impl.client.ClientParamsStack, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams); - method public org.apache.http.params.HttpParams copy(); - method public final org.apache.http.params.HttpParams getApplicationParams(); - method public final org.apache.http.params.HttpParams getClientParams(); - method public final org.apache.http.params.HttpParams getOverrideParams(); - method public java.lang.Object getParameter(java.lang.String); - method public final org.apache.http.params.HttpParams getRequestParams(); - method public boolean removeParameter(java.lang.String); - method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object) throws java.lang.UnsupportedOperationException; - field protected final org.apache.http.params.HttpParams applicationParams; - field protected final org.apache.http.params.HttpParams clientParams; - field protected final org.apache.http.params.HttpParams overrideParams; - field protected final org.apache.http.params.HttpParams requestParams; - } - - public deprecated class DefaultConnectionKeepAliveStrategy implements org.apache.http.conn.ConnectionKeepAliveStrategy { - ctor public DefaultConnectionKeepAliveStrategy(); - method public long getKeepAliveDuration(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultHttpClient extends org.apache.http.impl.client.AbstractHttpClient { - ctor public DefaultHttpClient(org.apache.http.conn.ClientConnectionManager, org.apache.http.params.HttpParams); - ctor public DefaultHttpClient(org.apache.http.params.HttpParams); - ctor public DefaultHttpClient(); - method protected org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry(); - method protected org.apache.http.conn.ClientConnectionManager createClientConnectionManager(); - method protected org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy(); - method protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy(); - method protected org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry(); - method protected org.apache.http.client.CookieStore createCookieStore(); - method protected org.apache.http.client.CredentialsProvider createCredentialsProvider(); - method protected org.apache.http.protocol.HttpContext createHttpContext(); - method protected org.apache.http.params.HttpParams createHttpParams(); - method protected org.apache.http.protocol.BasicHttpProcessor createHttpProcessor(); - method protected org.apache.http.client.HttpRequestRetryHandler createHttpRequestRetryHandler(); - method protected org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner(); - method protected org.apache.http.client.AuthenticationHandler createProxyAuthenticationHandler(); - method protected org.apache.http.client.RedirectHandler createRedirectHandler(); - method protected org.apache.http.protocol.HttpRequestExecutor createRequestExecutor(); - method protected org.apache.http.client.AuthenticationHandler createTargetAuthenticationHandler(); - method protected org.apache.http.client.UserTokenHandler createUserTokenHandler(); - } - - public deprecated class DefaultHttpRequestRetryHandler implements org.apache.http.client.HttpRequestRetryHandler { - ctor public DefaultHttpRequestRetryHandler(int, boolean); - ctor public DefaultHttpRequestRetryHandler(); - method public int getRetryCount(); - method public boolean isRequestSentRetryEnabled(); - method public boolean retryRequest(java.io.IOException, int, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultProxyAuthenticationHandler extends org.apache.http.impl.client.AbstractAuthenticationHandler { - ctor public DefaultProxyAuthenticationHandler(); - method public java.util.Map<java.lang.String, org.apache.http.Header> getChallenges(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.MalformedChallengeException; - method public boolean isAuthenticationRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultRedirectHandler implements org.apache.http.client.RedirectHandler { - ctor public DefaultRedirectHandler(); - method public java.net.URI getLocationURI(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.ProtocolException; - method public boolean isRedirectRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultRequestDirector implements org.apache.http.client.RequestDirector { - ctor public DefaultRequestDirector(org.apache.http.protocol.HttpRequestExecutor, org.apache.http.conn.ClientConnectionManager, org.apache.http.ConnectionReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy, org.apache.http.conn.routing.HttpRoutePlanner, org.apache.http.protocol.HttpProcessor, org.apache.http.client.HttpRequestRetryHandler, org.apache.http.client.RedirectHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.UserTokenHandler, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpRequest createConnectRequest(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext); - method protected boolean createTunnelToProxy(org.apache.http.conn.routing.HttpRoute, int, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected boolean createTunnelToTarget(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - method protected void establishRoute(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.impl.client.RoutedRequest handleResponse(org.apache.http.impl.client.RoutedRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected void releaseConnection(); - method protected void rewriteRequestURI(org.apache.http.impl.client.RequestWrapper, org.apache.http.conn.routing.HttpRoute) throws org.apache.http.ProtocolException; - field protected final org.apache.http.conn.ClientConnectionManager connManager; - field protected final org.apache.http.protocol.HttpProcessor httpProcessor; - field protected final org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy; - field protected org.apache.http.conn.ManagedClientConnection managedConn; - field protected final org.apache.http.params.HttpParams params; - field protected final org.apache.http.client.RedirectHandler redirectHandler; - field protected final org.apache.http.protocol.HttpRequestExecutor requestExec; - field protected final org.apache.http.client.HttpRequestRetryHandler retryHandler; - field protected final org.apache.http.ConnectionReuseStrategy reuseStrategy; - field protected final org.apache.http.conn.routing.HttpRoutePlanner routePlanner; - } - - public deprecated class DefaultTargetAuthenticationHandler extends org.apache.http.impl.client.AbstractAuthenticationHandler { - ctor public DefaultTargetAuthenticationHandler(); - method public java.util.Map<java.lang.String, org.apache.http.Header> getChallenges(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.MalformedChallengeException; - method public boolean isAuthenticationRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultUserTokenHandler implements org.apache.http.client.UserTokenHandler { - ctor public DefaultUserTokenHandler(); - method public java.lang.Object getUserToken(org.apache.http.protocol.HttpContext); - } - - public deprecated class EntityEnclosingRequestWrapper extends org.apache.http.impl.client.RequestWrapper implements org.apache.http.HttpEntityEnclosingRequest { - ctor public EntityEnclosingRequestWrapper(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.ProtocolException; - method public boolean expectContinue(); - method public org.apache.http.HttpEntity getEntity(); - method public void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class RedirectLocations { - ctor public RedirectLocations(); - method public void add(java.net.URI); - method public boolean contains(java.net.URI); - method public boolean remove(java.net.URI); - } - - public deprecated class RequestWrapper extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.client.methods.HttpUriRequest { - ctor public RequestWrapper(org.apache.http.HttpRequest) throws org.apache.http.ProtocolException; - method public void abort() throws java.lang.UnsupportedOperationException; - method public int getExecCount(); - method public java.lang.String getMethod(); - method public org.apache.http.HttpRequest getOriginal(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public org.apache.http.RequestLine getRequestLine(); - method public java.net.URI getURI(); - method public void incrementExecCount(); - method public boolean isAborted(); - method public boolean isRepeatable(); - method public void resetHeaders(); - method public void setMethod(java.lang.String); - method public void setProtocolVersion(org.apache.http.ProtocolVersion); - method public void setURI(java.net.URI); - } - - public deprecated class RoutedRequest { - ctor public RoutedRequest(org.apache.http.impl.client.RequestWrapper, org.apache.http.conn.routing.HttpRoute); - method public final org.apache.http.impl.client.RequestWrapper getRequest(); - method public final org.apache.http.conn.routing.HttpRoute getRoute(); - field protected final org.apache.http.impl.client.RequestWrapper request; - field protected final org.apache.http.conn.routing.HttpRoute route; - } - - public deprecated class TunnelRefusedException extends org.apache.http.HttpException { - ctor public TunnelRefusedException(java.lang.String, org.apache.http.HttpResponse); - method public org.apache.http.HttpResponse getResponse(); - } - -} - -package org.apache.http.impl.conn { - - public abstract deprecated class AbstractClientConnAdapter implements org.apache.http.conn.ManagedClientConnection { - ctor protected AbstractClientConnAdapter(org.apache.http.conn.ClientConnectionManager, org.apache.http.conn.OperatedClientConnection); - method public void abortConnection(); - method protected final void assertNotAborted() throws java.io.InterruptedIOException; - method protected final void assertValid(org.apache.http.conn.OperatedClientConnection); - method protected void detach(); - method public void flush() throws java.io.IOException; - method public java.net.InetAddress getLocalAddress(); - method public int getLocalPort(); - method protected org.apache.http.conn.ClientConnectionManager getManager(); - method public org.apache.http.HttpConnectionMetrics getMetrics(); - method public java.net.InetAddress getRemoteAddress(); - method public int getRemotePort(); - method public javax.net.ssl.SSLSession getSSLSession(); - method public int getSocketTimeout(); - method protected org.apache.http.conn.OperatedClientConnection getWrappedConnection(); - method public boolean isMarkedReusable(); - method public boolean isOpen(); - method public boolean isResponseAvailable(int) throws java.io.IOException; - method public boolean isSecure(); - method public boolean isStale(); - method public void markReusable(); - method public void receiveResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, java.io.IOException; - method public void releaseConnection(); - method public void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException; - method public void setIdleDuration(long, java.util.concurrent.TimeUnit); - method public void setSocketTimeout(int); - method public void unmarkReusable(); - } - - public abstract deprecated class AbstractPoolEntry { - ctor protected AbstractPoolEntry(org.apache.http.conn.ClientConnectionOperator, org.apache.http.conn.routing.HttpRoute); - method public java.lang.Object getState(); - method public void layerProtocol(org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void open(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void setState(java.lang.Object); - method protected void shutdownEntry(); - method public void tunnelProxy(org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void tunnelTarget(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - field protected final org.apache.http.conn.ClientConnectionOperator connOperator; - field protected final org.apache.http.conn.OperatedClientConnection connection; - field protected volatile org.apache.http.conn.routing.HttpRoute route; - field protected volatile java.lang.Object state; - field protected volatile org.apache.http.conn.routing.RouteTracker tracker; - } - - public abstract deprecated class AbstractPooledConnAdapter extends org.apache.http.impl.conn.AbstractClientConnAdapter { - ctor protected AbstractPooledConnAdapter(org.apache.http.conn.ClientConnectionManager, org.apache.http.impl.conn.AbstractPoolEntry); - method protected final void assertAttached(); - method public void close() throws java.io.IOException; - method public org.apache.http.conn.routing.HttpRoute getRoute(); - method public java.lang.Object getState(); - method public void layerProtocol(org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void open(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void setState(java.lang.Object); - method public void shutdown() throws java.io.IOException; - method public void tunnelProxy(org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void tunnelTarget(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - field protected volatile org.apache.http.impl.conn.AbstractPoolEntry poolEntry; - } - - public deprecated class DefaultClientConnection extends org.apache.http.impl.SocketHttpClientConnection implements org.apache.http.conn.OperatedClientConnection { - ctor public DefaultClientConnection(); - method public final java.net.Socket getSocket(); - method public final org.apache.http.HttpHost getTargetHost(); - method public final boolean isSecure(); - method public void openCompleted(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void opening(java.net.Socket, org.apache.http.HttpHost) throws java.io.IOException; - method public void update(java.net.Socket, org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public deprecated class DefaultClientConnectionOperator implements org.apache.http.conn.ClientConnectionOperator { - ctor public DefaultClientConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry); - method public org.apache.http.conn.OperatedClientConnection createConnection(); - method public void openConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method protected void prepareSocket(java.net.Socket, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void updateSecureConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class DefaultHttpRoutePlanner implements org.apache.http.conn.routing.HttpRoutePlanner { - ctor public DefaultHttpRoutePlanner(org.apache.http.conn.scheme.SchemeRegistry); - method public org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class DefaultResponseParser extends org.apache.http.impl.io.AbstractMessageParser { - ctor public DefaultResponseParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.HttpResponseFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class IdleConnectionHandler { - ctor public IdleConnectionHandler(); - method public void add(org.apache.http.HttpConnection, long, java.util.concurrent.TimeUnit); - method public void closeExpiredConnections(); - method public void closeIdleConnections(long); - method public boolean remove(org.apache.http.HttpConnection); - method public void removeAll(); - } - - public deprecated class LoggingSessionInputBuffer implements org.apache.http.io.SessionInputBuffer { - ctor public LoggingSessionInputBuffer(org.apache.http.io.SessionInputBuffer, org.apache.http.impl.conn.Wire); - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method public boolean isDataAvailable(int) throws java.io.IOException; - method public int read(byte[], int, int) throws java.io.IOException; - method public int read() throws java.io.IOException; - method public int read(byte[]) throws java.io.IOException; - method public java.lang.String readLine() throws java.io.IOException; - method public int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - } - - public deprecated class LoggingSessionOutputBuffer implements org.apache.http.io.SessionOutputBuffer { - ctor public LoggingSessionOutputBuffer(org.apache.http.io.SessionOutputBuffer, org.apache.http.impl.conn.Wire); - method public void flush() throws java.io.IOException; - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method public void write(byte[], int, int) throws java.io.IOException; - method public void write(int) throws java.io.IOException; - method public void write(byte[]) throws java.io.IOException; - method public void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - method public void writeLine(java.lang.String) throws java.io.IOException; - } - - public deprecated class ProxySelectorRoutePlanner implements org.apache.http.conn.routing.HttpRoutePlanner { - ctor public ProxySelectorRoutePlanner(org.apache.http.conn.scheme.SchemeRegistry, java.net.ProxySelector); - method protected java.net.Proxy chooseProxy(java.util.List<java.net.Proxy>, org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext); - method protected org.apache.http.HttpHost determineProxy(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - method public org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - method protected java.lang.String getHost(java.net.InetSocketAddress); - method public java.net.ProxySelector getProxySelector(); - method public void setProxySelector(java.net.ProxySelector); - field protected java.net.ProxySelector proxySelector; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class SingleClientConnManager implements org.apache.http.conn.ClientConnectionManager { - ctor public SingleClientConnManager(org.apache.http.params.HttpParams, org.apache.http.conn.scheme.SchemeRegistry); - method protected final void assertStillUp() throws java.lang.IllegalStateException; - method public void closeExpiredConnections(); - method public void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method protected org.apache.http.conn.ClientConnectionOperator createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry); - method public org.apache.http.conn.ManagedClientConnection getConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry(); - method public void releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit); - method public final org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method protected void revokeConnection(); - method public void shutdown(); - field public static final java.lang.String MISUSE_MESSAGE = "Invalid use of SingleClientConnManager: connection still allocated.\nMake sure to release the connection before allocating another one."; - field protected boolean alwaysShutDown; - field protected org.apache.http.conn.ClientConnectionOperator connOperator; - field protected long connectionExpiresTime; - field protected volatile boolean isShutDown; - field protected long lastReleaseTime; - field protected org.apache.http.impl.conn.SingleClientConnManager.ConnAdapter managedConn; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - field protected org.apache.http.impl.conn.SingleClientConnManager.PoolEntry uniquePoolEntry; - } - - protected class SingleClientConnManager.ConnAdapter extends org.apache.http.impl.conn.AbstractPooledConnAdapter { - ctor protected SingleClientConnManager.ConnAdapter(org.apache.http.impl.conn.SingleClientConnManager.PoolEntry, org.apache.http.conn.routing.HttpRoute); - } - - protected class SingleClientConnManager.PoolEntry extends org.apache.http.impl.conn.AbstractPoolEntry { - ctor protected SingleClientConnManager.PoolEntry(); - method protected void close() throws java.io.IOException; - method protected void shutdown() throws java.io.IOException; - } - - public deprecated class Wire { - ctor public Wire(org.apache.commons.logging.Log); - method public boolean enabled(); - method public void input(java.io.InputStream) throws java.io.IOException; - method public void input(byte[], int, int) throws java.io.IOException; - method public void input(byte[]) throws java.io.IOException; - method public void input(int) throws java.io.IOException; - method public void input(java.lang.String) throws java.io.IOException; - method public void output(java.io.InputStream) throws java.io.IOException; - method public void output(byte[], int, int) throws java.io.IOException; - method public void output(byte[]) throws java.io.IOException; - method public void output(int) throws java.io.IOException; - method public void output(java.lang.String) throws java.io.IOException; - } - -} - -package org.apache.http.impl.conn.tsccm { - - public abstract deprecated class AbstractConnPool implements org.apache.http.impl.conn.tsccm.RefQueueHandler { - ctor protected AbstractConnPool(); - method protected void closeConnection(org.apache.http.conn.OperatedClientConnection); - method public void closeExpiredConnections(); - method public void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method public abstract void deleteClosedConnections(); - method public void enableConnectionGC() throws java.lang.IllegalStateException; - method public abstract void freeEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry, boolean, long, java.util.concurrent.TimeUnit); - method public final org.apache.http.impl.conn.tsccm.BasicPoolEntry getEntry(org.apache.http.conn.routing.HttpRoute, java.lang.Object, long, java.util.concurrent.TimeUnit) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - method protected abstract void handleLostEntry(org.apache.http.conn.routing.HttpRoute); - method public void handleReference(java.lang.ref.Reference); - method public abstract org.apache.http.impl.conn.tsccm.PoolEntryRequest requestPoolEntry(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public void shutdown(); - field protected org.apache.http.impl.conn.IdleConnectionHandler idleConnHandler; - field protected volatile boolean isShutDown; - field protected java.util.Set<org.apache.http.impl.conn.tsccm.BasicPoolEntryRef> issuedConnections; - field protected int numConnections; - field protected final java.util.concurrent.locks.Lock poolLock; - field protected java.lang.ref.ReferenceQueue<java.lang.Object> refQueue; - } - - public deprecated class BasicPoolEntry extends org.apache.http.impl.conn.AbstractPoolEntry { - ctor public BasicPoolEntry(org.apache.http.conn.ClientConnectionOperator, org.apache.http.conn.routing.HttpRoute, java.lang.ref.ReferenceQueue<java.lang.Object>); - method protected final org.apache.http.conn.OperatedClientConnection getConnection(); - method protected final org.apache.http.conn.routing.HttpRoute getPlannedRoute(); - method protected final org.apache.http.impl.conn.tsccm.BasicPoolEntryRef getWeakRef(); - } - - public deprecated class BasicPoolEntryRef extends java.lang.ref.WeakReference { - ctor public BasicPoolEntryRef(org.apache.http.impl.conn.tsccm.BasicPoolEntry, java.lang.ref.ReferenceQueue<java.lang.Object>); - method public final org.apache.http.conn.routing.HttpRoute getRoute(); - } - - public deprecated class BasicPooledConnAdapter extends org.apache.http.impl.conn.AbstractPooledConnAdapter { - ctor protected BasicPooledConnAdapter(org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager, org.apache.http.impl.conn.AbstractPoolEntry); - method protected org.apache.http.impl.conn.AbstractPoolEntry getPoolEntry(); - } - - public deprecated class ConnPoolByRoute extends org.apache.http.impl.conn.tsccm.AbstractConnPool { - ctor public ConnPoolByRoute(org.apache.http.conn.ClientConnectionOperator, org.apache.http.params.HttpParams); - method protected org.apache.http.impl.conn.tsccm.BasicPoolEntry createEntry(org.apache.http.impl.conn.tsccm.RouteSpecificPool, org.apache.http.conn.ClientConnectionOperator); - method protected java.util.Queue<org.apache.http.impl.conn.tsccm.BasicPoolEntry> createFreeConnQueue(); - method protected java.util.Map<org.apache.http.conn.routing.HttpRoute, org.apache.http.impl.conn.tsccm.RouteSpecificPool> createRouteToPoolMap(); - method protected java.util.Queue<org.apache.http.impl.conn.tsccm.WaitingThread> createWaitingThreadQueue(); - method public void deleteClosedConnections(); - method protected void deleteEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method protected void deleteLeastUsedEntry(); - method public void freeEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry, boolean, long, java.util.concurrent.TimeUnit); - method public int getConnectionsInPool(org.apache.http.conn.routing.HttpRoute); - method protected org.apache.http.impl.conn.tsccm.BasicPoolEntry getEntryBlocking(org.apache.http.conn.routing.HttpRoute, java.lang.Object, long, java.util.concurrent.TimeUnit, org.apache.http.impl.conn.tsccm.WaitingThreadAborter) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - method protected org.apache.http.impl.conn.tsccm.BasicPoolEntry getFreeEntry(org.apache.http.impl.conn.tsccm.RouteSpecificPool, java.lang.Object); - method protected org.apache.http.impl.conn.tsccm.RouteSpecificPool getRoutePool(org.apache.http.conn.routing.HttpRoute, boolean); - method protected void handleLostEntry(org.apache.http.conn.routing.HttpRoute); - method protected org.apache.http.impl.conn.tsccm.RouteSpecificPool newRouteSpecificPool(org.apache.http.conn.routing.HttpRoute); - method protected org.apache.http.impl.conn.tsccm.WaitingThread newWaitingThread(java.util.concurrent.locks.Condition, org.apache.http.impl.conn.tsccm.RouteSpecificPool); - method protected void notifyWaitingThread(org.apache.http.impl.conn.tsccm.RouteSpecificPool); - method public org.apache.http.impl.conn.tsccm.PoolEntryRequest requestPoolEntry(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - field protected java.util.Queue<org.apache.http.impl.conn.tsccm.BasicPoolEntry> freeConnections; - field protected final int maxTotalConnections; - field protected final org.apache.http.conn.ClientConnectionOperator operator; - field protected final java.util.Map<org.apache.http.conn.routing.HttpRoute, org.apache.http.impl.conn.tsccm.RouteSpecificPool> routeToPool; - field protected java.util.Queue<org.apache.http.impl.conn.tsccm.WaitingThread> waitingThreads; - } - - public abstract deprecated interface PoolEntryRequest { - method public abstract void abortRequest(); - method public abstract org.apache.http.impl.conn.tsccm.BasicPoolEntry getPoolEntry(long, java.util.concurrent.TimeUnit) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - } - - public abstract deprecated interface RefQueueHandler { - method public abstract void handleReference(java.lang.ref.Reference<?>); - } - - public deprecated class RefQueueWorker implements java.lang.Runnable { - ctor public RefQueueWorker(java.lang.ref.ReferenceQueue<?>, org.apache.http.impl.conn.tsccm.RefQueueHandler); - method public void run(); - method public void shutdown(); - field protected final org.apache.http.impl.conn.tsccm.RefQueueHandler refHandler; - field protected final java.lang.ref.ReferenceQueue<?> refQueue; - field protected volatile java.lang.Thread workerThread; - } - - public deprecated class RouteSpecificPool { - ctor public RouteSpecificPool(org.apache.http.conn.routing.HttpRoute, int); - method public org.apache.http.impl.conn.tsccm.BasicPoolEntry allocEntry(java.lang.Object); - method public void createdEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method public boolean deleteEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method public void dropEntry(); - method public void freeEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method public int getCapacity(); - method public final int getEntryCount(); - method public final int getMaxEntries(); - method public final org.apache.http.conn.routing.HttpRoute getRoute(); - method public boolean hasThread(); - method public boolean isUnused(); - method public org.apache.http.impl.conn.tsccm.WaitingThread nextThread(); - method public void queueThread(org.apache.http.impl.conn.tsccm.WaitingThread); - method public void removeThread(org.apache.http.impl.conn.tsccm.WaitingThread); - field protected final java.util.LinkedList<org.apache.http.impl.conn.tsccm.BasicPoolEntry> freeEntries; - field protected final int maxEntries; - field protected int numEntries; - field protected final org.apache.http.conn.routing.HttpRoute route; - field protected final java.util.Queue<org.apache.http.impl.conn.tsccm.WaitingThread> waitingThreads; - } - - public deprecated class ThreadSafeClientConnManager implements org.apache.http.conn.ClientConnectionManager { - ctor public ThreadSafeClientConnManager(org.apache.http.params.HttpParams, org.apache.http.conn.scheme.SchemeRegistry); - method public void closeExpiredConnections(); - method public void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method protected org.apache.http.conn.ClientConnectionOperator createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry); - method protected org.apache.http.impl.conn.tsccm.AbstractConnPool createConnectionPool(org.apache.http.params.HttpParams); - method public int getConnectionsInPool(org.apache.http.conn.routing.HttpRoute); - method public int getConnectionsInPool(); - method public org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry(); - method public void releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit); - method public org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public void shutdown(); - field protected org.apache.http.conn.ClientConnectionOperator connOperator; - field protected final org.apache.http.impl.conn.tsccm.AbstractConnPool connectionPool; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class WaitingThread { - ctor public WaitingThread(java.util.concurrent.locks.Condition, org.apache.http.impl.conn.tsccm.RouteSpecificPool); - method public boolean await(java.util.Date) throws java.lang.InterruptedException; - method public final java.util.concurrent.locks.Condition getCondition(); - method public final org.apache.http.impl.conn.tsccm.RouteSpecificPool getPool(); - method public final java.lang.Thread getThread(); - method public void interrupt(); - method public void wakeup(); - } - - public deprecated class WaitingThreadAborter { - ctor public WaitingThreadAborter(); - method public void abort(); - method public void setWaitingThread(org.apache.http.impl.conn.tsccm.WaitingThread); - } - -} - -package org.apache.http.impl.cookie { - - public abstract deprecated class AbstractCookieAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public AbstractCookieAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public abstract deprecated class AbstractCookieSpec implements org.apache.http.cookie.CookieSpec { - ctor public AbstractCookieSpec(); - method protected org.apache.http.cookie.CookieAttributeHandler findAttribHandler(java.lang.String); - method protected org.apache.http.cookie.CookieAttributeHandler getAttribHandler(java.lang.String); - method protected java.util.Collection<org.apache.http.cookie.CookieAttributeHandler> getAttribHandlers(); - method public void registerAttribHandler(java.lang.String, org.apache.http.cookie.CookieAttributeHandler); - } - - public deprecated class BasicClientCookie implements org.apache.http.cookie.ClientCookie java.lang.Cloneable org.apache.http.cookie.SetCookie { - ctor public BasicClientCookie(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public boolean containsAttribute(java.lang.String); - method public java.lang.String getAttribute(java.lang.String); - method public java.lang.String getComment(); - method public java.lang.String getCommentURL(); - method public java.lang.String getDomain(); - method public java.util.Date getExpiryDate(); - method public java.lang.String getName(); - method public java.lang.String getPath(); - method public int[] getPorts(); - method public java.lang.String getValue(); - method public int getVersion(); - method public boolean isExpired(java.util.Date); - method public boolean isPersistent(); - method public boolean isSecure(); - method public void setAttribute(java.lang.String, java.lang.String); - method public void setComment(java.lang.String); - method public void setDomain(java.lang.String); - method public void setExpiryDate(java.util.Date); - method public void setPath(java.lang.String); - method public void setSecure(boolean); - method public void setValue(java.lang.String); - method public void setVersion(int); - } - - public deprecated class BasicClientCookie2 extends org.apache.http.impl.cookie.BasicClientCookie implements org.apache.http.cookie.SetCookie2 { - ctor public BasicClientCookie2(java.lang.String, java.lang.String); - method public void setCommentURL(java.lang.String); - method public void setDiscard(boolean); - method public void setPorts(int[]); - } - - public deprecated class BasicCommentHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicCommentHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicDomainHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public BasicDomainHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicExpiresHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicExpiresHandler(java.lang.String[]); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicMaxAgeHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicMaxAgeHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicPathHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public BasicPathHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicSecureHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicSecureHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BestMatchSpec implements org.apache.http.cookie.CookieSpec { - ctor public BestMatchSpec(java.lang.String[], boolean); - ctor public BestMatchSpec(); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BestMatchSpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public BestMatchSpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class BrowserCompatSpec extends org.apache.http.impl.cookie.CookieSpecBase { - ctor public BrowserCompatSpec(java.lang.String[]); - ctor public BrowserCompatSpec(); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - field protected static final java.lang.String[] DATE_PATTERNS; - } - - public deprecated class BrowserCompatSpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public BrowserCompatSpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public abstract deprecated class CookieSpecBase extends org.apache.http.impl.cookie.AbstractCookieSpec { - ctor public CookieSpecBase(); - method protected static java.lang.String getDefaultDomain(org.apache.http.cookie.CookieOrigin); - method protected static java.lang.String getDefaultPath(org.apache.http.cookie.CookieOrigin); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method protected java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.HeaderElement[], org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class DateParseException extends java.lang.Exception { - ctor public DateParseException(); - ctor public DateParseException(java.lang.String); - } - - public final deprecated class DateUtils { - method public static java.lang.String formatDate(java.util.Date); - method public static java.lang.String formatDate(java.util.Date, java.lang.String); - method public static java.util.Date parseDate(java.lang.String) throws org.apache.http.impl.cookie.DateParseException; - method public static java.util.Date parseDate(java.lang.String, java.lang.String[]) throws org.apache.http.impl.cookie.DateParseException; - method public static java.util.Date parseDate(java.lang.String, java.lang.String[], java.util.Date) throws org.apache.http.impl.cookie.DateParseException; - field public static final java.util.TimeZone GMT; - field public static final java.lang.String PATTERN_ASCTIME = "EEE MMM d HH:mm:ss yyyy"; - field public static final java.lang.String PATTERN_RFC1036 = "EEEE, dd-MMM-yy HH:mm:ss zzz"; - field public static final java.lang.String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz"; - } - - public deprecated class NetscapeDomainHandler extends org.apache.http.impl.cookie.BasicDomainHandler { - ctor public NetscapeDomainHandler(); - } - - public deprecated class NetscapeDraftHeaderParser { - ctor public NetscapeDraftHeaderParser(); - method public org.apache.http.HeaderElement parseHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - field public static final org.apache.http.impl.cookie.NetscapeDraftHeaderParser DEFAULT; - } - - public deprecated class NetscapeDraftSpec extends org.apache.http.impl.cookie.CookieSpecBase { - ctor public NetscapeDraftSpec(java.lang.String[]); - ctor public NetscapeDraftSpec(); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - field protected static final java.lang.String EXPIRES_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z"; - } - - public deprecated class NetscapeDraftSpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public NetscapeDraftSpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class RFC2109DomainHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2109DomainHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2109Spec extends org.apache.http.impl.cookie.CookieSpecBase { - ctor public RFC2109Spec(java.lang.String[], boolean); - ctor public RFC2109Spec(); - method protected void formatCookieAsVer(org.apache.http.util.CharArrayBuffer, org.apache.http.cookie.Cookie, int); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method protected void formatParamAsVer(org.apache.http.util.CharArrayBuffer, java.lang.String, java.lang.String, int); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2109SpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public RFC2109SpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class RFC2109VersionHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public RFC2109VersionHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965CommentUrlAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965CommentUrlAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965DiscardAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965DiscardAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965DomainAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965DomainAttributeHandler(); - method public boolean domainMatch(java.lang.String, java.lang.String); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965PortAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965PortAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965Spec extends org.apache.http.impl.cookie.RFC2109Spec { - ctor public RFC2965Spec(); - ctor public RFC2965Spec(java.lang.String[], boolean); - } - - public deprecated class RFC2965SpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public RFC2965SpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class RFC2965VersionAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965VersionAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - -} - -package org.apache.http.impl.entity { - - public deprecated class EntityDeserializer { - ctor public EntityDeserializer(org.apache.http.entity.ContentLengthStrategy); - method public org.apache.http.HttpEntity deserialize(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.entity.BasicHttpEntity doDeserialize(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class EntitySerializer { - ctor public EntitySerializer(org.apache.http.entity.ContentLengthStrategy); - method protected java.io.OutputStream doSerialize(org.apache.http.io.SessionOutputBuffer, org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - method public void serialize(org.apache.http.io.SessionOutputBuffer, org.apache.http.HttpMessage, org.apache.http.HttpEntity) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class LaxContentLengthStrategy implements org.apache.http.entity.ContentLengthStrategy { - ctor public LaxContentLengthStrategy(); - method public long determineLength(org.apache.http.HttpMessage) throws org.apache.http.HttpException; - } - - public deprecated class StrictContentLengthStrategy implements org.apache.http.entity.ContentLengthStrategy { - ctor public StrictContentLengthStrategy(); - method public long determineLength(org.apache.http.HttpMessage) throws org.apache.http.HttpException; - } - -} - -package org.apache.http.impl.io { - - public abstract deprecated class AbstractMessageParser implements org.apache.http.io.HttpMessageParser { - ctor public AbstractMessageParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.params.HttpParams); - method public org.apache.http.HttpMessage parse() throws org.apache.http.HttpException, java.io.IOException; - method protected abstract org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException, org.apache.http.ParseException; - method public static org.apache.http.Header[] parseHeaders(org.apache.http.io.SessionInputBuffer, int, int, org.apache.http.message.LineParser) throws org.apache.http.HttpException, java.io.IOException; - field protected final org.apache.http.message.LineParser lineParser; - } - - public abstract deprecated class AbstractMessageWriter implements org.apache.http.io.HttpMessageWriter { - ctor public AbstractMessageWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.message.LineFormatter, org.apache.http.params.HttpParams); - method public void write(org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - method protected abstract void writeHeadLine(org.apache.http.HttpMessage) throws java.io.IOException; - field protected final org.apache.http.util.CharArrayBuffer lineBuf; - field protected final org.apache.http.message.LineFormatter lineFormatter; - field protected final org.apache.http.io.SessionOutputBuffer sessionBuffer; - } - - public abstract deprecated class AbstractSessionInputBuffer implements org.apache.http.io.SessionInputBuffer { - ctor public AbstractSessionInputBuffer(); - method protected int fillBuffer() throws java.io.IOException; - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method protected boolean hasBufferedData(); - method protected void init(java.io.InputStream, int, org.apache.http.params.HttpParams); - method public int read() throws java.io.IOException; - method public int read(byte[], int, int) throws java.io.IOException; - method public int read(byte[]) throws java.io.IOException; - method public int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - method public java.lang.String readLine() throws java.io.IOException; - } - - public abstract deprecated class AbstractSessionOutputBuffer implements org.apache.http.io.SessionOutputBuffer { - ctor public AbstractSessionOutputBuffer(); - method public void flush() throws java.io.IOException; - method protected void flushBuffer() throws java.io.IOException; - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method protected void init(java.io.OutputStream, int, org.apache.http.params.HttpParams); - method public void write(byte[], int, int) throws java.io.IOException; - method public void write(byte[]) throws java.io.IOException; - method public void write(int) throws java.io.IOException; - method public void writeLine(java.lang.String) throws java.io.IOException; - method public void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - } - - public deprecated class ChunkedInputStream extends java.io.InputStream { - ctor public ChunkedInputStream(org.apache.http.io.SessionInputBuffer); - method public org.apache.http.Header[] getFooters(); - method public int read() throws java.io.IOException; - } - - public deprecated class ChunkedOutputStream extends java.io.OutputStream { - ctor public ChunkedOutputStream(org.apache.http.io.SessionOutputBuffer, int) throws java.io.IOException; - ctor public ChunkedOutputStream(org.apache.http.io.SessionOutputBuffer) throws java.io.IOException; - method public void finish() throws java.io.IOException; - method protected void flushCache() throws java.io.IOException; - method protected void flushCacheWithAppend(byte[], int, int) throws java.io.IOException; - method public void write(int) throws java.io.IOException; - method protected void writeClosingChunk() throws java.io.IOException; - } - - public deprecated class ContentLengthInputStream extends java.io.InputStream { - ctor public ContentLengthInputStream(org.apache.http.io.SessionInputBuffer, long); - method public int read() throws java.io.IOException; - } - - public deprecated class ContentLengthOutputStream extends java.io.OutputStream { - ctor public ContentLengthOutputStream(org.apache.http.io.SessionOutputBuffer, long); - method public void write(int) throws java.io.IOException; - } - - public deprecated class HttpRequestParser extends org.apache.http.impl.io.AbstractMessageParser { - ctor public HttpRequestParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.HttpRequestFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException, org.apache.http.ParseException; - } - - public deprecated class HttpRequestWriter extends org.apache.http.impl.io.AbstractMessageWriter { - ctor public HttpRequestWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.message.LineFormatter, org.apache.http.params.HttpParams); - method protected void writeHeadLine(org.apache.http.HttpMessage) throws java.io.IOException; - } - - public deprecated class HttpResponseParser extends org.apache.http.impl.io.AbstractMessageParser { - ctor public HttpResponseParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.HttpResponseFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException, org.apache.http.ParseException; - } - - public deprecated class HttpResponseWriter extends org.apache.http.impl.io.AbstractMessageWriter { - ctor public HttpResponseWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.message.LineFormatter, org.apache.http.params.HttpParams); - method protected void writeHeadLine(org.apache.http.HttpMessage) throws java.io.IOException; - } - - public deprecated class HttpTransportMetricsImpl implements org.apache.http.io.HttpTransportMetrics { - ctor public HttpTransportMetricsImpl(); - method public long getBytesTransferred(); - method public void incrementBytesTransferred(long); - method public void reset(); - method public void setBytesTransferred(long); - } - - public deprecated class IdentityInputStream extends java.io.InputStream { - ctor public IdentityInputStream(org.apache.http.io.SessionInputBuffer); - method public int read() throws java.io.IOException; - } - - public deprecated class IdentityOutputStream extends java.io.OutputStream { - ctor public IdentityOutputStream(org.apache.http.io.SessionOutputBuffer); - method public void write(int) throws java.io.IOException; - } - - public deprecated class SocketInputBuffer extends org.apache.http.impl.io.AbstractSessionInputBuffer { - ctor public SocketInputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public boolean isDataAvailable(int) throws java.io.IOException; - } - - public deprecated class SocketOutputBuffer extends org.apache.http.impl.io.AbstractSessionOutputBuffer { - ctor public SocketOutputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - } - -} - -package org.apache.http.io { - - public abstract deprecated interface HttpMessageParser { - method public abstract org.apache.http.HttpMessage parse() throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpMessageWriter { - method public abstract void write(org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpTransportMetrics { - method public abstract long getBytesTransferred(); - method public abstract void reset(); - } - - public abstract deprecated interface SessionInputBuffer { - method public abstract org.apache.http.io.HttpTransportMetrics getMetrics(); - method public abstract boolean isDataAvailable(int) throws java.io.IOException; - method public abstract int read(byte[], int, int) throws java.io.IOException; - method public abstract int read(byte[]) throws java.io.IOException; - method public abstract int read() throws java.io.IOException; - method public abstract int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - method public abstract java.lang.String readLine() throws java.io.IOException; - } - - public abstract deprecated interface SessionOutputBuffer { - method public abstract void flush() throws java.io.IOException; - method public abstract org.apache.http.io.HttpTransportMetrics getMetrics(); - method public abstract void write(byte[], int, int) throws java.io.IOException; - method public abstract void write(byte[]) throws java.io.IOException; - method public abstract void write(int) throws java.io.IOException; - method public abstract void writeLine(java.lang.String) throws java.io.IOException; - method public abstract void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - } - -} - -package org.apache.http.message { - - public abstract deprecated class AbstractHttpMessage implements org.apache.http.HttpMessage { - ctor protected AbstractHttpMessage(org.apache.http.params.HttpParams); - ctor protected AbstractHttpMessage(); - method public void addHeader(org.apache.http.Header); - method public void addHeader(java.lang.String, java.lang.String); - method public boolean containsHeader(java.lang.String); - method public org.apache.http.Header[] getAllHeaders(); - method public org.apache.http.Header getFirstHeader(java.lang.String); - method public org.apache.http.Header[] getHeaders(java.lang.String); - method public org.apache.http.Header getLastHeader(java.lang.String); - method public org.apache.http.params.HttpParams getParams(); - method public org.apache.http.HeaderIterator headerIterator(); - method public org.apache.http.HeaderIterator headerIterator(java.lang.String); - method public void removeHeader(org.apache.http.Header); - method public void removeHeaders(java.lang.String); - method public void setHeader(org.apache.http.Header); - method public void setHeader(java.lang.String, java.lang.String); - method public void setHeaders(org.apache.http.Header[]); - method public void setParams(org.apache.http.params.HttpParams); - field protected org.apache.http.message.HeaderGroup headergroup; - field protected org.apache.http.params.HttpParams params; - } - - public deprecated class BasicHeader implements java.lang.Cloneable org.apache.http.Header { - ctor public BasicHeader(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.HeaderElement[] getElements() throws org.apache.http.ParseException; - method public java.lang.String getName(); - method public java.lang.String getValue(); - } - - public deprecated class BasicHeaderElement implements java.lang.Cloneable org.apache.http.HeaderElement { - ctor public BasicHeaderElement(java.lang.String, java.lang.String, org.apache.http.NameValuePair[]); - ctor public BasicHeaderElement(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getName(); - method public org.apache.http.NameValuePair getParameter(int); - method public org.apache.http.NameValuePair getParameterByName(java.lang.String); - method public int getParameterCount(); - method public org.apache.http.NameValuePair[] getParameters(); - method public java.lang.String getValue(); - } - - public deprecated class BasicHeaderElementIterator implements org.apache.http.HeaderElementIterator { - ctor public BasicHeaderElementIterator(org.apache.http.HeaderIterator, org.apache.http.message.HeaderValueParser); - ctor public BasicHeaderElementIterator(org.apache.http.HeaderIterator); - method public boolean hasNext(); - method public final java.lang.Object next() throws java.util.NoSuchElementException; - method public org.apache.http.HeaderElement nextElement() throws java.util.NoSuchElementException; - method public void remove() throws java.lang.UnsupportedOperationException; - } - - public deprecated class BasicHeaderIterator implements org.apache.http.HeaderIterator { - ctor public BasicHeaderIterator(org.apache.http.Header[], java.lang.String); - method protected boolean filterHeader(int); - method protected int findNext(int); - method public boolean hasNext(); - method public final java.lang.Object next() throws java.util.NoSuchElementException; - method public org.apache.http.Header nextHeader() throws java.util.NoSuchElementException; - method public void remove() throws java.lang.UnsupportedOperationException; - field protected final org.apache.http.Header[] allHeaders; - field protected int currentIndex; - field protected java.lang.String headerName; - } - - public deprecated class BasicHeaderValueFormatter implements org.apache.http.message.HeaderValueFormatter { - ctor public BasicHeaderValueFormatter(); - method protected void doFormatValue(org.apache.http.util.CharArrayBuffer, java.lang.String, boolean); - method protected int estimateElementsLen(org.apache.http.HeaderElement[]); - method protected int estimateHeaderElementLen(org.apache.http.HeaderElement); - method protected int estimateNameValuePairLen(org.apache.http.NameValuePair); - method protected int estimateParametersLen(org.apache.http.NameValuePair[]); - method public static final java.lang.String formatElements(org.apache.http.HeaderElement[], boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatElements(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement[], boolean); - method public static final java.lang.String formatHeaderElement(org.apache.http.HeaderElement, boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement, boolean); - method public static final java.lang.String formatNameValuePair(org.apache.http.NameValuePair, boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair, boolean); - method public static final java.lang.String formatParameters(org.apache.http.NameValuePair[], boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair[], boolean); - method protected boolean isSeparator(char); - method protected boolean isUnsafe(char); - field public static final org.apache.http.message.BasicHeaderValueFormatter DEFAULT; - field public static final java.lang.String SEPARATORS = " ;,:@()<>\\\"/[]?={}\t"; - field public static final java.lang.String UNSAFE_CHARS = "\"\\"; - } - - public deprecated class BasicHeaderValueParser implements org.apache.http.message.HeaderValueParser { - ctor public BasicHeaderValueParser(); - method protected org.apache.http.HeaderElement createHeaderElement(java.lang.String, java.lang.String, org.apache.http.NameValuePair[]); - method protected org.apache.http.NameValuePair createNameValuePair(java.lang.String, java.lang.String); - method public static final org.apache.http.HeaderElement[] parseElements(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.HeaderElement[] parseElements(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public static final org.apache.http.HeaderElement parseHeaderElement(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.HeaderElement parseHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public static final org.apache.http.NameValuePair parseNameValuePair(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.NameValuePair parseNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public org.apache.http.NameValuePair parseNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor, char[]); - method public static final org.apache.http.NameValuePair[] parseParameters(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.NameValuePair[] parseParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - field public static final org.apache.http.message.BasicHeaderValueParser DEFAULT; - } - - public deprecated class BasicHttpEntityEnclosingRequest extends org.apache.http.message.BasicHttpRequest implements org.apache.http.HttpEntityEnclosingRequest { - ctor public BasicHttpEntityEnclosingRequest(java.lang.String, java.lang.String); - ctor public BasicHttpEntityEnclosingRequest(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - ctor public BasicHttpEntityEnclosingRequest(org.apache.http.RequestLine); - method public boolean expectContinue(); - method public org.apache.http.HttpEntity getEntity(); - method public void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class BasicHttpRequest extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.HttpRequest { - ctor public BasicHttpRequest(java.lang.String, java.lang.String); - ctor public BasicHttpRequest(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - ctor public BasicHttpRequest(org.apache.http.RequestLine); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public org.apache.http.RequestLine getRequestLine(); - } - - public deprecated class BasicHttpResponse extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.HttpResponse { - ctor public BasicHttpResponse(org.apache.http.StatusLine, org.apache.http.ReasonPhraseCatalog, java.util.Locale); - ctor public BasicHttpResponse(org.apache.http.StatusLine); - ctor public BasicHttpResponse(org.apache.http.ProtocolVersion, int, java.lang.String); - method public org.apache.http.HttpEntity getEntity(); - method public java.util.Locale getLocale(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method protected java.lang.String getReason(int); - method public org.apache.http.StatusLine getStatusLine(); - method public void setEntity(org.apache.http.HttpEntity); - method public void setLocale(java.util.Locale); - method public void setReasonPhrase(java.lang.String); - method public void setStatusCode(int); - method public void setStatusLine(org.apache.http.StatusLine); - method public void setStatusLine(org.apache.http.ProtocolVersion, int); - method public void setStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - } - - public deprecated class BasicLineFormatter implements org.apache.http.message.LineFormatter { - ctor public BasicLineFormatter(); - method public org.apache.http.util.CharArrayBuffer appendProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.ProtocolVersion); - method protected void doFormatHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.Header); - method protected void doFormatRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.RequestLine); - method protected void doFormatStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.StatusLine); - method protected int estimateProtocolVersionLen(org.apache.http.ProtocolVersion); - method public static final java.lang.String formatHeader(org.apache.http.Header, org.apache.http.message.LineFormatter); - method public org.apache.http.util.CharArrayBuffer formatHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.Header); - method public static final java.lang.String formatProtocolVersion(org.apache.http.ProtocolVersion, org.apache.http.message.LineFormatter); - method public static final java.lang.String formatRequestLine(org.apache.http.RequestLine, org.apache.http.message.LineFormatter); - method public org.apache.http.util.CharArrayBuffer formatRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.RequestLine); - method public static final java.lang.String formatStatusLine(org.apache.http.StatusLine, org.apache.http.message.LineFormatter); - method public org.apache.http.util.CharArrayBuffer formatStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.StatusLine); - method protected org.apache.http.util.CharArrayBuffer initBuffer(org.apache.http.util.CharArrayBuffer); - field public static final org.apache.http.message.BasicLineFormatter DEFAULT; - } - - public deprecated class BasicLineParser implements org.apache.http.message.LineParser { - ctor public BasicLineParser(org.apache.http.ProtocolVersion); - ctor public BasicLineParser(); - method protected org.apache.http.ProtocolVersion createProtocolVersion(int, int); - method protected org.apache.http.RequestLine createRequestLine(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - method protected org.apache.http.StatusLine createStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - method public boolean hasProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public static final org.apache.http.Header parseHeader(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.Header parseHeader(org.apache.http.util.CharArrayBuffer) throws org.apache.http.ParseException; - method public static final org.apache.http.ProtocolVersion parseProtocolVersion(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.ProtocolVersion parseProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public static final org.apache.http.RequestLine parseRequestLine(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.RequestLine parseRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public static final org.apache.http.StatusLine parseStatusLine(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.StatusLine parseStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method protected void skipWhitespace(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - field public static final org.apache.http.message.BasicLineParser DEFAULT; - field protected final org.apache.http.ProtocolVersion protocol; - } - - public deprecated class BasicListHeaderIterator implements org.apache.http.HeaderIterator { - ctor public BasicListHeaderIterator(java.util.List, java.lang.String); - method protected boolean filterHeader(int); - method protected int findNext(int); - method public boolean hasNext(); - method public final java.lang.Object next() throws java.util.NoSuchElementException; - method public org.apache.http.Header nextHeader() throws java.util.NoSuchElementException; - method public void remove() throws java.lang.UnsupportedOperationException; - field protected final java.util.List allHeaders; - field protected int currentIndex; - field protected java.lang.String headerName; - field protected int lastIndex; - } - - public deprecated class BasicNameValuePair implements java.lang.Cloneable org.apache.http.NameValuePair { - ctor public BasicNameValuePair(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getName(); - method public java.lang.String getValue(); - } - - public deprecated class BasicRequestLine implements java.lang.Cloneable org.apache.http.RequestLine { - ctor public BasicRequestLine(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getMethod(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public java.lang.String getUri(); - } - - public deprecated class BasicStatusLine implements java.lang.Cloneable org.apache.http.StatusLine { - ctor public BasicStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public java.lang.String getReasonPhrase(); - method public int getStatusCode(); - } - - public deprecated class BasicTokenIterator implements org.apache.http.TokenIterator { - ctor public BasicTokenIterator(org.apache.http.HeaderIterator); - method protected java.lang.String createToken(java.lang.String, int, int); - method protected int findNext(int) throws org.apache.http.ParseException; - method protected int findTokenEnd(int); - method protected int findTokenSeparator(int); - method protected int findTokenStart(int); - method public boolean hasNext(); - method protected boolean isHttpSeparator(char); - method protected boolean isTokenChar(char); - method protected boolean isTokenSeparator(char); - method protected boolean isWhitespace(char); - method public final java.lang.Object next() throws java.util.NoSuchElementException, org.apache.http.ParseException; - method public java.lang.String nextToken() throws java.util.NoSuchElementException, org.apache.http.ParseException; - method public final void remove() throws java.lang.UnsupportedOperationException; - field public static final java.lang.String HTTP_SEPARATORS = " ,;=()<>@:\\\"/[]?{}\t"; - field protected java.lang.String currentHeader; - field protected java.lang.String currentToken; - field protected final org.apache.http.HeaderIterator headerIt; - field protected int searchPos; - } - - public deprecated class BufferedHeader implements java.lang.Cloneable org.apache.http.FormattedHeader { - ctor public BufferedHeader(org.apache.http.util.CharArrayBuffer) throws org.apache.http.ParseException; - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.util.CharArrayBuffer getBuffer(); - method public org.apache.http.HeaderElement[] getElements() throws org.apache.http.ParseException; - method public java.lang.String getName(); - method public java.lang.String getValue(); - method public int getValuePos(); - } - - public deprecated class HeaderGroup implements java.lang.Cloneable { - ctor public HeaderGroup(); - method public void addHeader(org.apache.http.Header); - method public void clear(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public boolean containsHeader(java.lang.String); - method public org.apache.http.message.HeaderGroup copy(); - method public org.apache.http.Header[] getAllHeaders(); - method public org.apache.http.Header getCondensedHeader(java.lang.String); - method public org.apache.http.Header getFirstHeader(java.lang.String); - method public org.apache.http.Header[] getHeaders(java.lang.String); - method public org.apache.http.Header getLastHeader(java.lang.String); - method public org.apache.http.HeaderIterator iterator(); - method public org.apache.http.HeaderIterator iterator(java.lang.String); - method public void removeHeader(org.apache.http.Header); - method public void setHeaders(org.apache.http.Header[]); - method public void updateHeader(org.apache.http.Header); - } - - public abstract deprecated interface HeaderValueFormatter { - method public abstract org.apache.http.util.CharArrayBuffer formatElements(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement[], boolean); - method public abstract org.apache.http.util.CharArrayBuffer formatHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement, boolean); - method public abstract org.apache.http.util.CharArrayBuffer formatNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair, boolean); - method public abstract org.apache.http.util.CharArrayBuffer formatParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair[], boolean); - } - - public abstract deprecated interface HeaderValueParser { - method public abstract org.apache.http.HeaderElement[] parseElements(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.HeaderElement parseHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.NameValuePair parseNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.NameValuePair[] parseParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - } - - public abstract deprecated interface LineFormatter { - method public abstract org.apache.http.util.CharArrayBuffer appendProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.ProtocolVersion); - method public abstract org.apache.http.util.CharArrayBuffer formatHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.Header); - method public abstract org.apache.http.util.CharArrayBuffer formatRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.RequestLine); - method public abstract org.apache.http.util.CharArrayBuffer formatStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.StatusLine); - } - - public abstract deprecated interface LineParser { - method public abstract boolean hasProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public abstract org.apache.http.Header parseHeader(org.apache.http.util.CharArrayBuffer) throws org.apache.http.ParseException; - method public abstract org.apache.http.ProtocolVersion parseProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.RequestLine parseRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.StatusLine parseStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - } - - public deprecated class ParserCursor { - ctor public ParserCursor(int, int); - method public boolean atEnd(); - method public int getLowerBound(); - method public int getPos(); - method public int getUpperBound(); - method public void updatePos(int); - } - -} - package org.apache.http.params { - public abstract deprecated class AbstractHttpParams implements org.apache.http.params.HttpParams { - ctor protected AbstractHttpParams(); - method public boolean getBooleanParameter(java.lang.String, boolean); - method public double getDoubleParameter(java.lang.String, double); - method public int getIntParameter(java.lang.String, int); - method public long getLongParameter(java.lang.String, long); - method public boolean isParameterFalse(java.lang.String); - method public boolean isParameterTrue(java.lang.String); - method public org.apache.http.params.HttpParams setBooleanParameter(java.lang.String, boolean); - method public org.apache.http.params.HttpParams setDoubleParameter(java.lang.String, double); - method public org.apache.http.params.HttpParams setIntParameter(java.lang.String, int); - method public org.apache.http.params.HttpParams setLongParameter(java.lang.String, long); - } - - public final deprecated class BasicHttpParams extends org.apache.http.params.AbstractHttpParams implements java.lang.Cloneable java.io.Serializable { - ctor public BasicHttpParams(); - method public void clear(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.params.HttpParams copy(); - method protected void copyParams(org.apache.http.params.HttpParams); - method public java.lang.Object getParameter(java.lang.String); - method public boolean isParameterSet(java.lang.String); - method public boolean isParameterSetLocally(java.lang.String); - method public boolean removeParameter(java.lang.String); - method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object); - method public void setParameters(java.lang.String[], java.lang.Object); - } - public abstract deprecated interface CoreConnectionPNames { field public static final java.lang.String CONNECTION_TIMEOUT = "http.connection.timeout"; field public static final java.lang.String MAX_HEADER_COUNT = "http.connection.max-header-count"; @@ -57900,41 +54965,6 @@ package org.apache.http.params { field public static final java.lang.String TCP_NODELAY = "http.tcp.nodelay"; } - public abstract deprecated interface CoreProtocolPNames { - field public static final java.lang.String HTTP_CONTENT_CHARSET = "http.protocol.content-charset"; - field public static final java.lang.String HTTP_ELEMENT_CHARSET = "http.protocol.element-charset"; - field public static final java.lang.String ORIGIN_SERVER = "http.origin-server"; - field public static final java.lang.String PROTOCOL_VERSION = "http.protocol.version"; - field public static final java.lang.String STRICT_TRANSFER_ENCODING = "http.protocol.strict-transfer-encoding"; - field public static final java.lang.String USER_AGENT = "http.useragent"; - field public static final java.lang.String USE_EXPECT_CONTINUE = "http.protocol.expect-continue"; - field public static final java.lang.String WAIT_FOR_CONTINUE = "http.protocol.wait-for-continue"; - } - - public final deprecated class DefaultedHttpParams extends org.apache.http.params.AbstractHttpParams { - ctor public DefaultedHttpParams(org.apache.http.params.HttpParams, org.apache.http.params.HttpParams); - method public org.apache.http.params.HttpParams copy(); - method public org.apache.http.params.HttpParams getDefaults(); - method public java.lang.Object getParameter(java.lang.String); - method public boolean removeParameter(java.lang.String); - method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object); - } - - public abstract deprecated class HttpAbstractParamBean { - ctor public HttpAbstractParamBean(org.apache.http.params.HttpParams); - field protected final org.apache.http.params.HttpParams params; - } - - public deprecated class HttpConnectionParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public HttpConnectionParamBean(org.apache.http.params.HttpParams); - method public void setConnectionTimeout(int); - method public void setLinger(int); - method public void setSoTimeout(int); - method public void setSocketBufferSize(int); - method public void setStaleCheckingEnabled(boolean); - method public void setTcpNoDelay(boolean); - } - public final deprecated class HttpConnectionParams implements org.apache.http.params.CoreConnectionPNames { method public static int getConnectionTimeout(org.apache.http.params.HttpParams); method public static int getLinger(org.apache.http.params.HttpParams); @@ -57967,359 +54997,6 @@ package org.apache.http.params { method public abstract org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object); } - public deprecated class HttpProtocolParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public HttpProtocolParamBean(org.apache.http.params.HttpParams); - method public void setContentCharset(java.lang.String); - method public void setHttpElementCharset(java.lang.String); - method public void setUseExpectContinue(boolean); - method public void setUserAgent(java.lang.String); - method public void setVersion(org.apache.http.HttpVersion); - } - - public final deprecated class HttpProtocolParams implements org.apache.http.params.CoreProtocolPNames { - method public static java.lang.String getContentCharset(org.apache.http.params.HttpParams); - method public static java.lang.String getHttpElementCharset(org.apache.http.params.HttpParams); - method public static java.lang.String getUserAgent(org.apache.http.params.HttpParams); - method public static org.apache.http.ProtocolVersion getVersion(org.apache.http.params.HttpParams); - method public static void setContentCharset(org.apache.http.params.HttpParams, java.lang.String); - method public static void setHttpElementCharset(org.apache.http.params.HttpParams, java.lang.String); - method public static void setUseExpectContinue(org.apache.http.params.HttpParams, boolean); - method public static void setUserAgent(org.apache.http.params.HttpParams, java.lang.String); - method public static void setVersion(org.apache.http.params.HttpParams, org.apache.http.ProtocolVersion); - method public static boolean useExpectContinue(org.apache.http.params.HttpParams); - } - -} - -package org.apache.http.protocol { - - public deprecated class BasicHttpContext implements org.apache.http.protocol.HttpContext { - ctor public BasicHttpContext(); - ctor public BasicHttpContext(org.apache.http.protocol.HttpContext); - method public java.lang.Object getAttribute(java.lang.String); - method public java.lang.Object removeAttribute(java.lang.String); - method public void setAttribute(java.lang.String, java.lang.Object); - } - - public final deprecated class BasicHttpProcessor implements java.lang.Cloneable org.apache.http.protocol.HttpProcessor org.apache.http.protocol.HttpRequestInterceptorList org.apache.http.protocol.HttpResponseInterceptorList { - ctor public BasicHttpProcessor(); - method public final void addInterceptor(org.apache.http.HttpRequestInterceptor); - method public final void addInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public final void addInterceptor(org.apache.http.HttpResponseInterceptor); - method public final void addInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor); - method public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor); - method public void clearInterceptors(); - method public void clearRequestInterceptors(); - method public void clearResponseInterceptors(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.protocol.BasicHttpProcessor copy(); - method protected void copyInterceptors(org.apache.http.protocol.BasicHttpProcessor); - method public org.apache.http.HttpRequestInterceptor getRequestInterceptor(int); - method public int getRequestInterceptorCount(); - method public org.apache.http.HttpResponseInterceptor getResponseInterceptor(int); - method public int getResponseInterceptorCount(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void removeRequestInterceptorByClass(java.lang.Class); - method public void removeResponseInterceptorByClass(java.lang.Class); - method public void setInterceptors(java.util.List); - field protected java.util.List requestInterceptors; - field protected java.util.List responseInterceptors; - } - - public final deprecated class DefaultedHttpContext implements org.apache.http.protocol.HttpContext { - ctor public DefaultedHttpContext(org.apache.http.protocol.HttpContext, org.apache.http.protocol.HttpContext); - method public java.lang.Object getAttribute(java.lang.String); - method public org.apache.http.protocol.HttpContext getDefaults(); - method public java.lang.Object removeAttribute(java.lang.String); - method public void setAttribute(java.lang.String, java.lang.Object); - } - - public abstract deprecated interface ExecutionContext { - field public static final java.lang.String HTTP_CONNECTION = "http.connection"; - field public static final java.lang.String HTTP_PROXY_HOST = "http.proxy_host"; - field public static final java.lang.String HTTP_REQUEST = "http.request"; - field public static final java.lang.String HTTP_REQ_SENT = "http.request_sent"; - field public static final java.lang.String HTTP_RESPONSE = "http.response"; - field public static final java.lang.String HTTP_TARGET_HOST = "http.target_host"; - } - - public final deprecated class HTTP { - method public static boolean isWhitespace(char); - field public static final java.lang.String ASCII = "ASCII"; - field public static final java.lang.String CHARSET_PARAM = "; charset="; - field public static final java.lang.String CHUNK_CODING = "chunked"; - field public static final java.lang.String CONN_CLOSE = "Close"; - field public static final java.lang.String CONN_DIRECTIVE = "Connection"; - field public static final java.lang.String CONN_KEEP_ALIVE = "Keep-Alive"; - field public static final java.lang.String CONTENT_ENCODING = "Content-Encoding"; - field public static final java.lang.String CONTENT_LEN = "Content-Length"; - field public static final java.lang.String CONTENT_TYPE = "Content-Type"; - field public static final int CR = 13; // 0xd - field public static final java.lang.String DATE_HEADER = "Date"; - field public static final java.lang.String DEFAULT_CONTENT_CHARSET = "ISO-8859-1"; - field public static final java.lang.String DEFAULT_CONTENT_TYPE = "application/octet-stream"; - field public static final java.lang.String DEFAULT_PROTOCOL_CHARSET = "US-ASCII"; - field public static final java.lang.String EXPECT_CONTINUE = "100-continue"; - field public static final java.lang.String EXPECT_DIRECTIVE = "Expect"; - field public static final int HT = 9; // 0x9 - field public static final java.lang.String IDENTITY_CODING = "identity"; - field public static final java.lang.String ISO_8859_1 = "ISO-8859-1"; - field public static final int LF = 10; // 0xa - field public static final java.lang.String OCTET_STREAM_TYPE = "application/octet-stream"; - field public static final java.lang.String PLAIN_TEXT_TYPE = "text/plain"; - field public static final java.lang.String SERVER_HEADER = "Server"; - field public static final int SP = 32; // 0x20 - field public static final java.lang.String TARGET_HOST = "Host"; - field public static final java.lang.String TRANSFER_ENCODING = "Transfer-Encoding"; - field public static final java.lang.String USER_AGENT = "User-Agent"; - field public static final java.lang.String US_ASCII = "US-ASCII"; - field public static final java.lang.String UTF_16 = "UTF-16"; - field public static final java.lang.String UTF_8 = "UTF-8"; - } - - public abstract deprecated interface HttpContext { - method public abstract java.lang.Object getAttribute(java.lang.String); - method public abstract java.lang.Object removeAttribute(java.lang.String); - method public abstract void setAttribute(java.lang.String, java.lang.Object); - field public static final java.lang.String RESERVED_PREFIX = "http."; - } - - public deprecated class HttpDateGenerator { - ctor public HttpDateGenerator(); - method public synchronized java.lang.String getCurrentDate(); - field public static final java.util.TimeZone GMT; - field public static final java.lang.String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz"; - } - - public abstract deprecated interface HttpExpectationVerifier { - method public abstract void verify(org.apache.http.HttpRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - } - - public abstract deprecated interface HttpProcessor implements org.apache.http.HttpRequestInterceptor org.apache.http.HttpResponseInterceptor { - } - - public deprecated class HttpRequestExecutor { - ctor public HttpRequestExecutor(); - method protected boolean canResponseHaveBody(org.apache.http.HttpRequest, org.apache.http.HttpResponse); - method protected org.apache.http.HttpResponse doReceiveResponse(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.HttpResponse doSendRequest(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void postProcess(org.apache.http.HttpResponse, org.apache.http.protocol.HttpProcessor, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void preProcess(org.apache.http.HttpRequest, org.apache.http.protocol.HttpProcessor, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpRequestHandler { - method public abstract void handle(org.apache.http.HttpRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class HttpRequestHandlerRegistry implements org.apache.http.protocol.HttpRequestHandlerResolver { - ctor public HttpRequestHandlerRegistry(); - method public org.apache.http.protocol.HttpRequestHandler lookup(java.lang.String); - method protected deprecated boolean matchUriRequestPattern(java.lang.String, java.lang.String); - method public void register(java.lang.String, org.apache.http.protocol.HttpRequestHandler); - method public void setHandlers(java.util.Map); - method public void unregister(java.lang.String); - } - - public abstract deprecated interface HttpRequestHandlerResolver { - method public abstract org.apache.http.protocol.HttpRequestHandler lookup(java.lang.String); - } - - public abstract deprecated interface HttpRequestInterceptorList { - method public abstract void addRequestInterceptor(org.apache.http.HttpRequestInterceptor); - method public abstract void addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public abstract void clearRequestInterceptors(); - method public abstract org.apache.http.HttpRequestInterceptor getRequestInterceptor(int); - method public abstract int getRequestInterceptorCount(); - method public abstract void removeRequestInterceptorByClass(java.lang.Class); - method public abstract void setInterceptors(java.util.List); - } - - public abstract deprecated interface HttpResponseInterceptorList { - method public abstract void addResponseInterceptor(org.apache.http.HttpResponseInterceptor); - method public abstract void addResponseInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public abstract void clearResponseInterceptors(); - method public abstract org.apache.http.HttpResponseInterceptor getResponseInterceptor(int); - method public abstract int getResponseInterceptorCount(); - method public abstract void removeResponseInterceptorByClass(java.lang.Class); - method public abstract void setInterceptors(java.util.List); - } - - public deprecated class HttpService { - ctor public HttpService(org.apache.http.protocol.HttpProcessor, org.apache.http.ConnectionReuseStrategy, org.apache.http.HttpResponseFactory); - method protected void doService(org.apache.http.HttpRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.params.HttpParams getParams(); - method protected void handleException(org.apache.http.HttpException, org.apache.http.HttpResponse); - method public void handleRequest(org.apache.http.HttpServerConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void setConnReuseStrategy(org.apache.http.ConnectionReuseStrategy); - method public void setExpectationVerifier(org.apache.http.protocol.HttpExpectationVerifier); - method public void setHandlerResolver(org.apache.http.protocol.HttpRequestHandlerResolver); - method public void setHttpProcessor(org.apache.http.protocol.HttpProcessor); - method public void setParams(org.apache.http.params.HttpParams); - method public void setResponseFactory(org.apache.http.HttpResponseFactory); - } - - public deprecated class RequestConnControl implements org.apache.http.HttpRequestInterceptor { - ctor public RequestConnControl(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestContent implements org.apache.http.HttpRequestInterceptor { - ctor public RequestContent(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestDate implements org.apache.http.HttpRequestInterceptor { - ctor public RequestDate(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestExpectContinue implements org.apache.http.HttpRequestInterceptor { - ctor public RequestExpectContinue(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestTargetHost implements org.apache.http.HttpRequestInterceptor { - ctor public RequestTargetHost(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestUserAgent implements org.apache.http.HttpRequestInterceptor { - ctor public RequestUserAgent(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseConnControl implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseConnControl(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseContent implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseContent(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseDate implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseDate(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseServer implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseServer(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class SyncBasicHttpContext extends org.apache.http.protocol.BasicHttpContext { - ctor public SyncBasicHttpContext(org.apache.http.protocol.HttpContext); - } - - public deprecated class UriPatternMatcher { - ctor public UriPatternMatcher(); - method public java.lang.Object lookup(java.lang.String); - method protected boolean matchUriRequestPattern(java.lang.String, java.lang.String); - method public void register(java.lang.String, java.lang.Object); - method public void setHandlers(java.util.Map); - method public void unregister(java.lang.String); - } - -} - -package org.apache.http.util { - - public final deprecated class ByteArrayBuffer { - ctor public ByteArrayBuffer(int); - method public void append(byte[], int, int); - method public void append(int); - method public void append(char[], int, int); - method public void append(org.apache.http.util.CharArrayBuffer, int, int); - method public byte[] buffer(); - method public int byteAt(int); - method public int capacity(); - method public void clear(); - method public boolean isEmpty(); - method public boolean isFull(); - method public int length(); - method public void setLength(int); - method public byte[] toByteArray(); - } - - public final deprecated class CharArrayBuffer { - ctor public CharArrayBuffer(int); - method public void append(char[], int, int); - method public void append(java.lang.String); - method public void append(org.apache.http.util.CharArrayBuffer, int, int); - method public void append(org.apache.http.util.CharArrayBuffer); - method public void append(char); - method public void append(byte[], int, int); - method public void append(org.apache.http.util.ByteArrayBuffer, int, int); - method public void append(java.lang.Object); - method public char[] buffer(); - method public int capacity(); - method public char charAt(int); - method public void clear(); - method public void ensureCapacity(int); - method public int indexOf(int, int, int); - method public int indexOf(int); - method public boolean isEmpty(); - method public boolean isFull(); - method public int length(); - method public void setLength(int); - method public java.lang.String substring(int, int); - method public java.lang.String substringTrimmed(int, int); - method public char[] toCharArray(); - } - - public final deprecated class EncodingUtils { - method public static byte[] getAsciiBytes(java.lang.String); - method public static java.lang.String getAsciiString(byte[], int, int); - method public static java.lang.String getAsciiString(byte[]); - method public static byte[] getBytes(java.lang.String, java.lang.String); - method public static java.lang.String getString(byte[], int, int, java.lang.String); - method public static java.lang.String getString(byte[], java.lang.String); - } - - public final deprecated class EntityUtils { - method public static java.lang.String getContentCharSet(org.apache.http.HttpEntity) throws org.apache.http.ParseException; - method public static byte[] toByteArray(org.apache.http.HttpEntity) throws java.io.IOException; - method public static java.lang.String toString(org.apache.http.HttpEntity, java.lang.String) throws java.io.IOException, org.apache.http.ParseException; - method public static java.lang.String toString(org.apache.http.HttpEntity) throws java.io.IOException, org.apache.http.ParseException; - } - - public final deprecated class ExceptionUtils { - method public static void initCause(java.lang.Throwable, java.lang.Throwable); - } - - public final deprecated class LangUtils { - method public static boolean equals(java.lang.Object, java.lang.Object); - method public static boolean equals(java.lang.Object[], java.lang.Object[]); - method public static int hashCode(int, int); - method public static int hashCode(int, boolean); - method public static int hashCode(int, java.lang.Object); - field public static final int HASH_OFFSET = 37; // 0x25 - field public static final int HASH_SEED = 17; // 0x11 - } - - public deprecated class VersionInfo { - ctor protected VersionInfo(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String); - method protected static final org.apache.http.util.VersionInfo fromMap(java.lang.String, java.util.Map, java.lang.ClassLoader); - method public final java.lang.String getClassloader(); - method public final java.lang.String getModule(); - method public final java.lang.String getPackage(); - method public final java.lang.String getRelease(); - method public final java.lang.String getTimestamp(); - method public static final org.apache.http.util.VersionInfo[] loadVersionInfo(java.lang.String[], java.lang.ClassLoader); - method public static final org.apache.http.util.VersionInfo loadVersionInfo(java.lang.String, java.lang.ClassLoader); - field public static final java.lang.String PROPERTY_MODULE = "info.module"; - field public static final java.lang.String PROPERTY_RELEASE = "info.release"; - field public static final java.lang.String PROPERTY_TIMESTAMP = "info.timestamp"; - field public static final java.lang.String UNAVAILABLE = "UNAVAILABLE"; - field public static final java.lang.String VERSION_PROPERTY_FILE = "version.properties"; - } - } package org.json { diff --git a/api/system-current.txt b/api/system-current.txt index 0db4a15..2f43bdf 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -2165,6 +2165,21 @@ package android { field public static final int Theme_Light_Panel = 16973914; // 0x103005a field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062 field public static final int Theme_Material = 16974372; // 0x1030224 + field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4 + field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5 + field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6 + field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc + field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd + field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7 + field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8 + field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9 + field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da + field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db + field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de + field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df + field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0 + field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1 + field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2 field public static final int Theme_Material_Dialog = 16974373; // 0x1030225 field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c @@ -12260,8 +12275,10 @@ package android.graphics.drawable { public class LayerDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback { ctor public LayerDrawable(android.graphics.drawable.Drawable[]); + method public int addLayer(android.graphics.drawable.Drawable); method public void draw(android.graphics.Canvas); method public android.graphics.drawable.Drawable findDrawableByLayerId(int); + method public int findIndexByLayerId(int); method public android.graphics.drawable.Drawable getDrawable(int); method public int getId(int); method public int getLayerGravity(int); @@ -12274,6 +12291,7 @@ package android.graphics.drawable { method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long); method public void setAlpha(int); method public void setColorFilter(android.graphics.ColorFilter); + method public void setDrawable(int, android.graphics.drawable.Drawable); method public boolean setDrawableByLayerId(int, android.graphics.drawable.Drawable); method public void setId(int, int); method public void setLayerGravity(int, int); @@ -19201,30 +19219,6 @@ package android.net { package android.net.http { - public final deprecated class AndroidHttpClient implements org.apache.http.client.HttpClient { - method public void close(); - method public void disableCurlLogging(); - method public void enableCurlLogging(java.lang.String, int); - method public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest) throws java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) throws java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest) throws java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public static org.apache.http.entity.AbstractHttpEntity getCompressedEntity(byte[], android.content.ContentResolver) throws java.io.IOException; - method public org.apache.http.conn.ClientConnectionManager getConnectionManager(); - method public static long getMinGzipSize(android.content.ContentResolver); - method public org.apache.http.params.HttpParams getParams(); - method public static java.io.InputStream getUngzippedContent(org.apache.http.HttpEntity) throws java.io.IOException; - method public static void modifyRequestToAcceptGzipResponse(org.apache.http.HttpRequest); - method public static deprecated android.net.http.AndroidHttpClient newInstance(java.lang.String, android.content.Context); - method public static deprecated android.net.http.AndroidHttpClient newInstance(java.lang.String); - method public static long parseDate(java.lang.String); - field public static long DEFAULT_SYNC_MIN_GZIP_BYTES; - } - public final class HttpResponseCache extends java.net.ResponseCache implements java.io.Closeable { method public void close() throws java.io.IOException; method public void delete() throws java.io.IOException; @@ -29178,6 +29172,7 @@ package android.service.notification { field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2 + field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0 field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService"; field public static final int TRIM_FULL = 0; // 0x0 field public static final int TRIM_LIGHT = 1; // 0x1 @@ -33949,6 +33944,7 @@ package android.transition { method public android.transition.Transition addTarget(java.lang.String); method public android.transition.Transition addTarget(java.lang.Class); method public android.transition.Transition addTarget(android.view.View); + method protected boolean areValuesChanged(android.transition.TransitionValues, android.transition.TransitionValues); method public boolean canRemoveViews(); method public abstract void captureEndValues(android.transition.TransitionValues); method public abstract void captureStartValues(android.transition.TransitionValues); @@ -34203,6 +34199,7 @@ package android.util { method public boolean equals(android.util.DisplayMetrics); method public void setTo(android.util.DisplayMetrics); method public void setToDefaults(); + field public static final int DENSITY_280 = 280; // 0x118 field public static final int DENSITY_400 = 400; // 0x190 field public static final int DENSITY_560 = 560; // 0x230 field public static final int DENSITY_DEFAULT = 160; // 0xa0 @@ -40243,6 +40240,7 @@ package android.widget { ctor public CompoundButton(android.content.Context, android.util.AttributeSet); ctor public CompoundButton(android.content.Context, android.util.AttributeSet, int); ctor public CompoundButton(android.content.Context, android.util.AttributeSet, int, int); + method public android.graphics.drawable.Drawable getButtonDrawable(); method public android.content.res.ColorStateList getButtonTintList(); method public android.graphics.PorterDuff.Mode getButtonTintMode(); method public boolean isChecked(); @@ -57323,1105 +57321,13 @@ package junit.runner { } -package org.apache.commons.logging { - - public abstract deprecated interface Log { - method public abstract void debug(java.lang.Object); - method public abstract void debug(java.lang.Object, java.lang.Throwable); - method public abstract void error(java.lang.Object); - method public abstract void error(java.lang.Object, java.lang.Throwable); - method public abstract void fatal(java.lang.Object); - method public abstract void fatal(java.lang.Object, java.lang.Throwable); - method public abstract void info(java.lang.Object); - method public abstract void info(java.lang.Object, java.lang.Throwable); - method public abstract boolean isDebugEnabled(); - method public abstract boolean isErrorEnabled(); - method public abstract boolean isFatalEnabled(); - method public abstract boolean isInfoEnabled(); - method public abstract boolean isTraceEnabled(); - method public abstract boolean isWarnEnabled(); - method public abstract void trace(java.lang.Object); - method public abstract void trace(java.lang.Object, java.lang.Throwable); - method public abstract void warn(java.lang.Object); - method public abstract void warn(java.lang.Object, java.lang.Throwable); - } - -} - -package org.apache.http { - - public deprecated class ConnectionClosedException extends java.io.IOException { - ctor public ConnectionClosedException(java.lang.String); - } - - public abstract deprecated interface ConnectionReuseStrategy { - method public abstract boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public abstract deprecated interface FormattedHeader implements org.apache.http.Header { - method public abstract org.apache.http.util.CharArrayBuffer getBuffer(); - method public abstract int getValuePos(); - } - - public abstract deprecated interface Header { - method public abstract org.apache.http.HeaderElement[] getElements() throws org.apache.http.ParseException; - method public abstract java.lang.String getName(); - method public abstract java.lang.String getValue(); - } - - public abstract deprecated interface HeaderElement { - method public abstract java.lang.String getName(); - method public abstract org.apache.http.NameValuePair getParameter(int); - method public abstract org.apache.http.NameValuePair getParameterByName(java.lang.String); - method public abstract int getParameterCount(); - method public abstract org.apache.http.NameValuePair[] getParameters(); - method public abstract java.lang.String getValue(); - } - - public abstract deprecated interface HeaderElementIterator implements java.util.Iterator { - method public abstract boolean hasNext(); - method public abstract org.apache.http.HeaderElement nextElement(); - } - - public abstract deprecated interface HeaderIterator implements java.util.Iterator { - method public abstract boolean hasNext(); - method public abstract org.apache.http.Header nextHeader(); - } - - public abstract deprecated interface HttpClientConnection implements org.apache.http.HttpConnection { - method public abstract void flush() throws java.io.IOException; - method public abstract boolean isResponseAvailable(int) throws java.io.IOException; - method public abstract void receiveResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public abstract org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpConnection { - method public abstract void close() throws java.io.IOException; - method public abstract org.apache.http.HttpConnectionMetrics getMetrics(); - method public abstract int getSocketTimeout(); - method public abstract boolean isOpen(); - method public abstract boolean isStale(); - method public abstract void setSocketTimeout(int); - method public abstract void shutdown() throws java.io.IOException; - } - - public abstract deprecated interface HttpConnectionMetrics { - method public abstract java.lang.Object getMetric(java.lang.String); - method public abstract long getReceivedBytesCount(); - method public abstract long getRequestCount(); - method public abstract long getResponseCount(); - method public abstract long getSentBytesCount(); - method public abstract void reset(); - } - - public abstract deprecated interface HttpEntity { - method public abstract void consumeContent() throws java.io.IOException; - method public abstract java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException; - method public abstract org.apache.http.Header getContentEncoding(); - method public abstract long getContentLength(); - method public abstract org.apache.http.Header getContentType(); - method public abstract boolean isChunked(); - method public abstract boolean isRepeatable(); - method public abstract boolean isStreaming(); - method public abstract void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public abstract deprecated interface HttpEntityEnclosingRequest implements org.apache.http.HttpRequest { - method public abstract boolean expectContinue(); - method public abstract org.apache.http.HttpEntity getEntity(); - method public abstract void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class HttpException extends java.lang.Exception { - ctor public HttpException(); - ctor public HttpException(java.lang.String); - ctor public HttpException(java.lang.String, java.lang.Throwable); - } - - public final deprecated class HttpHost implements java.lang.Cloneable { - ctor public HttpHost(java.lang.String, int, java.lang.String); - ctor public HttpHost(java.lang.String, int); - ctor public HttpHost(java.lang.String); - ctor public HttpHost(org.apache.http.HttpHost); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getHostName(); - method public int getPort(); - method public java.lang.String getSchemeName(); - method public java.lang.String toHostString(); - method public java.lang.String toURI(); - field public static final java.lang.String DEFAULT_SCHEME_NAME = "http"; - field protected final java.lang.String hostname; - field protected final java.lang.String lcHostname; - field protected final int port; - field protected final java.lang.String schemeName; - } - - public abstract deprecated interface HttpInetConnection implements org.apache.http.HttpConnection { - method public abstract java.net.InetAddress getLocalAddress(); - method public abstract int getLocalPort(); - method public abstract java.net.InetAddress getRemoteAddress(); - method public abstract int getRemotePort(); - } - - public abstract deprecated interface HttpMessage { - method public abstract void addHeader(org.apache.http.Header); - method public abstract void addHeader(java.lang.String, java.lang.String); - method public abstract boolean containsHeader(java.lang.String); - method public abstract org.apache.http.Header[] getAllHeaders(); - method public abstract org.apache.http.Header getFirstHeader(java.lang.String); - method public abstract org.apache.http.Header[] getHeaders(java.lang.String); - method public abstract org.apache.http.Header getLastHeader(java.lang.String); - method public abstract org.apache.http.params.HttpParams getParams(); - method public abstract org.apache.http.ProtocolVersion getProtocolVersion(); - method public abstract org.apache.http.HeaderIterator headerIterator(); - method public abstract org.apache.http.HeaderIterator headerIterator(java.lang.String); - method public abstract void removeHeader(org.apache.http.Header); - method public abstract void removeHeaders(java.lang.String); - method public abstract void setHeader(org.apache.http.Header); - method public abstract void setHeader(java.lang.String, java.lang.String); - method public abstract void setHeaders(org.apache.http.Header[]); - method public abstract void setParams(org.apache.http.params.HttpParams); - } - - public abstract deprecated interface HttpRequest implements org.apache.http.HttpMessage { - method public abstract org.apache.http.RequestLine getRequestLine(); - } - - public abstract deprecated interface HttpRequestFactory { - method public abstract org.apache.http.HttpRequest newHttpRequest(org.apache.http.RequestLine) throws org.apache.http.MethodNotSupportedException; - method public abstract org.apache.http.HttpRequest newHttpRequest(java.lang.String, java.lang.String) throws org.apache.http.MethodNotSupportedException; - } - - public abstract deprecated interface HttpRequestInterceptor { - method public abstract void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpResponse implements org.apache.http.HttpMessage { - method public abstract org.apache.http.HttpEntity getEntity(); - method public abstract java.util.Locale getLocale(); - method public abstract org.apache.http.StatusLine getStatusLine(); - method public abstract void setEntity(org.apache.http.HttpEntity); - method public abstract void setLocale(java.util.Locale); - method public abstract void setReasonPhrase(java.lang.String) throws java.lang.IllegalStateException; - method public abstract void setStatusCode(int) throws java.lang.IllegalStateException; - method public abstract void setStatusLine(org.apache.http.StatusLine); - method public abstract void setStatusLine(org.apache.http.ProtocolVersion, int); - method public abstract void setStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - } - - public abstract deprecated interface HttpResponseFactory { - method public abstract org.apache.http.HttpResponse newHttpResponse(org.apache.http.ProtocolVersion, int, org.apache.http.protocol.HttpContext); - method public abstract org.apache.http.HttpResponse newHttpResponse(org.apache.http.StatusLine, org.apache.http.protocol.HttpContext); - } - - public abstract deprecated interface HttpResponseInterceptor { - method public abstract void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpServerConnection implements org.apache.http.HttpConnection { - method public abstract void flush() throws java.io.IOException; - method public abstract void receiveRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public abstract org.apache.http.HttpRequest receiveRequestHeader() throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public abstract void sendResponseHeader(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpStatus { - field public static final int SC_ACCEPTED = 202; // 0xca - field public static final int SC_BAD_GATEWAY = 502; // 0x1f6 - field public static final int SC_BAD_REQUEST = 400; // 0x190 - field public static final int SC_CONFLICT = 409; // 0x199 - field public static final int SC_CONTINUE = 100; // 0x64 - field public static final int SC_CREATED = 201; // 0xc9 - field public static final int SC_EXPECTATION_FAILED = 417; // 0x1a1 - field public static final int SC_FAILED_DEPENDENCY = 424; // 0x1a8 - field public static final int SC_FORBIDDEN = 403; // 0x193 - field public static final int SC_GATEWAY_TIMEOUT = 504; // 0x1f8 - field public static final int SC_GONE = 410; // 0x19a - field public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505; // 0x1f9 - field public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419; // 0x1a3 - field public static final int SC_INSUFFICIENT_STORAGE = 507; // 0x1fb - field public static final int SC_INTERNAL_SERVER_ERROR = 500; // 0x1f4 - field public static final int SC_LENGTH_REQUIRED = 411; // 0x19b - field public static final int SC_LOCKED = 423; // 0x1a7 - field public static final int SC_METHOD_FAILURE = 420; // 0x1a4 - field public static final int SC_METHOD_NOT_ALLOWED = 405; // 0x195 - field public static final int SC_MOVED_PERMANENTLY = 301; // 0x12d - field public static final int SC_MOVED_TEMPORARILY = 302; // 0x12e - field public static final int SC_MULTIPLE_CHOICES = 300; // 0x12c - field public static final int SC_MULTI_STATUS = 207; // 0xcf - field public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203; // 0xcb - field public static final int SC_NOT_ACCEPTABLE = 406; // 0x196 - field public static final int SC_NOT_FOUND = 404; // 0x194 - field public static final int SC_NOT_IMPLEMENTED = 501; // 0x1f5 - field public static final int SC_NOT_MODIFIED = 304; // 0x130 - field public static final int SC_NO_CONTENT = 204; // 0xcc - field public static final int SC_OK = 200; // 0xc8 - field public static final int SC_PARTIAL_CONTENT = 206; // 0xce - field public static final int SC_PAYMENT_REQUIRED = 402; // 0x192 - field public static final int SC_PRECONDITION_FAILED = 412; // 0x19c - field public static final int SC_PROCESSING = 102; // 0x66 - field public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407; // 0x197 - field public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; // 0x1a0 - field public static final int SC_REQUEST_TIMEOUT = 408; // 0x198 - field public static final int SC_REQUEST_TOO_LONG = 413; // 0x19d - field public static final int SC_REQUEST_URI_TOO_LONG = 414; // 0x19e - field public static final int SC_RESET_CONTENT = 205; // 0xcd - field public static final int SC_SEE_OTHER = 303; // 0x12f - field public static final int SC_SERVICE_UNAVAILABLE = 503; // 0x1f7 - field public static final int SC_SWITCHING_PROTOCOLS = 101; // 0x65 - field public static final int SC_TEMPORARY_REDIRECT = 307; // 0x133 - field public static final int SC_UNAUTHORIZED = 401; // 0x191 - field public static final int SC_UNPROCESSABLE_ENTITY = 422; // 0x1a6 - field public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415; // 0x19f - field public static final int SC_USE_PROXY = 305; // 0x131 - } - - public final deprecated class HttpVersion extends org.apache.http.ProtocolVersion implements java.io.Serializable { - ctor public HttpVersion(int, int); - field public static final java.lang.String HTTP = "HTTP"; - field public static final org.apache.http.HttpVersion HTTP_0_9; - field public static final org.apache.http.HttpVersion HTTP_1_0; - field public static final org.apache.http.HttpVersion HTTP_1_1; - } - - public deprecated class MalformedChunkCodingException extends java.io.IOException { - ctor public MalformedChunkCodingException(); - ctor public MalformedChunkCodingException(java.lang.String); - } - - public deprecated class MethodNotSupportedException extends org.apache.http.HttpException { - ctor public MethodNotSupportedException(java.lang.String); - ctor public MethodNotSupportedException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface NameValuePair { - method public abstract java.lang.String getName(); - method public abstract java.lang.String getValue(); - } - - public deprecated class NoHttpResponseException extends java.io.IOException { - ctor public NoHttpResponseException(java.lang.String); - } - - public deprecated class ParseException extends java.lang.RuntimeException { - ctor public ParseException(); - ctor public ParseException(java.lang.String); - } - - public deprecated class ProtocolException extends org.apache.http.HttpException { - ctor public ProtocolException(); - ctor public ProtocolException(java.lang.String); - ctor public ProtocolException(java.lang.String, java.lang.Throwable); - } - - public deprecated class ProtocolVersion implements java.lang.Cloneable java.io.Serializable { - ctor public ProtocolVersion(java.lang.String, int, int); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public int compareToVersion(org.apache.http.ProtocolVersion); - method public final boolean equals(java.lang.Object); - method public org.apache.http.ProtocolVersion forVersion(int, int); - method public final int getMajor(); - method public final int getMinor(); - method public final java.lang.String getProtocol(); - method public final boolean greaterEquals(org.apache.http.ProtocolVersion); - method public final int hashCode(); - method public boolean isComparable(org.apache.http.ProtocolVersion); - method public final boolean lessEquals(org.apache.http.ProtocolVersion); - field protected final int major; - field protected final int minor; - field protected final java.lang.String protocol; - } - - public abstract deprecated interface ReasonPhraseCatalog { - method public abstract java.lang.String getReason(int, java.util.Locale); - } - - public abstract deprecated interface RequestLine { - method public abstract java.lang.String getMethod(); - method public abstract org.apache.http.ProtocolVersion getProtocolVersion(); - method public abstract java.lang.String getUri(); - } - - public abstract deprecated interface StatusLine { - method public abstract org.apache.http.ProtocolVersion getProtocolVersion(); - method public abstract java.lang.String getReasonPhrase(); - method public abstract int getStatusCode(); - } - - public abstract deprecated interface TokenIterator implements java.util.Iterator { - method public abstract boolean hasNext(); - method public abstract java.lang.String nextToken(); - } - - public deprecated class UnsupportedHttpVersionException extends org.apache.http.ProtocolException { - ctor public UnsupportedHttpVersionException(); - ctor public UnsupportedHttpVersionException(java.lang.String); - } - -} - -package org.apache.http.auth { - - public final deprecated class AUTH { - field public static final java.lang.String PROXY_AUTH = "Proxy-Authenticate"; - field public static final java.lang.String PROXY_AUTH_RESP = "Proxy-Authorization"; - field public static final java.lang.String WWW_AUTH = "WWW-Authenticate"; - field public static final java.lang.String WWW_AUTH_RESP = "Authorization"; - } - - public abstract deprecated interface AuthScheme { - method public abstract org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public abstract java.lang.String getParameter(java.lang.String); - method public abstract java.lang.String getRealm(); - method public abstract java.lang.String getSchemeName(); - method public abstract boolean isComplete(); - method public abstract boolean isConnectionBased(); - method public abstract void processChallenge(org.apache.http.Header) throws org.apache.http.auth.MalformedChallengeException; - } - - public abstract deprecated interface AuthSchemeFactory { - method public abstract org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams); - } - - public final deprecated class AuthSchemeRegistry { - ctor public AuthSchemeRegistry(); - method public synchronized org.apache.http.auth.AuthScheme getAuthScheme(java.lang.String, org.apache.http.params.HttpParams) throws java.lang.IllegalStateException; - method public synchronized java.util.List<java.lang.String> getSchemeNames(); - method public synchronized void register(java.lang.String, org.apache.http.auth.AuthSchemeFactory); - method public synchronized void setItems(java.util.Map<java.lang.String, org.apache.http.auth.AuthSchemeFactory>); - method public synchronized void unregister(java.lang.String); - } - - public deprecated class AuthScope { - ctor public AuthScope(java.lang.String, int, java.lang.String, java.lang.String); - ctor public AuthScope(java.lang.String, int, java.lang.String); - ctor public AuthScope(java.lang.String, int); - ctor public AuthScope(org.apache.http.auth.AuthScope); - method public java.lang.String getHost(); - method public int getPort(); - method public java.lang.String getRealm(); - method public java.lang.String getScheme(); - method public int match(org.apache.http.auth.AuthScope); - field public static final org.apache.http.auth.AuthScope ANY; - field public static final java.lang.String ANY_HOST; - field public static final int ANY_PORT = -1; // 0xffffffff - field public static final java.lang.String ANY_REALM; - field public static final java.lang.String ANY_SCHEME; - } - - public deprecated class AuthState { - ctor public AuthState(); - method public org.apache.http.auth.AuthScheme getAuthScheme(); - method public org.apache.http.auth.AuthScope getAuthScope(); - method public org.apache.http.auth.Credentials getCredentials(); - method public void invalidate(); - method public boolean isValid(); - method public void setAuthScheme(org.apache.http.auth.AuthScheme); - method public void setAuthScope(org.apache.http.auth.AuthScope); - method public void setCredentials(org.apache.http.auth.Credentials); - } - - public deprecated class AuthenticationException extends org.apache.http.ProtocolException { - ctor public AuthenticationException(); - ctor public AuthenticationException(java.lang.String); - ctor public AuthenticationException(java.lang.String, java.lang.Throwable); - } - - public final deprecated class BasicUserPrincipal implements java.security.Principal { - ctor public BasicUserPrincipal(java.lang.String); - method public java.lang.String getName(); - } - - public abstract deprecated interface Credentials { - method public abstract java.lang.String getPassword(); - method public abstract java.security.Principal getUserPrincipal(); - } - - public deprecated class InvalidCredentialsException extends org.apache.http.auth.AuthenticationException { - ctor public InvalidCredentialsException(); - ctor public InvalidCredentialsException(java.lang.String); - ctor public InvalidCredentialsException(java.lang.String, java.lang.Throwable); - } - - public deprecated class MalformedChallengeException extends org.apache.http.ProtocolException { - ctor public MalformedChallengeException(); - ctor public MalformedChallengeException(java.lang.String); - ctor public MalformedChallengeException(java.lang.String, java.lang.Throwable); - } - - public deprecated class NTCredentials implements org.apache.http.auth.Credentials { - ctor public NTCredentials(java.lang.String); - ctor public NTCredentials(java.lang.String, java.lang.String, java.lang.String, java.lang.String); - method public java.lang.String getDomain(); - method public java.lang.String getPassword(); - method public java.lang.String getUserName(); - method public java.security.Principal getUserPrincipal(); - method public java.lang.String getWorkstation(); - } - - public deprecated class NTUserPrincipal implements java.security.Principal { - ctor public NTUserPrincipal(java.lang.String, java.lang.String); - method public java.lang.String getDomain(); - method public java.lang.String getName(); - method public java.lang.String getUsername(); - } - - public deprecated class UsernamePasswordCredentials implements org.apache.http.auth.Credentials { - ctor public UsernamePasswordCredentials(java.lang.String); - ctor public UsernamePasswordCredentials(java.lang.String, java.lang.String); - method public java.lang.String getPassword(); - method public java.lang.String getUserName(); - method public java.security.Principal getUserPrincipal(); - } - -} - -package org.apache.http.auth.params { - - public abstract deprecated interface AuthPNames { - field public static final java.lang.String CREDENTIAL_CHARSET = "http.auth.credential-charset"; - } - - public deprecated class AuthParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public AuthParamBean(org.apache.http.params.HttpParams); - method public void setCredentialCharset(java.lang.String); - } - - public final deprecated class AuthParams { - method public static java.lang.String getCredentialCharset(org.apache.http.params.HttpParams); - method public static void setCredentialCharset(org.apache.http.params.HttpParams, java.lang.String); - } - -} - -package org.apache.http.client { - - public abstract deprecated interface AuthenticationHandler { - method public abstract java.util.Map<java.lang.String, org.apache.http.Header> getChallenges(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.MalformedChallengeException; - method public abstract boolean isAuthenticationRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - method public abstract org.apache.http.auth.AuthScheme selectScheme(java.util.Map<java.lang.String, org.apache.http.Header>, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.AuthenticationException; - } - - public deprecated class CircularRedirectException extends org.apache.http.client.RedirectException { - ctor public CircularRedirectException(); - ctor public CircularRedirectException(java.lang.String); - ctor public CircularRedirectException(java.lang.String, java.lang.Throwable); - } - - public deprecated class ClientProtocolException extends java.io.IOException { - ctor public ClientProtocolException(); - ctor public ClientProtocolException(java.lang.String); - ctor public ClientProtocolException(java.lang.Throwable); - ctor public ClientProtocolException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface CookieStore { - method public abstract void addCookie(org.apache.http.cookie.Cookie); - method public abstract void clear(); - method public abstract boolean clearExpired(java.util.Date); - method public abstract java.util.List<org.apache.http.cookie.Cookie> getCookies(); - } - - public abstract deprecated interface CredentialsProvider { - method public abstract void clear(); - method public abstract org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope); - method public abstract void setCredentials(org.apache.http.auth.AuthScope, org.apache.http.auth.Credentials); - } - - public abstract deprecated interface HttpClient { - method public abstract org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public abstract org.apache.http.conn.ClientConnectionManager getConnectionManager(); - method public abstract org.apache.http.params.HttpParams getParams(); - } - - public abstract deprecated interface HttpRequestRetryHandler { - method public abstract boolean retryRequest(java.io.IOException, int, org.apache.http.protocol.HttpContext); - } - - public deprecated class HttpResponseException extends org.apache.http.client.ClientProtocolException { - ctor public HttpResponseException(int, java.lang.String); - method public int getStatusCode(); - } - - public deprecated class NonRepeatableRequestException extends org.apache.http.ProtocolException { - ctor public NonRepeatableRequestException(); - ctor public NonRepeatableRequestException(java.lang.String); - } - - public deprecated class RedirectException extends org.apache.http.ProtocolException { - ctor public RedirectException(); - ctor public RedirectException(java.lang.String); - ctor public RedirectException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface RedirectHandler { - method public abstract java.net.URI getLocationURI(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.ProtocolException; - method public abstract boolean isRedirectRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public abstract deprecated interface RequestDirector { - method public abstract org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface ResponseHandler { - method public abstract T handleResponse(org.apache.http.HttpResponse) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - } - - public abstract deprecated interface UserTokenHandler { - method public abstract java.lang.Object getUserToken(org.apache.http.protocol.HttpContext); - } - -} - -package org.apache.http.client.entity { - - public deprecated class UrlEncodedFormEntity extends org.apache.http.entity.StringEntity { - ctor public UrlEncodedFormEntity(java.util.List<? extends org.apache.http.NameValuePair>, java.lang.String) throws java.io.UnsupportedEncodingException; - ctor public UrlEncodedFormEntity(java.util.List<? extends org.apache.http.NameValuePair>) throws java.io.UnsupportedEncodingException; - } - -} - -package org.apache.http.client.methods { - - public abstract deprecated interface AbortableHttpRequest { - method public abstract void abort(); - method public abstract void setConnectionRequest(org.apache.http.conn.ClientConnectionRequest) throws java.io.IOException; - method public abstract void setReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger) throws java.io.IOException; - } - - public deprecated class HttpDelete extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpDelete(); - ctor public HttpDelete(java.net.URI); - ctor public HttpDelete(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "DELETE"; - } - - public abstract deprecated class HttpEntityEnclosingRequestBase extends org.apache.http.client.methods.HttpRequestBase implements org.apache.http.HttpEntityEnclosingRequest { - ctor public HttpEntityEnclosingRequestBase(); - method public boolean expectContinue(); - method public org.apache.http.HttpEntity getEntity(); - method public void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class HttpGet extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpGet(); - ctor public HttpGet(java.net.URI); - ctor public HttpGet(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "GET"; - } - - public deprecated class HttpHead extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpHead(); - ctor public HttpHead(java.net.URI); - ctor public HttpHead(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "HEAD"; - } - - public deprecated class HttpOptions extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpOptions(); - ctor public HttpOptions(java.net.URI); - ctor public HttpOptions(java.lang.String); - method public java.util.Set<java.lang.String> getAllowedMethods(org.apache.http.HttpResponse); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "OPTIONS"; - } - - public deprecated class HttpPost extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase { - ctor public HttpPost(); - ctor public HttpPost(java.net.URI); - ctor public HttpPost(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "POST"; - } - - public deprecated class HttpPut extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase { - ctor public HttpPut(); - ctor public HttpPut(java.net.URI); - ctor public HttpPut(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "PUT"; - } - - public abstract deprecated class HttpRequestBase extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.client.methods.AbortableHttpRequest java.lang.Cloneable org.apache.http.client.methods.HttpUriRequest { - ctor public HttpRequestBase(); - method public void abort(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public abstract java.lang.String getMethod(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public org.apache.http.RequestLine getRequestLine(); - method public java.net.URI getURI(); - method public boolean isAborted(); - method public void setConnectionRequest(org.apache.http.conn.ClientConnectionRequest) throws java.io.IOException; - method public void setReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger) throws java.io.IOException; - method public void setURI(java.net.URI); - } - - public deprecated class HttpTrace extends org.apache.http.client.methods.HttpRequestBase { - ctor public HttpTrace(); - ctor public HttpTrace(java.net.URI); - ctor public HttpTrace(java.lang.String); - method public java.lang.String getMethod(); - field public static final java.lang.String METHOD_NAME = "TRACE"; - } - - public abstract deprecated interface HttpUriRequest implements org.apache.http.HttpRequest { - method public abstract void abort() throws java.lang.UnsupportedOperationException; - method public abstract java.lang.String getMethod(); - method public abstract java.net.URI getURI(); - method public abstract boolean isAborted(); - } - -} - -package org.apache.http.client.params { - - public abstract deprecated interface AllClientPNames implements org.apache.http.auth.params.AuthPNames org.apache.http.client.params.ClientPNames org.apache.http.conn.params.ConnConnectionPNames org.apache.http.conn.params.ConnManagerPNames org.apache.http.conn.params.ConnRoutePNames org.apache.http.cookie.params.CookieSpecPNames org.apache.http.params.CoreConnectionPNames org.apache.http.params.CoreProtocolPNames { - } - - public final deprecated class AuthPolicy { - field public static final java.lang.String BASIC = "Basic"; - field public static final java.lang.String DIGEST = "Digest"; - field public static final java.lang.String NTLM = "NTLM"; - } - - public abstract deprecated interface ClientPNames { - field public static final java.lang.String ALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects"; - field public static final java.lang.String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory-object"; - field public static final java.lang.String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name"; - field public static final java.lang.String COOKIE_POLICY = "http.protocol.cookie-policy"; - field public static final java.lang.String DEFAULT_HEADERS = "http.default-headers"; - field public static final java.lang.String DEFAULT_HOST = "http.default-host"; - field public static final java.lang.String HANDLE_AUTHENTICATION = "http.protocol.handle-authentication"; - field public static final java.lang.String HANDLE_REDIRECTS = "http.protocol.handle-redirects"; - field public static final java.lang.String MAX_REDIRECTS = "http.protocol.max-redirects"; - field public static final java.lang.String REJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect"; - field public static final java.lang.String VIRTUAL_HOST = "http.virtual-host"; - } - - public deprecated class ClientParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ClientParamBean(org.apache.http.params.HttpParams); - method public void setAllowCircularRedirects(boolean); - method public void setConnectionManagerFactory(org.apache.http.conn.ClientConnectionManagerFactory); - method public void setConnectionManagerFactoryClassName(java.lang.String); - method public void setCookiePolicy(java.lang.String); - method public void setDefaultHeaders(java.util.Collection<org.apache.http.Header>); - method public void setDefaultHost(org.apache.http.HttpHost); - method public void setHandleAuthentication(boolean); - method public void setHandleRedirects(boolean); - method public void setMaxRedirects(int); - method public void setRejectRelativeRedirect(boolean); - method public void setVirtualHost(org.apache.http.HttpHost); - } - - public final deprecated class CookiePolicy { - field public static final java.lang.String BEST_MATCH = "best-match"; - field public static final java.lang.String BROWSER_COMPATIBILITY = "compatibility"; - field public static final java.lang.String NETSCAPE = "netscape"; - field public static final java.lang.String RFC_2109 = "rfc2109"; - field public static final java.lang.String RFC_2965 = "rfc2965"; - } - - public deprecated class HttpClientParams { - method public static java.lang.String getCookiePolicy(org.apache.http.params.HttpParams); - method public static boolean isAuthenticating(org.apache.http.params.HttpParams); - method public static boolean isRedirecting(org.apache.http.params.HttpParams); - method public static void setAuthenticating(org.apache.http.params.HttpParams, boolean); - method public static void setCookiePolicy(org.apache.http.params.HttpParams, java.lang.String); - method public static void setRedirecting(org.apache.http.params.HttpParams, boolean); - } - -} - -package org.apache.http.client.protocol { - - public abstract deprecated interface ClientContext { - field public static final java.lang.String AUTHSCHEME_REGISTRY = "http.authscheme-registry"; - field public static final java.lang.String AUTH_SCHEME_PREF = "http.auth.scheme-pref"; - field public static final java.lang.String COOKIESPEC_REGISTRY = "http.cookiespec-registry"; - field public static final java.lang.String COOKIE_ORIGIN = "http.cookie-origin"; - field public static final java.lang.String COOKIE_SPEC = "http.cookie-spec"; - field public static final java.lang.String COOKIE_STORE = "http.cookie-store"; - field public static final java.lang.String CREDS_PROVIDER = "http.auth.credentials-provider"; - field public static final java.lang.String PROXY_AUTH_STATE = "http.auth.proxy-scope"; - field public static final java.lang.String TARGET_AUTH_STATE = "http.auth.target-scope"; - field public static final java.lang.String USER_TOKEN = "http.user-token"; - } - - public deprecated class ClientContextConfigurer implements org.apache.http.client.protocol.ClientContext { - ctor public ClientContextConfigurer(org.apache.http.protocol.HttpContext); - method public void setAuthSchemePref(java.util.List<java.lang.String>); - method public void setAuthSchemeRegistry(org.apache.http.auth.AuthSchemeRegistry); - method public void setCookieSpecRegistry(org.apache.http.cookie.CookieSpecRegistry); - method public void setCookieStore(org.apache.http.client.CookieStore); - method public void setCredentialsProvider(org.apache.http.client.CredentialsProvider); - } - - public deprecated class RequestAddCookies implements org.apache.http.HttpRequestInterceptor { - ctor public RequestAddCookies(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestDefaultHeaders implements org.apache.http.HttpRequestInterceptor { - ctor public RequestDefaultHeaders(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestProxyAuthentication implements org.apache.http.HttpRequestInterceptor { - ctor public RequestProxyAuthentication(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestTargetAuthentication implements org.apache.http.HttpRequestInterceptor { - ctor public RequestTargetAuthentication(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseProcessCookies implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseProcessCookies(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - -} - -package org.apache.http.client.utils { - - public deprecated class CloneUtils { - method public static java.lang.Object clone(java.lang.Object) throws java.lang.CloneNotSupportedException; - } - - public deprecated class URIUtils { - method public static java.net.URI createURI(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String) throws java.net.URISyntaxException; - method public static java.net.URI resolve(java.net.URI, java.lang.String); - method public static java.net.URI resolve(java.net.URI, java.net.URI); - method public static java.net.URI rewriteURI(java.net.URI, org.apache.http.HttpHost, boolean) throws java.net.URISyntaxException; - method public static java.net.URI rewriteURI(java.net.URI, org.apache.http.HttpHost) throws java.net.URISyntaxException; - } - - public deprecated class URLEncodedUtils { - ctor public URLEncodedUtils(); - method public static java.lang.String format(java.util.List<? extends org.apache.http.NameValuePair>, java.lang.String); - method public static boolean isEncoded(org.apache.http.HttpEntity); - method public static java.util.List<org.apache.http.NameValuePair> parse(java.net.URI, java.lang.String); - method public static java.util.List<org.apache.http.NameValuePair> parse(org.apache.http.HttpEntity) throws java.io.IOException; - method public static void parse(java.util.List<org.apache.http.NameValuePair>, java.util.Scanner, java.lang.String); - field public static final java.lang.String CONTENT_TYPE = "application/x-www-form-urlencoded"; - } - -} - package org.apache.http.conn { - public deprecated class BasicEofSensorWatcher implements org.apache.http.conn.EofSensorWatcher { - ctor public BasicEofSensorWatcher(org.apache.http.conn.ManagedClientConnection, boolean); - method public boolean eofDetected(java.io.InputStream) throws java.io.IOException; - method public boolean streamAbort(java.io.InputStream) throws java.io.IOException; - method public boolean streamClosed(java.io.InputStream) throws java.io.IOException; - field protected boolean attemptReuse; - field protected org.apache.http.conn.ManagedClientConnection managedConn; - } - - public deprecated class BasicManagedEntity extends org.apache.http.entity.HttpEntityWrapper implements org.apache.http.conn.ConnectionReleaseTrigger org.apache.http.conn.EofSensorWatcher { - ctor public BasicManagedEntity(org.apache.http.HttpEntity, org.apache.http.conn.ManagedClientConnection, boolean); - method public void abortConnection() throws java.io.IOException; - method public boolean eofDetected(java.io.InputStream) throws java.io.IOException; - method public void releaseConnection() throws java.io.IOException; - method protected void releaseManagedConnection() throws java.io.IOException; - method public boolean streamAbort(java.io.InputStream) throws java.io.IOException; - method public boolean streamClosed(java.io.InputStream) throws java.io.IOException; - field protected final boolean attemptReuse; - field protected org.apache.http.conn.ManagedClientConnection managedConn; - } - - public abstract deprecated interface ClientConnectionManager { - method public abstract void closeExpiredConnections(); - method public abstract void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method public abstract org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry(); - method public abstract void releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit); - method public abstract org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public abstract void shutdown(); - } - - public abstract deprecated interface ClientConnectionManagerFactory { - method public abstract org.apache.http.conn.ClientConnectionManager newInstance(org.apache.http.params.HttpParams, org.apache.http.conn.scheme.SchemeRegistry); - } - - public abstract deprecated interface ClientConnectionOperator { - method public abstract org.apache.http.conn.OperatedClientConnection createConnection(); - method public abstract void openConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void updateSecureConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public abstract deprecated interface ClientConnectionRequest { - method public abstract void abortRequest(); - method public abstract org.apache.http.conn.ManagedClientConnection getConnection(long, java.util.concurrent.TimeUnit) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - } - public deprecated class ConnectTimeoutException extends java.io.InterruptedIOException { ctor public ConnectTimeoutException(); ctor public ConnectTimeoutException(java.lang.String); } - public abstract deprecated interface ConnectionKeepAliveStrategy { - method public abstract long getKeepAliveDuration(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class ConnectionPoolTimeoutException extends org.apache.http.conn.ConnectTimeoutException { - ctor public ConnectionPoolTimeoutException(); - ctor public ConnectionPoolTimeoutException(java.lang.String); - } - - public abstract deprecated interface ConnectionReleaseTrigger { - method public abstract void abortConnection() throws java.io.IOException; - method public abstract void releaseConnection() throws java.io.IOException; - } - - public deprecated class EofSensorInputStream extends java.io.InputStream implements org.apache.http.conn.ConnectionReleaseTrigger { - ctor public EofSensorInputStream(java.io.InputStream, org.apache.http.conn.EofSensorWatcher); - method public void abortConnection() throws java.io.IOException; - method protected void checkAbort() throws java.io.IOException; - method protected void checkClose() throws java.io.IOException; - method protected void checkEOF(int) throws java.io.IOException; - method protected boolean isReadAllowed() throws java.io.IOException; - method public int read() throws java.io.IOException; - method public void releaseConnection() throws java.io.IOException; - field protected java.io.InputStream wrappedStream; - } - - public abstract deprecated interface EofSensorWatcher { - method public abstract boolean eofDetected(java.io.InputStream) throws java.io.IOException; - method public abstract boolean streamAbort(java.io.InputStream) throws java.io.IOException; - method public abstract boolean streamClosed(java.io.InputStream) throws java.io.IOException; - } - - public deprecated class HttpHostConnectException extends java.net.ConnectException { - ctor public HttpHostConnectException(org.apache.http.HttpHost, java.net.ConnectException); - method public org.apache.http.HttpHost getHost(); - } - - public abstract deprecated interface ManagedClientConnection implements org.apache.http.conn.ConnectionReleaseTrigger org.apache.http.HttpClientConnection org.apache.http.HttpInetConnection { - method public abstract org.apache.http.conn.routing.HttpRoute getRoute(); - method public abstract javax.net.ssl.SSLSession getSSLSession(); - method public abstract java.lang.Object getState(); - method public abstract boolean isMarkedReusable(); - method public abstract boolean isSecure(); - method public abstract void layerProtocol(org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void markReusable(); - method public abstract void open(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void setIdleDuration(long, java.util.concurrent.TimeUnit); - method public abstract void setState(java.lang.Object); - method public abstract void tunnelProxy(org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void tunnelTarget(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void unmarkReusable(); - } - - public final deprecated class MultihomePlainSocketFactory implements org.apache.http.conn.scheme.SocketFactory { - method public java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.Socket createSocket(); - method public static org.apache.http.conn.MultihomePlainSocketFactory getSocketFactory(); - method public final boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException; - } - - public abstract deprecated interface OperatedClientConnection implements org.apache.http.HttpClientConnection org.apache.http.HttpInetConnection { - method public abstract java.net.Socket getSocket(); - method public abstract org.apache.http.HttpHost getTargetHost(); - method public abstract boolean isSecure(); - method public abstract void openCompleted(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public abstract void opening(java.net.Socket, org.apache.http.HttpHost) throws java.io.IOException; - method public abstract void update(java.net.Socket, org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - } - -} - -package org.apache.http.conn.params { - - public abstract deprecated interface ConnConnectionPNames { - field public static final java.lang.String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage"; - } - - public deprecated class ConnConnectionParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ConnConnectionParamBean(org.apache.http.params.HttpParams); - method public void setMaxStatusLineGarbage(int); - } - - public abstract deprecated interface ConnManagerPNames { - field public static final java.lang.String MAX_CONNECTIONS_PER_ROUTE = "http.conn-manager.max-per-route"; - field public static final java.lang.String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total"; - field public static final java.lang.String TIMEOUT = "http.conn-manager.timeout"; - } - - public deprecated class ConnManagerParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ConnManagerParamBean(org.apache.http.params.HttpParams); - method public void setConnectionsPerRoute(org.apache.http.conn.params.ConnPerRouteBean); - method public void setMaxTotalConnections(int); - method public void setTimeout(long); - } - - public final deprecated class ConnManagerParams implements org.apache.http.conn.params.ConnManagerPNames { - ctor public ConnManagerParams(); - method public static org.apache.http.conn.params.ConnPerRoute getMaxConnectionsPerRoute(org.apache.http.params.HttpParams); - method public static int getMaxTotalConnections(org.apache.http.params.HttpParams); - method public static long getTimeout(org.apache.http.params.HttpParams); - method public static void setMaxConnectionsPerRoute(org.apache.http.params.HttpParams, org.apache.http.conn.params.ConnPerRoute); - method public static void setMaxTotalConnections(org.apache.http.params.HttpParams, int); - method public static void setTimeout(org.apache.http.params.HttpParams, long); - field public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20; // 0x14 - } - - public abstract deprecated interface ConnPerRoute { - method public abstract int getMaxForRoute(org.apache.http.conn.routing.HttpRoute); - } - - public final deprecated class ConnPerRouteBean implements org.apache.http.conn.params.ConnPerRoute { - ctor public ConnPerRouteBean(int); - ctor public ConnPerRouteBean(); - method public int getDefaultMax(); - method public int getMaxForRoute(org.apache.http.conn.routing.HttpRoute); - method public void setDefaultMaxPerRoute(int); - method public void setMaxForRoute(org.apache.http.conn.routing.HttpRoute, int); - method public void setMaxForRoutes(java.util.Map<org.apache.http.conn.routing.HttpRoute, java.lang.Integer>); - field public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 2; // 0x2 - } - - public abstract deprecated interface ConnRoutePNames { - field public static final java.lang.String DEFAULT_PROXY = "http.route.default-proxy"; - field public static final java.lang.String FORCED_ROUTE = "http.route.forced-route"; - field public static final java.lang.String LOCAL_ADDRESS = "http.route.local-address"; - } - - public deprecated class ConnRouteParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public ConnRouteParamBean(org.apache.http.params.HttpParams); - method public void setDefaultProxy(org.apache.http.HttpHost); - method public void setForcedRoute(org.apache.http.conn.routing.HttpRoute); - method public void setLocalAddress(java.net.InetAddress); - } - - public deprecated class ConnRouteParams implements org.apache.http.conn.params.ConnRoutePNames { - method public static org.apache.http.HttpHost getDefaultProxy(org.apache.http.params.HttpParams); - method public static org.apache.http.conn.routing.HttpRoute getForcedRoute(org.apache.http.params.HttpParams); - method public static java.net.InetAddress getLocalAddress(org.apache.http.params.HttpParams); - method public static void setDefaultProxy(org.apache.http.params.HttpParams, org.apache.http.HttpHost); - method public static void setForcedRoute(org.apache.http.params.HttpParams, org.apache.http.conn.routing.HttpRoute); - method public static void setLocalAddress(org.apache.http.params.HttpParams, java.net.InetAddress); - field public static final org.apache.http.HttpHost NO_HOST; - field public static final org.apache.http.conn.routing.HttpRoute NO_ROUTE; - } - -} - -package org.apache.http.conn.routing { - - public deprecated class BasicRouteDirector implements org.apache.http.conn.routing.HttpRouteDirector { - ctor public BasicRouteDirector(); - method protected int directStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - method protected int firstStep(org.apache.http.conn.routing.RouteInfo); - method public int nextStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - method protected int proxiedStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - } - - public final deprecated class HttpRoute implements java.lang.Cloneable org.apache.http.conn.routing.RouteInfo { - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.HttpHost[], boolean, org.apache.http.conn.routing.RouteInfo.TunnelType, org.apache.http.conn.routing.RouteInfo.LayerType); - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.HttpHost, boolean, org.apache.http.conn.routing.RouteInfo.TunnelType, org.apache.http.conn.routing.RouteInfo.LayerType); - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, boolean); - ctor public HttpRoute(org.apache.http.HttpHost); - ctor public HttpRoute(org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.HttpHost, boolean); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public final boolean equals(java.lang.Object); - method public final int getHopCount(); - method public final org.apache.http.HttpHost getHopTarget(int); - method public final org.apache.http.conn.routing.RouteInfo.LayerType getLayerType(); - method public final java.net.InetAddress getLocalAddress(); - method public final org.apache.http.HttpHost getProxyHost(); - method public final org.apache.http.HttpHost getTargetHost(); - method public final org.apache.http.conn.routing.RouteInfo.TunnelType getTunnelType(); - method public final int hashCode(); - method public final boolean isLayered(); - method public final boolean isSecure(); - method public final boolean isTunnelled(); - method public final java.lang.String toString(); - } - - public abstract deprecated interface HttpRouteDirector { - method public abstract int nextStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo); - field public static final int COMPLETE = 0; // 0x0 - field public static final int CONNECT_PROXY = 2; // 0x2 - field public static final int CONNECT_TARGET = 1; // 0x1 - field public static final int LAYER_PROTOCOL = 5; // 0x5 - field public static final int TUNNEL_PROXY = 4; // 0x4 - field public static final int TUNNEL_TARGET = 3; // 0x3 - field public static final int UNREACHABLE = -1; // 0xffffffff - } - - public abstract deprecated interface HttpRoutePlanner { - method public abstract org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - } - - public abstract deprecated interface RouteInfo { - method public abstract int getHopCount(); - method public abstract org.apache.http.HttpHost getHopTarget(int); - method public abstract org.apache.http.conn.routing.RouteInfo.LayerType getLayerType(); - method public abstract java.net.InetAddress getLocalAddress(); - method public abstract org.apache.http.HttpHost getProxyHost(); - method public abstract org.apache.http.HttpHost getTargetHost(); - method public abstract org.apache.http.conn.routing.RouteInfo.TunnelType getTunnelType(); - method public abstract boolean isLayered(); - method public abstract boolean isSecure(); - method public abstract boolean isTunnelled(); - } - - public static final class RouteInfo.LayerType extends java.lang.Enum { - method public static org.apache.http.conn.routing.RouteInfo.LayerType valueOf(java.lang.String); - method public static final org.apache.http.conn.routing.RouteInfo.LayerType[] values(); - enum_constant public static final org.apache.http.conn.routing.RouteInfo.LayerType LAYERED; - enum_constant public static final org.apache.http.conn.routing.RouteInfo.LayerType PLAIN; - } - - public static final class RouteInfo.TunnelType extends java.lang.Enum { - method public static org.apache.http.conn.routing.RouteInfo.TunnelType valueOf(java.lang.String); - method public static final org.apache.http.conn.routing.RouteInfo.TunnelType[] values(); - enum_constant public static final org.apache.http.conn.routing.RouteInfo.TunnelType PLAIN; - enum_constant public static final org.apache.http.conn.routing.RouteInfo.TunnelType TUNNELLED; - } - - public final deprecated class RouteTracker implements java.lang.Cloneable org.apache.http.conn.routing.RouteInfo { - ctor public RouteTracker(org.apache.http.HttpHost, java.net.InetAddress); - ctor public RouteTracker(org.apache.http.conn.routing.HttpRoute); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public final void connectProxy(org.apache.http.HttpHost, boolean); - method public final void connectTarget(boolean); - method public final boolean equals(java.lang.Object); - method public final int getHopCount(); - method public final org.apache.http.HttpHost getHopTarget(int); - method public final org.apache.http.conn.routing.RouteInfo.LayerType getLayerType(); - method public final java.net.InetAddress getLocalAddress(); - method public final org.apache.http.HttpHost getProxyHost(); - method public final org.apache.http.HttpHost getTargetHost(); - method public final org.apache.http.conn.routing.RouteInfo.TunnelType getTunnelType(); - method public final int hashCode(); - method public final boolean isConnected(); - method public final boolean isLayered(); - method public final boolean isSecure(); - method public final boolean isTunnelled(); - method public final void layerProtocol(boolean); - method public final org.apache.http.conn.routing.HttpRoute toRoute(); - method public final java.lang.String toString(); - method public final void tunnelProxy(org.apache.http.HttpHost, boolean); - method public final void tunnelTarget(boolean); - } - } package org.apache.http.conn.scheme { @@ -58434,37 +57340,6 @@ package org.apache.http.conn.scheme { method public abstract java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException, java.net.UnknownHostException; } - public final deprecated class PlainSocketFactory implements org.apache.http.conn.scheme.SocketFactory { - ctor public PlainSocketFactory(org.apache.http.conn.scheme.HostNameResolver); - ctor public PlainSocketFactory(); - method public java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.Socket createSocket(); - method public static org.apache.http.conn.scheme.PlainSocketFactory getSocketFactory(); - method public final boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException; - } - - public final deprecated class Scheme { - ctor public Scheme(java.lang.String, org.apache.http.conn.scheme.SocketFactory, int); - method public final boolean equals(java.lang.Object); - method public final int getDefaultPort(); - method public final java.lang.String getName(); - method public final org.apache.http.conn.scheme.SocketFactory getSocketFactory(); - method public final boolean isLayered(); - method public final int resolvePort(int); - method public final java.lang.String toString(); - } - - public final deprecated class SchemeRegistry { - ctor public SchemeRegistry(); - method public final synchronized org.apache.http.conn.scheme.Scheme get(java.lang.String); - method public final synchronized org.apache.http.conn.scheme.Scheme getScheme(java.lang.String); - method public final synchronized org.apache.http.conn.scheme.Scheme getScheme(org.apache.http.HttpHost); - method public final synchronized java.util.List<java.lang.String> getSchemeNames(); - method public final synchronized org.apache.http.conn.scheme.Scheme register(org.apache.http.conn.scheme.Scheme); - method public synchronized void setItems(java.util.Map<java.lang.String, org.apache.http.conn.scheme.Scheme>); - method public final synchronized org.apache.http.conn.scheme.Scheme unregister(java.lang.String); - } - public abstract deprecated interface SocketFactory { method public abstract java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws org.apache.http.conn.ConnectTimeoutException, java.io.IOException, java.net.UnknownHostException; method public abstract java.net.Socket createSocket() throws java.io.IOException; @@ -58534,1818 +57409,8 @@ package org.apache.http.conn.ssl { } -package org.apache.http.conn.util { - - public deprecated class InetAddressUtils { - method public static boolean isIPv4Address(java.lang.String); - method public static boolean isIPv6Address(java.lang.String); - method public static boolean isIPv6HexCompressedAddress(java.lang.String); - method public static boolean isIPv6StdAddress(java.lang.String); - } - -} - -package org.apache.http.cookie { - - public abstract deprecated interface ClientCookie implements org.apache.http.cookie.Cookie { - method public abstract boolean containsAttribute(java.lang.String); - method public abstract java.lang.String getAttribute(java.lang.String); - field public static final java.lang.String COMMENTURL_ATTR = "commenturl"; - field public static final java.lang.String COMMENT_ATTR = "comment"; - field public static final java.lang.String DISCARD_ATTR = "discard"; - field public static final java.lang.String DOMAIN_ATTR = "domain"; - field public static final java.lang.String EXPIRES_ATTR = "expires"; - field public static final java.lang.String MAX_AGE_ATTR = "max-age"; - field public static final java.lang.String PATH_ATTR = "path"; - field public static final java.lang.String PORT_ATTR = "port"; - field public static final java.lang.String SECURE_ATTR = "secure"; - field public static final java.lang.String VERSION_ATTR = "version"; - } - - public abstract deprecated interface Cookie { - method public abstract java.lang.String getComment(); - method public abstract java.lang.String getCommentURL(); - method public abstract java.lang.String getDomain(); - method public abstract java.util.Date getExpiryDate(); - method public abstract java.lang.String getName(); - method public abstract java.lang.String getPath(); - method public abstract int[] getPorts(); - method public abstract java.lang.String getValue(); - method public abstract int getVersion(); - method public abstract boolean isExpired(java.util.Date); - method public abstract boolean isPersistent(); - method public abstract boolean isSecure(); - } - - public abstract deprecated interface CookieAttributeHandler { - method public abstract boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public abstract void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public abstract void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class CookieIdentityComparator implements java.util.Comparator java.io.Serializable { - ctor public CookieIdentityComparator(); - method public int compare(org.apache.http.cookie.Cookie, org.apache.http.cookie.Cookie); - } - - public final deprecated class CookieOrigin { - ctor public CookieOrigin(java.lang.String, int, java.lang.String, boolean); - method public java.lang.String getHost(); - method public java.lang.String getPath(); - method public int getPort(); - method public boolean isSecure(); - } - - public deprecated class CookiePathComparator implements java.util.Comparator java.io.Serializable { - ctor public CookiePathComparator(); - method public int compare(org.apache.http.cookie.Cookie, org.apache.http.cookie.Cookie); - } - - public abstract deprecated interface CookieSpec { - method public abstract java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public abstract int getVersion(); - method public abstract org.apache.http.Header getVersionHeader(); - method public abstract boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public abstract java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - method public abstract void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public abstract deprecated interface CookieSpecFactory { - method public abstract org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public final deprecated class CookieSpecRegistry { - ctor public CookieSpecRegistry(); - method public synchronized org.apache.http.cookie.CookieSpec getCookieSpec(java.lang.String, org.apache.http.params.HttpParams) throws java.lang.IllegalStateException; - method public synchronized org.apache.http.cookie.CookieSpec getCookieSpec(java.lang.String) throws java.lang.IllegalStateException; - method public synchronized java.util.List<java.lang.String> getSpecNames(); - method public synchronized void register(java.lang.String, org.apache.http.cookie.CookieSpecFactory); - method public synchronized void setItems(java.util.Map<java.lang.String, org.apache.http.cookie.CookieSpecFactory>); - method public synchronized void unregister(java.lang.String); - } - - public deprecated class MalformedCookieException extends org.apache.http.ProtocolException { - ctor public MalformedCookieException(); - ctor public MalformedCookieException(java.lang.String); - ctor public MalformedCookieException(java.lang.String, java.lang.Throwable); - } - - public abstract deprecated interface SM { - field public static final java.lang.String COOKIE = "Cookie"; - field public static final java.lang.String COOKIE2 = "Cookie2"; - field public static final java.lang.String SET_COOKIE = "Set-Cookie"; - field public static final java.lang.String SET_COOKIE2 = "Set-Cookie2"; - } - - public abstract deprecated interface SetCookie implements org.apache.http.cookie.Cookie { - method public abstract void setComment(java.lang.String); - method public abstract void setDomain(java.lang.String); - method public abstract void setExpiryDate(java.util.Date); - method public abstract void setPath(java.lang.String); - method public abstract void setSecure(boolean); - method public abstract void setValue(java.lang.String); - method public abstract void setVersion(int); - } - - public abstract deprecated interface SetCookie2 implements org.apache.http.cookie.SetCookie { - method public abstract void setCommentURL(java.lang.String); - method public abstract void setDiscard(boolean); - method public abstract void setPorts(int[]); - } - -} - -package org.apache.http.cookie.params { - - public abstract deprecated interface CookieSpecPNames { - field public static final java.lang.String DATE_PATTERNS = "http.protocol.cookie-datepatterns"; - field public static final java.lang.String SINGLE_COOKIE_HEADER = "http.protocol.single-cookie-header"; - } - - public deprecated class CookieSpecParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public CookieSpecParamBean(org.apache.http.params.HttpParams); - method public void setDatePatterns(java.util.Collection<java.lang.String>); - method public void setSingleHeader(boolean); - } - -} - -package org.apache.http.entity { - - public abstract deprecated class AbstractHttpEntity implements org.apache.http.HttpEntity { - ctor protected AbstractHttpEntity(); - method public void consumeContent() throws java.io.IOException, java.lang.UnsupportedOperationException; - method public org.apache.http.Header getContentEncoding(); - method public org.apache.http.Header getContentType(); - method public boolean isChunked(); - method public void setChunked(boolean); - method public void setContentEncoding(org.apache.http.Header); - method public void setContentEncoding(java.lang.String); - method public void setContentType(org.apache.http.Header); - method public void setContentType(java.lang.String); - field protected boolean chunked; - field protected org.apache.http.Header contentEncoding; - field protected org.apache.http.Header contentType; - } - - public deprecated class BasicHttpEntity extends org.apache.http.entity.AbstractHttpEntity { - ctor public BasicHttpEntity(); - method public java.io.InputStream getContent() throws java.lang.IllegalStateException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void setContent(java.io.InputStream); - method public void setContentLength(long); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class BufferedHttpEntity extends org.apache.http.entity.HttpEntityWrapper { - ctor public BufferedHttpEntity(org.apache.http.HttpEntity) throws java.io.IOException; - } - - public deprecated class ByteArrayEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { - ctor public ByteArrayEntity(byte[]); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.io.InputStream getContent(); - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected final byte[] content; - } - - public abstract deprecated interface ContentLengthStrategy { - method public abstract long determineLength(org.apache.http.HttpMessage) throws org.apache.http.HttpException; - field public static final int CHUNKED = -2; // 0xfffffffe - field public static final int IDENTITY = -1; // 0xffffffff - } - - public abstract deprecated interface ContentProducer { - method public abstract void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class EntityTemplate extends org.apache.http.entity.AbstractHttpEntity { - ctor public EntityTemplate(org.apache.http.entity.ContentProducer); - method public java.io.InputStream getContent(); - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class FileEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { - ctor public FileEntity(java.io.File, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.io.InputStream getContent() throws java.io.IOException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected final java.io.File file; - } - - public deprecated class HttpEntityWrapper implements org.apache.http.HttpEntity { - ctor public HttpEntityWrapper(org.apache.http.HttpEntity); - method public void consumeContent() throws java.io.IOException; - method public java.io.InputStream getContent() throws java.io.IOException; - method public org.apache.http.Header getContentEncoding(); - method public long getContentLength(); - method public org.apache.http.Header getContentType(); - method public boolean isChunked(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected org.apache.http.HttpEntity wrappedEntity; - } - - public deprecated class InputStreamEntity extends org.apache.http.entity.AbstractHttpEntity { - ctor public InputStreamEntity(java.io.InputStream, long); - method public java.io.InputStream getContent() throws java.io.IOException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class SerializableEntity extends org.apache.http.entity.AbstractHttpEntity { - ctor public SerializableEntity(java.io.Serializable, boolean) throws java.io.IOException; - method public java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - } - - public deprecated class StringEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { - ctor public StringEntity(java.lang.String, java.lang.String) throws java.io.UnsupportedEncodingException; - ctor public StringEntity(java.lang.String) throws java.io.UnsupportedEncodingException; - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.io.InputStream getContent() throws java.io.IOException; - method public long getContentLength(); - method public boolean isRepeatable(); - method public boolean isStreaming(); - method public void writeTo(java.io.OutputStream) throws java.io.IOException; - field protected final byte[] content; - } - -} - -package org.apache.http.impl { - - public abstract deprecated class AbstractHttpClientConnection implements org.apache.http.HttpClientConnection { - ctor public AbstractHttpClientConnection(); - method protected abstract void assertOpen() throws java.lang.IllegalStateException; - method protected org.apache.http.impl.entity.EntityDeserializer createEntityDeserializer(); - method protected org.apache.http.impl.entity.EntitySerializer createEntitySerializer(); - method protected org.apache.http.HttpResponseFactory createHttpResponseFactory(); - method protected org.apache.http.io.HttpMessageWriter createRequestWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method protected org.apache.http.io.HttpMessageParser createResponseParser(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpResponseFactory, org.apache.http.params.HttpParams); - method protected void doFlush() throws java.io.IOException; - method public void flush() throws java.io.IOException; - method public org.apache.http.HttpConnectionMetrics getMetrics(); - method protected void init(org.apache.http.io.SessionInputBuffer, org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method public boolean isResponseAvailable(int) throws java.io.IOException; - method public boolean isStale(); - method public void receiveResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, java.io.IOException; - method public void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated class AbstractHttpServerConnection implements org.apache.http.HttpServerConnection { - ctor public AbstractHttpServerConnection(); - method protected abstract void assertOpen() throws java.lang.IllegalStateException; - method protected org.apache.http.impl.entity.EntityDeserializer createEntityDeserializer(); - method protected org.apache.http.impl.entity.EntitySerializer createEntitySerializer(); - method protected org.apache.http.HttpRequestFactory createHttpRequestFactory(); - method protected org.apache.http.io.HttpMessageParser createRequestParser(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpRequestFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.io.HttpMessageWriter createResponseWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method protected void doFlush() throws java.io.IOException; - method public void flush() throws java.io.IOException; - method public org.apache.http.HttpConnectionMetrics getMetrics(); - method protected void init(org.apache.http.io.SessionInputBuffer, org.apache.http.io.SessionOutputBuffer, org.apache.http.params.HttpParams); - method public boolean isStale(); - method public void receiveRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpRequest receiveRequestHeader() throws org.apache.http.HttpException, java.io.IOException; - method public void sendResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public void sendResponseHeader(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class DefaultConnectionReuseStrategy implements org.apache.http.ConnectionReuseStrategy { - ctor public DefaultConnectionReuseStrategy(); - method protected org.apache.http.TokenIterator createTokenIterator(org.apache.http.HeaderIterator); - method public boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultHttpClientConnection extends org.apache.http.impl.SocketHttpClientConnection { - ctor public DefaultHttpClientConnection(); - method public void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public deprecated class DefaultHttpRequestFactory implements org.apache.http.HttpRequestFactory { - ctor public DefaultHttpRequestFactory(); - method public org.apache.http.HttpRequest newHttpRequest(org.apache.http.RequestLine) throws org.apache.http.MethodNotSupportedException; - method public org.apache.http.HttpRequest newHttpRequest(java.lang.String, java.lang.String) throws org.apache.http.MethodNotSupportedException; - } - - public deprecated class DefaultHttpResponseFactory implements org.apache.http.HttpResponseFactory { - ctor public DefaultHttpResponseFactory(org.apache.http.ReasonPhraseCatalog); - ctor public DefaultHttpResponseFactory(); - method protected java.util.Locale determineLocale(org.apache.http.protocol.HttpContext); - method public org.apache.http.HttpResponse newHttpResponse(org.apache.http.ProtocolVersion, int, org.apache.http.protocol.HttpContext); - method public org.apache.http.HttpResponse newHttpResponse(org.apache.http.StatusLine, org.apache.http.protocol.HttpContext); - field protected final org.apache.http.ReasonPhraseCatalog reasonCatalog; - } - - public deprecated class DefaultHttpServerConnection extends org.apache.http.impl.SocketHttpServerConnection { - ctor public DefaultHttpServerConnection(); - method public void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public deprecated class EnglishReasonPhraseCatalog implements org.apache.http.ReasonPhraseCatalog { - ctor protected EnglishReasonPhraseCatalog(); - method public java.lang.String getReason(int, java.util.Locale); - field public static final org.apache.http.impl.EnglishReasonPhraseCatalog INSTANCE; - } - - public deprecated class HttpConnectionMetricsImpl implements org.apache.http.HttpConnectionMetrics { - ctor public HttpConnectionMetricsImpl(org.apache.http.io.HttpTransportMetrics, org.apache.http.io.HttpTransportMetrics); - method public java.lang.Object getMetric(java.lang.String); - method public long getReceivedBytesCount(); - method public long getRequestCount(); - method public long getResponseCount(); - method public long getSentBytesCount(); - method public void incrementRequestCount(); - method public void incrementResponseCount(); - method public void reset(); - method public void setMetric(java.lang.String, java.lang.Object); - field public static final java.lang.String RECEIVED_BYTES_COUNT = "http.received-bytes-count"; - field public static final java.lang.String REQUEST_COUNT = "http.request-count"; - field public static final java.lang.String RESPONSE_COUNT = "http.response-count"; - field public static final java.lang.String SENT_BYTES_COUNT = "http.sent-bytes-count"; - } - - public deprecated class NoConnectionReuseStrategy implements org.apache.http.ConnectionReuseStrategy { - ctor public NoConnectionReuseStrategy(); - method public boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class SocketHttpClientConnection extends org.apache.http.impl.AbstractHttpClientConnection implements org.apache.http.HttpInetConnection { - ctor public SocketHttpClientConnection(); - method protected void assertNotOpen(); - method protected void assertOpen(); - method protected void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void close() throws java.io.IOException; - method protected org.apache.http.io.SessionInputBuffer createSessionInputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method protected org.apache.http.io.SessionOutputBuffer createSessionOutputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.InetAddress getLocalAddress(); - method public int getLocalPort(); - method public java.net.InetAddress getRemoteAddress(); - method public int getRemotePort(); - method protected java.net.Socket getSocket(); - method public int getSocketTimeout(); - method public boolean isOpen(); - method public void setSocketTimeout(int); - method public void shutdown() throws java.io.IOException; - } - - public deprecated class SocketHttpServerConnection extends org.apache.http.impl.AbstractHttpServerConnection implements org.apache.http.HttpInetConnection { - ctor public SocketHttpServerConnection(); - method protected void assertNotOpen(); - method protected void assertOpen(); - method protected void bind(java.net.Socket, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void close() throws java.io.IOException; - method protected org.apache.http.io.SessionInputBuffer createHttpDataReceiver(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method protected org.apache.http.io.SessionOutputBuffer createHttpDataTransmitter(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public java.net.InetAddress getLocalAddress(); - method public int getLocalPort(); - method public java.net.InetAddress getRemoteAddress(); - method public int getRemotePort(); - method protected java.net.Socket getSocket(); - method public int getSocketTimeout(); - method public boolean isOpen(); - method public void setSocketTimeout(int); - method public void shutdown() throws java.io.IOException; - } - -} - -package org.apache.http.impl.auth { - - public abstract deprecated class AuthSchemeBase implements org.apache.http.auth.AuthScheme { - ctor public AuthSchemeBase(); - method public boolean isProxy(); - method protected abstract void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException; - method public void processChallenge(org.apache.http.Header) throws org.apache.http.auth.MalformedChallengeException; - } - - public deprecated class BasicScheme extends org.apache.http.impl.auth.RFC2617Scheme { - ctor public BasicScheme(); - method public org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public static org.apache.http.Header authenticate(org.apache.http.auth.Credentials, java.lang.String, boolean); - method public java.lang.String getSchemeName(); - method public boolean isComplete(); - method public boolean isConnectionBased(); - } - - public deprecated class BasicSchemeFactory implements org.apache.http.auth.AuthSchemeFactory { - ctor public BasicSchemeFactory(); - method public org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class DigestScheme extends org.apache.http.impl.auth.RFC2617Scheme { - ctor public DigestScheme(); - method public org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public static java.lang.String createCnonce(); - method public java.lang.String getSchemeName(); - method public boolean isComplete(); - method public boolean isConnectionBased(); - method public void overrideParamter(java.lang.String, java.lang.String); - } - - public deprecated class DigestSchemeFactory implements org.apache.http.auth.AuthSchemeFactory { - ctor public DigestSchemeFactory(); - method public org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams); - } - - public abstract deprecated interface NTLMEngine { - method public abstract java.lang.String generateType1Msg(java.lang.String, java.lang.String) throws org.apache.http.impl.auth.NTLMEngineException; - method public abstract java.lang.String generateType3Msg(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.apache.http.impl.auth.NTLMEngineException; - } - - public deprecated class NTLMEngineException extends org.apache.http.auth.AuthenticationException { - ctor public NTLMEngineException(); - ctor public NTLMEngineException(java.lang.String); - ctor public NTLMEngineException(java.lang.String, java.lang.Throwable); - } - - public deprecated class NTLMScheme extends org.apache.http.impl.auth.AuthSchemeBase { - ctor public NTLMScheme(org.apache.http.impl.auth.NTLMEngine); - method public org.apache.http.Header authenticate(org.apache.http.auth.Credentials, org.apache.http.HttpRequest) throws org.apache.http.auth.AuthenticationException; - method public java.lang.String getParameter(java.lang.String); - method public java.lang.String getRealm(); - method public java.lang.String getSchemeName(); - method public boolean isComplete(); - method public boolean isConnectionBased(); - method protected void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException; - } - - public abstract deprecated class RFC2617Scheme extends org.apache.http.impl.auth.AuthSchemeBase { - ctor public RFC2617Scheme(); - method public java.lang.String getParameter(java.lang.String); - method protected java.util.Map<java.lang.String, java.lang.String> getParameters(); - method public java.lang.String getRealm(); - method protected void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException; - } - - public deprecated class UnsupportedDigestAlgorithmException extends java.lang.RuntimeException { - ctor public UnsupportedDigestAlgorithmException(); - ctor public UnsupportedDigestAlgorithmException(java.lang.String); - ctor public UnsupportedDigestAlgorithmException(java.lang.String, java.lang.Throwable); - } - -} - -package org.apache.http.impl.client { - - public abstract deprecated class AbstractAuthenticationHandler implements org.apache.http.client.AuthenticationHandler { - ctor public AbstractAuthenticationHandler(); - method protected java.util.List<java.lang.String> getAuthPreferences(); - method protected java.util.Map<java.lang.String, org.apache.http.Header> parseChallenges(org.apache.http.Header[]) throws org.apache.http.auth.MalformedChallengeException; - method public org.apache.http.auth.AuthScheme selectScheme(java.util.Map<java.lang.String, org.apache.http.Header>, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.AuthenticationException; - } - - public abstract deprecated class AbstractHttpClient implements org.apache.http.client.HttpClient { - ctor protected AbstractHttpClient(org.apache.http.conn.ClientConnectionManager, org.apache.http.params.HttpParams); - method public synchronized void addRequestInterceptor(org.apache.http.HttpRequestInterceptor); - method public synchronized void addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public synchronized void addResponseInterceptor(org.apache.http.HttpResponseInterceptor); - method public synchronized void addResponseInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public synchronized void clearRequestInterceptors(); - method public synchronized void clearResponseInterceptors(); - method protected abstract org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry(); - method protected abstract org.apache.http.conn.ClientConnectionManager createClientConnectionManager(); - method protected org.apache.http.client.RequestDirector createClientRequestDirector(org.apache.http.protocol.HttpRequestExecutor, org.apache.http.conn.ClientConnectionManager, org.apache.http.ConnectionReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy, org.apache.http.conn.routing.HttpRoutePlanner, org.apache.http.protocol.HttpProcessor, org.apache.http.client.HttpRequestRetryHandler, org.apache.http.client.RedirectHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.UserTokenHandler, org.apache.http.params.HttpParams); - method protected abstract org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy(); - method protected abstract org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy(); - method protected abstract org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry(); - method protected abstract org.apache.http.client.CookieStore createCookieStore(); - method protected abstract org.apache.http.client.CredentialsProvider createCredentialsProvider(); - method protected abstract org.apache.http.protocol.HttpContext createHttpContext(); - method protected abstract org.apache.http.params.HttpParams createHttpParams(); - method protected abstract org.apache.http.protocol.BasicHttpProcessor createHttpProcessor(); - method protected abstract org.apache.http.client.HttpRequestRetryHandler createHttpRequestRetryHandler(); - method protected abstract org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner(); - method protected abstract org.apache.http.client.AuthenticationHandler createProxyAuthenticationHandler(); - method protected abstract org.apache.http.client.RedirectHandler createRedirectHandler(); - method protected abstract org.apache.http.protocol.HttpRequestExecutor createRequestExecutor(); - method protected abstract org.apache.http.client.AuthenticationHandler createTargetAuthenticationHandler(); - method protected abstract org.apache.http.client.UserTokenHandler createUserTokenHandler(); - method protected org.apache.http.params.HttpParams determineParams(org.apache.http.HttpRequest); - method public final org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public T execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.client.ResponseHandler<? extends T>, org.apache.http.protocol.HttpContext) throws org.apache.http.client.ClientProtocolException, java.io.IOException; - method public final synchronized org.apache.http.auth.AuthSchemeRegistry getAuthSchemes(); - method public final synchronized org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy(); - method public final synchronized org.apache.http.conn.ClientConnectionManager getConnectionManager(); - method public final synchronized org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy(); - method public final synchronized org.apache.http.cookie.CookieSpecRegistry getCookieSpecs(); - method public final synchronized org.apache.http.client.CookieStore getCookieStore(); - method public final synchronized org.apache.http.client.CredentialsProvider getCredentialsProvider(); - method protected final synchronized org.apache.http.protocol.BasicHttpProcessor getHttpProcessor(); - method public final synchronized org.apache.http.client.HttpRequestRetryHandler getHttpRequestRetryHandler(); - method public final synchronized org.apache.http.params.HttpParams getParams(); - method public final synchronized org.apache.http.client.AuthenticationHandler getProxyAuthenticationHandler(); - method public final synchronized org.apache.http.client.RedirectHandler getRedirectHandler(); - method public final synchronized org.apache.http.protocol.HttpRequestExecutor getRequestExecutor(); - method public synchronized org.apache.http.HttpRequestInterceptor getRequestInterceptor(int); - method public synchronized int getRequestInterceptorCount(); - method public synchronized org.apache.http.HttpResponseInterceptor getResponseInterceptor(int); - method public synchronized int getResponseInterceptorCount(); - method public final synchronized org.apache.http.conn.routing.HttpRoutePlanner getRoutePlanner(); - method public final synchronized org.apache.http.client.AuthenticationHandler getTargetAuthenticationHandler(); - method public final synchronized org.apache.http.client.UserTokenHandler getUserTokenHandler(); - method public void removeRequestInterceptorByClass(java.lang.Class<? extends org.apache.http.HttpRequestInterceptor>); - method public void removeResponseInterceptorByClass(java.lang.Class<? extends org.apache.http.HttpResponseInterceptor>); - method public synchronized void setAuthSchemes(org.apache.http.auth.AuthSchemeRegistry); - method public synchronized void setCookieSpecs(org.apache.http.cookie.CookieSpecRegistry); - method public synchronized void setCookieStore(org.apache.http.client.CookieStore); - method public synchronized void setCredentialsProvider(org.apache.http.client.CredentialsProvider); - method public synchronized void setHttpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler); - method public synchronized void setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy); - method public synchronized void setParams(org.apache.http.params.HttpParams); - method public synchronized void setProxyAuthenticationHandler(org.apache.http.client.AuthenticationHandler); - method public synchronized void setRedirectHandler(org.apache.http.client.RedirectHandler); - method public synchronized void setReuseStrategy(org.apache.http.ConnectionReuseStrategy); - method public synchronized void setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner); - method public synchronized void setTargetAuthenticationHandler(org.apache.http.client.AuthenticationHandler); - method public synchronized void setUserTokenHandler(org.apache.http.client.UserTokenHandler); - } - - public deprecated class BasicCookieStore implements org.apache.http.client.CookieStore { - ctor public BasicCookieStore(); - method public synchronized void addCookie(org.apache.http.cookie.Cookie); - method public synchronized void addCookies(org.apache.http.cookie.Cookie[]); - method public synchronized void clear(); - method public synchronized boolean clearExpired(java.util.Date); - method public synchronized java.util.List<org.apache.http.cookie.Cookie> getCookies(); - } - - public deprecated class BasicCredentialsProvider implements org.apache.http.client.CredentialsProvider { - ctor public BasicCredentialsProvider(); - method public synchronized void clear(); - method public synchronized org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope); - method public synchronized void setCredentials(org.apache.http.auth.AuthScope, org.apache.http.auth.Credentials); - } - - public deprecated class BasicResponseHandler implements org.apache.http.client.ResponseHandler { - ctor public BasicResponseHandler(); - method public java.lang.String handleResponse(org.apache.http.HttpResponse) throws org.apache.http.client.HttpResponseException, java.io.IOException; - } - - public deprecated class ClientParamsStack extends org.apache.http.params.AbstractHttpParams { - ctor public ClientParamsStack(org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams); - ctor public ClientParamsStack(org.apache.http.impl.client.ClientParamsStack); - ctor public ClientParamsStack(org.apache.http.impl.client.ClientParamsStack, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams, org.apache.http.params.HttpParams); - method public org.apache.http.params.HttpParams copy(); - method public final org.apache.http.params.HttpParams getApplicationParams(); - method public final org.apache.http.params.HttpParams getClientParams(); - method public final org.apache.http.params.HttpParams getOverrideParams(); - method public java.lang.Object getParameter(java.lang.String); - method public final org.apache.http.params.HttpParams getRequestParams(); - method public boolean removeParameter(java.lang.String); - method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object) throws java.lang.UnsupportedOperationException; - field protected final org.apache.http.params.HttpParams applicationParams; - field protected final org.apache.http.params.HttpParams clientParams; - field protected final org.apache.http.params.HttpParams overrideParams; - field protected final org.apache.http.params.HttpParams requestParams; - } - - public deprecated class DefaultConnectionKeepAliveStrategy implements org.apache.http.conn.ConnectionKeepAliveStrategy { - ctor public DefaultConnectionKeepAliveStrategy(); - method public long getKeepAliveDuration(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultHttpClient extends org.apache.http.impl.client.AbstractHttpClient { - ctor public DefaultHttpClient(org.apache.http.conn.ClientConnectionManager, org.apache.http.params.HttpParams); - ctor public DefaultHttpClient(org.apache.http.params.HttpParams); - ctor public DefaultHttpClient(); - method protected org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry(); - method protected org.apache.http.conn.ClientConnectionManager createClientConnectionManager(); - method protected org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy(); - method protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy(); - method protected org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry(); - method protected org.apache.http.client.CookieStore createCookieStore(); - method protected org.apache.http.client.CredentialsProvider createCredentialsProvider(); - method protected org.apache.http.protocol.HttpContext createHttpContext(); - method protected org.apache.http.params.HttpParams createHttpParams(); - method protected org.apache.http.protocol.BasicHttpProcessor createHttpProcessor(); - method protected org.apache.http.client.HttpRequestRetryHandler createHttpRequestRetryHandler(); - method protected org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner(); - method protected org.apache.http.client.AuthenticationHandler createProxyAuthenticationHandler(); - method protected org.apache.http.client.RedirectHandler createRedirectHandler(); - method protected org.apache.http.protocol.HttpRequestExecutor createRequestExecutor(); - method protected org.apache.http.client.AuthenticationHandler createTargetAuthenticationHandler(); - method protected org.apache.http.client.UserTokenHandler createUserTokenHandler(); - } - - public deprecated class DefaultHttpRequestRetryHandler implements org.apache.http.client.HttpRequestRetryHandler { - ctor public DefaultHttpRequestRetryHandler(int, boolean); - ctor public DefaultHttpRequestRetryHandler(); - method public int getRetryCount(); - method public boolean isRequestSentRetryEnabled(); - method public boolean retryRequest(java.io.IOException, int, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultProxyAuthenticationHandler extends org.apache.http.impl.client.AbstractAuthenticationHandler { - ctor public DefaultProxyAuthenticationHandler(); - method public java.util.Map<java.lang.String, org.apache.http.Header> getChallenges(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.MalformedChallengeException; - method public boolean isAuthenticationRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultRedirectHandler implements org.apache.http.client.RedirectHandler { - ctor public DefaultRedirectHandler(); - method public java.net.URI getLocationURI(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.ProtocolException; - method public boolean isRedirectRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultRequestDirector implements org.apache.http.client.RequestDirector { - ctor public DefaultRequestDirector(org.apache.http.protocol.HttpRequestExecutor, org.apache.http.conn.ClientConnectionManager, org.apache.http.ConnectionReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy, org.apache.http.conn.routing.HttpRoutePlanner, org.apache.http.protocol.HttpProcessor, org.apache.http.client.HttpRequestRetryHandler, org.apache.http.client.RedirectHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.AuthenticationHandler, org.apache.http.client.UserTokenHandler, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpRequest createConnectRequest(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext); - method protected boolean createTunnelToProxy(org.apache.http.conn.routing.HttpRoute, int, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected boolean createTunnelToTarget(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - method protected void establishRoute(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.impl.client.RoutedRequest handleResponse(org.apache.http.impl.client.RoutedRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected void releaseConnection(); - method protected void rewriteRequestURI(org.apache.http.impl.client.RequestWrapper, org.apache.http.conn.routing.HttpRoute) throws org.apache.http.ProtocolException; - field protected final org.apache.http.conn.ClientConnectionManager connManager; - field protected final org.apache.http.protocol.HttpProcessor httpProcessor; - field protected final org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy; - field protected org.apache.http.conn.ManagedClientConnection managedConn; - field protected final org.apache.http.params.HttpParams params; - field protected final org.apache.http.client.RedirectHandler redirectHandler; - field protected final org.apache.http.protocol.HttpRequestExecutor requestExec; - field protected final org.apache.http.client.HttpRequestRetryHandler retryHandler; - field protected final org.apache.http.ConnectionReuseStrategy reuseStrategy; - field protected final org.apache.http.conn.routing.HttpRoutePlanner routePlanner; - } - - public deprecated class DefaultTargetAuthenticationHandler extends org.apache.http.impl.client.AbstractAuthenticationHandler { - ctor public DefaultTargetAuthenticationHandler(); - method public java.util.Map<java.lang.String, org.apache.http.Header> getChallenges(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.auth.MalformedChallengeException; - method public boolean isAuthenticationRequested(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext); - } - - public deprecated class DefaultUserTokenHandler implements org.apache.http.client.UserTokenHandler { - ctor public DefaultUserTokenHandler(); - method public java.lang.Object getUserToken(org.apache.http.protocol.HttpContext); - } - - public deprecated class EntityEnclosingRequestWrapper extends org.apache.http.impl.client.RequestWrapper implements org.apache.http.HttpEntityEnclosingRequest { - ctor public EntityEnclosingRequestWrapper(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.ProtocolException; - method public boolean expectContinue(); - method public org.apache.http.HttpEntity getEntity(); - method public void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class RedirectLocations { - ctor public RedirectLocations(); - method public void add(java.net.URI); - method public boolean contains(java.net.URI); - method public boolean remove(java.net.URI); - } - - public deprecated class RequestWrapper extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.client.methods.HttpUriRequest { - ctor public RequestWrapper(org.apache.http.HttpRequest) throws org.apache.http.ProtocolException; - method public void abort() throws java.lang.UnsupportedOperationException; - method public int getExecCount(); - method public java.lang.String getMethod(); - method public org.apache.http.HttpRequest getOriginal(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public org.apache.http.RequestLine getRequestLine(); - method public java.net.URI getURI(); - method public void incrementExecCount(); - method public boolean isAborted(); - method public boolean isRepeatable(); - method public void resetHeaders(); - method public void setMethod(java.lang.String); - method public void setProtocolVersion(org.apache.http.ProtocolVersion); - method public void setURI(java.net.URI); - } - - public deprecated class RoutedRequest { - ctor public RoutedRequest(org.apache.http.impl.client.RequestWrapper, org.apache.http.conn.routing.HttpRoute); - method public final org.apache.http.impl.client.RequestWrapper getRequest(); - method public final org.apache.http.conn.routing.HttpRoute getRoute(); - field protected final org.apache.http.impl.client.RequestWrapper request; - field protected final org.apache.http.conn.routing.HttpRoute route; - } - - public deprecated class TunnelRefusedException extends org.apache.http.HttpException { - ctor public TunnelRefusedException(java.lang.String, org.apache.http.HttpResponse); - method public org.apache.http.HttpResponse getResponse(); - } - -} - -package org.apache.http.impl.conn { - - public abstract deprecated class AbstractClientConnAdapter implements org.apache.http.conn.ManagedClientConnection { - ctor protected AbstractClientConnAdapter(org.apache.http.conn.ClientConnectionManager, org.apache.http.conn.OperatedClientConnection); - method public void abortConnection(); - method protected final void assertNotAborted() throws java.io.InterruptedIOException; - method protected final void assertValid(org.apache.http.conn.OperatedClientConnection); - method protected void detach(); - method public void flush() throws java.io.IOException; - method public java.net.InetAddress getLocalAddress(); - method public int getLocalPort(); - method protected org.apache.http.conn.ClientConnectionManager getManager(); - method public org.apache.http.HttpConnectionMetrics getMetrics(); - method public java.net.InetAddress getRemoteAddress(); - method public int getRemotePort(); - method public javax.net.ssl.SSLSession getSSLSession(); - method public int getSocketTimeout(); - method protected org.apache.http.conn.OperatedClientConnection getWrappedConnection(); - method public boolean isMarkedReusable(); - method public boolean isOpen(); - method public boolean isResponseAvailable(int) throws java.io.IOException; - method public boolean isSecure(); - method public boolean isStale(); - method public void markReusable(); - method public void receiveResponseEntity(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, java.io.IOException; - method public void releaseConnection(); - method public void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest) throws org.apache.http.HttpException, java.io.IOException; - method public void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException; - method public void setIdleDuration(long, java.util.concurrent.TimeUnit); - method public void setSocketTimeout(int); - method public void unmarkReusable(); - } - - public abstract deprecated class AbstractPoolEntry { - ctor protected AbstractPoolEntry(org.apache.http.conn.ClientConnectionOperator, org.apache.http.conn.routing.HttpRoute); - method public java.lang.Object getState(); - method public void layerProtocol(org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void open(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void setState(java.lang.Object); - method protected void shutdownEntry(); - method public void tunnelProxy(org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void tunnelTarget(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - field protected final org.apache.http.conn.ClientConnectionOperator connOperator; - field protected final org.apache.http.conn.OperatedClientConnection connection; - field protected volatile org.apache.http.conn.routing.HttpRoute route; - field protected volatile java.lang.Object state; - field protected volatile org.apache.http.conn.routing.RouteTracker tracker; - } - - public abstract deprecated class AbstractPooledConnAdapter extends org.apache.http.impl.conn.AbstractClientConnAdapter { - ctor protected AbstractPooledConnAdapter(org.apache.http.conn.ClientConnectionManager, org.apache.http.impl.conn.AbstractPoolEntry); - method protected final void assertAttached(); - method public void close() throws java.io.IOException; - method public org.apache.http.conn.routing.HttpRoute getRoute(); - method public java.lang.Object getState(); - method public void layerProtocol(org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void open(org.apache.http.conn.routing.HttpRoute, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void setState(java.lang.Object); - method public void shutdown() throws java.io.IOException; - method public void tunnelProxy(org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void tunnelTarget(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - field protected volatile org.apache.http.impl.conn.AbstractPoolEntry poolEntry; - } - - public deprecated class DefaultClientConnection extends org.apache.http.impl.SocketHttpClientConnection implements org.apache.http.conn.OperatedClientConnection { - ctor public DefaultClientConnection(); - method public final java.net.Socket getSocket(); - method public final org.apache.http.HttpHost getTargetHost(); - method public final boolean isSecure(); - method public void openCompleted(boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void opening(java.net.Socket, org.apache.http.HttpHost) throws java.io.IOException; - method public void update(java.net.Socket, org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException; - } - - public deprecated class DefaultClientConnectionOperator implements org.apache.http.conn.ClientConnectionOperator { - ctor public DefaultClientConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry); - method public org.apache.http.conn.OperatedClientConnection createConnection(); - method public void openConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, java.net.InetAddress, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method protected void prepareSocket(java.net.Socket, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - method public void updateSecureConnection(org.apache.http.conn.OperatedClientConnection, org.apache.http.HttpHost, org.apache.http.protocol.HttpContext, org.apache.http.params.HttpParams) throws java.io.IOException; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class DefaultHttpRoutePlanner implements org.apache.http.conn.routing.HttpRoutePlanner { - ctor public DefaultHttpRoutePlanner(org.apache.http.conn.scheme.SchemeRegistry); - method public org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class DefaultResponseParser extends org.apache.http.impl.io.AbstractMessageParser { - ctor public DefaultResponseParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.HttpResponseFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class IdleConnectionHandler { - ctor public IdleConnectionHandler(); - method public void add(org.apache.http.HttpConnection, long, java.util.concurrent.TimeUnit); - method public void closeExpiredConnections(); - method public void closeIdleConnections(long); - method public boolean remove(org.apache.http.HttpConnection); - method public void removeAll(); - } - - public deprecated class LoggingSessionInputBuffer implements org.apache.http.io.SessionInputBuffer { - ctor public LoggingSessionInputBuffer(org.apache.http.io.SessionInputBuffer, org.apache.http.impl.conn.Wire); - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method public boolean isDataAvailable(int) throws java.io.IOException; - method public int read(byte[], int, int) throws java.io.IOException; - method public int read() throws java.io.IOException; - method public int read(byte[]) throws java.io.IOException; - method public java.lang.String readLine() throws java.io.IOException; - method public int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - } - - public deprecated class LoggingSessionOutputBuffer implements org.apache.http.io.SessionOutputBuffer { - ctor public LoggingSessionOutputBuffer(org.apache.http.io.SessionOutputBuffer, org.apache.http.impl.conn.Wire); - method public void flush() throws java.io.IOException; - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method public void write(byte[], int, int) throws java.io.IOException; - method public void write(int) throws java.io.IOException; - method public void write(byte[]) throws java.io.IOException; - method public void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - method public void writeLine(java.lang.String) throws java.io.IOException; - } - - public deprecated class ProxySelectorRoutePlanner implements org.apache.http.conn.routing.HttpRoutePlanner { - ctor public ProxySelectorRoutePlanner(org.apache.http.conn.scheme.SchemeRegistry, java.net.ProxySelector); - method protected java.net.Proxy chooseProxy(java.util.List<java.net.Proxy>, org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext); - method protected org.apache.http.HttpHost determineProxy(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - method public org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - method protected java.lang.String getHost(java.net.InetSocketAddress); - method public java.net.ProxySelector getProxySelector(); - method public void setProxySelector(java.net.ProxySelector); - field protected java.net.ProxySelector proxySelector; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class SingleClientConnManager implements org.apache.http.conn.ClientConnectionManager { - ctor public SingleClientConnManager(org.apache.http.params.HttpParams, org.apache.http.conn.scheme.SchemeRegistry); - method protected final void assertStillUp() throws java.lang.IllegalStateException; - method public void closeExpiredConnections(); - method public void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method protected org.apache.http.conn.ClientConnectionOperator createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry); - method public org.apache.http.conn.ManagedClientConnection getConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry(); - method public void releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit); - method public final org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method protected void revokeConnection(); - method public void shutdown(); - field public static final java.lang.String MISUSE_MESSAGE = "Invalid use of SingleClientConnManager: connection still allocated.\nMake sure to release the connection before allocating another one."; - field protected boolean alwaysShutDown; - field protected org.apache.http.conn.ClientConnectionOperator connOperator; - field protected long connectionExpiresTime; - field protected volatile boolean isShutDown; - field protected long lastReleaseTime; - field protected org.apache.http.impl.conn.SingleClientConnManager.ConnAdapter managedConn; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - field protected org.apache.http.impl.conn.SingleClientConnManager.PoolEntry uniquePoolEntry; - } - - protected class SingleClientConnManager.ConnAdapter extends org.apache.http.impl.conn.AbstractPooledConnAdapter { - ctor protected SingleClientConnManager.ConnAdapter(org.apache.http.impl.conn.SingleClientConnManager.PoolEntry, org.apache.http.conn.routing.HttpRoute); - } - - protected class SingleClientConnManager.PoolEntry extends org.apache.http.impl.conn.AbstractPoolEntry { - ctor protected SingleClientConnManager.PoolEntry(); - method protected void close() throws java.io.IOException; - method protected void shutdown() throws java.io.IOException; - } - - public deprecated class Wire { - ctor public Wire(org.apache.commons.logging.Log); - method public boolean enabled(); - method public void input(java.io.InputStream) throws java.io.IOException; - method public void input(byte[], int, int) throws java.io.IOException; - method public void input(byte[]) throws java.io.IOException; - method public void input(int) throws java.io.IOException; - method public void input(java.lang.String) throws java.io.IOException; - method public void output(java.io.InputStream) throws java.io.IOException; - method public void output(byte[], int, int) throws java.io.IOException; - method public void output(byte[]) throws java.io.IOException; - method public void output(int) throws java.io.IOException; - method public void output(java.lang.String) throws java.io.IOException; - } - -} - -package org.apache.http.impl.conn.tsccm { - - public abstract deprecated class AbstractConnPool implements org.apache.http.impl.conn.tsccm.RefQueueHandler { - ctor protected AbstractConnPool(); - method protected void closeConnection(org.apache.http.conn.OperatedClientConnection); - method public void closeExpiredConnections(); - method public void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method public abstract void deleteClosedConnections(); - method public void enableConnectionGC() throws java.lang.IllegalStateException; - method public abstract void freeEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry, boolean, long, java.util.concurrent.TimeUnit); - method public final org.apache.http.impl.conn.tsccm.BasicPoolEntry getEntry(org.apache.http.conn.routing.HttpRoute, java.lang.Object, long, java.util.concurrent.TimeUnit) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - method protected abstract void handleLostEntry(org.apache.http.conn.routing.HttpRoute); - method public void handleReference(java.lang.ref.Reference); - method public abstract org.apache.http.impl.conn.tsccm.PoolEntryRequest requestPoolEntry(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public void shutdown(); - field protected org.apache.http.impl.conn.IdleConnectionHandler idleConnHandler; - field protected volatile boolean isShutDown; - field protected java.util.Set<org.apache.http.impl.conn.tsccm.BasicPoolEntryRef> issuedConnections; - field protected int numConnections; - field protected final java.util.concurrent.locks.Lock poolLock; - field protected java.lang.ref.ReferenceQueue<java.lang.Object> refQueue; - } - - public deprecated class BasicPoolEntry extends org.apache.http.impl.conn.AbstractPoolEntry { - ctor public BasicPoolEntry(org.apache.http.conn.ClientConnectionOperator, org.apache.http.conn.routing.HttpRoute, java.lang.ref.ReferenceQueue<java.lang.Object>); - method protected final org.apache.http.conn.OperatedClientConnection getConnection(); - method protected final org.apache.http.conn.routing.HttpRoute getPlannedRoute(); - method protected final org.apache.http.impl.conn.tsccm.BasicPoolEntryRef getWeakRef(); - } - - public deprecated class BasicPoolEntryRef extends java.lang.ref.WeakReference { - ctor public BasicPoolEntryRef(org.apache.http.impl.conn.tsccm.BasicPoolEntry, java.lang.ref.ReferenceQueue<java.lang.Object>); - method public final org.apache.http.conn.routing.HttpRoute getRoute(); - } - - public deprecated class BasicPooledConnAdapter extends org.apache.http.impl.conn.AbstractPooledConnAdapter { - ctor protected BasicPooledConnAdapter(org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager, org.apache.http.impl.conn.AbstractPoolEntry); - method protected org.apache.http.impl.conn.AbstractPoolEntry getPoolEntry(); - } - - public deprecated class ConnPoolByRoute extends org.apache.http.impl.conn.tsccm.AbstractConnPool { - ctor public ConnPoolByRoute(org.apache.http.conn.ClientConnectionOperator, org.apache.http.params.HttpParams); - method protected org.apache.http.impl.conn.tsccm.BasicPoolEntry createEntry(org.apache.http.impl.conn.tsccm.RouteSpecificPool, org.apache.http.conn.ClientConnectionOperator); - method protected java.util.Queue<org.apache.http.impl.conn.tsccm.BasicPoolEntry> createFreeConnQueue(); - method protected java.util.Map<org.apache.http.conn.routing.HttpRoute, org.apache.http.impl.conn.tsccm.RouteSpecificPool> createRouteToPoolMap(); - method protected java.util.Queue<org.apache.http.impl.conn.tsccm.WaitingThread> createWaitingThreadQueue(); - method public void deleteClosedConnections(); - method protected void deleteEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method protected void deleteLeastUsedEntry(); - method public void freeEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry, boolean, long, java.util.concurrent.TimeUnit); - method public int getConnectionsInPool(org.apache.http.conn.routing.HttpRoute); - method protected org.apache.http.impl.conn.tsccm.BasicPoolEntry getEntryBlocking(org.apache.http.conn.routing.HttpRoute, java.lang.Object, long, java.util.concurrent.TimeUnit, org.apache.http.impl.conn.tsccm.WaitingThreadAborter) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - method protected org.apache.http.impl.conn.tsccm.BasicPoolEntry getFreeEntry(org.apache.http.impl.conn.tsccm.RouteSpecificPool, java.lang.Object); - method protected org.apache.http.impl.conn.tsccm.RouteSpecificPool getRoutePool(org.apache.http.conn.routing.HttpRoute, boolean); - method protected void handleLostEntry(org.apache.http.conn.routing.HttpRoute); - method protected org.apache.http.impl.conn.tsccm.RouteSpecificPool newRouteSpecificPool(org.apache.http.conn.routing.HttpRoute); - method protected org.apache.http.impl.conn.tsccm.WaitingThread newWaitingThread(java.util.concurrent.locks.Condition, org.apache.http.impl.conn.tsccm.RouteSpecificPool); - method protected void notifyWaitingThread(org.apache.http.impl.conn.tsccm.RouteSpecificPool); - method public org.apache.http.impl.conn.tsccm.PoolEntryRequest requestPoolEntry(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - field protected java.util.Queue<org.apache.http.impl.conn.tsccm.BasicPoolEntry> freeConnections; - field protected final int maxTotalConnections; - field protected final org.apache.http.conn.ClientConnectionOperator operator; - field protected final java.util.Map<org.apache.http.conn.routing.HttpRoute, org.apache.http.impl.conn.tsccm.RouteSpecificPool> routeToPool; - field protected java.util.Queue<org.apache.http.impl.conn.tsccm.WaitingThread> waitingThreads; - } - - public abstract deprecated interface PoolEntryRequest { - method public abstract void abortRequest(); - method public abstract org.apache.http.impl.conn.tsccm.BasicPoolEntry getPoolEntry(long, java.util.concurrent.TimeUnit) throws org.apache.http.conn.ConnectionPoolTimeoutException, java.lang.InterruptedException; - } - - public abstract deprecated interface RefQueueHandler { - method public abstract void handleReference(java.lang.ref.Reference<?>); - } - - public deprecated class RefQueueWorker implements java.lang.Runnable { - ctor public RefQueueWorker(java.lang.ref.ReferenceQueue<?>, org.apache.http.impl.conn.tsccm.RefQueueHandler); - method public void run(); - method public void shutdown(); - field protected final org.apache.http.impl.conn.tsccm.RefQueueHandler refHandler; - field protected final java.lang.ref.ReferenceQueue<?> refQueue; - field protected volatile java.lang.Thread workerThread; - } - - public deprecated class RouteSpecificPool { - ctor public RouteSpecificPool(org.apache.http.conn.routing.HttpRoute, int); - method public org.apache.http.impl.conn.tsccm.BasicPoolEntry allocEntry(java.lang.Object); - method public void createdEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method public boolean deleteEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method public void dropEntry(); - method public void freeEntry(org.apache.http.impl.conn.tsccm.BasicPoolEntry); - method public int getCapacity(); - method public final int getEntryCount(); - method public final int getMaxEntries(); - method public final org.apache.http.conn.routing.HttpRoute getRoute(); - method public boolean hasThread(); - method public boolean isUnused(); - method public org.apache.http.impl.conn.tsccm.WaitingThread nextThread(); - method public void queueThread(org.apache.http.impl.conn.tsccm.WaitingThread); - method public void removeThread(org.apache.http.impl.conn.tsccm.WaitingThread); - field protected final java.util.LinkedList<org.apache.http.impl.conn.tsccm.BasicPoolEntry> freeEntries; - field protected final int maxEntries; - field protected int numEntries; - field protected final org.apache.http.conn.routing.HttpRoute route; - field protected final java.util.Queue<org.apache.http.impl.conn.tsccm.WaitingThread> waitingThreads; - } - - public deprecated class ThreadSafeClientConnManager implements org.apache.http.conn.ClientConnectionManager { - ctor public ThreadSafeClientConnManager(org.apache.http.params.HttpParams, org.apache.http.conn.scheme.SchemeRegistry); - method public void closeExpiredConnections(); - method public void closeIdleConnections(long, java.util.concurrent.TimeUnit); - method protected org.apache.http.conn.ClientConnectionOperator createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry); - method protected org.apache.http.impl.conn.tsccm.AbstractConnPool createConnectionPool(org.apache.http.params.HttpParams); - method public int getConnectionsInPool(org.apache.http.conn.routing.HttpRoute); - method public int getConnectionsInPool(); - method public org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry(); - method public void releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit); - method public org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object); - method public void shutdown(); - field protected org.apache.http.conn.ClientConnectionOperator connOperator; - field protected final org.apache.http.impl.conn.tsccm.AbstractConnPool connectionPool; - field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry; - } - - public deprecated class WaitingThread { - ctor public WaitingThread(java.util.concurrent.locks.Condition, org.apache.http.impl.conn.tsccm.RouteSpecificPool); - method public boolean await(java.util.Date) throws java.lang.InterruptedException; - method public final java.util.concurrent.locks.Condition getCondition(); - method public final org.apache.http.impl.conn.tsccm.RouteSpecificPool getPool(); - method public final java.lang.Thread getThread(); - method public void interrupt(); - method public void wakeup(); - } - - public deprecated class WaitingThreadAborter { - ctor public WaitingThreadAborter(); - method public void abort(); - method public void setWaitingThread(org.apache.http.impl.conn.tsccm.WaitingThread); - } - -} - -package org.apache.http.impl.cookie { - - public abstract deprecated class AbstractCookieAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public AbstractCookieAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public abstract deprecated class AbstractCookieSpec implements org.apache.http.cookie.CookieSpec { - ctor public AbstractCookieSpec(); - method protected org.apache.http.cookie.CookieAttributeHandler findAttribHandler(java.lang.String); - method protected org.apache.http.cookie.CookieAttributeHandler getAttribHandler(java.lang.String); - method protected java.util.Collection<org.apache.http.cookie.CookieAttributeHandler> getAttribHandlers(); - method public void registerAttribHandler(java.lang.String, org.apache.http.cookie.CookieAttributeHandler); - } - - public deprecated class BasicClientCookie implements org.apache.http.cookie.ClientCookie java.lang.Cloneable org.apache.http.cookie.SetCookie { - ctor public BasicClientCookie(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public boolean containsAttribute(java.lang.String); - method public java.lang.String getAttribute(java.lang.String); - method public java.lang.String getComment(); - method public java.lang.String getCommentURL(); - method public java.lang.String getDomain(); - method public java.util.Date getExpiryDate(); - method public java.lang.String getName(); - method public java.lang.String getPath(); - method public int[] getPorts(); - method public java.lang.String getValue(); - method public int getVersion(); - method public boolean isExpired(java.util.Date); - method public boolean isPersistent(); - method public boolean isSecure(); - method public void setAttribute(java.lang.String, java.lang.String); - method public void setComment(java.lang.String); - method public void setDomain(java.lang.String); - method public void setExpiryDate(java.util.Date); - method public void setPath(java.lang.String); - method public void setSecure(boolean); - method public void setValue(java.lang.String); - method public void setVersion(int); - } - - public deprecated class BasicClientCookie2 extends org.apache.http.impl.cookie.BasicClientCookie implements org.apache.http.cookie.SetCookie2 { - ctor public BasicClientCookie2(java.lang.String, java.lang.String); - method public void setCommentURL(java.lang.String); - method public void setDiscard(boolean); - method public void setPorts(int[]); - } - - public deprecated class BasicCommentHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicCommentHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicDomainHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public BasicDomainHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicExpiresHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicExpiresHandler(java.lang.String[]); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicMaxAgeHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicMaxAgeHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicPathHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public BasicPathHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BasicSecureHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public BasicSecureHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BestMatchSpec implements org.apache.http.cookie.CookieSpec { - ctor public BestMatchSpec(java.lang.String[], boolean); - ctor public BestMatchSpec(); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class BestMatchSpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public BestMatchSpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class BrowserCompatSpec extends org.apache.http.impl.cookie.CookieSpecBase { - ctor public BrowserCompatSpec(java.lang.String[]); - ctor public BrowserCompatSpec(); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - field protected static final java.lang.String[] DATE_PATTERNS; - } - - public deprecated class BrowserCompatSpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public BrowserCompatSpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public abstract deprecated class CookieSpecBase extends org.apache.http.impl.cookie.AbstractCookieSpec { - ctor public CookieSpecBase(); - method protected static java.lang.String getDefaultDomain(org.apache.http.cookie.CookieOrigin); - method protected static java.lang.String getDefaultPath(org.apache.http.cookie.CookieOrigin); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method protected java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.HeaderElement[], org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class DateParseException extends java.lang.Exception { - ctor public DateParseException(); - ctor public DateParseException(java.lang.String); - } - - public final deprecated class DateUtils { - method public static java.lang.String formatDate(java.util.Date); - method public static java.lang.String formatDate(java.util.Date, java.lang.String); - method public static java.util.Date parseDate(java.lang.String) throws org.apache.http.impl.cookie.DateParseException; - method public static java.util.Date parseDate(java.lang.String, java.lang.String[]) throws org.apache.http.impl.cookie.DateParseException; - method public static java.util.Date parseDate(java.lang.String, java.lang.String[], java.util.Date) throws org.apache.http.impl.cookie.DateParseException; - field public static final java.util.TimeZone GMT; - field public static final java.lang.String PATTERN_ASCTIME = "EEE MMM d HH:mm:ss yyyy"; - field public static final java.lang.String PATTERN_RFC1036 = "EEEE, dd-MMM-yy HH:mm:ss zzz"; - field public static final java.lang.String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz"; - } - - public deprecated class NetscapeDomainHandler extends org.apache.http.impl.cookie.BasicDomainHandler { - ctor public NetscapeDomainHandler(); - } - - public deprecated class NetscapeDraftHeaderParser { - ctor public NetscapeDraftHeaderParser(); - method public org.apache.http.HeaderElement parseHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - field public static final org.apache.http.impl.cookie.NetscapeDraftHeaderParser DEFAULT; - } - - public deprecated class NetscapeDraftSpec extends org.apache.http.impl.cookie.CookieSpecBase { - ctor public NetscapeDraftSpec(java.lang.String[]); - ctor public NetscapeDraftSpec(); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - field protected static final java.lang.String EXPIRES_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z"; - } - - public deprecated class NetscapeDraftSpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public NetscapeDraftSpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class RFC2109DomainHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2109DomainHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2109Spec extends org.apache.http.impl.cookie.CookieSpecBase { - ctor public RFC2109Spec(java.lang.String[], boolean); - ctor public RFC2109Spec(); - method protected void formatCookieAsVer(org.apache.http.util.CharArrayBuffer, org.apache.http.cookie.Cookie, int); - method public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie>); - method protected void formatParamAsVer(org.apache.http.util.CharArrayBuffer, java.lang.String, java.lang.String, int); - method public int getVersion(); - method public org.apache.http.Header getVersionHeader(); - method public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2109SpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public RFC2109SpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class RFC2109VersionHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { - ctor public RFC2109VersionHandler(); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965CommentUrlAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965CommentUrlAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965DiscardAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965DiscardAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965DomainAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965DomainAttributeHandler(); - method public boolean domainMatch(java.lang.String, java.lang.String); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965PortAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965PortAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - - public deprecated class RFC2965Spec extends org.apache.http.impl.cookie.RFC2109Spec { - ctor public RFC2965Spec(); - ctor public RFC2965Spec(java.lang.String[], boolean); - } - - public deprecated class RFC2965SpecFactory implements org.apache.http.cookie.CookieSpecFactory { - ctor public RFC2965SpecFactory(); - method public org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams); - } - - public deprecated class RFC2965VersionAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { - ctor public RFC2965VersionAttributeHandler(); - method public boolean match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin); - method public void parse(org.apache.http.cookie.SetCookie, java.lang.String) throws org.apache.http.cookie.MalformedCookieException; - method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException; - } - -} - -package org.apache.http.impl.entity { - - public deprecated class EntityDeserializer { - ctor public EntityDeserializer(org.apache.http.entity.ContentLengthStrategy); - method public org.apache.http.HttpEntity deserialize(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.entity.BasicHttpEntity doDeserialize(org.apache.http.io.SessionInputBuffer, org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class EntitySerializer { - ctor public EntitySerializer(org.apache.http.entity.ContentLengthStrategy); - method protected java.io.OutputStream doSerialize(org.apache.http.io.SessionOutputBuffer, org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - method public void serialize(org.apache.http.io.SessionOutputBuffer, org.apache.http.HttpMessage, org.apache.http.HttpEntity) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class LaxContentLengthStrategy implements org.apache.http.entity.ContentLengthStrategy { - ctor public LaxContentLengthStrategy(); - method public long determineLength(org.apache.http.HttpMessage) throws org.apache.http.HttpException; - } - - public deprecated class StrictContentLengthStrategy implements org.apache.http.entity.ContentLengthStrategy { - ctor public StrictContentLengthStrategy(); - method public long determineLength(org.apache.http.HttpMessage) throws org.apache.http.HttpException; - } - -} - -package org.apache.http.impl.io { - - public abstract deprecated class AbstractMessageParser implements org.apache.http.io.HttpMessageParser { - ctor public AbstractMessageParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.params.HttpParams); - method public org.apache.http.HttpMessage parse() throws org.apache.http.HttpException, java.io.IOException; - method protected abstract org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException, org.apache.http.ParseException; - method public static org.apache.http.Header[] parseHeaders(org.apache.http.io.SessionInputBuffer, int, int, org.apache.http.message.LineParser) throws org.apache.http.HttpException, java.io.IOException; - field protected final org.apache.http.message.LineParser lineParser; - } - - public abstract deprecated class AbstractMessageWriter implements org.apache.http.io.HttpMessageWriter { - ctor public AbstractMessageWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.message.LineFormatter, org.apache.http.params.HttpParams); - method public void write(org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - method protected abstract void writeHeadLine(org.apache.http.HttpMessage) throws java.io.IOException; - field protected final org.apache.http.util.CharArrayBuffer lineBuf; - field protected final org.apache.http.message.LineFormatter lineFormatter; - field protected final org.apache.http.io.SessionOutputBuffer sessionBuffer; - } - - public abstract deprecated class AbstractSessionInputBuffer implements org.apache.http.io.SessionInputBuffer { - ctor public AbstractSessionInputBuffer(); - method protected int fillBuffer() throws java.io.IOException; - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method protected boolean hasBufferedData(); - method protected void init(java.io.InputStream, int, org.apache.http.params.HttpParams); - method public int read() throws java.io.IOException; - method public int read(byte[], int, int) throws java.io.IOException; - method public int read(byte[]) throws java.io.IOException; - method public int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - method public java.lang.String readLine() throws java.io.IOException; - } - - public abstract deprecated class AbstractSessionOutputBuffer implements org.apache.http.io.SessionOutputBuffer { - ctor public AbstractSessionOutputBuffer(); - method public void flush() throws java.io.IOException; - method protected void flushBuffer() throws java.io.IOException; - method public org.apache.http.io.HttpTransportMetrics getMetrics(); - method protected void init(java.io.OutputStream, int, org.apache.http.params.HttpParams); - method public void write(byte[], int, int) throws java.io.IOException; - method public void write(byte[]) throws java.io.IOException; - method public void write(int) throws java.io.IOException; - method public void writeLine(java.lang.String) throws java.io.IOException; - method public void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - } - - public deprecated class ChunkedInputStream extends java.io.InputStream { - ctor public ChunkedInputStream(org.apache.http.io.SessionInputBuffer); - method public org.apache.http.Header[] getFooters(); - method public int read() throws java.io.IOException; - } - - public deprecated class ChunkedOutputStream extends java.io.OutputStream { - ctor public ChunkedOutputStream(org.apache.http.io.SessionOutputBuffer, int) throws java.io.IOException; - ctor public ChunkedOutputStream(org.apache.http.io.SessionOutputBuffer) throws java.io.IOException; - method public void finish() throws java.io.IOException; - method protected void flushCache() throws java.io.IOException; - method protected void flushCacheWithAppend(byte[], int, int) throws java.io.IOException; - method public void write(int) throws java.io.IOException; - method protected void writeClosingChunk() throws java.io.IOException; - } - - public deprecated class ContentLengthInputStream extends java.io.InputStream { - ctor public ContentLengthInputStream(org.apache.http.io.SessionInputBuffer, long); - method public int read() throws java.io.IOException; - } - - public deprecated class ContentLengthOutputStream extends java.io.OutputStream { - ctor public ContentLengthOutputStream(org.apache.http.io.SessionOutputBuffer, long); - method public void write(int) throws java.io.IOException; - } - - public deprecated class HttpRequestParser extends org.apache.http.impl.io.AbstractMessageParser { - ctor public HttpRequestParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.HttpRequestFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException, org.apache.http.ParseException; - } - - public deprecated class HttpRequestWriter extends org.apache.http.impl.io.AbstractMessageWriter { - ctor public HttpRequestWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.message.LineFormatter, org.apache.http.params.HttpParams); - method protected void writeHeadLine(org.apache.http.HttpMessage) throws java.io.IOException; - } - - public deprecated class HttpResponseParser extends org.apache.http.impl.io.AbstractMessageParser { - ctor public HttpResponseParser(org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, org.apache.http.HttpResponseFactory, org.apache.http.params.HttpParams); - method protected org.apache.http.HttpMessage parseHead(org.apache.http.io.SessionInputBuffer) throws org.apache.http.HttpException, java.io.IOException, org.apache.http.ParseException; - } - - public deprecated class HttpResponseWriter extends org.apache.http.impl.io.AbstractMessageWriter { - ctor public HttpResponseWriter(org.apache.http.io.SessionOutputBuffer, org.apache.http.message.LineFormatter, org.apache.http.params.HttpParams); - method protected void writeHeadLine(org.apache.http.HttpMessage) throws java.io.IOException; - } - - public deprecated class HttpTransportMetricsImpl implements org.apache.http.io.HttpTransportMetrics { - ctor public HttpTransportMetricsImpl(); - method public long getBytesTransferred(); - method public void incrementBytesTransferred(long); - method public void reset(); - method public void setBytesTransferred(long); - } - - public deprecated class IdentityInputStream extends java.io.InputStream { - ctor public IdentityInputStream(org.apache.http.io.SessionInputBuffer); - method public int read() throws java.io.IOException; - } - - public deprecated class IdentityOutputStream extends java.io.OutputStream { - ctor public IdentityOutputStream(org.apache.http.io.SessionOutputBuffer); - method public void write(int) throws java.io.IOException; - } - - public deprecated class SocketInputBuffer extends org.apache.http.impl.io.AbstractSessionInputBuffer { - ctor public SocketInputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - method public boolean isDataAvailable(int) throws java.io.IOException; - } - - public deprecated class SocketOutputBuffer extends org.apache.http.impl.io.AbstractSessionOutputBuffer { - ctor public SocketOutputBuffer(java.net.Socket, int, org.apache.http.params.HttpParams) throws java.io.IOException; - } - -} - -package org.apache.http.io { - - public abstract deprecated interface HttpMessageParser { - method public abstract org.apache.http.HttpMessage parse() throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpMessageWriter { - method public abstract void write(org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpTransportMetrics { - method public abstract long getBytesTransferred(); - method public abstract void reset(); - } - - public abstract deprecated interface SessionInputBuffer { - method public abstract org.apache.http.io.HttpTransportMetrics getMetrics(); - method public abstract boolean isDataAvailable(int) throws java.io.IOException; - method public abstract int read(byte[], int, int) throws java.io.IOException; - method public abstract int read(byte[]) throws java.io.IOException; - method public abstract int read() throws java.io.IOException; - method public abstract int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - method public abstract java.lang.String readLine() throws java.io.IOException; - } - - public abstract deprecated interface SessionOutputBuffer { - method public abstract void flush() throws java.io.IOException; - method public abstract org.apache.http.io.HttpTransportMetrics getMetrics(); - method public abstract void write(byte[], int, int) throws java.io.IOException; - method public abstract void write(byte[]) throws java.io.IOException; - method public abstract void write(int) throws java.io.IOException; - method public abstract void writeLine(java.lang.String) throws java.io.IOException; - method public abstract void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException; - } - -} - -package org.apache.http.message { - - public abstract deprecated class AbstractHttpMessage implements org.apache.http.HttpMessage { - ctor protected AbstractHttpMessage(org.apache.http.params.HttpParams); - ctor protected AbstractHttpMessage(); - method public void addHeader(org.apache.http.Header); - method public void addHeader(java.lang.String, java.lang.String); - method public boolean containsHeader(java.lang.String); - method public org.apache.http.Header[] getAllHeaders(); - method public org.apache.http.Header getFirstHeader(java.lang.String); - method public org.apache.http.Header[] getHeaders(java.lang.String); - method public org.apache.http.Header getLastHeader(java.lang.String); - method public org.apache.http.params.HttpParams getParams(); - method public org.apache.http.HeaderIterator headerIterator(); - method public org.apache.http.HeaderIterator headerIterator(java.lang.String); - method public void removeHeader(org.apache.http.Header); - method public void removeHeaders(java.lang.String); - method public void setHeader(org.apache.http.Header); - method public void setHeader(java.lang.String, java.lang.String); - method public void setHeaders(org.apache.http.Header[]); - method public void setParams(org.apache.http.params.HttpParams); - field protected org.apache.http.message.HeaderGroup headergroup; - field protected org.apache.http.params.HttpParams params; - } - - public deprecated class BasicHeader implements java.lang.Cloneable org.apache.http.Header { - ctor public BasicHeader(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.HeaderElement[] getElements() throws org.apache.http.ParseException; - method public java.lang.String getName(); - method public java.lang.String getValue(); - } - - public deprecated class BasicHeaderElement implements java.lang.Cloneable org.apache.http.HeaderElement { - ctor public BasicHeaderElement(java.lang.String, java.lang.String, org.apache.http.NameValuePair[]); - ctor public BasicHeaderElement(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getName(); - method public org.apache.http.NameValuePair getParameter(int); - method public org.apache.http.NameValuePair getParameterByName(java.lang.String); - method public int getParameterCount(); - method public org.apache.http.NameValuePair[] getParameters(); - method public java.lang.String getValue(); - } - - public deprecated class BasicHeaderElementIterator implements org.apache.http.HeaderElementIterator { - ctor public BasicHeaderElementIterator(org.apache.http.HeaderIterator, org.apache.http.message.HeaderValueParser); - ctor public BasicHeaderElementIterator(org.apache.http.HeaderIterator); - method public boolean hasNext(); - method public final java.lang.Object next() throws java.util.NoSuchElementException; - method public org.apache.http.HeaderElement nextElement() throws java.util.NoSuchElementException; - method public void remove() throws java.lang.UnsupportedOperationException; - } - - public deprecated class BasicHeaderIterator implements org.apache.http.HeaderIterator { - ctor public BasicHeaderIterator(org.apache.http.Header[], java.lang.String); - method protected boolean filterHeader(int); - method protected int findNext(int); - method public boolean hasNext(); - method public final java.lang.Object next() throws java.util.NoSuchElementException; - method public org.apache.http.Header nextHeader() throws java.util.NoSuchElementException; - method public void remove() throws java.lang.UnsupportedOperationException; - field protected final org.apache.http.Header[] allHeaders; - field protected int currentIndex; - field protected java.lang.String headerName; - } - - public deprecated class BasicHeaderValueFormatter implements org.apache.http.message.HeaderValueFormatter { - ctor public BasicHeaderValueFormatter(); - method protected void doFormatValue(org.apache.http.util.CharArrayBuffer, java.lang.String, boolean); - method protected int estimateElementsLen(org.apache.http.HeaderElement[]); - method protected int estimateHeaderElementLen(org.apache.http.HeaderElement); - method protected int estimateNameValuePairLen(org.apache.http.NameValuePair); - method protected int estimateParametersLen(org.apache.http.NameValuePair[]); - method public static final java.lang.String formatElements(org.apache.http.HeaderElement[], boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatElements(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement[], boolean); - method public static final java.lang.String formatHeaderElement(org.apache.http.HeaderElement, boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement, boolean); - method public static final java.lang.String formatNameValuePair(org.apache.http.NameValuePair, boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair, boolean); - method public static final java.lang.String formatParameters(org.apache.http.NameValuePair[], boolean, org.apache.http.message.HeaderValueFormatter); - method public org.apache.http.util.CharArrayBuffer formatParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair[], boolean); - method protected boolean isSeparator(char); - method protected boolean isUnsafe(char); - field public static final org.apache.http.message.BasicHeaderValueFormatter DEFAULT; - field public static final java.lang.String SEPARATORS = " ;,:@()<>\\\"/[]?={}\t"; - field public static final java.lang.String UNSAFE_CHARS = "\"\\"; - } - - public deprecated class BasicHeaderValueParser implements org.apache.http.message.HeaderValueParser { - ctor public BasicHeaderValueParser(); - method protected org.apache.http.HeaderElement createHeaderElement(java.lang.String, java.lang.String, org.apache.http.NameValuePair[]); - method protected org.apache.http.NameValuePair createNameValuePair(java.lang.String, java.lang.String); - method public static final org.apache.http.HeaderElement[] parseElements(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.HeaderElement[] parseElements(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public static final org.apache.http.HeaderElement parseHeaderElement(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.HeaderElement parseHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public static final org.apache.http.NameValuePair parseNameValuePair(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.NameValuePair parseNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public org.apache.http.NameValuePair parseNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor, char[]); - method public static final org.apache.http.NameValuePair[] parseParameters(java.lang.String, org.apache.http.message.HeaderValueParser) throws org.apache.http.ParseException; - method public org.apache.http.NameValuePair[] parseParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - field public static final org.apache.http.message.BasicHeaderValueParser DEFAULT; - } - - public deprecated class BasicHttpEntityEnclosingRequest extends org.apache.http.message.BasicHttpRequest implements org.apache.http.HttpEntityEnclosingRequest { - ctor public BasicHttpEntityEnclosingRequest(java.lang.String, java.lang.String); - ctor public BasicHttpEntityEnclosingRequest(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - ctor public BasicHttpEntityEnclosingRequest(org.apache.http.RequestLine); - method public boolean expectContinue(); - method public org.apache.http.HttpEntity getEntity(); - method public void setEntity(org.apache.http.HttpEntity); - } - - public deprecated class BasicHttpRequest extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.HttpRequest { - ctor public BasicHttpRequest(java.lang.String, java.lang.String); - ctor public BasicHttpRequest(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - ctor public BasicHttpRequest(org.apache.http.RequestLine); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public org.apache.http.RequestLine getRequestLine(); - } - - public deprecated class BasicHttpResponse extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.HttpResponse { - ctor public BasicHttpResponse(org.apache.http.StatusLine, org.apache.http.ReasonPhraseCatalog, java.util.Locale); - ctor public BasicHttpResponse(org.apache.http.StatusLine); - ctor public BasicHttpResponse(org.apache.http.ProtocolVersion, int, java.lang.String); - method public org.apache.http.HttpEntity getEntity(); - method public java.util.Locale getLocale(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method protected java.lang.String getReason(int); - method public org.apache.http.StatusLine getStatusLine(); - method public void setEntity(org.apache.http.HttpEntity); - method public void setLocale(java.util.Locale); - method public void setReasonPhrase(java.lang.String); - method public void setStatusCode(int); - method public void setStatusLine(org.apache.http.StatusLine); - method public void setStatusLine(org.apache.http.ProtocolVersion, int); - method public void setStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - } - - public deprecated class BasicLineFormatter implements org.apache.http.message.LineFormatter { - ctor public BasicLineFormatter(); - method public org.apache.http.util.CharArrayBuffer appendProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.ProtocolVersion); - method protected void doFormatHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.Header); - method protected void doFormatRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.RequestLine); - method protected void doFormatStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.StatusLine); - method protected int estimateProtocolVersionLen(org.apache.http.ProtocolVersion); - method public static final java.lang.String formatHeader(org.apache.http.Header, org.apache.http.message.LineFormatter); - method public org.apache.http.util.CharArrayBuffer formatHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.Header); - method public static final java.lang.String formatProtocolVersion(org.apache.http.ProtocolVersion, org.apache.http.message.LineFormatter); - method public static final java.lang.String formatRequestLine(org.apache.http.RequestLine, org.apache.http.message.LineFormatter); - method public org.apache.http.util.CharArrayBuffer formatRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.RequestLine); - method public static final java.lang.String formatStatusLine(org.apache.http.StatusLine, org.apache.http.message.LineFormatter); - method public org.apache.http.util.CharArrayBuffer formatStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.StatusLine); - method protected org.apache.http.util.CharArrayBuffer initBuffer(org.apache.http.util.CharArrayBuffer); - field public static final org.apache.http.message.BasicLineFormatter DEFAULT; - } - - public deprecated class BasicLineParser implements org.apache.http.message.LineParser { - ctor public BasicLineParser(org.apache.http.ProtocolVersion); - ctor public BasicLineParser(); - method protected org.apache.http.ProtocolVersion createProtocolVersion(int, int); - method protected org.apache.http.RequestLine createRequestLine(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - method protected org.apache.http.StatusLine createStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - method public boolean hasProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public static final org.apache.http.Header parseHeader(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.Header parseHeader(org.apache.http.util.CharArrayBuffer) throws org.apache.http.ParseException; - method public static final org.apache.http.ProtocolVersion parseProtocolVersion(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.ProtocolVersion parseProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public static final org.apache.http.RequestLine parseRequestLine(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.RequestLine parseRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public static final org.apache.http.StatusLine parseStatusLine(java.lang.String, org.apache.http.message.LineParser) throws org.apache.http.ParseException; - method public org.apache.http.StatusLine parseStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method protected void skipWhitespace(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - field public static final org.apache.http.message.BasicLineParser DEFAULT; - field protected final org.apache.http.ProtocolVersion protocol; - } - - public deprecated class BasicListHeaderIterator implements org.apache.http.HeaderIterator { - ctor public BasicListHeaderIterator(java.util.List, java.lang.String); - method protected boolean filterHeader(int); - method protected int findNext(int); - method public boolean hasNext(); - method public final java.lang.Object next() throws java.util.NoSuchElementException; - method public org.apache.http.Header nextHeader() throws java.util.NoSuchElementException; - method public void remove() throws java.lang.UnsupportedOperationException; - field protected final java.util.List allHeaders; - field protected int currentIndex; - field protected java.lang.String headerName; - field protected int lastIndex; - } - - public deprecated class BasicNameValuePair implements java.lang.Cloneable org.apache.http.NameValuePair { - ctor public BasicNameValuePair(java.lang.String, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getName(); - method public java.lang.String getValue(); - } - - public deprecated class BasicRequestLine implements java.lang.Cloneable org.apache.http.RequestLine { - ctor public BasicRequestLine(java.lang.String, java.lang.String, org.apache.http.ProtocolVersion); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public java.lang.String getMethod(); - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public java.lang.String getUri(); - } - - public deprecated class BasicStatusLine implements java.lang.Cloneable org.apache.http.StatusLine { - ctor public BasicStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.ProtocolVersion getProtocolVersion(); - method public java.lang.String getReasonPhrase(); - method public int getStatusCode(); - } - - public deprecated class BasicTokenIterator implements org.apache.http.TokenIterator { - ctor public BasicTokenIterator(org.apache.http.HeaderIterator); - method protected java.lang.String createToken(java.lang.String, int, int); - method protected int findNext(int) throws org.apache.http.ParseException; - method protected int findTokenEnd(int); - method protected int findTokenSeparator(int); - method protected int findTokenStart(int); - method public boolean hasNext(); - method protected boolean isHttpSeparator(char); - method protected boolean isTokenChar(char); - method protected boolean isTokenSeparator(char); - method protected boolean isWhitespace(char); - method public final java.lang.Object next() throws java.util.NoSuchElementException, org.apache.http.ParseException; - method public java.lang.String nextToken() throws java.util.NoSuchElementException, org.apache.http.ParseException; - method public final void remove() throws java.lang.UnsupportedOperationException; - field public static final java.lang.String HTTP_SEPARATORS = " ,;=()<>@:\\\"/[]?{}\t"; - field protected java.lang.String currentHeader; - field protected java.lang.String currentToken; - field protected final org.apache.http.HeaderIterator headerIt; - field protected int searchPos; - } - - public deprecated class BufferedHeader implements java.lang.Cloneable org.apache.http.FormattedHeader { - ctor public BufferedHeader(org.apache.http.util.CharArrayBuffer) throws org.apache.http.ParseException; - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.util.CharArrayBuffer getBuffer(); - method public org.apache.http.HeaderElement[] getElements() throws org.apache.http.ParseException; - method public java.lang.String getName(); - method public java.lang.String getValue(); - method public int getValuePos(); - } - - public deprecated class HeaderGroup implements java.lang.Cloneable { - ctor public HeaderGroup(); - method public void addHeader(org.apache.http.Header); - method public void clear(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public boolean containsHeader(java.lang.String); - method public org.apache.http.message.HeaderGroup copy(); - method public org.apache.http.Header[] getAllHeaders(); - method public org.apache.http.Header getCondensedHeader(java.lang.String); - method public org.apache.http.Header getFirstHeader(java.lang.String); - method public org.apache.http.Header[] getHeaders(java.lang.String); - method public org.apache.http.Header getLastHeader(java.lang.String); - method public org.apache.http.HeaderIterator iterator(); - method public org.apache.http.HeaderIterator iterator(java.lang.String); - method public void removeHeader(org.apache.http.Header); - method public void setHeaders(org.apache.http.Header[]); - method public void updateHeader(org.apache.http.Header); - } - - public abstract deprecated interface HeaderValueFormatter { - method public abstract org.apache.http.util.CharArrayBuffer formatElements(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement[], boolean); - method public abstract org.apache.http.util.CharArrayBuffer formatHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.HeaderElement, boolean); - method public abstract org.apache.http.util.CharArrayBuffer formatNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair, boolean); - method public abstract org.apache.http.util.CharArrayBuffer formatParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.NameValuePair[], boolean); - } - - public abstract deprecated interface HeaderValueParser { - method public abstract org.apache.http.HeaderElement[] parseElements(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.HeaderElement parseHeaderElement(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.NameValuePair parseNameValuePair(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.NameValuePair[] parseParameters(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - } - - public abstract deprecated interface LineFormatter { - method public abstract org.apache.http.util.CharArrayBuffer appendProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.ProtocolVersion); - method public abstract org.apache.http.util.CharArrayBuffer formatHeader(org.apache.http.util.CharArrayBuffer, org.apache.http.Header); - method public abstract org.apache.http.util.CharArrayBuffer formatRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.RequestLine); - method public abstract org.apache.http.util.CharArrayBuffer formatStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.StatusLine); - } - - public abstract deprecated interface LineParser { - method public abstract boolean hasProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor); - method public abstract org.apache.http.Header parseHeader(org.apache.http.util.CharArrayBuffer) throws org.apache.http.ParseException; - method public abstract org.apache.http.ProtocolVersion parseProtocolVersion(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.RequestLine parseRequestLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - method public abstract org.apache.http.StatusLine parseStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException; - } - - public deprecated class ParserCursor { - ctor public ParserCursor(int, int); - method public boolean atEnd(); - method public int getLowerBound(); - method public int getPos(); - method public int getUpperBound(); - method public void updatePos(int); - } - -} - package org.apache.http.params { - public abstract deprecated class AbstractHttpParams implements org.apache.http.params.HttpParams { - ctor protected AbstractHttpParams(); - method public boolean getBooleanParameter(java.lang.String, boolean); - method public double getDoubleParameter(java.lang.String, double); - method public int getIntParameter(java.lang.String, int); - method public long getLongParameter(java.lang.String, long); - method public boolean isParameterFalse(java.lang.String); - method public boolean isParameterTrue(java.lang.String); - method public org.apache.http.params.HttpParams setBooleanParameter(java.lang.String, boolean); - method public org.apache.http.params.HttpParams setDoubleParameter(java.lang.String, double); - method public org.apache.http.params.HttpParams setIntParameter(java.lang.String, int); - method public org.apache.http.params.HttpParams setLongParameter(java.lang.String, long); - } - - public final deprecated class BasicHttpParams extends org.apache.http.params.AbstractHttpParams implements java.lang.Cloneable java.io.Serializable { - ctor public BasicHttpParams(); - method public void clear(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.params.HttpParams copy(); - method protected void copyParams(org.apache.http.params.HttpParams); - method public java.lang.Object getParameter(java.lang.String); - method public boolean isParameterSet(java.lang.String); - method public boolean isParameterSetLocally(java.lang.String); - method public boolean removeParameter(java.lang.String); - method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object); - method public void setParameters(java.lang.String[], java.lang.Object); - } - public abstract deprecated interface CoreConnectionPNames { field public static final java.lang.String CONNECTION_TIMEOUT = "http.connection.timeout"; field public static final java.lang.String MAX_HEADER_COUNT = "http.connection.max-header-count"; @@ -60357,41 +57422,6 @@ package org.apache.http.params { field public static final java.lang.String TCP_NODELAY = "http.tcp.nodelay"; } - public abstract deprecated interface CoreProtocolPNames { - field public static final java.lang.String HTTP_CONTENT_CHARSET = "http.protocol.content-charset"; - field public static final java.lang.String HTTP_ELEMENT_CHARSET = "http.protocol.element-charset"; - field public static final java.lang.String ORIGIN_SERVER = "http.origin-server"; - field public static final java.lang.String PROTOCOL_VERSION = "http.protocol.version"; - field public static final java.lang.String STRICT_TRANSFER_ENCODING = "http.protocol.strict-transfer-encoding"; - field public static final java.lang.String USER_AGENT = "http.useragent"; - field public static final java.lang.String USE_EXPECT_CONTINUE = "http.protocol.expect-continue"; - field public static final java.lang.String WAIT_FOR_CONTINUE = "http.protocol.wait-for-continue"; - } - - public final deprecated class DefaultedHttpParams extends org.apache.http.params.AbstractHttpParams { - ctor public DefaultedHttpParams(org.apache.http.params.HttpParams, org.apache.http.params.HttpParams); - method public org.apache.http.params.HttpParams copy(); - method public org.apache.http.params.HttpParams getDefaults(); - method public java.lang.Object getParameter(java.lang.String); - method public boolean removeParameter(java.lang.String); - method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object); - } - - public abstract deprecated class HttpAbstractParamBean { - ctor public HttpAbstractParamBean(org.apache.http.params.HttpParams); - field protected final org.apache.http.params.HttpParams params; - } - - public deprecated class HttpConnectionParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public HttpConnectionParamBean(org.apache.http.params.HttpParams); - method public void setConnectionTimeout(int); - method public void setLinger(int); - method public void setSoTimeout(int); - method public void setSocketBufferSize(int); - method public void setStaleCheckingEnabled(boolean); - method public void setTcpNoDelay(boolean); - } - public final deprecated class HttpConnectionParams implements org.apache.http.params.CoreConnectionPNames { method public static int getConnectionTimeout(org.apache.http.params.HttpParams); method public static int getLinger(org.apache.http.params.HttpParams); @@ -60424,359 +57454,6 @@ package org.apache.http.params { method public abstract org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object); } - public deprecated class HttpProtocolParamBean extends org.apache.http.params.HttpAbstractParamBean { - ctor public HttpProtocolParamBean(org.apache.http.params.HttpParams); - method public void setContentCharset(java.lang.String); - method public void setHttpElementCharset(java.lang.String); - method public void setUseExpectContinue(boolean); - method public void setUserAgent(java.lang.String); - method public void setVersion(org.apache.http.HttpVersion); - } - - public final deprecated class HttpProtocolParams implements org.apache.http.params.CoreProtocolPNames { - method public static java.lang.String getContentCharset(org.apache.http.params.HttpParams); - method public static java.lang.String getHttpElementCharset(org.apache.http.params.HttpParams); - method public static java.lang.String getUserAgent(org.apache.http.params.HttpParams); - method public static org.apache.http.ProtocolVersion getVersion(org.apache.http.params.HttpParams); - method public static void setContentCharset(org.apache.http.params.HttpParams, java.lang.String); - method public static void setHttpElementCharset(org.apache.http.params.HttpParams, java.lang.String); - method public static void setUseExpectContinue(org.apache.http.params.HttpParams, boolean); - method public static void setUserAgent(org.apache.http.params.HttpParams, java.lang.String); - method public static void setVersion(org.apache.http.params.HttpParams, org.apache.http.ProtocolVersion); - method public static boolean useExpectContinue(org.apache.http.params.HttpParams); - } - -} - -package org.apache.http.protocol { - - public deprecated class BasicHttpContext implements org.apache.http.protocol.HttpContext { - ctor public BasicHttpContext(); - ctor public BasicHttpContext(org.apache.http.protocol.HttpContext); - method public java.lang.Object getAttribute(java.lang.String); - method public java.lang.Object removeAttribute(java.lang.String); - method public void setAttribute(java.lang.String, java.lang.Object); - } - - public final deprecated class BasicHttpProcessor implements java.lang.Cloneable org.apache.http.protocol.HttpProcessor org.apache.http.protocol.HttpRequestInterceptorList org.apache.http.protocol.HttpResponseInterceptorList { - ctor public BasicHttpProcessor(); - method public final void addInterceptor(org.apache.http.HttpRequestInterceptor); - method public final void addInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public final void addInterceptor(org.apache.http.HttpResponseInterceptor); - method public final void addInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor); - method public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor); - method public void clearInterceptors(); - method public void clearRequestInterceptors(); - method public void clearResponseInterceptors(); - method public java.lang.Object clone() throws java.lang.CloneNotSupportedException; - method public org.apache.http.protocol.BasicHttpProcessor copy(); - method protected void copyInterceptors(org.apache.http.protocol.BasicHttpProcessor); - method public org.apache.http.HttpRequestInterceptor getRequestInterceptor(int); - method public int getRequestInterceptorCount(); - method public org.apache.http.HttpResponseInterceptor getResponseInterceptor(int); - method public int getResponseInterceptorCount(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void removeRequestInterceptorByClass(java.lang.Class); - method public void removeResponseInterceptorByClass(java.lang.Class); - method public void setInterceptors(java.util.List); - field protected java.util.List requestInterceptors; - field protected java.util.List responseInterceptors; - } - - public final deprecated class DefaultedHttpContext implements org.apache.http.protocol.HttpContext { - ctor public DefaultedHttpContext(org.apache.http.protocol.HttpContext, org.apache.http.protocol.HttpContext); - method public java.lang.Object getAttribute(java.lang.String); - method public org.apache.http.protocol.HttpContext getDefaults(); - method public java.lang.Object removeAttribute(java.lang.String); - method public void setAttribute(java.lang.String, java.lang.Object); - } - - public abstract deprecated interface ExecutionContext { - field public static final java.lang.String HTTP_CONNECTION = "http.connection"; - field public static final java.lang.String HTTP_PROXY_HOST = "http.proxy_host"; - field public static final java.lang.String HTTP_REQUEST = "http.request"; - field public static final java.lang.String HTTP_REQ_SENT = "http.request_sent"; - field public static final java.lang.String HTTP_RESPONSE = "http.response"; - field public static final java.lang.String HTTP_TARGET_HOST = "http.target_host"; - } - - public final deprecated class HTTP { - method public static boolean isWhitespace(char); - field public static final java.lang.String ASCII = "ASCII"; - field public static final java.lang.String CHARSET_PARAM = "; charset="; - field public static final java.lang.String CHUNK_CODING = "chunked"; - field public static final java.lang.String CONN_CLOSE = "Close"; - field public static final java.lang.String CONN_DIRECTIVE = "Connection"; - field public static final java.lang.String CONN_KEEP_ALIVE = "Keep-Alive"; - field public static final java.lang.String CONTENT_ENCODING = "Content-Encoding"; - field public static final java.lang.String CONTENT_LEN = "Content-Length"; - field public static final java.lang.String CONTENT_TYPE = "Content-Type"; - field public static final int CR = 13; // 0xd - field public static final java.lang.String DATE_HEADER = "Date"; - field public static final java.lang.String DEFAULT_CONTENT_CHARSET = "ISO-8859-1"; - field public static final java.lang.String DEFAULT_CONTENT_TYPE = "application/octet-stream"; - field public static final java.lang.String DEFAULT_PROTOCOL_CHARSET = "US-ASCII"; - field public static final java.lang.String EXPECT_CONTINUE = "100-continue"; - field public static final java.lang.String EXPECT_DIRECTIVE = "Expect"; - field public static final int HT = 9; // 0x9 - field public static final java.lang.String IDENTITY_CODING = "identity"; - field public static final java.lang.String ISO_8859_1 = "ISO-8859-1"; - field public static final int LF = 10; // 0xa - field public static final java.lang.String OCTET_STREAM_TYPE = "application/octet-stream"; - field public static final java.lang.String PLAIN_TEXT_TYPE = "text/plain"; - field public static final java.lang.String SERVER_HEADER = "Server"; - field public static final int SP = 32; // 0x20 - field public static final java.lang.String TARGET_HOST = "Host"; - field public static final java.lang.String TRANSFER_ENCODING = "Transfer-Encoding"; - field public static final java.lang.String USER_AGENT = "User-Agent"; - field public static final java.lang.String US_ASCII = "US-ASCII"; - field public static final java.lang.String UTF_16 = "UTF-16"; - field public static final java.lang.String UTF_8 = "UTF-8"; - } - - public abstract deprecated interface HttpContext { - method public abstract java.lang.Object getAttribute(java.lang.String); - method public abstract java.lang.Object removeAttribute(java.lang.String); - method public abstract void setAttribute(java.lang.String, java.lang.Object); - field public static final java.lang.String RESERVED_PREFIX = "http."; - } - - public deprecated class HttpDateGenerator { - ctor public HttpDateGenerator(); - method public synchronized java.lang.String getCurrentDate(); - field public static final java.util.TimeZone GMT; - field public static final java.lang.String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz"; - } - - public abstract deprecated interface HttpExpectationVerifier { - method public abstract void verify(org.apache.http.HttpRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException; - } - - public abstract deprecated interface HttpProcessor implements org.apache.http.HttpRequestInterceptor org.apache.http.HttpResponseInterceptor { - } - - public deprecated class HttpRequestExecutor { - ctor public HttpRequestExecutor(); - method protected boolean canResponseHaveBody(org.apache.http.HttpRequest, org.apache.http.HttpResponse); - method protected org.apache.http.HttpResponse doReceiveResponse(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method protected org.apache.http.HttpResponse doSendRequest(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.HttpResponse execute(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void postProcess(org.apache.http.HttpResponse, org.apache.http.protocol.HttpProcessor, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void preProcess(org.apache.http.HttpRequest, org.apache.http.protocol.HttpProcessor, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public abstract deprecated interface HttpRequestHandler { - method public abstract void handle(org.apache.http.HttpRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class HttpRequestHandlerRegistry implements org.apache.http.protocol.HttpRequestHandlerResolver { - ctor public HttpRequestHandlerRegistry(); - method public org.apache.http.protocol.HttpRequestHandler lookup(java.lang.String); - method protected deprecated boolean matchUriRequestPattern(java.lang.String, java.lang.String); - method public void register(java.lang.String, org.apache.http.protocol.HttpRequestHandler); - method public void setHandlers(java.util.Map); - method public void unregister(java.lang.String); - } - - public abstract deprecated interface HttpRequestHandlerResolver { - method public abstract org.apache.http.protocol.HttpRequestHandler lookup(java.lang.String); - } - - public abstract deprecated interface HttpRequestInterceptorList { - method public abstract void addRequestInterceptor(org.apache.http.HttpRequestInterceptor); - method public abstract void addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int); - method public abstract void clearRequestInterceptors(); - method public abstract org.apache.http.HttpRequestInterceptor getRequestInterceptor(int); - method public abstract int getRequestInterceptorCount(); - method public abstract void removeRequestInterceptorByClass(java.lang.Class); - method public abstract void setInterceptors(java.util.List); - } - - public abstract deprecated interface HttpResponseInterceptorList { - method public abstract void addResponseInterceptor(org.apache.http.HttpResponseInterceptor); - method public abstract void addResponseInterceptor(org.apache.http.HttpResponseInterceptor, int); - method public abstract void clearResponseInterceptors(); - method public abstract org.apache.http.HttpResponseInterceptor getResponseInterceptor(int); - method public abstract int getResponseInterceptorCount(); - method public abstract void removeResponseInterceptorByClass(java.lang.Class); - method public abstract void setInterceptors(java.util.List); - } - - public deprecated class HttpService { - ctor public HttpService(org.apache.http.protocol.HttpProcessor, org.apache.http.ConnectionReuseStrategy, org.apache.http.HttpResponseFactory); - method protected void doService(org.apache.http.HttpRequest, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public org.apache.http.params.HttpParams getParams(); - method protected void handleException(org.apache.http.HttpException, org.apache.http.HttpResponse); - method public void handleRequest(org.apache.http.HttpServerConnection, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - method public void setConnReuseStrategy(org.apache.http.ConnectionReuseStrategy); - method public void setExpectationVerifier(org.apache.http.protocol.HttpExpectationVerifier); - method public void setHandlerResolver(org.apache.http.protocol.HttpRequestHandlerResolver); - method public void setHttpProcessor(org.apache.http.protocol.HttpProcessor); - method public void setParams(org.apache.http.params.HttpParams); - method public void setResponseFactory(org.apache.http.HttpResponseFactory); - } - - public deprecated class RequestConnControl implements org.apache.http.HttpRequestInterceptor { - ctor public RequestConnControl(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestContent implements org.apache.http.HttpRequestInterceptor { - ctor public RequestContent(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestDate implements org.apache.http.HttpRequestInterceptor { - ctor public RequestDate(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestExpectContinue implements org.apache.http.HttpRequestInterceptor { - ctor public RequestExpectContinue(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestTargetHost implements org.apache.http.HttpRequestInterceptor { - ctor public RequestTargetHost(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class RequestUserAgent implements org.apache.http.HttpRequestInterceptor { - ctor public RequestUserAgent(); - method public void process(org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseConnControl implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseConnControl(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseContent implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseContent(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseDate implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseDate(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class ResponseServer implements org.apache.http.HttpResponseInterceptor { - ctor public ResponseServer(); - method public void process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) throws org.apache.http.HttpException, java.io.IOException; - } - - public deprecated class SyncBasicHttpContext extends org.apache.http.protocol.BasicHttpContext { - ctor public SyncBasicHttpContext(org.apache.http.protocol.HttpContext); - } - - public deprecated class UriPatternMatcher { - ctor public UriPatternMatcher(); - method public java.lang.Object lookup(java.lang.String); - method protected boolean matchUriRequestPattern(java.lang.String, java.lang.String); - method public void register(java.lang.String, java.lang.Object); - method public void setHandlers(java.util.Map); - method public void unregister(java.lang.String); - } - -} - -package org.apache.http.util { - - public final deprecated class ByteArrayBuffer { - ctor public ByteArrayBuffer(int); - method public void append(byte[], int, int); - method public void append(int); - method public void append(char[], int, int); - method public void append(org.apache.http.util.CharArrayBuffer, int, int); - method public byte[] buffer(); - method public int byteAt(int); - method public int capacity(); - method public void clear(); - method public boolean isEmpty(); - method public boolean isFull(); - method public int length(); - method public void setLength(int); - method public byte[] toByteArray(); - } - - public final deprecated class CharArrayBuffer { - ctor public CharArrayBuffer(int); - method public void append(char[], int, int); - method public void append(java.lang.String); - method public void append(org.apache.http.util.CharArrayBuffer, int, int); - method public void append(org.apache.http.util.CharArrayBuffer); - method public void append(char); - method public void append(byte[], int, int); - method public void append(org.apache.http.util.ByteArrayBuffer, int, int); - method public void append(java.lang.Object); - method public char[] buffer(); - method public int capacity(); - method public char charAt(int); - method public void clear(); - method public void ensureCapacity(int); - method public int indexOf(int, int, int); - method public int indexOf(int); - method public boolean isEmpty(); - method public boolean isFull(); - method public int length(); - method public void setLength(int); - method public java.lang.String substring(int, int); - method public java.lang.String substringTrimmed(int, int); - method public char[] toCharArray(); - } - - public final deprecated class EncodingUtils { - method public static byte[] getAsciiBytes(java.lang.String); - method public static java.lang.String getAsciiString(byte[], int, int); - method public static java.lang.String getAsciiString(byte[]); - method public static byte[] getBytes(java.lang.String, java.lang.String); - method public static java.lang.String getString(byte[], int, int, java.lang.String); - method public static java.lang.String getString(byte[], java.lang.String); - } - - public final deprecated class EntityUtils { - method public static java.lang.String getContentCharSet(org.apache.http.HttpEntity) throws org.apache.http.ParseException; - method public static byte[] toByteArray(org.apache.http.HttpEntity) throws java.io.IOException; - method public static java.lang.String toString(org.apache.http.HttpEntity, java.lang.String) throws java.io.IOException, org.apache.http.ParseException; - method public static java.lang.String toString(org.apache.http.HttpEntity) throws java.io.IOException, org.apache.http.ParseException; - } - - public final deprecated class ExceptionUtils { - method public static void initCause(java.lang.Throwable, java.lang.Throwable); - } - - public final deprecated class LangUtils { - method public static boolean equals(java.lang.Object, java.lang.Object); - method public static boolean equals(java.lang.Object[], java.lang.Object[]); - method public static int hashCode(int, int); - method public static int hashCode(int, boolean); - method public static int hashCode(int, java.lang.Object); - field public static final int HASH_OFFSET = 37; // 0x25 - field public static final int HASH_SEED = 17; // 0x11 - } - - public deprecated class VersionInfo { - ctor protected VersionInfo(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String); - method protected static final org.apache.http.util.VersionInfo fromMap(java.lang.String, java.util.Map, java.lang.ClassLoader); - method public final java.lang.String getClassloader(); - method public final java.lang.String getModule(); - method public final java.lang.String getPackage(); - method public final java.lang.String getRelease(); - method public final java.lang.String getTimestamp(); - method public static final org.apache.http.util.VersionInfo[] loadVersionInfo(java.lang.String[], java.lang.ClassLoader); - method public static final org.apache.http.util.VersionInfo loadVersionInfo(java.lang.String, java.lang.ClassLoader); - field public static final java.lang.String PROPERTY_MODULE = "info.module"; - field public static final java.lang.String PROPERTY_RELEASE = "info.release"; - field public static final java.lang.String PROPERTY_TIMESTAMP = "info.timestamp"; - field public static final java.lang.String UNAVAILABLE = "UNAVAILABLE"; - field public static final java.lang.String VERSION_PROPERTY_FILE = "version.properties"; - } - } package org.json { diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 8997671..62081ee 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -1823,16 +1823,18 @@ public class Am extends BaseCommand { showError("Error: Unable to create new stack..."); } - final StackInfo newStackInfo = mAm.getStackInfo(container.getStackId()); + final int newStackId = container.getStackId(); if (intent != null) { container.startActivity(intent); } else if (currentStackInfo.taskIds != null && currentStackInfo.taskIds.length > 1) { // Move top task over to new stack mAm.moveTaskToStack(currentStackInfo.taskIds[currentStackInfo.taskIds.length - 1], - newStackInfo.stackId, true); + newStackId, true); } + final StackInfo newStackInfo = mAm.getStackInfo(newStackId); + // Make all tasks in the stacks resizeable. for (int taskId : currentStackInfo.taskIds) { mAm.setTaskResizeable(taskId, true); diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index e95fbfc..aa1c70e 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -743,6 +743,7 @@ public class Activity extends ContextThemeWrapper final FragmentManagerImpl mFragments = new FragmentManagerImpl(); final FragmentContainer mContainer = new FragmentContainer() { @Override + @Nullable public View findViewById(int id) { return Activity.this.findViewById(id); } @@ -2068,6 +2069,7 @@ public class Activity extends ContextThemeWrapper * * @return The view if found or null otherwise. */ + @Nullable public View findViewById(int id) { return getWindow().findViewById(id); } diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index 70e6e5a..a3662b2 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -18,6 +18,7 @@ package android.app; import com.android.internal.app.WindowDecorActionBar; +import android.annotation.Nullable; import android.content.ComponentName; import android.content.Context; import android.content.ContextWrapper; @@ -476,6 +477,7 @@ public class Dialog implements DialogInterface, Window.Callback, * @param id the identifier of the view to find * @return The view with the given id or null. */ + @Nullable public View findViewById(int id) { return mWindow.findViewById(id); } diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index ab28d95..f319309 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -2008,6 +2008,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene mChildFragmentManager = new FragmentManagerImpl(); mChildFragmentManager.attachActivity(mActivity, new FragmentContainer() { @Override + @Nullable public View findViewById(int id) { if (mView == null) { throw new IllegalStateException("Fragment does not have a view"); diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index ccceef4..afdc917 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -19,6 +19,7 @@ package android.app; import android.animation.Animator; import android.animation.AnimatorInflater; import android.animation.AnimatorListenerAdapter; +import android.annotation.Nullable; import android.content.Context; import android.content.res.Configuration; import android.content.res.TypedArray; @@ -394,6 +395,7 @@ final class FragmentManagerState implements Parcelable { * Callbacks from FragmentManagerImpl to its container. */ interface FragmentContainer { + @Nullable public View findViewById(int id); public boolean hasView(); } diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl index 88b9080..5d864df 100644 --- a/core/java/android/app/INotificationManager.aidl +++ b/core/java/android/app/INotificationManager.aidl @@ -75,6 +75,7 @@ interface INotificationManager ZenModeConfig getZenModeConfig(); boolean setZenModeConfig(in ZenModeConfig config); + oneway void setZenMode(int mode); oneway void notifyConditions(String pkg, in IConditionProvider provider, in Condition[] conditions); oneway void requestZenModeConditions(in IConditionListener callback, int relevance); oneway void setZenModeCondition(in Condition condition); diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java index cf54107..479327d 100644 --- a/core/java/android/app/NotificationManager.java +++ b/core/java/android/app/NotificationManager.java @@ -27,6 +27,9 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.StrictMode; import android.os.UserHandle; +import android.service.notification.Condition; +import android.service.notification.IConditionListener; +import android.service.notification.ZenModeConfig; import android.util.Log; /** @@ -276,5 +279,53 @@ public class NotificationManager } } + /** + * @hide + */ + public void setZenMode(int mode) { + INotificationManager service = getService(); + try { + service.setZenMode(mode); + } catch (RemoteException e) { + } + } + + /** + * @hide + */ + public void requestZenModeConditions(IConditionListener listener, int relevance) { + INotificationManager service = getService(); + try { + service.requestZenModeConditions(listener, relevance); + } catch (RemoteException e) { + } + } + + /** + * @hide + */ + public void setZenModeCondition(Condition exitCondition) { + INotificationManager service = getService(); + try { + service.setZenModeCondition(exitCondition); + } catch (RemoteException e) { + } + } + + /** + * @hide + */ + public Condition getZenModeCondition() { + INotificationManager service = getService(); + try { + final ZenModeConfig config = service.getZenModeConfig(); + if (config != null) { + return config.exitCondition; + } + } catch (RemoteException e) { + } + return null; + } + private Context mContext; } diff --git a/core/java/android/app/UiModeManager.java b/core/java/android/app/UiModeManager.java index 0a255f7..0f6ce12 100644 --- a/core/java/android/app/UiModeManager.java +++ b/core/java/android/app/UiModeManager.java @@ -219,10 +219,9 @@ public class UiModeManager { } /** - * Returns the currently configured night mode. - * - * @return {@link #MODE_NIGHT_NO}, {@link #MODE_NIGHT_YES}, or - * {@link #MODE_NIGHT_AUTO}. When an error occurred -1 is returned. + * @return the currently configured night mode. May be one of + * {@link #MODE_NIGHT_NO}, {@link #MODE_NIGHT_YES}, + * {@link #MODE_NIGHT_AUTO}, or -1 on error. */ public int getNightMode() { if (mService != null) { diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java index e9cce51..381d851 100644 --- a/core/java/android/app/admin/DeviceAdminReceiver.java +++ b/core/java/android/app/admin/DeviceAdminReceiver.java @@ -170,10 +170,10 @@ public class DeviceAdminReceiver extends BroadcastReceiver { * lock task mode from an authorized package. The extra {@link #EXTRA_LOCK_TASK_PACKAGE} * will describe the authorized package using lock task mode. * - * @see DevicePolicyManager#isLockTaskPermitted(String) - * * <p>The calling device admin must be the device owner or profile * owner to receive this broadcast. + * + * @see DevicePolicyManager#isLockTaskPermitted(String) */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_LOCK_TASK_ENTERING @@ -183,20 +183,19 @@ public class DeviceAdminReceiver extends BroadcastReceiver { * Action sent to a device administrator to notify that the device is exiting * lock task mode from an authorized package. * - * @see DevicePolicyManager#isLockTaskPermitted(String) - * * <p>The calling device admin must be the device owner or profile * owner to receive this broadcast. + * + * @see DevicePolicyManager#isLockTaskPermitted(String) */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_LOCK_TASK_EXITING = "android.app.action.LOCK_TASK_EXITING"; /** - * A boolean describing whether the device is currently entering or exiting - * lock task mode. + * A string containing the name of the package entering lock task mode. * - * @see #ACTION_LOCK_TASK_CHANGED + * @see #ACTION_LOCK_TASK_ENTERING */ public static final String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE"; diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index dec2524..df620d0 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2149,17 +2149,21 @@ public abstract class Context { WIFI_PASSPOINT_SERVICE, WIFI_P2P_SERVICE, WIFI_SCANNING_SERVICE, + //@hide: WIFI_RTT_SERVICE, //@hide: ETHERNET_SERVICE, WIFI_RTT_SERVICE, NSD_SERVICE, AUDIO_SERVICE, + //@hide: FINGERPRINT_SERVICE, MEDIA_ROUTER_SERVICE, TELEPHONY_SERVICE, + TELEPHONY_SUBSCRIPTION_SERVICE, TELECOM_SERVICE, CLIPBOARD_SERVICE, INPUT_METHOD_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, APPWIDGET_SERVICE, + //@hide: VOICE_INTERACTION_MANAGER_SERVICE, //@hide: BACKUP_SERVICE, DROPBOX_SERVICE, DEVICE_POLICY_SERVICE, @@ -2171,16 +2175,23 @@ public abstract class Context { USB_SERVICE, LAUNCHER_APPS_SERVICE, //@hide: SERIAL_SERVICE, + //@hide: HDMI_CONTROL_SERVICE, INPUT_SERVICE, DISPLAY_SERVICE, - //@hide: SCHEDULING_POLICY_SERVICE, USER_SERVICE, - //@hide: APP_OPS_SERVICE + RESTRICTIONS_SERVICE, + APP_OPS_SERVICE, CAMERA_SERVICE, PRINT_SERVICE, + CONSUMER_IR_SERVICE, + //@hide: TRUST_SERVICE, + TV_INPUT_SERVICE, + //@hide: NETWORK_SCORE_SERVICE, + USAGE_STATS_SERVICE, MEDIA_SESSION_SERVICE, BATTERY_SERVICE, JOB_SCHEDULER_SERVICE, + //@hide: PERSISTENT_DATA_BLOCK_SERVICE, MEDIA_PROJECTION_SERVICE, MIDI_SERVICE, }) diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java index a386097..c2d2f65 100644 --- a/core/java/android/content/pm/RegisteredServicesCache.java +++ b/core/java/android/content/pm/RegisteredServicesCache.java @@ -27,6 +27,7 @@ import android.content.res.XmlResourceParser; import android.os.Environment; import android.os.Handler; import android.os.UserHandle; +import android.os.UserManager; import android.util.AtomicFile; import android.util.AttributeSet; import android.util.Log; @@ -47,9 +48,9 @@ import org.xmlpull.v1.XmlSerializer; import java.io.File; import java.io.FileDescriptor; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; @@ -74,6 +75,7 @@ import libcore.io.IoUtils; public abstract class RegisteredServicesCache<V> { private static final String TAG = "PackageManager"; private static final boolean DEBUG = false; + protected static final String REGISTERED_SERVICES_DIR = "registered_services"; public final Context mContext; private final String mInterfaceName; @@ -84,57 +86,67 @@ public abstract class RegisteredServicesCache<V> { private final Object mServicesLock = new Object(); @GuardedBy("mServicesLock") - private boolean mPersistentServicesFileDidNotExist; - @GuardedBy("mServicesLock") private final SparseArray<UserServices<V>> mUserServices = new SparseArray<UserServices<V>>(2); private static class UserServices<V> { @GuardedBy("mServicesLock") - public final Map<V, Integer> persistentServices = Maps.newHashMap(); + final Map<V, Integer> persistentServices = Maps.newHashMap(); + @GuardedBy("mServicesLock") + Map<V, ServiceInfo<V>> services = null; @GuardedBy("mServicesLock") - public Map<V, ServiceInfo<V>> services = null; + boolean mPersistentServicesFileDidNotExist = true; } + @GuardedBy("mServicesLock") private UserServices<V> findOrCreateUserLocked(int userId) { + return findOrCreateUserLocked(userId, true); + } + + @GuardedBy("mServicesLock") + private UserServices<V> findOrCreateUserLocked(int userId, boolean loadFromFileIfNew) { UserServices<V> services = mUserServices.get(userId); if (services == null) { services = new UserServices<V>(); mUserServices.put(userId, services); + if (loadFromFileIfNew && mSerializerAndParser != null) { + // Check if user exists and try loading data from file + // clear existing data if there was an error during migration + UserInfo user = getUser(userId); + if (user != null) { + AtomicFile file = createFileForUser(user.id); + if (file.getBaseFile().exists()) { + if (DEBUG) { + Slog.i(TAG, String.format("Loading u%s data from %s", user.id, file)); + } + InputStream is = null; + try { + is = file.openRead(); + readPersistentServicesLocked(is); + } catch (Exception e) { + Log.w(TAG, "Error reading persistent services for user " + user.id, e); + } finally { + IoUtils.closeQuietly(is); + } + } + } + } } return services; } - /** - * This file contains the list of known services. We would like to maintain this forever - * so we store it as an XML file. - */ - private final AtomicFile mPersistentServicesFile; - // the listener and handler are synchronized on "this" and must be updated together private RegisteredServicesCacheListener<V> mListener; private Handler mHandler; public RegisteredServicesCache(Context context, String interfaceName, String metaDataName, String attributeName, XmlSerializerAndParser<V> serializerAndParser) { - this(context, interfaceName, metaDataName, attributeName, serializerAndParser, - Environment.getDataDirectory()); - } - - @VisibleForTesting - protected RegisteredServicesCache(Context context, String interfaceName, String metaDataName, - String attributeName, XmlSerializerAndParser<V> serializerAndParser, File dataDir) { mContext = context; mInterfaceName = interfaceName; mMetaDataName = metaDataName; mAttributesName = attributeName; mSerializerAndParser = serializerAndParser; - File systemDir = new File(dataDir, "system"); - File syncDir = new File(systemDir, "registered_services"); - mPersistentServicesFile = new AtomicFile(new File(syncDir, interfaceName + ".xml")); - - // Load persisted services from disk - readPersistentServicesLocked(); + migrateIfNecessaryLocked(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_PACKAGE_ADDED); @@ -148,6 +160,11 @@ public abstract class RegisteredServicesCache<V> { sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE); sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); mContext.registerReceiver(mExternalReceiver, sdFilter); + + // Register for user-related events + IntentFilter userFilter = new IntentFilter(); + sdFilter.addAction(Intent.ACTION_USER_REMOVED); + mContext.registerReceiver(mUserRemovedReceiver, userFilter); } private final void handlePackageEvent(Intent intent, int userId) { @@ -199,6 +216,17 @@ public abstract class RegisteredServicesCache<V> { } }; + private final BroadcastReceiver mUserRemovedReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); + if (DEBUG) { + Slog.d(TAG, "u" + userId + " removed - cleaning up"); + } + onUserRemoved(userId); + } + }; + public void invalidateCache(int userId) { synchronized (mServicesLock) { final UserServices<V> user = findOrCreateUserLocked(userId); @@ -390,7 +418,7 @@ public abstract class RegisteredServicesCache<V> { changed = true; user.services.put(info.type, info); user.persistentServices.put(info.type, info.uid); - if (!(mPersistentServicesFileDidNotExist && firstScan)) { + if (!(user.mPersistentServicesFileDidNotExist && firstScan)) { notifyListener(info.type, userId, false /* removed */); } } else if (previousUid == info.uid) { @@ -460,7 +488,7 @@ public abstract class RegisteredServicesCache<V> { } } if (changed) { - writePersistentServicesLocked(); + writePersistentServicesLocked(user, userId); } } } @@ -542,89 +570,152 @@ public abstract class RegisteredServicesCache<V> { /** * Read all sync status back in to the initial engine state. */ - private void readPersistentServicesLocked() { - mUserServices.clear(); + private void readPersistentServicesLocked(InputStream is) + throws XmlPullParserException, IOException { + XmlPullParser parser = Xml.newPullParser(); + parser.setInput(is, null); + int eventType = parser.getEventType(); + while (eventType != XmlPullParser.START_TAG + && eventType != XmlPullParser.END_DOCUMENT) { + eventType = parser.next(); + } + String tagName = parser.getName(); + if ("services".equals(tagName)) { + eventType = parser.next(); + do { + if (eventType == XmlPullParser.START_TAG && parser.getDepth() == 2) { + tagName = parser.getName(); + if ("service".equals(tagName)) { + V service = mSerializerAndParser.createFromXml(parser); + if (service == null) { + break; + } + String uidString = parser.getAttributeValue(null, "uid"); + final int uid = Integer.parseInt(uidString); + final int userId = UserHandle.getUserId(uid); + final UserServices<V> user = findOrCreateUserLocked(userId, + false /*loadFromFileIfNew*/) ; + user.persistentServices.put(service, uid); + } + } + eventType = parser.next(); + } while (eventType != XmlPullParser.END_DOCUMENT); + } + } + + private void migrateIfNecessaryLocked() { if (mSerializerAndParser == null) { return; } - FileInputStream fis = null; - try { - mPersistentServicesFileDidNotExist = !mPersistentServicesFile.getBaseFile().exists(); - if (mPersistentServicesFileDidNotExist) { - return; - } - fis = mPersistentServicesFile.openRead(); - XmlPullParser parser = Xml.newPullParser(); - parser.setInput(fis, null); - int eventType = parser.getEventType(); - while (eventType != XmlPullParser.START_TAG - && eventType != XmlPullParser.END_DOCUMENT) { - eventType = parser.next(); - } - String tagName = parser.getName(); - if ("services".equals(tagName)) { - eventType = parser.next(); - do { - if (eventType == XmlPullParser.START_TAG && parser.getDepth() == 2) { - tagName = parser.getName(); - if ("service".equals(tagName)) { - V service = mSerializerAndParser.createFromXml(parser); - if (service == null) { - break; + File systemDir = new File(getDataDirectory(), "system"); + File syncDir = new File(systemDir, REGISTERED_SERVICES_DIR); + AtomicFile oldFile = new AtomicFile(new File(syncDir, mInterfaceName + ".xml")); + boolean oldFileExists = oldFile.getBaseFile().exists(); + + if (oldFileExists) { + File marker = new File(syncDir, mInterfaceName + ".xml.migrated"); + // if not migrated, perform the migration and add a marker + if (!marker.exists()) { + if (DEBUG) { + Slog.i(TAG, "Marker file " + marker + " does not exist - running migration"); + } + InputStream is = null; + try { + is = oldFile.openRead(); + mUserServices.clear(); + readPersistentServicesLocked(is); + } catch (Exception e) { + Log.w(TAG, "Error reading persistent services, starting from scratch", e); + } finally { + IoUtils.closeQuietly(is); + } + try { + for (UserInfo user : getUsers()) { + UserServices<V> userServices = mUserServices.get(user.id); + if (userServices != null) { + if (DEBUG) { + Slog.i(TAG, "Migrating u" + user.id + " services " + + userServices.persistentServices); } - String uidString = parser.getAttributeValue(null, "uid"); - final int uid = Integer.parseInt(uidString); - final int userId = UserHandle.getUserId(uid); - final UserServices<V> user = findOrCreateUserLocked(userId); - user.persistentServices.put(service, uid); + writePersistentServicesLocked(userServices, user.id); } } - eventType = parser.next(); - } while (eventType != XmlPullParser.END_DOCUMENT); + marker.createNewFile(); + } catch (Exception e) { + Log.w(TAG, "Migration failed", e); + } + // Migration is complete and we don't need to keep data for all users anymore, + // It will be loaded from a new location when requested + mUserServices.clear(); } - } catch (Exception e) { - Log.w(TAG, "Error reading persistent services, starting from scratch", e); - } finally { - IoUtils.closeQuietly(fis); } } /** - * Write all sync status to the sync status file. + * Writes services of a specified user to the file. */ - private void writePersistentServicesLocked() { + private void writePersistentServicesLocked(UserServices<V> user, int userId) { if (mSerializerAndParser == null) { return; } + AtomicFile atomicFile = createFileForUser(userId); FileOutputStream fos = null; try { - fos = mPersistentServicesFile.startWrite(); + fos = atomicFile.startWrite(); XmlSerializer out = new FastXmlSerializer(); out.setOutput(fos, "utf-8"); out.startDocument(null, true); out.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); out.startTag(null, "services"); - for (int i = 0; i < mUserServices.size(); i++) { - final UserServices<V> user = mUserServices.valueAt(i); - for (Map.Entry<V, Integer> service : user.persistentServices.entrySet()) { - out.startTag(null, "service"); - out.attribute(null, "uid", Integer.toString(service.getValue())); - mSerializerAndParser.writeAsXml(service.getKey(), out); - out.endTag(null, "service"); - } + for (Map.Entry<V, Integer> service : user.persistentServices.entrySet()) { + out.startTag(null, "service"); + out.attribute(null, "uid", Integer.toString(service.getValue())); + mSerializerAndParser.writeAsXml(service.getKey(), out); + out.endTag(null, "service"); } out.endTag(null, "services"); out.endDocument(); - mPersistentServicesFile.finishWrite(fos); + atomicFile.finishWrite(fos); } catch (IOException e1) { Log.w(TAG, "Error writing accounts", e1); if (fos != null) { - mPersistentServicesFile.failWrite(fos); + atomicFile.failWrite(fos); } } } @VisibleForTesting + protected void onUserRemoved(int userId) { + mUserServices.remove(userId); + } + + @VisibleForTesting + protected List<UserInfo> getUsers() { + return UserManager.get(mContext).getUsers(true); + } + + @VisibleForTesting + protected UserInfo getUser(int userId) { + return UserManager.get(mContext).getUserInfo(userId); + } + + private AtomicFile createFileForUser(int userId) { + File userDir = getUserSystemDirectory(userId); + File userFile = new File(userDir, REGISTERED_SERVICES_DIR + "/" + mInterfaceName + ".xml"); + return new AtomicFile(userFile); + } + + @VisibleForTesting + protected File getUserSystemDirectory(int userId) { + return Environment.getUserSystemDirectory(userId); + } + + @VisibleForTesting + protected File getDataDirectory() { + return Environment.getDataDirectory(); + } + + @VisibleForTesting protected Map<V, Integer> getPersistentServices(int userId) { return findOrCreateUserLocked(userId).persistentServices; } diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java index c125544..e61664c 100644 --- a/core/java/android/database/DatabaseUtils.java +++ b/core/java/android/database/DatabaseUtils.java @@ -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; @@ -416,11 +414,33 @@ public class DatabaseUtils { * @return the collation key in hex format */ public static String getHexCollationKey(String name) { - byte [] arr = getCollationKeyInBytes(name); - char[] keys = Hex.encodeHex(arr); + byte[] arr = getCollationKeyInBytes(name); + 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; diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java index fa5e9d2..39f4cca 100644 --- a/core/java/android/hardware/Sensor.java +++ b/core/java/android/hardware/Sensor.java @@ -833,4 +833,96 @@ public final class Sensor { + ", type=" + mType + ", maxRange=" + mMaxRange + ", resolution=" + mResolution + ", power=" + mPower + ", minDelay=" + mMinDelay + "}"; } + + /** + * Sets the Type associated with the sensor. + * NOTE: to be used only by native bindings in SensorManager. + * + * This allows interned static strings to be used across all representations of the Sensor. If + * a sensor type is not referenced here, it will still be interned by the native SensorManager. + * + * @return {@code true} if the StringType was successfully set, {@code false} otherwise. + */ + private boolean setType(int value) { + mType = value; + switch (mType) { + case TYPE_ACCELEROMETER: + mStringType = STRING_TYPE_ACCELEROMETER; + return true; + case TYPE_AMBIENT_TEMPERATURE: + mStringType = STRING_TYPE_AMBIENT_TEMPERATURE; + return true; + case TYPE_GAME_ROTATION_VECTOR: + mStringType = STRING_TYPE_GAME_ROTATION_VECTOR; + return true; + case TYPE_GEOMAGNETIC_ROTATION_VECTOR: + mStringType = STRING_TYPE_GEOMAGNETIC_ROTATION_VECTOR; + return true; + case TYPE_GLANCE_GESTURE: + mStringType = STRING_TYPE_GLANCE_GESTURE; + return true; + case TYPE_GRAVITY: + mStringType = STRING_TYPE_GRAVITY; + return true; + case TYPE_GYROSCOPE: + mStringType = STRING_TYPE_GYROSCOPE; + return true; + case TYPE_GYROSCOPE_UNCALIBRATED: + mStringType = STRING_TYPE_GYROSCOPE_UNCALIBRATED; + return true; + case TYPE_HEART_RATE: + mStringType = STRING_TYPE_HEART_RATE; + return true; + case TYPE_LIGHT: + mStringType = STRING_TYPE_LIGHT; + return true; + case TYPE_LINEAR_ACCELERATION: + mStringType = STRING_TYPE_LINEAR_ACCELERATION; + return true; + case TYPE_MAGNETIC_FIELD: + mStringType = STRING_TYPE_MAGNETIC_FIELD; + return true; + case TYPE_MAGNETIC_FIELD_UNCALIBRATED: + mStringType = STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED; + return true; + case TYPE_PICK_UP_GESTURE: + mStringType = STRING_TYPE_PICK_UP_GESTURE; + return true; + case TYPE_PRESSURE: + mStringType = STRING_TYPE_PRESSURE; + return true; + case TYPE_PROXIMITY: + mStringType = STRING_TYPE_PROXIMITY; + return true; + case TYPE_RELATIVE_HUMIDITY: + mStringType = STRING_TYPE_RELATIVE_HUMIDITY; + return true; + case TYPE_ROTATION_VECTOR: + mStringType = STRING_TYPE_ROTATION_VECTOR; + return true; + case TYPE_SIGNIFICANT_MOTION: + mStringType = STRING_TYPE_SIGNIFICANT_MOTION; + return true; + case TYPE_STEP_COUNTER: + mStringType = STRING_TYPE_STEP_COUNTER; + return true; + case TYPE_STEP_DETECTOR: + mStringType = STRING_TYPE_STEP_DETECTOR; + return true; + case TYPE_TILT_DETECTOR: + mStringType = SENSOR_STRING_TYPE_TILT_DETECTOR; + return true; + case TYPE_WAKE_GESTURE: + mStringType = STRING_TYPE_WAKE_GESTURE; + return true; + case TYPE_ORIENTATION: + mStringType = STRING_TYPE_ORIENTATION; + return true; + case TYPE_TEMPERATURE: + mStringType = STRING_TYPE_TEMPERATURE; + return true; + default: + return false; + } + } } diff --git a/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java b/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java index a0a0716..615b2c8 100644 --- a/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java +++ b/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java @@ -269,21 +269,23 @@ public class SurfaceTextureRenderer { throw new IllegalStateException("Illegal intermediate texture with dimension of 0"); } - // Letterbox or pillerbox output dimensions into intermediate dimensions. + // Letterbox or pillar-box output dimensions into intermediate dimensions. RectF intermediate = new RectF(/*left*/0, /*top*/0, /*right*/texWidth, /*bottom*/texHeight); RectF output = new RectF(/*left*/0, /*top*/0, /*right*/width, /*bottom*/height); android.graphics.Matrix boxingXform = new android.graphics.Matrix(); boxingXform.setRectToRect(output, intermediate, android.graphics.Matrix.ScaleToFit.CENTER); boxingXform.mapRect(output); - // Find scaling factor from pillerboxed/letterboxed output dimensions to intermediate + // Find scaling factor from pillar-boxed/letter-boxed output dimensions to intermediate // buffer dimensions. float scaleX = intermediate.width() / output.width(); float scaleY = intermediate.height() / output.height(); - // Scale opposite dimension in clip coordinates so output is letterboxed/pillerboxed into - // the intermediate dimensions (rather than vice-versa). - Matrix.scaleM(mMVPMatrix, /*offset*/0, /*x*/scaleY, /*y*/scaleX, /*z*/1); + // Intermediate texture is implicitly scaled to 'fill' the output dimensions in clip space + // coordinates in the shader. To avoid stretching, we need to scale the larger dimension + // of the intermediate buffer so that the output buffer is actually letter-boxed + // or pillar-boxed into the intermediate buffer after clipping. + Matrix.scaleM(mMVPMatrix, /*offset*/0, /*x*/scaleX, /*y*/scaleY, /*z*/1); if (DEBUG) { Log.d(TAG, "Scaling factors (S_x = " + scaleX + ",S_y = " + scaleY + ") used for " + diff --git a/core/java/android/midi/MidiDeviceServer.java b/core/java/android/midi/MidiDeviceServer.java index 7499934..4a1995f 100644 --- a/core/java/android/midi/MidiDeviceServer.java +++ b/core/java/android/midi/MidiDeviceServer.java @@ -254,12 +254,12 @@ public final class MidiDeviceServer implements Closeable { return new MidiReceiver() { @Override - public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException { + public void post(byte[] msg, int offset, int count, long timestamp) throws IOException { ArrayList<MidiInputPort> receivers = mOutputPortReceivers[portNumberF]; synchronized (receivers) { for (int i = 0; i < receivers.size(); i++) { // FIXME catch errors and remove dead ones - receivers.get(i).onPost(msg, offset, count, timestamp); + receivers.get(i).post(msg, offset, count, timestamp); } } } diff --git a/core/java/android/midi/MidiInputPort.java b/core/java/android/midi/MidiInputPort.java index 51c47dd..735c68a 100644 --- a/core/java/android/midi/MidiInputPort.java +++ b/core/java/android/midi/MidiInputPort.java @@ -50,7 +50,7 @@ public class MidiInputPort extends MidiPort implements MidiReceiver { * @param timestamp future time to post the message (based on * {@link java.lang.System#nanoTime} */ - public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException { + public void post(byte[] msg, int offset, int count, long timestamp) throws IOException { assert(offset >= 0 && count >= 0 && offset + count <= msg.length); synchronized (mBuffer) { diff --git a/core/java/android/midi/MidiManager.java b/core/java/android/midi/MidiManager.java index 8aa8395..3a0b064 100644 --- a/core/java/android/midi/MidiManager.java +++ b/core/java/android/midi/MidiManager.java @@ -66,22 +66,24 @@ public class MidiManager { } /** - * Callback interface used for clients to receive MIDI device added and removed notifications + * Callback class used for clients to receive MIDI device added and removed notifications */ - public interface DeviceCallback { + public static class DeviceCallback { /** * Called to notify when a new MIDI device has been added * * @param device a {@link MidiDeviceInfo} for the newly added device */ - void onDeviceAdded(MidiDeviceInfo device); + void onDeviceAdded(MidiDeviceInfo device) { + } /** * Called to notify when a MIDI device has been removed * * @param device a {@link MidiDeviceInfo} for the removed device */ - void onDeviceRemoved(MidiDeviceInfo device); + void onDeviceRemoved(MidiDeviceInfo device) { + } } /** diff --git a/core/java/android/midi/MidiOutputPort.java b/core/java/android/midi/MidiOutputPort.java index 332b431..b9512fd 100644 --- a/core/java/android/midi/MidiOutputPort.java +++ b/core/java/android/midi/MidiOutputPort.java @@ -65,7 +65,7 @@ public class MidiOutputPort extends MidiPort implements MidiSender { for (int i = 0; i < mReceivers.size(); i++) { MidiReceiver receiver = mReceivers.get(i); try { - receiver.onPost(buffer, offset, size, timestamp); + receiver.post(buffer, offset, size, timestamp); } catch (IOException e) { Log.e(TAG, "post failed"); deadReceivers.add(receiver); diff --git a/core/java/android/midi/MidiReceiver.java b/core/java/android/midi/MidiReceiver.java index fdfe51a..16c9bbb 100644 --- a/core/java/android/midi/MidiReceiver.java +++ b/core/java/android/midi/MidiReceiver.java @@ -32,7 +32,7 @@ public interface MidiReceiver { * The msg bytes should be copied by the receiver rather than retaining a reference * to this parameter. * Also, modifying the contents of the msg array parameter may result in other receivers - * in the same application receiving incorrect values in their onPost() method. + * in the same application receiving incorrect values in their post() method. * * @param msg a byte array containing the MIDI data * @param offset the offset of the first byte of the data in the byte array @@ -40,5 +40,5 @@ public interface MidiReceiver { * @param timestamp the timestamp of the message (based on {@link java.lang.System#nanoTime} * @throws IOException */ - public void onPost(byte[] msg, int offset, int count, long timestamp) throws IOException; + public void post(byte[] msg, int offset, int count, long timestamp) throws IOException; } diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 1a51808..808be21 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -2371,6 +2371,10 @@ public class ConnectivityManager { * The lookup key for a {@link Network} object included with the intent after * successfully finding a network for the applications request. Retrieve it with * {@link android.content.Intent#getParcelableExtra(String)}. + * <p> + * Note that if you intend to invoke (@link #setProcessDefaultNetwork(Network)) or + * {@link Network#openConnection(java.net.URL)} then you must get a + * ConnectivityManager instance before doing so. */ public static final String EXTRA_NETWORK = "android.net.extra.NETWORK"; diff --git a/core/java/android/net/ProxyInfo.java b/core/java/android/net/ProxyInfo.java index a3cad77..2c90909 100644 --- a/core/java/android/net/ProxyInfo.java +++ b/core/java/android/net/ProxyInfo.java @@ -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}. diff --git a/core/java/android/net/http/AndroidHttpClient.java b/core/java/android/net/http/AndroidHttpClient.java deleted file mode 100644 index a262076..0000000 --- a/core/java/android/net/http/AndroidHttpClient.java +++ /dev/null @@ -1,527 +0,0 @@ -/* - * Copyright (C) 2007 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 android.net.http; - -import com.android.internal.http.HttpDateTime; - -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpException; -import org.apache.http.HttpHost; -import org.apache.http.HttpRequest; -import org.apache.http.HttpRequestInterceptor; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.ResponseHandler; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.params.HttpClientParams; -import org.apache.http.client.protocol.ClientContext; -import org.apache.http.conn.ClientConnectionManager; -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.entity.AbstractHttpEntity; -import org.apache.http.entity.ByteArrayEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.impl.client.RequestWrapper; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; -import org.apache.http.protocol.BasicHttpContext; -import org.apache.http.protocol.BasicHttpProcessor; -import org.apache.http.protocol.HttpContext; - -import android.content.ContentResolver; -import android.content.Context; -import android.net.SSLCertificateSocketFactory; -import android.net.SSLSessionCache; -import android.os.Looper; -import android.util.Base64; -import android.util.Log; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; - -/** - * Implementation of the Apache {@link DefaultHttpClient} that is configured with - * reasonable default settings and registered schemes for Android. - * Don't create this directly, use the {@link #newInstance} factory method. - * - * <p>This client processes cookies but does not retain them by default. - * To retain cookies, simply add a cookie store to the HttpContext:</p> - * - * <pre>context.setAttribute(ClientContext.COOKIE_STORE, cookieStore);</pre> - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. - * The Apache HTTP client is no longer maintained and may be removed in a future - * release. Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> - * for further details. - */ -@Deprecated -public final class AndroidHttpClient implements HttpClient { - - // Gzip of data shorter than this probably won't be worthwhile - public static long DEFAULT_SYNC_MIN_GZIP_BYTES = 256; - - // Default connection and socket timeout of 60 seconds. Tweak to taste. - private static final int SOCKET_OPERATION_TIMEOUT = 60 * 1000; - - private static final String TAG = "AndroidHttpClient"; - - private static String[] textContentTypes = new String[] { - "text/", - "application/xml", - "application/json" - }; - - /** Interceptor throws an exception if the executing thread is blocked */ - private static final HttpRequestInterceptor sThreadCheckInterceptor = - new HttpRequestInterceptor() { - public void process(HttpRequest request, HttpContext context) { - // 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"); - } - } - }; - - /** - * Create a new HttpClient with reasonable defaults (which you can update). - * - * @param userAgent to report in your HTTP requests - * @param context to use for caching SSL sessions (may be null for no caching) - * @return AndroidHttpClient for you to use for all your requests. - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. See - * {@link android.net.SSLCertificateSocketFactory} for SSL cache support. If you'd - * like to set a custom useragent, please use {@link java.net.URLConnection#setRequestProperty(String, String)} - * with {@code field} set to {@code User-Agent}. - */ - @Deprecated - public static AndroidHttpClient newInstance(String userAgent, Context context) { - HttpParams params = new BasicHttpParams(); - - // Turn off stale checking. Our connections break all the time anyway, - // and it's not worth it to pay the penalty of checking every time. - HttpConnectionParams.setStaleCheckingEnabled(params, false); - - HttpConnectionParams.setConnectionTimeout(params, SOCKET_OPERATION_TIMEOUT); - HttpConnectionParams.setSoTimeout(params, SOCKET_OPERATION_TIMEOUT); - HttpConnectionParams.setSocketBufferSize(params, 8192); - - // Don't handle redirects -- return them to the caller. Our code - // often wants to re-POST after a redirect, which we must do ourselves. - HttpClientParams.setRedirecting(params, false); - - // Use a session cache for SSL sockets - SSLSessionCache sessionCache = context == null ? null : new SSLSessionCache(context); - - // Set the specified user agent and register standard protocols. - HttpProtocolParams.setUserAgent(params, userAgent); - SchemeRegistry schemeRegistry = new SchemeRegistry(); - schemeRegistry.register(new Scheme("http", - PlainSocketFactory.getSocketFactory(), 80)); - schemeRegistry.register(new Scheme("https", - SSLCertificateSocketFactory.getHttpSocketFactory( - SOCKET_OPERATION_TIMEOUT, sessionCache), 443)); - - ClientConnectionManager manager = - new ThreadSafeClientConnManager(params, schemeRegistry); - - // We use a factory method to modify superclass initialization - // parameters without the funny call-a-static-method dance. - return new AndroidHttpClient(manager, params); - } - - /** - * Create a new HttpClient with reasonable defaults (which you can update). - * @param userAgent to report in your HTTP requests. - * @return AndroidHttpClient for you to use for all your requests. - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. See - * {@link android.net.SSLCertificateSocketFactory} for SSL cache support. If you'd - * like to set a custom useragent, please use {@link java.net.URLConnection#setRequestProperty(String, String)} - * with {@code field} set to {@code User-Agent}. - */ - @Deprecated - public static AndroidHttpClient newInstance(String userAgent) { - return newInstance(userAgent, null /* session cache */); - } - - private final HttpClient delegate; - - private RuntimeException mLeakedException = new IllegalStateException( - "AndroidHttpClient created and never closed"); - - private AndroidHttpClient(ClientConnectionManager ccm, HttpParams params) { - this.delegate = new DefaultHttpClient(ccm, params) { - @Override - protected BasicHttpProcessor createHttpProcessor() { - // Add interceptor to prevent making requests from main thread. - BasicHttpProcessor processor = super.createHttpProcessor(); - processor.addRequestInterceptor(sThreadCheckInterceptor); - processor.addRequestInterceptor(new CurlLogger()); - - return processor; - } - - @Override - protected HttpContext createHttpContext() { - // Same as DefaultHttpClient.createHttpContext() minus the - // cookie store. - HttpContext context = new BasicHttpContext(); - context.setAttribute( - ClientContext.AUTHSCHEME_REGISTRY, - getAuthSchemes()); - context.setAttribute( - ClientContext.COOKIESPEC_REGISTRY, - getCookieSpecs()); - context.setAttribute( - ClientContext.CREDS_PROVIDER, - getCredentialsProvider()); - return context; - } - }; - } - - @Override - protected void finalize() throws Throwable { - super.finalize(); - if (mLeakedException != null) { - Log.e(TAG, "Leak found", mLeakedException); - mLeakedException = null; - } - } - - /** - * Modifies a request to indicate to the server that we would like a - * gzipped response. (Uses the "Accept-Encoding" HTTP header.) - * @param request the request to modify - * @see #getUngzippedContent - */ - public static void modifyRequestToAcceptGzipResponse(HttpRequest request) { - request.addHeader("Accept-Encoding", "gzip"); - } - - /** - * Gets the input stream from a response entity. If the entity is gzipped - * then this will get a stream over the uncompressed data. - * - * @param entity the entity whose content should be read - * @return the input stream to read from - * @throws IOException - */ - public static InputStream getUngzippedContent(HttpEntity entity) - throws IOException { - InputStream responseStream = entity.getContent(); - if (responseStream == null) return responseStream; - Header header = entity.getContentEncoding(); - if (header == null) return responseStream; - String contentEncoding = header.getValue(); - if (contentEncoding == null) return responseStream; - if (contentEncoding.contains("gzip")) responseStream - = new GZIPInputStream(responseStream); - return responseStream; - } - - /** - * Release resources associated with this client. You must call this, - * or significant resources (sockets and memory) may be leaked. - */ - public void close() { - if (mLeakedException != null) { - getConnectionManager().shutdown(); - mLeakedException = null; - } - } - - public HttpParams getParams() { - return delegate.getParams(); - } - - public ClientConnectionManager getConnectionManager() { - return delegate.getConnectionManager(); - } - - public HttpResponse execute(HttpUriRequest request) throws IOException { - return delegate.execute(request); - } - - public HttpResponse execute(HttpUriRequest request, HttpContext context) - throws IOException { - return delegate.execute(request, context); - } - - public HttpResponse execute(HttpHost target, HttpRequest request) - throws IOException { - return delegate.execute(target, request); - } - - public HttpResponse execute(HttpHost target, HttpRequest request, - HttpContext context) throws IOException { - return delegate.execute(target, request, context); - } - - public <T> T execute(HttpUriRequest request, - ResponseHandler<? extends T> responseHandler) - throws IOException, ClientProtocolException { - return delegate.execute(request, responseHandler); - } - - public <T> T execute(HttpUriRequest request, - ResponseHandler<? extends T> responseHandler, HttpContext context) - throws IOException, ClientProtocolException { - return delegate.execute(request, responseHandler, context); - } - - public <T> T execute(HttpHost target, HttpRequest request, - ResponseHandler<? extends T> responseHandler) throws IOException, - ClientProtocolException { - return delegate.execute(target, request, responseHandler); - } - - public <T> T execute(HttpHost target, HttpRequest request, - ResponseHandler<? extends T> responseHandler, HttpContext context) - throws IOException, ClientProtocolException { - return delegate.execute(target, request, responseHandler, context); - } - - /** - * Compress data to send to server. - * Creates a Http Entity holding the gzipped data. - * The data will not be compressed if it is too short. - * @param data The bytes to compress - * @return Entity holding the data - */ - public static AbstractHttpEntity getCompressedEntity(byte data[], ContentResolver resolver) - throws IOException { - AbstractHttpEntity entity; - if (data.length < getMinGzipSize(resolver)) { - entity = new ByteArrayEntity(data); - } else { - ByteArrayOutputStream arr = new ByteArrayOutputStream(); - OutputStream zipper = new GZIPOutputStream(arr); - zipper.write(data); - zipper.close(); - entity = new ByteArrayEntity(arr.toByteArray()); - entity.setContentEncoding("gzip"); - } - return entity; - } - - /** - * Retrieves the minimum size for compressing data. - * Shorter data will not be compressed. - */ - public static long getMinGzipSize(ContentResolver resolver) { - return DEFAULT_SYNC_MIN_GZIP_BYTES; // For now, this is just a constant. - } - - /* cURL logging support. */ - - /** - * Logging tag and level. - */ - private static class LoggingConfiguration { - - private final String tag; - private final int level; - - private LoggingConfiguration(String tag, int level) { - this.tag = tag; - this.level = level; - } - - /** - * Returns true if logging is turned on for this configuration. - */ - private boolean isLoggable() { - return Log.isLoggable(tag, level); - } - - /** - * Prints a message using this configuration. - */ - private void println(String message) { - Log.println(level, tag, message); - } - } - - /** cURL logging configuration. */ - private volatile LoggingConfiguration curlConfiguration; - - /** - * Enables cURL request logging for this client. - * - * @param name to log messages with - * @param level at which to log messages (see {@link android.util.Log}) - */ - public void enableCurlLogging(String name, int level) { - if (name == null) { - throw new NullPointerException("name"); - } - if (level < Log.VERBOSE || level > Log.ASSERT) { - throw new IllegalArgumentException("Level is out of range [" - + Log.VERBOSE + ".." + Log.ASSERT + "]"); - } - - curlConfiguration = new LoggingConfiguration(name, level); - } - - /** - * Disables cURL logging for this client. - */ - public void disableCurlLogging() { - curlConfiguration = null; - } - - /** - * Logs cURL commands equivalent to requests. - */ - private class CurlLogger implements HttpRequestInterceptor { - public void process(HttpRequest request, HttpContext context) - throws HttpException, IOException { - LoggingConfiguration configuration = curlConfiguration; - if (configuration != null - && configuration.isLoggable() - && request instanceof HttpUriRequest) { - // Never print auth token -- we used to check ro.secure=0 to - // enable that, but can't do that in unbundled code. - configuration.println(toCurl((HttpUriRequest) request, false)); - } - } - } - - /** - * Generates a cURL command equivalent to the given request. - */ - private static String toCurl(HttpUriRequest request, boolean logAuthToken) throws IOException { - StringBuilder builder = new StringBuilder(); - - builder.append("curl "); - - // add in the method - builder.append("-X "); - builder.append(request.getMethod()); - builder.append(" "); - - for (Header header: request.getAllHeaders()) { - if (!logAuthToken - && (header.getName().equals("Authorization") || - header.getName().equals("Cookie"))) { - continue; - } - builder.append("--header \""); - builder.append(header.toString().trim()); - builder.append("\" "); - } - - URI uri = request.getURI(); - - // If this is a wrapped request, use the URI from the original - // request instead. getURI() on the wrapper seems to return a - // relative URI. We want an absolute URI. - if (request instanceof RequestWrapper) { - HttpRequest original = ((RequestWrapper) request).getOriginal(); - if (original instanceof HttpUriRequest) { - uri = ((HttpUriRequest) original).getURI(); - } - } - - builder.append("\""); - builder.append(uri); - builder.append("\""); - - if (request instanceof HttpEntityEnclosingRequest) { - HttpEntityEnclosingRequest entityRequest = - (HttpEntityEnclosingRequest) request; - HttpEntity entity = entityRequest.getEntity(); - if (entity != null && entity.isRepeatable()) { - if (entity.getContentLength() < 1024) { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - entity.writeTo(stream); - - if (isBinaryContent(request)) { - String base64 = Base64.encodeToString(stream.toByteArray(), Base64.NO_WRAP); - builder.insert(0, "echo '" + base64 + "' | base64 -d > /tmp/$$.bin; "); - builder.append(" --data-binary @/tmp/$$.bin"); - } else { - String entityString = stream.toString(); - builder.append(" --data-ascii \"") - .append(entityString) - .append("\""); - } - } else { - builder.append(" [TOO MUCH DATA TO INCLUDE]"); - } - } - } - - return builder.toString(); - } - - private static boolean isBinaryContent(HttpUriRequest request) { - Header[] headers; - headers = request.getHeaders(Headers.CONTENT_ENCODING); - if (headers != null) { - for (Header header : headers) { - if ("gzip".equalsIgnoreCase(header.getValue())) { - return true; - } - } - } - - headers = request.getHeaders(Headers.CONTENT_TYPE); - if (headers != null) { - for (Header header : headers) { - for (String contentType : textContentTypes) { - if (header.getValue().startsWith(contentType)) { - return false; - } - } - } - } - return true; - } - - /** - * Returns the date of the given HTTP date string. This method can identify - * and parse the date formats emitted by common HTTP servers, such as - * <a href="http://www.ietf.org/rfc/rfc0822.txt">RFC 822</a>, - * <a href="http://www.ietf.org/rfc/rfc0850.txt">RFC 850</a>, - * <a href="http://www.ietf.org/rfc/rfc1036.txt">RFC 1036</a>, - * <a href="http://www.ietf.org/rfc/rfc1123.txt">RFC 1123</a> and - * <a href="http://www.opengroup.org/onlinepubs/007908799/xsh/asctime.html">ANSI - * C's asctime()</a>. - * - * @return the number of milliseconds since Jan. 1, 1970, midnight GMT. - * @throws IllegalArgumentException if {@code dateString} is not a date or - * of an unsupported format. - */ - public static long parseDate(String dateString) { - return HttpDateTime.parse(dateString); - } -} diff --git a/core/java/android/net/http/AndroidHttpClientConnection.java b/core/java/android/net/http/AndroidHttpClientConnection.java deleted file mode 100644 index 6d48fce..0000000 --- a/core/java/android/net/http/AndroidHttpClientConnection.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * 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 android.net.http; - -import org.apache.http.HttpConnection; -import org.apache.http.HttpClientConnection; -import org.apache.http.HttpConnectionMetrics; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpException; -import org.apache.http.HttpInetConnection; -import org.apache.http.HttpRequest; -import org.apache.http.HttpResponse; -import org.apache.http.NoHttpResponseException; -import org.apache.http.StatusLine; -import org.apache.http.entity.BasicHttpEntity; -import org.apache.http.entity.ContentLengthStrategy; -import org.apache.http.impl.HttpConnectionMetricsImpl; -import org.apache.http.impl.entity.EntitySerializer; -import org.apache.http.impl.entity.StrictContentLengthStrategy; -import org.apache.http.impl.io.ChunkedInputStream; -import org.apache.http.impl.io.ContentLengthInputStream; -import org.apache.http.impl.io.HttpRequestWriter; -import org.apache.http.impl.io.IdentityInputStream; -import org.apache.http.impl.io.SocketInputBuffer; -import org.apache.http.impl.io.SocketOutputBuffer; -import org.apache.http.io.HttpMessageWriter; -import org.apache.http.io.SessionInputBuffer; -import org.apache.http.io.SessionOutputBuffer; -import org.apache.http.message.BasicLineParser; -import org.apache.http.message.ParserCursor; -import org.apache.http.params.CoreConnectionPNames; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -import org.apache.http.ParseException; -import org.apache.http.util.CharArrayBuffer; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.Socket; -import java.net.SocketException; - -/** - * A alternate class for (@link DefaultHttpClientConnection). - * It has better performance than DefaultHttpClientConnection - * - * {@hide} - */ -public class AndroidHttpClientConnection - implements HttpInetConnection, HttpConnection { - - private SessionInputBuffer inbuffer = null; - private SessionOutputBuffer outbuffer = null; - private int maxHeaderCount; - // store CoreConnectionPNames.MAX_LINE_LENGTH for performance - private int maxLineLength; - - private final EntitySerializer entityserializer; - - private HttpMessageWriter requestWriter = null; - private HttpConnectionMetricsImpl metrics = null; - private volatile boolean open; - private Socket socket = null; - - public AndroidHttpClientConnection() { - this.entityserializer = new EntitySerializer( - new StrictContentLengthStrategy()); - } - - /** - * Bind socket and set HttpParams to AndroidHttpClientConnection - * @param socket outgoing socket - * @param params HttpParams - * @throws IOException - */ - public void bind( - final Socket socket, - final HttpParams params) throws IOException { - if (socket == null) { - throw new IllegalArgumentException("Socket may not be null"); - } - if (params == null) { - throw new IllegalArgumentException("HTTP parameters may not be null"); - } - assertNotOpen(); - socket.setTcpNoDelay(HttpConnectionParams.getTcpNoDelay(params)); - socket.setSoTimeout(HttpConnectionParams.getSoTimeout(params)); - - int linger = HttpConnectionParams.getLinger(params); - if (linger >= 0) { - socket.setSoLinger(linger > 0, linger); - } - this.socket = socket; - - int buffersize = HttpConnectionParams.getSocketBufferSize(params); - this.inbuffer = new SocketInputBuffer(socket, buffersize, params); - this.outbuffer = new SocketOutputBuffer(socket, buffersize, params); - - maxHeaderCount = params.getIntParameter( - CoreConnectionPNames.MAX_HEADER_COUNT, -1); - maxLineLength = params.getIntParameter( - CoreConnectionPNames.MAX_LINE_LENGTH, -1); - - this.requestWriter = new HttpRequestWriter(outbuffer, null, params); - - this.metrics = new HttpConnectionMetricsImpl( - inbuffer.getMetrics(), - outbuffer.getMetrics()); - - this.open = true; - } - - @Override - public String toString() { - StringBuilder buffer = new StringBuilder(); - buffer.append(getClass().getSimpleName()).append("["); - if (isOpen()) { - buffer.append(getRemotePort()); - } else { - buffer.append("closed"); - } - buffer.append("]"); - return buffer.toString(); - } - - - private void assertNotOpen() { - if (this.open) { - throw new IllegalStateException("Connection is already open"); - } - } - - private void assertOpen() { - if (!this.open) { - throw new IllegalStateException("Connection is not open"); - } - } - - public boolean isOpen() { - // to make this method useful, we want to check if the socket is connected - return (this.open && this.socket != null && this.socket.isConnected()); - } - - public InetAddress getLocalAddress() { - if (this.socket != null) { - return this.socket.getLocalAddress(); - } else { - return null; - } - } - - public int getLocalPort() { - if (this.socket != null) { - return this.socket.getLocalPort(); - } else { - return -1; - } - } - - public InetAddress getRemoteAddress() { - if (this.socket != null) { - return this.socket.getInetAddress(); - } else { - return null; - } - } - - public int getRemotePort() { - if (this.socket != null) { - return this.socket.getPort(); - } else { - return -1; - } - } - - public void setSocketTimeout(int timeout) { - assertOpen(); - if (this.socket != null) { - try { - this.socket.setSoTimeout(timeout); - } catch (SocketException ignore) { - // It is not quite clear from the original documentation if there are any - // other legitimate cases for a socket exception to be thrown when setting - // SO_TIMEOUT besides the socket being already closed - } - } - } - - public int getSocketTimeout() { - if (this.socket != null) { - try { - return this.socket.getSoTimeout(); - } catch (SocketException ignore) { - return -1; - } - } else { - return -1; - } - } - - public void shutdown() throws IOException { - this.open = false; - Socket tmpsocket = this.socket; - if (tmpsocket != null) { - tmpsocket.close(); - } - } - - public void close() throws IOException { - if (!this.open) { - return; - } - this.open = false; - doFlush(); - try { - try { - this.socket.shutdownOutput(); - } catch (IOException ignore) { - } - try { - this.socket.shutdownInput(); - } catch (IOException ignore) { - } - } catch (UnsupportedOperationException ignore) { - // if one isn't supported, the other one isn't either - } - this.socket.close(); - } - - /** - * Sends the request line and all headers over the connection. - * @param request the request whose headers to send. - * @throws HttpException - * @throws IOException - */ - public void sendRequestHeader(final HttpRequest request) - throws HttpException, IOException { - if (request == null) { - throw new IllegalArgumentException("HTTP request may not be null"); - } - assertOpen(); - this.requestWriter.write(request); - this.metrics.incrementRequestCount(); - } - - /** - * Sends the request entity over the connection. - * @param request the request whose entity to send. - * @throws HttpException - * @throws IOException - */ - public void sendRequestEntity(final HttpEntityEnclosingRequest request) - throws HttpException, IOException { - if (request == null) { - throw new IllegalArgumentException("HTTP request may not be null"); - } - assertOpen(); - if (request.getEntity() == null) { - return; - } - this.entityserializer.serialize( - this.outbuffer, - request, - request.getEntity()); - } - - protected void doFlush() throws IOException { - this.outbuffer.flush(); - } - - public void flush() throws IOException { - assertOpen(); - doFlush(); - } - - /** - * Parses the response headers and adds them to the - * given {@code headers} object, and returns the response StatusLine - * @param headers store parsed header to headers. - * @throws IOException - * @return StatusLine - * @see HttpClientConnection#receiveResponseHeader() - */ - public StatusLine parseResponseHeader(Headers headers) - throws IOException, ParseException { - assertOpen(); - - CharArrayBuffer current = new CharArrayBuffer(64); - - if (inbuffer.readLine(current) == -1) { - throw new NoHttpResponseException("The target server failed to respond"); - } - - // Create the status line from the status string - StatusLine statusline = BasicLineParser.DEFAULT.parseStatusLine( - current, new ParserCursor(0, current.length())); - - if (HttpLog.LOGV) HttpLog.v("read: " + statusline); - int statusCode = statusline.getStatusCode(); - - // Parse header body - CharArrayBuffer previous = null; - int headerNumber = 0; - while(true) { - if (current == null) { - current = new CharArrayBuffer(64); - } else { - // This must be he buffer used to parse the status - current.clear(); - } - int l = inbuffer.readLine(current); - if (l == -1 || current.length() < 1) { - break; - } - // Parse the header name and value - // Check for folded headers first - // Detect LWS-char see HTTP/1.0 or HTTP/1.1 Section 2.2 - // discussion on folded headers - char first = current.charAt(0); - if ((first == ' ' || first == '\t') && previous != null) { - // we have continuation folded header - // so append value - int start = 0; - int length = current.length(); - while (start < length) { - char ch = current.charAt(start); - if (ch != ' ' && ch != '\t') { - break; - } - start++; - } - if (maxLineLength > 0 && - previous.length() + 1 + current.length() - start > - maxLineLength) { - throw new IOException("Maximum line length limit exceeded"); - } - previous.append(' '); - previous.append(current, start, current.length() - start); - } else { - if (previous != null) { - headers.parseHeader(previous); - } - headerNumber++; - previous = current; - current = null; - } - if (maxHeaderCount > 0 && headerNumber >= maxHeaderCount) { - throw new IOException("Maximum header count exceeded"); - } - } - - if (previous != null) { - headers.parseHeader(previous); - } - - if (statusCode >= 200) { - this.metrics.incrementResponseCount(); - } - return statusline; - } - - /** - * Return the next response entity. - * @param headers contains values for parsing entity - * @see HttpClientConnection#receiveResponseEntity(HttpResponse response) - */ - public HttpEntity receiveResponseEntity(final Headers headers) { - assertOpen(); - BasicHttpEntity entity = new BasicHttpEntity(); - - long len = determineLength(headers); - if (len == ContentLengthStrategy.CHUNKED) { - entity.setChunked(true); - entity.setContentLength(-1); - entity.setContent(new ChunkedInputStream(inbuffer)); - } else if (len == ContentLengthStrategy.IDENTITY) { - entity.setChunked(false); - entity.setContentLength(-1); - entity.setContent(new IdentityInputStream(inbuffer)); - } else { - entity.setChunked(false); - entity.setContentLength(len); - entity.setContent(new ContentLengthInputStream(inbuffer, len)); - } - - String contentTypeHeader = headers.getContentType(); - if (contentTypeHeader != null) { - entity.setContentType(contentTypeHeader); - } - String contentEncodingHeader = headers.getContentEncoding(); - if (contentEncodingHeader != null) { - entity.setContentEncoding(contentEncodingHeader); - } - - return entity; - } - - private long determineLength(final Headers headers) { - long transferEncoding = headers.getTransferEncoding(); - // We use Transfer-Encoding if present and ignore Content-Length. - // RFC2616, 4.4 item number 3 - if (transferEncoding < Headers.NO_TRANSFER_ENCODING) { - return transferEncoding; - } else { - long contentlen = headers.getContentLength(); - if (contentlen > Headers.NO_CONTENT_LENGTH) { - return contentlen; - } else { - return ContentLengthStrategy.IDENTITY; - } - } - } - - /** - * Checks whether this connection has gone down. - * Network connections may get closed during some time of inactivity - * for several reasons. The next time a read is attempted on such a - * connection it will throw an IOException. - * This method tries to alleviate this inconvenience by trying to - * find out if a connection is still usable. Implementations may do - * that by attempting a read with a very small timeout. Thus this - * method may block for a small amount of time before returning a result. - * It is therefore an <i>expensive</i> operation. - * - * @return <code>true</code> if attempts to use this connection are - * likely to succeed, or <code>false</code> if they are likely - * to fail and this connection should be closed - */ - public boolean isStale() { - assertOpen(); - try { - this.inbuffer.isDataAvailable(1); - return false; - } catch (IOException ex) { - return true; - } - } - - /** - * Returns a collection of connection metrcis - * @return HttpConnectionMetrics - */ - public HttpConnectionMetrics getMetrics() { - return this.metrics; - } -} diff --git a/core/java/android/net/http/CertificateChainValidator.java b/core/java/android/net/http/CertificateChainValidator.java deleted file mode 100644 index bf3fe02..0000000 --- a/core/java/android/net/http/CertificateChainValidator.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 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 android.net.http; - -import com.android.org.conscrypt.SSLParametersImpl; -import com.android.org.conscrypt.TrustManagerImpl; - -import android.util.Slog; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.lang.reflect.Method; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLHandshakeException; -import javax.net.ssl.SSLSession; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.TrustManager; -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.X509TrustManager; - -/** - * Class responsible for all server certificate validation functionality - * - * {@hide} - */ -public class CertificateChainValidator { - private static final String TAG = "CertificateChainValidator"; - - private static class NoPreloadHolder { - /** - * The singleton instance of the certificate chain validator. - */ - private static final CertificateChainValidator sInstance = new CertificateChainValidator(); - - /** - * The singleton instance of the hostname verifier. - */ - private static final HostnameVerifier sVerifier = HttpsURLConnection - .getDefaultHostnameVerifier(); - } - - private X509TrustManager mTrustManager; - - /** - * @return The singleton instance of the certificates chain validator - */ - public static CertificateChainValidator getInstance() { - return NoPreloadHolder.sInstance; - } - - /** - * Creates a new certificate chain validator. This is a private constructor. - * If you need a Certificate chain validator, call getInstance(). - */ - private CertificateChainValidator() { - try { - TrustManagerFactory tmf = TrustManagerFactory.getInstance("X.509"); - tmf.init((KeyStore) null); - for (TrustManager tm : tmf.getTrustManagers()) { - if (tm instanceof X509TrustManager) { - mTrustManager = (X509TrustManager) tm; - } - } - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException("X.509 TrustManagerFactory must be available", e); - } catch (KeyStoreException e) { - throw new RuntimeException("X.509 TrustManagerFactory cannot be initialized", e); - } - - if (mTrustManager == null) { - throw new RuntimeException( - "None of the X.509 TrustManagers are X509TrustManager"); - } - } - - /** - * Performs the handshake and server certificates validation - * Notice a new chain will be rebuilt by tracing the issuer and subject - * before calling checkServerTrusted(). - * And if the last traced certificate is self issued and it is expired, it - * will be dropped. - * @param sslSocket The secure connection socket - * @param domain The website domain - * @return An SSL error object if there is an error and null otherwise - */ - public SslError doHandshakeAndValidateServerCertificates( - HttpsConnection connection, SSLSocket sslSocket, String domain) - throws IOException { - // get a valid SSLSession, close the socket if we fail - SSLSession sslSession = sslSocket.getSession(); - if (!sslSession.isValid()) { - closeSocketThrowException(sslSocket, "failed to perform SSL handshake"); - } - - // retrieve the chain of the server peer certificates - Certificate[] peerCertificates = - sslSocket.getSession().getPeerCertificates(); - - if (peerCertificates == null || peerCertificates.length == 0) { - closeSocketThrowException( - sslSocket, "failed to retrieve peer certificates"); - } else { - // update the SSL certificate associated with the connection - if (connection != null) { - if (peerCertificates[0] != null) { - connection.setCertificate( - new SslCertificate((X509Certificate)peerCertificates[0])); - } - } - } - - return verifyServerDomainAndCertificates((X509Certificate[]) peerCertificates, domain, "RSA"); - } - - /** - * Similar to doHandshakeAndValidateServerCertificates but exposed to JNI for use - * by Chromium HTTPS stack to validate the cert chain. - * @param certChain The bytes for certificates in ASN.1 DER encoded certificates format. - * @param domain The full website hostname and domain - * @param authType The authentication type for the cert chain - * @return An SSL error object if there is an error and null otherwise - */ - public static SslError verifyServerCertificates( - byte[][] certChain, String domain, String authType) - throws IOException { - - if (certChain == null || certChain.length == 0) { - throw new IllegalArgumentException("bad certificate chain"); - } - - X509Certificate[] serverCertificates = new X509Certificate[certChain.length]; - - try { - CertificateFactory cf = CertificateFactory.getInstance("X.509"); - for (int i = 0; i < certChain.length; ++i) { - serverCertificates[i] = (X509Certificate) cf.generateCertificate( - new ByteArrayInputStream(certChain[i])); - } - } catch (CertificateException e) { - throw new IOException("can't read certificate", e); - } - - return verifyServerDomainAndCertificates(serverCertificates, domain, authType); - } - - /** - * Handles updates to credential storage. - */ - public static void handleTrustStorageUpdate() { - TrustManagerFactory tmf; - try { - tmf = TrustManagerFactory.getInstance("X.509"); - tmf.init((KeyStore) null); - } catch (NoSuchAlgorithmException e) { - Slog.w(TAG, "Couldn't find default X.509 TrustManagerFactory"); - return; - } catch (KeyStoreException e) { - Slog.w(TAG, "Couldn't initialize default X.509 TrustManagerFactory", e); - return; - } - - TrustManager[] tms = tmf.getTrustManagers(); - boolean sentUpdate = false; - for (TrustManager tm : tms) { - try { - Method updateMethod = tm.getClass().getDeclaredMethod("handleTrustStorageUpdate"); - updateMethod.setAccessible(true); - updateMethod.invoke(tm); - sentUpdate = true; - } catch (Exception e) { - } - } - if (!sentUpdate) { - Slog.w(TAG, "Didn't find a TrustManager to handle CA list update"); - } - } - - /** - * Common code of doHandshakeAndValidateServerCertificates and verifyServerCertificates. - * Calls DomainNamevalidator to verify the domain, and TrustManager to verify the certs. - * @param chain the cert chain in X509 cert format. - * @param domain The full website hostname and domain - * @param authType The authentication type for the cert chain - * @return An SSL error object if there is an error and null otherwise - */ - private static SslError verifyServerDomainAndCertificates( - X509Certificate[] chain, String domain, String authType) - throws IOException { - // check if the first certificate in the chain is for this site - X509Certificate currCertificate = chain[0]; - if (currCertificate == null) { - throw new IllegalArgumentException("certificate for this site is null"); - } - - boolean valid = domain != null - && !domain.isEmpty() - && NoPreloadHolder.sVerifier.verify(domain, - new DelegatingSSLSession.CertificateWrap(currCertificate)); - if (!valid) { - if (HttpLog.LOGV) { - HttpLog.v("certificate not for this host: " + domain); - } - return new SslError(SslError.SSL_IDMISMATCH, currCertificate); - } - - try { - X509TrustManager x509TrustManager = SSLParametersImpl.getDefaultX509TrustManager(); - if (x509TrustManager instanceof TrustManagerImpl) { - TrustManagerImpl trustManager = (TrustManagerImpl) x509TrustManager; - trustManager.checkServerTrusted(chain, authType, domain); - } else { - x509TrustManager.checkServerTrusted(chain, authType); - } - return null; // No errors. - } catch (GeneralSecurityException e) { - if (HttpLog.LOGV) { - HttpLog.v("failed to validate the certificate chain, error: " + - e.getMessage()); - } - return new SslError(SslError.SSL_UNTRUSTED, currCertificate); - } - } - - /** - * Returns the platform default {@link X509TrustManager}. - */ - private X509TrustManager getTrustManager() { - return mTrustManager; - } - - private void closeSocketThrowException( - SSLSocket socket, String errorMessage, String defaultErrorMessage) - throws IOException { - closeSocketThrowException( - socket, errorMessage != null ? errorMessage : defaultErrorMessage); - } - - private void closeSocketThrowException(SSLSocket socket, - String errorMessage) throws IOException { - if (HttpLog.LOGV) { - HttpLog.v("validation error: " + errorMessage); - } - - if (socket != null) { - SSLSession session = socket.getSession(); - if (session != null) { - session.invalidate(); - } - - socket.close(); - } - - throw new SSLHandshakeException(errorMessage); - } -} diff --git a/core/java/android/net/http/Connection.java b/core/java/android/net/http/Connection.java deleted file mode 100644 index 831bd0e..0000000 --- a/core/java/android/net/http/Connection.java +++ /dev/null @@ -1,575 +0,0 @@ -/* - * Copyright (C) 2007 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 android.net.http; - -import android.content.Context; -import android.os.SystemClock; - -import java.io.IOException; -import java.net.UnknownHostException; -import java.util.LinkedList; - -import javax.net.ssl.SSLHandshakeException; - -import org.apache.http.ConnectionReuseStrategy; -import org.apache.http.HttpEntity; -import org.apache.http.HttpException; -import org.apache.http.HttpHost; -import org.apache.http.HttpVersion; -import org.apache.http.ParseException; -import org.apache.http.ProtocolVersion; -import org.apache.http.protocol.ExecutionContext; -import org.apache.http.protocol.HttpContext; -import org.apache.http.protocol.BasicHttpContext; - -/** - * {@hide} - */ -abstract class Connection { - - /** - * Allow a TCP connection 60 idle seconds before erroring out - */ - static final int SOCKET_TIMEOUT = 60000; - - private static final int SEND = 0; - private static final int READ = 1; - private static final int DRAIN = 2; - private static final int DONE = 3; - private static final String[] states = {"SEND", "READ", "DRAIN", "DONE"}; - - Context mContext; - - /** The low level connection */ - protected AndroidHttpClientConnection mHttpClientConnection = null; - - /** - * The server SSL certificate associated with this connection - * (null if the connection is not secure) - * It would be nice to store the whole certificate chain, but - * we want to keep things as light-weight as possible - */ - protected SslCertificate mCertificate = null; - - /** - * The host this connection is connected to. If using proxy, - * this is set to the proxy address - */ - HttpHost mHost; - - /** true if the connection can be reused for sending more requests */ - private boolean mCanPersist; - - /** context required by ConnectionReuseStrategy. */ - private HttpContext mHttpContext; - - /** set when cancelled */ - private static int STATE_NORMAL = 0; - private static int STATE_CANCEL_REQUESTED = 1; - private int mActive = STATE_NORMAL; - - /** The number of times to try to re-connect (if connect fails). */ - private final static int RETRY_REQUEST_LIMIT = 2; - - private static final int MIN_PIPE = 2; - private static final int MAX_PIPE = 3; - - /** - * Doesn't seem to exist anymore in the new HTTP client, so copied here. - */ - private static final String HTTP_CONNECTION = "http.connection"; - - RequestFeeder mRequestFeeder; - - /** - * Buffer for feeding response blocks to webkit. One block per - * connection reduces memory churn. - */ - private byte[] mBuf; - - protected Connection(Context context, HttpHost host, - RequestFeeder requestFeeder) { - mContext = context; - mHost = host; - mRequestFeeder = requestFeeder; - - mCanPersist = false; - mHttpContext = new BasicHttpContext(null); - } - - HttpHost getHost() { - return mHost; - } - - /** - * connection factory: returns an HTTP or HTTPS connection as - * necessary - */ - static Connection getConnection( - Context context, HttpHost host, HttpHost proxy, - RequestFeeder requestFeeder) { - - if (host.getSchemeName().equals("http")) { - return new HttpConnection(context, host, requestFeeder); - } - - // Otherwise, default to https - return new HttpsConnection(context, host, proxy, requestFeeder); - } - - /** - * @return The server SSL certificate associated with this - * connection (null if the connection is not secure) - */ - /* package */ SslCertificate getCertificate() { - return mCertificate; - } - - /** - * Close current network connection - * Note: this runs in non-network thread - */ - void cancel() { - mActive = STATE_CANCEL_REQUESTED; - closeConnection(); - if (HttpLog.LOGV) HttpLog.v( - "Connection.cancel(): connection closed " + mHost); - } - - /** - * Process requests in queue - * pipelines requests - */ - void processRequests(Request firstRequest) { - Request req = null; - boolean empty; - int error = EventHandler.OK; - Exception exception = null; - - LinkedList<Request> pipe = new LinkedList<Request>(); - - int minPipe = MIN_PIPE, maxPipe = MAX_PIPE; - int state = SEND; - - while (state != DONE) { - if (HttpLog.LOGV) HttpLog.v( - states[state] + " pipe " + pipe.size()); - - /* If a request was cancelled, give other cancel requests - some time to go through so we don't uselessly restart - connections */ - if (mActive == STATE_CANCEL_REQUESTED) { - try { - Thread.sleep(100); - } catch (InterruptedException x) { /* ignore */ } - mActive = STATE_NORMAL; - } - - switch (state) { - case SEND: { - if (pipe.size() == maxPipe) { - state = READ; - break; - } - /* get a request */ - if (firstRequest == null) { - req = mRequestFeeder.getRequest(mHost); - } else { - req = firstRequest; - firstRequest = null; - } - if (req == null) { - state = DRAIN; - break; - } - req.setConnection(this); - - /* Don't work on cancelled requests. */ - if (req.mCancelled) { - if (HttpLog.LOGV) HttpLog.v( - "processRequests(): skipping cancelled request " - + req); - req.complete(); - break; - } - - if (mHttpClientConnection == null || - !mHttpClientConnection.isOpen()) { - /* If this call fails, the address is bad or - the net is down. Punt for now. - - FIXME: blow out entire queue here on - connection failure if net up? */ - - if (!openHttpConnection(req)) { - state = DONE; - break; - } - } - - /* we have a connection, let the event handler - * know of any associated certificate, - * potentially none. - */ - req.mEventHandler.certificate(mCertificate); - - try { - /* FIXME: don't increment failure count if old - connection? There should not be a penalty for - attempting to reuse an old connection */ - req.sendRequest(mHttpClientConnection); - } catch (HttpException e) { - exception = e; - error = EventHandler.ERROR; - } catch (IOException e) { - exception = e; - error = EventHandler.ERROR_IO; - } catch (IllegalStateException e) { - exception = e; - error = EventHandler.ERROR_IO; - } - if (exception != null) { - if (httpFailure(req, error, exception) && - !req.mCancelled) { - /* retry request if not permanent failure - or cancelled */ - pipe.addLast(req); - } - exception = null; - state = clearPipe(pipe) ? DONE : SEND; - minPipe = maxPipe = 1; - break; - } - - pipe.addLast(req); - if (!mCanPersist) state = READ; - break; - - } - case DRAIN: - case READ: { - empty = !mRequestFeeder.haveRequest(mHost); - int pipeSize = pipe.size(); - if (state != DRAIN && pipeSize < minPipe && - !empty && mCanPersist) { - state = SEND; - break; - } else if (pipeSize == 0) { - /* Done if no other work to do */ - state = empty ? DONE : SEND; - break; - } - - req = (Request)pipe.removeFirst(); - if (HttpLog.LOGV) HttpLog.v( - "processRequests() reading " + req); - - try { - req.readResponse(mHttpClientConnection); - } catch (ParseException e) { - exception = e; - error = EventHandler.ERROR_IO; - } catch (IOException e) { - exception = e; - error = EventHandler.ERROR_IO; - } catch (IllegalStateException e) { - exception = e; - error = EventHandler.ERROR_IO; - } - if (exception != null) { - if (httpFailure(req, error, exception) && - !req.mCancelled) { - /* retry request if not permanent failure - or cancelled */ - req.reset(); - pipe.addFirst(req); - } - exception = null; - mCanPersist = false; - } - if (!mCanPersist) { - if (HttpLog.LOGV) HttpLog.v( - "processRequests(): no persist, closing " + - mHost); - - closeConnection(); - - mHttpContext.removeAttribute(HTTP_CONNECTION); - clearPipe(pipe); - minPipe = maxPipe = 1; - state = SEND; - } - break; - } - } - } - } - - /** - * After a send/receive failure, any pipelined requests must be - * cleared back to the mRequest queue - * @return true if mRequests is empty after pipe cleared - */ - private boolean clearPipe(LinkedList<Request> pipe) { - boolean empty = true; - if (HttpLog.LOGV) HttpLog.v( - "Connection.clearPipe(): clearing pipe " + pipe.size()); - synchronized (mRequestFeeder) { - Request tReq; - while (!pipe.isEmpty()) { - tReq = (Request)pipe.removeLast(); - if (HttpLog.LOGV) HttpLog.v( - "clearPipe() adding back " + mHost + " " + tReq); - mRequestFeeder.requeueRequest(tReq); - empty = false; - } - if (empty) empty = !mRequestFeeder.haveRequest(mHost); - } - return empty; - } - - /** - * @return true on success - */ - private boolean openHttpConnection(Request req) { - - long now = SystemClock.uptimeMillis(); - int error = EventHandler.OK; - Exception exception = null; - - try { - // reset the certificate to null before opening a connection - mCertificate = null; - mHttpClientConnection = openConnection(req); - if (mHttpClientConnection != null) { - mHttpClientConnection.setSocketTimeout(SOCKET_TIMEOUT); - mHttpContext.setAttribute(HTTP_CONNECTION, - mHttpClientConnection); - } else { - // we tried to do SSL tunneling, failed, - // and need to drop the request; - // we have already informed the handler - req.mFailCount = RETRY_REQUEST_LIMIT; - return false; - } - } catch (UnknownHostException e) { - if (HttpLog.LOGV) HttpLog.v("Failed to open connection"); - error = EventHandler.ERROR_LOOKUP; - exception = e; - } catch (IllegalArgumentException e) { - if (HttpLog.LOGV) HttpLog.v("Illegal argument exception"); - error = EventHandler.ERROR_CONNECT; - req.mFailCount = RETRY_REQUEST_LIMIT; - exception = e; - } catch (SSLConnectionClosedByUserException e) { - // hack: if we have an SSL connection failure, - // we don't want to reconnect - req.mFailCount = RETRY_REQUEST_LIMIT; - // no error message - return false; - } catch (SSLHandshakeException e) { - // hack: if we have an SSL connection failure, - // we don't want to reconnect - req.mFailCount = RETRY_REQUEST_LIMIT; - if (HttpLog.LOGV) HttpLog.v( - "SSL exception performing handshake"); - error = EventHandler.ERROR_FAILED_SSL_HANDSHAKE; - exception = e; - } catch (IOException e) { - error = EventHandler.ERROR_CONNECT; - exception = e; - } - - if (HttpLog.LOGV) { - long now2 = SystemClock.uptimeMillis(); - HttpLog.v("Connection.openHttpConnection() " + - (now2 - now) + " " + mHost); - } - - if (error == EventHandler.OK) { - return true; - } else { - if (req.mFailCount < RETRY_REQUEST_LIMIT) { - // requeue - mRequestFeeder.requeueRequest(req); - req.mFailCount++; - } else { - httpFailure(req, error, exception); - } - return error == EventHandler.OK; - } - } - - /** - * Helper. Calls the mEventHandler's error() method only if - * request failed permanently. Increments mFailcount on failure. - * - * Increments failcount only if the network is believed to be - * connected - * - * @return true if request can be retried (less than - * RETRY_REQUEST_LIMIT failures have occurred). - */ - private boolean httpFailure(Request req, int errorId, Exception e) { - boolean ret = true; - - // e.printStackTrace(); - if (HttpLog.LOGV) HttpLog.v( - "httpFailure() ******* " + e + " count " + req.mFailCount + - " " + mHost + " " + req.getUri()); - - if (++req.mFailCount >= RETRY_REQUEST_LIMIT) { - ret = false; - String error; - if (errorId < 0) { - error = getEventHandlerErrorString(errorId); - } else { - Throwable cause = e.getCause(); - error = cause != null ? cause.toString() : e.getMessage(); - } - req.mEventHandler.error(errorId, error); - req.complete(); - } - - closeConnection(); - mHttpContext.removeAttribute(HTTP_CONNECTION); - - return ret; - } - - private static String getEventHandlerErrorString(int errorId) { - switch (errorId) { - case EventHandler.OK: - return "OK"; - - case EventHandler.ERROR: - return "ERROR"; - - case EventHandler.ERROR_LOOKUP: - return "ERROR_LOOKUP"; - - case EventHandler.ERROR_UNSUPPORTED_AUTH_SCHEME: - return "ERROR_UNSUPPORTED_AUTH_SCHEME"; - - case EventHandler.ERROR_AUTH: - return "ERROR_AUTH"; - - case EventHandler.ERROR_PROXYAUTH: - return "ERROR_PROXYAUTH"; - - case EventHandler.ERROR_CONNECT: - return "ERROR_CONNECT"; - - case EventHandler.ERROR_IO: - return "ERROR_IO"; - - case EventHandler.ERROR_TIMEOUT: - return "ERROR_TIMEOUT"; - - case EventHandler.ERROR_REDIRECT_LOOP: - return "ERROR_REDIRECT_LOOP"; - - case EventHandler.ERROR_UNSUPPORTED_SCHEME: - return "ERROR_UNSUPPORTED_SCHEME"; - - case EventHandler.ERROR_FAILED_SSL_HANDSHAKE: - return "ERROR_FAILED_SSL_HANDSHAKE"; - - case EventHandler.ERROR_BAD_URL: - return "ERROR_BAD_URL"; - - case EventHandler.FILE_ERROR: - return "FILE_ERROR"; - - case EventHandler.FILE_NOT_FOUND_ERROR: - return "FILE_NOT_FOUND_ERROR"; - - case EventHandler.TOO_MANY_REQUESTS_ERROR: - return "TOO_MANY_REQUESTS_ERROR"; - - default: - return "UNKNOWN_ERROR"; - } - } - - HttpContext getHttpContext() { - return mHttpContext; - } - - /** - * Use same logic as ConnectionReuseStrategy - * @see ConnectionReuseStrategy - */ - private boolean keepAlive(HttpEntity entity, - ProtocolVersion ver, int connType, final HttpContext context) { - org.apache.http.HttpConnection conn = (org.apache.http.HttpConnection) - context.getAttribute(ExecutionContext.HTTP_CONNECTION); - - if (conn != null && !conn.isOpen()) - return false; - // do NOT check for stale connection, that is an expensive operation - - if (entity != null) { - if (entity.getContentLength() < 0) { - if (!entity.isChunked() || ver.lessEquals(HttpVersion.HTTP_1_0)) { - // if the content length is not known and is not chunk - // encoded, the connection cannot be reused - return false; - } - } - } - // Check for 'Connection' directive - if (connType == Headers.CONN_CLOSE) { - return false; - } else if (connType == Headers.CONN_KEEP_ALIVE) { - return true; - } - // Resorting to protocol version default close connection policy - return !ver.lessEquals(HttpVersion.HTTP_1_0); - } - - void setCanPersist(HttpEntity entity, ProtocolVersion ver, int connType) { - mCanPersist = keepAlive(entity, ver, connType, mHttpContext); - } - - void setCanPersist(boolean canPersist) { - mCanPersist = canPersist; - } - - boolean getCanPersist() { - return mCanPersist; - } - - /** typically http or https... set by subclass */ - abstract String getScheme(); - abstract void closeConnection(); - abstract AndroidHttpClientConnection openConnection(Request req) throws IOException; - - /** - * Prints request queue to log, for debugging. - * returns request count - */ - public synchronized String toString() { - return mHost.toString(); - } - - byte[] getBuf() { - if (mBuf == null) mBuf = new byte[8192]; - return mBuf; - } - -} diff --git a/core/java/android/net/http/ConnectionThread.java b/core/java/android/net/http/ConnectionThread.java deleted file mode 100644 index d825530..0000000 --- a/core/java/android/net/http/ConnectionThread.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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 android.net.http; - -import android.content.Context; -import android.os.SystemClock; - -import java.lang.Thread; - -/** - * {@hide} - */ -class ConnectionThread extends Thread { - - static final int WAIT_TIMEOUT = 5000; - static final int WAIT_TICK = 1000; - - // Performance probe - long mCurrentThreadTime; - long mTotalThreadTime; - - private boolean mWaiting; - private volatile boolean mRunning = true; - private Context mContext; - private RequestQueue.ConnectionManager mConnectionManager; - private RequestFeeder mRequestFeeder; - - private int mId; - Connection mConnection; - - ConnectionThread(Context context, - int id, - RequestQueue.ConnectionManager connectionManager, - RequestFeeder requestFeeder) { - super(); - mContext = context; - setName("http" + id); - mId = id; - mConnectionManager = connectionManager; - mRequestFeeder = requestFeeder; - } - - void requestStop() { - synchronized (mRequestFeeder) { - mRunning = false; - mRequestFeeder.notify(); - } - } - - /** - * Loop until app shutdown. Runs connections in priority - * order. - */ - public void run() { - android.os.Process.setThreadPriority( - android.os.Process.THREAD_PRIORITY_DEFAULT + - android.os.Process.THREAD_PRIORITY_LESS_FAVORABLE); - - // these are used to get performance data. When it is not in the timing, - // mCurrentThreadTime is 0. When it starts timing, mCurrentThreadTime is - // first set to -1, it will be set to the current thread time when the - // next request starts. - mCurrentThreadTime = 0; - mTotalThreadTime = 0; - - while (mRunning) { - if (mCurrentThreadTime == -1) { - mCurrentThreadTime = SystemClock.currentThreadTimeMillis(); - } - - Request request; - - /* Get a request to process */ - request = mRequestFeeder.getRequest(); - - /* wait for work */ - if (request == null) { - synchronized(mRequestFeeder) { - if (HttpLog.LOGV) HttpLog.v("ConnectionThread: Waiting for work"); - mWaiting = true; - try { - mRequestFeeder.wait(); - } catch (InterruptedException e) { - } - mWaiting = false; - if (mCurrentThreadTime != 0) { - mCurrentThreadTime = SystemClock - .currentThreadTimeMillis(); - } - } - } else { - if (HttpLog.LOGV) HttpLog.v("ConnectionThread: new request " + - request.mHost + " " + request ); - - mConnection = mConnectionManager.getConnection(mContext, - request.mHost); - mConnection.processRequests(request); - if (mConnection.getCanPersist()) { - if (!mConnectionManager.recycleConnection(mConnection)) { - mConnection.closeConnection(); - } - } else { - mConnection.closeConnection(); - } - mConnection = null; - - if (mCurrentThreadTime > 0) { - long start = mCurrentThreadTime; - mCurrentThreadTime = SystemClock.currentThreadTimeMillis(); - mTotalThreadTime += mCurrentThreadTime - start; - } - } - - } - } - - public synchronized String toString() { - String con = mConnection == null ? "" : mConnection.toString(); - String active = mWaiting ? "w" : "a"; - return "cid " + mId + " " + active + " " + con; - } - -} diff --git a/core/java/android/net/http/DelegatingSSLSession.java b/core/java/android/net/http/DelegatingSSLSession.java deleted file mode 100644 index 98fbe21..0000000 --- a/core/java/android/net/http/DelegatingSSLSession.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2014 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 android.net.http; - -import java.security.Principal; -import java.security.cert.Certificate; -import java.security.cert.X509Certificate; - -import javax.net.ssl.SSLPeerUnverifiedException; -import javax.net.ssl.SSLSession; -import javax.net.ssl.SSLSessionContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.X509TrustManager; - -/** - * This is only used when a {@code certificate} is available but usage - * requires a {@link SSLSession}. - * - * @hide - */ -public class DelegatingSSLSession implements SSLSession { - protected DelegatingSSLSession() { - } - - public static class CertificateWrap extends DelegatingSSLSession { - private final Certificate mCertificate; - - public CertificateWrap(Certificate certificate) { - mCertificate = certificate; - } - - @Override - public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException { - return new Certificate[] { mCertificate }; - } - } - - - @Override - public int getApplicationBufferSize() { - throw new UnsupportedOperationException(); - } - - @Override - public String getCipherSuite() { - throw new UnsupportedOperationException(); - } - - @Override - public long getCreationTime() { - throw new UnsupportedOperationException(); - } - - @Override - public byte[] getId() { - throw new UnsupportedOperationException(); - } - - @Override - public long getLastAccessedTime() { - throw new UnsupportedOperationException(); - } - - @Override - public Certificate[] getLocalCertificates() { - throw new UnsupportedOperationException(); - } - - @Override - public Principal getLocalPrincipal() { - throw new UnsupportedOperationException(); - } - - @Override - public int getPacketBufferSize() { - throw new UnsupportedOperationException(); - } - - @Override - public javax.security.cert.X509Certificate[] getPeerCertificateChain() - throws SSLPeerUnverifiedException { - throw new UnsupportedOperationException(); - } - - @Override - public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException { - throw new UnsupportedOperationException(); - } - - @Override - public String getPeerHost() { - throw new UnsupportedOperationException(); - } - - @Override - public int getPeerPort() { - throw new UnsupportedOperationException(); - } - - @Override - public Principal getPeerPrincipal() throws SSLPeerUnverifiedException { - throw new UnsupportedOperationException(); - } - - @Override - public String getProtocol() { - throw new UnsupportedOperationException(); - } - - @Override - public SSLSessionContext getSessionContext() { - throw new UnsupportedOperationException(); - } - - @Override - public Object getValue(String name) { - throw new UnsupportedOperationException(); - } - - @Override - public String[] getValueNames() { - throw new UnsupportedOperationException(); - } - - @Override - public void invalidate() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isValid() { - throw new UnsupportedOperationException(); - } - - @Override - public void putValue(String name, Object value) { - throw new UnsupportedOperationException(); - } - - @Override - public void removeValue(String name) { - throw new UnsupportedOperationException(); - } -} diff --git a/core/java/android/net/http/EventHandler.java b/core/java/android/net/http/EventHandler.java deleted file mode 100644 index 3fd471d..0000000 --- a/core/java/android/net/http/EventHandler.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2006 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 android.net.http; - - -/** - * Callbacks in this interface are made as an HTTP request is - * processed. The normal order of callbacks is status(), headers(), - * then multiple data() then endData(). handleSslErrorRequest(), if - * there is an SSL certificate error. error() can occur anywhere - * in the transaction. - * - * {@hide} - */ - -public interface EventHandler { - - /** - * Error codes used in the error() callback. Positive error codes - * are reserved for codes sent by http servers. Negative error - * codes are connection/parsing failures, etc. - */ - - /** Success */ - public static final int OK = 0; - /** Generic error */ - public static final int ERROR = -1; - /** Server or proxy hostname lookup failed */ - public static final int ERROR_LOOKUP = -2; - /** Unsupported authentication scheme (ie, not basic or digest) */ - public static final int ERROR_UNSUPPORTED_AUTH_SCHEME = -3; - /** User authentication failed on server */ - public static final int ERROR_AUTH = -4; - /** User authentication failed on proxy */ - public static final int ERROR_PROXYAUTH = -5; - /** Could not connect to server */ - public static final int ERROR_CONNECT = -6; - /** Failed to write to or read from server */ - public static final int ERROR_IO = -7; - /** Connection timed out */ - public static final int ERROR_TIMEOUT = -8; - /** Too many redirects */ - public static final int ERROR_REDIRECT_LOOP = -9; - /** Unsupported URI scheme (ie, not http, https, etc) */ - public static final int ERROR_UNSUPPORTED_SCHEME = -10; - /** Failed to perform SSL handshake */ - public static final int ERROR_FAILED_SSL_HANDSHAKE = -11; - /** Bad URL */ - public static final int ERROR_BAD_URL = -12; - /** Generic file error for file:/// loads */ - public static final int FILE_ERROR = -13; - /** File not found error for file:/// loads */ - public static final int FILE_NOT_FOUND_ERROR = -14; - /** Too many requests queued */ - public static final int TOO_MANY_REQUESTS_ERROR = -15; - - /** - * Called after status line has been sucessfully processed. - * @param major_version HTTP version advertised by server. major - * is the part before the "." - * @param minor_version HTTP version advertised by server. minor - * is the part after the "." - * @param code HTTP Status code. See RFC 2616. - * @param reason_phrase Textual explanation sent by server - */ - public void status(int major_version, - int minor_version, - int code, - String reason_phrase); - - /** - * Called after all headers are successfully processed. - */ - public void headers(Headers headers); - - /** - * An array containing all or part of the http body as read from - * the server. - * @param data A byte array containing the content - * @param len The length of valid content in data - * - * Note: chunked and compressed encodings are handled within - * android.net.http. Decoded data is passed through this - * interface. - */ - public void data(byte[] data, int len); - - /** - * Called when the document is completely read. No more data() - * callbacks will be made after this call - */ - public void endData(); - - /** - * SSL certificate callback called before resource request is - * made, which will be null for insecure connection. - */ - public void certificate(SslCertificate certificate); - - /** - * There was trouble. - * @param id One of the error codes defined below - * @param description of error - */ - public void error(int id, String description); - - /** - * SSL certificate error callback. Handles SSL error(s) on the way - * up to the user. The callback has to make sure that restartConnection() is called, - * otherwise the connection will be suspended indefinitely. - * @return True if the callback can handle the error, which means it will - * call restartConnection() to unblock the thread later, - * otherwise return false. - */ - public boolean handleSslErrorRequest(SslError error); - -} diff --git a/core/java/android/net/http/Headers.java b/core/java/android/net/http/Headers.java deleted file mode 100644 index 0f8b105..0000000 --- a/core/java/android/net/http/Headers.java +++ /dev/null @@ -1,521 +0,0 @@ -/* - * Copyright (C) 2006 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 android.net.http; - -import android.util.Log; - -import java.util.ArrayList; - -import org.apache.http.HeaderElement; -import org.apache.http.entity.ContentLengthStrategy; -import org.apache.http.message.BasicHeaderValueParser; -import org.apache.http.message.ParserCursor; -import org.apache.http.protocol.HTTP; -import org.apache.http.util.CharArrayBuffer; - -/** - * Manages received headers - * - * {@hide} - */ -public final class Headers { - private static final String LOGTAG = "Http"; - - // header parsing constant - /** - * indicate HTTP 1.0 connection close after the response - */ - public final static int CONN_CLOSE = 1; - /** - * indicate HTTP 1.1 connection keep alive - */ - public final static int CONN_KEEP_ALIVE = 2; - - // initial values. - public final static int NO_CONN_TYPE = 0; - public final static long NO_TRANSFER_ENCODING = 0; - public final static long NO_CONTENT_LENGTH = -1; - - // header strings - public final static String TRANSFER_ENCODING = "transfer-encoding"; - public final static String CONTENT_LEN = "content-length"; - public final static String CONTENT_TYPE = "content-type"; - public final static String CONTENT_ENCODING = "content-encoding"; - public final static String CONN_DIRECTIVE = "connection"; - - public final static String LOCATION = "location"; - public final static String PROXY_CONNECTION = "proxy-connection"; - - public final static String WWW_AUTHENTICATE = "www-authenticate"; - public final static String PROXY_AUTHENTICATE = "proxy-authenticate"; - public final static String CONTENT_DISPOSITION = "content-disposition"; - public final static String ACCEPT_RANGES = "accept-ranges"; - public final static String EXPIRES = "expires"; - public final static String CACHE_CONTROL = "cache-control"; - public final static String LAST_MODIFIED = "last-modified"; - public final static String ETAG = "etag"; - public final static String SET_COOKIE = "set-cookie"; - public final static String PRAGMA = "pragma"; - public final static String REFRESH = "refresh"; - public final static String X_PERMITTED_CROSS_DOMAIN_POLICIES = "x-permitted-cross-domain-policies"; - - // following hash are generated by String.hashCode() - private final static int HASH_TRANSFER_ENCODING = 1274458357; - private final static int HASH_CONTENT_LEN = -1132779846; - private final static int HASH_CONTENT_TYPE = 785670158; - private final static int HASH_CONTENT_ENCODING = 2095084583; - private final static int HASH_CONN_DIRECTIVE = -775651618; - private final static int HASH_LOCATION = 1901043637; - private final static int HASH_PROXY_CONNECTION = 285929373; - private final static int HASH_WWW_AUTHENTICATE = -243037365; - private final static int HASH_PROXY_AUTHENTICATE = -301767724; - private final static int HASH_CONTENT_DISPOSITION = -1267267485; - private final static int HASH_ACCEPT_RANGES = 1397189435; - private final static int HASH_EXPIRES = -1309235404; - private final static int HASH_CACHE_CONTROL = -208775662; - private final static int HASH_LAST_MODIFIED = 150043680; - private final static int HASH_ETAG = 3123477; - private final static int HASH_SET_COOKIE = 1237214767; - private final static int HASH_PRAGMA = -980228804; - private final static int HASH_REFRESH = 1085444827; - private final static int HASH_X_PERMITTED_CROSS_DOMAIN_POLICIES = -1345594014; - - // keep any headers that require direct access in a presized - // string array - private final static int IDX_TRANSFER_ENCODING = 0; - private final static int IDX_CONTENT_LEN = 1; - private final static int IDX_CONTENT_TYPE = 2; - private final static int IDX_CONTENT_ENCODING = 3; - private final static int IDX_CONN_DIRECTIVE = 4; - private final static int IDX_LOCATION = 5; - private final static int IDX_PROXY_CONNECTION = 6; - private final static int IDX_WWW_AUTHENTICATE = 7; - private final static int IDX_PROXY_AUTHENTICATE = 8; - private final static int IDX_CONTENT_DISPOSITION = 9; - private final static int IDX_ACCEPT_RANGES = 10; - private final static int IDX_EXPIRES = 11; - private final static int IDX_CACHE_CONTROL = 12; - private final static int IDX_LAST_MODIFIED = 13; - private final static int IDX_ETAG = 14; - private final static int IDX_SET_COOKIE = 15; - private final static int IDX_PRAGMA = 16; - private final static int IDX_REFRESH = 17; - private final static int IDX_X_PERMITTED_CROSS_DOMAIN_POLICIES = 18; - - private final static int HEADER_COUNT = 19; - - /* parsed values */ - private long transferEncoding; - private long contentLength; // Content length of the incoming data - private int connectionType; - private ArrayList<String> cookies = new ArrayList<String>(2); - - private String[] mHeaders = new String[HEADER_COUNT]; - private final static String[] sHeaderNames = { - TRANSFER_ENCODING, - CONTENT_LEN, - CONTENT_TYPE, - CONTENT_ENCODING, - CONN_DIRECTIVE, - LOCATION, - PROXY_CONNECTION, - WWW_AUTHENTICATE, - PROXY_AUTHENTICATE, - CONTENT_DISPOSITION, - ACCEPT_RANGES, - EXPIRES, - CACHE_CONTROL, - LAST_MODIFIED, - ETAG, - SET_COOKIE, - PRAGMA, - REFRESH, - X_PERMITTED_CROSS_DOMAIN_POLICIES - }; - - // Catch-all for headers not explicitly handled - private ArrayList<String> mExtraHeaderNames = new ArrayList<String>(4); - private ArrayList<String> mExtraHeaderValues = new ArrayList<String>(4); - - public Headers() { - transferEncoding = NO_TRANSFER_ENCODING; - contentLength = NO_CONTENT_LENGTH; - connectionType = NO_CONN_TYPE; - } - - public void parseHeader(CharArrayBuffer buffer) { - int pos = setLowercaseIndexOf(buffer, ':'); - if (pos == -1) { - return; - } - String name = buffer.substringTrimmed(0, pos); - if (name.length() == 0) { - return; - } - pos++; - - String val = buffer.substringTrimmed(pos, buffer.length()); - if (HttpLog.LOGV) { - HttpLog.v("hdr " + buffer.length() + " " + buffer); - } - - switch (name.hashCode()) { - case HASH_TRANSFER_ENCODING: - if (name.equals(TRANSFER_ENCODING)) { - mHeaders[IDX_TRANSFER_ENCODING] = val; - HeaderElement[] encodings = BasicHeaderValueParser.DEFAULT - .parseElements(buffer, new ParserCursor(pos, - buffer.length())); - // The chunked encoding must be the last one applied RFC2616, - // 14.41 - int len = encodings.length; - if (HTTP.IDENTITY_CODING.equalsIgnoreCase(val)) { - transferEncoding = ContentLengthStrategy.IDENTITY; - } else if ((len > 0) - && (HTTP.CHUNK_CODING - .equalsIgnoreCase(encodings[len - 1].getName()))) { - transferEncoding = ContentLengthStrategy.CHUNKED; - } else { - transferEncoding = ContentLengthStrategy.IDENTITY; - } - } - break; - case HASH_CONTENT_LEN: - if (name.equals(CONTENT_LEN)) { - mHeaders[IDX_CONTENT_LEN] = val; - try { - contentLength = Long.parseLong(val); - } catch (NumberFormatException e) { - if (false) { - Log.v(LOGTAG, "Headers.headers(): error parsing" - + " content length: " + buffer.toString()); - } - } - } - break; - case HASH_CONTENT_TYPE: - if (name.equals(CONTENT_TYPE)) { - mHeaders[IDX_CONTENT_TYPE] = val; - } - break; - case HASH_CONTENT_ENCODING: - if (name.equals(CONTENT_ENCODING)) { - mHeaders[IDX_CONTENT_ENCODING] = val; - } - break; - case HASH_CONN_DIRECTIVE: - if (name.equals(CONN_DIRECTIVE)) { - mHeaders[IDX_CONN_DIRECTIVE] = val; - setConnectionType(buffer, pos); - } - break; - case HASH_LOCATION: - if (name.equals(LOCATION)) { - mHeaders[IDX_LOCATION] = val; - } - break; - case HASH_PROXY_CONNECTION: - if (name.equals(PROXY_CONNECTION)) { - mHeaders[IDX_PROXY_CONNECTION] = val; - setConnectionType(buffer, pos); - } - break; - case HASH_WWW_AUTHENTICATE: - if (name.equals(WWW_AUTHENTICATE)) { - mHeaders[IDX_WWW_AUTHENTICATE] = val; - } - break; - case HASH_PROXY_AUTHENTICATE: - if (name.equals(PROXY_AUTHENTICATE)) { - mHeaders[IDX_PROXY_AUTHENTICATE] = val; - } - break; - case HASH_CONTENT_DISPOSITION: - if (name.equals(CONTENT_DISPOSITION)) { - mHeaders[IDX_CONTENT_DISPOSITION] = val; - } - break; - case HASH_ACCEPT_RANGES: - if (name.equals(ACCEPT_RANGES)) { - mHeaders[IDX_ACCEPT_RANGES] = val; - } - break; - case HASH_EXPIRES: - if (name.equals(EXPIRES)) { - mHeaders[IDX_EXPIRES] = val; - } - break; - case HASH_CACHE_CONTROL: - if (name.equals(CACHE_CONTROL)) { - // In case where we receive more than one header, create a ',' separated list. - // This should be ok, according to RFC 2616 chapter 4.2 - if (mHeaders[IDX_CACHE_CONTROL] != null && - mHeaders[IDX_CACHE_CONTROL].length() > 0) { - mHeaders[IDX_CACHE_CONTROL] += (',' + val); - } else { - mHeaders[IDX_CACHE_CONTROL] = val; - } - } - break; - case HASH_LAST_MODIFIED: - if (name.equals(LAST_MODIFIED)) { - mHeaders[IDX_LAST_MODIFIED] = val; - } - break; - case HASH_ETAG: - if (name.equals(ETAG)) { - mHeaders[IDX_ETAG] = val; - } - break; - case HASH_SET_COOKIE: - if (name.equals(SET_COOKIE)) { - mHeaders[IDX_SET_COOKIE] = val; - cookies.add(val); - } - break; - case HASH_PRAGMA: - if (name.equals(PRAGMA)) { - mHeaders[IDX_PRAGMA] = val; - } - break; - case HASH_REFRESH: - if (name.equals(REFRESH)) { - mHeaders[IDX_REFRESH] = val; - } - break; - case HASH_X_PERMITTED_CROSS_DOMAIN_POLICIES: - if (name.equals(X_PERMITTED_CROSS_DOMAIN_POLICIES)) { - mHeaders[IDX_X_PERMITTED_CROSS_DOMAIN_POLICIES] = val; - } - break; - default: - mExtraHeaderNames.add(name); - mExtraHeaderValues.add(val); - } - } - - public long getTransferEncoding() { - return transferEncoding; - } - - public long getContentLength() { - return contentLength; - } - - public int getConnectionType() { - return connectionType; - } - - public String getContentType() { - return mHeaders[IDX_CONTENT_TYPE]; - } - - public String getContentEncoding() { - return mHeaders[IDX_CONTENT_ENCODING]; - } - - public String getLocation() { - return mHeaders[IDX_LOCATION]; - } - - public String getWwwAuthenticate() { - return mHeaders[IDX_WWW_AUTHENTICATE]; - } - - public String getProxyAuthenticate() { - return mHeaders[IDX_PROXY_AUTHENTICATE]; - } - - public String getContentDisposition() { - return mHeaders[IDX_CONTENT_DISPOSITION]; - } - - public String getAcceptRanges() { - return mHeaders[IDX_ACCEPT_RANGES]; - } - - public String getExpires() { - return mHeaders[IDX_EXPIRES]; - } - - public String getCacheControl() { - return mHeaders[IDX_CACHE_CONTROL]; - } - - public String getLastModified() { - return mHeaders[IDX_LAST_MODIFIED]; - } - - public String getEtag() { - return mHeaders[IDX_ETAG]; - } - - public ArrayList<String> getSetCookie() { - return this.cookies; - } - - public String getPragma() { - return mHeaders[IDX_PRAGMA]; - } - - public String getRefresh() { - return mHeaders[IDX_REFRESH]; - } - - public String getXPermittedCrossDomainPolicies() { - return mHeaders[IDX_X_PERMITTED_CROSS_DOMAIN_POLICIES]; - } - - public void setContentLength(long value) { - this.contentLength = value; - } - - public void setContentType(String value) { - mHeaders[IDX_CONTENT_TYPE] = value; - } - - public void setContentEncoding(String value) { - mHeaders[IDX_CONTENT_ENCODING] = value; - } - - public void setLocation(String value) { - mHeaders[IDX_LOCATION] = value; - } - - public void setWwwAuthenticate(String value) { - mHeaders[IDX_WWW_AUTHENTICATE] = value; - } - - public void setProxyAuthenticate(String value) { - mHeaders[IDX_PROXY_AUTHENTICATE] = value; - } - - public void setContentDisposition(String value) { - mHeaders[IDX_CONTENT_DISPOSITION] = value; - } - - public void setAcceptRanges(String value) { - mHeaders[IDX_ACCEPT_RANGES] = value; - } - - public void setExpires(String value) { - mHeaders[IDX_EXPIRES] = value; - } - - public void setCacheControl(String value) { - mHeaders[IDX_CACHE_CONTROL] = value; - } - - public void setLastModified(String value) { - mHeaders[IDX_LAST_MODIFIED] = value; - } - - public void setEtag(String value) { - mHeaders[IDX_ETAG] = value; - } - - public void setXPermittedCrossDomainPolicies(String value) { - mHeaders[IDX_X_PERMITTED_CROSS_DOMAIN_POLICIES] = value; - } - - public interface HeaderCallback { - public void header(String name, String value); - } - - /** - * Reports all non-null headers to the callback - */ - public void getHeaders(HeaderCallback hcb) { - for (int i = 0; i < HEADER_COUNT; i++) { - String h = mHeaders[i]; - if (h != null) { - hcb.header(sHeaderNames[i], h); - } - } - int extraLen = mExtraHeaderNames.size(); - for (int i = 0; i < extraLen; i++) { - if (false) { - HttpLog.v("Headers.getHeaders() extra: " + i + " " + - mExtraHeaderNames.get(i) + " " + mExtraHeaderValues.get(i)); - } - hcb.header(mExtraHeaderNames.get(i), - mExtraHeaderValues.get(i)); - } - - } - - private void setConnectionType(CharArrayBuffer buffer, int pos) { - if (containsIgnoreCaseTrimmed(buffer, pos, HTTP.CONN_CLOSE)) { - connectionType = CONN_CLOSE; - } else if (containsIgnoreCaseTrimmed( - buffer, pos, HTTP.CONN_KEEP_ALIVE)) { - connectionType = CONN_KEEP_ALIVE; - } - } - - - /** - * Returns true if the buffer contains the given string. Ignores leading - * whitespace and case. - * - * @param buffer to search - * @param beginIndex index at which we should start - * @param str to search for - */ - static boolean containsIgnoreCaseTrimmed(CharArrayBuffer buffer, - int beginIndex, final String str) { - int len = buffer.length(); - char[] chars = buffer.buffer(); - while (beginIndex < len && HTTP.isWhitespace(chars[beginIndex])) { - beginIndex++; - } - int size = str.length(); - boolean ok = len >= (beginIndex + size); - for (int j=0; ok && (j < size); j++) { - char a = chars[beginIndex + j]; - char b = str.charAt(j); - if (a != b) { - a = Character.toLowerCase(a); - b = Character.toLowerCase(b); - ok = a == b; - } - } - - return true; - } - - /** - * Returns index of first occurence ch. Lower cases characters leading up - * to first occurrence of ch. - */ - static int setLowercaseIndexOf(CharArrayBuffer buffer, final int ch) { - - int beginIndex = 0; - int endIndex = buffer.length(); - char[] chars = buffer.buffer(); - - for (int i = beginIndex; i < endIndex; i++) { - char current = chars[i]; - if (current == ch) { - return i; - } else { - chars[i] = Character.toLowerCase(current); - } - } - return -1; - } -} diff --git a/core/java/android/net/http/HttpAuthHeader.java b/core/java/android/net/http/HttpAuthHeader.java deleted file mode 100644 index 3abac23..0000000 --- a/core/java/android/net/http/HttpAuthHeader.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright (C) 2007 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 android.net.http; - -import java.util.Locale; - -/** - * HttpAuthHeader: a class to store HTTP authentication-header parameters. - * For more information, see: RFC 2617: HTTP Authentication. - * - * {@hide} - */ -public class HttpAuthHeader { - /** - * Possible HTTP-authentication header tokens to search for: - */ - public final static String BASIC_TOKEN = "Basic"; - public final static String DIGEST_TOKEN = "Digest"; - - private final static String REALM_TOKEN = "realm"; - private final static String NONCE_TOKEN = "nonce"; - private final static String STALE_TOKEN = "stale"; - private final static String OPAQUE_TOKEN = "opaque"; - private final static String QOP_TOKEN = "qop"; - private final static String ALGORITHM_TOKEN = "algorithm"; - - /** - * An authentication scheme. We currently support two different schemes: - * HttpAuthHeader.BASIC - basic, and - * HttpAuthHeader.DIGEST - digest (algorithm=MD5, QOP="auth"). - */ - private int mScheme; - - public static final int UNKNOWN = 0; - public static final int BASIC = 1; - public static final int DIGEST = 2; - - /** - * A flag, indicating that the previous request from the client was - * rejected because the nonce value was stale. If stale is TRUE - * (case-insensitive), the client may wish to simply retry the request - * with a new encrypted response, without reprompting the user for a - * new username and password. - */ - private boolean mStale; - - /** - * A string to be displayed to users so they know which username and - * password to use. - */ - private String mRealm; - - /** - * A server-specified data string which should be uniquely generated - * each time a 401 response is made. - */ - private String mNonce; - - /** - * A string of data, specified by the server, which should be returned - * by the client unchanged in the Authorization header of subsequent - * requests with URIs in the same protection space. - */ - private String mOpaque; - - /** - * This directive is optional, but is made so only for backward - * compatibility with RFC 2069 [6]; it SHOULD be used by all - * implementations compliant with this version of the Digest scheme. - * If present, it is a quoted string of one or more tokens indicating - * the "quality of protection" values supported by the server. The - * value "auth" indicates authentication; the value "auth-int" - * indicates authentication with integrity protection. - */ - private String mQop; - - /** - * A string indicating a pair of algorithms used to produce the digest - * and a checksum. If this is not present it is assumed to be "MD5". - */ - private String mAlgorithm; - - /** - * Is this authentication request a proxy authentication request? - */ - private boolean mIsProxy; - - /** - * Username string we get from the user. - */ - private String mUsername; - - /** - * Password string we get from the user. - */ - private String mPassword; - - /** - * Creates a new HTTP-authentication header object from the - * input header string. - * The header string is assumed to contain parameters of at - * most one authentication-scheme (ensured by the caller). - */ - public HttpAuthHeader(String header) { - if (header != null) { - parseHeader(header); - } - } - - /** - * @return True iff this is a proxy authentication header. - */ - public boolean isProxy() { - return mIsProxy; - } - - /** - * Marks this header as a proxy authentication header. - */ - public void setProxy() { - mIsProxy = true; - } - - /** - * @return The username string. - */ - public String getUsername() { - return mUsername; - } - - /** - * Sets the username string. - */ - public void setUsername(String username) { - mUsername = username; - } - - /** - * @return The password string. - */ - public String getPassword() { - return mPassword; - } - - /** - * Sets the password string. - */ - public void setPassword(String password) { - mPassword = password; - } - - /** - * @return True iff this is the BASIC-authentication request. - */ - public boolean isBasic () { - return mScheme == BASIC; - } - - /** - * @return True iff this is the DIGEST-authentication request. - */ - public boolean isDigest() { - return mScheme == DIGEST; - } - - /** - * @return The authentication scheme requested. We currently - * support two schemes: - * HttpAuthHeader.BASIC - basic, and - * HttpAuthHeader.DIGEST - digest (algorithm=MD5, QOP="auth"). - */ - public int getScheme() { - return mScheme; - } - - /** - * @return True if indicating that the previous request from - * the client was rejected because the nonce value was stale. - */ - public boolean getStale() { - return mStale; - } - - /** - * @return The realm value or null if there is none. - */ - public String getRealm() { - return mRealm; - } - - /** - * @return The nonce value or null if there is none. - */ - public String getNonce() { - return mNonce; - } - - /** - * @return The opaque value or null if there is none. - */ - public String getOpaque() { - return mOpaque; - } - - /** - * @return The QOP ("quality-of_protection") value or null if - * there is none. The QOP value is always lower-case. - */ - public String getQop() { - return mQop; - } - - /** - * @return The name of the algorithm used or null if there is - * none. By default, MD5 is used. - */ - public String getAlgorithm() { - return mAlgorithm; - } - - /** - * @return True iff the authentication scheme requested by the - * server is supported; currently supported schemes: - * BASIC, - * DIGEST (only algorithm="md5", no qop or qop="auth). - */ - public boolean isSupportedScheme() { - // it is a good idea to enforce non-null realms! - if (mRealm != null) { - if (mScheme == BASIC) { - return true; - } else { - if (mScheme == DIGEST) { - return - mAlgorithm.equals("md5") && - (mQop == null || mQop.equals("auth")); - } - } - } - - return false; - } - - /** - * Parses the header scheme name and then scheme parameters if - * the scheme is supported. - */ - private void parseHeader(String header) { - if (HttpLog.LOGV) { - HttpLog.v("HttpAuthHeader.parseHeader(): header: " + header); - } - - if (header != null) { - String parameters = parseScheme(header); - if (parameters != null) { - // if we have a supported scheme - if (mScheme != UNKNOWN) { - parseParameters(parameters); - } - } - } - } - - /** - * Parses the authentication scheme name. If we have a Digest - * scheme, sets the algorithm value to the default of MD5. - * @return The authentication scheme parameters string to be - * parsed later (if the scheme is supported) or null if failed - * to parse the scheme (the header value is null?). - */ - private String parseScheme(String header) { - if (header != null) { - int i = header.indexOf(' '); - if (i >= 0) { - String scheme = header.substring(0, i).trim(); - if (scheme.equalsIgnoreCase(DIGEST_TOKEN)) { - mScheme = DIGEST; - - // md5 is the default algorithm!!! - mAlgorithm = "md5"; - } else { - if (scheme.equalsIgnoreCase(BASIC_TOKEN)) { - mScheme = BASIC; - } - } - - return header.substring(i + 1); - } - } - - return null; - } - - /** - * Parses a comma-separated list of authentification scheme - * parameters. - */ - private void parseParameters(String parameters) { - if (HttpLog.LOGV) { - HttpLog.v("HttpAuthHeader.parseParameters():" + - " parameters: " + parameters); - } - - if (parameters != null) { - int i; - do { - i = parameters.indexOf(','); - if (i < 0) { - // have only one parameter - parseParameter(parameters); - } else { - parseParameter(parameters.substring(0, i)); - parameters = parameters.substring(i + 1); - } - } while (i >= 0); - } - } - - /** - * Parses a single authentication scheme parameter. The parameter - * string is expected to follow the format: PARAMETER=VALUE. - */ - private void parseParameter(String parameter) { - if (parameter != null) { - // here, we are looking for the 1st occurence of '=' only!!! - int i = parameter.indexOf('='); - if (i >= 0) { - String token = parameter.substring(0, i).trim(); - String value = - trimDoubleQuotesIfAny(parameter.substring(i + 1).trim()); - - if (HttpLog.LOGV) { - HttpLog.v("HttpAuthHeader.parseParameter():" + - " token: " + token + - " value: " + value); - } - - if (token.equalsIgnoreCase(REALM_TOKEN)) { - mRealm = value; - } else { - if (mScheme == DIGEST) { - parseParameter(token, value); - } - } - } - } - } - - /** - * If the token is a known parameter name, parses and initializes - * the token value. - */ - private void parseParameter(String token, String value) { - if (token != null && value != null) { - if (token.equalsIgnoreCase(NONCE_TOKEN)) { - mNonce = value; - return; - } - - if (token.equalsIgnoreCase(STALE_TOKEN)) { - parseStale(value); - return; - } - - if (token.equalsIgnoreCase(OPAQUE_TOKEN)) { - mOpaque = value; - return; - } - - if (token.equalsIgnoreCase(QOP_TOKEN)) { - mQop = value.toLowerCase(Locale.ROOT); - return; - } - - if (token.equalsIgnoreCase(ALGORITHM_TOKEN)) { - mAlgorithm = value.toLowerCase(Locale.ROOT); - return; - } - } - } - - /** - * Parses and initializes the 'stale' paramer value. Any value - * different from case-insensitive "true" is considered "false". - */ - private void parseStale(String value) { - if (value != null) { - if (value.equalsIgnoreCase("true")) { - mStale = true; - } - } - } - - /** - * Trims double-quotes around a parameter value if there are any. - * @return The string value without the outermost pair of double- - * quotes or null if the original value is null. - */ - static private String trimDoubleQuotesIfAny(String value) { - if (value != null) { - int len = value.length(); - if (len > 2 && - value.charAt(0) == '\"' && value.charAt(len - 1) == '\"') { - return value.substring(1, len - 1); - } - } - - return value; - } -} diff --git a/core/java/android/net/http/HttpConnection.java b/core/java/android/net/http/HttpConnection.java deleted file mode 100644 index edf8fed3..0000000 --- a/core/java/android/net/http/HttpConnection.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2007 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 android.net.http; - -import android.content.Context; - -import java.net.Socket; -import java.io.IOException; - -import org.apache.http.HttpHost; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpConnectionParams; - -/** - * A requestConnection connecting to a normal (non secure) http server - * - * {@hide} - */ -class HttpConnection extends Connection { - - HttpConnection(Context context, HttpHost host, - RequestFeeder requestFeeder) { - super(context, host, requestFeeder); - } - - /** - * Opens the connection to a http server - * - * @return the opened low level connection - * @throws IOException if the connection fails for any reason. - */ - @Override - AndroidHttpClientConnection openConnection(Request req) throws IOException { - - // Update the certificate info (connection not secure - set to null) - EventHandler eventHandler = req.getEventHandler(); - mCertificate = null; - eventHandler.certificate(mCertificate); - - AndroidHttpClientConnection conn = new AndroidHttpClientConnection(); - BasicHttpParams params = new BasicHttpParams(); - Socket sock = new Socket(mHost.getHostName(), mHost.getPort()); - params.setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8192); - conn.bind(sock, params); - return conn; - } - - /** - * Closes the low level connection. - * - * If an exception is thrown then it is assumed that the - * connection will have been closed (to the extent possible) - * anyway and the caller does not need to take any further action. - * - */ - void closeConnection() { - try { - if (mHttpClientConnection != null && mHttpClientConnection.isOpen()) { - mHttpClientConnection.close(); - } - } catch (IOException e) { - if (HttpLog.LOGV) HttpLog.v( - "closeConnection(): failed closing connection " + - mHost); - e.printStackTrace(); - } - } - - /** - * Restart a secure connection suspended waiting for user interaction. - */ - void restartConnection(boolean abort) { - // not required for plain http connections - } - - String getScheme() { - return "http"; - } -} diff --git a/core/java/android/net/http/HttpLog.java b/core/java/android/net/http/HttpLog.java deleted file mode 100644 index 0934664..0000000 --- a/core/java/android/net/http/HttpLog.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2007 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-level logging flag - */ - -package android.net.http; - -import android.os.SystemClock; - -import android.util.Log; - -/** - * {@hide} - */ -class HttpLog { - private final static String LOGTAG = "http"; - - private static final boolean DEBUG = false; - static final boolean LOGV = false; - - static void v(String logMe) { - Log.v(LOGTAG, SystemClock.uptimeMillis() + " " + Thread.currentThread().getName() + " " + logMe); - } - - static void e(String logMe) { - Log.e(LOGTAG, logMe); - } -} diff --git a/core/java/android/net/http/HttpResponseCache.java b/core/java/android/net/http/HttpResponseCache.java index c6c22e7..188287f 100644 --- a/core/java/android/net/http/HttpResponseCache.java +++ b/core/java/android/net/http/HttpResponseCache.java @@ -35,8 +35,8 @@ import java.util.Map; * Caches HTTP and HTTPS responses to the filesystem so they may be reused, * saving time and bandwidth. This class supports {@link * java.net.HttpURLConnection} and {@link javax.net.ssl.HttpsURLConnection}; - * there is no platform-provided cache for {@link - * org.apache.http.impl.client.DefaultHttpClient} or {@link AndroidHttpClient}. + * there is no platform-provided cache for {@code DefaultHttpClient} or + * {@code AndroidHttpClient}. * * <h3>Installing an HTTP response cache</h3> * Enable caching of all of your application's HTTP requests by installing the diff --git a/core/java/android/net/http/HttpsConnection.java b/core/java/android/net/http/HttpsConnection.java deleted file mode 100644 index a8674de..0000000 --- a/core/java/android/net/http/HttpsConnection.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright (C) 2007 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 android.net.http; - -import android.content.Context; -import android.util.Log; -import com.android.org.conscrypt.FileClientSessionCache; -import com.android.org.conscrypt.OpenSSLContextImpl; -import com.android.org.conscrypt.SSLClientSessionCache; -import org.apache.http.Header; -import org.apache.http.HttpException; -import org.apache.http.HttpHost; -import org.apache.http.HttpStatus; -import org.apache.http.ParseException; -import org.apache.http.ProtocolVersion; -import org.apache.http.StatusLine; -import org.apache.http.message.BasicHttpRequest; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; - -import javax.net.ssl.SSLException; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.File; -import java.io.IOException; -import java.net.Socket; -import java.security.KeyManagementException; -import java.security.cert.X509Certificate; -import java.util.Locale; - -/** - * A Connection connecting to a secure http server or tunneling through - * a http proxy server to a https server. - * - * @hide - */ -public class HttpsConnection extends Connection { - - /** - * SSL socket factory - */ - private static SSLSocketFactory mSslSocketFactory = null; - - static { - // This initialization happens in the zygote. It triggers some - // lazy initialization that can will benefit later invocations of - // initializeEngine(). - initializeEngine(null); - } - - /** - * @hide - * - * @param sessionDir directory to cache SSL sessions - */ - public static void initializeEngine(File sessionDir) { - try { - SSLClientSessionCache cache = null; - if (sessionDir != null) { - Log.d("HttpsConnection", "Caching SSL sessions in " - + sessionDir + "."); - cache = FileClientSessionCache.usingDirectory(sessionDir); - } - - OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred(); - - // here, trust managers is a single trust-all manager - TrustManager[] trustManagers = new TrustManager[] { - new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - public void checkClientTrusted( - X509Certificate[] certs, String authType) { - } - - public void checkServerTrusted( - X509Certificate[] certs, String authType) { - } - } - }; - - sslContext.engineInit(null, trustManagers, null); - sslContext.engineGetClientSessionContext().setPersistentCache(cache); - - synchronized (HttpsConnection.class) { - mSslSocketFactory = sslContext.engineGetSocketFactory(); - } - } catch (KeyManagementException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private synchronized static SSLSocketFactory getSocketFactory() { - return mSslSocketFactory; - } - - /** - * Object to wait on when suspending the SSL connection - */ - private Object mSuspendLock = new Object(); - - /** - * True if the connection is suspended pending the result of asking the - * user about an error. - */ - private boolean mSuspended = false; - - /** - * True if the connection attempt should be aborted due to an ssl - * error. - */ - private boolean mAborted = false; - - // Used when connecting through a proxy. - private HttpHost mProxyHost; - - /** - * Contructor for a https connection. - */ - HttpsConnection(Context context, HttpHost host, HttpHost proxy, - RequestFeeder requestFeeder) { - super(context, host, requestFeeder); - mProxyHost = proxy; - } - - /** - * Sets the server SSL certificate associated with this - * connection. - * @param certificate The SSL certificate - */ - /* package */ void setCertificate(SslCertificate certificate) { - mCertificate = certificate; - } - - /** - * Opens the connection to a http server or proxy. - * - * @return the opened low level connection - * @throws IOException if the connection fails for any reason. - */ - @Override - AndroidHttpClientConnection openConnection(Request req) throws IOException { - SSLSocket sslSock = null; - - if (mProxyHost != null) { - // If we have a proxy set, we first send a CONNECT request - // to the proxy; if the proxy returns 200 OK, we negotiate - // a secure connection to the target server via the proxy. - // If the request fails, we drop it, but provide the event - // handler with the response status and headers. The event - // handler is then responsible for cancelling the load or - // issueing a new request. - AndroidHttpClientConnection proxyConnection = null; - Socket proxySock = null; - try { - proxySock = new Socket - (mProxyHost.getHostName(), mProxyHost.getPort()); - - proxySock.setSoTimeout(60 * 1000); - - proxyConnection = new AndroidHttpClientConnection(); - HttpParams params = new BasicHttpParams(); - HttpConnectionParams.setSocketBufferSize(params, 8192); - - proxyConnection.bind(proxySock, params); - } catch(IOException e) { - if (proxyConnection != null) { - proxyConnection.close(); - } - - String errorMessage = e.getMessage(); - if (errorMessage == null) { - errorMessage = - "failed to establish a connection to the proxy"; - } - - throw new IOException(errorMessage); - } - - StatusLine statusLine = null; - int statusCode = 0; - Headers headers = new Headers(); - try { - BasicHttpRequest proxyReq = new BasicHttpRequest - ("CONNECT", mHost.toHostString()); - - // add all 'proxy' headers from the original request, we also need - // to add 'host' header unless we want proxy to answer us with a - // 400 Bad Request - for (Header h : req.mHttpRequest.getAllHeaders()) { - String headerName = h.getName().toLowerCase(Locale.ROOT); - if (headerName.startsWith("proxy") || headerName.equals("keep-alive") - || headerName.equals("host")) { - proxyReq.addHeader(h); - } - } - - proxyConnection.sendRequestHeader(proxyReq); - proxyConnection.flush(); - - // it is possible to receive informational status - // codes prior to receiving actual headers; - // all those status codes are smaller than OK 200 - // a loop is a standard way of dealing with them - do { - statusLine = proxyConnection.parseResponseHeader(headers); - statusCode = statusLine.getStatusCode(); - } while (statusCode < HttpStatus.SC_OK); - } catch (ParseException e) { - String errorMessage = e.getMessage(); - if (errorMessage == null) { - errorMessage = - "failed to send a CONNECT request"; - } - - throw new IOException(errorMessage); - } catch (HttpException e) { - String errorMessage = e.getMessage(); - if (errorMessage == null) { - errorMessage = - "failed to send a CONNECT request"; - } - - throw new IOException(errorMessage); - } catch (IOException e) { - String errorMessage = e.getMessage(); - if (errorMessage == null) { - errorMessage = - "failed to send a CONNECT request"; - } - - throw new IOException(errorMessage); - } - - if (statusCode == HttpStatus.SC_OK) { - try { - sslSock = (SSLSocket) getSocketFactory().createSocket( - proxySock, mHost.getHostName(), mHost.getPort(), true); - } catch(IOException e) { - if (sslSock != null) { - sslSock.close(); - } - - String errorMessage = e.getMessage(); - if (errorMessage == null) { - errorMessage = - "failed to create an SSL socket"; - } - throw new IOException(errorMessage); - } - } else { - // if the code is not OK, inform the event handler - ProtocolVersion version = statusLine.getProtocolVersion(); - - req.mEventHandler.status(version.getMajor(), - version.getMinor(), - statusCode, - statusLine.getReasonPhrase()); - req.mEventHandler.headers(headers); - req.mEventHandler.endData(); - - proxyConnection.close(); - - // here, we return null to indicate that the original - // request needs to be dropped - return null; - } - } else { - // if we do not have a proxy, we simply connect to the host - try { - sslSock = (SSLSocket) getSocketFactory().createSocket( - mHost.getHostName(), mHost.getPort()); - sslSock.setSoTimeout(SOCKET_TIMEOUT); - } catch(IOException e) { - if (sslSock != null) { - sslSock.close(); - } - - String errorMessage = e.getMessage(); - if (errorMessage == null) { - errorMessage = "failed to create an SSL socket"; - } - - throw new IOException(errorMessage); - } - } - - // do handshake and validate server certificates - SslError error = CertificateChainValidator.getInstance(). - doHandshakeAndValidateServerCertificates(this, sslSock, mHost.getHostName()); - - // Inform the user if there is a problem - if (error != null) { - // handleSslErrorRequest may immediately unsuspend if it wants to - // allow the certificate anyway. - // So we mark the connection as suspended, call handleSslErrorRequest - // then check if we're still suspended and only wait if we actually - // need to. - synchronized (mSuspendLock) { - mSuspended = true; - } - // don't hold the lock while calling out to the event handler - boolean canHandle = req.getEventHandler().handleSslErrorRequest(error); - if(!canHandle) { - throw new IOException("failed to handle "+ error); - } - synchronized (mSuspendLock) { - if (mSuspended) { - try { - // Put a limit on how long we are waiting; if the timeout - // expires (which should never happen unless you choose - // to ignore the SSL error dialog for a very long time), - // we wake up the thread and abort the request. This is - // to prevent us from stalling the network if things go - // very bad. - mSuspendLock.wait(10 * 60 * 1000); - if (mSuspended) { - // mSuspended is true if we have not had a chance to - // restart the connection yet (ie, the wait timeout - // has expired) - mSuspended = false; - mAborted = true; - if (HttpLog.LOGV) { - HttpLog.v("HttpsConnection.openConnection():" + - " SSL timeout expired and request was cancelled!!!"); - } - } - } catch (InterruptedException e) { - // ignore - } - } - if (mAborted) { - // The user decided not to use this unverified connection - // so close it immediately. - sslSock.close(); - throw new SSLConnectionClosedByUserException("connection closed by the user"); - } - } - } - - // All went well, we have an open, verified connection. - AndroidHttpClientConnection conn = new AndroidHttpClientConnection(); - BasicHttpParams params = new BasicHttpParams(); - params.setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8192); - conn.bind(sslSock, params); - - return conn; - } - - /** - * Closes the low level connection. - * - * If an exception is thrown then it is assumed that the connection will - * have been closed (to the extent possible) anyway and the caller does not - * need to take any further action. - * - */ - @Override - void closeConnection() { - // if the connection has been suspended due to an SSL error - if (mSuspended) { - // wake up the network thread - restartConnection(false); - } - - try { - if (mHttpClientConnection != null && mHttpClientConnection.isOpen()) { - mHttpClientConnection.close(); - } - } catch (IOException e) { - if (HttpLog.LOGV) - HttpLog.v("HttpsConnection.closeConnection():" + - " failed closing connection " + mHost); - e.printStackTrace(); - } - } - - /** - * Restart a secure connection suspended waiting for user interaction. - */ - void restartConnection(boolean proceed) { - if (HttpLog.LOGV) { - HttpLog.v("HttpsConnection.restartConnection():" + - " proceed: " + proceed); - } - - synchronized (mSuspendLock) { - if (mSuspended) { - mSuspended = false; - mAborted = !proceed; - mSuspendLock.notify(); - } - } - } - - @Override - String getScheme() { - return "https"; - } -} - -/** - * Simple exception we throw if the SSL connection is closed by the user. - * - * {@hide} - */ -class SSLConnectionClosedByUserException extends SSLException { - - public SSLConnectionClosedByUserException(String reason) { - super(reason); - } -} diff --git a/core/java/android/net/http/IdleCache.java b/core/java/android/net/http/IdleCache.java deleted file mode 100644 index fda6009..0000000 --- a/core/java/android/net/http/IdleCache.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * 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. - */ - -/** - * Hangs onto idle live connections for a little while - */ - -package android.net.http; - -import org.apache.http.HttpHost; - -import android.os.SystemClock; - -/** - * {@hide} - */ -class IdleCache { - - class Entry { - HttpHost mHost; - Connection mConnection; - long mTimeout; - }; - - private final static int IDLE_CACHE_MAX = 8; - - /* Allow five consecutive empty queue checks before shutdown */ - private final static int EMPTY_CHECK_MAX = 5; - - /* six second timeout for connections */ - private final static int TIMEOUT = 6 * 1000; - private final static int CHECK_INTERVAL = 2 * 1000; - private Entry[] mEntries = new Entry[IDLE_CACHE_MAX]; - - private int mCount = 0; - - private IdleReaper mThread = null; - - /* stats */ - private int mCached = 0; - private int mReused = 0; - - IdleCache() { - for (int i = 0; i < IDLE_CACHE_MAX; i++) { - mEntries[i] = new Entry(); - } - } - - /** - * Caches connection, if there is room. - * @return true if connection cached - */ - synchronized boolean cacheConnection( - HttpHost host, Connection connection) { - - boolean ret = false; - - if (HttpLog.LOGV) { - HttpLog.v("IdleCache size " + mCount + " host " + host); - } - - if (mCount < IDLE_CACHE_MAX) { - long time = SystemClock.uptimeMillis(); - for (int i = 0; i < IDLE_CACHE_MAX; i++) { - Entry entry = mEntries[i]; - if (entry.mHost == null) { - entry.mHost = host; - entry.mConnection = connection; - entry.mTimeout = time + TIMEOUT; - mCount++; - if (HttpLog.LOGV) mCached++; - ret = true; - if (mThread == null) { - mThread = new IdleReaper(); - mThread.start(); - } - break; - } - } - } - return ret; - } - - synchronized Connection getConnection(HttpHost host) { - Connection ret = null; - - if (mCount > 0) { - for (int i = 0; i < IDLE_CACHE_MAX; i++) { - Entry entry = mEntries[i]; - HttpHost eHost = entry.mHost; - if (eHost != null && eHost.equals(host)) { - ret = entry.mConnection; - entry.mHost = null; - entry.mConnection = null; - mCount--; - if (HttpLog.LOGV) mReused++; - break; - } - } - } - return ret; - } - - synchronized void clear() { - for (int i = 0; mCount > 0 && i < IDLE_CACHE_MAX; i++) { - Entry entry = mEntries[i]; - if (entry.mHost != null) { - entry.mHost = null; - entry.mConnection.closeConnection(); - entry.mConnection = null; - mCount--; - } - } - } - - private synchronized void clearIdle() { - if (mCount > 0) { - long time = SystemClock.uptimeMillis(); - for (int i = 0; i < IDLE_CACHE_MAX; i++) { - Entry entry = mEntries[i]; - if (entry.mHost != null && time > entry.mTimeout) { - entry.mHost = null; - entry.mConnection.closeConnection(); - entry.mConnection = null; - mCount--; - } - } - } - } - - private class IdleReaper extends Thread { - - public void run() { - int check = 0; - - setName("IdleReaper"); - android.os.Process.setThreadPriority( - android.os.Process.THREAD_PRIORITY_BACKGROUND); - synchronized (IdleCache.this) { - while (check < EMPTY_CHECK_MAX) { - try { - IdleCache.this.wait(CHECK_INTERVAL); - } catch (InterruptedException ex) { - } - if (mCount == 0) { - check++; - } else { - check = 0; - clearIdle(); - } - } - mThread = null; - } - if (HttpLog.LOGV) { - HttpLog.v("IdleCache IdleReaper shutdown: cached " + mCached + - " reused " + mReused); - mCached = 0; - mReused = 0; - } - } - } -} diff --git a/core/java/android/net/http/LoggingEventHandler.java b/core/java/android/net/http/LoggingEventHandler.java deleted file mode 100644 index bdafa0b..0000000 --- a/core/java/android/net/http/LoggingEventHandler.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2006 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. - */ - -/** - * A test EventHandler: Logs everything received - */ - -package android.net.http; - -import android.net.http.Headers; - -/** - * {@hide} - */ -public class LoggingEventHandler implements EventHandler { - - public void requestSent() { - HttpLog.v("LoggingEventHandler:requestSent()"); - } - - public void status(int major_version, - int minor_version, - int code, /* Status-Code value */ - String reason_phrase) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler:status() major: " + major_version + - " minor: " + minor_version + - " code: " + code + - " reason: " + reason_phrase); - } - } - - public void headers(Headers headers) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler:headers()"); - HttpLog.v(headers.toString()); - } - } - - public void locationChanged(String newLocation, boolean permanent) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler: locationChanged() " + newLocation + - " permanent " + permanent); - } - } - - public void data(byte[] data, int len) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler: data() " + len + " bytes"); - } - // HttpLog.v(new String(data, 0, len)); - } - public void endData() { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler: endData() called"); - } - } - - public void certificate(SslCertificate certificate) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler: certificate(): " + certificate); - } - } - - public void error(int id, String description) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler: error() called Id:" + id + - " description " + description); - } - } - - public boolean handleSslErrorRequest(SslError error) { - if (HttpLog.LOGV) { - HttpLog.v("LoggingEventHandler: handleSslErrorRequest():" + error); - } - // return false so that the caller thread won't wait forever - return false; - } -} diff --git a/core/java/android/net/http/Request.java b/core/java/android/net/http/Request.java deleted file mode 100644 index 76d7bb9..0000000 --- a/core/java/android/net/http/Request.java +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Copyright (C) 2006 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 android.net.http; - -import java.io.EOFException; -import java.io.InputStream; -import java.io.IOException; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.zip.GZIPInputStream; - -import org.apache.http.entity.InputStreamEntity; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpException; -import org.apache.http.HttpHost; -import org.apache.http.HttpRequest; -import org.apache.http.HttpStatus; -import org.apache.http.ParseException; -import org.apache.http.ProtocolVersion; - -import org.apache.http.StatusLine; -import org.apache.http.message.BasicHttpRequest; -import org.apache.http.message.BasicHttpEntityEnclosingRequest; -import org.apache.http.protocol.RequestContent; - -/** - * Represents an HTTP request for a given host. - * - * {@hide} - */ - -class Request { - - /** The eventhandler to call as the request progresses */ - EventHandler mEventHandler; - - private Connection mConnection; - - /** The Apache http request */ - BasicHttpRequest mHttpRequest; - - /** The path component of this request */ - String mPath; - - /** Host serving this request */ - HttpHost mHost; - - /** Set if I'm using a proxy server */ - HttpHost mProxyHost; - - /** True if request has been cancelled */ - volatile boolean mCancelled = false; - - int mFailCount = 0; - - // This will be used to set the Range field if we retry a connection. This - // is http/1.1 feature. - private int mReceivedBytes = 0; - - private InputStream mBodyProvider; - private int mBodyLength; - - private final static String HOST_HEADER = "Host"; - private final static String ACCEPT_ENCODING_HEADER = "Accept-Encoding"; - private final static String CONTENT_LENGTH_HEADER = "content-length"; - - /* Used to synchronize waitUntilComplete() requests */ - private final Object mClientResource = new Object(); - - /** True if loading should be paused **/ - private boolean mLoadingPaused = false; - - /** - * Processor used to set content-length and transfer-encoding - * headers. - */ - private static RequestContent requestContentProcessor = - new RequestContent(); - - /** - * Instantiates a new Request. - * @param method GET/POST/PUT - * @param host The server that will handle this request - * @param path path part of URI - * @param bodyProvider InputStream providing HTTP body, null if none - * @param bodyLength length of body, must be 0 if bodyProvider is null - * @param eventHandler request will make progress callbacks on - * this interface - * @param headers reqeust headers - */ - Request(String method, HttpHost host, HttpHost proxyHost, String path, - InputStream bodyProvider, int bodyLength, - EventHandler eventHandler, - Map<String, String> headers) { - mEventHandler = eventHandler; - mHost = host; - mProxyHost = proxyHost; - mPath = path; - mBodyProvider = bodyProvider; - mBodyLength = bodyLength; - - if (bodyProvider == null && !"POST".equalsIgnoreCase(method)) { - mHttpRequest = new BasicHttpRequest(method, getUri()); - } else { - mHttpRequest = new BasicHttpEntityEnclosingRequest( - method, getUri()); - // it is ok to have null entity for BasicHttpEntityEnclosingRequest. - // By using BasicHttpEntityEnclosingRequest, it will set up the - // correct content-length, content-type and content-encoding. - if (bodyProvider != null) { - setBodyProvider(bodyProvider, bodyLength); - } - } - addHeader(HOST_HEADER, getHostPort()); - - /* FIXME: if webcore will make the root document a - high-priority request, we can ask for gzip encoding only on - high priority reqs (saving the trouble for images, etc) */ - addHeader(ACCEPT_ENCODING_HEADER, "gzip"); - addHeaders(headers); - } - - /** - * @param pause True if the load should be paused. - */ - synchronized void setLoadingPaused(boolean pause) { - mLoadingPaused = pause; - - // Wake up the paused thread if we're unpausing the load. - if (!mLoadingPaused) { - notify(); - } - } - - /** - * @param connection Request served by this connection - */ - void setConnection(Connection connection) { - mConnection = connection; - } - - /* package */ EventHandler getEventHandler() { - return mEventHandler; - } - - /** - * Add header represented by given pair to request. Header will - * be formatted in request as "name: value\r\n". - * @param name of header - * @param value of header - */ - void addHeader(String name, String value) { - if (name == null) { - String damage = "Null http header name"; - HttpLog.e(damage); - throw new NullPointerException(damage); - } - if (value == null || value.length() == 0) { - String damage = "Null or empty value for header \"" + name + "\""; - HttpLog.e(damage); - throw new RuntimeException(damage); - } - mHttpRequest.addHeader(name, value); - } - - /** - * Add all headers in given map to this request. This is a helper - * method: it calls addHeader for each pair in the map. - */ - void addHeaders(Map<String, String> headers) { - if (headers == null) { - return; - } - - Entry<String, String> entry; - Iterator<Entry<String, String>> i = headers.entrySet().iterator(); - while (i.hasNext()) { - entry = i.next(); - addHeader(entry.getKey(), entry.getValue()); - } - } - - /** - * Send the request line and headers - */ - void sendRequest(AndroidHttpClientConnection httpClientConnection) - throws HttpException, IOException { - - if (mCancelled) return; // don't send cancelled requests - - if (HttpLog.LOGV) { - HttpLog.v("Request.sendRequest() " + mHost.getSchemeName() + "://" + getHostPort()); - // HttpLog.v(mHttpRequest.getRequestLine().toString()); - if (false) { - Iterator i = mHttpRequest.headerIterator(); - while (i.hasNext()) { - Header header = (Header)i.next(); - HttpLog.v(header.getName() + ": " + header.getValue()); - } - } - } - - requestContentProcessor.process(mHttpRequest, - mConnection.getHttpContext()); - httpClientConnection.sendRequestHeader(mHttpRequest); - if (mHttpRequest instanceof HttpEntityEnclosingRequest) { - httpClientConnection.sendRequestEntity( - (HttpEntityEnclosingRequest) mHttpRequest); - } - - if (HttpLog.LOGV) { - HttpLog.v("Request.requestSent() " + mHost.getSchemeName() + "://" + getHostPort() + mPath); - } - } - - - /** - * Receive a single http response. - * - * @param httpClientConnection the request to receive the response for. - */ - void readResponse(AndroidHttpClientConnection httpClientConnection) - throws IOException, ParseException { - - if (mCancelled) return; // don't send cancelled requests - - StatusLine statusLine = null; - boolean hasBody = false; - httpClientConnection.flush(); - int statusCode = 0; - - Headers header = new Headers(); - do { - statusLine = httpClientConnection.parseResponseHeader(header); - statusCode = statusLine.getStatusCode(); - } while (statusCode < HttpStatus.SC_OK); - if (HttpLog.LOGV) HttpLog.v( - "Request.readResponseStatus() " + - statusLine.toString().length() + " " + statusLine); - - ProtocolVersion v = statusLine.getProtocolVersion(); - mEventHandler.status(v.getMajor(), v.getMinor(), - statusCode, statusLine.getReasonPhrase()); - mEventHandler.headers(header); - HttpEntity entity = null; - hasBody = canResponseHaveBody(mHttpRequest, statusCode); - - if (hasBody) - entity = httpClientConnection.receiveResponseEntity(header); - - // restrict the range request to the servers claiming that they are - // accepting ranges in bytes - boolean supportPartialContent = "bytes".equalsIgnoreCase(header - .getAcceptRanges()); - - if (entity != null) { - InputStream is = entity.getContent(); - - // process gzip content encoding - Header contentEncoding = entity.getContentEncoding(); - InputStream nis = null; - byte[] buf = null; - int count = 0; - try { - if (contentEncoding != null && - contentEncoding.getValue().equals("gzip")) { - nis = new GZIPInputStream(is); - } else { - nis = is; - } - - /* accumulate enough data to make it worth pushing it - * up the stack */ - buf = mConnection.getBuf(); - int len = 0; - int lowWater = buf.length / 2; - while (len != -1) { - synchronized(this) { - while (mLoadingPaused) { - // Put this (network loading) thread to sleep if WebCore - // has asked us to. This can happen with plugins for - // example, if we are streaming data but the plugin has - // filled its internal buffers. - try { - wait(); - } catch (InterruptedException e) { - HttpLog.e("Interrupted exception whilst " - + "network thread paused at WebCore's request." - + " " + e.getMessage()); - } - } - } - - len = nis.read(buf, count, buf.length - count); - - if (len != -1) { - count += len; - if (supportPartialContent) mReceivedBytes += len; - } - if (len == -1 || count >= lowWater) { - if (HttpLog.LOGV) HttpLog.v("Request.readResponse() " + count); - mEventHandler.data(buf, count); - count = 0; - } - } - } catch (EOFException e) { - /* InflaterInputStream throws an EOFException when the - server truncates gzipped content. Handle this case - as we do truncated non-gzipped content: no error */ - if (count > 0) { - // if there is uncommited content, we should commit them - mEventHandler.data(buf, count); - } - if (HttpLog.LOGV) HttpLog.v( "readResponse() handling " + e); - } catch(IOException e) { - // don't throw if we have a non-OK status code - if (statusCode == HttpStatus.SC_OK - || statusCode == HttpStatus.SC_PARTIAL_CONTENT) { - if (supportPartialContent && count > 0) { - // if there is uncommited content, we should commit them - // as we will continue the request - mEventHandler.data(buf, count); - } - throw e; - } - } finally { - if (nis != null) { - nis.close(); - } - } - } - mConnection.setCanPersist(entity, statusLine.getProtocolVersion(), - header.getConnectionType()); - mEventHandler.endData(); - complete(); - - if (HttpLog.LOGV) HttpLog.v("Request.readResponse(): done " + - mHost.getSchemeName() + "://" + getHostPort() + mPath); - } - - /** - * Data will not be sent to or received from server after cancel() - * call. Does not close connection--use close() below for that. - * - * Called by RequestHandle from non-network thread - */ - synchronized void cancel() { - if (HttpLog.LOGV) { - HttpLog.v("Request.cancel(): " + getUri()); - } - - // Ensure that the network thread is not blocked by a hanging request from WebCore to - // pause the load. - mLoadingPaused = false; - notify(); - - mCancelled = true; - if (mConnection != null) { - mConnection.cancel(); - } - } - - String getHostPort() { - String myScheme = mHost.getSchemeName(); - int myPort = mHost.getPort(); - - // Only send port when we must... many servers can't deal with it - if (myPort != 80 && myScheme.equals("http") || - myPort != 443 && myScheme.equals("https")) { - return mHost.toHostString(); - } else { - return mHost.getHostName(); - } - } - - String getUri() { - if (mProxyHost == null || - mHost.getSchemeName().equals("https")) { - return mPath; - } - return mHost.getSchemeName() + "://" + getHostPort() + mPath; - } - - /** - * for debugging - */ - public String toString() { - return mPath; - } - - - /** - * If this request has been sent once and failed, it must be reset - * before it can be sent again. - */ - void reset() { - /* clear content-length header */ - mHttpRequest.removeHeaders(CONTENT_LENGTH_HEADER); - - if (mBodyProvider != null) { - try { - mBodyProvider.reset(); - } catch (IOException ex) { - if (HttpLog.LOGV) HttpLog.v( - "failed to reset body provider " + - getUri()); - } - setBodyProvider(mBodyProvider, mBodyLength); - } - - if (mReceivedBytes > 0) { - // reset the fail count as we continue the request - mFailCount = 0; - // set the "Range" header to indicate that the retry will continue - // instead of restarting the request - HttpLog.v("*** Request.reset() to range:" + mReceivedBytes); - mHttpRequest.setHeader("Range", "bytes=" + mReceivedBytes + "-"); - } - } - - /** - * Pause thread request completes. Used for synchronous requests, - * and testing - */ - void waitUntilComplete() { - synchronized (mClientResource) { - try { - if (HttpLog.LOGV) HttpLog.v("Request.waitUntilComplete()"); - mClientResource.wait(); - if (HttpLog.LOGV) HttpLog.v("Request.waitUntilComplete() done waiting"); - } catch (InterruptedException e) { - } - } - } - - void complete() { - synchronized (mClientResource) { - mClientResource.notifyAll(); - } - } - - /** - * Decide whether a response comes with an entity. - * The implementation in this class is based on RFC 2616. - * Unknown methods and response codes are supposed to - * indicate responses with an entity. - * <br/> - * Derived executors can override this method to handle - * methods and response codes not specified in RFC 2616. - * - * @param request the request, to obtain the executed method - * @param response the response, to obtain the status code - */ - - private static boolean canResponseHaveBody(final HttpRequest request, - final int status) { - - if ("HEAD".equalsIgnoreCase(request.getRequestLine().getMethod())) { - return false; - } - return status >= HttpStatus.SC_OK - && status != HttpStatus.SC_NO_CONTENT - && status != HttpStatus.SC_NOT_MODIFIED; - } - - /** - * Supply an InputStream that provides the body of a request. It's - * not great that the caller must also provide the length of the data - * returned by that InputStream, but the client needs to know up - * front, and I'm not sure how to get this out of the InputStream - * itself without a costly readthrough. I'm not sure skip() would - * do what we want. If you know a better way, please let me know. - */ - private void setBodyProvider(InputStream bodyProvider, int bodyLength) { - if (!bodyProvider.markSupported()) { - throw new IllegalArgumentException( - "bodyProvider must support mark()"); - } - // Mark beginning of stream - bodyProvider.mark(Integer.MAX_VALUE); - - ((BasicHttpEntityEnclosingRequest)mHttpRequest).setEntity( - new InputStreamEntity(bodyProvider, bodyLength)); - } - - - /** - * Handles SSL error(s) on the way down from the user (the user - * has already provided their feedback). - */ - public void handleSslErrorResponse(boolean proceed) { - HttpsConnection connection = (HttpsConnection)(mConnection); - if (connection != null) { - connection.restartConnection(proceed); - } - } - - /** - * Helper: calls error() on eventhandler with appropriate message - * This should not be called before the mConnection is set. - */ - void error(int errorId, int resourceId) { - mEventHandler.error( - errorId, - mConnection.mContext.getText( - resourceId).toString()); - } - -} diff --git a/core/java/android/net/http/RequestHandle.java b/core/java/android/net/http/RequestHandle.java deleted file mode 100644 index f23f69c..0000000 --- a/core/java/android/net/http/RequestHandle.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Copyright (C) 2006 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 android.net.http; - -import android.net.ParseException; -import android.net.WebAddress; -import junit.framework.Assert; -import android.webkit.CookieManager; - -import org.apache.commons.codec.binary.Base64; - -import java.io.InputStream; -import java.lang.Math; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; - -/** - * RequestHandle: handles a request session that may include multiple - * redirects, HTTP authentication requests, etc. - * - * {@hide} - */ -public class RequestHandle { - - private String mUrl; - private WebAddress mUri; - private String mMethod; - private Map<String, String> mHeaders; - private RequestQueue mRequestQueue; - private Request mRequest; - private InputStream mBodyProvider; - private int mBodyLength; - private int mRedirectCount = 0; - // Used only with synchronous requests. - private Connection mConnection; - - private final static String AUTHORIZATION_HEADER = "Authorization"; - private final static String PROXY_AUTHORIZATION_HEADER = "Proxy-Authorization"; - - public final static int MAX_REDIRECT_COUNT = 16; - - /** - * Creates a new request session. - */ - public RequestHandle(RequestQueue requestQueue, String url, WebAddress uri, - String method, Map<String, String> headers, - InputStream bodyProvider, int bodyLength, Request request) { - - if (headers == null) { - headers = new HashMap<String, String>(); - } - mHeaders = headers; - mBodyProvider = bodyProvider; - mBodyLength = bodyLength; - mMethod = method == null? "GET" : method; - - mUrl = url; - mUri = uri; - - mRequestQueue = requestQueue; - - mRequest = request; - } - - /** - * Creates a new request session with a given Connection. This connection - * is used during a synchronous load to handle this request. - */ - public RequestHandle(RequestQueue requestQueue, String url, WebAddress uri, - String method, Map<String, String> headers, - InputStream bodyProvider, int bodyLength, Request request, - Connection conn) { - this(requestQueue, url, uri, method, headers, bodyProvider, bodyLength, - request); - mConnection = conn; - } - - /** - * Cancels this request - */ - public void cancel() { - if (mRequest != null) { - mRequest.cancel(); - } - } - - /** - * Pauses the loading of this request. For example, called from the WebCore thread - * when the plugin can take no more data. - */ - public void pauseRequest(boolean pause) { - if (mRequest != null) { - mRequest.setLoadingPaused(pause); - } - } - - /** - * Handles SSL error(s) on the way down from the user (the user - * has already provided their feedback). - */ - public void handleSslErrorResponse(boolean proceed) { - if (mRequest != null) { - mRequest.handleSslErrorResponse(proceed); - } - } - - /** - * @return true if we've hit the max redirect count - */ - public boolean isRedirectMax() { - return mRedirectCount >= MAX_REDIRECT_COUNT; - } - - public int getRedirectCount() { - return mRedirectCount; - } - - public void setRedirectCount(int count) { - mRedirectCount = count; - } - - /** - * Create and queue a redirect request. - * - * @param redirectTo URL to redirect to - * @param statusCode HTTP status code returned from original request - * @param cacheHeaders Cache header for redirect URL - * @return true if setup succeeds, false otherwise (redirect loop - * count exceeded, body provider unable to rewind on 307 redirect) - */ - public boolean setupRedirect(String redirectTo, int statusCode, - Map<String, String> cacheHeaders) { - if (HttpLog.LOGV) { - HttpLog.v("RequestHandle.setupRedirect(): redirectCount " + - mRedirectCount); - } - - // be careful and remove authentication headers, if any - mHeaders.remove(AUTHORIZATION_HEADER); - mHeaders.remove(PROXY_AUTHORIZATION_HEADER); - - if (++mRedirectCount == MAX_REDIRECT_COUNT) { - // Way too many redirects -- fail out - if (HttpLog.LOGV) HttpLog.v( - "RequestHandle.setupRedirect(): too many redirects " + - mRequest); - mRequest.error(EventHandler.ERROR_REDIRECT_LOOP, - com.android.internal.R.string.httpErrorRedirectLoop); - return false; - } - - if (mUrl.startsWith("https:") && redirectTo.startsWith("http:")) { - // implement http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.1.3 - if (HttpLog.LOGV) { - HttpLog.v("blowing away the referer on an https -> http redirect"); - } - mHeaders.remove("Referer"); - } - - mUrl = redirectTo; - try { - mUri = new WebAddress(mUrl); - } catch (ParseException e) { - e.printStackTrace(); - } - - // update the "Cookie" header based on the redirected url - mHeaders.remove("Cookie"); - String cookie = CookieManager.getInstance().getCookie(mUri); - if (cookie != null && cookie.length() > 0) { - mHeaders.put("Cookie", cookie); - } - - if ((statusCode == 302 || statusCode == 303) && mMethod.equals("POST")) { - if (HttpLog.LOGV) { - HttpLog.v("replacing POST with GET on redirect to " + redirectTo); - } - mMethod = "GET"; - } - /* Only repost content on a 307. If 307, reset the body - provider so we can replay the body */ - if (statusCode == 307) { - try { - if (mBodyProvider != null) mBodyProvider.reset(); - } catch (java.io.IOException ex) { - if (HttpLog.LOGV) { - HttpLog.v("setupRedirect() failed to reset body provider"); - } - return false; - } - - } else { - mHeaders.remove("Content-Type"); - mBodyProvider = null; - } - - // Update the cache headers for this URL - mHeaders.putAll(cacheHeaders); - - createAndQueueNewRequest(); - return true; - } - - /** - * Create and queue an HTTP authentication-response (basic) request. - */ - public void setupBasicAuthResponse(boolean isProxy, String username, String password) { - String response = computeBasicAuthResponse(username, password); - if (HttpLog.LOGV) { - HttpLog.v("setupBasicAuthResponse(): response: " + response); - } - mHeaders.put(authorizationHeader(isProxy), "Basic " + response); - setupAuthResponse(); - } - - /** - * Create and queue an HTTP authentication-response (digest) request. - */ - public void setupDigestAuthResponse(boolean isProxy, - String username, - String password, - String realm, - String nonce, - String QOP, - String algorithm, - String opaque) { - - String response = computeDigestAuthResponse( - username, password, realm, nonce, QOP, algorithm, opaque); - if (HttpLog.LOGV) { - HttpLog.v("setupDigestAuthResponse(): response: " + response); - } - mHeaders.put(authorizationHeader(isProxy), "Digest " + response); - setupAuthResponse(); - } - - private void setupAuthResponse() { - try { - if (mBodyProvider != null) mBodyProvider.reset(); - } catch (java.io.IOException ex) { - if (HttpLog.LOGV) { - HttpLog.v("setupAuthResponse() failed to reset body provider"); - } - } - createAndQueueNewRequest(); - } - - /** - * @return HTTP request method (GET, PUT, etc). - */ - public String getMethod() { - return mMethod; - } - - /** - * @return Basic-scheme authentication response: BASE64(username:password). - */ - public static String computeBasicAuthResponse(String username, String password) { - Assert.assertNotNull(username); - Assert.assertNotNull(password); - - // encode username:password to base64 - return new String(Base64.encodeBase64((username + ':' + password).getBytes())); - } - - public void waitUntilComplete() { - mRequest.waitUntilComplete(); - } - - public void processRequest() { - if (mConnection != null) { - mConnection.processRequests(mRequest); - } - } - - /** - * @return Digest-scheme authentication response. - */ - private String computeDigestAuthResponse(String username, - String password, - String realm, - String nonce, - String QOP, - String algorithm, - String opaque) { - - Assert.assertNotNull(username); - Assert.assertNotNull(password); - Assert.assertNotNull(realm); - - String A1 = username + ":" + realm + ":" + password; - String A2 = mMethod + ":" + mUrl; - - // because we do not preemptively send authorization headers, nc is always 1 - String nc = "00000001"; - String cnonce = computeCnonce(); - String digest = computeDigest(A1, A2, nonce, QOP, nc, cnonce); - - String response = ""; - response += "username=" + doubleQuote(username) + ", "; - response += "realm=" + doubleQuote(realm) + ", "; - response += "nonce=" + doubleQuote(nonce) + ", "; - response += "uri=" + doubleQuote(mUrl) + ", "; - response += "response=" + doubleQuote(digest) ; - - if (opaque != null) { - response += ", opaque=" + doubleQuote(opaque); - } - - if (algorithm != null) { - response += ", algorithm=" + algorithm; - } - - if (QOP != null) { - response += ", qop=" + QOP + ", nc=" + nc + ", cnonce=" + doubleQuote(cnonce); - } - - return response; - } - - /** - * @return The right authorization header (dependeing on whether it is a proxy or not). - */ - public static String authorizationHeader(boolean isProxy) { - if (!isProxy) { - return AUTHORIZATION_HEADER; - } else { - return PROXY_AUTHORIZATION_HEADER; - } - } - - /** - * @return Double-quoted MD5 digest. - */ - private String computeDigest( - String A1, String A2, String nonce, String QOP, String nc, String cnonce) { - if (HttpLog.LOGV) { - HttpLog.v("computeDigest(): QOP: " + QOP); - } - - if (QOP == null) { - return KD(H(A1), nonce + ":" + H(A2)); - } else { - if (QOP.equalsIgnoreCase("auth")) { - return KD(H(A1), nonce + ":" + nc + ":" + cnonce + ":" + QOP + ":" + H(A2)); - } - } - - return null; - } - - /** - * @return MD5 hash of concat(secret, ":", data). - */ - private String KD(String secret, String data) { - return H(secret + ":" + data); - } - - /** - * @return MD5 hash of param. - */ - private String H(String param) { - if (param != null) { - try { - MessageDigest md5 = MessageDigest.getInstance("MD5"); - - byte[] d = md5.digest(param.getBytes()); - if (d != null) { - return bufferToHex(d); - } - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException(e); - } - } - - return null; - } - - /** - * @return HEX buffer representation. - */ - private String bufferToHex(byte[] buffer) { - final char hexChars[] = - { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' }; - - if (buffer != null) { - int length = buffer.length; - if (length > 0) { - StringBuilder hex = new StringBuilder(2 * length); - - for (int i = 0; i < length; ++i) { - byte l = (byte) (buffer[i] & 0x0F); - byte h = (byte)((buffer[i] & 0xF0) >> 4); - - hex.append(hexChars[h]); - hex.append(hexChars[l]); - } - - return hex.toString(); - } else { - return ""; - } - } - - return null; - } - - /** - * Computes a random cnonce value based on the current time. - */ - private String computeCnonce() { - Random rand = new Random(); - int nextInt = rand.nextInt(); - nextInt = (nextInt == Integer.MIN_VALUE) ? - Integer.MAX_VALUE : Math.abs(nextInt); - return Integer.toString(nextInt, 16); - } - - /** - * "Double-quotes" the argument. - */ - private String doubleQuote(String param) { - if (param != null) { - return "\"" + param + "\""; - } - - return null; - } - - /** - * Creates and queues new request. - */ - private void createAndQueueNewRequest() { - // mConnection is non-null if and only if the requests are synchronous. - if (mConnection != null) { - RequestHandle newHandle = mRequestQueue.queueSynchronousRequest( - mUrl, mUri, mMethod, mHeaders, mRequest.mEventHandler, - mBodyProvider, mBodyLength); - mRequest = newHandle.mRequest; - mConnection = newHandle.mConnection; - newHandle.processRequest(); - return; - } - mRequest = mRequestQueue.queueRequest( - mUrl, mUri, mMethod, mHeaders, mRequest.mEventHandler, - mBodyProvider, - mBodyLength).mRequest; - } -} diff --git a/core/java/android/net/http/RequestQueue.java b/core/java/android/net/http/RequestQueue.java deleted file mode 100644 index 7d2da1b..0000000 --- a/core/java/android/net/http/RequestQueue.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (C) 2006 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. - */ - -/** - * High level HTTP Interface - * Queues requests as necessary - */ - -package android.net.http; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.net.ConnectivityManager; -import android.net.NetworkInfo; -import android.net.Proxy; -import android.net.WebAddress; -import android.util.Log; - -import java.io.InputStream; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.ListIterator; -import java.util.Map; - -import org.apache.http.HttpHost; - -/** - * {@hide} - */ -public class RequestQueue implements RequestFeeder { - - - /** - * Requests, indexed by HttpHost (scheme, host, port) - */ - private final LinkedHashMap<HttpHost, LinkedList<Request>> mPending; - private final Context mContext; - private final ActivePool mActivePool; - private final ConnectivityManager mConnectivityManager; - - private HttpHost mProxyHost = null; - private BroadcastReceiver mProxyChangeReceiver; - - /* default simultaneous connection count */ - private static final int CONNECTION_COUNT = 4; - - /** - * This class maintains active connection threads - */ - class ActivePool implements ConnectionManager { - /** Threads used to process requests */ - ConnectionThread[] mThreads; - - IdleCache mIdleCache; - - private int mTotalRequest; - private int mTotalConnection; - private int mConnectionCount; - - ActivePool(int connectionCount) { - mIdleCache = new IdleCache(); - mConnectionCount = connectionCount; - mThreads = new ConnectionThread[mConnectionCount]; - - for (int i = 0; i < mConnectionCount; i++) { - mThreads[i] = new ConnectionThread( - mContext, i, this, RequestQueue.this); - } - } - - void startup() { - for (int i = 0; i < mConnectionCount; i++) { - mThreads[i].start(); - } - } - - void shutdown() { - for (int i = 0; i < mConnectionCount; i++) { - mThreads[i].requestStop(); - } - } - - void startConnectionThread() { - synchronized (RequestQueue.this) { - RequestQueue.this.notify(); - } - } - - public void startTiming() { - for (int i = 0; i < mConnectionCount; i++) { - ConnectionThread rt = mThreads[i]; - rt.mCurrentThreadTime = -1; - rt.mTotalThreadTime = 0; - } - mTotalRequest = 0; - mTotalConnection = 0; - } - - public void stopTiming() { - int totalTime = 0; - for (int i = 0; i < mConnectionCount; i++) { - ConnectionThread rt = mThreads[i]; - if (rt.mCurrentThreadTime != -1) { - totalTime += rt.mTotalThreadTime; - } - rt.mCurrentThreadTime = 0; - } - Log.d("Http", "Http thread used " + totalTime + " ms " + " for " - + mTotalRequest + " requests and " + mTotalConnection - + " new connections"); - } - - void logState() { - StringBuilder dump = new StringBuilder(); - for (int i = 0; i < mConnectionCount; i++) { - dump.append(mThreads[i] + "\n"); - } - HttpLog.v(dump.toString()); - } - - - public HttpHost getProxyHost() { - return mProxyHost; - } - - /** - * Turns off persistence on all live connections - */ - void disablePersistence() { - for (int i = 0; i < mConnectionCount; i++) { - Connection connection = mThreads[i].mConnection; - if (connection != null) connection.setCanPersist(false); - } - mIdleCache.clear(); - } - - /* Linear lookup -- okay for small thread counts. Might use - private HashMap<HttpHost, LinkedList<ConnectionThread>> mActiveMap; - if this turns out to be a hotspot */ - ConnectionThread getThread(HttpHost host) { - synchronized(RequestQueue.this) { - for (int i = 0; i < mThreads.length; i++) { - ConnectionThread ct = mThreads[i]; - Connection connection = ct.mConnection; - if (connection != null && connection.mHost.equals(host)) { - return ct; - } - } - } - return null; - } - - public Connection getConnection(Context context, HttpHost host) { - host = RequestQueue.this.determineHost(host); - Connection con = mIdleCache.getConnection(host); - if (con == null) { - mTotalConnection++; - con = Connection.getConnection(mContext, host, mProxyHost, - RequestQueue.this); - } - return con; - } - public boolean recycleConnection(Connection connection) { - return mIdleCache.cacheConnection(connection.getHost(), connection); - } - - } - - /** - * A RequestQueue class instance maintains a set of queued - * requests. It orders them, makes the requests against HTTP - * servers, and makes callbacks to supplied eventHandlers as data - * is read. It supports request prioritization, connection reuse - * and pipelining. - * - * @param context application context - */ - public RequestQueue(Context context) { - this(context, CONNECTION_COUNT); - } - - /** - * A RequestQueue class instance maintains a set of queued - * requests. It orders them, makes the requests against HTTP - * servers, and makes callbacks to supplied eventHandlers as data - * is read. It supports request prioritization, connection reuse - * and pipelining. - * - * @param context application context - * @param connectionCount The number of simultaneous connections - */ - public RequestQueue(Context context, int connectionCount) { - mContext = context; - - mPending = new LinkedHashMap<HttpHost, LinkedList<Request>>(32); - - mActivePool = new ActivePool(connectionCount); - mActivePool.startup(); - - mConnectivityManager = (ConnectivityManager) - context.getSystemService(Context.CONNECTIVITY_SERVICE); - } - - /** - * Enables data state and proxy tracking - */ - public synchronized void enablePlatformNotifications() { - if (HttpLog.LOGV) HttpLog.v("RequestQueue.enablePlatformNotifications() network"); - - if (mProxyChangeReceiver == null) { - mProxyChangeReceiver = - new BroadcastReceiver() { - @Override - public void onReceive(Context ctx, Intent intent) { - setProxyConfig(); - } - }; - mContext.registerReceiver(mProxyChangeReceiver, - new IntentFilter(Proxy.PROXY_CHANGE_ACTION)); - } - // we need to resample the current proxy setup - setProxyConfig(); - } - - /** - * If platform notifications have been enabled, call this method - * to disable before destroying RequestQueue - */ - public synchronized void disablePlatformNotifications() { - if (HttpLog.LOGV) HttpLog.v("RequestQueue.disablePlatformNotifications() network"); - - if (mProxyChangeReceiver != null) { - mContext.unregisterReceiver(mProxyChangeReceiver); - mProxyChangeReceiver = null; - } - } - - /** - * Because our IntentReceiver can run within a different thread, - * synchronize setting the proxy - */ - private synchronized void setProxyConfig() { - NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); - if (info != null && info.getType() == ConnectivityManager.TYPE_WIFI) { - mProxyHost = null; - } else { - String host = Proxy.getHost(mContext); - if (HttpLog.LOGV) HttpLog.v("RequestQueue.setProxyConfig " + host); - if (host == null) { - mProxyHost = null; - } else { - mActivePool.disablePersistence(); - mProxyHost = new HttpHost(host, Proxy.getPort(mContext), "http"); - } - } - } - - /** - * used by webkit - * @return proxy host if set, null otherwise - */ - public HttpHost getProxyHost() { - return mProxyHost; - } - - /** - * Queues an HTTP request - * @param url The url to load. - * @param method "GET" or "POST." - * @param headers A hashmap of http headers. - * @param eventHandler The event handler for handling returned - * data. Callbacks will be made on the supplied instance. - * @param bodyProvider InputStream providing HTTP body, null if none - * @param bodyLength length of body, must be 0 if bodyProvider is null - */ - public RequestHandle queueRequest( - String url, String method, - Map<String, String> headers, EventHandler eventHandler, - InputStream bodyProvider, int bodyLength) { - WebAddress uri = new WebAddress(url); - return queueRequest(url, uri, method, headers, eventHandler, - bodyProvider, bodyLength); - } - - /** - * Queues an HTTP request - * @param url The url to load. - * @param uri The uri of the url to load. - * @param method "GET" or "POST." - * @param headers A hashmap of http headers. - * @param eventHandler The event handler for handling returned - * data. Callbacks will be made on the supplied instance. - * @param bodyProvider InputStream providing HTTP body, null if none - * @param bodyLength length of body, must be 0 if bodyProvider is null - */ - public RequestHandle queueRequest( - String url, WebAddress uri, String method, Map<String, String> headers, - EventHandler eventHandler, - InputStream bodyProvider, int bodyLength) { - - if (HttpLog.LOGV) HttpLog.v("RequestQueue.queueRequest " + uri); - - // Ensure there is an eventHandler set - if (eventHandler == null) { - eventHandler = new LoggingEventHandler(); - } - - /* Create and queue request */ - Request req; - HttpHost httpHost = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()); - - // set up request - req = new Request(method, httpHost, mProxyHost, uri.getPath(), bodyProvider, - bodyLength, eventHandler, headers); - - queueRequest(req, false); - - mActivePool.mTotalRequest++; - - // dump(); - mActivePool.startConnectionThread(); - - return new RequestHandle( - this, url, uri, method, headers, bodyProvider, bodyLength, - req); - } - - private static class SyncFeeder implements RequestFeeder { - // This is used in the case where the request fails and needs to be - // requeued into the RequestFeeder. - private Request mRequest; - SyncFeeder() { - } - public Request getRequest() { - Request r = mRequest; - mRequest = null; - return r; - } - public Request getRequest(HttpHost host) { - return getRequest(); - } - public boolean haveRequest(HttpHost host) { - return mRequest != null; - } - public void requeueRequest(Request r) { - mRequest = r; - } - } - - public RequestHandle queueSynchronousRequest(String url, WebAddress uri, - String method, Map<String, String> headers, - EventHandler eventHandler, InputStream bodyProvider, - int bodyLength) { - if (HttpLog.LOGV) { - HttpLog.v("RequestQueue.dispatchSynchronousRequest " + uri); - } - - HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()); - - Request req = new Request(method, host, mProxyHost, uri.getPath(), - bodyProvider, bodyLength, eventHandler, headers); - - // Open a new connection that uses our special RequestFeeder - // implementation. - host = determineHost(host); - Connection conn = Connection.getConnection(mContext, host, mProxyHost, - new SyncFeeder()); - - // TODO: I would like to process the request here but LoadListener - // needs a RequestHandle to process some messages. - return new RequestHandle(this, url, uri, method, headers, bodyProvider, - bodyLength, req, conn); - - } - - // Chooses between the proxy and the request's host. - private HttpHost determineHost(HttpHost host) { - // There used to be a comment in ConnectionThread about t-mob's proxy - // being really bad about https. But, HttpsConnection actually looks - // for a proxy and connects through it anyway. I think that this check - // is still valid because if a site is https, we will use - // HttpsConnection rather than HttpConnection if the proxy address is - // not secure. - return (mProxyHost == null || "https".equals(host.getSchemeName())) - ? host : mProxyHost; - } - - /** - * @return true iff there are any non-active requests pending - */ - synchronized boolean requestsPending() { - return !mPending.isEmpty(); - } - - - /** - * debug tool: prints request queue to log - */ - synchronized void dump() { - HttpLog.v("dump()"); - StringBuilder dump = new StringBuilder(); - int count = 0; - Iterator<Map.Entry<HttpHost, LinkedList<Request>>> iter; - - // mActivePool.log(dump); - - if (!mPending.isEmpty()) { - iter = mPending.entrySet().iterator(); - while (iter.hasNext()) { - Map.Entry<HttpHost, LinkedList<Request>> entry = iter.next(); - String hostName = entry.getKey().getHostName(); - StringBuilder line = new StringBuilder("p" + count++ + " " + hostName + " "); - - LinkedList<Request> reqList = entry.getValue(); - ListIterator reqIter = reqList.listIterator(0); - while (iter.hasNext()) { - Request request = (Request)iter.next(); - line.append(request + " "); - } - dump.append(line); - dump.append("\n"); - } - } - HttpLog.v(dump.toString()); - } - - /* - * RequestFeeder implementation - */ - public synchronized Request getRequest() { - Request ret = null; - - if (!mPending.isEmpty()) { - ret = removeFirst(mPending); - } - if (HttpLog.LOGV) HttpLog.v("RequestQueue.getRequest() => " + ret); - return ret; - } - - /** - * @return a request for given host if possible - */ - public synchronized Request getRequest(HttpHost host) { - Request ret = null; - - if (mPending.containsKey(host)) { - LinkedList<Request> reqList = mPending.get(host); - ret = reqList.removeFirst(); - if (reqList.isEmpty()) { - mPending.remove(host); - } - } - if (HttpLog.LOGV) HttpLog.v("RequestQueue.getRequest(" + host + ") => " + ret); - return ret; - } - - /** - * @return true if a request for this host is available - */ - public synchronized boolean haveRequest(HttpHost host) { - return mPending.containsKey(host); - } - - /** - * Put request back on head of queue - */ - public void requeueRequest(Request request) { - queueRequest(request, true); - } - - /** - * This must be called to cleanly shutdown RequestQueue - */ - public void shutdown() { - mActivePool.shutdown(); - } - - protected synchronized void queueRequest(Request request, boolean head) { - HttpHost host = request.mProxyHost == null ? request.mHost : request.mProxyHost; - LinkedList<Request> reqList; - if (mPending.containsKey(host)) { - reqList = mPending.get(host); - } else { - reqList = new LinkedList<Request>(); - mPending.put(host, reqList); - } - if (head) { - reqList.addFirst(request); - } else { - reqList.add(request); - } - } - - - public void startTiming() { - mActivePool.startTiming(); - } - - public void stopTiming() { - mActivePool.stopTiming(); - } - - /* helper */ - private Request removeFirst(LinkedHashMap<HttpHost, LinkedList<Request>> requestQueue) { - Request ret = null; - Iterator<Map.Entry<HttpHost, LinkedList<Request>>> iter = requestQueue.entrySet().iterator(); - if (iter.hasNext()) { - Map.Entry<HttpHost, LinkedList<Request>> entry = iter.next(); - LinkedList<Request> reqList = entry.getValue(); - ret = reqList.removeFirst(); - if (reqList.isEmpty()) { - requestQueue.remove(entry.getKey()); - } - } - return ret; - } - - /** - * This interface is exposed to each connection - */ - interface ConnectionManager { - HttpHost getProxyHost(); - Connection getConnection(Context context, HttpHost host); - boolean recycleConnection(Connection connection); - } -} diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 250e80f..15acaad 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -51,14 +51,21 @@ import android.os.Build.VERSION_CODES; import android.speech.tts.TextToSpeech; import android.text.TextUtils; import android.util.AndroidException; +import android.util.ArrayMap; +import android.util.ArraySet; import android.util.Log; +import com.android.internal.util.ArrayUtils; import com.android.internal.widget.ILockSettings; import java.net.URISyntaxException; +import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.HashSet; import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; /** * The Settings provider contains global system-level device preferences. @@ -1192,6 +1199,11 @@ public final class Settings { public static final class System extends NameValueTable { public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version"; + /** @hide */ + public static interface Validator { + public boolean validate(String value); + } + /** * The content:// style URL for this table */ @@ -1294,13 +1306,56 @@ public final class Settings { MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); } + private static final Validator sBooleanValidator = + new DiscreteValueValidator(new String[] {"0", "1"}); + + private static final Validator sNonNegativeIntegerValidator = new Validator() { + @Override + public boolean validate(String value) { + try { + return Integer.parseInt(value) >= 0; + } catch (NumberFormatException e) { + return false; + } + } + }; + + private static final Validator sVolumeValidator = + new InclusiveFloatRangeValidator(0, 1); + + private static final Validator sUriValidator = new Validator() { + @Override + public boolean validate(String value) { + try { + Uri.decode(value); + return true; + } catch (IllegalArgumentException e) { + return false; + } + } + }; + + private static final Validator sLenientIpAddressValidator = new Validator() { + private static final int MAX_IPV6_LENGTH = 45; + + @Override + public boolean validate(String value) { + return value.length() <= MAX_IPV6_LENGTH; + } + }; + /** @hide */ - public static void getMovedKeys(HashSet<String> outKeySet) { + public static void getMovedToGlobalSettings(Set<String> outKeySet) { outKeySet.addAll(MOVED_TO_GLOBAL); outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); } /** @hide */ + public static void getMovedToSecureSettings(Set<String> outKeySet) { + outKeySet.addAll(MOVED_TO_SECURE); + } + + /** @hide */ public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { outKeySet.addAll(MOVED_TO_GLOBAL); } @@ -1723,6 +1778,56 @@ public final class Settings { putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); } + private static final class DiscreteValueValidator implements Validator { + private final String[] mValues; + + public DiscreteValueValidator(String[] values) { + mValues = values; + } + + public boolean validate(String value) { + return ArrayUtils.contains(mValues, value); + } + } + + private static final class InclusiveIntegerRangeValidator implements Validator { + private final int mMin; + private final int mMax; + + public InclusiveIntegerRangeValidator(int min, int max) { + mMin = min; + mMax = max; + } + + public boolean validate(String value) { + try { + final int intValue = Integer.parseInt(value); + return intValue >= mMin && intValue <= mMax; + } catch (NumberFormatException e) { + return false; + } + } + } + + private static final class InclusiveFloatRangeValidator implements Validator { + private final float mMin; + private final float mMax; + + public InclusiveFloatRangeValidator(float min, float max) { + mMin = min; + mMax = max; + } + + public boolean validate(String value) { + try { + final float floatValue = Float.parseFloat(value); + return floatValue >= mMin && floatValue <= mMax; + } catch (NumberFormatException e) { + return false; + } + } + } + /** * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead */ @@ -1741,6 +1846,9 @@ public final class Settings { */ public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; + private static final Validator END_BUTTON_BEHAVIOR_VALIDATOR = + new InclusiveIntegerRangeValidator(0, 3); + /** * END_BUTTON_BEHAVIOR value for "go home". * @hide @@ -1765,6 +1873,8 @@ public final class Settings { */ public static final String ADVANCED_SETTINGS = "advanced_settings"; + private static final Validator ADVANCED_SETTINGS_VALIDATOR = sBooleanValidator; + /** * ADVANCED_SETTINGS default value. * @hide @@ -1864,6 +1974,8 @@ public final class Settings { @Deprecated public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; + private static final Validator WIFI_USE_STATIC_IP_VALIDATOR = sBooleanValidator; + /** * The static IP address. * <p> @@ -1874,6 +1986,8 @@ public final class Settings { @Deprecated public static final String WIFI_STATIC_IP = "wifi_static_ip"; + private static final Validator WIFI_STATIC_IP_VALIDATOR = sLenientIpAddressValidator; + /** * If using static IP, the gateway's IP address. * <p> @@ -1884,6 +1998,8 @@ public final class Settings { @Deprecated public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; + private static final Validator WIFI_STATIC_GATEWAY_VALIDATOR = sLenientIpAddressValidator; + /** * If using static IP, the net mask. * <p> @@ -1894,6 +2010,8 @@ public final class Settings { @Deprecated public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; + private static final Validator WIFI_STATIC_NETMASK_VALIDATOR = sLenientIpAddressValidator; + /** * If using static IP, the primary DNS's IP address. * <p> @@ -1904,6 +2022,8 @@ public final class Settings { @Deprecated public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; + private static final Validator WIFI_STATIC_DNS1_VALIDATOR = sLenientIpAddressValidator; + /** * If using static IP, the secondary DNS's IP address. * <p> @@ -1914,6 +2034,7 @@ public final class Settings { @Deprecated public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; + private static final Validator WIFI_STATIC_DNS2_VALIDATOR = sLenientIpAddressValidator; /** * Determines whether remote devices may discover and/or connect to @@ -1926,6 +2047,9 @@ public final class Settings { public static final String BLUETOOTH_DISCOVERABILITY = "bluetooth_discoverability"; + private static final Validator BLUETOOTH_DISCOVERABILITY_VALIDATOR = + new InclusiveIntegerRangeValidator(0, 2); + /** * Bluetooth discoverability timeout. If this value is nonzero, then * Bluetooth becomes discoverable for a certain number of seconds, @@ -1934,6 +2058,9 @@ public final class Settings { public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = "bluetooth_discoverability_timeout"; + private static final Validator BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR = + sNonNegativeIntegerValidator; + /** * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} * instead @@ -1957,7 +2084,6 @@ public final class Settings { public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; - /** * A formatted string of the next alarm that is set, or the empty string * if there is no alarm set. @@ -1967,11 +2093,31 @@ public final class Settings { @Deprecated public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; + private static final Validator NEXT_ALARM_FORMATTED_VALIDATOR = new Validator() { + private static final int MAX_LENGTH = 1000; + @Override + public boolean validate(String value) { + // TODO: No idea what the correct format is. + return value == null || value.length() < MAX_LENGTH; + } + }; + /** * Scaling factor for fonts, float. */ public static final String FONT_SCALE = "font_scale"; + private static final Validator FONT_SCALE_VALIDATOR = new Validator() { + @Override + public boolean validate(String value) { + try { + return Float.parseFloat(value) >= 0; + } catch (NumberFormatException e) { + return false; + } + } + }; + /** * Name of an application package to be debugged. * @@ -1996,6 +2142,8 @@ public final class Settings { @Deprecated public static final String DIM_SCREEN = "dim_screen"; + private static final Validator DIM_SCREEN_VALIDATOR = sBooleanValidator; + /** * The amount of time in milliseconds before the device goes to sleep or begins * to dream after a period of inactivity. This value is also known as the @@ -2004,16 +2152,23 @@ public final class Settings { */ public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; + private static final Validator SCREEN_OFF_TIMEOUT_VALIDATOR = sNonNegativeIntegerValidator; + /** * The screen backlight brightness between 0 and 255. */ public static final String SCREEN_BRIGHTNESS = "screen_brightness"; + private static final Validator SCREEN_BRIGHTNESS_VALIDATOR = + new InclusiveIntegerRangeValidator(0, 255); + /** * Control whether to enable automatic brightness mode. */ public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; + private static final Validator SCREEN_BRIGHTNESS_MODE_VALIDATOR = sBooleanValidator; + /** * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) * or less (<0.0 >-1.0) bright. @@ -2021,6 +2176,9 @@ public final class Settings { */ public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; + private static final Validator SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR = + new InclusiveFloatRangeValidator(-1, 1); + /** * SCREEN_BRIGHTNESS_MODE value for manual mode. */ @@ -2056,12 +2214,18 @@ public final class Settings { */ public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; - /** + private static final Validator MODE_RINGER_STREAMS_AFFECTED_VALIDATOR = + sNonNegativeIntegerValidator; + + /** * Determines which streams are affected by mute. The * stream type's bit should be set to 1 if it should be muted when a mute request * is received. */ - public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; + public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; + + private static final Validator MUTE_STREAMS_AFFECTED_VALIDATOR = + sNonNegativeIntegerValidator; /** * Whether vibrate is on for different events. This is used internally, @@ -2069,6 +2233,8 @@ public final class Settings { */ public static final String VIBRATE_ON = "vibrate_on"; + private static final Validator VIBRATE_ON_VALIDATOR = sBooleanValidator; + /** * If 1, redirects the system vibrator to all currently attached input devices * that support vibration. If there are no such input devices, then the system @@ -2083,54 +2249,72 @@ public final class Settings { */ public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; + private static final Validator VIBRATE_INPUT_DEVICES_VALIDATOR = sBooleanValidator; + /** * Ringer volume. This is used internally, changing this value will not * change the volume. See AudioManager. */ public static final String VOLUME_RING = "volume_ring"; + private static final Validator VOLUME_RING_VALIDATOR = sVolumeValidator; + /** * System/notifications volume. This is used internally, changing this * value will not change the volume. See AudioManager. */ public static final String VOLUME_SYSTEM = "volume_system"; + private static final Validator VOLUME_SYSTEM_VALIDATOR = sVolumeValidator; + /** * Voice call volume. This is used internally, changing this value will * not change the volume. See AudioManager. */ public static final String VOLUME_VOICE = "volume_voice"; + private static final Validator VOLUME_VOICE_VALIDATOR = sVolumeValidator; + /** * Music/media/gaming volume. This is used internally, changing this * value will not change the volume. See AudioManager. */ public static final String VOLUME_MUSIC = "volume_music"; + private static final Validator VOLUME_MUSIC_VALIDATOR = sVolumeValidator; + /** * Alarm volume. This is used internally, changing this * value will not change the volume. See AudioManager. */ public static final String VOLUME_ALARM = "volume_alarm"; + private static final Validator VOLUME_ALARM_VALIDATOR = sVolumeValidator; + /** * Notification volume. This is used internally, changing this * value will not change the volume. See AudioManager. */ public static final String VOLUME_NOTIFICATION = "volume_notification"; + private static final Validator VOLUME_NOTIFICATION_VALIDATOR = sVolumeValidator; + /** * Bluetooth Headset volume. This is used internally, changing this value will * not change the volume. See AudioManager. */ public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; + private static final Validator VOLUME_BLUETOOTH_SCO_VALIDATOR = sVolumeValidator; + /** * Master volume (float in the range 0.0f to 1.0f). * @hide */ public static final String VOLUME_MASTER = "volume_master"; + private static final Validator VOLUME_MASTER_VALIDATOR = sVolumeValidator; + /** * Master volume mute (int 1 = mute, 0 = not muted). * @@ -2138,6 +2322,8 @@ public final class Settings { */ public static final String VOLUME_MASTER_MUTE = "volume_master_mute"; + private static final Validator VOLUME_MASTER_MUTE_VALIDATOR = sBooleanValidator; + /** * Microphone mute (int 1 = mute, 0 = not muted). * @@ -2145,6 +2331,8 @@ public final class Settings { */ public static final String MICROPHONE_MUTE = "microphone_mute"; + private static final Validator MICROPHONE_MUTE_VALIDATOR = sBooleanValidator; + /** * Whether the notifications should use the ring volume (value of 1) or * a separate notification volume (value of 0). In most cases, users @@ -2163,6 +2351,8 @@ public final class Settings { public static final String NOTIFICATIONS_USE_RING_VOLUME = "notifications_use_ring_volume"; + private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator; + /** * Whether silent mode should allow vibration feedback. This is used * internally in AudioService and the Sound settings activity to @@ -2177,6 +2367,8 @@ public final class Settings { */ public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; + private static final Validator VIBRATE_IN_SILENT_VALIDATOR = sBooleanValidator; + /** * The mapping of stream type (integer) to its setting. */ @@ -2203,6 +2395,8 @@ public final class Settings { */ public static final String RINGTONE = "ringtone"; + private static final Validator RINGTONE_VALIDATOR = sUriValidator; + /** * A {@link Uri} that will point to the current default ringtone at any * given time. @@ -2221,6 +2415,8 @@ public final class Settings { */ public static final String NOTIFICATION_SOUND = "notification_sound"; + private static final Validator NOTIFICATION_SOUND_VALIDATOR = sUriValidator; + /** * A {@link Uri} that will point to the current default notification * sound at any given time. @@ -2237,6 +2433,8 @@ public final class Settings { */ public static final String ALARM_ALERT = "alarm_alert"; + private static final Validator ALARM_ALERT_VALIDATOR = sUriValidator; + /** * A {@link Uri} that will point to the current default alarm alert at * any given time. @@ -2252,30 +2450,52 @@ public final class Settings { */ public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; + private static final Validator MEDIA_BUTTON_RECEIVER_VALIDATOR = new Validator() { + @Override + public boolean validate(String value) { + try { + ComponentName.unflattenFromString(value); + return true; + } catch (NullPointerException e) { + return false; + } + } + }; + /** * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off */ public static final String TEXT_AUTO_REPLACE = "auto_replace"; + private static final Validator TEXT_AUTO_REPLACE_VALIDATOR = sBooleanValidator; + /** * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off */ public static final String TEXT_AUTO_CAPS = "auto_caps"; + private static final Validator TEXT_AUTO_CAPS_VALIDATOR = sBooleanValidator; + /** * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This * feature converts two spaces to a "." and space. */ public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; + private static final Validator TEXT_AUTO_PUNCTUATE_VALIDATOR = sBooleanValidator; + /** * Setting to showing password characters in text editors. 1 = On, 0 = Off */ public static final String TEXT_SHOW_PASSWORD = "show_password"; + private static final Validator TEXT_SHOW_PASSWORD_VALIDATOR = sBooleanValidator; + public static final String SHOW_GTALK_SERVICE_STATUS = "SHOW_GTALK_SERVICE_STATUS"; + private static final Validator SHOW_GTALK_SERVICE_STATUS_VALIDATOR = sBooleanValidator; + /** * Name of activity to use for wallpaper on the home screen. * @@ -2284,6 +2504,18 @@ public final class Settings { @Deprecated public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; + private static final Validator WALLPAPER_ACTIVITY_VALIDATOR = new Validator() { + private static final int MAX_LENGTH = 1000; + + @Override + public boolean validate(String value) { + if (value != null && value.length() > MAX_LENGTH) { + return false; + } + return ComponentName.unflattenFromString(value) != null; + } + }; + /** * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} * instead @@ -2305,6 +2537,10 @@ public final class Settings { */ public static final String TIME_12_24 = "time_12_24"; + /** @hide */ + public static final Validator TIME_12_24_VALIDATOR = + new DiscreteValueValidator(new String[] {"12", "24"}); + /** * Date format string * mm/dd/yyyy @@ -2313,6 +2549,19 @@ public final class Settings { */ public static final String DATE_FORMAT = "date_format"; + /** @hide */ + public static final Validator DATE_FORMAT_VALIDATOR = new Validator() { + @Override + public boolean validate(String value) { + try { + new SimpleDateFormat(value); + return true; + } catch (IllegalArgumentException e) { + return false; + } + } + }; + /** * Whether the setup wizard has been run before (on first boot), or if * it still needs to be run. @@ -2322,6 +2571,9 @@ public final class Settings { */ public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; + /** @hide */ + public static final Validator SETUP_WIZARD_HAS_RUN_VALIDATOR = sBooleanValidator; + /** * Scaling factor for normal window animations. Setting to 0 will disable window * animations. @@ -2358,6 +2610,9 @@ public final class Settings { */ public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; + /** @hide */ + public static final Validator ACCELEROMETER_ROTATION_VALIDATOR = sBooleanValidator; + /** * Default screen rotation when no other policy applies. * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a @@ -2368,6 +2623,10 @@ public final class Settings { */ public static final String USER_ROTATION = "user_rotation"; + /** @hide */ + public static final Validator USER_ROTATION_VALIDATOR = + new InclusiveIntegerRangeValidator(0, 3); + /** * Control whether the rotation lock toggle in the System UI should be hidden. * Typically this is done for accessibility purposes to make it harder for @@ -2382,6 +2641,10 @@ public final class Settings { public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = "hide_rotation_lock_toggle_for_accessibility"; + /** @hide */ + public static final Validator HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR = + sBooleanValidator; + /** * Whether the phone vibrates when it is ringing due to an incoming call. This will * be used by Phone and Setting apps; it shouldn't affect other apps. @@ -2396,12 +2659,18 @@ public final class Settings { */ public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; + /** @hide */ + public static final Validator VIBRATE_WHEN_RINGING_VALIDATOR = sBooleanValidator; + /** * Whether the audible DTMF tones are played by the dialer when dialing. The value is * boolean (1 or 0). */ public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; + /** @hide */ + public static final Validator DTMF_TONE_WHEN_DIALING_VALIDATOR = sBooleanValidator; + /** * CDMA only settings * DTMF tone type played by the dialer when dialing. @@ -2411,6 +2680,9 @@ public final class Settings { */ public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; + /** @hide */ + public static final Validator DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR = sBooleanValidator; + /** * Whether the hearing aid is enabled. The value is * boolean (1 or 0). @@ -2418,6 +2690,9 @@ public final class Settings { */ public static final String HEARING_AID = "hearing_aid"; + /** @hide */ + public static final Validator HEARING_AID_VALIDATOR = sBooleanValidator; + /** * CDMA only settings * TTY Mode @@ -2429,18 +2704,27 @@ public final class Settings { */ public static final String TTY_MODE = "tty_mode"; + /** @hide */ + public static final Validator TTY_MODE_VALIDATOR = new InclusiveIntegerRangeValidator(0, 3); + /** * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is * boolean (1 or 0). */ public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; + /** @hide */ + public static final Validator SOUND_EFFECTS_ENABLED_VALIDATOR = sBooleanValidator; + /** * Whether the haptic feedback (long presses, ...) are enabled. The value is * boolean (1 or 0). */ public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; + /** @hide */ + public static final Validator HAPTIC_FEEDBACK_ENABLED_VALIDATOR = sBooleanValidator; + /** * @deprecated Each application that shows web suggestions should have its own * setting for this. @@ -2448,6 +2732,9 @@ public final class Settings { @Deprecated public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; + /** @hide */ + public static final Validator SHOW_WEB_SUGGESTIONS_VALIDATOR = sBooleanValidator; + /** * Whether the notification LED should repeatedly flash when a notification is * pending. The value is boolean (1 or 0). @@ -2455,6 +2742,9 @@ public final class Settings { */ public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; + /** @hide */ + public static final Validator NOTIFICATION_LIGHT_PULSE_VALIDATOR = sBooleanValidator; + /** * Show pointer location on screen? * 0 = no @@ -2463,6 +2753,9 @@ public final class Settings { */ public static final String POINTER_LOCATION = "pointer_location"; + /** @hide */ + public static final Validator POINTER_LOCATION_VALIDATOR = sBooleanValidator; + /** * Show touch positions on screen? * 0 = no @@ -2471,6 +2764,9 @@ public final class Settings { */ public static final String SHOW_TOUCHES = "show_touches"; + /** @hide */ + public static final Validator SHOW_TOUCHES_VALIDATOR = sBooleanValidator; + /** * Log raw orientation data from * {@link com.android.server.policy.WindowOrientationListener} for use with the @@ -2482,6 +2778,9 @@ public final class Settings { public static final String WINDOW_ORIENTATION_LISTENER_LOG = "window_orientation_listener_log"; + /** @hide */ + public static final Validator WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR = sBooleanValidator; + /** * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} * instead @@ -2504,12 +2803,18 @@ public final class Settings { */ public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; + /** @hide */ + public static final Validator LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR = sBooleanValidator; + /** * Whether the lockscreen should be completely disabled. * @hide */ public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; + /** @hide */ + public static final Validator LOCKSCREEN_DISABLED_VALIDATOR = sBooleanValidator; + /** * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} * instead @@ -2574,6 +2879,9 @@ public final class Settings { */ public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; + /** @hide */ + public static final Validator SIP_RECEIVE_CALLS_VALIDATOR = sBooleanValidator; + /** * Call Preference String. * "SIP_ALWAYS" : Always use SIP with network access @@ -2582,18 +2890,28 @@ public final class Settings { */ public static final String SIP_CALL_OPTIONS = "sip_call_options"; + /** @hide */ + public static final Validator SIP_CALL_OPTIONS_VALIDATOR = new DiscreteValueValidator( + new String[] {"SIP_ALWAYS", "SIP_ADDRESS_ONLY"}); + /** * One of the sip call options: Always use SIP with network access. * @hide */ public static final String SIP_ALWAYS = "SIP_ALWAYS"; + /** @hide */ + public static final Validator SIP_ALWAYS_VALIDATOR = sBooleanValidator; + /** * One of the sip call options: Only if destination is a SIP address. * @hide */ public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; + /** @hide */ + public static final Validator SIP_ADDRESS_ONLY_VALIDATOR = sBooleanValidator; + /** * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that * the user should be prompted each time a call is made whether it should be placed using @@ -2604,6 +2922,9 @@ public final class Settings { @Deprecated public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; + /** @hide */ + public static final Validator SIP_ASK_ME_EACH_TIME_VALIDATOR = sBooleanValidator; + /** * Pointer speed setting. * This is an integer value in a range between -7 and +7, so there are 15 possible values. @@ -2614,12 +2935,19 @@ public final class Settings { */ public static final String POINTER_SPEED = "pointer_speed"; + /** @hide */ + public static final Validator POINTER_SPEED_VALIDATOR = + new InclusiveFloatRangeValidator(-7, 7); + /** * Whether lock-to-app will be triggered by long-press on recents. * @hide */ public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; + /** @hide */ + public static final Validator LOCK_TO_APP_ENABLED_VALIDATOR = sBooleanValidator; + /** * I am the lolrus. * <p> @@ -2629,6 +2957,16 @@ public final class Settings { */ public static final String EGG_MODE = "egg_mode"; + /** @hide */ + public static final Validator EGG_MODE_VALIDATOR = sBooleanValidator; + + /** + * IMPORTANT: If you add a new public settings you also have to add it to + * PUBLIC_SETTINGS below. If the new setting is hidden you have to add + * it to PRIVATE_SETTINGS below. Also add a validator that can validate + * the setting value. See an example above. + */ + /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. @@ -2699,17 +3037,207 @@ public final class Settings { }; /** + * These are all pulbic system settings + * + * @hide + */ + public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>(); + static { + PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR); + PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP); + PUBLIC_SETTINGS.add(WIFI_STATIC_IP); + PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY); + PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK); + PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1); + PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2); + PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY); + PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT); + PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED); + PUBLIC_SETTINGS.add(FONT_SCALE); + PUBLIC_SETTINGS.add(DIM_SCREEN); + PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT); + PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS); + PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE); + PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED); + PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED); + PUBLIC_SETTINGS.add(VIBRATE_ON); + PUBLIC_SETTINGS.add(VOLUME_RING); + PUBLIC_SETTINGS.add(VOLUME_SYSTEM); + PUBLIC_SETTINGS.add(VOLUME_VOICE); + PUBLIC_SETTINGS.add(VOLUME_MUSIC); + PUBLIC_SETTINGS.add(VOLUME_ALARM); + PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION); + PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO); + PUBLIC_SETTINGS.add(RINGTONE); + PUBLIC_SETTINGS.add(NOTIFICATION_SOUND); + PUBLIC_SETTINGS.add(ALARM_ALERT); + PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE); + PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS); + PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE); + PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD); + PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS); + PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY); + PUBLIC_SETTINGS.add(TIME_12_24); + PUBLIC_SETTINGS.add(DATE_FORMAT); + PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN); + PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION); + PUBLIC_SETTINGS.add(USER_ROTATION); + PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING); + PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED); + PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); + PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS); + } + + /** + * These are all hidden system settings. + * + * @hide + */ + public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>(); + static { + PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP); + PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR); + PRIVATE_SETTINGS.add(ADVANCED_SETTINGS); + PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ); + PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES); + PRIVATE_SETTINGS.add(VOLUME_MASTER); + PRIVATE_SETTINGS.add(VOLUME_MASTER_MUTE); + PRIVATE_SETTINGS.add(MICROPHONE_MUTE); + PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME); + PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT); + PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER); + PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY); + PRIVATE_SETTINGS.add(VIBRATE_WHEN_RINGING); + PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING); + PRIVATE_SETTINGS.add(HEARING_AID); + PRIVATE_SETTINGS.add(TTY_MODE); + PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE); + PRIVATE_SETTINGS.add(POINTER_LOCATION); + PRIVATE_SETTINGS.add(SHOW_TOUCHES); + PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG); + PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED); + PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED); + PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED); + PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED); + PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND); + PRIVATE_SETTINGS.add(DESK_DOCK_SOUND); + PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND); + PRIVATE_SETTINGS.add(CAR_DOCK_SOUND); + PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND); + PRIVATE_SETTINGS.add(LOCK_SOUND); + PRIVATE_SETTINGS.add(UNLOCK_SOUND); + PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS); + PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS); + PRIVATE_SETTINGS.add(SIP_ALWAYS); + PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY); + PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME); + PRIVATE_SETTINGS.add(POINTER_SPEED); + PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); + PRIVATE_SETTINGS.add(EGG_MODE); + } + + /** + * These are all pulbic system settings + * + * @hide + */ + public static final Map<String, Validator> VALIDATORS = new ArrayMap<>(); + static { + VALIDATORS.put(END_BUTTON_BEHAVIOR,END_BUTTON_BEHAVIOR_VALIDATOR); + VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR); + VALIDATORS.put(BLUETOOTH_DISCOVERABILITY, BLUETOOTH_DISCOVERABILITY_VALIDATOR); + VALIDATORS.put(BLUETOOTH_DISCOVERABILITY_TIMEOUT, + BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR); + VALIDATORS.put(NEXT_ALARM_FORMATTED, NEXT_ALARM_FORMATTED_VALIDATOR); + VALIDATORS.put(FONT_SCALE, FONT_SCALE_VALIDATOR); + VALIDATORS.put(DIM_SCREEN, DIM_SCREEN_VALIDATOR); + VALIDATORS.put(SCREEN_OFF_TIMEOUT, SCREEN_OFF_TIMEOUT_VALIDATOR); + VALIDATORS.put(SCREEN_BRIGHTNESS, SCREEN_BRIGHTNESS_VALIDATOR); + VALIDATORS.put(SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_VALIDATOR); + VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR); + VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR); + VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR); + VALIDATORS.put(VOLUME_RING, VOLUME_RING_VALIDATOR); + VALIDATORS.put(VOLUME_SYSTEM, VOLUME_SYSTEM_VALIDATOR); + VALIDATORS.put(VOLUME_VOICE, VOLUME_VOICE_VALIDATOR); + VALIDATORS.put(VOLUME_MUSIC, VOLUME_MUSIC_VALIDATOR); + VALIDATORS.put(VOLUME_ALARM, VOLUME_ALARM_VALIDATOR); + VALIDATORS.put(VOLUME_NOTIFICATION, VOLUME_NOTIFICATION_VALIDATOR); + VALIDATORS.put(VOLUME_BLUETOOTH_SCO, VOLUME_BLUETOOTH_SCO_VALIDATOR); + VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR); + VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR); + VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR); + VALIDATORS.put(TEXT_AUTO_REPLACE, TEXT_AUTO_REPLACE_VALIDATOR); + VALIDATORS.put(TEXT_AUTO_CAPS, TEXT_AUTO_CAPS_VALIDATOR); + VALIDATORS.put(TEXT_AUTO_PUNCTUATE, TEXT_AUTO_PUNCTUATE_VALIDATOR); + VALIDATORS.put(TEXT_SHOW_PASSWORD, TEXT_SHOW_PASSWORD_VALIDATOR); + VALIDATORS.put(SHOW_GTALK_SERVICE_STATUS, SHOW_GTALK_SERVICE_STATUS_VALIDATOR); + VALIDATORS.put(WALLPAPER_ACTIVITY, WALLPAPER_ACTIVITY_VALIDATOR); + VALIDATORS.put(TIME_12_24, TIME_12_24_VALIDATOR); + VALIDATORS.put(DATE_FORMAT, DATE_FORMAT_VALIDATOR); + VALIDATORS.put(SETUP_WIZARD_HAS_RUN, SETUP_WIZARD_HAS_RUN_VALIDATOR); + VALIDATORS.put(ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION_VALIDATOR); + VALIDATORS.put(USER_ROTATION, USER_ROTATION_VALIDATOR); + VALIDATORS.put(DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING_VALIDATOR); + VALIDATORS.put(SOUND_EFFECTS_ENABLED, SOUND_EFFECTS_ENABLED_VALIDATOR); + VALIDATORS.put(HAPTIC_FEEDBACK_ENABLED, HAPTIC_FEEDBACK_ENABLED_VALIDATOR); + VALIDATORS.put(SHOW_WEB_SUGGESTIONS, SHOW_WEB_SUGGESTIONS_VALIDATOR); + VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR); + VALIDATORS.put(END_BUTTON_BEHAVIOR, END_BUTTON_BEHAVIOR_VALIDATOR); + VALIDATORS.put(ADVANCED_SETTINGS, ADVANCED_SETTINGS_VALIDATOR); + VALIDATORS.put(SCREEN_AUTO_BRIGHTNESS_ADJ, SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR); + VALIDATORS.put(VIBRATE_INPUT_DEVICES, VIBRATE_INPUT_DEVICES_VALIDATOR); + VALIDATORS.put(VOLUME_MASTER, VOLUME_MASTER_VALIDATOR); + VALIDATORS.put(VOLUME_MASTER_MUTE, VOLUME_MASTER_MUTE_VALIDATOR); + VALIDATORS.put(MICROPHONE_MUTE, MICROPHONE_MUTE_VALIDATOR); + VALIDATORS.put(NOTIFICATIONS_USE_RING_VOLUME, NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR); + VALIDATORS.put(VIBRATE_IN_SILENT, VIBRATE_IN_SILENT_VALIDATOR); + VALIDATORS.put(MEDIA_BUTTON_RECEIVER, MEDIA_BUTTON_RECEIVER_VALIDATOR); + VALIDATORS.put(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, + HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR); + VALIDATORS.put(VIBRATE_WHEN_RINGING, VIBRATE_WHEN_RINGING_VALIDATOR); + VALIDATORS.put(DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR); + VALIDATORS.put(HEARING_AID, HEARING_AID_VALIDATOR); + VALIDATORS.put(TTY_MODE, TTY_MODE_VALIDATOR); + VALIDATORS.put(NOTIFICATION_LIGHT_PULSE, NOTIFICATION_LIGHT_PULSE_VALIDATOR); + VALIDATORS.put(POINTER_LOCATION, POINTER_LOCATION_VALIDATOR); + VALIDATORS.put(SHOW_TOUCHES, SHOW_TOUCHES_VALIDATOR); + VALIDATORS.put(WINDOW_ORIENTATION_LISTENER_LOG, + WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR); + VALIDATORS.put(LOCKSCREEN_SOUNDS_ENABLED, LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR); + VALIDATORS.put(LOCKSCREEN_DISABLED, LOCKSCREEN_DISABLED_VALIDATOR); + VALIDATORS.put(SIP_RECEIVE_CALLS, SIP_RECEIVE_CALLS_VALIDATOR); + VALIDATORS.put(SIP_CALL_OPTIONS, SIP_CALL_OPTIONS_VALIDATOR); + VALIDATORS.put(SIP_ALWAYS, SIP_ALWAYS_VALIDATOR); + VALIDATORS.put(SIP_ADDRESS_ONLY, SIP_ADDRESS_ONLY_VALIDATOR); + VALIDATORS.put(SIP_ASK_ME_EACH_TIME, SIP_ASK_ME_EACH_TIME_VALIDATOR); + VALIDATORS.put(POINTER_SPEED, POINTER_SPEED_VALIDATOR); + VALIDATORS.put(LOCK_TO_APP_ENABLED, LOCK_TO_APP_ENABLED_VALIDATOR); + VALIDATORS.put(EGG_MODE, EGG_MODE_VALIDATOR); + VALIDATORS.put(WIFI_STATIC_IP, WIFI_STATIC_IP_VALIDATOR); + VALIDATORS.put(WIFI_STATIC_GATEWAY, WIFI_STATIC_GATEWAY_VALIDATOR); + VALIDATORS.put(WIFI_STATIC_NETMASK, WIFI_STATIC_NETMASK_VALIDATOR); + VALIDATORS.put(WIFI_STATIC_DNS1, WIFI_STATIC_DNS1_VALIDATOR); + VALIDATORS.put(WIFI_STATIC_DNS2, WIFI_STATIC_DNS2_VALIDATOR); + } + + /** * These entries are considered common between the personal and the managed profile, * since the managed profile doesn't get to change them. - * @hide */ - public static final String[] CLONE_TO_MANAGED_PROFILE = { - DATE_FORMAT, - HAPTIC_FEEDBACK_ENABLED, - SOUND_EFFECTS_ENABLED, - TEXT_SHOW_PASSWORD, - TIME_12_24 - }; + private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); + static { + CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT); + CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED); + CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED); + CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD); + CLONE_TO_MANAGED_PROFILE.add(TIME_12_24); + } + + /** @hide */ + public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { + outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); + } /** * When to use Wi-Fi calling @@ -3099,7 +3627,7 @@ public final class Settings { } /** @hide */ - public static void getMovedKeys(HashSet<String> outKeySet) { + public static void getMovedToGlobalSettings(Set<String> outKeySet) { outKeySet.addAll(MOVED_TO_GLOBAL); } @@ -4762,6 +5290,10 @@ public final class Settings { public static final String BAR_SERVICE_COMPONENT = "bar_service_component"; /** @hide */ + public static final String VOLUME_CONTROLLER_SERVICE_COMPONENT + = "volume_controller_service_component"; + + /** @hide */ public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; /** @@ -4896,22 +5428,27 @@ public final class Settings { /** * These entries are considered common between the personal and the managed profile, * since the managed profile doesn't get to change them. - * @hide */ - public static final String[] CLONE_TO_MANAGED_PROFILE = { - ACCESSIBILITY_ENABLED, - ALLOW_MOCK_LOCATION, - ALLOWED_GEOLOCATION_ORIGINS, - DEFAULT_INPUT_METHOD, - ENABLED_ACCESSIBILITY_SERVICES, - ENABLED_INPUT_METHODS, - LOCATION_MODE, - LOCATION_PROVIDERS_ALLOWED, - LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, - SELECTED_INPUT_METHOD_SUBTYPE, - SELECTED_SPELL_CHECKER, - SELECTED_SPELL_CHECKER_SUBTYPE - }; + private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); + static { + CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED); + CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION); + CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS); + CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD); + CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES); + CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS); + CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE); + CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED); + CLONE_TO_MANAGED_PROFILE.add(LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS); + CLONE_TO_MANAGED_PROFILE.add(SELECTED_INPUT_METHOD_SUBTYPE); + CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER); + CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER_SUBTYPE); + } + + /** @hide */ + public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { + outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); + } /** * Helper method for determining if a location provider is enabled. @@ -6693,6 +7230,11 @@ public final class Settings { MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS); } + /** @hide */ + public static void getMovedToSecureSettings(Set<String> outKeySet) { + outKeySet.addAll(MOVED_TO_SECURE); + } + /** * Look up a name in the database. * @param resolver to access the database with diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java index 3c57dda..fa5ac42 100644 --- a/core/java/android/service/dreams/DreamService.java +++ b/core/java/android/service/dreams/DreamService.java @@ -18,6 +18,7 @@ package android.service.dreams; import java.io.FileDescriptor; import java.io.PrintWriter; +import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.app.AlarmManager; @@ -442,6 +443,7 @@ public class DreamService extends Service implements Window.Callback { * * @return The view if found or null otherwise. */ + @Nullable public View findViewById(int id) { return getWindow().findViewById(id); } diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index 3d39b18..0860153 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -77,6 +77,14 @@ public abstract class NotificationListenerService extends Service { */ public static final int INTERRUPTION_FILTER_NONE = 3; + /** {@link #getCurrentInterruptionFilter() Interruption filter} constant - returned when + * the value is unavailable for any reason. For example, before the notification listener + * is connected. + * + * {@see #onListenerConnected()} + */ + public static final int INTERRUPTION_FILTER_UNKNOWN = 0; + /** {@link #getCurrentListenerHints() Listener hints} constant - the primary device UI * should disable notification sound, vibrating and other visual or aural effects. * This does not change the interruption filter, only the effects. **/ @@ -473,15 +481,16 @@ public abstract class NotificationListenerService extends Service { * <p> * Listen for updates using {@link #onInterruptionFilterChanged(int)}. * - * @return One of the INTERRUPTION_FILTER_ constants, or 0 on errors. + * @return One of the INTERRUPTION_FILTER_ constants, or INTERRUPTION_FILTER_UNKNOWN when + * unavailable. */ public final int getCurrentInterruptionFilter() { - if (!isBound()) return 0; + if (!isBound()) return INTERRUPTION_FILTER_UNKNOWN; try { return getNotificationInterface().getInterruptionFilterFromListener(mWrapper); } catch (android.os.RemoteException ex) { Log.v(TAG, "Unable to contact notification manager", ex); - return 0; + return INTERRUPTION_FILTER_UNKNOWN; } } diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java index 06df683..7ce44e1 100644 --- a/core/java/android/text/SpannableStringBuilder.java +++ b/core/java/android/text/SpannableStringBuilder.java @@ -26,6 +26,7 @@ import com.android.internal.util.GrowingArrayUtils; import libcore.util.EmptyArray; import java.lang.reflect.Array; +import java.util.IdentityHashMap; /** * This is the class for text whose content and markup can both be changed. @@ -68,6 +69,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanStarts = EmptyArray.INT; mSpanEnds = EmptyArray.INT; mSpanFlags = EmptyArray.INT; + mSpanMax = EmptyArray.INT; if (text instanceof Spanned) { Spanned sp = (Spanned) text; @@ -94,6 +96,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable setSpan(false, spans[i], st, en, fl); } + restoreInvariants(); } } @@ -147,9 +150,12 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable if (mGapLength < 1) new Exception("mGapLength < 1").printStackTrace(); - for (int i = 0; i < mSpanCount; i++) { - if (mSpanStarts[i] > mGapStart) mSpanStarts[i] += delta; - if (mSpanEnds[i] > mGapStart) mSpanEnds[i] += delta; + if (mSpanCount != 0) { + for (int i = 0; i < mSpanCount; i++) { + if (mSpanStarts[i] > mGapStart) mSpanStarts[i] += delta; + if (mSpanEnds[i] > mGapStart) mSpanEnds[i] += delta; + } + calcMax(treeRoot()); } } @@ -167,35 +173,38 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable System.arraycopy(mText, where + mGapLength - overlap, mText, mGapStart, overlap); } - // XXX be more clever - for (int i = 0; i < mSpanCount; i++) { - int start = mSpanStarts[i]; - int end = mSpanEnds[i]; - - if (start > mGapStart) - start -= mGapLength; - if (start > where) - start += mGapLength; - else if (start == where) { - int flag = (mSpanFlags[i] & START_MASK) >> START_SHIFT; + // TODO: be more clever (although the win really isn't that big) + if (mSpanCount != 0) { + for (int i = 0; i < mSpanCount; i++) { + int start = mSpanStarts[i]; + int end = mSpanEnds[i]; - if (flag == POINT || (atEnd && flag == PARAGRAPH)) + if (start > mGapStart) + start -= mGapLength; + if (start > where) start += mGapLength; - } + else if (start == where) { + int flag = (mSpanFlags[i] & START_MASK) >> START_SHIFT; - if (end > mGapStart) - end -= mGapLength; - if (end > where) - end += mGapLength; - else if (end == where) { - int flag = (mSpanFlags[i] & END_MASK); + if (flag == POINT || (atEnd && flag == PARAGRAPH)) + start += mGapLength; + } - if (flag == POINT || (atEnd && flag == PARAGRAPH)) + if (end > mGapStart) + end -= mGapLength; + if (end > where) end += mGapLength; - } + else if (end == where) { + int flag = (mSpanFlags[i] & END_MASK); + + if (flag == POINT || (atEnd && flag == PARAGRAPH)) + end += mGapLength; + } - mSpanStarts[i] = start; - mSpanEnds[i] = end; + mSpanStarts[i] = start; + mSpanEnds[i] = end; + } + calcMax(treeRoot()); } mGapStart = where; @@ -243,6 +252,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable sendSpanRemoved(what, ostart, oend); } + if (mIndexOfSpan != null) { + mIndexOfSpan.clear(); + } } // Documentation from interface @@ -277,12 +289,39 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable return append(String.valueOf(text)); } + // Returns true if a node was removed (so we can restart search from root) + private boolean removeSpansForChange(int start, int end, boolean textIsRemoved, int i) { + if ((i & 1) != 0) { + // internal tree node + if (resolveGap(mSpanMax[i]) >= start && + removeSpansForChange(start, end, textIsRemoved, leftChild(i))) { + return true; + } + } + if (i < mSpanCount) { + if ((mSpanFlags[i] & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == + Spanned.SPAN_EXCLUSIVE_EXCLUSIVE && + mSpanStarts[i] >= start && mSpanStarts[i] < mGapStart + mGapLength && + mSpanEnds[i] >= start && mSpanEnds[i] < mGapStart + mGapLength && + // The following condition indicates that the span would become empty + (textIsRemoved || mSpanStarts[i] > start || mSpanEnds[i] < mGapStart)) { + mIndexOfSpan.remove(mSpans[i]); + removeSpan(i); + return true; + } + return resolveGap(mSpanStarts[i]) <= end && (i & 1) != 0 && + removeSpansForChange(start, end, textIsRemoved, rightChild(i)); + } + return false; + } + private void change(int start, int end, CharSequence cs, int csStart, int csEnd) { // Can be negative final int replacedLength = end - start; final int replacementLength = csEnd - csStart; final int nbNewChars = replacementLength - replacedLength; + boolean changed = false; for (int i = mSpanCount - 1; i >= 0; i--) { int spanStart = mSpanStarts[i]; if (spanStart > mGapStart) @@ -309,8 +348,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable break; } - if (spanStart != ost || spanEnd != oen) + if (spanStart != ost || spanEnd != oen) { setSpan(false, mSpans[i], spanStart, spanEnd, mSpanFlags[i]); + changed = true; + } } int flags = 0; @@ -320,6 +361,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable else if (spanEnd == end + nbNewChars) flags |= SPAN_END_AT_END; mSpanFlags[i] |= flags; } + if (changed) { + restoreInvariants(); + } moveGapTo(end); @@ -331,23 +375,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable // The removal pass needs to be done before the gap is updated in order to broadcast the // correct previous positions to the correct intersecting SpanWatchers if (replacedLength > 0) { // no need for span fixup on pure insertion - // A for loop will not work because the array is being modified - // Do not iterate in reverse to keep the SpanWatchers notified in ordering - // Also, a removed SpanWatcher should not get notified of removed spans located - // further in the span array. - int i = 0; - while (i < mSpanCount) { - if ((mSpanFlags[i] & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == - Spanned.SPAN_EXCLUSIVE_EXCLUSIVE && - mSpanStarts[i] >= start && mSpanStarts[i] < mGapStart + mGapLength && - mSpanEnds[i] >= start && mSpanEnds[i] < mGapStart + mGapLength && - // This condition indicates that the span would become empty - (textIsRemoved || mSpanStarts[i] > start || mSpanEnds[i] < mGapStart)) { - removeSpan(i); - continue; // do not increment i, spans will be shifted left in the array - } - - i++; + while (mSpanCount > 0 && + removeSpansForChange(start, end, textIsRemoved, treeRoot())) { + // keep deleting spans as needed, and restart from root after every deletion + // because deletion can invalidate an index. } } @@ -360,6 +391,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable TextUtils.getChars(cs, csStart, csEnd, mText, start); if (replacedLength > 0) { // no need for span fixup on pure insertion + // TODO potential optimization: only update bounds on intersecting spans final boolean atEnd = (mGapStart + mGapLength == mText.length); for (int i = 0; i < mSpanCount; i++) { @@ -371,10 +403,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanEnds[i] = updatedIntervalBound(mSpanEnds[i], start, nbNewChars, endFlag, atEnd, textIsRemoved); } + // TODO potential optimization: only fix up invariants when bounds actually changed + restoreInvariants(); } - mSpanCountBeforeAdd = mSpanCount; - if (cs instanceof Spanned) { Spanned sp = (Spanned) cs; Object[] spans = sp.getSpans(csStart, csEnd, Object.class); @@ -389,9 +421,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable // Add span only if this object is not yet used as a span in this string if (getSpanStart(spans[i]) < 0) { setSpan(false, spans[i], st - csStart + start, en - csStart + start, - sp.getSpanFlags(spans[i])); + sp.getSpanFlags(spans[i]) | SPAN_ADDED); } } + restoreInvariants(); } } @@ -427,6 +460,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable return offset; } + // Note: caller is responsible for removing the mIndexOfSpan entry. private void removeSpan(int i) { Object object = mSpans[i]; @@ -444,8 +478,12 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanCount--; + invalidateIndex(i); mSpans[mSpanCount] = null; + // Invariants must be restored before sending span removed notifications. + restoreInvariants(); + sendSpanRemoved(object, start, end); } @@ -496,10 +534,12 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable change(start, end, tb, tbstart, tbend); if (adjustSelection) { + boolean changed = false; if (selectionStart > start && selectionStart < end) { final int offset = (selectionStart - start) * newLen / origLen; selectionStart = start + offset; + changed = true; setSpan(false, Selection.SELECTION_START, selectionStart, selectionStart, Spanned.SPAN_POINT_POINT); } @@ -507,9 +547,13 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable final int offset = (selectionEnd - start) * newLen / origLen; selectionEnd = start + offset; + changed = true; setSpan(false, Selection.SELECTION_END, selectionEnd, selectionEnd, Spanned.SPAN_POINT_POINT); } + if (changed) { + restoreInvariants(); + } } sendTextChanged(textWatchers, start, origLen, newLen); @@ -536,12 +580,15 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable } private void sendToSpanWatchers(int replaceStart, int replaceEnd, int nbNewChars) { - for (int i = 0; i < mSpanCountBeforeAdd; i++) { + for (int i = 0; i < mSpanCount; i++) { + int spanFlags = mSpanFlags[i]; + + // This loop handles only modified (not added) spans. + if ((spanFlags & SPAN_ADDED) != 0) continue; int spanStart = mSpanStarts[i]; int spanEnd = mSpanEnds[i]; if (spanStart > mGapStart) spanStart -= mGapLength; if (spanEnd > mGapStart) spanEnd -= mGapLength; - int spanFlags = mSpanFlags[i]; int newReplaceEnd = replaceEnd + nbNewChars; boolean spanChanged = false; @@ -588,13 +635,17 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanFlags[i] &= ~SPAN_START_END_MASK; } - // The spans starting at mIntermediateSpanCount were added from the replacement text - for (int i = mSpanCountBeforeAdd; i < mSpanCount; i++) { - int spanStart = mSpanStarts[i]; - int spanEnd = mSpanEnds[i]; - if (spanStart > mGapStart) spanStart -= mGapLength; - if (spanEnd > mGapStart) spanEnd -= mGapLength; - sendSpanAdded(mSpans[i], spanStart, spanEnd); + // Handle added spans + for (int i = 0; i < mSpanCount; i++) { + int spanFlags = mSpanFlags[i]; + if ((spanFlags & SPAN_ADDED) != 0) { + mSpanFlags[i] &= ~SPAN_ADDED; + int spanStart = mSpanStarts[i]; + int spanEnd = mSpanEnds[i]; + if (spanStart > mGapStart) spanStart -= mGapLength; + if (spanEnd > mGapStart) spanEnd -= mGapLength; + sendSpanAdded(mSpans[i], spanStart, spanEnd); + } } } @@ -607,6 +658,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable setSpan(true, what, start, end, flags); } + // Note: if send is false, then it is the caller's responsibility to restore + // invariants. If send is false and the span already exists, then this method + // will not change the index of any spans. private void setSpan(boolean send, Object what, int start, int end, int flags) { checkRange("setSpan", start, end); @@ -661,8 +715,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable int count = mSpanCount; Object[] spans = mSpans; - for (int i = 0; i < count; i++) { - if (spans[i] == what) { + if (mIndexOfSpan != null) { + Integer index = mIndexOfSpan.get(what); + if (index != null) { + int i = index; int ostart = mSpanStarts[i]; int oend = mSpanEnds[i]; @@ -675,7 +731,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanEnds[i] = end; mSpanFlags[i] = flags; - if (send) sendSpanChanged(what, ostart, oend, nstart, nend); + if (send) { + restoreInvariants(); + sendSpanChanged(what, ostart, oend, nstart, nend); + } return; } @@ -685,43 +744,48 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanStarts = GrowingArrayUtils.append(mSpanStarts, mSpanCount, start); mSpanEnds = GrowingArrayUtils.append(mSpanEnds, mSpanCount, end); mSpanFlags = GrowingArrayUtils.append(mSpanFlags, mSpanCount, flags); + invalidateIndex(mSpanCount); mSpanCount++; + // Make sure there is enough room for empty interior nodes. + // This magic formula computes the size of the smallest perfect binary + // tree no smaller than mSpanCount. + int sizeOfMax = 2 * treeRoot() + 1; + if (mSpanMax.length < sizeOfMax) { + mSpanMax = new int[sizeOfMax]; + } - if (send) sendSpanAdded(what, nstart, nend); + if (send) { + restoreInvariants(); + sendSpanAdded(what, nstart, nend); + } } /** * Remove the specified markup object from the buffer. */ public void removeSpan(Object what) { - for (int i = mSpanCount - 1; i >= 0; i--) { - if (mSpans[i] == what) { - removeSpan(i); - return; - } + if (mIndexOfSpan == null) return; + Integer i = mIndexOfSpan.remove(what); + if (i != null) { + removeSpan(i.intValue()); } } /** + * Return externally visible offset given offset into gapped buffer. + */ + private int resolveGap(int i) { + return i > mGapStart ? i - mGapLength : i; + } + + /** * Return the buffer offset of the beginning of the specified * markup object, or -1 if it is not attached to this buffer. */ public int getSpanStart(Object what) { - int count = mSpanCount; - Object[] spans = mSpans; - - for (int i = count - 1; i >= 0; i--) { - if (spans[i] == what) { - int where = mSpanStarts[i]; - - if (where > mGapStart) - where -= mGapLength; - - return where; - } - } - - return -1; + if (mIndexOfSpan == null) return -1; + Integer i = mIndexOfSpan.get(what); + return i == null ? -1 : resolveGap(mSpanStarts[i]); } /** @@ -729,21 +793,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable * markup object, or -1 if it is not attached to this buffer. */ public int getSpanEnd(Object what) { - int count = mSpanCount; - Object[] spans = mSpans; - - for (int i = count - 1; i >= 0; i--) { - if (spans[i] == what) { - int where = mSpanEnds[i]; - - if (where > mGapStart) - where -= mGapLength; - - return where; - } - } - - return -1; + if (mIndexOfSpan == null) return -1; + Integer i = mIndexOfSpan.get(what); + return i == null ? -1 : resolveGap(mSpanEnds[i]); } /** @@ -751,16 +803,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable * markup object, or 0 if it is not attached to this buffer. */ public int getSpanFlags(Object what) { - int count = mSpanCount; - Object[] spans = mSpans; - - for (int i = count - 1; i >= 0; i--) { - if (spans[i] == what) { - return mSpanFlags[i]; - } - } - - return 0; + if (mIndexOfSpan == null) return 0; + Integer i = mIndexOfSpan.get(what); + return i == null ? 0 : mSpanFlags[i]; } /** @@ -770,59 +815,84 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable */ @SuppressWarnings("unchecked") public <T> T[] getSpans(int queryStart, int queryEnd, Class<T> kind) { - if (kind == null) return ArrayUtils.emptyArray(kind); + if (kind == null || mSpanCount == 0) return ArrayUtils.emptyArray(kind); + int count = countSpans(queryStart, queryEnd, kind, treeRoot()); + if (count == 0) { + return ArrayUtils.emptyArray(kind); + } - int spanCount = mSpanCount; - Object[] spans = mSpans; - int[] starts = mSpanStarts; - int[] ends = mSpanEnds; - int[] flags = mSpanFlags; - int gapstart = mGapStart; - int gaplen = mGapLength; + // Safe conversion, but requires a suppressWarning + T[] ret = (T[]) Array.newInstance(kind, count); + getSpansRec(queryStart, queryEnd, kind, treeRoot(), ret, 0); + return ret; + } + private int countSpans(int queryStart, int queryEnd, Class kind, int i) { int count = 0; - T[] ret = null; - T ret1 = null; - - for (int i = 0; i < spanCount; i++) { - int spanStart = starts[i]; - if (spanStart > gapstart) { - spanStart -= gaplen; + if ((i & 1) != 0) { + // internal tree node + int left = leftChild(i); + int spanMax = mSpanMax[left]; + if (spanMax > mGapStart) { + spanMax -= mGapLength; } - if (spanStart > queryEnd) { - continue; + if (spanMax >= queryStart) { + count = countSpans(queryStart, queryEnd, kind, left); } - - int spanEnd = ends[i]; - if (spanEnd > gapstart) { - spanEnd -= gaplen; + } + if (i < mSpanCount) { + int spanStart = mSpanStarts[i]; + if (spanStart > mGapStart) { + spanStart -= mGapLength; } - if (spanEnd < queryStart) { - continue; + if (spanStart <= queryEnd) { + int spanEnd = mSpanEnds[i]; + if (spanEnd > mGapStart) { + spanEnd -= mGapLength; + } + if (spanEnd >= queryStart && + (spanStart == spanEnd || queryStart == queryEnd || + (spanStart != queryEnd && spanEnd != queryStart)) && + kind.isInstance(mSpans[i])) { + count++; + } + if ((i & 1) != 0) { + count += countSpans(queryStart, queryEnd, kind, rightChild(i)); + } } + } + return count; + } - if (spanStart != spanEnd && queryStart != queryEnd) { - if (spanStart == queryEnd) - continue; - if (spanEnd == queryStart) - continue; + @SuppressWarnings("unchecked") + private <T> int getSpansRec(int queryStart, int queryEnd, Class<T> kind, + int i, T[] ret, int count) { + if ((i & 1) != 0) { + // internal tree node + int left = leftChild(i); + int spanMax = mSpanMax[left]; + if (spanMax > mGapStart) { + spanMax -= mGapLength; } - - // Expensive test, should be performed after the previous tests - if (!kind.isInstance(spans[i])) continue; - - if (count == 0) { - // Safe conversion thanks to the isInstance test above - ret1 = (T) spans[i]; - count++; - } else { - if (count == 1) { - // Safe conversion, but requires a suppressWarning - ret = (T[]) Array.newInstance(kind, spanCount - i + 1); - ret[0] = ret1; - } - - int prio = flags[i] & SPAN_PRIORITY; + if (spanMax >= queryStart) { + count = getSpansRec(queryStart, queryEnd, kind, left, ret, count); + } + } + if (i >= mSpanCount) return count; + int spanStart = mSpanStarts[i]; + if (spanStart > mGapStart) { + spanStart -= mGapLength; + } + if (spanStart <= queryEnd) { + int spanEnd = mSpanEnds[i]; + if (spanEnd > mGapStart) { + spanEnd -= mGapLength; + } + if (spanEnd >= queryStart && + (spanStart == spanEnd || queryStart == queryEnd || + (spanStart != queryEnd && spanEnd != queryStart)) && + kind.isInstance(mSpans[i])) { + int prio = mSpanFlags[i] & SPAN_PRIORITY; if (prio != 0) { int j; @@ -836,32 +906,18 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable System.arraycopy(ret, j, ret, j + 1, count - j); // Safe conversion thanks to the isInstance test above - ret[j] = (T) spans[i]; - count++; + ret[j] = (T) mSpans[i]; } else { // Safe conversion thanks to the isInstance test above - ret[count++] = (T) spans[i]; + ret[count] = (T) mSpans[i]; } + count++; + } + if (count < ret.length && (i & 1) != 0) { + count = getSpansRec(queryStart, queryEnd, kind, rightChild(i), ret, count); } } - - if (count == 0) { - return ArrayUtils.emptyArray(kind); - } - if (count == 1) { - // Safe conversion, but requires a suppressWarning - ret = (T[]) Array.newInstance(kind, 1); - ret[0] = ret1; - return ret; - } - if (count == ret.length) { - return ret; - } - - // Safe conversion, but requires a suppressWarning - T[] nret = (T[]) Array.newInstance(kind, count); - System.arraycopy(ret, 0, nret, 0, count); - return nret; + return count; } /** @@ -870,30 +926,31 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable * begins or ends. */ public int nextSpanTransition(int start, int limit, Class kind) { - int count = mSpanCount; - Object[] spans = mSpans; - int[] starts = mSpanStarts; - int[] ends = mSpanEnds; - int gapstart = mGapStart; - int gaplen = mGapLength; - + if (mSpanCount == 0) return limit; if (kind == null) { kind = Object.class; } + return nextSpanTransitionRec(start, limit, kind, treeRoot()); + } - for (int i = 0; i < count; i++) { - int st = starts[i]; - int en = ends[i]; - - if (st > gapstart) - st -= gaplen; - if (en > gapstart) - en -= gaplen; - - if (st > start && st < limit && kind.isInstance(spans[i])) + private int nextSpanTransitionRec(int start, int limit, Class kind, int i) { + if ((i & 1) != 0) { + // internal tree node + int left = leftChild(i); + if (resolveGap(mSpanMax[left]) > start) { + limit = nextSpanTransitionRec(start, limit, kind, left); + } + } + if (i < mSpanCount) { + int st = resolveGap(mSpanStarts[i]); + int en = resolveGap(mSpanEnds[i]); + if (st > start && st < limit && kind.isInstance(mSpans[i])) limit = st; - if (en > start && en < limit && kind.isInstance(spans[i])) + if (en > start && en < limit && kind.isInstance(mSpans[i])) limit = en; + if (st < limit && (i & 1) != 0) { + limit = nextSpanTransitionRec(start, limit, kind, rightChild(i)); + } } return limit; @@ -1339,6 +1396,118 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable return hash; } + // Primitives for treating span list as binary tree + + // The spans (along with start and end offsets and flags) are stored in linear arrays sorted + // by start offset. For fast searching, there is a binary search structure imposed over these + // arrays. This structure is inorder traversal of a perfect binary tree, a slightly unusual + // but advantageous approach. + + // The value-containing nodes are indexed 0 <= i < n (where n = mSpanCount), thus preserving + // logic that accesses the values as a contiguous array. Other balanced binary tree approaches + // (such as a complete binary tree) would require some shuffling of node indices. + + // Basic properties of this structure: For a perfect binary tree of height m: + // The tree has 2^(m+1) - 1 total nodes. + // The root of the tree has index 2^m - 1. + // All leaf nodes have even index, all interior nodes odd. + // The height of a node of index i is the number of trailing ones in i's binary representation. + // The left child of a node i of height h is i - 2^(h - 1). + // The right child of a node i of height h is i + 2^(h - 1). + + // Note that for arbitrary n, interior nodes of this tree may be >= n. Thus, the general + // structure of a recursive traversal of node i is: + // * traverse left child if i is an interior node + // * process i if i < n + // * traverse right child if i is an interior node and i < n + + private int treeRoot() { + return Integer.highestOneBit(mSpanCount) - 1; + } + + // (i+1) & ~i is equal to 2^(the number of trailing ones in i) + private static int leftChild(int i) { + return i - (((i + 1) & ~i) >> 1); + } + + private static int rightChild(int i) { + return i + (((i + 1) & ~i) >> 1); + } + + // The span arrays are also augmented by an mSpanMax[] array that represents an interval tree + // over the binary tree structure described above. For each node, the mSpanMax[] array contains + // the maximum value of mSpanEnds of that node and its descendants. Thus, traversals can + // easily reject subtrees that contain no spans overlapping the area of interest. + + // Note that mSpanMax[] also has a valid valuefor interior nodes of index >= n, but which have + // descendants of index < n. In these cases, it simply represents the maximum span end of its + // descendants. This is a consequence of the perfect binary tree structure. + private int calcMax(int i) { + int max = 0; + if ((i & 1) != 0) { + // internal tree node + max = calcMax(leftChild(i)); + } + if (i < mSpanCount) { + max = Math.max(max, mSpanEnds[i]); + if ((i & 1) != 0) { + max = Math.max(max, calcMax(rightChild(i))); + } + } + mSpanMax[i] = max; + return max; + } + + // restores binary interval tree invariants after any mutation of span structure + private void restoreInvariants() { + if (mSpanCount == 0) return; + + // invariant 1: span starts are nondecreasing + + // This is a simple insertion sort because we expect it to be mostly sorted. + for (int i = 1; i < mSpanCount; i++) { + if (mSpanStarts[i] < mSpanStarts[i - 1]) { + Object span = mSpans[i]; + int start = mSpanStarts[i]; + int end = mSpanEnds[i]; + int flags = mSpanFlags[i]; + int j = i; + do { + mSpans[j] = mSpans[j - 1]; + mSpanStarts[j] = mSpanStarts[j - 1]; + mSpanEnds[j] = mSpanEnds[j - 1]; + mSpanFlags[j] = mSpanFlags[j - 1]; + j--; + } while (j > 0 && start < mSpanStarts[j - 1]); + mSpans[j] = span; + mSpanStarts[j] = start; + mSpanEnds[j] = end; + mSpanFlags[j] = flags; + invalidateIndex(j); + } + } + + // invariant 2: max is max span end for each node and its descendants + calcMax(treeRoot()); + + // invariant 3: mIndexOfSpan maps spans back to indices + if (mIndexOfSpan == null) { + mIndexOfSpan = new IdentityHashMap<Object, Integer>(); + } + for (int i = mLowWaterMark; i < mSpanCount; i++) { + Integer existing = mIndexOfSpan.get(mSpans[i]); + if (existing == null || existing != i) { + mIndexOfSpan.put(mSpans[i], i); + } + } + mLowWaterMark = Integer.MAX_VALUE; + } + + // Call this on any update to mSpans[], so that mIndexOfSpan can be updated + private void invalidateIndex(int i) { + mLowWaterMark = Math.min(i, mLowWaterMark); + } + private static final InputFilter[] NO_FILTERS = new InputFilter[0]; private InputFilter[] mFilters = NO_FILTERS; @@ -1349,9 +1518,11 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable private Object[] mSpans; private int[] mSpanStarts; private int[] mSpanEnds; + private int[] mSpanMax; // see calcMax() for an explanation of what this array stores private int[] mSpanFlags; private int mSpanCount; - private int mSpanCountBeforeAdd; + private IdentityHashMap<Object, Integer> mIndexOfSpan; + private int mLowWaterMark; // indices below this have not been touched // TODO These value are tightly related to the public SPAN_MARK/POINT values in {@link Spanned} private static final int MARK = 1; @@ -1363,6 +1534,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable private static final int START_SHIFT = 4; // These bits are not (currently) used by SPANNED flags + private static final int SPAN_ADDED = 0x800; private static final int SPAN_START_AT_START = 0x1000; private static final int SPAN_START_AT_END = 0x2000; private static final int SPAN_END_AT_START = 0x4000; diff --git a/core/java/android/text/format/DateUtils.java b/core/java/android/text/format/DateUtils.java index d0ed871..ac98e8a 100644 --- a/core/java/android/text/format/DateUtils.java +++ b/core/java/android/text/format/DateUtils.java @@ -28,9 +28,11 @@ import java.util.Date; import java.util.Formatter; import java.util.GregorianCalendar; import java.util.Locale; +import java.util.TimeZone; import libcore.icu.DateIntervalFormat; import libcore.icu.LocaleData; +import libcore.icu.RelativeDateTimeFormatter; /** * This class contains various date-related utilities for creating text for things like @@ -242,6 +244,8 @@ public class DateUtils /** * Returns a string describing the elapsed time since startTime. + * <p> + * The minimum timespan to report is set to {@link #MINUTE_IN_MILLIS}. * @param startTime some time in the past. * @return a String object containing the elapsed time. * @see #getRelativeTimeSpanString(long, long, long) @@ -289,69 +293,8 @@ public class DateUtils */ public static CharSequence getRelativeTimeSpanString(long time, long now, long minResolution, int flags) { - Resources r = Resources.getSystem(); - boolean abbrevRelative = (flags & (FORMAT_ABBREV_RELATIVE | FORMAT_ABBREV_ALL)) != 0; - - boolean past = (now >= time); - long duration = Math.abs(now - time); - - int resId; - long count; - if (duration < MINUTE_IN_MILLIS && minResolution < MINUTE_IN_MILLIS) { - count = duration / SECOND_IN_MILLIS; - if (past) { - if (abbrevRelative) { - resId = com.android.internal.R.plurals.abbrev_num_seconds_ago; - } else { - resId = com.android.internal.R.plurals.num_seconds_ago; - } - } else { - if (abbrevRelative) { - resId = com.android.internal.R.plurals.abbrev_in_num_seconds; - } else { - resId = com.android.internal.R.plurals.in_num_seconds; - } - } - } else if (duration < HOUR_IN_MILLIS && minResolution < HOUR_IN_MILLIS) { - count = duration / MINUTE_IN_MILLIS; - if (past) { - if (abbrevRelative) { - resId = com.android.internal.R.plurals.abbrev_num_minutes_ago; - } else { - resId = com.android.internal.R.plurals.num_minutes_ago; - } - } else { - if (abbrevRelative) { - resId = com.android.internal.R.plurals.abbrev_in_num_minutes; - } else { - resId = com.android.internal.R.plurals.in_num_minutes; - } - } - } else if (duration < DAY_IN_MILLIS && minResolution < DAY_IN_MILLIS) { - count = duration / HOUR_IN_MILLIS; - if (past) { - if (abbrevRelative) { - resId = com.android.internal.R.plurals.abbrev_num_hours_ago; - } else { - resId = com.android.internal.R.plurals.num_hours_ago; - } - } else { - if (abbrevRelative) { - resId = com.android.internal.R.plurals.abbrev_in_num_hours; - } else { - resId = com.android.internal.R.plurals.in_num_hours; - } - } - } else if (duration < WEEK_IN_MILLIS && minResolution < WEEK_IN_MILLIS) { - return getRelativeDayString(r, time, now); - } else { - // We know that we won't be showing the time, so it is safe to pass - // in a null context. - return formatDateRange(null, time, time, flags); - } - - String format = r.getQuantityString(resId, (int) count); - return String.format(format, count); + return RelativeDateTimeFormatter.getRelativeTimeSpanString(Locale.getDefault(), + TimeZone.getDefault(), time, now, minResolution, flags); } /** @@ -360,8 +303,8 @@ public class DateUtils * <p> * Example output strings for the US date format. * <ul> - * <li>3 mins ago, 10:15 AM</li> - * <li>yesterday, 12:20 PM</li> + * <li>3 min. ago, 10:15 AM</li> + * <li>Yesterday, 12:20 PM</li> * <li>Dec 12, 4:12 AM</li> * <li>11/14/2007, 8:20 AM</li> * </ul> @@ -374,86 +317,19 @@ public class DateUtils * @param transitionResolution the elapsed time (in milliseconds) at which * to stop reporting relative measurements. Elapsed times greater * than this resolution will default to normal date formatting. - * For example, will transition from "6 days ago" to "Dec 12" + * For example, will transition from "7 days ago" to "Dec 12" * when using {@link #WEEK_IN_MILLIS}. */ public static CharSequence getRelativeDateTimeString(Context c, long time, long minResolution, long transitionResolution, int flags) { - Resources r = Resources.getSystem(); - - long now = System.currentTimeMillis(); - long duration = Math.abs(now - time); - - // getRelativeTimeSpanString() doesn't correctly format relative dates - // above a week or exact dates below a day, so clamp - // transitionResolution as needed. - if (transitionResolution > WEEK_IN_MILLIS) { - transitionResolution = WEEK_IN_MILLIS; - } else if (transitionResolution < DAY_IN_MILLIS) { - transitionResolution = DAY_IN_MILLIS; - } - - CharSequence timeClause = formatDateRange(c, time, time, FORMAT_SHOW_TIME); - - String result; - if (duration < transitionResolution) { - CharSequence relativeClause = getRelativeTimeSpanString(time, now, minResolution, flags); - result = r.getString(com.android.internal.R.string.relative_time, relativeClause, timeClause); - } else { - CharSequence dateClause = getRelativeTimeSpanString(c, time, false); - result = r.getString(com.android.internal.R.string.date_time, dateClause, timeClause); - } - - return result; - } - - /** - * Returns a string describing a day relative to the current day. For example if the day is - * today this function returns "Today", if the day was a week ago it returns "7 days ago", and - * if the day is in 2 weeks it returns "in 14 days". - * - * @param r the resources - * @param day the relative day to describe in UTC milliseconds - * @param today the current time in UTC milliseconds - */ - private static final String getRelativeDayString(Resources r, long day, long today) { - Locale locale = r.getConfiguration().locale; - if (locale == null) { - locale = Locale.getDefault(); - } - - // TODO: use TimeZone.getOffset instead. - Time startTime = new Time(); - startTime.set(day); - int startDay = Time.getJulianDay(day, startTime.gmtoff); - - Time currentTime = new Time(); - currentTime.set(today); - int currentDay = Time.getJulianDay(today, currentTime.gmtoff); - - int days = Math.abs(currentDay - startDay); - boolean past = (today > day); - - // TODO: some locales name other days too, such as de_DE's "Vorgestern" (today - 2). - if (days == 1) { - if (past) { - return LocaleData.get(locale).yesterday; - } else { - return LocaleData.get(locale).tomorrow; - } - } else if (days == 0) { - return LocaleData.get(locale).today; - } - - int resId; - if (past) { - resId = com.android.internal.R.plurals.num_days_ago; - } else { - resId = com.android.internal.R.plurals.in_num_days; + // Same reason as in formatDateRange() to explicitly indicate 12- or 24-hour format. + if ((flags & (FORMAT_SHOW_TIME | FORMAT_12HOUR | FORMAT_24HOUR)) == FORMAT_SHOW_TIME) { + flags |= DateFormat.is24HourFormat(c) ? FORMAT_24HOUR : FORMAT_12HOUR; } - String format = r.getQuantityString(resId, days); - return String.format(format, days); + return RelativeDateTimeFormatter.getRelativeDateTimeString(Locale.getDefault(), + TimeZone.getDefault(), time, System.currentTimeMillis(), minResolution, + transitionResolution, flags); } private static void initFormatStrings() { diff --git a/core/java/android/transition/ArcMotion.java b/core/java/android/transition/ArcMotion.java index f95fb49..70dfe7f 100644 --- a/core/java/android/transition/ArcMotion.java +++ b/core/java/android/transition/ArcMotion.java @@ -21,7 +21,6 @@ import android.content.Context; import android.content.res.TypedArray; import android.graphics.Path; import android.util.AttributeSet; -import android.util.FloatMath; /** * A PathMotion that generates a curved path along an arc on an imaginary circle containing @@ -257,7 +256,7 @@ public class ArcMotion extends PathMotion { } if (newArcDistance2 != 0) { float ratio2 = newArcDistance2 / arcDist2; - float ratio = FloatMath.sqrt(ratio2); + float ratio = (float) Math.sqrt(ratio2); ex = dx + (ratio * (ex - dx)); ey = dy + (ratio * (ey - dy)); } diff --git a/core/java/android/transition/CircularPropagation.java b/core/java/android/transition/CircularPropagation.java index 51beb51..1e44cfa 100644 --- a/core/java/android/transition/CircularPropagation.java +++ b/core/java/android/transition/CircularPropagation.java @@ -16,7 +16,6 @@ package android.transition; import android.graphics.Rect; -import android.util.FloatMath; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -87,9 +86,9 @@ public class CircularPropagation extends VisibilityPropagation { epicenterY = Math.round(loc[1] + (sceneRoot.getHeight() / 2) + sceneRoot.getTranslationY()); } - float distance = distance(viewCenterX, viewCenterY, epicenterX, epicenterY); - float maxDistance = distance(0, 0, sceneRoot.getWidth(), sceneRoot.getHeight()); - float distanceFraction = distance/maxDistance; + double distance = distance(viewCenterX, viewCenterY, epicenterX, epicenterY); + double maxDistance = distance(0, 0, sceneRoot.getWidth(), sceneRoot.getHeight()); + double distanceFraction = distance/maxDistance; long duration = transition.getDuration(); if (duration < 0) { @@ -99,9 +98,9 @@ public class CircularPropagation extends VisibilityPropagation { return Math.round(duration * directionMultiplier / mPropagationSpeed * distanceFraction); } - private static float distance(float x1, float y1, float x2, float y2) { - float x = x2 - x1; - float y = y2 - y1; - return FloatMath.sqrt((x * x) + (y * y)); + private static double distance(float x1, float y1, float x2, float y2) { + double x = x2 - x1; + double y = y2 - y1; + return Math.hypot(x, y); } } diff --git a/core/java/android/transition/Explode.java b/core/java/android/transition/Explode.java index 0ccdf15..788676a 100644 --- a/core/java/android/transition/Explode.java +++ b/core/java/android/transition/Explode.java @@ -22,7 +22,6 @@ import android.animation.TimeInterpolator; import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; -import android.util.FloatMath; import android.view.View; import android.view.ViewGroup; import android.view.animation.AccelerateInterpolator; @@ -143,32 +142,29 @@ public class Explode extends Visibility { int centerX = bounds.centerX(); int centerY = bounds.centerY(); - float xVector = centerX - focalX; - float yVector = centerY - focalY; + double xVector = centerX - focalX; + double yVector = centerY - focalY; if (xVector == 0 && yVector == 0) { // Random direction when View is centered on focal View. - xVector = (float) (Math.random() * 2) - 1; - yVector = (float) (Math.random() * 2) - 1; + xVector = (Math.random() * 2) - 1; + yVector = (Math.random() * 2) - 1; } - float vectorSize = calculateDistance(xVector, yVector); + double vectorSize = Math.hypot(xVector, yVector); xVector /= vectorSize; yVector /= vectorSize; - float maxDistance = + double maxDistance = calculateMaxDistance(sceneRoot, focalX - sceneRootX, focalY - sceneRootY); - outVector[0] = Math.round(maxDistance * xVector); - outVector[1] = Math.round(maxDistance * yVector); + outVector[0] = (int) Math.round(maxDistance * xVector); + outVector[1] = (int) Math.round(maxDistance * yVector); } - private static float calculateMaxDistance(View sceneRoot, int focalX, int focalY) { + private static double calculateMaxDistance(View sceneRoot, int focalX, int focalY) { int maxX = Math.max(focalX, sceneRoot.getWidth() - focalX); int maxY = Math.max(focalY, sceneRoot.getHeight() - focalY); - return calculateDistance(maxX, maxY); + return Math.hypot(maxX, maxY); } - private static float calculateDistance(float x, float y) { - return FloatMath.sqrt((x * x) + (y * y)); - } } diff --git a/core/java/android/transition/PatternPathMotion.java b/core/java/android/transition/PatternPathMotion.java index a609df6..773c387 100644 --- a/core/java/android/transition/PatternPathMotion.java +++ b/core/java/android/transition/PatternPathMotion.java @@ -23,7 +23,6 @@ import android.graphics.Matrix; import android.graphics.Path; import android.graphics.PathMeasure; import android.util.AttributeSet; -import android.util.FloatMath; import android.util.PathParser; /** @@ -119,7 +118,7 @@ public class PatternPathMotion extends PathMotion { mTempMatrix.setTranslate(-startX, -startY); float dx = endX - startX; float dy = endY - startY; - float distance = distance(dx, dy); + float distance = (float) Math.hypot(dx, dy); float scale = 1 / distance; mTempMatrix.postScale(scale, scale); double angle = Math.atan2(dy, dx); @@ -130,9 +129,9 @@ public class PatternPathMotion extends PathMotion { @Override public Path getPath(float startX, float startY, float endX, float endY) { - float dx = endX - startX; - float dy = endY - startY; - float length = distance(dx, dy); + double dx = endX - startX; + double dy = endY - startY; + float length = (float) Math.hypot(dx, dy); double angle = Math.atan2(dy, dx); mTempMatrix.setScale(length, length); @@ -143,7 +142,4 @@ public class PatternPathMotion extends PathMotion { return path; } - private static float distance(float x, float y) { - return FloatMath.sqrt((x * x) + (y * y)); - } } diff --git a/core/java/android/transition/SidePropagation.java b/core/java/android/transition/SidePropagation.java index ad6c2dd..5dd1fff 100644 --- a/core/java/android/transition/SidePropagation.java +++ b/core/java/android/transition/SidePropagation.java @@ -16,7 +16,6 @@ package android.transition; import android.graphics.Rect; -import android.util.FloatMath; import android.util.Log; import android.view.Gravity; import android.view.View; diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java index 2705bcf..c942042 100644 --- a/core/java/android/transition/Transition.java +++ b/core/java/android/transition/Transition.java @@ -1762,7 +1762,17 @@ public abstract class Transition implements Cloneable { runAnimators(); } - boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) { + /** + * Returns whether transition values have changed between the start scene and the end scene + * (thus determining whether animation is required). The default implementation compares the + * property values returned from {@link #getTransitionProperties()}, or all property values if + * {@code getTransitionProperties()} returns null. Subclasses may override this method to + * provide logic more specific to their transition implementation. + * + * @param oldValues the first set of values, may be {@code null} + * @param newValues the second set of values, may be {@code null} + */ + protected boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) { boolean valuesChanged = false; // if oldValues null, then transition didn't care to stash values, // and won't get canceled diff --git a/core/java/android/transition/Visibility.java b/core/java/android/transition/Visibility.java index 8779229..26dca43 100644 --- a/core/java/android/transition/Visibility.java +++ b/core/java/android/transition/Visibility.java @@ -182,7 +182,7 @@ public abstract class Visibility extends Transition { return visibility == View.VISIBLE && parent != null; } - private VisibilityInfo getVisibilityChangeInfo(TransitionValues startValues, + private static VisibilityInfo getVisibilityChangeInfo(TransitionValues startValues, TransitionValues endValues) { final VisibilityInfo visInfo = new VisibilityInfo(); visInfo.visibilityChange = false; @@ -484,7 +484,7 @@ public abstract class Visibility extends Transition { } @Override - boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) { + protected boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) { if (oldValues == null && newValues == null) { return false; } diff --git a/core/java/android/util/AtomicFile.java b/core/java/android/util/AtomicFile.java index a6466fc..3aa3447 100644 --- a/core/java/android/util/AtomicFile.java +++ b/core/java/android/util/AtomicFile.java @@ -102,7 +102,7 @@ public class AtomicFile { str = new FileOutputStream(mBaseName); } catch (FileNotFoundException e) { File parent = mBaseName.getParentFile(); - if (!parent.mkdir()) { + if (!parent.mkdirs()) { throw new IOException("Couldn't create directory " + mBaseName); } FileUtils.setPermissions( diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java index c855e57..d0e5b9e 100644 --- a/core/java/android/util/DisplayMetrics.java +++ b/core/java/android/util/DisplayMetrics.java @@ -62,6 +62,13 @@ public class DisplayMetrics { public static final int DENSITY_HIGH = 240; /** + * Intermediate density for screens that sit between {@link #DENSITY_HIGH} (240dpi) and + * {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target, + * instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them. + */ + public static final int DENSITY_280 = 280; + + /** * Standard quantized DPI for extra-high-density screens. */ public static final int DENSITY_XHIGH = 320; diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 04aafc1..ad5d651 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -17109,6 +17109,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param id The id to search for. * @return The view that has the given id in the hierarchy or null */ + @Nullable public final View findViewById(int id) { if (id < 0) { return null; diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index e1cee1e..504a758 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -1208,7 +1208,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@inheritDoc} */ public void bringChildToFront(View child) { - int index = indexOfChild(child); + final int index = indexOfChild(child); if (index >= 0) { removeFromArray(index); addInArray(child, mChildrenCount); @@ -3771,7 +3771,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@link #dispatchDraw(android.graphics.Canvas)} or any related method.</p> * * @param child the child view to add - * @param index the position at which to add the child + * @param index the position at which to add the child or -1 to add last * @param params the layout parameters to set on the child */ public void addView(View child, int index, LayoutParams params) { @@ -3887,7 +3887,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * If index is negative, it means put it at the end of the list. * * @param child the view to add to the group - * @param index the index at which the child must be added + * @param index the index at which the child must be added or -1 to add last * @param params the layout parameters to associate with the child * @return true if the child was added, false otherwise */ @@ -3902,7 +3902,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * If index is negative, it means put it at the end of the list. * * @param child the view to add to the group - * @param index the index at which the child must be added + * @param index the index at which the child must be added or -1 to add last * @param params the layout parameters to associate with the child * @param preventRequestLayout if true, calling this method will not trigger a * layout request on child diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index 1456b52..8964862 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -984,6 +984,7 @@ public abstract class Window { * * @return The view if found or null otherwise. */ + @Nullable public View findViewById(int id) { return getDecorView().findViewById(id); } diff --git a/core/java/android/view/accessibility/AccessibilityCache.java b/core/java/android/view/accessibility/AccessibilityCache.java index 52912b1..d0dde00 100644 --- a/core/java/android/view/accessibility/AccessibilityCache.java +++ b/core/java/android/view/accessibility/AccessibilityCache.java @@ -40,6 +40,9 @@ final class AccessibilityCache { private final Object mLock = new Object(); + private long mAccessibilityFocus = AccessibilityNodeInfo.UNDEFINED_ITEM_ID; + private long mInputFocus = AccessibilityNodeInfo.UNDEFINED_ITEM_ID; + private final SparseArray<AccessibilityWindowInfo> mWindowCache = new SparseArray<>(); @@ -73,9 +76,29 @@ final class AccessibilityCache { synchronized (mLock) { final int eventType = event.getEventType(); switch (eventType) { - case AccessibilityEvent.TYPE_VIEW_FOCUSED: - case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED: - case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED: + case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED: { + if (mAccessibilityFocus != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) { + refreshCachedNodeLocked(event.getWindowId(), mAccessibilityFocus); + } + mAccessibilityFocus = event.getSourceNodeId(); + refreshCachedNodeLocked(event.getWindowId(), mAccessibilityFocus); + } break; + + case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED: { + if (mAccessibilityFocus == event.getSourceNodeId()) { + refreshCachedNodeLocked(event.getWindowId(), mAccessibilityFocus); + mAccessibilityFocus = AccessibilityNodeInfo.UNDEFINED_ITEM_ID; + } + } break; + + case AccessibilityEvent.TYPE_VIEW_FOCUSED: { + if (mInputFocus != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) { + refreshCachedNodeLocked(event.getWindowId(), mInputFocus); + } + mInputFocus = event.getSourceNodeId(); + refreshCachedNodeLocked(event.getWindowId(), mInputFocus); + } break; + case AccessibilityEvent.TYPE_VIEW_SELECTED: case AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED: case AccessibilityEvent.TYPE_VIEW_CLICKED: @@ -268,6 +291,9 @@ final class AccessibilityCache { final int windowId = mNodeCache.keyAt(i); clearNodesForWindowLocked(windowId); } + + mAccessibilityFocus = AccessibilityNodeInfo.UNDEFINED_ITEM_ID; + mInputFocus = AccessibilityNodeInfo.UNDEFINED_ITEM_ID; } } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index b56378f..325ffdd 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -494,19 +494,17 @@ public final class InputMethodManager { mIInputContext.finishComposingText(); } catch (RemoteException e) { } - // Check focus again in case that "onWindowFocus" is called before - // handling this message. - if (mServedView != null && mServedView.hasWindowFocus()) { - // "finishComposingText" has been already called above. So we - // should not call mServedInputConnection.finishComposingText here. - // Also, please note that this handler thread could be different - // from a thread that created mServedView. That could happen - // the current activity is running in the system process. - // In that case, we really should not call - // mServedInputConnection.finishComposingText. - if (checkFocusNoStartInput(mHasBeenInactive, false)) { - startInputInner(null, 0, 0, 0); - } + } + // Check focus again in case that "onWindowFocus" is called before + // handling this message. + if (mServedView != null && mServedView.hasWindowFocus()) { + // Please note that this handler thread could be different + // from a thread that created mServedView. That could happen + // the current activity is running in the system process. + // In that case, we really should not call + // mServedInputConnection.finishComposingText. + if (checkFocusNoStartInput(mHasBeenInactive, false)) { + startInputInner(null, 0, 0, 0); } } } diff --git a/core/java/android/webkit/LegacyErrorStrings.java b/core/java/android/webkit/LegacyErrorStrings.java index 11fc05d..60a6ee1 100644 --- a/core/java/android/webkit/LegacyErrorStrings.java +++ b/core/java/android/webkit/LegacyErrorStrings.java @@ -17,7 +17,6 @@ package android.webkit; import android.content.Context; -import android.net.http.EventHandler; import android.util.Log; /** @@ -44,52 +43,52 @@ class LegacyErrorStrings { */ private static int getResource(int errorCode) { switch(errorCode) { - case EventHandler.OK: + case 0: /* EventHandler.OK: */ return com.android.internal.R.string.httpErrorOk; - case EventHandler.ERROR: + case -1: /* EventHandler.ERROR: */ return com.android.internal.R.string.httpError; - case EventHandler.ERROR_LOOKUP: + case -2: /* EventHandler.ERROR_LOOKUP: */ return com.android.internal.R.string.httpErrorLookup; - case EventHandler.ERROR_UNSUPPORTED_AUTH_SCHEME: + case -3: /* EventHandler.ERROR_UNSUPPORTED_AUTH_SCHEME: */ return com.android.internal.R.string.httpErrorUnsupportedAuthScheme; - case EventHandler.ERROR_AUTH: + case -4: /* EventHandler.ERROR_AUTH: */ return com.android.internal.R.string.httpErrorAuth; - case EventHandler.ERROR_PROXYAUTH: + case -5: /* EventHandler.ERROR_PROXYAUTH: */ return com.android.internal.R.string.httpErrorProxyAuth; - case EventHandler.ERROR_CONNECT: + case -6: /* EventHandler.ERROR_CONNECT: */ return com.android.internal.R.string.httpErrorConnect; - case EventHandler.ERROR_IO: + case -7: /* EventHandler.ERROR_IO: */ return com.android.internal.R.string.httpErrorIO; - case EventHandler.ERROR_TIMEOUT: + case -8: /* EventHandler.ERROR_TIMEOUT: */ return com.android.internal.R.string.httpErrorTimeout; - case EventHandler.ERROR_REDIRECT_LOOP: + case -9: /* EventHandler.ERROR_REDIRECT_LOOP: */ return com.android.internal.R.string.httpErrorRedirectLoop; - case EventHandler.ERROR_UNSUPPORTED_SCHEME: + case -10: /* EventHandler.ERROR_UNSUPPORTED_SCHEME: */ return com.android.internal.R.string.httpErrorUnsupportedScheme; - case EventHandler.ERROR_FAILED_SSL_HANDSHAKE: + case -11: /* EventHandler.ERROR_FAILED_SSL_HANDSHAKE: */ return com.android.internal.R.string.httpErrorFailedSslHandshake; - case EventHandler.ERROR_BAD_URL: + case -12: /* EventHandler.ERROR_BAD_URL: */ return com.android.internal.R.string.httpErrorBadUrl; - case EventHandler.FILE_ERROR: + case -13: /* EventHandler.FILE_ERROR: */ return com.android.internal.R.string.httpErrorFile; - case EventHandler.FILE_NOT_FOUND_ERROR: + case -14: /* EventHandler.FILE_NOT_FOUND_ERROR: */ return com.android.internal.R.string.httpErrorFileNotFound; - case EventHandler.TOO_MANY_REQUESTS_ERROR: + case -15: /* EventHandler.TOO_MANY_REQUESTS_ERROR: */ return com.android.internal.R.string.httpErrorTooManyRequests; default: diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java index fede493..f2afeeb 100644 --- a/core/java/android/widget/CompoundButton.java +++ b/core/java/android/widget/CompoundButton.java @@ -16,6 +16,7 @@ package android.widget; +import android.annotation.DrawableRes; import android.annotation.Nullable; import android.graphics.PorterDuff; import com.android.internal.R; @@ -50,7 +51,6 @@ import android.view.accessibility.AccessibilityNodeInfo; */ public abstract class CompoundButton extends Button implements Checkable { private boolean mChecked; - private int mButtonResource; private boolean mBroadcasting; private Drawable mButtonDrawable; @@ -197,54 +197,62 @@ public abstract class CompoundButton extends Button implements Checkable { } /** - * Set the button graphic to a given Drawable, identified by its resource - * id. + * Sets a drawable as the compound button image given its resource + * identifier. * - * @param resid the resource id of the drawable to use as the button - * graphic + * @param resId the resource identifier of the drawable + * @attr ref android.R.styleable#CompoundButton_button */ - public void setButtonDrawable(int resid) { - if (resid != 0 && resid == mButtonResource) { - return; - } - - mButtonResource = resid; - - Drawable d = null; - if (mButtonResource != 0) { - d = getContext().getDrawable(mButtonResource); + public void setButtonDrawable(@DrawableRes int resId) { + final Drawable d; + if (resId != 0) { + d = getContext().getDrawable(resId); + } else { + d = null; } setButtonDrawable(d); } /** - * Set the button graphic to a given Drawable + * Sets a drawable as the compound button image. * - * @param d The Drawable to use as the button graphic + * @param drawable the drawable to set + * @attr ref android.R.styleable#CompoundButton_button */ - public void setButtonDrawable(Drawable d) { - if (mButtonDrawable != d) { + @Nullable + public void setButtonDrawable(@Nullable Drawable drawable) { + if (mButtonDrawable != drawable) { if (mButtonDrawable != null) { mButtonDrawable.setCallback(null); unscheduleDrawable(mButtonDrawable); } - mButtonDrawable = d; + mButtonDrawable = drawable; - if (d != null) { - d.setCallback(this); - d.setLayoutDirection(getLayoutDirection()); - if (d.isStateful()) { - d.setState(getDrawableState()); + if (drawable != null) { + drawable.setCallback(this); + drawable.setLayoutDirection(getLayoutDirection()); + if (drawable.isStateful()) { + drawable.setState(getDrawableState()); } - d.setVisible(getVisibility() == VISIBLE, false); - setMinHeight(d.getIntrinsicHeight()); + drawable.setVisible(getVisibility() == VISIBLE, false); + setMinHeight(drawable.getIntrinsicHeight()); applyButtonTint(); } } } /** + * @return the drawable used as the compound button image + * @see #setButtonDrawable(Drawable) + * @see #setButtonDrawable(int) + */ + @Nullable + public Drawable getButtonDrawable() { + return mButtonDrawable; + } + + /** * Applies a tint to the button drawable. Does not modify the current tint * mode, which is {@link PorterDuff.Mode#SRC_IN} by default. * <p> diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java index 6925756..391347e 100644 --- a/core/java/android/widget/EdgeEffect.java +++ b/core/java/android/widget/EdgeEffect.java @@ -24,7 +24,6 @@ import android.graphics.Rect; import android.content.Context; import android.graphics.Canvas; -import android.util.FloatMath; import android.view.animation.AnimationUtils; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; @@ -220,8 +219,8 @@ public class EdgeEffect { if (mPullDistance == 0) { mGlowScaleY = mGlowScaleYStart = 0; } else { - final float scale = Math.max(0, 1 - 1 / - FloatMath.sqrt(Math.abs(mPullDistance) * mBounds.height()) - 0.3f) / 0.7f; + final float scale = (float) (Math.max(0, 1 - 1 / + Math.sqrt(Math.abs(mPullDistance) * mBounds.height()) - 0.3d) / 0.7d); mGlowScaleY = mGlowScaleYStart = scale; } diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index d5166f3..4752594 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -1352,6 +1352,9 @@ public class Editor { searchStartIndex); // Note how dynamic layout's internal block indices get updated from Editor blockIndices[i] = blockIndex; + if (mTextDisplayLists[blockIndex] != null) { + mTextDisplayLists[blockIndex].isDirty = true; + } searchStartIndex = blockIndex + 1; } @@ -1388,6 +1391,7 @@ public class Editor { // brings this range of text back to the top left corner of the viewport hardwareCanvas.translate(-left, -top); layout.drawText(hardwareCanvas, blockBeginLine, blockEndLine); + mTextDisplayLists[blockIndex].isDirty = false; // No need to untranslate, previous context is popped after // drawDisplayList } finally { diff --git a/core/java/com/android/internal/http/multipart/ByteArrayPartSource.java b/core/java/com/android/internal/http/multipart/ByteArrayPartSource.java deleted file mode 100644 index faaac7f..0000000 --- a/core/java/com/android/internal/http/multipart/ByteArrayPartSource.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/ByteArrayPartSource.java,v 1.7 2004/04/18 23:51:37 jsdever Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; - -/** - * A PartSource that reads from a byte array. This class should be used when - * the data to post is already loaded into memory. - * - * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> - * - * @since 2.0 - */ -public class ByteArrayPartSource implements PartSource { - - /** Name of the source file. */ - private String fileName; - - /** Byte array of the source file. */ - private byte[] bytes; - - /** - * Constructor for ByteArrayPartSource. - * - * @param fileName the name of the file these bytes represent - * @param bytes the content of this part - */ - public ByteArrayPartSource(String fileName, byte[] bytes) { - - this.fileName = fileName; - this.bytes = bytes; - - } - - /** - * @see PartSource#getLength() - */ - public long getLength() { - return bytes.length; - } - - /** - * @see PartSource#getFileName() - */ - public String getFileName() { - return fileName; - } - - /** - * @see PartSource#createInputStream() - */ - public InputStream createInputStream() { - return new ByteArrayInputStream(bytes); - } - -} diff --git a/core/java/com/android/internal/http/multipart/FilePart.java b/core/java/com/android/internal/http/multipart/FilePart.java deleted file mode 100644 index 45e4be6..0000000 --- a/core/java/com/android/internal/http/multipart/FilePart.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/FilePart.java,v 1.19 2004/04/18 23:51:37 jsdever Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import org.apache.http.util.EncodingUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * This class implements a part of a Multipart post object that - * consists of a file. - * - * @author <a href="mailto:mattalbright@yahoo.com">Matthew Albright</a> - * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> - * @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a> - * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> - * @author <a href="mailto:mdiggory@latte.harvard.edu">Mark Diggory</a> - * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> - * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> - * - * @since 2.0 - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. - * The Apache HTTP client is no longer maintained and may be removed in a future - * release. Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> - * for further details. - */ -@Deprecated -public class FilePart extends PartBase { - - /** Default content encoding of file attachments. */ - public static final String DEFAULT_CONTENT_TYPE = "application/octet-stream"; - - /** Default charset of file attachments. */ - public static final String DEFAULT_CHARSET = "ISO-8859-1"; - - /** Default transfer encoding of file attachments. */ - public static final String DEFAULT_TRANSFER_ENCODING = "binary"; - - /** Log object for this class. */ - private static final Log LOG = LogFactory.getLog(FilePart.class); - - /** Attachment's file name */ - protected static final String FILE_NAME = "; filename="; - - /** Attachment's file name as a byte array */ - private static final byte[] FILE_NAME_BYTES = - EncodingUtils.getAsciiBytes(FILE_NAME); - - /** Source of the file part. */ - private PartSource source; - - /** - * FilePart Constructor. - * - * @param name the name for this part - * @param partSource the source for this part - * @param contentType the content type for this part, if <code>null</code> the - * {@link #DEFAULT_CONTENT_TYPE default} is used - * @param charset the charset encoding for this part, if <code>null</code> the - * {@link #DEFAULT_CHARSET default} is used - */ - public FilePart(String name, PartSource partSource, String contentType, String charset) { - - super( - name, - contentType == null ? DEFAULT_CONTENT_TYPE : contentType, - charset == null ? "ISO-8859-1" : charset, - DEFAULT_TRANSFER_ENCODING - ); - - if (partSource == null) { - throw new IllegalArgumentException("Source may not be null"); - } - this.source = partSource; - } - - /** - * FilePart Constructor. - * - * @param name the name for this part - * @param partSource the source for this part - */ - public FilePart(String name, PartSource partSource) { - this(name, partSource, null, null); - } - - /** - * FilePart Constructor. - * - * @param name the name of the file part - * @param file the file to post - * - * @throws FileNotFoundException if the <i>file</i> is not a normal - * file or if it is not readable. - */ - public FilePart(String name, File file) - throws FileNotFoundException { - this(name, new FilePartSource(file), null, null); - } - - /** - * FilePart Constructor. - * - * @param name the name of the file part - * @param file the file to post - * @param contentType the content type for this part, if <code>null</code> the - * {@link #DEFAULT_CONTENT_TYPE default} is used - * @param charset the charset encoding for this part, if <code>null</code> the - * {@link #DEFAULT_CHARSET default} is used - * - * @throws FileNotFoundException if the <i>file</i> is not a normal - * file or if it is not readable. - */ - public FilePart(String name, File file, String contentType, String charset) - throws FileNotFoundException { - this(name, new FilePartSource(file), contentType, charset); - } - - /** - * FilePart Constructor. - * - * @param name the name of the file part - * @param fileName the file name - * @param file the file to post - * - * @throws FileNotFoundException if the <i>file</i> is not a normal - * file or if it is not readable. - */ - public FilePart(String name, String fileName, File file) - throws FileNotFoundException { - this(name, new FilePartSource(fileName, file), null, null); - } - - /** - * FilePart Constructor. - * - * @param name the name of the file part - * @param fileName the file name - * @param file the file to post - * @param contentType the content type for this part, if <code>null</code> the - * {@link #DEFAULT_CONTENT_TYPE default} is used - * @param charset the charset encoding for this part, if <code>null</code> the - * {@link #DEFAULT_CHARSET default} is used - * - * @throws FileNotFoundException if the <i>file</i> is not a normal - * file or if it is not readable. - */ - public FilePart(String name, String fileName, File file, String contentType, String charset) - throws FileNotFoundException { - this(name, new FilePartSource(fileName, file), contentType, charset); - } - - /** - * Write the disposition header to the output stream - * @param out The output stream - * @throws IOException If an IO problem occurs - * @see Part#sendDispositionHeader(OutputStream) - */ - @Override - protected void sendDispositionHeader(OutputStream out) - throws IOException { - LOG.trace("enter sendDispositionHeader(OutputStream out)"); - super.sendDispositionHeader(out); - String filename = this.source.getFileName(); - if (filename != null) { - out.write(FILE_NAME_BYTES); - out.write(QUOTE_BYTES); - out.write(EncodingUtils.getAsciiBytes(filename)); - out.write(QUOTE_BYTES); - } - } - - /** - * Write the data in "source" to the specified stream. - * @param out The output stream. - * @throws IOException if an IO problem occurs. - * @see Part#sendData(OutputStream) - */ - @Override - protected void sendData(OutputStream out) throws IOException { - LOG.trace("enter sendData(OutputStream out)"); - if (lengthOfData() == 0) { - - // this file contains no data, so there is nothing to send. - // we don't want to create a zero length buffer as this will - // cause an infinite loop when reading. - LOG.debug("No data to send."); - return; - } - - byte[] tmp = new byte[4096]; - InputStream instream = source.createInputStream(); - try { - int len; - while ((len = instream.read(tmp)) >= 0) { - out.write(tmp, 0, len); - } - } finally { - // we're done with the stream, close it - instream.close(); - } - } - - /** - * Returns the source of the file part. - * - * @return The source. - */ - protected PartSource getSource() { - LOG.trace("enter getSource()"); - return this.source; - } - - /** - * Return the length of the data. - * @return The length. - * @see Part#lengthOfData() - */ - @Override - protected long lengthOfData() { - LOG.trace("enter lengthOfData()"); - return source.getLength(); - } - -} diff --git a/core/java/com/android/internal/http/multipart/FilePartSource.java b/core/java/com/android/internal/http/multipart/FilePartSource.java deleted file mode 100644 index eb5cc0f..0000000 --- a/core/java/com/android/internal/http/multipart/FilePartSource.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/FilePartSource.java,v 1.10 2004/04/18 23:51:37 jsdever Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; - -/** - * A PartSource that reads from a File. - * - * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> - * @author <a href="mailto:mdiggory@latte.harvard.edu">Mark Diggory</a> - * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> - * - * @since 2.0 - */ -public class FilePartSource implements PartSource { - - /** File part file. */ - private File file = null; - - /** File part file name. */ - private String fileName = null; - - /** - * Constructor for FilePartSource. - * - * @param file the FilePart source File. - * - * @throws FileNotFoundException if the file does not exist or - * cannot be read - */ - public FilePartSource(File file) throws FileNotFoundException { - this.file = file; - if (file != null) { - if (!file.isFile()) { - throw new FileNotFoundException("File is not a normal file."); - } - if (!file.canRead()) { - throw new FileNotFoundException("File is not readable."); - } - this.fileName = file.getName(); - } - } - - /** - * Constructor for FilePartSource. - * - * @param fileName the file name of the FilePart - * @param file the source File for the FilePart - * - * @throws FileNotFoundException if the file does not exist or - * cannot be read - */ - public FilePartSource(String fileName, File file) - throws FileNotFoundException { - this(file); - if (fileName != null) { - this.fileName = fileName; - } - } - - /** - * Return the length of the file - * @return the length of the file. - * @see PartSource#getLength() - */ - public long getLength() { - if (this.file != null) { - return this.file.length(); - } else { - return 0; - } - } - - /** - * Return the current filename - * @return the filename. - * @see PartSource#getFileName() - */ - public String getFileName() { - return (fileName == null) ? "noname" : fileName; - } - - /** - * Return a new {@link FileInputStream} for the current filename. - * @return the new input stream. - * @throws IOException If an IO problem occurs. - * @see PartSource#createInputStream() - */ - public InputStream createInputStream() throws IOException { - if (this.file != null) { - return new FileInputStream(this.file); - } else { - return new ByteArrayInputStream(new byte[] {}); - } - } - -} diff --git a/core/java/com/android/internal/http/multipart/MultipartEntity.java b/core/java/com/android/internal/http/multipart/MultipartEntity.java deleted file mode 100644 index 5319251..0000000 --- a/core/java/com/android/internal/http/multipart/MultipartEntity.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.java,v 1.1 2004/10/06 03:39:59 mbecke Exp $ - * $Revision: 502647 $ - * $Date: 2007-02-02 17:22:54 +0100 (Fri, 02 Feb 2007) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Random; - -import org.apache.http.Header; -import org.apache.http.entity.AbstractHttpEntity; -import org.apache.http.message.BasicHeader; -import org.apache.http.params.HttpParams; -import org.apache.http.protocol.HTTP; -import org.apache.http.util.EncodingUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Implements a request entity suitable for an HTTP multipart POST method. - * <p> - * The HTTP multipart POST method is defined in section 3.3 of - * <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC1867</a>: - * <blockquote> - * The media-type multipart/form-data follows the rules of all multipart - * MIME data streams as outlined in RFC 1521. The multipart/form-data contains - * a series of parts. Each part is expected to contain a content-disposition - * header where the value is "form-data" and a name attribute specifies - * the field name within the form, e.g., 'content-disposition: form-data; - * name="xxxxx"', where xxxxx is the field name corresponding to that field. - * Field names originally in non-ASCII character sets may be encoded using - * the method outlined in RFC 1522. - * </blockquote> - * </p> - * <p>This entity is designed to be used in conjunction with the - * {@link org.apache.http.HttpRequest} to provide - * multipart posts. Example usage:</p> - * <pre> - * File f = new File("/path/fileToUpload.txt"); - * HttpRequest request = new HttpRequest("http://host/some_path"); - * Part[] parts = { - * new StringPart("param_name", "value"), - * new FilePart(f.getName(), f) - * }; - * filePost.setEntity( - * new MultipartRequestEntity(parts, filePost.getParams()) - * ); - * HttpClient client = new HttpClient(); - * int status = client.executeMethod(filePost); - * </pre> - * - * @since 3.0 - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. - * The Apache HTTP client is no longer maintained and may be removed in a future - * release. Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> - * for further details. - */ -@Deprecated -public class MultipartEntity extends AbstractHttpEntity { - - private static final Log log = LogFactory.getLog(MultipartEntity.class); - - /** The Content-Type for multipart/form-data. */ - private static final String MULTIPART_FORM_CONTENT_TYPE = "multipart/form-data"; - - /** - * Sets the value to use as the multipart boundary. - * <p> - * This parameter expects a value if type {@link String}. - * </p> - */ - public static final String MULTIPART_BOUNDARY = "http.method.multipart.boundary"; - - /** - * The pool of ASCII chars to be used for generating a multipart boundary. - */ - private static byte[] MULTIPART_CHARS = EncodingUtils.getAsciiBytes( - "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); - - /** - * Generates a random multipart boundary string. - */ - private static byte[] generateMultipartBoundary() { - Random rand = new Random(); - byte[] bytes = new byte[rand.nextInt(11) + 30]; // a random size from 30 to 40 - for (int i = 0; i < bytes.length; i++) { - bytes[i] = MULTIPART_CHARS[rand.nextInt(MULTIPART_CHARS.length)]; - } - return bytes; - } - - /** The MIME parts as set by the constructor */ - protected Part[] parts; - - private byte[] multipartBoundary; - - private HttpParams params; - - private boolean contentConsumed = false; - - /** - * Creates a new multipart entity containing the given parts. - * @param parts The parts to include. - * @param params The params of the HttpMethod using this entity. - */ - public MultipartEntity(Part[] parts, HttpParams params) { - if (parts == null) { - throw new IllegalArgumentException("parts cannot be null"); - } - if (params == null) { - throw new IllegalArgumentException("params cannot be null"); - } - this.parts = parts; - this.params = params; - } - - public MultipartEntity(Part[] parts) { - setContentType(MULTIPART_FORM_CONTENT_TYPE); - if (parts == null) { - throw new IllegalArgumentException("parts cannot be null"); - } - this.parts = parts; - this.params = null; - } - - /** - * Returns the MIME boundary string that is used to demarcate boundaries of - * this part. The first call to this method will implicitly create a new - * boundary string. To create a boundary string first the - * HttpMethodParams.MULTIPART_BOUNDARY parameter is considered. Otherwise - * a random one is generated. - * - * @return The boundary string of this entity in ASCII encoding. - */ - protected byte[] getMultipartBoundary() { - if (multipartBoundary == null) { - String temp = null; - if (params != null) { - temp = (String) params.getParameter(MULTIPART_BOUNDARY); - } - if (temp != null) { - multipartBoundary = EncodingUtils.getAsciiBytes(temp); - } else { - multipartBoundary = generateMultipartBoundary(); - } - } - return multipartBoundary; - } - - /** - * Returns <code>true</code> if all parts are repeatable, <code>false</code> otherwise. - */ - public boolean isRepeatable() { - for (int i = 0; i < parts.length; i++) { - if (!parts[i].isRepeatable()) { - return false; - } - } - return true; - } - - /* (non-Javadoc) - */ - public void writeTo(OutputStream out) throws IOException { - Part.sendParts(out, parts, getMultipartBoundary()); - } - /* (non-Javadoc) - * @see org.apache.commons.http.AbstractHttpEntity.#getContentType() - */ - @Override - public Header getContentType() { - StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE); - buffer.append("; boundary="); - buffer.append(EncodingUtils.getAsciiString(getMultipartBoundary())); - return new BasicHeader(HTTP.CONTENT_TYPE, buffer.toString()); - - } - - /* (non-Javadoc) - */ - public long getContentLength() { - try { - return Part.getLengthOfParts(parts, getMultipartBoundary()); - } catch (Exception e) { - log.error("An exception occurred while getting the length of the parts", e); - return 0; - } - } - - public InputStream getContent() throws IOException, IllegalStateException { - if(!isRepeatable() && this.contentConsumed ) { - throw new IllegalStateException("Content has been consumed"); - } - this.contentConsumed = true; - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - Part.sendParts(baos, this.parts, this.multipartBoundary); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - return bais; - } - - public boolean isStreaming() { - return false; - } -} diff --git a/core/java/com/android/internal/http/multipart/Part.java b/core/java/com/android/internal/http/multipart/Part.java deleted file mode 100644 index 1d66dc6..0000000 --- a/core/java/com/android/internal/http/multipart/Part.java +++ /dev/null @@ -1,445 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/Part.java,v 1.16 2005/01/14 21:16:40 olegk Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStream; - -import org.apache.http.util.EncodingUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Abstract class for one Part of a multipart post object. - * - * @author <a href="mailto:mattalbright@yahoo.com">Matthew Albright</a> - * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> - * @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a> - * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> - * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> - * - * @since 2.0 - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. - * The Apache HTTP client is no longer maintained and may be removed in a future - * release. Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> - * for further details. - */ -@Deprecated -public abstract class Part { - - /** Log object for this class. */ - private static final Log LOG = LogFactory.getLog(Part.class); - - /** - * The boundary - * @deprecated use {@link org.apache.http.client.methods.multipart#MULTIPART_BOUNDARY} - */ - protected static final String BOUNDARY = "----------------314159265358979323846"; - - /** - * The boundary as a byte array. - * @deprecated - */ - protected static final byte[] BOUNDARY_BYTES = EncodingUtils.getAsciiBytes(BOUNDARY); - - /** - * The default boundary to be used if {@link #setPartBoundary(byte[])} has not - * been called. - */ - private static final byte[] DEFAULT_BOUNDARY_BYTES = BOUNDARY_BYTES; - - /** Carriage return/linefeed */ - protected static final String CRLF = "\r\n"; - - /** Carriage return/linefeed as a byte array */ - protected static final byte[] CRLF_BYTES = EncodingUtils.getAsciiBytes(CRLF); - - /** Content dispostion characters */ - protected static final String QUOTE = "\""; - - /** Content dispostion as a byte array */ - protected static final byte[] QUOTE_BYTES = - EncodingUtils.getAsciiBytes(QUOTE); - - /** Extra characters */ - protected static final String EXTRA = "--"; - - /** Extra characters as a byte array */ - protected static final byte[] EXTRA_BYTES = - EncodingUtils.getAsciiBytes(EXTRA); - - /** Content dispostion characters */ - protected static final String CONTENT_DISPOSITION = "Content-Disposition: form-data; name="; - - /** Content dispostion as a byte array */ - protected static final byte[] CONTENT_DISPOSITION_BYTES = - EncodingUtils.getAsciiBytes(CONTENT_DISPOSITION); - - /** Content type header */ - protected static final String CONTENT_TYPE = "Content-Type: "; - - /** Content type header as a byte array */ - protected static final byte[] CONTENT_TYPE_BYTES = - EncodingUtils.getAsciiBytes(CONTENT_TYPE); - - /** Content charset */ - protected static final String CHARSET = "; charset="; - - /** Content charset as a byte array */ - protected static final byte[] CHARSET_BYTES = - EncodingUtils.getAsciiBytes(CHARSET); - - /** Content type header */ - protected static final String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding: "; - - /** Content type header as a byte array */ - protected static final byte[] CONTENT_TRANSFER_ENCODING_BYTES = - EncodingUtils.getAsciiBytes(CONTENT_TRANSFER_ENCODING); - - /** - * Return the boundary string. - * @return the boundary string - * @deprecated uses a constant string. Rather use {@link #getPartBoundary} - */ - public static String getBoundary() { - return BOUNDARY; - } - - /** - * The ASCII bytes to use as the multipart boundary. - */ - private byte[] boundaryBytes; - - /** - * Return the name of this part. - * @return The name. - */ - public abstract String getName(); - - /** - * Returns the content type of this part. - * @return the content type, or <code>null</code> to exclude the content type header - */ - public abstract String getContentType(); - - /** - * Return the character encoding of this part. - * @return the character encoding, or <code>null</code> to exclude the character - * encoding header - */ - public abstract String getCharSet(); - - /** - * Return the transfer encoding of this part. - * @return the transfer encoding, or <code>null</code> to exclude the transfer encoding header - */ - public abstract String getTransferEncoding(); - - /** - * Gets the part boundary to be used. - * @return the part boundary as an array of bytes. - * - * @since 3.0 - */ - protected byte[] getPartBoundary() { - if (boundaryBytes == null) { - // custom boundary bytes have not been set, use the default. - return DEFAULT_BOUNDARY_BYTES; - } else { - return boundaryBytes; - } - } - - /** - * Sets the part boundary. Only meant to be used by - * {@link Part#sendParts(OutputStream, Part[], byte[])} - * and {@link Part#getLengthOfParts(Part[], byte[])} - * @param boundaryBytes An array of ASCII bytes. - * @since 3.0 - */ - void setPartBoundary(byte[] boundaryBytes) { - this.boundaryBytes = boundaryBytes; - } - - /** - * Tests if this part can be sent more than once. - * @return <code>true</code> if {@link #sendData(OutputStream)} can be successfully called - * more than once. - * @since 3.0 - */ - public boolean isRepeatable() { - return true; - } - - /** - * Write the start to the specified output stream - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected void sendStart(OutputStream out) throws IOException { - LOG.trace("enter sendStart(OutputStream out)"); - out.write(EXTRA_BYTES); - out.write(getPartBoundary()); - out.write(CRLF_BYTES); - } - - /** - * Write the content disposition header to the specified output stream - * - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected void sendDispositionHeader(OutputStream out) throws IOException { - LOG.trace("enter sendDispositionHeader(OutputStream out)"); - out.write(CONTENT_DISPOSITION_BYTES); - out.write(QUOTE_BYTES); - out.write(EncodingUtils.getAsciiBytes(getName())); - out.write(QUOTE_BYTES); - } - - /** - * Write the content type header to the specified output stream - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected void sendContentTypeHeader(OutputStream out) throws IOException { - LOG.trace("enter sendContentTypeHeader(OutputStream out)"); - String contentType = getContentType(); - if (contentType != null) { - out.write(CRLF_BYTES); - out.write(CONTENT_TYPE_BYTES); - out.write(EncodingUtils.getAsciiBytes(contentType)); - String charSet = getCharSet(); - if (charSet != null) { - out.write(CHARSET_BYTES); - out.write(EncodingUtils.getAsciiBytes(charSet)); - } - } - } - - /** - * Write the content transfer encoding header to the specified - * output stream - * - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected void sendTransferEncodingHeader(OutputStream out) throws IOException { - LOG.trace("enter sendTransferEncodingHeader(OutputStream out)"); - String transferEncoding = getTransferEncoding(); - if (transferEncoding != null) { - out.write(CRLF_BYTES); - out.write(CONTENT_TRANSFER_ENCODING_BYTES); - out.write(EncodingUtils.getAsciiBytes(transferEncoding)); - } - } - - /** - * Write the end of the header to the output stream - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected void sendEndOfHeader(OutputStream out) throws IOException { - LOG.trace("enter sendEndOfHeader(OutputStream out)"); - out.write(CRLF_BYTES); - out.write(CRLF_BYTES); - } - - /** - * Write the data to the specified output stream - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected abstract void sendData(OutputStream out) throws IOException; - - /** - * Return the length of the main content - * - * @return long The length. - * @throws IOException If an IO problem occurs - */ - protected abstract long lengthOfData() throws IOException; - - /** - * Write the end data to the output stream. - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - protected void sendEnd(OutputStream out) throws IOException { - LOG.trace("enter sendEnd(OutputStream out)"); - out.write(CRLF_BYTES); - } - - /** - * Write all the data to the output stream. - * If you override this method make sure to override - * #length() as well - * - * @param out The output stream - * @throws IOException If an IO problem occurs. - */ - public void send(OutputStream out) throws IOException { - LOG.trace("enter send(OutputStream out)"); - sendStart(out); - sendDispositionHeader(out); - sendContentTypeHeader(out); - sendTransferEncodingHeader(out); - sendEndOfHeader(out); - sendData(out); - sendEnd(out); - } - - - /** - * Return the full length of all the data. - * If you override this method make sure to override - * #send(OutputStream) as well - * - * @return long The length. - * @throws IOException If an IO problem occurs - */ - public long length() throws IOException { - LOG.trace("enter length()"); - if (lengthOfData() < 0) { - return -1; - } - ByteArrayOutputStream overhead = new ByteArrayOutputStream(); - sendStart(overhead); - sendDispositionHeader(overhead); - sendContentTypeHeader(overhead); - sendTransferEncodingHeader(overhead); - sendEndOfHeader(overhead); - sendEnd(overhead); - return overhead.size() + lengthOfData(); - } - - /** - * Return a string representation of this object. - * @return A string representation of this object. - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return this.getName(); - } - - /** - * Write all parts and the last boundary to the specified output stream. - * - * @param out The stream to write to. - * @param parts The parts to write. - * - * @throws IOException If an I/O error occurs while writing the parts. - */ - public static void sendParts(OutputStream out, final Part[] parts) - throws IOException { - sendParts(out, parts, DEFAULT_BOUNDARY_BYTES); - } - - /** - * Write all parts and the last boundary to the specified output stream. - * - * @param out The stream to write to. - * @param parts The parts to write. - * @param partBoundary The ASCII bytes to use as the part boundary. - * - * @throws IOException If an I/O error occurs while writing the parts. - * - * @since 3.0 - */ - public static void sendParts(OutputStream out, Part[] parts, byte[] partBoundary) - throws IOException { - - if (parts == null) { - throw new IllegalArgumentException("Parts may not be null"); - } - if (partBoundary == null || partBoundary.length == 0) { - throw new IllegalArgumentException("partBoundary may not be empty"); - } - for (int i = 0; i < parts.length; i++) { - // set the part boundary before the part is sent - parts[i].setPartBoundary(partBoundary); - parts[i].send(out); - } - out.write(EXTRA_BYTES); - out.write(partBoundary); - out.write(EXTRA_BYTES); - out.write(CRLF_BYTES); - } - - /** - * Return the total sum of all parts and that of the last boundary - * - * @param parts The parts. - * @return The total length - * - * @throws IOException If an I/O error occurs while writing the parts. - */ - public static long getLengthOfParts(Part[] parts) - throws IOException { - return getLengthOfParts(parts, DEFAULT_BOUNDARY_BYTES); - } - - /** - * Gets the length of the multipart message including the given parts. - * - * @param parts The parts. - * @param partBoundary The ASCII bytes to use as the part boundary. - * @return The total length - * - * @throws IOException If an I/O error occurs while writing the parts. - * - * @since 3.0 - */ - public static long getLengthOfParts(Part[] parts, byte[] partBoundary) throws IOException { - LOG.trace("getLengthOfParts(Parts[])"); - if (parts == null) { - throw new IllegalArgumentException("Parts may not be null"); - } - long total = 0; - for (int i = 0; i < parts.length; i++) { - // set the part boundary before we calculate the part's length - parts[i].setPartBoundary(partBoundary); - long l = parts[i].length(); - if (l < 0) { - return -1; - } - total += l; - } - total += EXTRA_BYTES.length; - total += partBoundary.length; - total += EXTRA_BYTES.length; - total += CRLF_BYTES.length; - return total; - } -} diff --git a/core/java/com/android/internal/http/multipart/PartBase.java b/core/java/com/android/internal/http/multipart/PartBase.java deleted file mode 100644 index 876d15d..0000000 --- a/core/java/com/android/internal/http/multipart/PartBase.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/PartBase.java,v 1.5 2004/04/18 23:51:37 jsdever Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - - -/** - * Provides setters and getters for the basic Part properties. - * - * @author Michael Becke - */ -public abstract class PartBase extends Part { - - /** Name of the file part. */ - private String name; - - /** Content type of the file part. */ - private String contentType; - - /** Content encoding of the file part. */ - private String charSet; - - /** The transfer encoding. */ - private String transferEncoding; - - /** - * Constructor. - * - * @param name The name of the part - * @param contentType The content type, or <code>null</code> - * @param charSet The character encoding, or <code>null</code> - * @param transferEncoding The transfer encoding, or <code>null</code> - */ - public PartBase(String name, String contentType, String charSet, String transferEncoding) { - - if (name == null) { - throw new IllegalArgumentException("Name must not be null"); - } - this.name = name; - this.contentType = contentType; - this.charSet = charSet; - this.transferEncoding = transferEncoding; - } - - /** - * Returns the name. - * @return The name. - * @see Part#getName() - */ - @Override - public String getName() { - return this.name; - } - - /** - * Returns the content type of this part. - * @return String The name. - */ - @Override - public String getContentType() { - return this.contentType; - } - - /** - * Return the character encoding of this part. - * @return String The name. - */ - @Override - public String getCharSet() { - return this.charSet; - } - - /** - * Returns the transfer encoding of this part. - * @return String The name. - */ - @Override - public String getTransferEncoding() { - return transferEncoding; - } - - /** - * Sets the character encoding. - * - * @param charSet the character encoding, or <code>null</code> to exclude the character - * encoding header - */ - public void setCharSet(String charSet) { - this.charSet = charSet; - } - - /** - * Sets the content type. - * - * @param contentType the content type, or <code>null</code> to exclude the content type header - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - * Sets the part name. - * - * @param name - */ - public void setName(String name) { - if (name == null) { - throw new IllegalArgumentException("Name must not be null"); - } - this.name = name; - } - - /** - * Sets the transfer encoding. - * - * @param transferEncoding the transfer encoding, or <code>null</code> to exclude the - * transfer encoding header - */ - public void setTransferEncoding(String transferEncoding) { - this.transferEncoding = transferEncoding; - } - -} diff --git a/core/java/com/android/internal/http/multipart/PartSource.java b/core/java/com/android/internal/http/multipart/PartSource.java deleted file mode 100644 index 3740696..0000000 --- a/core/java/com/android/internal/http/multipart/PartSource.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/PartSource.java,v 1.6 2004/04/18 23:51:37 jsdever Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.IOException; -import java.io.InputStream; - -/** - * An interface for providing access to data when posting MultiPart messages. - * - * @see FilePart - * - * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> - * - * @since 2.0 - */ -public interface PartSource { - - /** - * Gets the number of bytes contained in this source. - * - * @return a value >= 0 - */ - long getLength(); - - /** - * Gets the name of the file this source represents. - * - * @return the fileName used for posting a MultiPart file part - */ - String getFileName(); - - /** - * Gets a new InputStream for reading this source. This method can be - * called more than once and should therefore return a new stream every - * time. - * - * @return a new InputStream - * - * @throws IOException if an error occurs when creating the InputStream - */ - InputStream createInputStream() throws IOException; - -} diff --git a/core/java/com/android/internal/http/multipart/StringPart.java b/core/java/com/android/internal/http/multipart/StringPart.java deleted file mode 100644 index 73d0f90..0000000 --- a/core/java/com/android/internal/http/multipart/StringPart.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/StringPart.java,v 1.11 2004/04/18 23:51:37 jsdever Exp $ - * $Revision: 480424 $ - * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ - * - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - */ - -package com.android.internal.http.multipart; - -import java.io.OutputStream; -import java.io.IOException; - -import org.apache.http.util.EncodingUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Simple string parameter for a multipart post - * - * @author <a href="mailto:mattalbright@yahoo.com">Matthew Albright</a> - * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> - * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> - * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> - * - * @since 2.0 - * - * @deprecated Please use {@link java.net.URLConnection} and friends instead. - * The Apache HTTP client is no longer maintained and may be removed in a future - * release. Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> - * for further details. - */ -@Deprecated -public class StringPart extends PartBase { - - /** Log object for this class. */ - private static final Log LOG = LogFactory.getLog(StringPart.class); - - /** Default content encoding of string parameters. */ - public static final String DEFAULT_CONTENT_TYPE = "text/plain"; - - /** Default charset of string parameters*/ - public static final String DEFAULT_CHARSET = "US-ASCII"; - - /** Default transfer encoding of string parameters*/ - public static final String DEFAULT_TRANSFER_ENCODING = "8bit"; - - /** Contents of this StringPart. */ - private byte[] content; - - /** The String value of this part. */ - private String value; - - /** - * Constructor. - * - * @param name The name of the part - * @param value the string to post - * @param charset the charset to be used to encode the string, if <code>null</code> - * the {@link #DEFAULT_CHARSET default} is used - */ - public StringPart(String name, String value, String charset) { - - super( - name, - DEFAULT_CONTENT_TYPE, - charset == null ? DEFAULT_CHARSET : charset, - DEFAULT_TRANSFER_ENCODING - ); - if (value == null) { - throw new IllegalArgumentException("Value may not be null"); - } - if (value.indexOf(0) != -1) { - // See RFC 2048, 2.8. "8bit Data" - throw new IllegalArgumentException("NULs may not be present in string parts"); - } - this.value = value; - } - - /** - * Constructor. - * - * @param name The name of the part - * @param value the string to post - */ - public StringPart(String name, String value) { - this(name, value, null); - } - - /** - * Gets the content in bytes. Bytes are lazily created to allow the charset to be changed - * after the part is created. - * - * @return the content in bytes - */ - private byte[] getContent() { - if (content == null) { - content = EncodingUtils.getBytes(value, getCharSet()); - } - return content; - } - - /** - * Writes the data to the given OutputStream. - * @param out the OutputStream to write to - * @throws IOException if there is a write error - */ - @Override - protected void sendData(OutputStream out) throws IOException { - LOG.trace("enter sendData(OutputStream)"); - out.write(getContent()); - } - - /** - * Return the length of the data. - * @return The length of the data. - * @see Part#lengthOfData() - */ - @Override - protected long lengthOfData() { - LOG.trace("enter lengthOfData()"); - return getContent().length; - } - - /* (non-Javadoc) - * @see org.apache.commons.httpclient.methods.multipart.BasePart#setCharSet(java.lang.String) - */ - @Override - public void setCharSet(String charSet) { - super.setCharSet(charSet); - this.content = null; - } - -} diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 8107985..2477d94 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -355,7 +355,7 @@ public class ZygoteInit { Log.v(TAG, "Preloading resource #" + Integer.toHexString(id)); } if (id != 0) { - if (mResources.getColorStateList(id) == null) { + if (mResources.getColorStateList(id, null) == null) { throw new IllegalArgumentException( "Unable to find preloaded color resource #0x" + Integer.toHexString(id) diff --git a/core/java/com/android/internal/widget/ButtonBarLayout.java b/core/java/com/android/internal/widget/ButtonBarLayout.java new file mode 100644 index 0000000..64e6c69 --- /dev/null +++ b/core/java/com/android/internal/widget/ButtonBarLayout.java @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2015 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.internal.widget; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.View; +import android.widget.LinearLayout; + +import com.android.internal.R; + +/** + * An extension of LinearLayout that automatically switches to vertical + * orientation when it can't fit its child views horizontally. + */ +public class ButtonBarLayout extends LinearLayout { + /** Spacer used in horizontal orientation. */ + private final View mSpacer; + + /** Whether the current configuration allows stacking. */ + private final boolean mAllowStacked; + + /** Whether the layout is currently stacked. */ + private boolean mStacked; + + public ButtonBarLayout(Context context, AttributeSet attrs) { + super(context, attrs); + + mAllowStacked = context.getResources().getBoolean(R.bool.allow_stacked_button_bar); + mSpacer = findViewById(R.id.spacer); + } + + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + super.onSizeChanged(w, h, oldw, oldh); + + // Maybe we can fit the content now? + if (w > oldw && mStacked) { + setStacked(false); + } + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + + if (mAllowStacked && getOrientation() == LinearLayout.HORIZONTAL) { + final int measuredWidth = getMeasuredWidthAndState(); + final int measuredWidthState = measuredWidth & MEASURED_STATE_MASK; + if (measuredWidthState == MEASURED_STATE_TOO_SMALL) { + setStacked(true); + + // Measure again in the new orientation. + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + } + } + + private void setStacked(boolean stacked) { + setOrientation(stacked ? LinearLayout.VERTICAL : LinearLayout.HORIZONTAL); + setGravity(stacked ? Gravity.RIGHT : Gravity.BOTTOM); + + if (mSpacer != null) { + mSpacer.setVisibility(stacked ? View.GONE : View.INVISIBLE); + } + + // Reverse the child order. This is specific to the Material button + // bar's layout XML and will probably not generalize. + final int childCount = getChildCount(); + for (int i = childCount - 2; i >= 0; i--) { + bringChildToFront(getChildAt(i)); + } + + mStacked = stacked; + } +} diff --git a/core/java/org/apache/http/conn/ConnectTimeoutException.java b/core/java/org/apache/http/conn/ConnectTimeoutException.java new file mode 100644 index 0000000..6cc6922 --- /dev/null +++ b/core/java/org/apache/http/conn/ConnectTimeoutException.java @@ -0,0 +1,69 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ConnectTimeoutException.java $ + * $Revision: 617645 $ + * $Date: 2008-02-01 13:05:31 -0800 (Fri, 01 Feb 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn; + +import java.io.InterruptedIOException; + +/** + * A timeout while connecting to an HTTP server or waiting for an + * available connection from an HttpConnectionManager. + * + * @author <a href="mailto:laura@lwerner.org">Laura Werner</a> + * + * @since 4.0 + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public class ConnectTimeoutException extends InterruptedIOException { + + private static final long serialVersionUID = -4816682903149535989L; + + /** + * Creates a ConnectTimeoutException with a <tt>null</tt> detail message. + */ + public ConnectTimeoutException() { + super(); + } + + /** + * Creates a ConnectTimeoutException with the specified detail message. + * + * @param message The exception detail message + */ + public ConnectTimeoutException(final String message) { + super(message); + } + +} diff --git a/core/java/org/apache/http/conn/scheme/HostNameResolver.java b/core/java/org/apache/http/conn/scheme/HostNameResolver.java new file mode 100644 index 0000000..30ef298 --- /dev/null +++ b/core/java/org/apache/http/conn/scheme/HostNameResolver.java @@ -0,0 +1,47 @@ +/* + * $HeadURL:$ + * $Revision:$ + * $Date:$ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.scheme; + +import java.io.IOException; +import java.net.InetAddress; + +/** + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public interface HostNameResolver { + + InetAddress resolve (String hostname) throws IOException; + +} diff --git a/core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java b/core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java new file mode 100644 index 0000000..b9f5348 --- /dev/null +++ b/core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java @@ -0,0 +1,77 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactory.java $ + * $Revision: 645850 $ + * $Date: 2008-04-08 04:08:52 -0700 (Tue, 08 Apr 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.scheme; + +import java.io.IOException; +import java.net.Socket; +import java.net.UnknownHostException; + +/** + * A {@link SocketFactory SocketFactory} for layered sockets (SSL/TLS). + * See there for things to consider when implementing a socket factory. + * + * @author Michael Becke + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> + * @since 4.0 + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public interface LayeredSocketFactory extends SocketFactory { + + /** + * Returns a socket connected to the given host that is layered over an + * existing socket. Used primarily for creating secure sockets through + * proxies. + * + * @param socket the existing socket + * @param host the host name/IP + * @param port the port on the host + * @param autoClose a flag for closing the underling socket when the created + * socket is closed + * + * @return Socket a new socket + * + * @throws IOException if an I/O error occurs while creating the socket + * @throws UnknownHostException if the IP address of the host cannot be + * determined + */ + Socket createSocket( + Socket socket, + String host, + int port, + boolean autoClose + ) throws IOException, UnknownHostException; + +} diff --git a/core/java/org/apache/http/conn/scheme/SocketFactory.java b/core/java/org/apache/http/conn/scheme/SocketFactory.java new file mode 100644 index 0000000..c6bc03c --- /dev/null +++ b/core/java/org/apache/http/conn/scheme/SocketFactory.java @@ -0,0 +1,143 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/SocketFactory.java $ + * $Revision: 645850 $ + * $Date: 2008-04-08 04:08:52 -0700 (Tue, 08 Apr 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.scheme; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.Socket; +import java.net.UnknownHostException; + +import org.apache.http.conn.ConnectTimeoutException; +import org.apache.http.params.HttpParams; + +/** + * A factory for creating and connecting sockets. + * The factory encapsulates the logic for establishing a socket connection. + * <br/> + * Both {@link java.lang.Object#equals(java.lang.Object) Object.equals()} + * and {@link java.lang.Object#hashCode() Object.hashCode()} + * must be overridden for the correct operation of some connection managers. + * + * @author <a href="mailto:rolandw at apache.org">Roland Weber</a> + * @author Michael Becke + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public interface SocketFactory { + + /** + * Creates a new, unconnected socket. + * The socket should subsequently be passed to + * {@link #connectSocket connectSocket}. + * + * @return a new socket + * + * @throws IOException if an I/O error occurs while creating the socket + */ + Socket createSocket() + throws IOException + ; + + + /** + * Connects a socket to the given host. + * + * @param sock the socket to connect, as obtained from + * {@link #createSocket createSocket}. + * <code>null</code> indicates that a new socket + * should be created and connected. + * @param host the host to connect to + * @param port the port to connect to on the host + * @param localAddress the local address to bind the socket to, or + * <code>null</code> for any + * @param localPort the port on the local machine, + * 0 or a negative number for any + * @param params additional {@link HttpParams parameters} for connecting + * + * @return the connected socket. The returned object may be different + * from the <code>sock</code> argument if this factory supports + * a layered protocol. + * + * @throws IOException if an I/O error occurs + * @throws UnknownHostException if the IP address of the target host + * can not be determined + * @throws ConnectTimeoutException if the socket cannot be connected + * within the time limit defined in the <code>params</code> + */ + Socket connectSocket( + Socket sock, + String host, + int port, + InetAddress localAddress, + int localPort, + HttpParams params + ) throws IOException, UnknownHostException, ConnectTimeoutException; + + + /** + * Checks whether a socket provides a secure connection. + * The socket must be {@link #connectSocket connected} + * by this factory. + * The factory will <i>not</i> perform I/O operations + * in this method. + * <br/> + * As a rule of thumb, plain sockets are not secure and + * TLS/SSL sockets are secure. However, there may be + * application specific deviations. For example, a plain + * socket to a host in the same intranet ("trusted zone") + * could be considered secure. On the other hand, a + * TLS/SSL socket could be considered insecure based on + * the cypher suite chosen for the connection. + * + * @param sock the connected socket to check + * + * @return <code>true</code> if the connection of the socket + * should be considered secure, or + * <code>false</code> if it should not + * + * @throws IllegalArgumentException + * if the argument is invalid, for example because it is + * not a connected socket or was created by a different + * socket factory. + * Note that socket factories are <i>not</i> required to + * check these conditions, they may simply return a default + * value when called with an invalid socket argument. + */ + boolean isSecure(Socket sock) + throws IllegalArgumentException + ; + +} diff --git a/core/java/org/apache/http/conn/ssl/AbstractVerifier.java b/core/java/org/apache/http/conn/ssl/AbstractVerifier.java new file mode 100644 index 0000000..e264f1c --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/AbstractVerifier.java @@ -0,0 +1,288 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java $ + * $Revision: 653041 $ + * $Date: 2008-05-03 03:39:28 -0700 (Sat, 03 May 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.ssl; + +import java.util.regex.Pattern; + +import java.io.IOException; +import java.security.cert.Certificate; +import java.security.cert.CertificateParsingException; +import java.security.cert.X509Certificate; +import java.util.Arrays; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.logging.Logger; +import java.util.logging.Level; + +import javax.net.ssl.DistinguishedNameParser; +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; + +/** + * Abstract base class for all standard {@link X509HostnameVerifier} + * implementations. + * + * @author Julius Davies + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public abstract class AbstractVerifier implements X509HostnameVerifier { + + private static final Pattern IPV4_PATTERN = Pattern.compile( + "^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$"); + + /** + * This contains a list of 2nd-level domains that aren't allowed to + * have wildcards when combined with country-codes. + * For example: [*.co.uk]. + * <p/> + * The [*.co.uk] problem is an interesting one. Should we just hope + * that CA's would never foolishly allow such a certificate to happen? + * Looks like we're the only implementation guarding against this. + * Firefox, Curl, Sun Java 1.4, 5, 6 don't bother with this check. + */ + private final static String[] BAD_COUNTRY_2LDS = + { "ac", "co", "com", "ed", "edu", "go", "gouv", "gov", "info", + "lg", "ne", "net", "or", "org" }; + + static { + // Just in case developer forgot to manually sort the array. :-) + Arrays.sort(BAD_COUNTRY_2LDS); + } + + public AbstractVerifier() { + super(); + } + + public final void verify(String host, SSLSocket ssl) + throws IOException { + if(host == null) { + throw new NullPointerException("host to verify is null"); + } + + SSLSession session = ssl.getSession(); + Certificate[] certs = session.getPeerCertificates(); + X509Certificate x509 = (X509Certificate) certs[0]; + verify(host, x509); + } + + public final boolean verify(String host, SSLSession session) { + try { + Certificate[] certs = session.getPeerCertificates(); + X509Certificate x509 = (X509Certificate) certs[0]; + verify(host, x509); + return true; + } + catch(SSLException e) { + return false; + } + } + + public final void verify(String host, X509Certificate cert) + throws SSLException { + String[] cns = getCNs(cert); + String[] subjectAlts = getDNSSubjectAlts(cert); + verify(host, cns, subjectAlts); + } + + public final void verify(final String host, final String[] cns, + final String[] subjectAlts, + final boolean strictWithSubDomains) + throws SSLException { + + // Build the list of names we're going to check. Our DEFAULT and + // STRICT implementations of the HostnameVerifier only use the + // first CN provided. All other CNs are ignored. + // (Firefox, wget, curl, Sun Java 1.4, 5, 6 all work this way). + LinkedList<String> names = new LinkedList<String>(); + if(cns != null && cns.length > 0 && cns[0] != null) { + names.add(cns[0]); + } + if(subjectAlts != null) { + for (String subjectAlt : subjectAlts) { + if (subjectAlt != null) { + names.add(subjectAlt); + } + } + } + + if(names.isEmpty()) { + String msg = "Certificate for <" + host + "> doesn't contain CN or DNS subjectAlt"; + throw new SSLException(msg); + } + + // StringBuffer for building the error message. + StringBuffer buf = new StringBuffer(); + + // We're can be case-insensitive when comparing the host we used to + // establish the socket to the hostname in the certificate. + String hostName = host.trim().toLowerCase(Locale.ENGLISH); + boolean match = false; + for(Iterator<String> it = names.iterator(); it.hasNext();) { + // Don't trim the CN, though! + String cn = it.next(); + cn = cn.toLowerCase(Locale.ENGLISH); + // Store CN in StringBuffer in case we need to report an error. + buf.append(" <"); + buf.append(cn); + buf.append('>'); + if(it.hasNext()) { + buf.append(" OR"); + } + + // The CN better have at least two dots if it wants wildcard + // action. It also can't be [*.co.uk] or [*.co.jp] or + // [*.org.uk], etc... + boolean doWildcard = cn.startsWith("*.") && + cn.indexOf('.', 2) != -1 && + acceptableCountryWildcard(cn) && + !isIPv4Address(host); + + if(doWildcard) { + match = hostName.endsWith(cn.substring(1)); + if(match && strictWithSubDomains) { + // If we're in strict mode, then [*.foo.com] is not + // allowed to match [a.b.foo.com] + match = countDots(hostName) == countDots(cn); + } + } else { + match = hostName.equals(cn); + } + if(match) { + break; + } + } + if(!match) { + throw new SSLException("hostname in certificate didn't match: <" + host + "> !=" + buf); + } + } + + public static boolean acceptableCountryWildcard(String cn) { + int cnLen = cn.length(); + if(cnLen >= 7 && cnLen <= 9) { + // Look for the '.' in the 3rd-last position: + if(cn.charAt(cnLen - 3) == '.') { + // Trim off the [*.] and the [.XX]. + String s = cn.substring(2, cnLen - 3); + // And test against the sorted array of bad 2lds: + int x = Arrays.binarySearch(BAD_COUNTRY_2LDS, s); + return x < 0; + } + } + return true; + } + + public static String[] getCNs(X509Certificate cert) { + DistinguishedNameParser dnParser = + new DistinguishedNameParser(cert.getSubjectX500Principal()); + List<String> cnList = dnParser.getAllMostSpecificFirst("cn"); + + if(!cnList.isEmpty()) { + String[] cns = new String[cnList.size()]; + cnList.toArray(cns); + return cns; + } else { + return null; + } + } + + + /** + * Extracts the array of SubjectAlt DNS names from an X509Certificate. + * Returns null if there aren't any. + * <p/> + * Note: Java doesn't appear able to extract international characters + * from the SubjectAlts. It can only extract international characters + * from the CN field. + * <p/> + * (Or maybe the version of OpenSSL I'm using to test isn't storing the + * international characters correctly in the SubjectAlts?). + * + * @param cert X509Certificate + * @return Array of SubjectALT DNS names stored in the certificate. + */ + public static String[] getDNSSubjectAlts(X509Certificate cert) { + LinkedList<String> subjectAltList = new LinkedList<String>(); + Collection<List<?>> c = null; + try { + c = cert.getSubjectAlternativeNames(); + } + catch(CertificateParsingException cpe) { + Logger.getLogger(AbstractVerifier.class.getName()) + .log(Level.FINE, "Error parsing certificate.", cpe); + } + if(c != null) { + for (List<?> aC : c) { + List<?> list = aC; + int type = ((Integer) list.get(0)).intValue(); + // If type is 2, then we've got a dNSName + if (type == 2) { + String s = (String) list.get(1); + subjectAltList.add(s); + } + } + } + if(!subjectAltList.isEmpty()) { + String[] subjectAlts = new String[subjectAltList.size()]; + subjectAltList.toArray(subjectAlts); + return subjectAlts; + } else { + return null; + } + } + + /** + * Counts the number of dots "." in a string. + * @param s string to count dots from + * @return number of dots + */ + public static int countDots(final String s) { + int count = 0; + for(int i = 0; i < s.length(); i++) { + if(s.charAt(i) == '.') { + count++; + } + } + return count; + } + + private static boolean isIPv4Address(final String input) { + return IPV4_PATTERN.matcher(input).matches(); + } +} diff --git a/core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java b/core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java new file mode 100644 index 0000000..c2bf4c4 --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java @@ -0,0 +1,59 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java $ + * $Revision: 617642 $ + * $Date: 2008-02-01 12:54:07 -0800 (Fri, 01 Feb 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.ssl; + +/** + * The ALLOW_ALL HostnameVerifier essentially turns hostname verification + * off. This implementation is a no-op, and never throws the SSLException. + * + * @author Julius Davies + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public class AllowAllHostnameVerifier extends AbstractVerifier { + + public final void verify( + final String host, + final String[] cns, + final String[] subjectAlts) { + // Allow everything - so never blowup. + } + + @Override + public final String toString() { + return "ALLOW_ALL"; + } + +} diff --git a/core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java b/core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java new file mode 100644 index 0000000..48a7bf9 --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java @@ -0,0 +1,67 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java $ + * $Revision: 617642 $ + * $Date: 2008-02-01 12:54:07 -0800 (Fri, 01 Feb 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.ssl; + +import javax.net.ssl.SSLException; + +/** + * The HostnameVerifier that works the same way as Curl and Firefox. + * <p/> + * The hostname must match either the first CN, or any of the subject-alts. + * A wildcard can occur in the CN, and in any of the subject-alts. + * <p/> + * The only difference between BROWSER_COMPATIBLE and STRICT is that a wildcard + * (such as "*.foo.com") with BROWSER_COMPATIBLE matches all subdomains, + * including "a.b.foo.com". + * + * @author Julius Davies + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public class BrowserCompatHostnameVerifier extends AbstractVerifier { + + public final void verify( + final String host, + final String[] cns, + final String[] subjectAlts) throws SSLException { + verify(host, cns, subjectAlts, false); + } + + @Override + public final String toString() { + return "BROWSER_COMPATIBLE"; + } + +} diff --git a/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java b/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java new file mode 100644 index 0000000..4d53d40 --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java @@ -0,0 +1,408 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java $ + * $Revision: 659194 $ + * $Date: 2008-05-22 11:33:47 -0700 (Thu, 22 May 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.ssl; + +import org.apache.http.conn.scheme.HostNameResolver; +import org.apache.http.conn.scheme.LayeredSocketFactory; +import org.apache.http.params.HttpConnectionParams; +import org.apache.http.params.HttpParams; + +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.UnknownHostException; +import java.security.KeyManagementException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.security.UnrecoverableKeyException; + +/** + * Layered socket factory for TLS/SSL connections, based on JSSE. + *. + * <p> + * SSLSocketFactory can be used to validate the identity of the HTTPS + * server against a list of trusted certificates and to authenticate to + * the HTTPS server using a private key. + * </p> + * + * <p> + * SSLSocketFactory will enable server authentication when supplied with + * a {@link KeyStore truststore} file containg one or several trusted + * certificates. The client secure socket will reject the connection during + * the SSL session handshake if the target HTTPS server attempts to + * authenticate itself with a non-trusted certificate. + * </p> + * + * <p> + * Use JDK keytool utility to import a trusted certificate and generate a truststore file: + * <pre> + * keytool -import -alias "my server cert" -file server.crt -keystore my.truststore + * </pre> + * </p> + * + * <p> + * SSLSocketFactory will enable client authentication when supplied with + * a {@link KeyStore keystore} file containg a private key/public certificate + * pair. The client secure socket will use the private key to authenticate + * itself to the target HTTPS server during the SSL session handshake if + * requested to do so by the server. + * The target HTTPS server will in its turn verify the certificate presented + * by the client in order to establish client's authenticity + * </p> + * + * <p> + * Use the following sequence of actions to generate a keystore file + * </p> + * <ul> + * <li> + * <p> + * Use JDK keytool utility to generate a new key + * <pre>keytool -genkey -v -alias "my client key" -validity 365 -keystore my.keystore</pre> + * For simplicity use the same password for the key as that of the keystore + * </p> + * </li> + * <li> + * <p> + * Issue a certificate signing request (CSR) + * <pre>keytool -certreq -alias "my client key" -file mycertreq.csr -keystore my.keystore</pre> + * </p> + * </li> + * <li> + * <p> + * Send the certificate request to the trusted Certificate Authority for signature. + * One may choose to act as her own CA and sign the certificate request using a PKI + * tool, such as OpenSSL. + * </p> + * </li> + * <li> + * <p> + * Import the trusted CA root certificate + * <pre>keytool -import -alias "my trusted ca" -file caroot.crt -keystore my.keystore</pre> + * </p> + * </li> + * <li> + * <p> + * Import the PKCS#7 file containg the complete certificate chain + * <pre>keytool -import -alias "my client key" -file mycert.p7 -keystore my.keystore</pre> + * </p> + * </li> + * <li> + * <p> + * Verify the content the resultant keystore file + * <pre>keytool -list -v -keystore my.keystore</pre> + * </p> + * </li> + * </ul> + * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> + * @author Julius Davies + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public class SSLSocketFactory implements LayeredSocketFactory { + + public static final String TLS = "TLS"; + public static final String SSL = "SSL"; + public static final String SSLV2 = "SSLv2"; + + public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER + = new AllowAllHostnameVerifier(); + + public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER + = new BrowserCompatHostnameVerifier(); + + public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER + = new StrictHostnameVerifier(); + + /* + * Put defaults into holder class to avoid class preloading creating an + * instance of the classes referenced. + */ + private static class NoPreloadHolder { + /** + * The factory using the default JVM settings for secure connections. + */ + private static final SSLSocketFactory DEFAULT_FACTORY = new SSLSocketFactory(); + } + + /** + * Gets an singleton instance of the SSLProtocolSocketFactory. + * @return a SSLProtocolSocketFactory + */ + public static SSLSocketFactory getSocketFactory() { + return NoPreloadHolder.DEFAULT_FACTORY; + } + + private final SSLContext sslcontext; + private final javax.net.ssl.SSLSocketFactory socketfactory; + private final HostNameResolver nameResolver; + private X509HostnameVerifier hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER; + + public SSLSocketFactory( + String algorithm, + final KeyStore keystore, + final String keystorePassword, + final KeyStore truststore, + final SecureRandom random, + final HostNameResolver nameResolver) + throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException + { + super(); + if (algorithm == null) { + algorithm = TLS; + } + KeyManager[] keymanagers = null; + if (keystore != null) { + keymanagers = createKeyManagers(keystore, keystorePassword); + } + TrustManager[] trustmanagers = null; + if (truststore != null) { + trustmanagers = createTrustManagers(truststore); + } + this.sslcontext = SSLContext.getInstance(algorithm); + this.sslcontext.init(keymanagers, trustmanagers, random); + this.socketfactory = this.sslcontext.getSocketFactory(); + this.nameResolver = nameResolver; + } + + public SSLSocketFactory( + final KeyStore keystore, + final String keystorePassword, + final KeyStore truststore) + throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException + { + this(TLS, keystore, keystorePassword, truststore, null, null); + } + + public SSLSocketFactory(final KeyStore keystore, final String keystorePassword) + throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException + { + this(TLS, keystore, keystorePassword, null, null, null); + } + + public SSLSocketFactory(final KeyStore truststore) + throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException + { + this(TLS, null, null, truststore, null, null); + } + + /** + * Constructs an HttpClient SSLSocketFactory backed by the given JSSE + * SSLSocketFactory. + * + * @hide + */ + public SSLSocketFactory(javax.net.ssl.SSLSocketFactory socketfactory) { + super(); + this.sslcontext = null; + this.socketfactory = socketfactory; + this.nameResolver = null; + } + + /** + * Creates the default SSL socket factory. + * This constructor is used exclusively to instantiate the factory for + * {@link #getSocketFactory getSocketFactory}. + */ + private SSLSocketFactory() { + super(); + this.sslcontext = null; + this.socketfactory = HttpsURLConnection.getDefaultSSLSocketFactory(); + this.nameResolver = null; + } + + private static KeyManager[] createKeyManagers(final KeyStore keystore, final String password) + throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { + if (keystore == null) { + throw new IllegalArgumentException("Keystore may not be null"); + } + KeyManagerFactory kmfactory = KeyManagerFactory.getInstance( + KeyManagerFactory.getDefaultAlgorithm()); + kmfactory.init(keystore, password != null ? password.toCharArray(): null); + return kmfactory.getKeyManagers(); + } + + private static TrustManager[] createTrustManagers(final KeyStore keystore) + throws KeyStoreException, NoSuchAlgorithmException { + if (keystore == null) { + throw new IllegalArgumentException("Keystore may not be null"); + } + TrustManagerFactory tmfactory = TrustManagerFactory.getInstance( + TrustManagerFactory.getDefaultAlgorithm()); + tmfactory.init(keystore); + return tmfactory.getTrustManagers(); + } + + + // non-javadoc, see interface org.apache.http.conn.SocketFactory + public Socket createSocket() + throws IOException { + + // the cast makes sure that the factory is working as expected + return (SSLSocket) this.socketfactory.createSocket(); + } + + + // non-javadoc, see interface org.apache.http.conn.SocketFactory + public Socket connectSocket( + final Socket sock, + final String host, + final int port, + final InetAddress localAddress, + int localPort, + final HttpParams params + ) throws IOException { + + if (host == null) { + throw new IllegalArgumentException("Target host may not be null."); + } + if (params == null) { + throw new IllegalArgumentException("Parameters may not be null."); + } + + SSLSocket sslsock = (SSLSocket) + ((sock != null) ? sock : createSocket()); + + if ((localAddress != null) || (localPort > 0)) { + + // we need to bind explicitly + if (localPort < 0) + localPort = 0; // indicates "any" + + InetSocketAddress isa = + new InetSocketAddress(localAddress, localPort); + sslsock.bind(isa); + } + + int connTimeout = HttpConnectionParams.getConnectionTimeout(params); + int soTimeout = HttpConnectionParams.getSoTimeout(params); + + InetSocketAddress remoteAddress; + if (this.nameResolver != null) { + remoteAddress = new InetSocketAddress(this.nameResolver.resolve(host), port); + } else { + remoteAddress = new InetSocketAddress(host, port); + } + + sslsock.connect(remoteAddress, connTimeout); + + sslsock.setSoTimeout(soTimeout); + try { + hostnameVerifier.verify(host, sslsock); + // verifyHostName() didn't blowup - good! + } catch (IOException iox) { + // close the socket before re-throwing the exception + try { sslsock.close(); } catch (Exception x) { /*ignore*/ } + throw iox; + } + + return sslsock; + } + + + /** + * Checks whether a socket connection is secure. + * This factory creates TLS/SSL socket connections + * which, by default, are considered secure. + * <br/> + * Derived classes may override this method to perform + * runtime checks, for example based on the cypher suite. + * + * @param sock the connected socket + * + * @return <code>true</code> + * + * @throws IllegalArgumentException if the argument is invalid + */ + public boolean isSecure(Socket sock) + throws IllegalArgumentException { + + if (sock == null) { + throw new IllegalArgumentException("Socket may not be null."); + } + // This instanceof check is in line with createSocket() above. + if (!(sock instanceof SSLSocket)) { + throw new IllegalArgumentException + ("Socket not created by this factory."); + } + // This check is performed last since it calls the argument object. + if (sock.isClosed()) { + throw new IllegalArgumentException("Socket is closed."); + } + + return true; + + } // isSecure + + + // non-javadoc, see interface LayeredSocketFactory + public Socket createSocket( + final Socket socket, + final String host, + final int port, + final boolean autoClose + ) throws IOException, UnknownHostException { + SSLSocket sslSocket = (SSLSocket) this.socketfactory.createSocket( + socket, + host, + port, + autoClose + ); + hostnameVerifier.verify(host, sslSocket); + // verifyHostName() didn't blowup - good! + return sslSocket; + } + + public void setHostnameVerifier(X509HostnameVerifier hostnameVerifier) { + if ( hostnameVerifier == null ) { + throw new IllegalArgumentException("Hostname verifier may not be null"); + } + this.hostnameVerifier = hostnameVerifier; + } + + public X509HostnameVerifier getHostnameVerifier() { + return hostnameVerifier; + } + +} diff --git a/core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java b/core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java new file mode 100644 index 0000000..bd9e70d --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java @@ -0,0 +1,74 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java $ + * $Revision: 617642 $ + * $Date: 2008-02-01 12:54:07 -0800 (Fri, 01 Feb 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.ssl; + +import javax.net.ssl.SSLException; + +/** + * The Strict HostnameVerifier works the same way as Sun Java 1.4, Sun + * Java 5, Sun Java 6-rc. It's also pretty close to IE6. This + * implementation appears to be compliant with RFC 2818 for dealing with + * wildcards. + * <p/> + * The hostname must match either the first CN, or any of the subject-alts. + * A wildcard can occur in the CN, and in any of the subject-alts. The + * one divergence from IE6 is how we only check the first CN. IE6 allows + * a match against any of the CNs present. We decided to follow in + * Sun Java 1.4's footsteps and only check the first CN. (If you need + * to check all the CN's, feel free to write your own implementation!). + * <p/> + * A wildcard such as "*.foo.com" matches only subdomains in the same + * level, for example "a.foo.com". It does not match deeper subdomains + * such as "a.b.foo.com". + * + * @author Julius Davies + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public class StrictHostnameVerifier extends AbstractVerifier { + + public final void verify( + final String host, + final String[] cns, + final String[] subjectAlts) throws SSLException { + verify(host, cns, subjectAlts, true); + } + + @Override + public final String toString() { + return "STRICT"; + } + +} diff --git a/core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java b/core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java new file mode 100644 index 0000000..e38db5f --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java @@ -0,0 +1,91 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java $ + * $Revision: 618365 $ + * $Date: 2008-02-04 10:20:08 -0800 (Mon, 04 Feb 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.conn.ssl; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; +import java.io.IOException; +import java.security.cert.X509Certificate; + +/** + * Interface for checking if a hostname matches the names stored inside the + * server's X.509 certificate. Implements javax.net.ssl.HostnameVerifier, but + * we don't actually use that interface. Instead we added some methods that + * take String parameters (instead of javax.net.ssl.HostnameVerifier's + * SSLSession). JUnit is a lot easier this way! :-) + * <p/> + * We provide the HostnameVerifier.DEFAULT, HostnameVerifier.STRICT, and + * HostnameVerifier.ALLOW_ALL implementations. But feel free to define + * your own implementation! + * <p/> + * Inspired by Sebastian Hauer's original StrictSSLProtocolSocketFactory in the + * HttpClient "contrib" repository. + * + * @author Julius Davies + * @author <a href="mailto:hauer@psicode.com">Sebastian Hauer</a> + * + * @since 4.0 (8-Dec-2006) + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public interface X509HostnameVerifier extends HostnameVerifier { + + boolean verify(String host, SSLSession session); + + void verify(String host, SSLSocket ssl) throws IOException; + + void verify(String host, X509Certificate cert) throws SSLException; + + /** + * Checks to see if the supplied hostname matches any of the supplied CNs + * or "DNS" Subject-Alts. Most implementations only look at the first CN, + * and ignore any additional CNs. Most implementations do look at all of + * the "DNS" Subject-Alts. The CNs or Subject-Alts may contain wildcards + * according to RFC 2818. + * + * @param cns CN fields, in order, as extracted from the X.509 + * certificate. + * @param subjectAlts Subject-Alt fields of type 2 ("DNS"), as extracted + * from the X.509 certificate. + * @param host The hostname to verify. + * @throws SSLException If verification failed. + */ + void verify(String host, String[] cns, String[] subjectAlts) + throws SSLException; + + +} diff --git a/core/java/org/apache/http/conn/ssl/package.html b/core/java/org/apache/http/conn/ssl/package.html new file mode 100644 index 0000000..a5c737f --- /dev/null +++ b/core/java/org/apache/http/conn/ssl/package.html @@ -0,0 +1,40 @@ +<html> +<head> +<!-- +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/package.html $ + * $Revision: 555193 $ + * $Date: 2007-07-11 00:36:47 -0700 (Wed, 11 Jul 2007) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ +--> +</head> +<body> +TLS/SSL specific parts of the <i>HttpConn</i> API. + +</body> +</html> diff --git a/core/java/org/apache/http/params/CoreConnectionPNames.java b/core/java/org/apache/http/params/CoreConnectionPNames.java new file mode 100644 index 0000000..9479db1 --- /dev/null +++ b/core/java/org/apache/http/params/CoreConnectionPNames.java @@ -0,0 +1,136 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java $ + * $Revision: 576077 $ + * $Date: 2007-09-16 04:50:22 -0700 (Sun, 16 Sep 2007) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.params; + + +/** + * Defines parameter names for connections in HttpCore. + * + * @version $Revision: 576077 $ + * + * @since 4.0 + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public interface CoreConnectionPNames { + + /** + * Defines the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the + * timeout for waiting for data. A timeout value of zero is interpreted as an infinite + * timeout. This value is used when no socket timeout is set in the + * method parameters. + * <p> + * This parameter expects a value of type {@link Integer}. + * </p> + * @see java.net.SocketOptions#SO_TIMEOUT + */ + public static final String SO_TIMEOUT = "http.socket.timeout"; + + /** + * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm + * tries to conserve bandwidth by minimizing the number of segments that are + * sent. When applications wish to decrease network latency and increase + * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). + * Data will be sent earlier, at the cost of an increase in bandwidth consumption. + * <p> + * This parameter expects a value of type {@link Boolean}. + * </p> + * @see java.net.SocketOptions#TCP_NODELAY + */ + public static final String TCP_NODELAY = "http.tcp.nodelay"; + + /** + * Determines the size of the internal socket buffer used to buffer data + * while receiving / transmitting HTTP messages. + * <p> + * This parameter expects a value of type {@link Integer}. + * </p> + */ + public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size"; + + /** + * Sets SO_LINGER with the specified linger time in seconds. The maximum timeout + * value is platform specific. Value <tt>0</tt> implies that the option is disabled. + * Value <tt>-1</tt> implies that the JRE default is used. The setting only affects + * socket close. + * <p> + * This parameter expects a value of type {@link Integer}. + * </p> + * @see java.net.SocketOptions#SO_LINGER + */ + public static final String SO_LINGER = "http.socket.linger"; + + /** + * Determines the timeout until a connection is etablished. A value of zero + * means the timeout is not used. The default value is zero. + * <p> + * This parameter expects a value of type {@link Integer}. + * </p> + */ + public static final String CONNECTION_TIMEOUT = "http.connection.timeout"; + + /** + * Determines whether stale connection check is to be used. Disabling + * stale connection check may result in slight performance improvement + * at the risk of getting an I/O error when executing a request over a + * connection that has been closed at the server side. + * <p> + * This parameter expects a value of type {@link Boolean}. + * </p> + */ + public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck"; + + /** + * Determines the maximum line length limit. If set to a positive value, any HTTP + * line exceeding this limit will cause an IOException. A negative or zero value + * will effectively disable the check. + * <p> + * This parameter expects a value of type {@link Integer}. + * </p> + */ + public static final String MAX_LINE_LENGTH = "http.connection.max-line-length"; + + /** + * Determines the maximum HTTP header count allowed. If set to a positive value, + * the number of HTTP headers received from the data stream exceeding this limit + * will cause an IOException. A negative or zero value will effectively disable + * the check. + * <p> + * This parameter expects a value of type {@link Integer}. + * </p> + */ + public static final String MAX_HEADER_COUNT = "http.connection.max-header-count"; + +} diff --git a/core/java/org/apache/http/params/HttpConnectionParams.java b/core/java/org/apache/http/params/HttpConnectionParams.java new file mode 100644 index 0000000..a7b31fc --- /dev/null +++ b/core/java/org/apache/http/params/HttpConnectionParams.java @@ -0,0 +1,229 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpConnectionParams.java $ + * $Revision: 576089 $ + * $Date: 2007-09-16 05:39:56 -0700 (Sun, 16 Sep 2007) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.params; + +/** + * An adaptor for accessing connection parameters in {@link HttpParams}. + * <br/> + * Note that the <i>implements</i> relation to {@link CoreConnectionPNames} + * is for compatibility with existing application code only. References to + * the parameter names should use the interface, not this class. + * + * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> + * + * @version $Revision: 576089 $ + * + * @since 4.0 + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public final class HttpConnectionParams implements CoreConnectionPNames { + + /** + */ + private HttpConnectionParams() { + super(); + } + + /** + * Returns the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the + * timeout for waiting for data. A timeout value of zero is interpreted as an infinite + * timeout. This value is used when no socket timeout is set in the + * method parameters. + * + * @return timeout in milliseconds + */ + public static int getSoTimeout(final HttpParams params) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + return params.getIntParameter(CoreConnectionPNames.SO_TIMEOUT, 0); + } + + /** + * Sets the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the + * timeout for waiting for data. A timeout value of zero is interpreted as an infinite + * timeout. This value is used when no socket timeout is set in the + * method parameters. + * + * @param timeout Timeout in milliseconds + */ + public static void setSoTimeout(final HttpParams params, int timeout) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeout); + + } + + /** + * Tests if Nagle's algorithm is to be used. + * + * @return <tt>true</tt> if the Nagle's algorithm is to NOT be used + * (that is enable TCP_NODELAY), <tt>false</tt> otherwise. + */ + public static boolean getTcpNoDelay(final HttpParams params) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + return params.getBooleanParameter + (CoreConnectionPNames.TCP_NODELAY, true); + } + + /** + * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm + * tries to conserve bandwidth by minimizing the number of segments that are + * sent. When applications wish to decrease network latency and increase + * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). + * Data will be sent earlier, at the cost of an increase in bandwidth consumption. + * + * @param value <tt>true</tt> if the Nagle's algorithm is to NOT be used + * (that is enable TCP_NODELAY), <tt>false</tt> otherwise. + */ + public static void setTcpNoDelay(final HttpParams params, boolean value) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, value); + } + + public static int getSocketBufferSize(final HttpParams params) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + return params.getIntParameter + (CoreConnectionPNames.SOCKET_BUFFER_SIZE, -1); + } + + public static void setSocketBufferSize(final HttpParams params, int size) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + params.setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, size); + } + + /** + * Returns linger-on-close timeout. Value <tt>0</tt> implies that the option is + * disabled. Value <tt>-1</tt> implies that the JRE default is used. + * + * @return the linger-on-close timeout + */ + public static int getLinger(final HttpParams params) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + return params.getIntParameter(CoreConnectionPNames.SO_LINGER, -1); + } + + /** + * Returns linger-on-close timeout. This option disables/enables immediate return + * from a close() of a TCP Socket. Enabling this option with a non-zero Integer + * timeout means that a close() will block pending the transmission and + * acknowledgement of all data written to the peer, at which point the socket is + * closed gracefully. Value <tt>0</tt> implies that the option is + * disabled. Value <tt>-1</tt> implies that the JRE default is used. + * + * @param value the linger-on-close timeout + */ + public static void setLinger(final HttpParams params, int value) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + params.setIntParameter(CoreConnectionPNames.SO_LINGER, value); + } + + /** + * Returns the timeout until a connection is etablished. A value of zero + * means the timeout is not used. The default value is zero. + * + * @return timeout in milliseconds. + */ + public static int getConnectionTimeout(final HttpParams params) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + return params.getIntParameter + (CoreConnectionPNames.CONNECTION_TIMEOUT, 0); + } + + /** + * Sets the timeout until a connection is etablished. A value of zero + * means the timeout is not used. The default value is zero. + * + * @param timeout Timeout in milliseconds. + */ + public static void setConnectionTimeout(final HttpParams params, int timeout) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + params.setIntParameter + (CoreConnectionPNames.CONNECTION_TIMEOUT, timeout); + } + + /** + * Tests whether stale connection check is to be used. Disabling + * stale connection check may result in slight performance improvement + * at the risk of getting an I/O error when executing a request over a + * connection that has been closed at the server side. + * + * @return <tt>true</tt> if stale connection check is to be used, + * <tt>false</tt> otherwise. + */ + public static boolean isStaleCheckingEnabled(final HttpParams params) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + return params.getBooleanParameter + (CoreConnectionPNames.STALE_CONNECTION_CHECK, true); + } + + /** + * Defines whether stale connection check is to be used. Disabling + * stale connection check may result in slight performance improvement + * at the risk of getting an I/O error when executing a request over a + * connection that has been closed at the server side. + * + * @param value <tt>true</tt> if stale connection check is to be used, + * <tt>false</tt> otherwise. + */ + public static void setStaleCheckingEnabled(final HttpParams params, boolean value) { + if (params == null) { + throw new IllegalArgumentException("HTTP parameters may not be null"); + } + params.setBooleanParameter + (CoreConnectionPNames.STALE_CONNECTION_CHECK, value); + } + +} diff --git a/core/java/org/apache/http/params/HttpParams.java b/core/java/org/apache/http/params/HttpParams.java new file mode 100644 index 0000000..9562e54 --- /dev/null +++ b/core/java/org/apache/http/params/HttpParams.java @@ -0,0 +1,192 @@ +/* + * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpParams.java $ + * $Revision: 610763 $ + * $Date: 2008-01-10 04:01:13 -0800 (Thu, 10 Jan 2008) $ + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ + +package org.apache.http.params; + +/** + * Represents a collection of HTTP protocol and framework parameters. + * + * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> + * + * @version $Revision: 610763 $ + * + * @since 4.0 + * + * @deprecated Please use {@link java.net.URL#openConnection} instead. + * Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a> + * for further details. + */ +@Deprecated +public interface HttpParams { + + /** + * Obtains the value of the given parameter. + * + * @param name the parent name. + * + * @return an object that represents the value of the parameter, + * <code>null</code> if the parameter is not set or if it + * is explicitly set to <code>null</code> + * + * @see #setParameter(String, Object) + */ + Object getParameter(String name); + + /** + * Assigns the value to the parameter with the given name. + * + * @param name parameter name + * @param value parameter value + */ + HttpParams setParameter(String name, Object value); + + /** + * Creates a copy of these parameters. + * + * @return a new set of parameters holding the same values as this one + */ + HttpParams copy(); + + /** + * Removes the parameter with the specified name. + * + * @param name parameter name + * + * @return true if the parameter existed and has been removed, false else. + */ + boolean removeParameter(String name); + + /** + * Returns a {@link Long} parameter value with the given name. + * If the parameter is not explicitly set, the default value is returned. + * + * @param name the parent name. + * @param defaultValue the default value. + * + * @return a {@link Long} that represents the value of the parameter. + * + * @see #setLongParameter(String, long) + */ + long getLongParameter(String name, long defaultValue); + + /** + * Assigns a {@link Long} to the parameter with the given name + * + * @param name parameter name + * @param value parameter value + */ + HttpParams setLongParameter(String name, long value); + + /** + * Returns an {@link Integer} parameter value with the given name. + * If the parameter is not explicitly set, the default value is returned. + * + * @param name the parent name. + * @param defaultValue the default value. + * + * @return a {@link Integer} that represents the value of the parameter. + * + * @see #setIntParameter(String, int) + */ + int getIntParameter(String name, int defaultValue); + + /** + * Assigns an {@link Integer} to the parameter with the given name + * + * @param name parameter name + * @param value parameter value + */ + HttpParams setIntParameter(String name, int value); + + /** + * Returns a {@link Double} parameter value with the given name. + * If the parameter is not explicitly set, the default value is returned. + * + * @param name the parent name. + * @param defaultValue the default value. + * + * @return a {@link Double} that represents the value of the parameter. + * + * @see #setDoubleParameter(String, double) + */ + double getDoubleParameter(String name, double defaultValue); + + /** + * Assigns a {@link Double} to the parameter with the given name + * + * @param name parameter name + * @param value parameter value + */ + HttpParams setDoubleParameter(String name, double value); + + /** + * Returns a {@link Boolean} parameter value with the given name. + * If the parameter is not explicitly set, the default value is returned. + * + * @param name the parent name. + * @param defaultValue the default value. + * + * @return a {@link Boolean} that represents the value of the parameter. + * + * @see #setBooleanParameter(String, boolean) + */ + boolean getBooleanParameter(String name, boolean defaultValue); + + /** + * Assigns a {@link Boolean} to the parameter with the given name + * + * @param name parameter name + * @param value parameter value + */ + HttpParams setBooleanParameter(String name, boolean value); + + /** + * Checks if a boolean parameter is set to <code>true</code>. + * + * @param name parameter name + * + * @return <tt>true</tt> if the parameter is set to value <tt>true</tt>, + * <tt>false</tt> if it is not set or set to <code>false</code> + */ + boolean isParameterTrue(String name); + + /** + * Checks if a boolean parameter is not set or <code>false</code>. + * + * @param name parameter name + * + * @return <tt>true</tt> if the parameter is either not set or + * set to value <tt>false</tt>, + * <tt>false</tt> if it is set to <code>true</code> + */ + boolean isParameterFalse(String name); + +} diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp index d1b1a1a..0b737a7 100644 --- a/core/jni/android_hardware_SensorManager.cpp +++ b/core/jni/android_hardware_SensorManager.cpp @@ -16,6 +16,8 @@ #define LOG_TAG "SensorManager" +#include <map> + #include <utils/Log.h> #include <utils/Looper.h> @@ -44,7 +46,6 @@ struct SensorOffsets jfieldID vendor; jfieldID version; jfieldID handle; - jfieldID type; jfieldID range; jfieldID resolution; jfieldID power; @@ -55,6 +56,7 @@ struct SensorOffsets jfieldID requiredPermission; jfieldID maxDelay; jfieldID flags; + jmethodID setType; } gSensorOffsets; @@ -71,7 +73,6 @@ nativeClassInit (JNIEnv *_env, jclass _this) sensorOffsets.vendor = _env->GetFieldID(sensorClass, "mVendor", "Ljava/lang/String;"); sensorOffsets.version = _env->GetFieldID(sensorClass, "mVersion", "I"); sensorOffsets.handle = _env->GetFieldID(sensorClass, "mHandle", "I"); - sensorOffsets.type = _env->GetFieldID(sensorClass, "mType", "I"); sensorOffsets.range = _env->GetFieldID(sensorClass, "mMaxRange", "F"); sensorOffsets.resolution = _env->GetFieldID(sensorClass, "mResolution","F"); sensorOffsets.power = _env->GetFieldID(sensorClass, "mPower", "F"); @@ -84,6 +85,47 @@ nativeClassInit (JNIEnv *_env, jclass _this) "Ljava/lang/String;"); sensorOffsets.maxDelay = _env->GetFieldID(sensorClass, "mMaxDelay", "I"); sensorOffsets.flags = _env->GetFieldID(sensorClass, "mFlags", "I"); + sensorOffsets.setType = _env->GetMethodID(sensorClass, "setType", "(I)Z"); +} + +/** + * A key comparator predicate. + * It is used to intern strings associated with Sensor data. + * It defines a 'Strict weak ordering' for the interned strings. + */ +class InternedStringCompare { +public: + bool operator()(const String8* string1, const String8* string2) const { + if (string1 == NULL) { + return string2 != NULL; + } + return string1->compare(*string2) < 0; + } +}; + +/** + * A localized interning mechanism for Sensor strings. + * We implement our own interning to avoid the overhead of using java.lang.String#intern(). + * It is common that Vendor, StringType, and RequirePermission data is common between many of the + * Sensors, by interning the memory usage to represent Sensors is optimized. + */ +static jstring +getInternedString(JNIEnv *env, const String8* string) { + static std::map<const String8*, jstring, InternedStringCompare> internedStrings; + + jstring internedString; + std::map<const String8*, jstring>::iterator iterator = internedStrings.find(string); + if (iterator != internedStrings.end()) { + internedString = iterator->second; + } else { + jstring localString = env->NewStringUTF(string->string()); + // we are implementing our own interning so expect these strings to be backed by global refs + internedString = (jstring) env->NewGlobalRef(localString); + internedStrings.insert(std::make_pair(string, internedString)); + env->DeleteLocalRef(localString); + } + + return internedString; } static jint @@ -93,20 +135,19 @@ nativeGetNextSensor(JNIEnv *env, jclass clazz, jobject sensor, jint next) Sensor const* const* sensorList; size_t count = mgr.getSensorList(&sensorList); - if (size_t(next) >= count) + if (size_t(next) >= count) { return -1; + } Sensor const* const list = sensorList[next]; const SensorOffsets& sensorOffsets(gSensorOffsets); - jstring name = env->NewStringUTF(list->getName().string()); - jstring vendor = env->NewStringUTF(list->getVendor().string()); - jstring stringType = env->NewStringUTF(list->getStringType().string()); - jstring requiredPermission = env->NewStringUTF(list->getRequiredPermission().string()); + jstring name = getInternedString(env, &list->getName()); + jstring vendor = getInternedString(env, &list->getVendor()); + jstring requiredPermission = getInternedString(env, &list->getRequiredPermission()); env->SetObjectField(sensor, sensorOffsets.name, name); env->SetObjectField(sensor, sensorOffsets.vendor, vendor); env->SetIntField(sensor, sensorOffsets.version, list->getVersion()); env->SetIntField(sensor, sensorOffsets.handle, list->getHandle()); - env->SetIntField(sensor, sensorOffsets.type, list->getType()); env->SetFloatField(sensor, sensorOffsets.range, list->getMaxValue()); env->SetFloatField(sensor, sensorOffsets.resolution, list->getResolution()); env->SetFloatField(sensor, sensorOffsets.power, list->getPowerUsage()); @@ -115,11 +156,14 @@ nativeGetNextSensor(JNIEnv *env, jclass clazz, jobject sensor, jint next) list->getFifoReservedEventCount()); env->SetIntField(sensor, sensorOffsets.fifoMaxEventCount, list->getFifoMaxEventCount()); - env->SetObjectField(sensor, sensorOffsets.stringType, stringType); env->SetObjectField(sensor, sensorOffsets.requiredPermission, requiredPermission); env->SetIntField(sensor, sensorOffsets.maxDelay, list->getMaxDelay()); env->SetIntField(sensor, sensorOffsets.flags, list->getFlags()); + if (env->CallBooleanMethod(sensor, sensorOffsets.setType, list->getType()) == JNI_FALSE) { + jstring stringType = getInternedString(env, &list->getStringType()); + env->SetObjectField(sensor, sensorOffsets.stringType, stringType); + } next++; return size_t(next) < count ? next : 0; } diff --git a/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp b/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp index aabf320..7497d8b 100644 --- a/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp +++ b/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp @@ -598,15 +598,10 @@ static jint LegacyCameraDevice_nativeSetSurfaceDimens(JNIEnv* env, jobject thiz, ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__); return BAD_VALUE; } - status_t err = native_window_set_buffers_dimensions(anw.get(), width, height); - if (err != NO_ERROR) { - ALOGE("%s: Error while setting surface dimens %s (%d).", __FUNCTION__, strerror(-err), err); - return err; - } - // WAR - Set user dimensions also to avoid incorrect scaling after TextureView orientation - // change. - err = native_window_set_buffers_user_dimensions(anw.get(), width, height); + // Set user dimensions only + // The producer dimensions are owned by GL + status_t err = native_window_set_buffers_user_dimensions(anw.get(), width, height); if (err != NO_ERROR) { ALOGE("%s: Error while setting surface user dimens %s (%d).", __FUNCTION__, strerror(-err), err); @@ -750,4 +745,3 @@ int register_android_hardware_camera2_legacy_LegacyCameraDevice(JNIEnv* env) gCameraDeviceMethods, NELEM(gCameraDeviceMethods)); } - diff --git a/core/res/res/layout/alert_dialog_button_bar_material.xml b/core/res/res/layout/alert_dialog_button_bar_material.xml new file mode 100644 index 0000000..891bcd5 --- /dev/null +++ b/core/res/res/layout/alert_dialog_button_bar_material.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 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. +--> + +<com.android.internal.widget.ButtonBarLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/buttonPanel" + style="?attr/buttonBarStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layoutDirection="locale" + android:orientation="horizontal" + android:paddingStart="12dp" + android:paddingEnd="12dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:gravity="bottom"> + + <Button + android:id="@+id/button3" + style="?attr/buttonBarNeutralButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + <Space + android:id="@+id/spacer" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_weight="1" + android:visibility="invisible" /> + + <Button + android:id="@+id/button2" + style="?attr/buttonBarNegativeButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + <Button + android:id="@+id/button1" + style="?attr/buttonBarPositiveButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> +</com.android.internal.widget.ButtonBarLayout>
\ No newline at end of file diff --git a/core/res/res/layout/alert_dialog_material.xml b/core/res/res/layout/alert_dialog_material.xml index 29bfaa7..c8735b1 100644 --- a/core/res/res/layout/alert_dialog_material.xml +++ b/core/res/res/layout/alert_dialog_material.xml @@ -101,33 +101,5 @@ android:layout_height="wrap_content" /> </FrameLayout> - <LinearLayout android:id="@+id/buttonPanel" - style="?attr/buttonBarStyle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layoutDirection="locale" - android:orientation="horizontal" - android:paddingStart="12dp" - android:paddingEnd="12dp" - android:paddingTop="8dp" - android:paddingBottom="8dp" - android:gravity="bottom"> - <Button android:id="@+id/button3" - style="?attr/buttonBarNeutralButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - <Space - android:layout_width="0dp" - android:layout_height="0dp" - android:layout_weight="1" - android:visibility="invisible" /> - <Button android:id="@+id/button2" - style="?attr/buttonBarNegativeButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - <Button android:id="@+id/button1" - style="?attr/buttonBarPositiveButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - </LinearLayout> + <include layout="@layout/alert_dialog_button_bar_material" /> </LinearLayout> diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml index 7c4c2d0..13487d8 100644 --- a/core/res/res/values-af/strings.xml +++ b/core/res/res/values-af/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wil Verken-met-raak aktiveer. Wanneer Verken-met-raak aangeskakel is, kan jy beskrywings van wat onder jou vinger is hoor of sien, of jy kan gebare uitvoer om interaksie met die foon te hê ."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 maand gelede"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Voor 1 maand gelede"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 sekonde gelede"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sekondes gelede"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minuut gelede"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minute gelede"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 uur gelede"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> uur gelede"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Verlede maand"</string> <string name="older" msgid="5211975022815554840">"Ouer"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"gister"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dae gelede"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"oor 1 sekonde"</item> - <item quantity="other" msgid="1241926116443974687">"oor <xliff:g id="COUNT">%d</xliff:g> sekondes"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"oor 1 minuut"</item> - <item quantity="other" msgid="3330713936399448749">"oor <xliff:g id="COUNT">%d</xliff:g> minute"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"oor 1 uur"</item> - <item quantity="other" msgid="547290677353727389">"oor <xliff:g id="COUNT">%d</xliff:g> uur"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"môre"</item> - <item quantity="other" msgid="5109449375100953247">"oor <xliff:g id="COUNT">%d</xliff:g> dae"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 sek. gelede"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sek. gelede"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 min. gelede"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min. gelede"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 uur gelede"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> uur gelede"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"gister"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dae gelede"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"oor 1 sek."</item> - <item quantity="other" msgid="5495880108825805108">"oor <xliff:g id="COUNT">%d</xliff:g> sek."</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"oor 1 min."</item> - <item quantity="other" msgid="4216113292706568726">"oor <xliff:g id="COUNT">%d</xliff:g> minute"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"oor 1 uur"</item> - <item quantity="other" msgid="3705373766798013406">"oor <xliff:g id="COUNT">%d</xliff:g> uur"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"môre"</item> - <item quantity="other" msgid="2973062968038355991">"oor <xliff:g id="COUNT">%d</xliff:g> dae"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"op <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"by <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"in <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml index a946741..c7b5b53 100644 --- a/core/res/res/values-am/strings.xml +++ b/core/res/res/values-am/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ማሰስን በንኪ ማንቃት ይፈልጋል። አስስ በንኪ በሚበራበት ጊዜ፣ ከስልኩ ጋር ለመግባባት ምን በጣትዎ ስር ወይም ምልክቶችን ማከናወን እንዳለብዎ ማብራሪያ ሊመለከቱ ወይም ሊሰሙ ይችላሉ።"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"ከ1 ወር በፊት"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ከ1 ወር በፊት"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"ከ1 ሴኮንድ በፊት"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ሰኮንዶች በፊት"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"ከ 1 ደቂቃ በፊት"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች በፊት"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"ከ1 ሰዓት በፊት"</item> - <item quantity="other" msgid="2467273239587587569">"ከ <xliff:g id="COUNT">%d</xliff:g> ሰዓት በፊት"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">" ያለፈው ወር"</string> <string name="older" msgid="5211975022815554840">"የድሮ"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ትላንትና"</item> - <item quantity="other" msgid="2479586466153314633">"ከ <xliff:g id="COUNT">%d</xliff:g>ቀን በፊት"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"በ1 ሴኮንድ"</item> - <item quantity="other" msgid="1241926116443974687">"በ<xliff:g id="COUNT">%d</xliff:g> ሰከንዶች ውስጥ"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"በ1 ደቂቃ ውስጥ"</item> - <item quantity="other" msgid="3330713936399448749">"በ<xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች ውስጥ"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"በ 1 ሰዓት"</item> - <item quantity="other" msgid="547290677353727389">"በ <xliff:g id="COUNT">%d</xliff:g> ሰዓቶች"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ነገ"</item> - <item quantity="other" msgid="5109449375100953247">"በ<xliff:g id="COUNT">%d</xliff:g> ቀኖች"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 ሴኮንድ በፊት"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ሰከንዶች በፊት"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"ከ 1 ደቂቃ በፊት"</item> - <item quantity="other" msgid="851164968597150710">"ከ <xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች በፊት"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"ከ1 ሰዓት በፊት"</item> - <item quantity="other" msgid="6889970745748538901">"ከ <xliff:g id="COUNT">%d</xliff:g> ሰዓት በፊት"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ትላንትና"</item> - <item quantity="other" msgid="3453342639616481191">"ከ <xliff:g id="COUNT">%d</xliff:g>ቀን በፊት"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"በ1 ሴኮንድ"</item> - <item quantity="other" msgid="5495880108825805108">"በ<xliff:g id="COUNT">%d</xliff:g> ሰከንዶች ውስጥ"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"በ1 ደቂቃ ውስጥ"</item> - <item quantity="other" msgid="4216113292706568726">"በ<xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች ውስጥ"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"በ 1 ሰዓት"</item> - <item quantity="other" msgid="3705373766798013406">"በ <xliff:g id="COUNT">%d</xliff:g> ሰዓቶች"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ነገ"</item> - <item quantity="other" msgid="2973062968038355991">"በ<xliff:g id="COUNT">%d</xliff:g> ቀኖች"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"በ <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"በ <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"ውስጥ <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml index 860b8a0..2beadc6 100644 --- a/core/res/res/values-ar/strings.xml +++ b/core/res/res/values-ar/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"يريد <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> تمكين ميزة Explore by Touch. عند تشغيل ميزة Explore by Touch، سيكون بإمكانك سماع أو مشاهدة أوصاف لما تحت إصبعك أو إجراء إيماءات للتفاعل مع الهاتف."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"قبل شهر واحد"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"قبل شهر واحد"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"قبل ثانية واحدة"</item> - <item quantity="other" msgid="3903706804349556379">"قبل <xliff:g id="COUNT">%d</xliff:g> ثانية"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"قبل دقيقة واحدة"</item> - <item quantity="other" msgid="2176942008915455116">"قبل <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"قبل ساعة واحدة"</item> - <item quantity="other" msgid="2467273239587587569">"قبل <xliff:g id="COUNT">%d</xliff:g> ساعات"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"الشهر الماضي"</string> <string name="older" msgid="5211975022815554840">"أقدم"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"أمس"</item> - <item quantity="other" msgid="2479586466153314633">"قبل <xliff:g id="COUNT">%d</xliff:g> يوم"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"في ثانية واحدة"</item> - <item quantity="other" msgid="1241926116443974687">"في <xliff:g id="COUNT">%d</xliff:g> ثانية"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"في دقيقة واحدة"</item> - <item quantity="other" msgid="3330713936399448749">"في <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"في ساعة واحدة"</item> - <item quantity="other" msgid="547290677353727389">"في <xliff:g id="COUNT">%d</xliff:g> ساعة"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"غدًا"</item> - <item quantity="other" msgid="5109449375100953247">"في <xliff:g id="COUNT">%d</xliff:g> يوم"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"قبل ثانية واحدة"</item> - <item quantity="other" msgid="3699169366650930415">"قبل <xliff:g id="COUNT">%d</xliff:g> ثانية"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"قبل دقيقة واحدة"</item> - <item quantity="other" msgid="851164968597150710">"قبل <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"قبل ساعة واحدة"</item> - <item quantity="other" msgid="6889970745748538901">"قبل <xliff:g id="COUNT">%d</xliff:g> ساعة"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"أمس"</item> - <item quantity="other" msgid="3453342639616481191">"قبل <xliff:g id="COUNT">%d</xliff:g> يوم"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"في ثانية واحدة"</item> - <item quantity="other" msgid="5495880108825805108">"في <xliff:g id="COUNT">%d</xliff:g> ثانية"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"في دقيقة واحدة"</item> - <item quantity="other" msgid="4216113292706568726">"في <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"في ساعة واحدة"</item> - <item quantity="other" msgid="3705373766798013406">"في <xliff:g id="COUNT">%d</xliff:g> ساعة"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"غدًا"</item> - <item quantity="other" msgid="2973062968038355991">"في <xliff:g id="COUNT">%d</xliff:g> يوم"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"في <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"في الساعة <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"في <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az-rAZ/strings.xml index 479cfcf..b22eb7a 100644 --- a/core/res/res/values-az-rAZ/strings.xml +++ b/core/res/res/values-az-rAZ/strings.xml @@ -967,75 +967,11 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> Toxunaraq Kəşf Et rejimini aktivləşdirmək istəyir. Toxunaraq Kəşf Et açıldığı zaman, barmağınızın altında nə olduğu haqda olan təsvirləri eşidə və ya görə bilərsiniz və ya telefonda insanlarla əlaqəyə keçmək üçün jestlər həyata keçirə bilərsiniz"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ay öncə"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ay əvvəl"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 saniyə əvvəl"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> saniyə əvvəl"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 dəqiqə əvvəl"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> dəqiqə əvvəl"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 saat əvvəl"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> saat əvvəl"</item> - </plurals> <plurals name="last_num_days"> <item quantity="other" msgid="3069992808164318268">"Son <xliff:g id="COUNT">%d</xliff:g> gün"</item> </plurals> <string name="last_month" msgid="3959346739979055432">"Keçən ay"</string> <string name="older" msgid="5211975022815554840">"Köhnə"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"dünən"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> gün əvvəl"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 saniyə ərzində"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> saniyə içində"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 dəqiqə içində"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> dəqiqə ərzində"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 saata"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> saata"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"sabah"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> gün ərzində"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 saniyə əvvəl"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> san əvvəl"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 dəqiqə əvvəl"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> dəqiqə əvvəl"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 saat əvvəl"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> saat əvvəl"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"dünən"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> gün əvvəl"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 san ərzində"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> san ərzində"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 dəq ərzində"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> dəqiqəyə"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 saat ərzində"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> saata"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"sabah"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> günə"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> tarixində"</string> <string name="preposition_for_time" msgid="5506831244263083793">"saat <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> ilində"</string> diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index 9f572cf..1c43360 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> иска да активира изследването чрез докосване. Когато услугата е включена, можете да чувате или да виждате описания на това, което е под пръста ви, или да изпълнявате жестове, за да взаимодействате с телефона."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Преди 1 месец"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Преди повече от месец"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Преди 1 секунда"</item> - <item quantity="other" msgid="3903706804349556379">"Преди <xliff:g id="COUNT">%d</xliff:g> секунди"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Преди 1 минута"</item> - <item quantity="other" msgid="2176942008915455116">"Преди <xliff:g id="COUNT">%d</xliff:g> минути"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Преди 1 час"</item> - <item quantity="other" msgid="2467273239587587569">"Преди <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Последният месец"</string> <string name="older" msgid="5211975022815554840">"По-стари"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"вчера"</item> - <item quantity="other" msgid="2479586466153314633">"Преди <xliff:g id="COUNT">%d</xliff:g> дни"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"след 1 секунда"</item> - <item quantity="other" msgid="1241926116443974687">"след <xliff:g id="COUNT">%d</xliff:g> секунди"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"след 1 минута"</item> - <item quantity="other" msgid="3330713936399448749">"след <xliff:g id="COUNT">%d</xliff:g> минути"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"след 1 час"</item> - <item quantity="other" msgid="547290677353727389">"след <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"утре"</item> - <item quantity="other" msgid="5109449375100953247">"след <xliff:g id="COUNT">%d</xliff:g> дни"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Преди 1 сек"</item> - <item quantity="other" msgid="3699169366650930415">"Преди <xliff:g id="COUNT">%d</xliff:g> сек"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"Преди 1 мин"</item> - <item quantity="other" msgid="851164968597150710">"Преди <xliff:g id="COUNT">%d</xliff:g> мин"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Преди 1 час"</item> - <item quantity="other" msgid="6889970745748538901">"Преди <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"вчера"</item> - <item quantity="other" msgid="3453342639616481191">"Преди <xliff:g id="COUNT">%d</xliff:g> дни"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"след 1 сек"</item> - <item quantity="other" msgid="5495880108825805108">"след <xliff:g id="COUNT">%d</xliff:g> сек"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"след 1 мин"</item> - <item quantity="other" msgid="4216113292706568726">"след <xliff:g id="COUNT">%d</xliff:g> мин"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"след 1 час"</item> - <item quantity="other" msgid="3705373766798013406">"след <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"утре"</item> - <item quantity="other" msgid="2973062968038355991">"след <xliff:g id="COUNT">%d</xliff:g> дни"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"на <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"в <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"през <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml index 9f79384..1d389f3 100644 --- a/core/res/res/values-bn-rBD/strings.xml +++ b/core/res/res/values-bn-rBD/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> \'স্পর্শের মাধ্যমে অন্বেষণ করুন\' সক্ষম করতে চাইছে৷ যখন \'স্পর্শের মাধ্যমে অন্বেষণ করুন\' চালু করা হবে তখন আপনার আঙ্গুলের নিয়ন্ত্রণে থাকা জিনিসের বর্ণনাগুলি শুনতে অথবা দেখতে পাবেন অথবা ফোনের সাথে ইন্টারঅ্যাক্ট করার জন্য অঙ্গভঙ্গির সাহায্য নিতে পারবেন৷"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"১ মাস আগে"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"১ মাস আগে"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"১ সেকেন্ড আগে"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ড আগে"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"১ মিনিট আগে"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> মিনিট আগে"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"১ ঘন্টা আগে"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টা আগে"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"গত মাস"</string> <string name="older" msgid="5211975022815554840">"পুরোনো"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"গতকাল"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> দিন আগে"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"১ সেকেন্ডের মধ্যে"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ডের মধ্যে"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"১ মিনিটের মধ্যে"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> মিনিটের মধ্যে"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"১ ঘন্টার মধ্যে"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টার মধ্যে"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"আগামীকাল"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> দিনের মধ্যে"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"১ সেকেন্ড আগে"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ড আগে"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"১ মিনিট আগে"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> মিনিট আগে"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"১ ঘন্টা আগে"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টা আগে"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"গতকাল"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> দিন আগে"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"১ সেকেন্ডের মধ্যে"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ডের মধ্যে"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"১ মিনিটের মধ্যে"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> মিনিটের মধ্যে"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"১ ঘন্টার মধ্যে"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টার মধ্যে"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"আগামীকাল"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> দিনের মধ্যে"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> এ"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> এ"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> এ"</string> diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml index 3f68244..b60187a 100644 --- a/core/res/res/values-ca/strings.xml +++ b/core/res/res/values-ca/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vol activar l\'exploració tàctil. Quan l\'exploració per tàctil està activada, pots escoltar o veure les descripcions del contingut seleccionat o utilitzar gestos per interactuar amb el telèfon."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Fa 1 mes"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Fa més d\'1 mes"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Fa 1 segon"</item> - <item quantity="other" msgid="3903706804349556379">"Fa <xliff:g id="COUNT">%d</xliff:g> segons"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Fa 1 minut"</item> - <item quantity="other" msgid="2176942008915455116">"Fa <xliff:g id="COUNT">%d</xliff:g> minuts"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Fa 1 hora"</item> - <item quantity="other" msgid="2467273239587587569">"Fa <xliff:g id="COUNT">%d</xliff:g> hores"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"El mes passat"</string> <string name="older" msgid="5211975022815554840">"Més antigues"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"Ahir"</item> - <item quantity="other" msgid="2479586466153314633">"Fa <xliff:g id="COUNT">%d</xliff:g> dies"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"d\'aquí a 1 segon"</item> - <item quantity="other" msgid="1241926116443974687">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> segons"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"d\'aquí a 1 minut"</item> - <item quantity="other" msgid="3330713936399448749">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> minuts"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"d\'aquí a 1 hora"</item> - <item quantity="other" msgid="547290677353727389">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> hores"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"demà"</item> - <item quantity="other" msgid="5109449375100953247">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> dies"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Fa 1 s"</item> - <item quantity="other" msgid="3699169366650930415">"Fa <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"fa 1 min"</item> - <item quantity="other" msgid="851164968597150710">"Fa <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Fa 1 hora"</item> - <item quantity="other" msgid="6889970745748538901">"Fa <xliff:g id="COUNT">%d</xliff:g> hores"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ahir"</item> - <item quantity="other" msgid="3453342639616481191">"Fa <xliff:g id="COUNT">%d</xliff:g> dies"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"d\'aquí a 1 s"</item> - <item quantity="other" msgid="5495880108825805108">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"d\'aquí a 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> minuts"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"d\'aquí a 1 hora"</item> - <item quantity="other" msgid="3705373766798013406">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> hores"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"demà"</item> - <item quantity="other" msgid="2973062968038355991">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> dies"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"el <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"a les <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"el <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 5cd6802..7e02459 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolení funkce Prozkoumání dotykem. Pokud je funkce Prozkoumání dotykem zapnuta, můžete slyšet nebo vidět popisy objektů pod vaším prstem nebo ovládat telefon gesty."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"před 1 měsícem"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Déle než před 1 měsícem"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"před 1 sekundou"</item> - <item quantity="other" msgid="3903706804349556379">"před <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"před 1 min"</item> - <item quantity="other" msgid="2176942008915455116">"před <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"před 1 h"</item> - <item quantity="other" msgid="2467273239587587569">"před <xliff:g id="COUNT">%d</xliff:g> h"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Poslední měsíc"</string> <string name="older" msgid="5211975022815554840">"Starší"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"včera"</item> - <item quantity="other" msgid="2479586466153314633">"před <xliff:g id="COUNT">%d</xliff:g> dny"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"za 1 sekundu"</item> - <item quantity="other" msgid="1241926116443974687">"za <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"za 1 minutu"</item> - <item quantity="other" msgid="3330713936399448749">"za <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"za 1 hodinu"</item> - <item quantity="other" msgid="547290677353727389">"za <xliff:g id="COUNT">%d</xliff:g> hod."</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"zítra"</item> - <item quantity="other" msgid="5109449375100953247">"za <xliff:g id="COUNT">%d</xliff:g> dny"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"před 1 s"</item> - <item quantity="other" msgid="3699169366650930415">"před <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"před 1 min"</item> - <item quantity="other" msgid="851164968597150710">"před <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"před 1 h"</item> - <item quantity="other" msgid="6889970745748538901">"před <xliff:g id="COUNT">%d</xliff:g> h"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"včera"</item> - <item quantity="other" msgid="3453342639616481191">"před <xliff:g id="COUNT">%d</xliff:g> dny"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"za 1 s"</item> - <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"za 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"za <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"za 1 hodinu"</item> - <item quantity="other" msgid="3705373766798013406">"za <xliff:g id="COUNT">%d</xliff:g> hod."</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"zítra"</item> - <item quantity="other" msgid="2973062968038355991">"za <xliff:g id="COUNT">%d</xliff:g> dny"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"dne <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"v <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"roku <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 157d282..1b71828 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ønsker at aktivere Udforsk ved berøring. Når Udforsk ved berøring er aktiveret, kan du høre eller se beskrivelser af, hvad der er under din finger, eller udføre bevægelser for at interagere med telefonen."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"for 1 måned siden"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Før for 1 måned siden"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"for 1 sekund siden"</item> - <item quantity="other" msgid="3903706804349556379">"for <xliff:g id="COUNT">%d</xliff:g> sekunder siden"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"for 1 minut siden"</item> - <item quantity="other" msgid="2176942008915455116">"for <xliff:g id="COUNT">%d</xliff:g> minutter siden"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"for 1 time siden"</item> - <item quantity="other" msgid="2467273239587587569">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Seneste måned"</string> <string name="older" msgid="5211975022815554840">"Ældre"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"i går"</item> - <item quantity="other" msgid="2479586466153314633">"for <xliff:g id="COUNT">%d</xliff:g> dage siden"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"om 1 sekund"</item> - <item quantity="other" msgid="1241926116443974687">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"om 1 minut"</item> - <item quantity="other" msgid="3330713936399448749">"om <xliff:g id="COUNT">%d</xliff:g> minutter"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"om 1 time"</item> - <item quantity="other" msgid="547290677353727389">"om <xliff:g id="COUNT">%d</xliff:g> timer"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"i morgen"</item> - <item quantity="other" msgid="5109449375100953247">"om <xliff:g id="COUNT">%d</xliff:g> dage"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"for 1 sek. siden"</item> - <item quantity="other" msgid="3699169366650930415">"for <xliff:g id="COUNT">%d</xliff:g> sek. siden"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"for 1 min. siden"</item> - <item quantity="other" msgid="851164968597150710">"for <xliff:g id="COUNT">%d</xliff:g> min. siden"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"for 1 time siden"</item> - <item quantity="other" msgid="6889970745748538901">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"i går"</item> - <item quantity="other" msgid="3453342639616481191">"for <xliff:g id="COUNT">%d</xliff:g> dage siden"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"om 1 sek."</item> - <item quantity="other" msgid="5495880108825805108">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"om 1 min."</item> - <item quantity="other" msgid="4216113292706568726">"om <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"om 1 time"</item> - <item quantity="other" msgid="3705373766798013406">"om <xliff:g id="COUNT">%d</xliff:g> timer"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"i morgen"</item> - <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> dage"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index 5605ccc..3670b67 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> fordert die Aktivierung von \"Tippen & Entdecken\". Wenn \"Tippen & Entdecken\" aktiviert ist, können Sie Beschreibungen dessen hören oder sehen, was sich unter ihren Fingern befindet, oder Gesten ausführen, um mit dem Telefon zu kommunizieren."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Vor 1 Monat"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Vor mehr als 1 Monat"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"vor 1 Sekunde"</item> - <item quantity="other" msgid="3903706804349556379">"vor <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"vor 1 Minute"</item> - <item quantity="other" msgid="2176942008915455116">"vor <xliff:g id="COUNT">%d</xliff:g> Minuten"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"vor 1 Stunde"</item> - <item quantity="other" msgid="2467273239587587569">"vor <xliff:g id="COUNT">%d</xliff:g> Stunden"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Letzter Monat"</string> <string name="older" msgid="5211975022815554840">"Älter"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"gestern"</item> - <item quantity="other" msgid="2479586466153314633">"vor <xliff:g id="COUNT">%d</xliff:g> Tagen"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"in 1 Sekunde"</item> - <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"in 1 Minute"</item> - <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> Minuten"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"in 1 Stunde"</item> - <item quantity="other" msgid="547290677353727389">"In <xliff:g id="COUNT">%d</xliff:g> Stunden"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"morgen"</item> - <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> Tagen"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"vor 1 Sekunde"</item> - <item quantity="other" msgid="3699169366650930415">"vor <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"vor 1 Minute"</item> - <item quantity="other" msgid="851164968597150710">"vor <xliff:g id="COUNT">%d</xliff:g> Minuten"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"vor 1 Stunde"</item> - <item quantity="other" msgid="6889970745748538901">"vor <xliff:g id="COUNT">%d</xliff:g> Stunden"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"gestern"</item> - <item quantity="other" msgid="3453342639616481191">"vor <xliff:g id="COUNT">%d</xliff:g> Tagen"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"in 1 Sekunde"</item> - <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"in 1 Minute"</item> - <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> Minuten"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"in 1 Stunde"</item> - <item quantity="other" msgid="3705373766798013406">"In <xliff:g id="COUNT">%d</xliff:g> Stunden"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"morgen"</item> - <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> Tagen"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"am <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"um <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"im Jahr <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index 9229bc6..da33214 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Η υπηρεσία <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> απαιτεί ενεργοποίηση της Εξερεύνησης μέσω αφής. Όταν είναι ενεργοποιημένη η Εξερεύνηση μέσω αφής, μπορείτε να δείτε ή να ακούσετε περιγραφές για τις επιλογές που βρίσκονται κάτω από το δάχτυλό σας ή να κάνετε κινήσεις αλληλεπίδρασης με το τηλέφωνό σας."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"πριν από 1 μήνα"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Παλαιότερα από 1 μήνα"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"πριν από 1 δευτερόλεπτο"</item> - <item quantity="other" msgid="3903706804349556379">"πριν από <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"πριν από 1 λεπτό"</item> - <item quantity="other" msgid="2176942008915455116">"πριν από <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"πριν από 1 ώρα"</item> - <item quantity="other" msgid="2467273239587587569">"πριν από <xliff:g id="COUNT">%d</xliff:g> ώρες"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Τελευταίος μήνας"</string> <string name="older" msgid="5211975022815554840">"Παλαιότερα"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"χθες"</item> - <item quantity="other" msgid="2479586466153314633">"πριν από <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"σε 1 δευτερόλεπτο"</item> - <item quantity="other" msgid="1241926116443974687">"σε <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"σε 1 λεπτό"</item> - <item quantity="other" msgid="3330713936399448749">"σε <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"σε 1 ώρα"</item> - <item quantity="other" msgid="547290677353727389">"σε <xliff:g id="COUNT">%d</xliff:g> ώρες"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"αύριο"</item> - <item quantity="other" msgid="5109449375100953247">"σε <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"πριν από 1 δευτερόλεπτο"</item> - <item quantity="other" msgid="3699169366650930415">"πριν από <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"πριν από 1 λεπτό"</item> - <item quantity="other" msgid="851164968597150710">"πριν από <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"πριν από 1 ώρα"</item> - <item quantity="other" msgid="6889970745748538901">"πριν από <xliff:g id="COUNT">%d</xliff:g> ώρες"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"χθες"</item> - <item quantity="other" msgid="3453342639616481191">"πριν από <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"σε 1 δευτερόλεπτο"</item> - <item quantity="other" msgid="5495880108825805108">"σε <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"σε 1 λεπτό"</item> - <item quantity="other" msgid="4216113292706568726">"σε <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"σε 1 ώρα"</item> - <item quantity="other" msgid="3705373766798013406">"σε <xliff:g id="COUNT">%d</xliff:g> ώρες"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"αύριο"</item> - <item quantity="other" msgid="2973062968038355991">"σε <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"στις <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"στις <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"το <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml index f7f62e9..d4d038c 100644 --- a/core/res/res/values-en-rGB/strings.xml +++ b/core/res/res/values-en-rGB/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 month ago"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Before 1 month ago"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 second ago"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconds ago"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minute ago"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutes ago"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 hour ago"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Last month"</string> <string name="older" msgid="5211975022815554840">"Older"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"yesterday"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"in 1 second"</item> - <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> seconds"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"in 1 minute"</item> - <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"in 1 hour"</item> - <item quantity="other" msgid="547290677353727389">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"tomorrow"</item> - <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> days"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 sec ago"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> secs ago"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 min ago"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> mins ago"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 hour ago"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"yesterday"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"in 1 sec"</item> - <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> secs"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"in 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> mins"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"in 1 hour"</item> - <item quantity="other" msgid="3705373766798013406">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"tomorrow"</item> - <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> days"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"on <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"at <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"in<xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml index f7f62e9..d4d038c 100644 --- a/core/res/res/values-en-rIN/strings.xml +++ b/core/res/res/values-en-rIN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 month ago"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Before 1 month ago"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 second ago"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconds ago"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minute ago"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutes ago"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 hour ago"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Last month"</string> <string name="older" msgid="5211975022815554840">"Older"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"yesterday"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"in 1 second"</item> - <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> seconds"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"in 1 minute"</item> - <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"in 1 hour"</item> - <item quantity="other" msgid="547290677353727389">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"tomorrow"</item> - <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> days"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 sec ago"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> secs ago"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 min ago"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> mins ago"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 hour ago"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"yesterday"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"in 1 sec"</item> - <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> secs"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"in 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> mins"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"in 1 hour"</item> - <item quantity="other" msgid="3705373766798013406">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"tomorrow"</item> - <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> days"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"on <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"at <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"in<xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-en-rSG/strings.xml b/core/res/res/values-en-rSG/strings.xml index 09a8490..5ba1082 100644 --- a/core/res/res/values-en-rSG/strings.xml +++ b/core/res/res/values-en-rSG/strings.xml @@ -776,22 +776,6 @@ <skip /> <!-- no translation found for beforeOneMonthDurationPast (7578100953282866827) --> <skip /> - <!-- no translation found for num_seconds_ago:one (7416512229671810725) --> - <!-- no translation found for num_seconds_ago:other (8138756910300398447) --> - <!-- no translation found for num_minutes_ago:one (8620869479299420562) --> - <!-- no translation found for num_minutes_ago:other (5065488162050522741) --> - <!-- no translation found for num_hours_ago:one (853404611989669641) --> - <!-- no translation found for num_hours_ago:other (3558873784561756849) --> - <!-- no translation found for num_days_ago:one (4222479980812128212) --> - <!-- no translation found for num_days_ago:other (5445701370433601703) --> - <!-- no translation found for in_num_seconds:one (4253290037777327003) --> - <!-- no translation found for in_num_seconds:other (1280033870920841404) --> - <!-- no translation found for in_num_minutes:one (1487585791027953091) --> - <!-- no translation found for in_num_minutes:other (6274204576475209932) --> - <!-- no translation found for in_num_hours:one (6501470863235186391) --> - <!-- no translation found for in_num_hours:other (4415358752953289251) --> - <!-- no translation found for in_num_days:one (5608475533104443893) --> - <!-- no translation found for in_num_days:other (3827193006163842267) --> <!-- no translation found for preposition_for_date (2689847983632851560) --> <skip /> <!-- no translation found for preposition_for_time (2613388053493148013) --> diff --git a/core/res/res/values-en-rUS/strings.xml b/core/res/res/values-en-rUS/strings.xml index fdc0d69..adae7f4 100644 --- a/core/res/res/values-en-rUS/strings.xml +++ b/core/res/res/values-en-rUS/strings.xml @@ -777,22 +777,6 @@ <skip /> <!-- no translation found for beforeOneMonthDurationPast (7578100953282866827) --> <skip /> - <!-- no translation found for num_seconds_ago:one (7416512229671810725) --> - <!-- no translation found for num_seconds_ago:other (8138756910300398447) --> - <!-- no translation found for num_minutes_ago:one (8620869479299420562) --> - <!-- no translation found for num_minutes_ago:other (5065488162050522741) --> - <!-- no translation found for num_hours_ago:one (853404611989669641) --> - <!-- no translation found for num_hours_ago:other (3558873784561756849) --> - <!-- no translation found for num_days_ago:one (4222479980812128212) --> - <!-- no translation found for num_days_ago:other (5445701370433601703) --> - <!-- no translation found for in_num_seconds:one (4253290037777327003) --> - <!-- no translation found for in_num_seconds:other (1280033870920841404) --> - <!-- no translation found for in_num_minutes:one (1487585791027953091) --> - <!-- no translation found for in_num_minutes:other (6274204576475209932) --> - <!-- no translation found for in_num_hours:one (6501470863235186391) --> - <!-- no translation found for in_num_hours:other (4415358752953289251) --> - <!-- no translation found for in_num_days:one (5608475533104443893) --> - <!-- no translation found for in_num_days:other (3827193006163842267) --> <!-- no translation found for preposition_for_date (2689847983632851560) --> <skip /> <!-- no translation found for preposition_for_time (2613388053493148013) --> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index 19c731f..65e50dc 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> desea activar la exploración táctil. Cuando esta función esté activada, podrás escuchar o ver descripciones del contenido seleccionado o usar gestos para interactuar con el dispositivo."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Hace 1 mes."</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Anterior a 1 mes atrás"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"hace 1 segundo"</item> - <item quantity="other" msgid="3903706804349556379">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Hace 1 minuto."</item> - <item quantity="other" msgid="2176942008915455116">"hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Hace 1 hora"</item> - <item quantity="other" msgid="2467273239587587569">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Último mes"</string> <string name="older" msgid="5211975022815554840">"Antiguos"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ayer"</item> - <item quantity="other" msgid="2479586466153314633">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"en 1 segundo"</item> - <item quantity="other" msgid="1241926116443974687">"en <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"en 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"en <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"en 1 hora"</item> - <item quantity="other" msgid="547290677353727389">"en <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"mañana"</item> - <item quantity="other" msgid="5109449375100953247">"en <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"hace 1 segundo"</item> - <item quantity="other" msgid="3699169366650930415">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"hace 1 min"</item> - <item quantity="other" msgid="851164968597150710">"Hace <xliff:g id="COUNT">%d</xliff:g> minutos."</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Hace 1 hora"</item> - <item quantity="other" msgid="6889970745748538901">"hace <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ayer"</item> - <item quantity="other" msgid="3453342639616481191">"Hace <xliff:g id="COUNT">%d</xliff:g> días."</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"en 1 segundo"</item> - <item quantity="other" msgid="5495880108825805108">"en <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"en 1 minuto"</item> - <item quantity="other" msgid="4216113292706568726">"en <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"en 1 hora"</item> - <item quantity="other" msgid="3705373766798013406">"en <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"mañana"</item> - <item quantity="other" msgid="2973062968038355991">"en <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"activado <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"a las <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index f06832d..82cd9c8 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> quiere habilitar la exploración táctil. Cuando esta función esté activada, podrás escuchar o ver descripciones del contenido seleccionado o usar gestos para interactuar con el teléfono."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Hace un mes"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Hace más de un mes"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Hace 1 segundo"</item> - <item quantity="other" msgid="3903706804349556379">"Hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Hace 1 minuto"</item> - <item quantity="other" msgid="2176942008915455116">"Hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Hace 1 hora"</item> - <item quantity="other" msgid="2467273239587587569">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"El mes pasado"</string> <string name="older" msgid="5211975022815554840">"Anterior"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"Ayer"</item> - <item quantity="other" msgid="2479586466153314633">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"dentro de 1 segundo"</item> - <item quantity="other" msgid="1241926116443974687">"dentro de <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"dentro de 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"dentro de <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"dentro de 1 hora"</item> - <item quantity="other" msgid="547290677353727389">"dentro de <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"mañana"</item> - <item quantity="other" msgid="5109449375100953247">"dentro de <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"hace 1 segundo"</item> - <item quantity="other" msgid="3699169366650930415">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"hace 1 minuto"</item> - <item quantity="other" msgid="851164968597150710">"hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"hace 1 hora"</item> - <item quantity="other" msgid="6889970745748538901">"hace <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"Ayer"</item> - <item quantity="other" msgid="3453342639616481191">"hace <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"dentro de 1 segundo"</item> - <item quantity="other" msgid="5495880108825805108">"dentro de <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"dentro de 1 minuto"</item> - <item quantity="other" msgid="4216113292706568726">"dentro de <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"dentro de 1 hora"</item> - <item quantity="other" msgid="3705373766798013406">"dentro de <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"mañana"</item> - <item quantity="other" msgid="2973062968038355991">"dentro de <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"el <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"a las <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml index 5a8e0a0..bef7626 100644 --- a/core/res/res/values-et-rEE/strings.xml +++ b/core/res/res/values-et-rEE/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> soovib lubada puudutusega uurimise. Kui puudutusega uurimine on sisse lülitatud, kuulete või näete kirjeldusi asjade kohta, mis on teie sõrme all, või saate suhelda telefoniga liigutuste abil."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 kuu tagasi"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Varem kui 1 kuu tagasi"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 sekund tagasi"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sekundit tagasi"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minut tagasi"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutit tagasi"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 tund tagasi"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> tundi tagasi"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Eelmisel kuul"</string> <string name="older" msgid="5211975022815554840">"Vanem"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"eile"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> päeva tagasi"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 sekundi pärast"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> sekundi pärast"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 minuti pärast"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> minuti pärast"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 tunni pärast"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> tunni pärast"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"homme"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> päeva pärast"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 s tagasi"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sekundit tagasi"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 minut tagasi"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minutit tagasi"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 tund tagasi"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> tundi tagasi"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"eile"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> päeva tagasi"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 sekundi pärast"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> sekundi pärast"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 minuti pärast"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> minuti pärast"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 tunni pärast"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> tunni pärast"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"homme"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> päeva pärast"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"kuupäeval <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kell <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"aastal <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml index e2369ea..a37111b 100644 --- a/core/res/res/values-eu-rES/strings.xml +++ b/core/res/res/values-eu-rES/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> zerbitzuak \"Arakatu ukituta\" eginbidea gaitu nahi du. Eginbide hori aktibatuta dagoenean, hatzaren azpian duzunaren azalpena ikus edo entzun dezakezu, edo telefonoarekin elkarrekintzan aritzeko keinuak egin ditzakezu."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Duela hilabete"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Duela hilabete baino gutxiago"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"duela segundo bat"</item> - <item quantity="other" msgid="3903706804349556379">"duela <xliff:g id="COUNT">%d</xliff:g> segundo"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"duela minutu bat"</item> - <item quantity="other" msgid="2176942008915455116">"duela <xliff:g id="COUNT">%d</xliff:g> minutu"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Duela ordubete"</item> - <item quantity="other" msgid="2467273239587587569">"duela <xliff:g id="COUNT">%d</xliff:g> ordu"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Azken hilabetea"</string> <string name="older" msgid="5211975022815554840">"Zaharragoa"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"atzo"</item> - <item quantity="other" msgid="2479586466153314633">"Duela <xliff:g id="COUNT">%d</xliff:g> egun"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"segundo bat barru"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> segundo barru"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"Minutu bat barru"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> minutu barru"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"Ordubete barru"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ordu barru"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"bihar"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> egun barru"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"duela segundo bat"</item> - <item quantity="other" msgid="3699169366650930415">"duela <xliff:g id="COUNT">%d</xliff:g> segundo"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"duela minutu bat"</item> - <item quantity="other" msgid="851164968597150710">"duela <xliff:g id="COUNT">%d</xliff:g> minutu"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"duela ordubete"</item> - <item quantity="other" msgid="6889970745748538901">"duela <xliff:g id="COUNT">%d</xliff:g> ordu"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"atzo"</item> - <item quantity="other" msgid="3453342639616481191">"Duela <xliff:g id="COUNT">%d</xliff:g> egun"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"segundo bat barru"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> segundo barru"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"minutu bat barru"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> minutu barru"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"ordubete barru"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ordu barru"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"bihar"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> egun barru"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"data: <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"ordua: <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"urtea: <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index 547f432..42ae410 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> میخواهد «کاوش با لمس» را فعال کند. وقتی «کاوش با لمس» فعال است، میتوانید توضیحاتی را برای آنچه که زیر انگشت شما است مشاهده کرده یا بشنوید یا برای استفاده از تلفن خود از حرکات استفاده کنید."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"۱ ماه قبل"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"قبل از ۱ ماه گذشته"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"۱ ثانیه قبل"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ثانیه قبل"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"۱ دقیقه قبل"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> دقیقه قبل"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"۱ ساعت قبل"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ساعت قبل"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"ماه گذشته"</string> <string name="older" msgid="5211975022815554840">"قدیمی تر"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ديروز"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> روز قبل"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"در ۱ ثانیه"</item> - <item quantity="other" msgid="1241926116443974687">"در <xliff:g id="COUNT">%d</xliff:g> ثانیه"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"در ۱ دقیقه"</item> - <item quantity="other" msgid="3330713936399448749">"در <xliff:g id="COUNT">%d</xliff:g> دقیقه"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"در ۱ ساعت"</item> - <item quantity="other" msgid="547290677353727389">"در <xliff:g id="COUNT">%d</xliff:g> ساعت"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"فردا"</item> - <item quantity="other" msgid="5109449375100953247">"در <xliff:g id="COUNT">%d</xliff:g> روز"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"۱ ثانیه قبل"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ثانیه قبل"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"۱ دقیقه قبل"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> دقیقه قبل"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"۱ ساعت قبل"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ساعت قبل"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ديروز"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> روز قبل"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"در ۱ ثانیه"</item> - <item quantity="other" msgid="5495880108825805108">"در <xliff:g id="COUNT">%d</xliff:g> ثانیه"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"در ۱ دقیقه"</item> - <item quantity="other" msgid="4216113292706568726">"در <xliff:g id="COUNT">%d</xliff:g> دقیقه"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"در ۱ ساعت"</item> - <item quantity="other" msgid="3705373766798013406">"در <xliff:g id="COUNT">%d</xliff:g> ساعت"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"فردا"</item> - <item quantity="other" msgid="2973062968038355991">"در <xliff:g id="COUNT">%d</xliff:g> روز"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"در <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"در <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"در <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml index e262015..0798424 100644 --- a/core/res/res/values-fi/strings.xml +++ b/core/res/res/values-fi/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> haluaa ottaa Tutustu koskettamalla -ominaisuuden käyttöön. Kun Tutustu koskettamalla on käytössä, näet tai kuulet kuvauksen sormen alla olevista kohteista ja voit käyttää puhelinta sormieleiden avulla."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"kuukausi sitten"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Yli kuukausi sitten"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 sekunti sitten"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sekuntia sitten"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minuutti sitten"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minuuttia sitten"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 tunti sitten"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> tuntia sitten"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Viime kuussa"</string> <string name="older" msgid="5211975022815554840">"Vanhemmat"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"eilen"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> päivää sitten"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 sekunnin kuluttua"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> sekunnin kuluttua"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 minuutin kuluttua"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> minuutin kuluttua"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 tunnin kuluttua"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> tunnin kuluttua"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"huomenna"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> päivän kuluttua"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 s sitten"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> s sitten"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 min sitten"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min sitten"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 tunti sitten"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> tuntia sitten"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"eilen"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> päivää sitten"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 s kuluttua"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> sekunnin kuluttua"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 min kuluttua"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> min kuluttua"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 tunnin kuluttua"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> tunnin kuluttua"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"huomenna"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> päivän kuluttua"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"päivä: <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"klo <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"vuonna <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml index 9a9ab32..52f3e48 100644 --- a/core/res/res/values-fr-rCA/strings.xml +++ b/core/res/res/values-fr-rCA/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> souhaite activer la fonctionnalité \"Explorer au toucher\". Lorsque celle-ci est activée, vous pouvez entendre ou voir les descriptions des éléments que vous sélectionnez, ou bien interagir avec le téléphone en effectuant certains gestes."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Il y a 1 mois"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Il y a plus d\'un mois"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"il y a 1 seconde"</item> - <item quantity="other" msgid="3903706804349556379">"Il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Il y a 1 minute"</item> - <item quantity="other" msgid="2176942008915455116">"Il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Il y a 1 heure"</item> - <item quantity="other" msgid="2467273239587587569">"il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Le mois dernier"</string> <string name="older" msgid="5211975022815554840">"Précédent"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"hier"</item> - <item quantity="other" msgid="2479586466153314633">"il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"dans 1 seconde"</item> - <item quantity="other" msgid="1241926116443974687">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"dans 1 minute"</item> - <item quantity="other" msgid="3330713936399448749">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"dans 1 heure"</item> - <item quantity="other" msgid="547290677353727389">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"demain"</item> - <item quantity="other" msgid="5109449375100953247">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"il y a 1 seconde"</item> - <item quantity="other" msgid="3699169366650930415">"il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"il y a 1 min"</item> - <item quantity="other" msgid="851164968597150710">"il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Il y a 1 h"</item> - <item quantity="other" msgid="6889970745748538901">"il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"hier"</item> - <item quantity="other" msgid="3453342639616481191">"il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"dans 1 seconde"</item> - <item quantity="other" msgid="5495880108825805108">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"dans 1 minute"</item> - <item quantity="other" msgid="4216113292706568726">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"dans 1 heure"</item> - <item quantity="other" msgid="3705373766798013406">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"demain"</item> - <item quantity="other" msgid="2973062968038355991">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"le <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"à <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index 4ba1aae..667c7cb 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> souhaite activer la fonctionnalité \"Explorer au toucher\". Lorsque celle-ci est activée, vous pouvez entendre ou voir les descriptions des éléments que vous sélectionnez, ou bien interagir avec le téléphone en effectuant certains gestes."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Il y a 1 mois"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Il y a plus d\'un mois"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Il y a 1 seconde"</item> - <item quantity="other" msgid="3903706804349556379">"Il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Il y a 1 minute"</item> - <item quantity="other" msgid="2176942008915455116">"Il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"il y a 1 heure"</item> - <item quantity="other" msgid="2467273239587587569">"Il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Le mois dernier"</string> <string name="older" msgid="5211975022815554840">"Préc."</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"hier"</item> - <item quantity="other" msgid="2479586466153314633">"Il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"dans 1 seconde"</item> - <item quantity="other" msgid="1241926116443974687">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"dans 1 minute"</item> - <item quantity="other" msgid="3330713936399448749">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"dans 1 heure"</item> - <item quantity="other" msgid="547290677353727389">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"demain"</item> - <item quantity="other" msgid="5109449375100953247">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"il y a 1 seconde"</item> - <item quantity="other" msgid="3699169366650930415">"il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"il y a 1 minute"</item> - <item quantity="other" msgid="851164968597150710">"il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"il y a 1 heure"</item> - <item quantity="other" msgid="6889970745748538901">"Il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"hier"</item> - <item quantity="other" msgid="3453342639616481191">"Il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"dans 1 seconde"</item> - <item quantity="other" msgid="5495880108825805108">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"dans 1 minute"</item> - <item quantity="other" msgid="4216113292706568726">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"dans 1 heure"</item> - <item quantity="other" msgid="3705373766798013406">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"demain"</item> - <item quantity="other" msgid="2973062968038355991">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"le <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"à <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml index 26629c1..220fec7 100644 --- a/core/res/res/values-gl-rES/strings.xml +++ b/core/res/res/values-gl-rES/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> quere activar a exploración táctil. Cando a exploración táctil estea activada, poderás escoitar ou ver descricións do contido seleccionado ou realizar xestos para interactuar co teléfono."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Hai 1 mes"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Hai máis de 1 mes"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"hai 1 segundo"</item> - <item quantity="other" msgid="3903706804349556379">"hai <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"hai 1 minuto"</item> - <item quantity="other" msgid="2176942008915455116">"hai <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Hai 1 hora"</item> - <item quantity="other" msgid="2467273239587587569">"hai <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"O mes pasado"</string> <string name="older" msgid="5211975022815554840">"Antes"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"onte"</item> - <item quantity="other" msgid="2479586466153314633">"Hai <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"en 1 segundo"</item> - <item quantity="other" msgid="1241926116443974687">"en <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"En 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"en <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"En 1 hora"</item> - <item quantity="other" msgid="547290677353727389">"En <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"mañá"</item> - <item quantity="other" msgid="5109449375100953247">"en <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"hai 1 s"</item> - <item quantity="other" msgid="3699169366650930415">"hai <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"hai 1 min"</item> - <item quantity="other" msgid="851164968597150710">"hai <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"hai 1 hora"</item> - <item quantity="other" msgid="6889970745748538901">"hai <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"onte"</item> - <item quantity="other" msgid="3453342639616481191">"Hai <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"en 1 s"</item> - <item quantity="other" msgid="5495880108825805108">"en <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"en 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"en <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"en 1 hora"</item> - <item quantity="other" msgid="3705373766798013406">"en <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"mañá"</item> - <item quantity="other" msgid="2973062968038355991">"en <xliff:g id="COUNT">%d</xliff:g> días"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"o <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"ás <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"no <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-h320dp/bools.xml b/core/res/res/values-h320dp/bools.xml new file mode 100644 index 0000000..8dbc2e1 --- /dev/null +++ b/core/res/res/values-h320dp/bools.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2015, 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. +*/ +--> +<resources> + <bool name="allow_stacked_button_bar">true</bool> +</resources> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index 2ebee8f..14c1710 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> स्पर्श के द्वारा अन्वेषण करें सक्षम करना चाहती है. स्पर्श के द्वारा अन्वेष करें चालू होने पर, आप अपनी अंगुली के नीचे क्या है उसका विवरण सुन सकते हैं या देख सकते हैं या फ़ोन से डॉयलॉग करने के लिए जेस्चर निष्पादित कर सकते हैं."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 माह पहले"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 माह से पहले"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 सेकंड पहले"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> सेकंड पहले"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 मिनट पहले"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> मिनट पहले"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 घंटे पहले"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> घंटे पहले"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"पिछला माह"</string> <string name="older" msgid="5211975022815554840">"इससे पुराना"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"बीता कल"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> दिन पहले"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 सेकंड में"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> सेकंड में"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 मिनट में"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> मिनट में"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 घंटे में"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> घंटे में"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"आने वाला कल"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> दिन में"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 सेकंड पहले"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> सेकंड पहले"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 मिनट पहले"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> मिनट पहले"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 घंटे पहले"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> घंटे पहले"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"बीता कल"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> दिन पहले"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 सेकंड में"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> सेकंड में"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 मिनट में"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> मिनट में"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 घंटे में"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> घंटे में"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"आने वाला कल"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> दिन में"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> को"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> पर"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> में"</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index af4a687..919466d 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Usluga <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogućiti značajku Istraživanje dodirom. Kad je značajka Istraživanje dodirom uključena, možete čuti ili vidjeti opise onoga što je pod vašim prstom ili izvršiti pokrete za interakciju s telefonom."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Prije 1 mjesec"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Prije 1 mjesec"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Prije 1 sekundu"</item> - <item quantity="other" msgid="3903706804349556379">"prije <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"prije 1 minutu"</item> - <item quantity="other" msgid="2176942008915455116">"Prije <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Prije 1 sata"</item> - <item quantity="other" msgid="2467273239587587569">"Prije <xliff:g id="COUNT">%d</xliff:g> h"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Prošli mjesec"</string> <string name="older" msgid="5211975022815554840">"Starije"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"jučer"</item> - <item quantity="other" msgid="2479586466153314633">"Prije <xliff:g id="COUNT">%d</xliff:g> dana"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"za 1 sekundu"</item> - <item quantity="other" msgid="1241926116443974687">"za <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"za 1 minutu"</item> - <item quantity="other" msgid="3330713936399448749">"za sljedeći broj minuta: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"za 1 sat"</item> - <item quantity="other" msgid="547290677353727389">"za <xliff:g id="COUNT">%d</xliff:g> h"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"sutra"</item> - <item quantity="other" msgid="5109449375100953247">"za sljedeći broj dana: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Prije 1 s"</item> - <item quantity="other" msgid="3699169366650930415">"Prije <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"Prije 1 min"</item> - <item quantity="other" msgid="851164968597150710">"Prije <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Prije 1 sat"</item> - <item quantity="other" msgid="6889970745748538901">"Prije <xliff:g id="COUNT">%d</xliff:g> h"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"jučer"</item> - <item quantity="other" msgid="3453342639616481191">"Prije <xliff:g id="COUNT">%d</xliff:g> dana"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"za 1 s"</item> - <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"za 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"za <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"za 1 sat"</item> - <item quantity="other" msgid="3705373766798013406">"za sljedeći broj sati: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"sutra"</item> - <item quantity="other" msgid="2973062968038355991">"za sljedeći broj dana: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"dana <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"u <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>."</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index 2a993cd..3bcdb52 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> aktiválni szeretné a Felfedezés érintéssel funkciót. Amikor be van kapcsolva a Felfedezés érintéssel, akkor hallhatja vagy láthatja annak leírását, ami az ujja alatt van, illetve végrehajthat kézmozdulatokat a telefon kezeléséhez."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 hónapja"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Több mint 1 hónapja"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 másodperce"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> másodperce"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 perce"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> perce"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 órája"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> órája"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Múlt hónapban"</string> <string name="older" msgid="5211975022815554840">"Régebbi"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"tegnap"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> napja"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 másodperc múlva"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> másodperc múlva"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 perc múlva"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> perc múlva"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 óra múlva"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> óra múlva"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"holnap"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> nap múlva"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 másodperce"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> másodperce"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 perce"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> perce"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 órája"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> órája"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"tegnap"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> napja"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 másodperc múlva"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> másodperc múlva"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 perc múlva"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> perc múlva"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 óra múlva"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> óra múlva"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"holnap"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> nap múlva"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"e napon: <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"év: <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml index c48571e..69621ad 100644 --- a/core/res/res/values-hy-rAM/strings.xml +++ b/core/res/res/values-hy-rAM/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>-ը ցանկանում է միացնել «Հետազոտում հպման միջոցով» ռեժիմը: Երբ միացված է «Հետազոտում հպման միջոցով» ռեժիմը, դուք կարող եք լսել կամ տեսնել նկարագրությունը, թե ինչ է ձեր մատի տակ, կամ կատարել ժեստեր` հեռախոսի հետ փոխգործակցելու համար:"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ամիս առաջ"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Ավելի շուտ քան 1 ամիս"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 վայրկյան առաջ"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> վայրկյան առաջ"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 րոպե առաջ"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> րոպե առաջ"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 ժամ առաջ"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ժամ առաջ"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Անցյալ ամիս"</string> <string name="older" msgid="5211975022815554840">"Ավելի հին"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"երեկ"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> օր առաջ"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 վայրկյանից"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> վայրկյանից"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 րոպեից"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> րոպեից"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 ժամից"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ժամից"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"վաղը"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> օրից"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 վրկ առաջ"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> վրկ. առաջ"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 րոպե առաջ"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> րոպե առաջ"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 ժամ առաջ"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ժամ առաջ"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"երեկ"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> օր առաջ"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 վրկ-ից"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> վրկ-ից"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 րոպեից"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> րոպեից"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 ժամից"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ժամից"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"վաղը"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> օրից"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>-ին"</string> <string name="preposition_for_time" msgid="5506831244263083793">"ժամը <xliff:g id="TIME">%s</xliff:g>-ին"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> թվականին"</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index 3eba049..c07a78d 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ingin mengaktifkan Menjelajah dengan Sentuhan. Saat Menjelajah dengan Sentuhan diaktifkan, Anda dapat mendengar atau melihat deskripsi dari apa yang ada di bawah jari Anda atau melakukan gerakan untuk berinteraksi dengan ponsel."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 bulan yang lalu"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Sebelum 1 bulan yang lalu"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 detik lalu"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> detik yang lalu"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 menit yang lalu"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> menit yang lalu"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 jam yang lalu"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Bulan lalu"</string> <string name="older" msgid="5211975022815554840">"Lawas"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"kemarin"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"dalam 1 detik"</item> - <item quantity="other" msgid="1241926116443974687">"dalam <xliff:g id="COUNT">%d</xliff:g> detik"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"dalam 1 menit"</item> - <item quantity="other" msgid="3330713936399448749">"dalam <xliff:g id="COUNT">%d</xliff:g> menit"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"dalam 1 jam"</item> - <item quantity="other" msgid="547290677353727389">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"besok"</item> - <item quantity="other" msgid="5109449375100953247">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 detik yang lalu"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> detik yang lalu"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 menit yang lalu"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> menit yang lalu"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 jam yang lalu"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"kemarin"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"dalam 1 detik"</item> - <item quantity="other" msgid="5495880108825805108">"dalam <xliff:g id="COUNT">%d</xliff:g> detik"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"dalam 1 menit"</item> - <item quantity="other" msgid="4216113292706568726">"dalam <xliff:g id="COUNT">%d</xliff:g> menit"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"dalam 1 jam"</item> - <item quantity="other" msgid="3705373766798013406">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"besok"</item> - <item quantity="other" msgid="2973062968038355991">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"pada <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"pada <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"dalam <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml index 690d6e5..c5bf5d2 100644 --- a/core/res/res/values-is-rIS/strings.xml +++ b/core/res/res/values-is-rIS/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vill kveikja á snertikönnun. Þegar kveikt er á snertikönnun geturðu heyrt eða séð lýsingu á því sem er á skjánum undir fingrinum hverju sinni eða notað bendingar til að stjórna símanum."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Fyrir mánuði"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Fyrir meira en mánuði"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"fyrir sekúndu"</item> - <item quantity="other" msgid="3903706804349556379">"fyrir <xliff:g id="COUNT">%d</xliff:g> sekúndum"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"fyrir mínútu"</item> - <item quantity="other" msgid="2176942008915455116">"fyrir <xliff:g id="COUNT">%d</xliff:g> mínútum"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"fyrir klukkustund"</item> - <item quantity="other" msgid="2467273239587587569">"fyrir <xliff:g id="COUNT">%d</xliff:g> klukkustundum"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Í síðasta mánuði"</string> <string name="older" msgid="5211975022815554840">"Eldra"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"í gær"</item> - <item quantity="other" msgid="2479586466153314633">"fyrir <xliff:g id="COUNT">%d</xliff:g> dögum"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"eftir sekúndu"</item> - <item quantity="other" msgid="1241926116443974687">"eftir <xliff:g id="COUNT">%d</xliff:g> sekúndur"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"eftir mínútu"</item> - <item quantity="other" msgid="3330713936399448749">"eftir <xliff:g id="COUNT">%d</xliff:g> mínútur"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"eftir klukkustund"</item> - <item quantity="other" msgid="547290677353727389">"eftir <xliff:g id="COUNT">%d</xliff:g> klukkustundir"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"á morgun"</item> - <item quantity="other" msgid="5109449375100953247">"eftir <xliff:g id="COUNT">%d</xliff:g> daga"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"fyrir sekúndu"</item> - <item quantity="other" msgid="3699169366650930415">"fyrir <xliff:g id="COUNT">%d</xliff:g> sekúndum"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"fyrir mínútu"</item> - <item quantity="other" msgid="851164968597150710">"fyrir <xliff:g id="COUNT">%d</xliff:g> mínútum"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"fyrir klukkustund"</item> - <item quantity="other" msgid="6889970745748538901">"fyrir <xliff:g id="COUNT">%d</xliff:g> klukkustundum"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"í gær"</item> - <item quantity="other" msgid="3453342639616481191">"fyrir <xliff:g id="COUNT">%d</xliff:g> dögum"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"eftir sekúndu"</item> - <item quantity="other" msgid="5495880108825805108">"eftir <xliff:g id="COUNT">%d</xliff:g> sekúndur"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"eftir mínútu"</item> - <item quantity="other" msgid="4216113292706568726">"eftir <xliff:g id="COUNT">%d</xliff:g> mínútur"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"eftir klukkustund"</item> - <item quantity="other" msgid="3705373766798013406">"eftir <xliff:g id="COUNT">%d</xliff:g> klukkustundir"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"á morgun"</item> - <item quantity="other" msgid="2973062968038355991">"eftir <xliff:g id="COUNT">%d</xliff:g> daga"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index bea0c13..1bdc1ff 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vuole attivare la funzione Esplora al tocco. Quando la funzione Esplora al tocco è attiva, puoi ascoltare o visualizzare le descrizioni di ciò che stai toccando oppure interagire con il telefono tramite gesti."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 mese fa"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Oltre 1 mese fa"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 secondo fa"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> secondi fa"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minuto fa"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minuti fa"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 ora fa"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ore fa"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Ultimo mese"</string> <string name="older" msgid="5211975022815554840">"Precedente"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ieri"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> giorni fa"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"tra 1 secondo"</item> - <item quantity="other" msgid="1241926116443974687">"tra <xliff:g id="COUNT">%d</xliff:g> secondi"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"tra 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"tra <xliff:g id="COUNT">%d</xliff:g> minuti"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"tra 1 ora"</item> - <item quantity="other" msgid="547290677353727389">"tra <xliff:g id="COUNT">%d</xliff:g> ore"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"domani"</item> - <item quantity="other" msgid="5109449375100953247">"tra <xliff:g id="COUNT">%d</xliff:g> giorni"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 sec fa"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sec fa"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 min fa"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min fa"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 ora fa"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ore fa"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ieri"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> giorni fa"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"tra 1 sec"</item> - <item quantity="other" msgid="5495880108825805108">"tra <xliff:g id="COUNT">%d</xliff:g> sec"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"tra 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"tra <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"tra 1 ora"</item> - <item quantity="other" msgid="3705373766798013406">"tra <xliff:g id="COUNT">%d</xliff:g> ore"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"domani"</item> - <item quantity="other" msgid="2973062968038355991">"tra <xliff:g id="COUNT">%d</xliff:g> giorni"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"in data <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"alle ore <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"nel <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index edf5dd8..7b6d979 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> רוצה להפעיל את התכונה \'חקור על ידי מגע\'. כאשר התכונה \'חקור על ידי מגע\' מופעלת, אתה יכול לשמוע או לראות תיאורים של הפריטים שעליהם אצבעך מונחת או לקיים אינטראקציה עם הטלפון באמצעות תנועות אצבע."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"לפני חודש אחד"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"לפני חודש אחד"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"לפני שנייה אחת"</item> - <item quantity="other" msgid="3903706804349556379">"לפני <xliff:g id="COUNT">%d</xliff:g> שניות"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"לפני דקה אחת"</item> - <item quantity="other" msgid="2176942008915455116">"לפני <xliff:g id="COUNT">%d</xliff:g> דקות"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"לפני שעה"</item> - <item quantity="other" msgid="2467273239587587569">"לפני <xliff:g id="COUNT">%d</xliff:g> שעות"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"בחודש שעבר"</string> <string name="older" msgid="5211975022815554840">"ישן יותר"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"אתמול"</item> - <item quantity="other" msgid="2479586466153314633">"לפני <xliff:g id="COUNT">%d</xliff:g> ימים"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"בעוד שנייה אחת"</item> - <item quantity="other" msgid="1241926116443974687">"תוך <xliff:g id="COUNT">%d</xliff:g> שניות"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"בעוד דקה אחת"</item> - <item quantity="other" msgid="3330713936399448749">"תוך <xliff:g id="COUNT">%d</xliff:g> דקות"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"תוך שעה אחת"</item> - <item quantity="other" msgid="547290677353727389">"תוך <xliff:g id="COUNT">%d</xliff:g> שעות"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"מחר"</item> - <item quantity="other" msgid="5109449375100953247">"בעוד <xliff:g id="COUNT">%d</xliff:g> ימים"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"לפני שנייה אחת"</item> - <item quantity="other" msgid="3699169366650930415">"לפני <xliff:g id="COUNT">%d</xliff:g> שניות"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"לפני דקה"</item> - <item quantity="other" msgid="851164968597150710">"לפני <xliff:g id="COUNT">%d</xliff:g> דקות"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"לפני שעה"</item> - <item quantity="other" msgid="6889970745748538901">"לפני <xliff:g id="COUNT">%d</xliff:g> שעות"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"אתמול"</item> - <item quantity="other" msgid="3453342639616481191">"לפני <xliff:g id="COUNT">%d</xliff:g> ימים"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"תוך שנייה אחת"</item> - <item quantity="other" msgid="5495880108825805108">"תוך <xliff:g id="COUNT">%d</xliff:g> שניות"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"תוך דקה אחת"</item> - <item quantity="other" msgid="4216113292706568726">"תוך <xliff:g id="COUNT">%d</xliff:g> דקות"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"תוך שעה אחת"</item> - <item quantity="other" msgid="3705373766798013406">"תוך <xliff:g id="COUNT">%d</xliff:g> שעות"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"מחר"</item> - <item quantity="other" msgid="2973062968038355991">"בעוד <xliff:g id="COUNT">%d</xliff:g> ימים"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"בתאריך <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"בשעה <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"בשנת <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index 27cce45..ca4ccda 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>がタッチガイドをONにしようとしています。タッチガイドをONにすると、指の位置にあるアイテムの説明を読み上げたり表示したりできます。また、携帯端末を通常とは違うジェスチャーで操作できます。"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1か月前"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1か月前"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1秒前"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1分前"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g>分前"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1時間前"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>時間前"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"先月"</string> <string name="older" msgid="5211975022815554840">"もっと前"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"昨日"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>日前"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1秒後"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g>秒後"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1分後"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>分後"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1時間後"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g>時間後"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"明日"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g>日後"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1秒前"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1分前"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g>分前"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1時間前"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g>時間前"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"昨日"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g>日前"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1秒後"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g>秒後"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1分後"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g>分後"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1時間後"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g>時間後"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"明日"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g>日後"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>年"</string> diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml index 421c3e2..b3ab0e4 100644 --- a/core/res/res/values-ka-rGE/strings.xml +++ b/core/res/res/values-ka-rGE/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>-ს სურს „შეხებით შესწავლის“ რეჟიმის ჩრთვა. ეს ტელეფონის ჟესტებით მართვისა და იმ ელემენტების აღწერის მოსმენის შესაძლებლობას მოგცემთ, რომელსაც შეეხებით."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"ერთი თვის წინ"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"უფრო ადრე, ვიდრე ერთი თვის წინ"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 წამის წინ"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> წამის წინ"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 წუთის უკან"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> წუთის წინ"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 საათის წინ"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> საათის წინ"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"გასული თვე"</string> <string name="older" msgid="5211975022815554840">"უფრო ძველი"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"გუშინ"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> დღის წინ"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 წამში"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> წამში"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 წუთში"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> წუთში"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 საათში"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> საათში"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ხვალ"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> დღეში"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 წმ. წინ"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> წამის წინ"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 წუთის წინ"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> წუთის წინ"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 საათის წინ"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> საათის წინ"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"გუშინ"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> დღის წინ"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 წამში"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> წამის წინ"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 წუთში"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> წუთში"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 საათში"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> საათში"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ხვალ"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> დღეში"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"თარიღი: <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>-ზე"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> წელს"</string> diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml index 7fad880..be1007d 100644 --- a/core/res/res/values-kk-rKZ/strings.xml +++ b/core/res/res/values-kk-rKZ/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> Сенсор арқылы шолу функциясын іске қосуды қалайды. Сенсор арқылы шолу функциясы қосылғанда саусақ астындағы нысан сипаттарын естуге немесе көруге болады немесе телефонмен қатынасу қимылдарын орындауға болады."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ай бұрын"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Осыған дейін 1 ай бұрын"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 секунд бұрын"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> секунд бұрын"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 минут бұрын"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> минут бұрын"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 сағат бұрын"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> сағат бұрын"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Соңғы ай"</string> <string name="older" msgid="5211975022815554840">"Ескілеу"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"кеше"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> күн бұрын"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 секундта"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> секундта"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 минутта"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> минутта"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 сағатта"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> сағатта"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ертең"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> күнде"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 секунд бұрын"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> секунд бұрын"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 минут бұрын"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> минут бұрын"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 сағат бұрын"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> сағат бұрын"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"кеше"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> күн бұрын"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 секундта"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> секундта"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 минутта"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> минутта"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 сағатта"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> сағатта"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ертең"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> күнде"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> күні"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> уақытында"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> жылда"</string> diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml index 6f38aec..6e06b33 100644 --- a/core/res/res/values-km-rKH/strings.xml +++ b/core/res/res/values-km-rKH/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ចង់បើកការរុករកដោយប៉ះ។ ពេលរុករកដោយប៉ះត្រូវបានបើក អ្នកអាចស្ដាប់ឮ ឬឃើញការពណ៌នាអ្វីដែលនៅក្រោមម្រាមដៃរបស់អ្នក ឬអនុវត្តកាយវិការដើម្បីមានអន្តរកម្មជាមួយទូរស័ព្ទ។"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ខែមុន"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"មុនពេល ១ ខែមុន"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"១ វិនាទីមុន"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> វិនាទីមុន"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"១ នាទីមុន"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> នាទីមុន"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"១ ម៉ោងមុន"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ម៉ោងមុន"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"ខែមុន"</string> <string name="older" msgid="5211975022815554840">"ចាស់ជាង"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ម្សិលមិញ"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ថ្ងៃមុន"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"ក្នុងរយៈពេល ១ វិនាទី"</item> - <item quantity="other" msgid="1241926116443974687">"ក្នុងរយៈពេល <xliff:g id="COUNT">%d</xliff:g> វិនាទី"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"ក្នុងរយៈពេល ១ នាទី"</item> - <item quantity="other" msgid="3330713936399448749">"រយៈពេល <xliff:g id="COUNT">%d</xliff:g> នាទី"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"រយៈពេល ១ ម៉ោង"</item> - <item quantity="other" msgid="547290677353727389">"រយៈពេល <xliff:g id="COUNT">%d</xliff:g> ម៉ោង"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ថ្ងៃស្អែក"</item> - <item quantity="other" msgid="5109449375100953247">"រយៈពេល <xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"១ វិនាទីមុន"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> វិនាទីមុន"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"១ នាទីមុន"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> នាទីមុន"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"១ ម៉ោងមុន"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ម៉ោងមុន"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ម្សិលមិញ"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ថ្ងៃមុន"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"ក្នុងពេល 1 វិនាទី"</item> - <item quantity="other" msgid="5495880108825805108">"ក្នុងពេល <xliff:g id="COUNT">%d</xliff:g> វិនាទី"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"ក្នុងពេល 1 នាទី"</item> - <item quantity="other" msgid="4216113292706568726">"នៅរយៈពេល <xliff:g id="COUNT">%d</xliff:g> នាទី"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"ក្នុងរយៈពេល ១ ម៉ោង"</item> - <item quantity="other" msgid="3705373766798013406">"ក្នុងរយៈពេល <xliff:g id="COUNT">%d</xliff:g> ម៉ោង"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ថ្ងៃស្អែក"</item> - <item quantity="other" msgid="2973062968038355991">"ក្នុងរយៈពេល <xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"នៅ <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"នៅម៉ោង <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"ក្នុងឆ្នាំ <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml index 421c103..8bb3083 100644 --- a/core/res/res/values-kn-rIN/strings.xml +++ b/core/res/res/values-kn-rIN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"ಸ್ಪರ್ಶದ ಮೂಲಕ ಎಕ್ಸ್ಪ್ಲೋರ್ ಸಕ್ರಿಯಗೊಳಿಸಲು <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ಬಯಸುತ್ತದೆ. ಸ್ಪರ್ಶದ ಮೂಲಕ ಎಕ್ಸ್ಪ್ಲೋರ್ ಆನ್ ಮಾಡಿದಾಗ, ಫೋನ್ ಜೊತೆ ಸಂವಹನ ನಡೆಸಲು ನಿಮ್ಮ ಬೆರಳಿನ ಅಡಿಯಲ್ಲಿರುವ ವಿವರಣೆಗಳನ್ನು ನೀವು ಆಲಿಸಬಹುದು ಅಥವಾ ವೀಕ್ಷಿಸಬಹುದು ಇಲ್ಲವೇ ಗೆಶ್ಚರ್ ಮಾಡಬಹುದು."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ತಿಂಗಳ ಹಿಂದೆ"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ತಿಂಗಳ ಹಿಂದಕ್ಕೂ ಮೊದಲು"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 ಸೆಕೆಂಡಿನ ಹಿಂದೆ"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 ನಿಮಿಷದ ಹಿಂದೆ"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 ಗಂಟೆ ಹಿಂದೆ"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳ ಹಿಂದೆ"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"ಕಳೆದ ತಿಂಗಳು"</string> <string name="older" msgid="5211975022815554840">"ಹಳೆಯದು"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ನಿನ್ನೆ"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 ಸೆಕೆಂಡಿನಲ್ಲಿ"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 ನಿಮಿಷದಲ್ಲಿ"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 ಗಂಟೆಯಲ್ಲಿ"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ನಾಳೆ"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 ಸೆಕೆಂಡಿನ ಹಿಂದೆ"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 ನಿಮಿಷದ ಹಿಂದೆ"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 ಗಂಟೆ ಹಿಂದೆ"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ನಿನ್ನೆ"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳ ಹಿಂದೆ"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 ಸೆಕೆಂಡಿನಲ್ಲಿ"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 ನಿಮಿಷದಲ್ಲಿ"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 ಗಂಟೆಯಲ್ಲಿ"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳಲ್ಲಿ"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ನಾಳೆ"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳಲ್ಲಿ"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> ರಂದು"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> ರಲ್ಲಿ"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> ರಲ್ಲಿ"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index 94c60d9..afa99f3 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>을(를) 사용하려면 \'터치하여 탐색\' 기능을 사용하도록 설정해야 합니다. \'터치하여 탐색\'을 사용하도록 설정하면, 화면을 터치하여 손가락 아래에 표시된 항목에 대한 설명을 듣고 보거나 휴대전화로 상호작용하기 위한 동작을 수행할 수 있습니다."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"한 달 전"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"한 달 전"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1초 전"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g>초 전"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1분 전"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g>분 전"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1시간 전"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>시간 전"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"지난 달"</string> <string name="older" msgid="5211975022815554840">"이전"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"어제"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>일 전"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1초 내"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g>초 후"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1분 후"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>분 후"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1시간 후"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g>시간 후"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"내일"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g>일 후"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1초 전"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g>초 전"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1분 전"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g>분 전"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1시간 전"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g>시간 전"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"어제"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g>일 전"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1초 후"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g>초 후"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1분 후"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g>분 후"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1시간 후"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g>시간 후"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"내일"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g>일 후"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>년"</string> diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml index 898b226..f4586e1 100644 --- a/core/res/res/values-ky-rKG/strings.xml +++ b/core/res/res/values-ky-rKG/strings.xml @@ -1474,44 +1474,11 @@ <skip /> <!-- no translation found for beforeOneMonthDurationPast (909134546836499826) --> <skip /> - <!-- no translation found for num_seconds_ago:one (4869870056547896011) --> - <!-- no translation found for num_seconds_ago:other (3903706804349556379) --> - <!-- no translation found for num_minutes_ago:one (3306787433088810191) --> - <!-- no translation found for num_minutes_ago:other (2176942008915455116) --> - <!-- no translation found for num_hours_ago:one (9150797944610821849) --> - <!-- no translation found for num_hours_ago:other (2467273239587587569) --> - <!-- no translation found for last_num_days:one (7555846096746489821) --> <!-- no translation found for last_num_days:other (3069992808164318268) --> <!-- no translation found for last_month (3959346739979055432) --> <skip /> <!-- no translation found for older (5211975022815554840) --> <skip /> - <!-- no translation found for num_days_ago:one (861358534398115820) --> - <!-- no translation found for num_days_ago:other (2479586466153314633) --> - <!-- no translation found for in_num_seconds:one (2729745560954905102) --> - <!-- no translation found for in_num_seconds:other (1241926116443974687) --> - <!-- no translation found for in_num_minutes:one (8793095251325200395) --> - <!-- no translation found for in_num_minutes:other (3330713936399448749) --> - <!-- no translation found for in_num_hours:one (7164353342477769999) --> - <!-- no translation found for in_num_hours:other (547290677353727389) --> - <!-- no translation found for in_num_days:one (5413088743009839518) --> - <!-- no translation found for in_num_days:other (5109449375100953247) --> - <!-- no translation found for abbrev_num_seconds_ago:one (1849036840200069118) --> - <!-- no translation found for abbrev_num_seconds_ago:other (3699169366650930415) --> - <!-- no translation found for abbrev_num_minutes_ago:one (6361490147113871545) --> - <!-- no translation found for abbrev_num_minutes_ago:other (851164968597150710) --> - <!-- no translation found for abbrev_num_hours_ago:one (4796212039724722116) --> - <!-- no translation found for abbrev_num_hours_ago:other (6889970745748538901) --> - <!-- no translation found for abbrev_num_days_ago:one (8463161711492680309) --> - <!-- no translation found for abbrev_num_days_ago:other (3453342639616481191) --> - <!-- no translation found for abbrev_in_num_seconds:one (5842225370795066299) --> - <!-- no translation found for abbrev_in_num_seconds:other (5495880108825805108) --> - <!-- no translation found for abbrev_in_num_minutes:one (562786149928284878) --> - <!-- no translation found for abbrev_in_num_minutes:other (4216113292706568726) --> - <!-- no translation found for abbrev_in_num_hours:one (3274708118124045246) --> - <!-- no translation found for abbrev_in_num_hours:other (3705373766798013406) --> - <!-- no translation found for abbrev_in_num_days:one (2178576254385739855) --> - <!-- no translation found for abbrev_in_num_days:other (2973062968038355991) --> <!-- no translation found for preposition_for_date (9093949757757445117) --> <skip /> <!-- no translation found for preposition_for_time (5506831244263083793) --> diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml index 086a9e5..ec70266 100644 --- a/core/res/res/values-lo-rLA/strings.xml +++ b/core/res/res/values-lo-rLA/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ຕ້ອງການເປີດນຳໃຊ້ \"ການສຳຫຼວດໂດຍສຳພັດ\". ເມື່ອເປີດ \"ການສຳຫຼວດໂດຍສຳພັດ\" ແລ້ວ ທ່ານຈະສາມາດໄດ້ຍິນ ຫຼືເຫັນຄຳບັນຍາຍວ່າມີຫຍັງຢູ່ກ້ອງນິ້ວມືຂອງທ່ານ ຫຼືໃຊ້ຮູບແບບການເຄື່ອນໄຫວເພື່ອໂຕ້ຕອບກັບໂທລະສັບ."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ເດືອນກ່ອນຫນ້ານີ້"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ຫຼາຍກວ່າ 1 ເດືອນກ່ອນ"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 ວິນາທີກ່ອນ"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ວິນາທີກ່ອນໜ້ານີ້"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 ນາທີກ່ອນໜ້ານີ້"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> ນາທີທີ່ຜ່ານມາ"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 ຊົ່ວໂມງກ່ອນໜ້ານີ້"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງທີ່ຜ່ານມາ"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"ເດືອນແລ້ວ"</string> <string name="older" msgid="5211975022815554840">"ເກົ່າກວ່າ"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ມື້ວານນີ້"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ມື້ກ່ອນ"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"ໃນອີກ 1 ວິນາທີ"</item> - <item quantity="other" msgid="1241926116443974687">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ວິນາທີ"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"ໃນ 1 ນາທີ"</item> - <item quantity="other" msgid="3330713936399448749">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ນາທີ"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"ໃນ 1 ຊົ່ວໂມງ"</item> - <item quantity="other" msgid="547290677353727389">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງ"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ມື້ອື່ນ"</item> - <item quantity="other" msgid="5109449375100953247">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ມື້"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 ວິນາທີກ່ອນ"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ວິ ກ່ອນໜ້ານີ້"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 ນທ ກ່ອນ"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> ນທ ກ່ອນໜ້ານີ້"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 ຊົ່ວໂມງກ່ອນ"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງກ່ອນໜ້ານີ້"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ມື້ວານນີ້"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ມື້ກ່ອນໜ້ານີ້"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"ໃນ 1 ວິ"</item> - <item quantity="other" msgid="5495880108825805108">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ວິ"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"ໃນ 1 ນາທີ"</item> - <item quantity="other" msgid="4216113292706568726">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ນທ"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"ໃນ 1 ຊົ່ວໂມງ"</item> - <item quantity="other" msgid="3705373766798013406">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງ"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ມື້ອື່ນ"</item> - <item quantity="other" msgid="2973062968038355991">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ມື້"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"ວັນທີ <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"ເວລາ <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"ໃນ <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml index d7a93ac..8e8d436 100644 --- a/core/res/res/values-lt/strings.xml +++ b/core/res/res/values-lt/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"„<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>“ nori įgalinti naršymą liečiant. Kai naršymas liečiant bus įjungtas, galėsite išgirsti ar peržiūrėti pirštu liečiamų elementų aprašus arba atlikdami gestus naudoti telefoną."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Prieš 1 mėn."</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Prieš maždaug 1 mėnesį"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Prieš 1 sek."</item> - <item quantity="other" msgid="3903706804349556379">"Prieš <xliff:g id="COUNT">%d</xliff:g> sek."</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Prieš 1 minutę"</item> - <item quantity="other" msgid="2176942008915455116">"Prieš <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Prieš 1 valandą"</item> - <item quantity="other" msgid="2467273239587587569">"Prieš <xliff:g id="COUNT">%d</xliff:g> val."</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Paskutinį mėnesį"</string> <string name="older" msgid="5211975022815554840">"Senesni"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"vakar"</item> - <item quantity="other" msgid="2479586466153314633">"Prieš <xliff:g id="COUNT">%d</xliff:g> d."</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"po 1 sek."</item> - <item quantity="other" msgid="1241926116443974687">"po <xliff:g id="COUNT">%d</xliff:g> sek."</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"po 1 min."</item> - <item quantity="other" msgid="3330713936399448749">"po <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"po 1 val."</item> - <item quantity="other" msgid="547290677353727389">"po <xliff:g id="COUNT">%d</xliff:g> val."</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"rytoj"</item> - <item quantity="other" msgid="5109449375100953247">"po <xliff:g id="COUNT">%d</xliff:g> d."</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Prieš 1 sek."</item> - <item quantity="other" msgid="3699169366650930415">"Prieš <xliff:g id="COUNT">%d</xliff:g> sek."</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"Prieš 1 min."</item> - <item quantity="other" msgid="851164968597150710">"Prieš <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Prieš 1 valandą"</item> - <item quantity="other" msgid="6889970745748538901">"Prieš <xliff:g id="COUNT">%d</xliff:g> val."</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"vakar"</item> - <item quantity="other" msgid="3453342639616481191">"Prieš <xliff:g id="COUNT">%d</xliff:g> d."</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"po 1 sek."</item> - <item quantity="other" msgid="5495880108825805108">"po <xliff:g id="COUNT">%d</xliff:g> sek."</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"po 1 min."</item> - <item quantity="other" msgid="4216113292706568726">"po <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"po 1 val."</item> - <item quantity="other" msgid="3705373766798013406">"po <xliff:g id="COUNT">%d</xliff:g> val."</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"rytoj"</item> - <item quantity="other" msgid="2973062968038355991">"po <xliff:g id="COUNT">%d</xliff:g> d."</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> m."</string> diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml index 1989b55..2c74c82 100644 --- a/core/res/res/values-lv/strings.xml +++ b/core/res/res/values-lv/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vēlas iespējot funkciju “Atklāt pieskaroties”. Kad ir ieslēgta funkcija “Atklāt pieskaroties”, var dzirdēt vai redzēt tā vienuma aprakstu, virs kura atrodas pirksts, vai veikt žestus, lai mijiedarbotos ar tālruni."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Pirms 1 mēneša"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Vairāk nekā pirms 1 mēneša"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Pirms 1 sekundes"</item> - <item quantity="other" msgid="3903706804349556379">"Pirms <xliff:g id="COUNT">%d</xliff:g> sekundes(-ēm)"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Pirms 1 minūtes"</item> - <item quantity="other" msgid="2176942008915455116">"Pirms <xliff:g id="COUNT">%d</xliff:g> minūtes(-ēm)"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Pirms 1 stundas"</item> - <item quantity="other" msgid="2467273239587587569">"Pirms <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Iepriekšējā mēnesī"</string> <string name="older" msgid="5211975022815554840">"Vecāks"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"vakar"</item> - <item quantity="other" msgid="2479586466153314633">"Pirms <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"pēc 1 sekundes"</item> - <item quantity="other" msgid="1241926116443974687">"pēc <xliff:g id="COUNT">%d</xliff:g> sekundes(-ēm)"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"pēc 1 minūtes"</item> - <item quantity="other" msgid="3330713936399448749">"pēc <xliff:g id="COUNT">%d</xliff:g> minūtes(-ēm)"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"pēc 1 stundas"</item> - <item quantity="other" msgid="547290677353727389">"pēc <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"rītdien"</item> - <item quantity="other" msgid="5109449375100953247">"pēc <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Pirms 1 sekundes"</item> - <item quantity="other" msgid="3699169366650930415">"Pirms <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"Pirms 1 min"</item> - <item quantity="other" msgid="851164968597150710">"Pirms <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Pirms 1 stundas"</item> - <item quantity="other" msgid="6889970745748538901">"Pirms <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"vakar"</item> - <item quantity="other" msgid="3453342639616481191">"Pirms <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"pēc 1 s"</item> - <item quantity="other" msgid="5495880108825805108">"pēc <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"pēc 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"pēc <xliff:g id="COUNT">%d</xliff:g> minūtes(-ēm)"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"pēc 1 stundas"</item> - <item quantity="other" msgid="3705373766798013406">"pēc <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"rītdien"</item> - <item quantity="other" msgid="2973062968038355991">"pēc <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"šādā datumā: <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"plkst. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"šādā gadā: <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml index a3d0386..a6ec56c 100644 --- a/core/res/res/values-mk-rMK/strings.xml +++ b/core/res/res/values-mk-rMK/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> сака да овозможи „Истражувај со допир“. Кога е вклучено „Истражувај со допир“, може да се слушнат или да се видат описи на она што е под вашиот прст или да се прават движења за комуницирање со телефонот."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Пред 1 месец"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Пред повеќе од 1 месец"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"пред 1 секунда"</item> - <item quantity="other" msgid="3903706804349556379">"пред <xliff:g id="COUNT">%d</xliff:g> секунди"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"пред 1 минута"</item> - <item quantity="other" msgid="2176942008915455116">"пред <xliff:g id="COUNT">%d</xliff:g> минути"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Пред 1 час"</item> - <item quantity="other" msgid="2467273239587587569">"пред <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Минатиот месец"</string> <string name="older" msgid="5211975022815554840">"Постари"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"вчера"</item> - <item quantity="other" msgid="2479586466153314633">"Пред <xliff:g id="COUNT">%d</xliff:g> дена"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"за 1 секунда"</item> - <item quantity="other" msgid="1241926116443974687">"за <xliff:g id="COUNT">%d</xliff:g> секунди"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"за 1 минута"</item> - <item quantity="other" msgid="3330713936399448749">"за <xliff:g id="COUNT">%d</xliff:g> минути"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"за 1 час"</item> - <item quantity="other" msgid="547290677353727389">"за <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"утре"</item> - <item quantity="other" msgid="5109449375100953247">"за <xliff:g id="COUNT">%d</xliff:g> дена"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"пред 1 сек"</item> - <item quantity="other" msgid="3699169366650930415">"пред <xliff:g id="COUNT">%d</xliff:g> секунди"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"пред 1 мин"</item> - <item quantity="other" msgid="851164968597150710">"пред <xliff:g id="COUNT">%d</xliff:g> минути"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"пред 1 час"</item> - <item quantity="other" msgid="6889970745748538901">"пред <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"вчера"</item> - <item quantity="other" msgid="3453342639616481191">"Пред <xliff:g id="COUNT">%d</xliff:g> дена"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"за 1 сек"</item> - <item quantity="other" msgid="5495880108825805108">"за <xliff:g id="COUNT">%d</xliff:g> секунди"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"за 1 мин"</item> - <item quantity="other" msgid="4216113292706568726">"за <xliff:g id="COUNT">%d</xliff:g> минути"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"за 1 час"</item> - <item quantity="other" msgid="3705373766798013406">"за <xliff:g id="COUNT">%d</xliff:g> часа"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"утре"</item> - <item quantity="other" msgid="2973062968038355991">"за <xliff:g id="COUNT">%d</xliff:g> дена"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"на <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"во <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"во <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml index 49f86e8..a2e36ac 100644 --- a/core/res/res/values-ml-rIN/strings.xml +++ b/core/res/res/values-ml-rIN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"ടച്ച് വഴി പര്യവേക്ഷണം ചെയ്യൽ പ്രവർത്തനക്ഷമമാക്കാൻ <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> താൽപ്പര്യപ്പെടുന്നു. ടച്ച് വഴി പര്യവേക്ഷണം ചെയ്യൽ ഓൺ ചെയ്യുമ്പോൾ, നിങ്ങളുടെ വിരലിനടിയിലുള്ളവയുടെ വിവരണം കേൾക്കാനോ കാണാനോ അല്ലെങ്കിൽ ഫോണുമായി സംവദിക്കുന്ന ജെസ്റ്ററുകൾ നിർവഹിക്കാനോ കഴിയും."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 മാസം മുമ്പുള്ളത്"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ഒരു മാസം മുമ്പ്"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 നിമിഷം മുമ്പ്"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷം മുമ്പ്"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 മിനിറ്റ് മുമ്പ്"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റ് മുമ്പ്"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 മണിക്കൂര് മുമ്പ്"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂർ മുമ്പ്"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"കഴിഞ്ഞ മാസം"</string> <string name="older" msgid="5211975022815554840">"പഴയത്"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ഇന്നലെ"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ദിവസം മുമ്പ്"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"ഒരു നിമിഷത്തിനുള്ളിൽ"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷത്തിനുള്ളിൽ"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"ഒരു മിനിറ്റിൽ"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റിനുള്ളിൽ"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"ഒരു മണിക്കൂറിനുള്ളിൽ"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂറിനുള്ളിൽ"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"നാളെ"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> ദിവസത്തിനുള്ളിൽ"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"ഒരു നിമിഷം മുമ്പ്"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷം മുമ്പ്"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"ഒരു മിനിറ്റ് മുമ്പ്"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റ് മുമ്പ്"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 മണിക്കൂര് മുമ്പ്"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂർ മുമ്പ്"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ഇന്നലെ"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ദിവസം മുമ്പ്"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"ഒരു നിമിഷത്തിനുള്ളിൽ"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷത്തിനുള്ളിൽ"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"ഒരു മിനിറ്റിനുള്ളിൽ"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റിനുള്ളിൽ"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"ഒരു മണിക്കൂറിനുള്ളിൽ"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂറിനുള്ളിൽ"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"നാളെ"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> ദിവസത്തിനുള്ളിൽ"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>-ന്"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>-ന്"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>-ൽ"</string> diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml index e714570..d91363a 100644 --- a/core/res/res/values-mn-rMN/strings.xml +++ b/core/res/res/values-mn-rMN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> нь Хүрч танихыг идэвхжүүлэхийг шаардаж байна. Хүрч таних идэвхжсэн тохиолдолд та хуруун доороо юу байгааг сонсох, тайлбарыг харах боломжтой ба утастайгаа дохиогоор харилцах боломжтой."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 сарын өмнө"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 сарын өмнө"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 секундын өмнө"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> секундын өмнө"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 минутын өмнө"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> минутын өмнө"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 цагийн өмнө"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> цагийн өмнө"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Сүүлийн сар"</string> <string name="older" msgid="5211975022815554840">"Хуучин"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"өчигдөр"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> өдрийн өмнө"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 секундын дараа"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> секундын дараа"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 минутын дараа"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> минутын дараа"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 цагийн дараа"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> цагийн дараа"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"маргааш"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> өдрийн дараа"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 секундын өмнө"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> сек дараа"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 мин өмнө"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> минутын өмнө"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 цагийн өмнө"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> цагийн өмнө"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"өчигдөр"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> өдрийн өмнө"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 сек дараа"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> сек дараа"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 мин дараа"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> минутын дараа"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 цагийн дараа"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> цагийн дараа"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"маргааш"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> өдрийн дараа"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml index 763c18e..646a29d 100644 --- a/core/res/res/values-mr-rIN/strings.xml +++ b/core/res/res/values-mr-rIN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> स्पर्श करून एक्सप्लोर करा सक्षम करू इच्छिते. स्पर्श करून एक्सप्लोर करा चालू असते, तेव्हा आपण आपल्या बोटाखाली काय आहे त्याचे वर्णन ऐकू किंवा पाहू शकता किंवा फोनसह संवाद साधण्यासाठी जेश्चर करू शकता."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 महिन्यापूर्वी"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 महिन्यापूर्वी"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 सेकंदापूर्वी"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांपूर्वी"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 मिनिटापूर्वी"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांपूर्वी"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 तासापूर्वी"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> तासांपूर्वी"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"अंतिम महिना"</string> <string name="older" msgid="5211975022815554840">"अधिक जुने"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"काल"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> दिवसांपूर्वी"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 सेकंदात"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांमध्ये"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 मिनिटात"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांमध्ये"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 तासात"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> तासांमध्ये"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"उद्या"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> दिवसांमध्ये"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 सेकंदापूर्वी"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांपूर्वी"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 मिनिटापूर्वी"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांपूर्वी"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 तासापूर्वी"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> तासांपूर्वी"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"काल"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> दिवसांपूर्वी"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 सेकंदामध्ये"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांमध्ये"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 मिनिटामध्ये"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांमध्ये"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 तासात"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> तासांमध्ये"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"उद्या"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> दिवसांमध्ये"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> रोजी"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> वाजता"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> मध्ये"</string> diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml index 21be5b1..069a6c0 100644 --- a/core/res/res/values-ms-rMY/strings.xml +++ b/core/res/res/values-ms-rMY/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ingin mendayakan Jelajah melalui Sentuhan. Apabila Jelajah melalui Sentuhan didayakan, anda boleh mendengar atau melihat penerangan tentang apa di bawah jari anda atau melakukan gerak isyarat untuk berinteraksi dengan telefon."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 bulan yang lalu"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Sebelum 1 bulan yang lalu"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 saat yang lalu"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> saat yang lalu"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minit yang lalu"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minit yang lalu"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 jam yang lalu"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Bulan lepas"</string> <string name="older" msgid="5211975022815554840">"Lebih lama"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"semalam"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"dalam 1 saat"</item> - <item quantity="other" msgid="1241926116443974687">"dalam <xliff:g id="COUNT">%d</xliff:g> saat"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"dalam 1 minit"</item> - <item quantity="other" msgid="3330713936399448749">"dalam <xliff:g id="COUNT">%d</xliff:g> minit"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"dalam 1 jam"</item> - <item quantity="other" msgid="547290677353727389">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"esok"</item> - <item quantity="other" msgid="5109449375100953247">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 saat yang lalu"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> saat yang lalu"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 minit yang lalu"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minit yang lalu"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 jam yang lalu"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"semalam"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"dalam 1 saat"</item> - <item quantity="other" msgid="5495880108825805108">"dalam <xliff:g id="COUNT">%d</xliff:g> saat"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"dalam 1 minit"</item> - <item quantity="other" msgid="4216113292706568726">"dalam <xliff:g id="COUNT">%d</xliff:g> minit"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"dalam 1 jam"</item> - <item quantity="other" msgid="3705373766798013406">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"esok"</item> - <item quantity="other" msgid="2973062968038355991">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"pada <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"pada <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"dalam <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml index a8e95b5..c0bea1f 100644 --- a/core/res/res/values-my-rMM/strings.xml +++ b/core/res/res/values-my-rMM/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> က ထိတွေ့ပြီး ရှာဖွေခြင်းကို လုပ်ချင်ပါသည်။ ထိတွေ့ရှာဖွေခြင်း ဖွင့်ထားလျှင် သင့်လက်ဖျားအောက်မှ အရာကို ကြားနိုင် သို့ ရှင်းလင်းချက်ကို မြင်နိုင်တဲ့ အပြင် လက် အနေအထားဖြင့် ဖုန်းကို ဆက်သွယ်ပြုလုပ်စေခိုင်းနိုင်ပါသည်"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"လွန်ခဲ့သော၁လက"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"လွန်ခဲ့သော၁လမတိုင်မီက"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"လွန်ခဲ့သော ၁စက္ကန့်က"</item> - <item quantity="other" msgid="3903706804349556379">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်က"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"လွန်ခဲ့သော ၁မိနစ်က"</item> - <item quantity="other" msgid="2176942008915455116">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> မိနစ်က"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"လွနခဲ့သော ၁နာရီက"</item> - <item quantity="other" msgid="2467273239587587569">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> နာရီက"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"ပြီးခဲ့သောလ"</string> <string name="older" msgid="5211975022815554840">"ယခင်က"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"မနေ့က"</item> - <item quantity="other" msgid="2479586466153314633">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"နောက် ၁စက္ကန့်တွင်"</item> - <item quantity="other" msgid="1241926116443974687">"နောက် <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်တွင်"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"နောက်၁မီနစ်တွင်"</item> - <item quantity="other" msgid="3330713936399448749">"နောက် <xliff:g id="COUNT">%d</xliff:g> မိနစ်တွင်"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"နောက်၁နာရီတွင်"</item> - <item quantity="other" msgid="547290677353727389">"နောက် <xliff:g id="COUNT">%d</xliff:g> နာရီတွင်"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"မနက်ဖြန်"</item> - <item quantity="other" msgid="5109449375100953247">"နောက် <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"လွန်ခဲ့သော ၁စက္ကန့်က"</item> - <item quantity="other" msgid="3699169366650930415">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်က"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"လွန်ခဲ့သော ၁မိနစ်က"</item> - <item quantity="other" msgid="851164968597150710">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> မိနစ်က"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"လွန်ခဲ့သော ၁နာရီက"</item> - <item quantity="other" msgid="6889970745748538901">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> နာရီက"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"မနေ့က"</item> - <item quantity="other" msgid="3453342639616481191">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"နောက် ၁စက္ကန့်တွင်"</item> - <item quantity="other" msgid="5495880108825805108">"နောက် <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်တွင်"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"နောက်၁မိနစ်တွင်"</item> - <item quantity="other" msgid="4216113292706568726">"နောက် <xliff:g id="COUNT">%d</xliff:g> မိနစ်တွင်"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"နောက်၁နာရီတွင်"</item> - <item quantity="other" msgid="3705373766798013406">"နောက် <xliff:g id="COUNT">%d</xliff:g> နာရီတွင်"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"မနက်ဖြန်"</item> - <item quantity="other" msgid="2973062968038355991">"နောက် <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> တွင်"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>မှာ"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>တွင်"</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index 35147e4..1b14de1 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ber om aktivering av Utforsk ved å trykke. Når Utforsk ved å trykke er slått på, kan du høre eller se beskrivelser av det som er under fingrene dine. Du kan også utføre handlinger på nettbrettet ved hjelp av bevegelser."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"For én måned siden"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"For over en måned siden"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"for et sekund siden"</item> - <item quantity="other" msgid="3903706804349556379">"for <xliff:g id="COUNT">%d</xliff:g> sekunder siden"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"for et minutt siden"</item> - <item quantity="other" msgid="2176942008915455116">"for <xliff:g id="COUNT">%d</xliff:g> minutter siden"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"for en time siden"</item> - <item quantity="other" msgid="2467273239587587569">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Forrige måned"</string> <string name="older" msgid="5211975022815554840">"Eldre"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"i går"</item> - <item quantity="other" msgid="2479586466153314633">"for <xliff:g id="COUNT">%d</xliff:g> dager siden"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"om et sekund"</item> - <item quantity="other" msgid="1241926116443974687">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"om et minutt"</item> - <item quantity="other" msgid="3330713936399448749">"om <xliff:g id="COUNT">%d</xliff:g> minutter"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"om et minutt"</item> - <item quantity="other" msgid="547290677353727389">"om <xliff:g id="COUNT">%d</xliff:g> timer"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"i morgen"</item> - <item quantity="other" msgid="5109449375100953247">"om <xliff:g id="COUNT">%d</xliff:g> dager"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 sek siden"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sek siden"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 min siden"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min siden"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 t siden"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> t siden"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"i går"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> d siden"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"om 1 sek"</item> - <item quantity="other" msgid="5495880108825805108">"om <xliff:g id="COUNT">%d</xliff:g> sek"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"om 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"om <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"om 1 t"</item> - <item quantity="other" msgid="3705373766798013406">"om <xliff:g id="COUNT">%d</xliff:g> t"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"i morgen"</item> - <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> d"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml index 093f3c9..da70149 100644 --- a/core/res/res/values-ne-rNP/strings.xml +++ b/core/res/res/values-ne-rNP/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>ले स्पर्षद्वारा अन्वेषण सक्षम गर्न चाहन्छ। स्पर्षद्वारा अन्वेषण सक्षम भएको बेला तपाईँ आफ्नो औँलाको मुनि भएका विषयवस्तुहरू बारे सुन्न वा विवरण हेर्न सक्नुहुन्छ वा फोनसँग अन्तर्क्रिया गर्न इशारा गर्नुहोस्।"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"१ महिना अघि"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"१ महिना अघि"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"१ सेकेन्ड अघि"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्ड अघि"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"१ मिनेट अघि"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> मिनेट अघि"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"१ घन्टा अघि"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> घन्टा अघि"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"अन्तिम महिना"</string> <string name="older" msgid="5211975022815554840">"पुरानो"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"हिजो"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> दिन अघि"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"१ सेकेन्डमा"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्डमा"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"१ मिनेटमा"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>मिनेटमा"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"१ घन्टामा"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> घन्टामा"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"भोलि"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> दिनमा"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"१ सेकेन्ड अघि"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्ड अगाडि"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"१ मिनेट अघि"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> मिनेट अघि"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"१ घन्टा अघि"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> घन्टा अघि"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"हिजो"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> दिन अघि"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"१ सेकन्ड"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्डमा"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"१ मिनेटमा"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> मिनेटमा"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"१ घन्टामा"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> घन्टामा"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"भोलि"</item> - <item quantity="other" msgid="2973062968038355991">"दिन<xliff:g id="COUNT">%d</xliff:g> मा"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> मा"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> मा"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> मा"</string> diff --git a/core/res/res/values-night/themes_material_daynight.xml b/core/res/res/values-night/themes_material_daynight.xml new file mode 100644 index 0000000..da870b7 --- /dev/null +++ b/core/res/res/values-night/themes_material_daynight.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> + +<!-- +=============================================================== + PLEASE READ +=============================================================== + +The Material themes must not be modified in order to pass CTS. +Many related themes and styles depend on other values defined in this file. +If you would like to provide custom themes and styles for your device, +please see themes_device_defaults.xml. + +=============================================================== + PLEASE READ +=============================================================== + --> +<resources> + + <!-- Material theme (day/night version) for activities. --> + <style name="Theme.Material.DayNight" parent="Theme.Material" /> + + <!-- Variant of Material.DayNight that has a solid (opaque) action bar + with an inverse color profile. The dark action bar sharply stands out against + the light content (when applicable). --> + <style name="Theme.Material.DayNight.DarkActionBar" parent="Theme.Material" /> + + <!-- Variant of Material.DayNight with no action bar. --> + <style name="Theme.Material.DayNight.NoActionBar" parent="Theme.Material.NoActionBar" /> + + <!-- Variant of Material.DayNight that has no title bar and fills + the entire screen. This theme + sets {@link android.R.attr#windowFullscreen} to true. --> + <style name="Theme.Material.DayNight.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen" /> + + <!-- Variant of Material.DayNight that has no title bar and fills + the entire screen and extends into the display overscan region. This theme + sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan} + to true. --> + <style name="Theme.Material.DayNight.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan" /> + + <!-- Variant of Material.DayNight that has no title bar and translucent + system decor. This theme sets {@link android.R.attr#windowTranslucentStatus} and + {@link android.R.attr#windowTranslucentNavigation} to true. --> + <style name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" parent="Theme.Material.NoActionBar.TranslucentDecor" /> + + <!-- Default Material.DayNight theme for panel windows. This removes all extraneous + window decorations, so you basically have an empty rectangle in which + to place your content. It makes the window floating, with a transparent + background, and turns off dimming behind the window. --> + <style name="Theme.Material.DayNight.Panel" parent="Theme.Material.Panel" /> + + <!-- Material theme (day/night version) for dialog windows and activities, + which is used by the {@link android.app.Dialog} class. This changes + the window to be floating (not fill the entire screen), and puts a + frame around its contents. You can set this theme on an activity if + you would like to make an activity that looks like a Dialog. --> + <style name="Theme.Material.DayNight.Dialog" parent="Theme.Material.DayNight.BaseDialog" /> + <style name="Theme.Material.DayNight.BaseDialog" parent="Theme.Material.BaseDialog" /> + + <!-- Variant of Theme.Material.DayNight.Dialog that has a nice minimum width for + a regular dialog. --> + <style name="Theme.Material.DayNight.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth" /> + + <!-- Variant of Theme.Material.DayNight.Dialog that does not include a title bar. --> + <style name="Theme.Material.DayNight.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar" /> + + <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a nice minimum width for + a regular dialog. --> + <style name="Theme.Material.DayNight.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth" /> + + <!-- Variant of Theme.Material.DayNight.Dialog that has a fixed size. --> + <style name="Theme.Material.DayNight.Dialog.FixedSize" parent="Theme.Material.Dialog.FixedSize" /> + + <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a fixed size. --> + <style name="Theme.Material.DayNight.Dialog.NoActionBar.FixedSize" parent="Theme.Material.Dialog.NoActionBar.FixedSize" /> + + <!-- Theme for a window that will be displayed either full-screen on + smaller screens (small, normal) or as a dialog on larger screens + (large, xlarge). --> + <style name="Theme.Material.DayNight.DialogWhenLarge" parent="Theme.Material.DialogWhenLarge" /> + + <!-- Theme for a window without an action bar that will be displayed either full-screen + on smaller screens (small, normal) or as a dialog on larger screens + (large, xlarge). --> + <style name="Theme.Material.DayNight.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar" /> + + <!-- Theme for a presentation window on a secondary display. --> + <style name="Theme.Material.DayNight.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation" /> + + <!-- Material user theme for alert dialog windows, which is used by the + {@link android.app.AlertDialog} class. --> + <style name="Theme.Material.DayNight.Dialog.Alert" parent="Theme.Material.DayNight.Dialog.BaseAlert" /> + <style name="Theme.Material.DayNight.Dialog.BaseAlert" parent="Theme.Material.Dialog.BaseAlert" /> + + <style name="Theme.Material.DayNight.SearchBar" parent="Theme.Material.SearchBar" /> + <style name="Theme.Material.DayNight.CompactMenu" parent="Theme.Material.CompactMenu" /> + +</resources> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index 0aff860..c4bb334 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wil \'Verkennen via aanraking\' inschakelen. Wanneer \'Verkennen via aanraking\' is ingeschakeld, kunt u beschrijvingen beluisteren of bekijken van wat er onder uw vinger staat of aanraakbewerkingen uitvoeren op de telefoon."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 maand geleden"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Meer dan 1 maand geleden"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 seconde geleden"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconden geleden"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minuut geleden"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minuten geleden"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 uur geleden"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> uur geleden"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Afgelopen maand"</string> <string name="older" msgid="5211975022815554840">"Ouder"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"gisteren"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dagen geleden"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"over 1 seconde"</item> - <item quantity="other" msgid="1241926116443974687">"over <xliff:g id="COUNT">%d</xliff:g> seconden"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"over 1 minuut"</item> - <item quantity="other" msgid="3330713936399448749">"over <xliff:g id="COUNT">%d</xliff:g> minuten"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"over 1 uur"</item> - <item quantity="other" msgid="547290677353727389">"over <xliff:g id="COUNT">%d</xliff:g> uur"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"morgen"</item> - <item quantity="other" msgid="5109449375100953247">"over <xliff:g id="COUNT">%d</xliff:g> dagen"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 seconde geleden"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> seconden geleden"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 minuut geleden"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minuten geleden"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 uur geleden"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> uur geleden"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"gisteren"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dagen geleden"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"over 1 seconde"</item> - <item quantity="other" msgid="5495880108825805108">"over <xliff:g id="COUNT">%d</xliff:g> seconden"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"over 1 minuut"</item> - <item quantity="other" msgid="4216113292706568726">"over <xliff:g id="COUNT">%d</xliff:g> minuten"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"over 1 uur"</item> - <item quantity="other" msgid="3705373766798013406">"over <xliff:g id="COUNT">%d</xliff:g> uur"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"morgen"</item> - <item quantity="other" msgid="2973062968038355991">"over <xliff:g id="COUNT">%d</xliff:g> dagen"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"op <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"om <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"in <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index 2b25918..ac14db8 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> chce włączyć Czytanie dotykiem. Gdy ta funkcja jest włączona, słyszysz i widzisz opisy elementów, które są pod Twoim palcem, oraz możesz obsługiwać telefon gestami."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 miesiąc temu"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Ponad 1 miesiąc temu"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"sekundę temu"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sek. temu"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minutę temu"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> min temu"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"godzinę temu"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> godz. temu"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Ostatni miesiąc"</string> <string name="older" msgid="5211975022815554840">"Starsze"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"wczoraj"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dni temu"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"za sekundę"</item> - <item quantity="other" msgid="1241926116443974687">"za <xliff:g id="COUNT">%d</xliff:g> sek."</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"za minutę"</item> - <item quantity="other" msgid="3330713936399448749">"za <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"za godzinę"</item> - <item quantity="other" msgid="547290677353727389">"za <xliff:g id="COUNT">%d</xliff:g> godzin"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"jutro"</item> - <item quantity="other" msgid="5109449375100953247">"za <xliff:g id="COUNT">%d</xliff:g> dni"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"sekundę temu"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> s temu"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"minutę temu"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min temu"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"godzinę temu"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> godz. temu"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"wczoraj"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dni temu"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"za sekundę"</item> - <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"za minutę"</item> - <item quantity="other" msgid="4216113292706568726">"za <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"za godzinę"</item> - <item quantity="other" msgid="3705373766798013406">"za <xliff:g id="COUNT">%d</xliff:g> godz."</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"jutro"</item> - <item quantity="other" msgid="2973062968038355991">"za <xliff:g id="COUNT">%d</xliff:g> dni"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"w dniu <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"o godzinie <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"w <xliff:g id="YEAR">%s</xliff:g> r."</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 041847d..87c4dcc 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> pretende ativar a funcionalidade Explorar Através do Toque. Quando a funcionalidade Explorar Através do Toque estiver ativada, pode ouvir ou visualizar descrições sobre o que está por baixo do seu dedo ou executar gestos para interagir com o telemóvel."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Há 1 mês"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Há mais de 1 mês"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Há 1 segundo"</item> - <item quantity="other" msgid="3903706804349556379">"Há <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Há 1 minuto"</item> - <item quantity="other" msgid="2176942008915455116">"Há <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Há 1 hora"</item> - <item quantity="other" msgid="2467273239587587569">"Há <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Último mês"</string> <string name="older" msgid="5211975022815554840">"Mais antiga"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ontem"</item> - <item quantity="other" msgid="2479586466153314633">"Há <xliff:g id="COUNT">%d</xliff:g> dias"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"daqui a 1 segundo"</item> - <item quantity="other" msgid="1241926116443974687">"daqui a <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"daqui a 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"daqui a <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"daqui a 1 hora"</item> - <item quantity="other" msgid="547290677353727389">"daqui a <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"amanhã"</item> - <item quantity="other" msgid="5109449375100953247">"daqui a <xliff:g id="COUNT">%d</xliff:g> dias"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Há 1 seg"</item> - <item quantity="other" msgid="3699169366650930415">"Há <xliff:g id="COUNT">%d</xliff:g> seg"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"há 1 min"</item> - <item quantity="other" msgid="851164968597150710">"Há <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Há 1 hora"</item> - <item quantity="other" msgid="6889970745748538901">"Há <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ontem"</item> - <item quantity="other" msgid="3453342639616481191">"Há <xliff:g id="COUNT">%d</xliff:g> dias"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"daqui a 1 seg"</item> - <item quantity="other" msgid="5495880108825805108">"daqui a <xliff:g id="COUNT">%d</xliff:g> seg"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"daqui a 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"daqui a <xliff:g id="COUNT">%d</xliff:g> min"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"daqui a 1 hora"</item> - <item quantity="other" msgid="3705373766798013406">"em <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"amanhã"</item> - <item quantity="other" msgid="2973062968038355991">"daqui a <xliff:g id="COUNT">%d</xliff:g> dias"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"a <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"às <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"em <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index 4ea2f18..f65b088 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> quer ativar a exploração pelo toque. Com ela, você pode ouvir ou ver descrições do que está sob seu dedo e interagir com o telefone através de gestos."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 mês atrás"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Antes de 1 mês atrás"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 segundo atrás"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> segundos atrás"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minuto atrás"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutos atrás"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 hora atrás"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> horas atrás"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Mês passado"</string> <string name="older" msgid="5211975022815554840">"Mais antigos"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ontem"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dias atrás"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"em 1 segundo"</item> - <item quantity="other" msgid="1241926116443974687">"em <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"em 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"em <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"em 1 hora"</item> - <item quantity="other" msgid="547290677353727389">"Em <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"amanhã"</item> - <item quantity="other" msgid="5109449375100953247">"em <xliff:g id="COUNT">%d</xliff:g> dias"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 seg. atrás"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> segundos atrás"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 minuto atrás"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minutos atrás"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 hora atrás"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> horas atrás"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ontem"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dias atrás"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"em 1 segundo"</item> - <item quantity="other" msgid="5495880108825805108">"em <xliff:g id="COUNT">%d</xliff:g> segundos"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"em 1 minuto"</item> - <item quantity="other" msgid="4216113292706568726">"em <xliff:g id="COUNT">%d</xliff:g> minutos"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"em 1 hora"</item> - <item quantity="other" msgid="3705373766798013406">"em <xliff:g id="COUNT">%d</xliff:g> horas"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"amanhã"</item> - <item quantity="other" msgid="2973062968038355991">"em <xliff:g id="COUNT">%d</xliff:g> dias"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"em <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"às <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"em <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index 29bd05e..018d3b0 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> doreşte să activeze funcţia Exploraţi prin atingere. Când această funcţie este activată, puteţi auzi sau vedea descrieri pentru ceea ce se află sub degetul dvs. sau puteţi efectua gesturi pentru a interacţiona cu telefonul."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"cu 1 lună în urmă"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Cu mai mult de 1 lună în urmă"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"cu 1 secundă în urmă"</item> - <item quantity="other" msgid="3903706804349556379">"cu <xliff:g id="COUNT">%d</xliff:g> (de) secunde în urmă"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"cu 1 minut în urmă"</item> - <item quantity="other" msgid="2176942008915455116">"cu <xliff:g id="COUNT">%d</xliff:g> (de) minute în urmă"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"cu 1 oră în urmă"</item> - <item quantity="other" msgid="2467273239587587569">"cu <xliff:g id="COUNT">%d</xliff:g> (de) ore în urmă"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Luna trecută"</string> <string name="older" msgid="5211975022815554840">"Mai vechi"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ieri"</item> - <item quantity="other" msgid="2479586466153314633">"cu <xliff:g id="COUNT">%d</xliff:g> (de) zile în urmă"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"într-o secundă"</item> - <item quantity="other" msgid="1241926116443974687">"în <xliff:g id="COUNT">%d</xliff:g> (de) secunde"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"în 1 minut"</item> - <item quantity="other" msgid="3330713936399448749">"în <xliff:g id="COUNT">%d</xliff:g> (de) minute"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"în 1 oră"</item> - <item quantity="other" msgid="547290677353727389">"în <xliff:g id="COUNT">%d</xliff:g> (de) ore"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"mâine"</item> - <item quantity="other" msgid="5109449375100953247">"în <xliff:g id="COUNT">%d</xliff:g> (de) zile"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"cu 1 sec. în urmă"</item> - <item quantity="other" msgid="3699169366650930415">"cu <xliff:g id="COUNT">%d</xliff:g> (de) secunde în urmă"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"cu 1 min. în urmă"</item> - <item quantity="other" msgid="851164968597150710">"cu <xliff:g id="COUNT">%d</xliff:g> (de) min. în urmă"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"cu 1 oră în urmă"</item> - <item quantity="other" msgid="6889970745748538901">"cu <xliff:g id="COUNT">%d</xliff:g> (de) ore în urmă"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ieri"</item> - <item quantity="other" msgid="3453342639616481191">"cu <xliff:g id="COUNT">%d</xliff:g> (de) zile în urmă"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"în 1 sec."</item> - <item quantity="other" msgid="5495880108825805108">"în <xliff:g id="COUNT">%d</xliff:g> (de) sec."</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"în 1 min."</item> - <item quantity="other" msgid="4216113292706568726">"în <xliff:g id="COUNT">%d</xliff:g> (de) min."</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"în 1 oră"</item> - <item quantity="other" msgid="3705373766798013406">"în <xliff:g id="COUNT">%d</xliff:g> (de) ore"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"mâine"</item> - <item quantity="other" msgid="2973062968038355991">"în <xliff:g id="COUNT">%d</xliff:g> (de) zile"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"pe <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"la <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"în <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index a7882b8..c613d55 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> хочет включить функцию \"Аудиоподсказки\". Она позволяет прослушивать или просматривать описание элементов, которых вы касаетесь, и управлять телефоном с помощью жестов."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 месяц назад"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Более месяца назад"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 секунду назад"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> с. назад"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 минуту назад"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> мин. назад"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 час назад"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ч. назад"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Прошлый месяц"</string> <string name="older" msgid="5211975022815554840">"Еще раньше"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"вчера"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> дн. назад"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"через 1 секунду"</item> - <item quantity="other" msgid="1241926116443974687">"через <xliff:g id="COUNT">%d</xliff:g> с."</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"через 1 минуту"</item> - <item quantity="other" msgid="3330713936399448749">"через <xliff:g id="COUNT">%d</xliff:g> мин."</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"через 1 час"</item> - <item quantity="other" msgid="547290677353727389">"через <xliff:g id="COUNT">%d</xliff:g> ч."</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"завтра"</item> - <item quantity="other" msgid="5109449375100953247">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 сек. назад"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> сек. назад"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 мин. назад"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> мин. назад"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 час назад"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ч. назад"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"вчера"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> дн. назад"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"через 1 с."</item> - <item quantity="other" msgid="5495880108825805108">"через <xliff:g id="COUNT">%d</xliff:g> с."</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"через 1 мин."</item> - <item quantity="other" msgid="4216113292706568726">"через <xliff:g id="COUNT">%d</xliff:g> мин."</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"через 1 час"</item> - <item quantity="other" msgid="3705373766798013406">"через <xliff:g id="COUNT">%d</xliff:g> ч."</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"завтра"</item> - <item quantity="other" msgid="2973062968038355991">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"в <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"в <xliff:g id="YEAR">%s</xliff:g> г."</string> diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml index b7ccd99..af55f75 100644 --- a/core/res/res/values-si-rLK/strings.xml +++ b/core/res/res/values-si-rLK/strings.xml @@ -1133,73 +1133,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"ස්පර්ශය වෙතින් ගවේෂණය සක්රිය කිරීමට <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ට අවශ්යයි. ස්පර්ශය වෙතින් ගවේෂණය සක්රිය විට, ඔබගේ ඇඟිලිවලට පහළ විස්තර ඇසිය හෝ බැලිය හැක හෝ දුරකථනය සමග අන්තර් ක්රියාකාරී වීමට ඉංගිති සිදු කළ හැක."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"මාස 1 කට පෙර"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"මාස 1 කට පෙර"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"තත්පර 1 කට පෙර"</item> - <item quantity="other" msgid="3903706804349556379">"තත්පර <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"මිනිත්තු 1 ට පෙර"</item> - <item quantity="other" msgid="2176942008915455116">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"පැය 1 කට පෙර"</item> - <item quantity="other" msgid="2467273239587587569">"පැය <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"අවසාන මාසය"</string> <string name="older" msgid="5211975022815554840">"පරණ"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"ඊයේ"</item> - <item quantity="other" msgid="2479586466153314633">"දින <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"තත්පර 1 කින්"</item> - <item quantity="other" msgid="1241926116443974687">"තත්පර <xliff:g id="COUNT">%d</xliff:g> කදී"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"මිනිත්තු 1 කදී"</item> - <item quantity="other" msgid="3330713936399448749">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"පැය 1 ක් තුළ"</item> - <item quantity="other" msgid="547290677353727389">"පැය <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"හෙට"</item> - <item quantity="other" msgid="5109449375100953247">"දින <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"තත්පර 1 කට පෙර"</item> - <item quantity="other" msgid="3699169366650930415">"තත්පර <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"මිනිත්තු 1 කට පෙර"</item> - <item quantity="other" msgid="851164968597150710">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"පැය 1 කට පෙර"</item> - <item quantity="other" msgid="6889970745748538901">"පැය <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"ඊයේ"</item> - <item quantity="other" msgid="3453342639616481191">"දින <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"තත්පර 1 ක් තුළ"</item> - <item quantity="other" msgid="5495880108825805108">"තත්පර <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"මිනිත්තු 1 ක් තුළ"</item> - <item quantity="other" msgid="4216113292706568726">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"පැය 1 ක් තුළ"</item> - <item quantity="other" msgid="3705373766798013406">"පැය <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"හෙට"</item> - <item quantity="other" msgid="2973062968038355991">"දින <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> වන දා"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> ට"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> තුළ"</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index 2a73770..312791b 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolenie funkcie Preskúmanie dotykom. Ak je funkcia Preskúmanie dotykom zapnutá, môžete počuť alebo vidieť popisy objektov pod vaším prstom alebo ovládať telefón gestami."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"pred 1 mesiacom"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Viac ako pred 1 mesiacom"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"pred 1 sekundou"</item> - <item quantity="other" msgid="3903706804349556379">"pred <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Pred minútou"</item> - <item quantity="other" msgid="2176942008915455116">"pred <xliff:g id="COUNT">%d</xliff:g> minútami"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"pred 1 hodinou"</item> - <item quantity="other" msgid="2467273239587587569">"pred <xliff:g id="COUNT">%d</xliff:g> hodinami"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Minulý mesiac"</string> <string name="older" msgid="5211975022815554840">"Staršie"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"včera"</item> - <item quantity="other" msgid="2479586466153314633">"pred <xliff:g id="COUNT">%d</xliff:g> dňami"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"o 1 sekundu"</item> - <item quantity="other" msgid="1241926116443974687">"o <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"o 1 minútu"</item> - <item quantity="other" msgid="3330713936399448749">"o <xliff:g id="COUNT">%d</xliff:g> minút"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"o 1 hodinu"</item> - <item quantity="other" msgid="547290677353727389">"o <xliff:g id="COUNT">%d</xliff:g> hodín"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"zajtra"</item> - <item quantity="other" msgid="5109449375100953247">"o <xliff:g id="COUNT">%d</xliff:g> dní"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"pred 1 s"</item> - <item quantity="other" msgid="3699169366650930415">"pred <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"pred 1 min."</item> - <item quantity="other" msgid="851164968597150710">"pred <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"pred 1 hodinou"</item> - <item quantity="other" msgid="6889970745748538901">"pred <xliff:g id="COUNT">%d</xliff:g> hodinami"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"včera"</item> - <item quantity="other" msgid="3453342639616481191">"pred <xliff:g id="COUNT">%d</xliff:g> dňami"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"o 1 s"</item> - <item quantity="other" msgid="5495880108825805108">"o <xliff:g id="COUNT">%d</xliff:g> s"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"o 1 min."</item> - <item quantity="other" msgid="4216113292706568726">"o <xliff:g id="COUNT">%d</xliff:g> min."</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"o 1 hodinu"</item> - <item quantity="other" msgid="3705373766798013406">"o <xliff:g id="COUNT">%d</xliff:g> hodín"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"zajtra"</item> - <item quantity="other" msgid="2973062968038355991">"o <xliff:g id="COUNT">%d</xliff:g> dní"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"dňa <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"o <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"z <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index bc8a851..df365fd 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Storitev <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogočiti raziskovanje z dotikom. Ko je raziskovanje z dotikom vklopljeno, lahko slišite ali vidite opise tega, kar je pod vašim prstom, ali izvajate poteze za interakcijo s telefonom."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Pred 1 mesecem"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Pred več kot 1 mesecem"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Pred 1 sekundo"</item> - <item quantity="other" msgid="3903706804349556379">"pred toliko sekundami: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"pred 1 minuto"</item> - <item quantity="other" msgid="2176942008915455116">"Pred <xliff:g id="COUNT">%d</xliff:g> minutami"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"pred 1 uro"</item> - <item quantity="other" msgid="2467273239587587569">"Pred <xliff:g id="COUNT">%d</xliff:g> urami"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Pretekli mesec"</string> <string name="older" msgid="5211975022815554840">"Starejše"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"včeraj"</item> - <item quantity="other" msgid="2479586466153314633">"Pred <xliff:g id="COUNT">%d</xliff:g> dnevi"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"čez 1 sekundo"</item> - <item quantity="other" msgid="1241926116443974687">"Čez <xliff:g id="COUNT">%d</xliff:g> sekund"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"čez 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"Čez toliko minut: <xliff:g id="COUNT">%d</xliff:g>."</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"čez 1 uro"</item> - <item quantity="other" msgid="547290677353727389">"čez <xliff:g id="COUNT">%d</xliff:g> ur"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"jutri"</item> - <item quantity="other" msgid="5109449375100953247">"čez <xliff:g id="COUNT">%d</xliff:g> dni"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"pred 1 sekundo"</item> - <item quantity="other" msgid="3699169366650930415">"Pred toliko sekundami: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"pred 1 minuto"</item> - <item quantity="other" msgid="851164968597150710">"Pred <xliff:g id="COUNT">%d</xliff:g> minutami"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"pred 1 uro"</item> - <item quantity="other" msgid="6889970745748538901">"Pred <xliff:g id="COUNT">%d</xliff:g> urami"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"včeraj"</item> - <item quantity="other" msgid="3453342639616481191">"Pred <xliff:g id="COUNT">%d</xliff:g> dnevi"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"čez 1 sekundo"</item> - <item quantity="other" msgid="5495880108825805108">"čez toliko sekund: <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"čez 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"čez <xliff:g id="COUNT">%d</xliff:g> minut"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"čez 1 uro"</item> - <item quantity="other" msgid="3705373766798013406">"čez <xliff:g id="COUNT">%d</xliff:g> ur"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"jutri"</item> - <item quantity="other" msgid="2973062968038355991">"čez <xliff:g id="COUNT">%d</xliff:g> dni"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"vsak <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"ob <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"leta <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index 6d1e793..8277f33 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> жели да омогући Истраживање додиром. Када је Истраживање додиром укључено, можете да чујете или видите описе ставке на коју сте ставили прст или да комуницирате са телефоном помоћу покрета."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Пре месец дана"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Пре месец дана"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Пре 1 секунде"</item> - <item quantity="other" msgid="3903706804349556379">"пре <xliff:g id="COUNT">%d</xliff:g> секунде(и)"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Пре једног минута"</item> - <item quantity="other" msgid="2176942008915455116">"пре <xliff:g id="COUNT">%d</xliff:g> минута"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Пре сат времена"</item> - <item quantity="other" msgid="2467273239587587569">"пре <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Прошлог месеца"</string> <string name="older" msgid="5211975022815554840">"Старије"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"јуче"</item> - <item quantity="other" msgid="2479586466153314633">"пре <xliff:g id="COUNT">%d</xliff:g> дана"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"за 1 секунду"</item> - <item quantity="other" msgid="1241926116443974687">"за <xliff:g id="COUNT">%d</xliff:g> секунде(и)"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"за 1 минут"</item> - <item quantity="other" msgid="3330713936399448749">"за <xliff:g id="COUNT">%d</xliff:g> минута"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"за 1 сат"</item> - <item quantity="other" msgid="547290677353727389">"за <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"сутра"</item> - <item quantity="other" msgid="5109449375100953247">"за <xliff:g id="COUNT">%d</xliff:g> дана"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Пре једне сек"</item> - <item quantity="other" msgid="3699169366650930415">"пре <xliff:g id="COUNT">%d</xliff:g> сек"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"Пре један мин"</item> - <item quantity="other" msgid="851164968597150710">"пре <xliff:g id="COUNT">%d</xliff:g> мин"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Пре сат времена"</item> - <item quantity="other" msgid="6889970745748538901">"пре <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"јуче"</item> - <item quantity="other" msgid="3453342639616481191">"пре <xliff:g id="COUNT">%d</xliff:g> дана"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"за 1 сек"</item> - <item quantity="other" msgid="5495880108825805108">"за <xliff:g id="COUNT">%d</xliff:g> сек"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"за 1 мин"</item> - <item quantity="other" msgid="4216113292706568726">"за <xliff:g id="COUNT">%d</xliff:g> мин"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"за 1 сат"</item> - <item quantity="other" msgid="3705373766798013406">"за <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"сутра"</item> - <item quantity="other" msgid="2973062968038355991">"за <xliff:g id="COUNT">%d</xliff:g> дана"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"дана <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"у <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"у <xliff:g id="YEAR">%s</xliff:g>."</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index 61b0a3d..f31ba4d 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vill aktivera Explore by Touch. När funktionen är aktiv kan du höra eller se beskrivningar av vad du har under fingret eller utföra gester för att göra saker med telefonen."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"för 1 månad sedan"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"För mer än en månad sedan"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"för 1 sekund sedan"</item> - <item quantity="other" msgid="3903706804349556379">"för <xliff:g id="COUNT">%d</xliff:g> sekunder sedan"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"för 1 minut sedan"</item> - <item quantity="other" msgid="2176942008915455116">"för <xliff:g id="COUNT">%d</xliff:g> minuter sedan"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"för 1 timme sedan"</item> - <item quantity="other" msgid="2467273239587587569">"för <xliff:g id="COUNT">%d</xliff:g> timmar sedan"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Föregående månad"</string> <string name="older" msgid="5211975022815554840">"Äldre"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"igår"</item> - <item quantity="other" msgid="2479586466153314633">"för <xliff:g id="COUNT">%d</xliff:g> dagar sedan"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"om 1 sekund"</item> - <item quantity="other" msgid="1241926116443974687">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"om 1 minut"</item> - <item quantity="other" msgid="3330713936399448749">"om <xliff:g id="COUNT">%d</xliff:g> minuter"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"om 1 timme"</item> - <item quantity="other" msgid="547290677353727389">"om <xliff:g id="COUNT">%d</xliff:g> timmar"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"imorgon"</item> - <item quantity="other" msgid="5109449375100953247">"om <xliff:g id="COUNT">%d</xliff:g> dagar"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"för 1 sek sedan"</item> - <item quantity="other" msgid="3699169366650930415">"för <xliff:g id="COUNT">%d</xliff:g> sekunder sedan"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"för 1 minut sedan"</item> - <item quantity="other" msgid="851164968597150710">"för <xliff:g id="COUNT">%d</xliff:g> minuter sedan"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"för 1 timme sedan"</item> - <item quantity="other" msgid="6889970745748538901">"för <xliff:g id="COUNT">%d</xliff:g> timmar sedan"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"igår"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dagar sedan"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"om 1 sekund"</item> - <item quantity="other" msgid="5495880108825805108">"om <xliff:g id="COUNT">%d</xliff:g> sek"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"om 1 minut"</item> - <item quantity="other" msgid="4216113292706568726">"om <xliff:g id="COUNT">%d</xliff:g> minuter"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"om 1 timme"</item> - <item quantity="other" msgid="3705373766798013406">"om <xliff:g id="COUNT">%d</xliff:g> timmar"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"imorgon"</item> - <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> dagar"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index 9a97e24..5e57cc1 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> inataka kuwezesha Kuchunguza kwa Kugusa. Wakati Kuchunguza kwa Kugusa kumewezeshwa, unaweza kusikia au kuona maelezo ya kilicho chini ya kidole chako au kutumia ishara ili kuingiliana na simu."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"Mwezi 1 uliopita"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Kabla ya mwezi 1 uliopita"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"Sekunde 1 iliopita"</item> - <item quantity="other" msgid="3903706804349556379">"sekunde <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"Dakika 1 iliyopita"</item> - <item quantity="other" msgid="2176942008915455116">"Dakika <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"Saa 1 iliyopita"</item> - <item quantity="other" msgid="2467273239587587569">"Saa <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Mwezi uliopita"</string> <string name="older" msgid="5211975022815554840">"Kuukuu zaidi"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"jana"</item> - <item quantity="other" msgid="2479586466153314633">"siku <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"kati ya sekunde 1"</item> - <item quantity="other" msgid="1241926116443974687">"kati ya sekunde <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"kati ya dakika 1"</item> - <item quantity="other" msgid="3330713936399448749">"baada ya dakika <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"kati ya saa 1"</item> - <item quantity="other" msgid="547290677353727389">"kati ya saa <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"kesho"</item> - <item quantity="other" msgid="5109449375100953247">"katika siku <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"Sekunde 1 iliyopita"</item> - <item quantity="other" msgid="3699169366650930415">"Sekunde <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"Dakika 1 iliyopita"</item> - <item quantity="other" msgid="851164968597150710">"Dakika <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"Saa 1 iliyopita"</item> - <item quantity="other" msgid="6889970745748538901">"Saa <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"jana"</item> - <item quantity="other" msgid="3453342639616481191">"siku <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"kati ya sekunde 1"</item> - <item quantity="other" msgid="5495880108825805108">"kati ya sekunde <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"baada ya dakika 1"</item> - <item quantity="other" msgid="4216113292706568726">"kati ya dakika<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"kati ya saa 1"</item> - <item quantity="other" msgid="3705373766798013406">"katika saa <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"kesho"</item> - <item quantity="other" msgid="2973062968038355991">"kati ya siku <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"tarehe <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"Saa <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"ndani ya <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml index 03ffc98..14a0e67 100644 --- a/core/res/res/values-ta-rIN/strings.xml +++ b/core/res/res/values-ta-rIN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"தொடுவதன் மூலம் அறிக என்பதை இயக்க <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> விரும்புகிறது. தொடுவதன் மூலம் அறிக என்பது இயக்கப்பட்டிருக்கும்போது, உங்கள் விரலுக்கு அடியில் இருப்பவையின் விளக்கங்களை நீங்கள் கேட்கவோ, பார்க்கவோ செய்யலாம் அல்லது மொபைலுடன் ஊடாட சைகைகளை மேற்கொள்ளலாம்."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 மாதத்திற்கு முன்பு"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 மாதத்திற்கு முன்பு"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 வினாடிக்கு முன்பு"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளுக்கு முன்பு"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 நிமிடம் முன்பு"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> நிமிடத்திற்கு முன்"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 மணிநேரம் முன்பு"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்திற்கு முன்பு"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"சென்ற மாதம்"</string> <string name="older" msgid="5211975022815554840">"பழையது"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"நேற்று"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> நாட்களுக்கு முன்பு"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 வினாடியில்"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளில்"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 நிமிடத்தில்"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> நிமிடங்களில்"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 மணிநேரத்தில்"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்தில்"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"நாளை"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> நாட்களில்"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 வினாடி முன்பு"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளுக்கு முன்பு"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 நிமிடம் முன்பு"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> நிமிடத்திற்கு முன்"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 மணிநேரம் முன்பு"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்திற்கு முன்பு"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"நேற்று"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> நாட்களுக்கு முன்பு"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 வினாடியில்"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளில்"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 நிமிடத்தில்"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> நிமிடங்களில்"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 மணிநேரத்தில்"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்தில்"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"நாளை"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> நாட்களில்"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> அன்று"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> இல்"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> இல்"</string> diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml index 2c80adb..72df68b 100644 --- a/core/res/res/values-te-rIN/strings.xml +++ b/core/res/res/values-te-rIN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> తాకడం ద్వారా విశ్లేషణను ప్రారంభించాలనుకుంటోంది. తాకడం ద్వారా విశ్లేషణ ఆన్ చేయబడినప్పుడు, మీరు మీ వేలి క్రింద ఉన్నవాటి యొక్క వివరణలను వినవచ్చు లేదా చూడవచ్చు లేదా ఫోన్తో పరస్పర చర్య చేయడానికి సంజ్ఞలు చేయవచ్చు."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 నెల క్రితం"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 నెలకు ముందు"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 సెకను క్రితం"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> సెకన్ల క్రితం"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 నిమిషం క్రితం"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> నిమిషాల క్రితం"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 గంట క్రితం"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> గంటల క్రితం"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"గత నెల"</string> <string name="older" msgid="5211975022815554840">"పాతది"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"నిన్న"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> రోజుల క్రితం"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 సెకనులో"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> సెకన్లలో"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 నిమిషంలో"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> నిమిషాల్లో"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 గంటలో"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> గంటల్లో"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"రేపు"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> రోజుల్లో"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 సెక క్రితం"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> సెక క్రితం"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 నిమి క్రితం"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> నిమి క్రితం"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 గంట క్రితం"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> గంటల క్రితం"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"నిన్న"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> రోజుల క్రితం"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 సెకనులో"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> సెకన్లలో"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 నిమిషంలో"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> నిమిషాల్లో"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 గంటలో"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> గంటల్లో"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"రేపు"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> రోజుల్లో"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>న"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>కి"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>లో"</string> diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml index bb972e4..eaf0827 100644 --- a/core/res/res/values-th/strings.xml +++ b/core/res/res/values-th/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ต้องการเปิดใช้งาน \"สำรวจโดยการแตะ\" เมื่อเปิดใช้งานแล้ว คุณสามารถฟังหรือดูคำอธิบายของสิ่งที่อยู่ใต้นิ้วของคุณ หรือใช้ท่าทางสัมผัสต่างๆ เพื่อโต้ตอบกับโทรศัพท์ได้"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 เดือนที่ผ่านมา"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ก่อน 1 เดือนที่แล้ว"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 วินาทีที่แล้ว"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> วินาทีที่แล้ว"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 นาทีที่ผ่านมา"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> นาทีที่ผ่านมา"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 ชั่วโมงที่ผ่านมา"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ชั่วโมงที่ผ่านมา"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"เดือนที่แล้ว"</string> <string name="older" msgid="5211975022815554840">"เก่ากว่า"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"เมื่อวาน"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> วันที่ผ่านมา"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"ใน 1 วินาที"</item> - <item quantity="other" msgid="1241926116443974687">"ใน <xliff:g id="COUNT">%d</xliff:g> วินาที"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"ใน 1 นาที"</item> - <item quantity="other" msgid="3330713936399448749">"ใน <xliff:g id="COUNT">%d</xliff:g> นาที"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"ใน 1 ชั่วโมง"</item> - <item quantity="other" msgid="547290677353727389">"ใน <xliff:g id="COUNT">%d</xliff:g> ชั่วโมง"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"พรุ่งนี้"</item> - <item quantity="other" msgid="5109449375100953247">"ใน <xliff:g id="COUNT">%d</xliff:g> วัน"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 วินาทีที่แล้ว"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> วินาทีที่ผ่านมา"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 นาทีที่ผ่านมา"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> นาทีที่ผ่านมา"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 ชั่วโมงที่ผ่านมา"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ชั่วโมงที่ผ่านมา"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"เมื่อวาน"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> วันที่ผ่านมา"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"ใน 1 วินาที"</item> - <item quantity="other" msgid="5495880108825805108">"ใน <xliff:g id="COUNT">%d</xliff:g> วินาที"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"ใน 1 นาที"</item> - <item quantity="other" msgid="4216113292706568726">"ใน <xliff:g id="COUNT">%d</xliff:g> นาที"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"ใน 1 ชั่วโมง"</item> - <item quantity="other" msgid="3705373766798013406">"ใน <xliff:g id="COUNT">%d</xliff:g> ชั่วโมง"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"พรุ่งนี้"</item> - <item quantity="other" msgid="2973062968038355991">"ใน <xliff:g id="COUNT">%d</xliff:g> วัน"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"ในวันที่ <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"ที่ <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"ใน <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml index 97dda67..707402d 100644 --- a/core/res/res/values-tl/strings.xml +++ b/core/res/res/values-tl/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Nais paganahin ng <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ang Galugarin sa pamamagitan ng pagpindot. Kapag naka-on ang Galugarin sa pamamagitan ng pagpindot, maaari mong marinig o makita ang mga paglalarawan ng nasa ilalim ng iyong daliri o maaari kang magsagawa ng mga galaw upang makipag-ugnayan sa telepono."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 buwan ang nakalipas"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Bago ang nakalipas na 1 buwan"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 segundo ang nakakalipas"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> (na) segundo ang nakalipas"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 minuto ang nakalipas"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> (na) minuto ang nakalipas"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 oras ang nakalipas"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> (na) oras ang nakalipas"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Nakaraang buwan"</string> <string name="older" msgid="5211975022815554840">"Mas luma"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"kahapon"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> (na) araw ang nakalipas"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"sa 1 segundo"</item> - <item quantity="other" msgid="1241926116443974687">"sa <xliff:g id="COUNT">%d</xliff:g> (na) segundo"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"sa 1 minuto"</item> - <item quantity="other" msgid="3330713936399448749">"sa <xliff:g id="COUNT">%d</xliff:g> (na) minuto"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"sa 1 oras"</item> - <item quantity="other" msgid="547290677353727389">"sa <xliff:g id="COUNT">%d</xliff:g> (na) oras"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"bukas"</item> - <item quantity="other" msgid="5109449375100953247">"sa <xliff:g id="COUNT">%d</xliff:g> (na) araw"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 segundo ang nakalipas"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> (na) segundo ang nakalipas"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 minuto ang nakalipas"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> (na) minuto ang nakalipas"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 oras ang nakalipas"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> (na) oras ang nakalipas"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"kahapon"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> (na) araw ang nakalipas"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"sa 1 seg"</item> - <item quantity="other" msgid="5495880108825805108">"sa <xliff:g id="COUNT">%d</xliff:g> (na) segundo"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"sa 1 min"</item> - <item quantity="other" msgid="4216113292706568726">"sa <xliff:g id="COUNT">%d</xliff:g> (na) minuto"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"sa 1 oras"</item> - <item quantity="other" msgid="3705373766798013406">"sa <xliff:g id="COUNT">%d</xliff:g> (na) oras"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"bukas"</item> - <item quantity="other" msgid="2973062968038355991">"sa <xliff:g id="COUNT">%d</xliff:g> (na) araw"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"sa <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"nang <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"sa <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index c0fd411..36f6f8f 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>, Dokunarak Keşfet özelliğini etkinleştirmek istiyor. Dokunarak Keşfet açık olduğunda parmağınızın altındaki öğelere ait açıklamaları duyabilir veya görebilir ya da telefonla etkileşimde bulunmak için birtakım hareketler yapabilirsiniz."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ay önce"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ay önce"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 saniye önce"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> saniye önce"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 dakika önce"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> dakika önce"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 saat önce"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> saat önce"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Son ay"</string> <string name="older" msgid="5211975022815554840">"Daha eski"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"dün"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> gün önce"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 saniye içinde"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> saniye içinde"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 dakika içinde"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> dakika içinde"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 saat içinde"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> saat içinde"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"yarın"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> gün içinde"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 saniye önce"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> saniye önce"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 dak. önce"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> dakika önce"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 saat önce"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> saat önce"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"dün"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> gün önce"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 san. içinde"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> saniye içinde"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 dak. içinde"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> dakika içinde"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 saat içinde"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> saat içinde"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"yarın"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> gün içinde"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> tarihinde"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> yılında"</string> diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml index 664976a..1768942 100644 --- a/core/res/res/values-uk/strings.xml +++ b/core/res/res/values-uk/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> хоче ввімкнути функцію дослідження дотиком. Увімкнувши функцію дослідження дотиком, можна чути або бачити опис елемента, розташованого під вашим пальцем, або виконувати жести для взаємодії з телефоном."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 міс. тому"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Раніше 1 місяця тому"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 сек. тому"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> сек. тому"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 хвилину тому"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> хв. тому"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 год. тому"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> год. тому"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Останній міс."</string> <string name="older" msgid="5211975022815554840">"Давніше"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"учора"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> дн. тому"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"через 1 сек."</item> - <item quantity="other" msgid="1241926116443974687">"через <xliff:g id="COUNT">%d</xliff:g> сек."</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"через 1 хв."</item> - <item quantity="other" msgid="3330713936399448749">"через <xliff:g id="COUNT">%d</xliff:g> хв."</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"через 1 год."</item> - <item quantity="other" msgid="547290677353727389">"через <xliff:g id="COUNT">%d</xliff:g> год."</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"завтра"</item> - <item quantity="other" msgid="5109449375100953247">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 сек. тому"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> сек. тому"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 хв. тому"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> хв. тому"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 годину тому"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> год. тому"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"учора"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> дн. тому"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"через 1 с."</item> - <item quantity="other" msgid="5495880108825805108">"через <xliff:g id="COUNT">%d</xliff:g> сек."</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"через 1 хв."</item> - <item quantity="other" msgid="4216113292706568726">"через <xliff:g id="COUNT">%d</xliff:g> хв."</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"через 1 год."</item> - <item quantity="other" msgid="3705373766798013406">"через <xliff:g id="COUNT">%d</xliff:g> год."</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"завтра"</item> - <item quantity="other" msgid="2973062968038355991">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"о <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"у <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml index 76cfe76..feecb77 100644 --- a/core/res/res/values-ur-rPK/strings.xml +++ b/core/res/res/values-ur-rPK/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ٹچ کرکے دریافت کریں کو فعال کرنا چاہتی ہے۔ ٹچ کرکے دریافت کریں کے آن ہو جانے پر، آپ کو اپنی انگلی کے نیچے موجود چیزوں کی تفصیلات دکھائی یا سنائی دے سکتی ہیں یا آپ فون کے ساتھ تعامل کرنے کیلئے اشارے انجام دے سکتے ہیں۔"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 مہینہ پہلے"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 مہینہ سے زیادہ پہلے"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 سیکنڈ پہلے"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ پہلے"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 منٹ پہلے"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> منٹ پہلے"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 گھنٹہ پہلے"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے پہلے"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"پچھلے مہینے"</string> <string name="older" msgid="5211975022815554840">"پرانا"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"گزشتہ کل"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> دن پہلے"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 سیکنڈ میں"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ میں"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 منٹ میں"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> منٹ میں"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 گھنٹہ میں"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے میں"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"آنے والا کل"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> دن میں"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 سیکنڈ پہلے"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ پہلے"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 منٹ پہلے"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> منٹ پہلے"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 گھنٹہ پہلے"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے پہلے"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"گزشتہ کل"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> دن پہلے"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 سیکنڈ میں"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ میں"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 منٹ میں"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> منٹ میں"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 گھنٹہ میں"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے میں"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"آنے والا کل"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> دن میں"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> کو"</string> <string name="preposition_for_time" msgid="5506831244263083793">"بوقت <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> میں"</string> diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml index 30164e1..721e9bc 100644 --- a/core/res/res/values-uz-rUZ/strings.xml +++ b/core/res/res/values-uz-rUZ/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> teginib o‘rganish xususiyatini yoqishni xohlamoqda. Bu xususiyat yoqilganda, barmog‘ingiz ostidagi elementlar ta‘rifini ko‘rishingiz yoki eshitishingiz mumkin yoki telefon bilan o‘zaro bog‘lanish uchun barmog‘ingiz bilan imo-ishorali harakatlarni bajaring."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 oy oldin"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 oydan oldinroq"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 soniya oldin"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> soniya oldin"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 daqiqa oldin"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> daqiqa oldin"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 soat oldin"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> soat oldin"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"O‘tgan oy"</string> <string name="older" msgid="5211975022815554840">"Eskiroq"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"kecha"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> kun oldin"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 soniyada"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> soniyada"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 daqiqada"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> daqiqada"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 soatda"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> soatda"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ertaga"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> kunda"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 soniya oldin"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> soniya oldin"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 daq. oldin"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> daq. oldin"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 soat oldin"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> soat oldin"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"kecha"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> kun oldin"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 soniya da"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> soniya da"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 daq. da"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> daq. da"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 soatda"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> soatda"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ertaga"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> kunda"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>da"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>da"</string> <string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>da"</string> diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml index 2bf3819..9f7118e 100644 --- a/core/res/res/values-vi/strings.xml +++ b/core/res/res/values-vi/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> muốn bật Khám phá bằng cách chạm. Khi Khám phá bằng cách chạm được bật, bạn có thể nghe hoặc xem mô tả dưới ngón tay bạn hoặc thực hiện cử chỉ để tương tác với điện thoại."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 tháng trước"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Trước 1 tháng trước"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 giây trước"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> giây trước"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 phút trước"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> phút trước"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 giờ trước"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> giờ trước"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Tháng trước"</string> <string name="older" msgid="5211975022815554840">"Cũ hơn"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"hôm qua"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ngày trước"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"trong 1 giây"</item> - <item quantity="other" msgid="1241926116443974687">"trong <xliff:g id="COUNT">%d</xliff:g> giây"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"trong 1 phút"</item> - <item quantity="other" msgid="3330713936399448749">"trong <xliff:g id="COUNT">%d</xliff:g> phút"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"trong 1 giờ"</item> - <item quantity="other" msgid="547290677353727389">"trong <xliff:g id="COUNT">%d</xliff:g> giờ"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"ngày mai"</item> - <item quantity="other" msgid="5109449375100953247">"trong <xliff:g id="COUNT">%d</xliff:g> ngày"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 giây trước"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> giây trước"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 phút trước"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> phút trước"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 giờ trước"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> giờ trước"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"hôm qua"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ngày trước"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"trong 1 giây"</item> - <item quantity="other" msgid="5495880108825805108">"trong <xliff:g id="COUNT">%d</xliff:g> giây"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"trong 1 phút"</item> - <item quantity="other" msgid="4216113292706568726">"trong <xliff:g id="COUNT">%d</xliff:g> phút"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"trong 1 giờ"</item> - <item quantity="other" msgid="3705373766798013406">"trong <xliff:g id="COUNT">%d</xliff:g> giờ"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"ngày mai"</item> - <item quantity="other" msgid="2973062968038355991">"trong <xliff:g id="COUNT">%d</xliff:g> ngày"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"vào <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"vào lúc <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"trong <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index e280503..4d8db93 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>想要启用“触摸浏览”。“触摸浏览”启用后,您可以听到或看到所触摸内容的说明,还可以通过手势操作与手机互动。"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 个月前"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 个月前"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1秒前"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1分钟前"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g>分钟前"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1小时前"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>小时前"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"上个月"</string> <string name="older" msgid="5211975022815554840">"往前"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"昨天"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>天前"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1秒后"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g>秒后"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1分钟后"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>分钟后"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1小时后"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g>小时后"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"明天"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> 天后"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1秒前"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1分钟前"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g>分钟前"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1小时前"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g>小时前"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"昨天"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g>天前"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1秒后"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g>秒后"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1分钟后"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g>分钟后"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1小时后"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g>小时后"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"明天"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> 天后"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"日期:<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"年份:<xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml index 83ae8f3..d08a416 100644 --- a/core/res/res/values-zh-rHK/strings.xml +++ b/core/res/res/values-zh-rHK/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> 需要啟用「輕觸探索」。開啟這項功能時,系統會在您的手指輕觸螢幕上的物件時顯示或朗讀說明,您也可以執行手勢來與手機互動。"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 個月前"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 個月前"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 秒前"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> 秒前"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 分鐘前"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> 分鐘前"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 小時前"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"上個月"</string> <string name="older" msgid="5211975022815554840">"較舊"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"昨天"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 秒後"</item> - <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> 秒後"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 分鐘後"</item> - <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> 分鐘後"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 小時後"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> 小時後"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"明天"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> 天後"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 秒前"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> 秒前"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 分鐘前"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> 分鐘前"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 小時前"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"昨天"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 秒後"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> 秒後"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 分鐘後"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> 分鐘後"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 小時後"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> 小時後"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"明天"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> 天後"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"於 <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"在 <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"於 <xliff:g id="YEAR">%s</xliff:g> 年"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index c9e5364..24ccc9a 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> 需要啟用「輕觸探索」。開啟這項功能時,系統會在您的手指輕觸螢幕上的物件時顯示或朗讀說明,您也可以執行手勢來與手機互動。"</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"1 個月以前"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 個月前"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 秒以前"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> 秒前"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 分鐘以前"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> 分鐘前"</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 小時以前"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"上個月"</string> <string name="older" msgid="5211975022815554840">"較舊"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"昨天"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"1 秒內"</item> - <item quantity="other" msgid="1241926116443974687">"在 <xliff:g id="COUNT">%d</xliff:g> 秒內"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"1 分鐘內"</item> - <item quantity="other" msgid="3330713936399448749">"在 <xliff:g id="COUNT">%d</xliff:g> 分鐘內"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"1 小時內"</item> - <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> 小時內"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"明天"</item> - <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> 天內"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 秒以前"</item> - <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> 秒以前"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 分鐘以前"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> 分鐘以前"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 小時以前"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"昨天"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"1 秒內"</item> - <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> 秒內"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"1 分鐘內"</item> - <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> 分鐘內"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"1 小時內"</item> - <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> 小時內"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"明天"</item> - <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> 天內"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"於 <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"於<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"於 <xliff:g id="YEAR">%s</xliff:g> 年"</string> diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml index 77cfdde..881b544 100644 --- a/core/res/res/values-zu/strings.xml +++ b/core/res/res/values-zu/strings.xml @@ -1131,73 +1131,9 @@ <string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"I-<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ifuna ukunika amandla i-Explore by Touch. Uma i-Explore by Touch ikhanya, ungezwa noma ubone izincazelo ezingaphansi komunwe wakho noma wenze izenzo zomzimba ukuze uxhumane nefoni."</string> <string name="oneMonthDurationPast" msgid="7396384508953779925">"inyanga engu-1 edlule"</string> <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Ngaphambi kwenyanga engu-1 edlule"</string> - <plurals name="num_seconds_ago"> - <item quantity="one" msgid="4869870056547896011">"1 isekhondi eledlule"</item> - <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> amasekhondi adlule"</item> - </plurals> - <plurals name="num_minutes_ago"> - <item quantity="one" msgid="3306787433088810191">"1 iminithi elidlule"</item> - <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> amaminithi adlule.."</item> - </plurals> - <plurals name="num_hours_ago"> - <item quantity="one" msgid="9150797944610821849">"1 ihora eledlule"</item> - <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> amahora adlule"</item> - </plurals> <!-- no translation found for last_num_days:one (7555846096746489821) --> <string name="last_month" msgid="3959346739979055432">"Inyanga edlule"</string> <string name="older" msgid="5211975022815554840">"Okudala kakhulu"</string> - <plurals name="num_days_ago"> - <item quantity="one" msgid="861358534398115820">"Izolo"</item> - <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> izinsuku ezedlule"</item> - </plurals> - <plurals name="in_num_seconds"> - <item quantity="one" msgid="2729745560954905102">"esekhondini elingu-1"</item> - <item quantity="other" msgid="1241926116443974687">"emasekhondini angu-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_minutes"> - <item quantity="one" msgid="8793095251325200395">"eminithini engu-1"</item> - <item quantity="other" msgid="3330713936399448749">"emaminithini angu-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_hours"> - <item quantity="one" msgid="7164353342477769999">"ehoreni elingu-1"</item> - <item quantity="other" msgid="547290677353727389">"emahoreni angu- <xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="in_num_days"> - <item quantity="one" msgid="5413088743009839518">"Kusasa"</item> - <item quantity="other" msgid="5109449375100953247">"ezinsukwini ezingu-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one" msgid="1849036840200069118">"1 isekhondi edlule"</item> - <item quantity="other" msgid="3699169366650930415">"amasekhondi angu-<xliff:g id="COUNT">%d</xliff:g> edlule"</item> - </plurals> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one" msgid="6361490147113871545">"1 iminithi eledlule"</item> - <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> amaminithi adlule"</item> - </plurals> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one" msgid="4796212039724722116">"1 ihora eledlule"</item> - <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> amahora adlule"</item> - </plurals> - <plurals name="abbrev_num_days_ago"> - <item quantity="one" msgid="8463161711492680309">"Izolo"</item> - <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> izinsuku ezedlule"</item> - </plurals> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one" msgid="5842225370795066299">"esekhondini elingu-1"</item> - <item quantity="other" msgid="5495880108825805108">"emasekhondini angu-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one" msgid="562786149928284878">"eminithini engu-1"</item> - <item quantity="other" msgid="4216113292706568726">"emaminithini angu-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_hours"> - <item quantity="one" msgid="3274708118124045246">"ehoreni elingu-1"</item> - <item quantity="other" msgid="3705373766798013406">"emahoreni angu-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> - <plurals name="abbrev_in_num_days"> - <item quantity="one" msgid="2178576254385739855">"Kusasa"</item> - <item quantity="other" msgid="2973062968038355991">"ezinsukwini ezing-<xliff:g id="COUNT">%d</xliff:g>"</item> - </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"ngo-<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"e-<xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"phakathi- <xliff:g id="YEAR">%s</xliff:g>"</string> diff --git a/core/res/res/values/bools.xml b/core/res/res/values/bools.xml index 457131a..7c63950 100644 --- a/core/res/res/values/bools.xml +++ b/core/res/res/values/bools.xml @@ -25,4 +25,8 @@ <bool name="show_ongoing_ime_switcher">true</bool> <bool name="action_bar_expanded_action_views_exclusive">true</bool> <bool name="target_honeycomb_needs_options_menu">true</bool> + + <!-- Whether to allow vertically stacked button bars. This is disabled for + configurations with a small (e.g. less than 320dp) screen height. --> + <bool name="allow_stacked_button_bar">false</bool> </resources> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index f2d9de8..4c25e7d 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -632,6 +632,14 @@ Any other values will have surprising consequences. --> <integer name="config_defaultUiModeType">1</integer> + <!-- Control the default night mode to use when there is no other mode override set. + One of the following values (see UiModeManager.java): + 0 - MODE_NIGHT_AUTO + 1 - MODE_NIGHT_NO + 2 - MODE_NIGHT_YES + --> + <integer name="config_defaultNightMode">1</integer> + <!-- Indicate whether to allow the device to suspend when the screen is off due to the proximity sensor. This resource should only be set to true if the sensor HAL correctly handles the proximity sensor as a wake-up source. diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 68a3493..bec224e 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -304,6 +304,9 @@ <!-- Touch slop for the global toggle accessibility gesture --> <dimen name="accessibility_touch_slop">80dip</dimen> + <!-- Width of the outline stroke used by the accessibility screen magnification indicator --> + <dimen name="accessibility_magnification_indicator_width">4dip</dimen> + <!-- Width of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> <dimen name="keyguard_security_width">320dp</dimen> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index e2a0ec9..3ac7374 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2617,4 +2617,20 @@ <public type="style" name="Widget.Material.Button.Colored" /> + <public type="style" name="Theme.Material.DayNight" /> + <public type="style" name="Theme.Material.DayNight.DarkActionBar" /> + <public type="style" name="Theme.Material.DayNight.Dialog" /> + <public type="style" name="Theme.Material.DayNight.Dialog.Alert" /> + <public type="style" name="Theme.Material.DayNight.Dialog.MinWidth" /> + <public type="style" name="Theme.Material.DayNight.Dialog.NoActionBar" /> + <public type="style" name="Theme.Material.DayNight.Dialog.NoActionBar.MinWidth" /> + <public type="style" name="Theme.Material.DayNight.Dialog.Presentation" /> + <public type="style" name="Theme.Material.DayNight.DialogWhenLarge" /> + <public type="style" name="Theme.Material.DayNight.DialogWhenLarge.NoActionBar" /> + <public type="style" name="Theme.Material.DayNight.NoActionBar" /> + <public type="style" name="Theme.Material.DayNight.NoActionBar.Fullscreen" /> + <public type="style" name="Theme.Material.DayNight.NoActionBar.Overscan" /> + <public type="style" name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" /> + <public type="style" name="Theme.Material.DayNight.Panel" /> + </resources> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 9946ce8..ff03ca9 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3380,24 +3380,6 @@ <!-- String used to display the date. This is the string to say something happened more than 1 month ago. --> <string name="beforeOneMonthDurationPast">Before 1 month ago</string> - <!-- This is used to express that something occurred some number of seconds in the past (e.g., 5 seconds ago). --> - <plurals name="num_seconds_ago"> - <item quantity="one">1 second ago</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> seconds ago</item> - </plurals> - - <!-- This is used to express that something occurred some number of minutes in the past (e.g., 5 minutes ago). --> - <plurals name="num_minutes_ago"> - <item quantity="one">1 minute ago</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> minutes ago</item> - </plurals> - - <!-- This is used to express that something occurred some number of hours in the past (e.g., 5 hours ago). --> - <plurals name="num_hours_ago"> - <item quantity="one">1 hour ago</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> hours ago</item> - </plurals> - <!-- This is used to express that something occurred within the last X days (e.g., Last 7 days). --> <plurals name="last_num_days"> <item quantity="one">Last <xliff:g id="count">%d</xliff:g> day</item> @@ -3410,84 +3392,6 @@ <!-- This is used to express that something happened longer ago than the previous options --> <string name="older">Older</string> - <!-- This is used to express that something occurred some number of days in the past (e.g., 5 days ago). --> - <plurals name="num_days_ago"> - <item quantity="one">yesterday</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> days ago</item> - </plurals> - - <!-- This is used to express that something will occur some number of seconds in the future (e.g., in 5 seconds). --> - <plurals name="in_num_seconds"> - <item quantity="one">in 1 second</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> seconds</item> - </plurals> - - <!-- This is used to express that something will occur some number of minutes in the future (e.g., in 5 minutes). --> - <plurals name="in_num_minutes"> - <item quantity="one">in 1 minute</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> minutes</item> - </plurals> - - <!-- This is used to express that something will occur some number of hours in the future (e.g., in 5 hours). --> - <plurals name="in_num_hours"> - <item quantity="one">in 1 hour</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> hours</item> - </plurals> - - <!-- This is used to express that something will occur some number of days in the future (e.g., in 5 days). --> - <plurals name="in_num_days"> - <item quantity="one">tomorrow</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> days</item> - </plurals> - - <!-- This is used to express that something occurred some number of abbreviated seconds in the past (e.g., 5 secs ago). --> - <plurals name="abbrev_num_seconds_ago"> - <item quantity="one">1 sec ago</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> secs ago</item> - </plurals> - - <!-- This is used to express that something occurred some number of abbreviated minutes in the past (e.g., 5 mins ago). --> - <plurals name="abbrev_num_minutes_ago"> - <item quantity="one">1 min ago</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> mins ago</item> - </plurals> - - <!-- This is used to express that something occurred some number of abbreviated hours in the past (e.g., 5 hrs ago). --> - <plurals name="abbrev_num_hours_ago"> - <item quantity="one">1 hour ago</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> hours ago</item> - </plurals> - - <!-- This is used to express that something occurred some number of abbreviated days in the past (e.g., 5 days ago). --> - <plurals name="abbrev_num_days_ago"> - <item quantity="one">yesterday</item> - <item quantity="other"><xliff:g id="count">%d</xliff:g> days ago</item> - </plurals> - - <!-- This is used to express that something will occur some number of abbreviated seconds in the future (e.g., in 5 secs). --> - <plurals name="abbrev_in_num_seconds"> - <item quantity="one">in 1 sec</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> secs</item> - </plurals> - - <!-- This is used to express that something will occur some number of abbreviated minutes in the future (e.g., in 5 mins). --> - <plurals name="abbrev_in_num_minutes"> - <item quantity="one">in 1 min</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> mins</item> - </plurals> - - <!-- This is used to express that something will occur some number of abbreviated hours in the future (e.g., in 5 hrs). --> - <plurals name="abbrev_in_num_hours"> - <item quantity="one">in 1 hour</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> hours</item> - </plurals> - - <!-- This is used to express that something will occur some number of abbreviated days in the future (e.g., in 5 days). --> - <plurals name="abbrev_in_num_days"> - <item quantity="one">tomorrow</item> - <item quantity="other">in <xliff:g id="count">%d</xliff:g> days</item> - </plurals> - <!-- String used to display the date. Preposition for date display ("on May 29") --> <string name="preposition_for_date">on <xliff:g id="date" example="May 29">%s</xliff:g></string> <!-- String used to display the date. Preposition for time display ("at 2:33am") --> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 813de7c..84c839c 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -412,6 +412,7 @@ <java-symbol type="dimen" name="notification_badge_size" /> <java-symbol type="dimen" name="immersive_mode_cling_width" /> <java-symbol type="dimen" name="circular_display_mask_offset" /> + <java-symbol type="dimen" name="accessibility_magnification_indicator_width" /> <java-symbol type="string" name="add_account_button_label" /> <java-symbol type="string" name="addToDictionary" /> @@ -1057,27 +1058,11 @@ <java-symbol type="string" name="config_ethernet_tcp_buffers" /> <java-symbol type="string" name="config_wifi_tcp_buffers" /> - <java-symbol type="plurals" name="abbrev_in_num_days" /> - <java-symbol type="plurals" name="abbrev_in_num_hours" /> - <java-symbol type="plurals" name="abbrev_in_num_minutes" /> - <java-symbol type="plurals" name="abbrev_in_num_seconds" /> - <java-symbol type="plurals" name="abbrev_num_days_ago" /> - <java-symbol type="plurals" name="abbrev_num_hours_ago" /> - <java-symbol type="plurals" name="abbrev_num_minutes_ago" /> - <java-symbol type="plurals" name="abbrev_num_seconds_ago" /> <java-symbol type="plurals" name="duration_hours" /> <java-symbol type="plurals" name="duration_minutes" /> <java-symbol type="plurals" name="duration_seconds" /> - <java-symbol type="plurals" name="in_num_days" /> - <java-symbol type="plurals" name="in_num_hours" /> - <java-symbol type="plurals" name="in_num_minutes" /> - <java-symbol type="plurals" name="in_num_seconds" /> <java-symbol type="plurals" name="last_num_days" /> <java-symbol type="plurals" name="matches_found" /> - <java-symbol type="plurals" name="num_days_ago" /> - <java-symbol type="plurals" name="num_hours_ago" /> - <java-symbol type="plurals" name="num_minutes_ago" /> - <java-symbol type="plurals" name="num_seconds_ago" /> <java-symbol type="plurals" name="restr_pin_countdown" /> <java-symbol type="plurals" name="pinpuk_attempts" /> @@ -2161,4 +2146,11 @@ <java-symbol type="string" name="usb_midi_peripheral_manufacturer_name" /> <java-symbol type="string" name="usb_midi_peripheral_model_name" /> + + <java-symbol type="bool" name="allow_stacked_button_bar" /> + <java-symbol type="id" name="spacer" /> + + <java-symbol type="xml" name="bookmarks" /> + + <java-symbol type="integer" name="config_defaultNightMode" /> </resources> diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml index 2b8ed5f..57041fd 100644 --- a/core/res/res/values/themes_material.xml +++ b/core/res/res/values/themes_material.xml @@ -1238,8 +1238,7 @@ please see themes_device_defaults.xml. </style> <!-- Default theme for Settings and activities launched from Settings. --> - <style name="Theme.Material.Settings" parent="Theme.Material.Light.DarkActionBar"> - <item name="colorBackground">@color/white</item> + <style name="Theme.Material.Settings" parent="Theme.Material.DayNight.DarkActionBar"> <item name="colorPrimary">@color/material_blue_grey_900</item> <item name="colorPrimaryDark">@color/material_blue_grey_950</item> <item name="colorAccent">@color/material_deep_teal_500</item> @@ -1251,8 +1250,7 @@ please see themes_device_defaults.xml. <item name="panelMenuListTheme">@style/Theme.Material.Settings.CompactMenu</item> </style> - <style name="Theme.Material.Settings.BaseDialog" parent="Theme.Material.Light.BaseDialog"> - <item name="colorBackground">@color/white</item> + <style name="Theme.Material.Settings.BaseDialog" parent="Theme.Material.DayNight.BaseDialog"> <item name="colorPrimary">@color/material_blue_grey_900</item> <item name="colorPrimaryDark">@color/material_blue_grey_950</item> <item name="colorAccent">@color/material_deep_teal_500</item> @@ -1260,8 +1258,7 @@ please see themes_device_defaults.xml. <style name="Theme.Material.Settings.Dialog" parent="Theme.Material.Settings.BaseDialog" /> - <style name="Theme.Material.Settings.Dialog.BaseAlert" parent="Theme.Material.Light.Dialog.BaseAlert"> - <item name="colorBackground">@color/white</item> + <style name="Theme.Material.Settings.Dialog.BaseAlert" parent="Theme.Material.DayNight.Dialog.BaseAlert"> <item name="colorPrimary">@color/material_blue_grey_900</item> <item name="colorPrimaryDark">@color/material_blue_grey_950</item> <item name="colorAccent">@color/material_deep_teal_500</item> @@ -1269,22 +1266,19 @@ please see themes_device_defaults.xml. <style name="Theme.Material.Settings.Dialog.Alert" parent="Theme.Material.Settings.Dialog.BaseAlert" /> - <style name="Theme.Material.Settings.Dialog.Presentation" parent="Theme.Material.Light.Dialog.Presentation"> - <item name="colorBackground">@color/white</item> + <style name="Theme.Material.Settings.Dialog.Presentation" parent="Theme.Material.DayNight.Dialog.Presentation"> <item name="colorPrimary">@color/material_blue_grey_900</item> <item name="colorPrimaryDark">@color/material_blue_grey_950</item> <item name="colorAccent">@color/material_deep_teal_500</item> </style> - <style name="Theme.Material.Settings.SearchBar" parent="Theme.Material.Light.SearchBar"> - <item name="colorBackground">@color/white</item> + <style name="Theme.Material.Settings.SearchBar" parent="Theme.Material.DayNight.SearchBar"> <item name="colorPrimary">@color/material_blue_grey_900</item> <item name="colorPrimaryDark">@color/material_blue_grey_950</item> <item name="colorAccent">@color/material_deep_teal_500</item> </style> - <style name="Theme.Material.Settings.CompactMenu" parent="Theme.Material.Light.CompactMenu"> - <item name="colorBackground">@color/white</item> + <style name="Theme.Material.Settings.CompactMenu" parent="Theme.Material.DayNight.CompactMenu"> <item name="colorPrimary">@color/material_blue_grey_900</item> <item name="colorPrimaryDark">@color/material_blue_grey_950</item> <item name="colorAccent">@color/material_deep_teal_500</item> diff --git a/core/res/res/values/themes_material_daynight.xml b/core/res/res/values/themes_material_daynight.xml new file mode 100644 index 0000000..5d9b860 --- /dev/null +++ b/core/res/res/values/themes_material_daynight.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> + +<!-- +=============================================================== + PLEASE READ +=============================================================== + +The Material themes must not be modified in order to pass CTS. +Many related themes and styles depend on other values defined in this file. +If you would like to provide custom themes and styles for your device, +please see themes_device_defaults.xml. + +=============================================================== + PLEASE READ +=============================================================== + --> +<resources> + + <!-- Material theme (day/night vesion) for activities. --> + <style name="Theme.Material.DayNight" parent="Theme.Material.Light" /> + + <!-- Variant of Material.DayNight that has a solid (opaque) action bar + with an inverse color profile. The dark action bar sharply stands out against + the light content (when applicable). --> + <style name="Theme.Material.DayNight.DarkActionBar" parent="Theme.Material.Light.DarkActionBar" /> + + <!-- Variant of Material.DayNight with no action bar. --> + <style name="Theme.Material.DayNight.NoActionBar" parent="Theme.Material.Light.NoActionBar" /> + + <!-- Variant of Material.DayNight that has no title bar and fills + the entire screen. This theme + sets {@link android.R.attr#windowFullscreen} to true. --> + <style name="Theme.Material.DayNight.NoActionBar.Fullscreen" parent="Theme.Material.Light.NoActionBar.Fullscreen" /> + + <!-- Variant of Material.DayNight that has no title bar and fills + the entire screen and extends into the display overscan region. This theme + sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan} + to true. --> + <style name="Theme.Material.DayNight.NoActionBar.Overscan" parent="Theme.Material.Light.NoActionBar.Overscan" /> + + <!-- Variant of Material.DayNight that has no title bar and translucent + system decor. This theme sets {@link android.R.attr#windowTranslucentStatus} and + {@link android.R.attr#windowTranslucentNavigation} to true. --> + <style name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" parent="Theme.Material.Light.NoActionBar.TranslucentDecor" /> + + <!-- Default Material.DayNight theme for panel windows. This removes all extraneous + window decorations, so you basically have an empty rectangle in which + to place your content. It makes the window floating, with a transparent + background, and turns off dimming behind the window. --> + <style name="Theme.Material.DayNight.Panel" parent="Theme.Material.Light.Panel" /> + + <!-- Material theme (day/night vesion) for dialog windows and activities, + which is used by the {@link android.app.Dialog} class. This changes + the window to be floating (not fill the entire screen), and puts a + frame around its contents. You can set this theme on an activity if + you would like to make an activity that looks like a Dialog. --> + <style name="Theme.Material.DayNight.Dialog" parent="Theme.Material.DayNight.BaseDialog" /> + <style name="Theme.Material.DayNight.BaseDialog" parent="Theme.Material.Light.BaseDialog" /> + + <!-- Variant of Theme.Material.DayNight.Dialog that has a nice minimum width for + a regular dialog. --> + <style name="Theme.Material.DayNight.Dialog.MinWidth" parent="Theme.Material.Light.Dialog.MinWidth" /> + + <!-- Variant of Theme.Material.DayNight.Dialog that does not include a title bar. --> + <style name="Theme.Material.DayNight.Dialog.NoActionBar" parent="Theme.Material.Light.Dialog.NoActionBar" /> + + <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a nice minimum width for + a regular dialog. --> + <style name="Theme.Material.DayNight.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Light.Dialog.NoActionBar.MinWidth" /> + + <!-- Variant of Theme.Material.DayNight.Dialog that has a fixed size. --> + <style name="Theme.Material.DayNight.Dialog.FixedSize" parent="Theme.Material.Light.Dialog.FixedSize" /> + + <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a fixed size. --> + <style name="Theme.Material.DayNight.Dialog.NoActionBar.FixedSize" parent="Theme.Material.Light.Dialog.NoActionBar.FixedSize" /> + + <!-- Theme for a window that will be displayed either full-screen on + smaller screens (small, normal) or as a dialog on larger screens + (large, xlarge). --> + <style name="Theme.Material.DayNight.DialogWhenLarge" parent="Theme.Material.Light.DialogWhenLarge" /> + + <!-- Theme for a window without an action bar that will be displayed either full-screen + on smaller screens (small, normal) or as a dialog on larger screens + (large, xlarge). --> + <style name="Theme.Material.DayNight.DialogWhenLarge.NoActionBar" parent="Theme.Material.Light.DialogWhenLarge.NoActionBar" /> + + <!-- Theme for a presentation window on a secondary display. --> + <style name="Theme.Material.DayNight.Dialog.Presentation" parent="Theme.Material.Light.Dialog.Presentation" /> + + <!-- Material user theme for alert dialog windows, which is used by the + {@link android.app.AlertDialog} class. --> + <style name="Theme.Material.DayNight.Dialog.Alert" parent="Theme.Material.DayNight.Dialog.BaseAlert" /> + <style name="Theme.Material.DayNight.Dialog.BaseAlert" parent="Theme.Material.Light.Dialog.BaseAlert" /> + + <style name="Theme.Material.DayNight.SearchBar" parent="Theme.Material.Light.SearchBar" /> + <style name="Theme.Material.DayNight.CompactMenu" parent="Theme.Material.Light.CompactMenu" /> + +</resources> diff --git a/core/res/res/xml/bookmarks.xml b/core/res/res/xml/bookmarks.xml new file mode 100644 index 0000000..454f456 --- /dev/null +++ b/core/res/res/xml/bookmarks.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<!-- + Default system bookmarks for AOSP. + Bookmarks for vendor apps should be added to a bookmarks resource overlay; not here. + + Typical shortcuts (not necessarily defined here): + 'a': Calculator + 'b': Browser + 'c': Contacts + 'e': Email + 'g': GMail + 'l': Calendar + 'm': Maps + 'p': Music + 's': SMS + 't': Talk + 'y': YouTube +--> +<bookmarks> + <bookmark + category="android.intent.category.APP_CALCULATOR" + shortcut="a" /> + <bookmark + category="android.intent.category.APP_BROWSER" + shortcut="b" /> + <bookmark + category="android.intent.category.APP_CONTACTS" + shortcut="c" /> + <bookmark + category="android.intent.category.APP_EMAIL" + shortcut="e" /> + <bookmark + category="android.intent.category.APP_CALENDAR" + shortcut="l" /> + <bookmark + category="android.intent.category.APP_MAPS" + shortcut="m" /> + <bookmark + category="android.intent.category.APP_MUSIC" + shortcut="p" /> + <bookmark + category="android.intent.category.APP_MESSAGING" + shortcut="s" /> +</bookmarks> diff --git a/core/tests/bandwidthtests/Android.mk b/core/tests/bandwidthtests/Android.mk index 6871efd..cb44721 100644 --- a/core/tests/bandwidthtests/Android.mk +++ b/core/tests/bandwidthtests/Android.mk @@ -22,9 +22,9 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := \ $(call all-java-files-under, src) -LOCAL_JAVA_LIBRARIES := android.test.runner +LOCAL_JAVA_LIBRARIES := android.test.runner org.apache.http.legacy LOCAL_PACKAGE_NAME := BandwidthTests include $(BUILD_PACKAGE) -include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/core/tests/bandwidthtests/AndroidManifest.xml b/core/tests/bandwidthtests/AndroidManifest.xml index 24221bc..d0a6198 100644 --- a/core/tests/bandwidthtests/AndroidManifest.xml +++ b/core/tests/bandwidthtests/AndroidManifest.xml @@ -19,6 +19,7 @@ <application > <uses-library android:name="android.test.runner" /> + <uses-library android:name="org.apache.http.legacy" android:required="false" /> </application> <instrumentation diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk index 6bdeaf0..79a0b0c 100644 --- a/core/tests/coretests/Android.mk +++ b/core/tests/coretests/Android.mk @@ -24,7 +24,7 @@ LOCAL_SRC_FILES := \ LOCAL_DX_FLAGS := --core-library LOCAL_AAPT_FLAGS = -0 dat -0 gld LOCAL_STATIC_JAVA_LIBRARIES := core-tests-support android-common frameworks-core-util-lib mockwebserver guava littlemock mockito-target -LOCAL_JAVA_LIBRARIES := android.test.runner conscrypt telephony-common +LOCAL_JAVA_LIBRARIES := android.test.runner conscrypt telephony-common org.apache.http.legacy LOCAL_PACKAGE_NAME := FrameworksCoreTests LOCAL_CERTIFICATE := platform diff --git a/core/tests/coretests/AndroidManifest.xml b/core/tests/coretests/AndroidManifest.xml index 226717e..bfaea8f 100644 --- a/core/tests/coretests/AndroidManifest.xml +++ b/core/tests/coretests/AndroidManifest.xml @@ -112,6 +112,7 @@ <application android:theme="@style/Theme"> <uses-library android:name="android.test.runner" /> + <uses-library android:name="org.apache.http.legacy" android:required="false" /> <activity android:name="android.view.ViewAttachTestActivity" android:label="View Attach Test"> <intent-filter> <action android:name="android.intent.action.MAIN" /> diff --git a/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java b/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java index f9b69a0..32b4557 100644 --- a/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java +++ b/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java @@ -16,7 +16,6 @@ package android.content.pm; -import android.content.Context; import android.content.res.Resources; import android.os.FileUtils; import android.os.Parcel; @@ -30,6 +29,7 @@ import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -44,6 +44,12 @@ import java.util.Set; * Tests for {@link android.content.pm.RegisteredServicesCache} */ public class RegisteredServicesCacheTest extends AndroidTestCase { + private static final int U0 = 0; + private static final int U1 = 1; + private static final int UID1 = 1; + private static final int UID2 = 2; + // Represents UID of a system image process + private static final int SYSTEM_IMAGE_UID = 20; private final ResolveInfo r1 = new ResolveInfo(); private final ResolveInfo r2 = new ResolveInfo(); @@ -51,6 +57,7 @@ public class RegisteredServicesCacheTest extends AndroidTestCase { private final TestServiceType t2 = new TestServiceType("t2", "value2"); private File mDataDir; private File mSyncDir; + private List<UserInfo> mUsers; @Override protected void setUp() throws Exception { @@ -58,97 +65,152 @@ public class RegisteredServicesCacheTest extends AndroidTestCase { File cacheDir = mContext.getCacheDir(); mDataDir = new File(cacheDir, "testServicesCache"); FileUtils.deleteContents(mDataDir); - mSyncDir = new File(mDataDir, "system/registered_services"); + mSyncDir = new File(mDataDir, "system/"+RegisteredServicesCache.REGISTERED_SERVICES_DIR); mSyncDir.mkdirs(); + mUsers = new ArrayList<>(); + mUsers.add(new UserInfo(0, "Owner", UserInfo.FLAG_ADMIN)); + mUsers.add(new UserInfo(1, "User1", 0)); } public void testGetAllServicesHappyPath() { - TestServicesCache cache = new TestServicesCache(mContext, mDataDir); - cache.addServiceForQuerying(0, r1, new RegisteredServicesCache.ServiceInfo<>(t1, null, 1)); - cache.addServiceForQuerying(0, r2, new RegisteredServicesCache.ServiceInfo<>(t2, null, 2)); - assertEquals(2, cache.getAllServicesSize(0)); - assertEquals(2, cache.getPersistentServicesSize(0)); - File file = new File(mSyncDir, TestServicesCache.SERVICE_INTERFACE + ".xml"); - assertTrue("File should be created at " + file, file.length() > 0); + TestServicesCache cache = new TestServicesCache(); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2)); + assertEquals(2, cache.getAllServicesSize(U0)); + assertEquals(2, cache.getPersistentServicesSize(U0)); + assertNotEmptyFileCreated(cache, U0); // Make sure all services can be loaded from xml - cache = new TestServicesCache(mContext, mDataDir); - assertEquals(2, cache.getPersistentServicesSize(0)); + cache = new TestServicesCache(); + assertEquals(2, cache.getPersistentServicesSize(U0)); } public void testGetAllServicesReplaceUid() { - TestServicesCache cache = new TestServicesCache(mContext, mDataDir); - cache.addServiceForQuerying(0, r1, new RegisteredServicesCache.ServiceInfo<>(t1, null, 1)); - cache.addServiceForQuerying(0, r2, new RegisteredServicesCache.ServiceInfo<>(t2, null, 2)); - cache.getAllServices(0); + TestServicesCache cache = new TestServicesCache(); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2)); + cache.getAllServices(U0); // Invalidate cache and clear update query results - cache.invalidateCache(0); + cache.invalidateCache(U0); cache.clearServicesForQuerying(); - cache.addServiceForQuerying(0, r1, new RegisteredServicesCache.ServiceInfo<>(t1, null, 1)); - cache.addServiceForQuerying(0, r2, new RegisteredServicesCache.ServiceInfo<>(t2, null, - TestServicesCache.SYSTEM_IMAGE_UID)); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, SYSTEM_IMAGE_UID)); Collection<RegisteredServicesCache.ServiceInfo<TestServiceType>> allServices = cache - .getAllServices(0); + .getAllServices(U0); assertEquals(2, allServices.size()); Set<Integer> uids = new HashSet<>(); for (RegisteredServicesCache.ServiceInfo<TestServiceType> srv : allServices) { uids.add(srv.uid); } assertTrue("UID must be updated to the new value", - uids.contains(TestServicesCache.SYSTEM_IMAGE_UID)); - assertFalse("UID must be updated to the new value", uids.contains(2)); + uids.contains(SYSTEM_IMAGE_UID)); + assertFalse("UID must be updated to the new value", uids.contains(UID2)); } public void testGetAllServicesServiceRemoved() { - TestServicesCache cache = new TestServicesCache(mContext, mDataDir); - cache.addServiceForQuerying(0, r1, new RegisteredServicesCache.ServiceInfo<>(t1, null, 1)); - cache.addServiceForQuerying(0, r2, new RegisteredServicesCache.ServiceInfo<>(t2, null, 2)); - assertEquals(2, cache.getAllServicesSize(0)); - assertEquals(2, cache.getPersistentServicesSize(0)); + TestServicesCache cache = new TestServicesCache(); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2)); + assertEquals(2, cache.getAllServicesSize(U0)); + assertEquals(2, cache.getPersistentServicesSize(U0)); // Re-read data from disk and verify services were saved - cache = new TestServicesCache(mContext, mDataDir); - assertEquals(2, cache.getPersistentServicesSize(0)); + cache = new TestServicesCache(); + assertEquals(2, cache.getPersistentServicesSize(U0)); // Now register only one service and verify that another one is removed - cache.addServiceForQuerying(0, r1, new RegisteredServicesCache.ServiceInfo<>(t1, null, 1)); - assertEquals(1, cache.getAllServicesSize(0)); - assertEquals(1, cache.getPersistentServicesSize(0)); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + assertEquals(1, cache.getAllServicesSize(U0)); + assertEquals(1, cache.getPersistentServicesSize(U0)); } public void testGetAllServicesMultiUser() { - TestServicesCache cache = new TestServicesCache(mContext, mDataDir); - int u0 = 0; - int u1 = 1; - int pid1 = 1; - cache.addServiceForQuerying(u0, r1, new RegisteredServicesCache.ServiceInfo<>(t1, null, - pid1)); - int u1uid = UserHandle.getUid(u1, 0); - cache.addServiceForQuerying(u1, r2, new RegisteredServicesCache.ServiceInfo<>(t2, null, - u1uid)); - assertEquals(u1, cache.getAllServicesSize(u0)); - assertEquals(u1, cache.getPersistentServicesSize(u0)); - assertEquals(u1, cache.getAllServicesSize(u1)); - assertEquals(u1, cache.getPersistentServicesSize(u1)); + TestServicesCache cache = new TestServicesCache(); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + int u1uid = UserHandle.getUid(U1, 0); + cache.addServiceForQuerying(U1, r2, newServiceInfo(t2, u1uid)); + assertEquals(1, cache.getAllServicesSize(U0)); + assertEquals(1, cache.getPersistentServicesSize(U0)); + assertEquals(1, cache.getAllServicesSize(U1)); + assertEquals(1, cache.getPersistentServicesSize(U1)); assertEquals("No services should be available for user 3", 0, cache.getAllServicesSize(3)); // Re-read data from disk and verify services were saved - cache = new TestServicesCache(mContext, mDataDir); - assertEquals(u1, cache.getPersistentServicesSize(u0)); - assertEquals(u1, cache.getPersistentServicesSize(u1)); + cache = new TestServicesCache(); + assertEquals(1, cache.getPersistentServicesSize(U0)); + assertEquals(1, cache.getPersistentServicesSize(U1)); + assertNotEmptyFileCreated(cache, U0); + assertNotEmptyFileCreated(cache, U1); + } + + public void testOnRemove() { + TestServicesCache cache = new TestServicesCache(); + cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); + int u1uid = UserHandle.getUid(U1, 0); + cache.addServiceForQuerying(U1, r2, newServiceInfo(t2, u1uid)); + assertEquals(1, cache.getAllServicesSize(U0)); + assertEquals(1, cache.getAllServicesSize(U1)); + // Simulate ACTION_USER_REMOVED + cache.onUserRemoved(U1); + // Make queryIntentServices(u1) return no results for U1 + cache.clearServicesForQuerying(); + assertEquals(1, cache.getAllServicesSize(U0)); + assertEquals(0, cache.getAllServicesSize(U1)); + } + + public void testMigration() { + // Prepare "old" file for testing + String oldFile = "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>\n" + + "<services>\n" + + " <service uid=\"1\" type=\"type1\" value=\"value1\" />\n" + + " <service uid=\"100002\" type=\"type2\" value=\"value2\" />\n" + + "<services>\n"; + + File file = new File(mSyncDir, TestServicesCache.SERVICE_INTERFACE + ".xml"); + FileUtils.copyToFile(new ByteArrayInputStream(oldFile.getBytes()), file); + + int u0 = 0; + int u1 = 1; + TestServicesCache cache = new TestServicesCache(); + assertEquals(1, cache.getPersistentServicesSize(u0)); + assertEquals(1, cache.getPersistentServicesSize(u1)); + assertNotEmptyFileCreated(cache, u0); + assertNotEmptyFileCreated(cache, u1); + // Check that marker was created + File markerFile = new File(mSyncDir, TestServicesCache.SERVICE_INTERFACE + ".xml.migrated"); + assertTrue("Marker file should be created at " + markerFile, markerFile.exists()); + // Now introduce 2 service types for u0: t1, t2. type1 will be removed + cache.addServiceForQuerying(0, r1, newServiceInfo(t1, 1)); + cache.addServiceForQuerying(0, r2, newServiceInfo(t2, 2)); + assertEquals(2, cache.getAllServicesSize(u0)); + assertEquals(0, cache.getAllServicesSize(u1)); + // Re-read data from disk. Verify that services were saved and old file was ignored + cache = new TestServicesCache(); + assertEquals(2, cache.getPersistentServicesSize(u0)); + assertEquals(0, cache.getPersistentServicesSize(u1)); + } + + private static RegisteredServicesCache.ServiceInfo<TestServiceType> newServiceInfo( + TestServiceType type, int uid) { + return new RegisteredServicesCache.ServiceInfo<>(type, null, uid); + } + + private void assertNotEmptyFileCreated(TestServicesCache cache, int userId) { + File dir = new File(cache.getUserSystemDirectory(userId), + RegisteredServicesCache.REGISTERED_SERVICES_DIR); + File file = new File(dir, TestServicesCache.SERVICE_INTERFACE+".xml"); + assertTrue("File should be created at " + file, file.length() > 0); } /** * Mock implementation of {@link android.content.pm.RegisteredServicesCache} for testing */ - private static class TestServicesCache extends RegisteredServicesCache<TestServiceType> { + private class TestServicesCache extends RegisteredServicesCache<TestServiceType> { static final String SERVICE_INTERFACE = "RegisteredServicesCacheTest"; static final String SERVICE_META_DATA = "RegisteredServicesCacheTest"; static final String ATTRIBUTES_NAME = "test"; - // Represents UID of a system image process - static final int SYSTEM_IMAGE_UID = 20; private SparseArray<Map<ResolveInfo, ServiceInfo<TestServiceType>>> mServices = new SparseArray<>(); - public TestServicesCache(Context context, File dir) { - super(context, SERVICE_INTERFACE, SERVICE_META_DATA, ATTRIBUTES_NAME, - new TestSerializer(), dir); + public TestServicesCache() { + super(RegisteredServicesCacheTest.this.mContext, + SERVICE_INTERFACE, SERVICE_META_DATA, ATTRIBUTES_NAME, new TestSerializer()); } @Override @@ -164,6 +226,33 @@ public class RegisteredServicesCacheTest extends AndroidTestCase { return new ArrayList<>(map.keySet()); } + @Override + protected File getUserSystemDirectory(int userId) { + File dir = new File(mDataDir, "users/" + userId); + dir.mkdirs(); + return dir; + } + + @Override + protected List<UserInfo> getUsers() { + return mUsers; + } + + @Override + protected UserInfo getUser(int userId) { + for (UserInfo user : getUsers()) { + if (user.id == userId) { + return user; + } + } + return null; + } + + @Override + protected File getDataDirectory() { + return mDataDir; + } + void addServiceForQuerying(int userId, ResolveInfo resolveInfo, ServiceInfo<TestServiceType> serviceInfo) { Map<ResolveInfo, ServiceInfo<TestServiceType>> map = mServices.get(userId); @@ -204,6 +293,11 @@ public class RegisteredServicesCacheTest extends AndroidTestCase { } throw new IllegalArgumentException("Unexpected service " + resolveInfo); } + + @Override + public void onUserRemoved(int userId) { + super.onUserRemoved(userId); + } } static class TestSerializer implements XmlSerializerAndParser<TestServiceType> { diff --git a/data/etc/platform.xml b/data/etc/platform.xml index 95c6867..6659769 100644 --- a/data/etc/platform.xml +++ b/data/etc/platform.xml @@ -153,7 +153,6 @@ <library name="org.apache.http.legacy" file="/system/framework/org.apache.http.legacy.jar" /> - <!-- These are the standard packages that are white-listed to always have internet access while in power save mode, even if they aren't in the foreground. --> <allow-in-power-save package="com.android.providers.downloads" /> diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml index f94fe66..42b5d5d 100644 --- a/data/fonts/fallback_fonts.xml +++ b/data/fonts/fallback_fonts.xml @@ -335,11 +335,6 @@ </family> <family> <fileset> - <file>NotoSansTaiLe-Regular.ttf</file> - </fileset> - </family> - <family> - <fileset> <file>NotoSansTaiTham-Regular.ttf</file> </fileset> </family> @@ -408,10 +403,13 @@ <file lang="ja">MTLmr3m.ttf</file> </fileset> </family> - <!-- Note: complex scripts (i.e. those requiring shaping in Harfbuzz) have - a cumulative limit of 64k glyphs. Thus, if they are placed after the - large fonts such as DroidSansFallback, they are likely to render - incorrectly. Please use caution when putting fonts toward the end of - the list. + <!-- + Noto Sans Tai Le is intentionally kept last, to make sure it doesn't override + the East Asian punctuation for Chinese. --> + <family> + <fileset> + <file>NotoSansTaiLe-Regular.ttf</file> + </fileset> + </family> </familyset> diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml index 02bf877..37527e9 100644 --- a/data/fonts/fonts.xml +++ b/data/fonts/fonts.xml @@ -288,9 +288,6 @@ <font weight="400" style="normal">NotoSansTagbanwa-Regular.ttf</font> </family> <family> - <font weight="400" style="normal">NotoSansTaiLe-Regular.ttf</font> - </family> - <family> <font weight="400" style="normal">NotoSansTaiTham-Regular.ttf</font> </family> <family> @@ -332,4 +329,11 @@ <family lang="ja"> <font weight="400" style="normal">MTLmr3m.ttf</font> </family> + <!-- + Noto Sans Tai Le is intentionally kept last, to make sure it doesn't override + the East Asian punctuation for Chinese. + --> + <family> + <font weight="400" style="normal">NotoSansTaiLe-Regular.ttf</font> + </family> </familyset> diff --git a/docs/html/distribute/tools/promote/device-art-resources/wear/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/wear/thumb.png Binary files differnew file mode 100644 index 0000000..adfe16f --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/wear/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/wear_round/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/wear_round/port_back.png Binary files differnew file mode 100644 index 0000000..0b3d04a --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/wear_round/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/wear_square/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/wear_square/port_back.png Binary files differnew file mode 100644 index 0000000..aa44795 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/wear_square/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art.jd b/docs/html/distribute/tools/promote/device-art.jd index 3902b30..f583eb9 100644 --- a/docs/html/distribute/tools/promote/device-art.jd +++ b/docs/html/distribute/tools/promote/device-art.jd @@ -1,13 +1,13 @@ page.title=Device Art Generator page.image=/images/device-art-ex-crop.jpg -page.metaDescription=Drag and drop screenshots of your app into real device artwork, for better looking promotional images and improved visual context. +page.metaDescription=Drag and drop screenshots of your app into device artwork, for better looking promotional images and improved visual context. meta.tags="disttools, promoting, deviceart, marketing" page.tags="device, deviceart, nexus, assets" Xnonavpage=true @jd:body -<p>The device art generator enables you to quickly wrap app screenshots in real device artwork. This provides better visual context for your app screenshots on your website or in other promotional materials</p> +<p>The device art generator enables you to quickly wrap app screenshots in device artwork. This provides better visual context for your app screenshots on your website or in other promotional materials</p> <p class="note"><strong>Note</strong>: Do <em>not</em> use graphics created here in your 1024x500 feature image or screenshots for your Google Play app listing.</p> @@ -41,6 +41,12 @@ feature image or screenshots for your Google Play app listing.</p> <label for="output-glare">Screen Glare</label><br><br> <a class="button" id="rotate-button">Rotate</a> </p> + <p id="wear-customizations"> + <input type="radio" id="output-square" name="output-wear" checked="checked" class="form-field-checkbutton"> + <label for="output-square">Square</label><br> + <input type="radio" id="output-round" name="output-wear" class="form-field-checkbutton"> + <label for="output-round">Round</label><br><br> + </p> </div> <div class="layout-content-col span-10"> <!-- position:relative fixes an issue where dragging an image out of a inline-block container @@ -52,7 +58,7 @@ feature image or screenshots for your Google Play app listing.</p> </div> <div class="unsupported-browser" style="display: none"> - <p class="warning"><strong>Error:</strong> This page requires + <p class="warning"><strong>Error:</strong> This page requires <span id="unsupported-browser-reason">certain features</span>, which your web browser doesn't support. To continue, navigate to this page on a supported web browser, such as <strong>Google Chrome</strong>.</p> @@ -165,6 +171,10 @@ feature image or screenshots for your Google Play app listing.</p> // Global constants var MSG_INVALID_INPUT_IMAGE = 'Invalid screenshot provided. Screenshots must be PNG files ' + 'matching the target device\'s screen aspect ratio in either portrait or landscape.'; + var MSG_INVALID_WEAR_IMAGE = 'Invalid screenshot provided. Screenshots must be PNG files ' + + 'matching the target device\'s screen aspect ratio.' + + ' Capture screenshots from a Wear emulator or device with ' + + '<a href="http://developer.android.com/tools/debugging/debugging-studio.html#screenCap">Android Studio</a>.'; var MSG_NO_INPUT_IMAGE = 'Drag a screenshot (in PNG format) from your desktop onto a ' + 'target device above.' var MSG_GENERATING_IMAGE = 'Generating device art…'; @@ -270,6 +280,47 @@ feature image or screenshots for your Google Play app listing.</p> portSize: [768,1280], archived: true }, + { + id: 'wear', + title: 'Android Wear', + url: 'http://www.android.com/wear/', + physicalSize: 1.8, + physicalHeight: 1.8, + density: 'HDPI', + landRes: ['back'], + landOffset: [225,206], + portRes: ['back'], + portOffset: [200,214], + portSize: [320,320], + }, + { + id: 'wear_square', + title: 'Android Wear Square', + url: 'http://www.android.com/wear/', + physicalSize: 1.8, + physicalHeight: 1.8, + density: 'HDPI', + landRes: ['back'], + landOffset: [225,206], + portRes: ['back'], + portOffset: [200,214], + portSize: [320,320], + hidden: true + }, + { + id: 'wear_round', + title: 'Android Wear Round', + url: 'http://www.android.com/wear/', + physicalSize: 1.8, + physicalHeight: 1.8, + density: 'HDPI', + landRes: ['back'], + landOffset: [161,167], + portRes: ['back'], + portOffset: [128,134], + portSize: [320,320], + hidden: true + }, ]; DEVICES = DEVICES.sort(function(x, y) { return x.physicalSize - y.physicalSize; }); @@ -343,15 +394,21 @@ feature image or screenshots for your Google Play app listing.</p> $('#output').html(MSG_NO_INPUT_IMAGE); $('#frame-customizations').hide(); + $('#wear-customizations').hide(); $('#output-shadow, #output-glare').click(function() { createFrame(); }); + $('input[name="output-wear"]').change(function() { + createFrame(); + }); + // Build device list. $.each(DEVICES, function() { var resolution = this.actualResolution || this.portSize; var scaleFactorText = ''; + var deviceList = '.device-list.primary'; if (resolution[0] != this.portSize[0]) { scaleFactorText = '<br>' + (100 * (this.portSize[0] / resolution[0])).toFixed(0) + '% size output'; @@ -359,6 +416,12 @@ feature image or screenshots for your Google Play app listing.</p> scaleFactorText = '<br> '; } + if (this.archived) { + deviceList = '.device-list.archived'; + } else if (this.hidden) { + deviceList = '.device-list.hidden'; + } + $('<li>') .append($('<div>') .addClass('thumb-container') @@ -374,7 +437,7 @@ feature image or screenshots for your Google Play app listing.</p> '<br>' + this.physicalSize + '" @ ' + this.density + '<br>' + (resolution[0] + 'x' + resolution[1]) + scaleFactorText)) .data('deviceId', this.id) - .appendTo(this.archived ? '.device-list.archive' : '.device-list.primary'); + .appendTo(deviceList) }); // Set up "older devices" expando. @@ -406,7 +469,11 @@ feature image or screenshots for your Google Play app listing.</p> evt.preventDefault(); loadImageFromFileList(evt.dataTransfer.files, function(data) { if (data == null) { - $('#output').html(MSG_INVALID_INPUT_IMAGE); + if (g_currentDevice.id == 'wear') { + $('#output').html(MSG_INVALID_WEAR_IMAGE); + }else { + $('#output').html(MSG_INVALID_INPUT_IMAGE); + } return; } loadImageFromUri(data.uri, function(img) { @@ -450,6 +517,14 @@ feature image or screenshots for your Google Play app listing.</p> function createFrame() { var port; + if (g_currentDevice.id == 'wear' || g_currentDevice.id == 'wear_square' || g_currentDevice.id == 'wear_round') { + if ($('#output-square').is(':checked')) { + g_currentDevice = getDeviceById('wear_square'); + } else { + g_currentDevice = getDeviceById('wear_round'); + } + } + var aspect1 = g_currentImage.naturalWidth / g_currentImage.naturalHeight; var aspect2 = g_currentDevice.portSize[0] / g_currentDevice.portSize[1]; @@ -458,11 +533,18 @@ feature image or screenshots for your Google Play app listing.</p> } else if (aspect1 == 1 / aspect2) { port = false; } else { - alert('The screenshot must have an aspect ratio of ' + + if (g_currentDevice.id == 'wear_square' || g_currentDevice.id == 'wear_round') { + alert('The screenshot must have an aspect ratio of ' + + aspect2.toFixed(3) + + ' (ideally ' + g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] + ').'); + $('#output').html(MSG_INVALID_WEAR_IMAGE); + }else { + alert('The screenshot must have an aspect ratio of ' + aspect2.toFixed(3) + ' or ' + (1 / aspect2).toFixed(3) + ' (ideally ' + g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] + ' or ' + g_currentDevice.portSize[1] + 'x' + g_currentDevice.portSize[0] + ').'); - $('#output').html(MSG_INVALID_INPUT_IMAGE); + $('#output').html(MSG_INVALID_INPUT_IMAGE); + } return; } @@ -497,9 +579,37 @@ feature image or screenshots for your Google Play app listing.</p> ctx.drawImage(resourceImages['shadow'], 0, 0); } ctx.drawImage(resourceImages['back'], 0, 0); - ctx.fillStyle = '#000'; - ctx.fillRect(offset[0], offset[1], size[0], size[1]); - ctx.drawImage(g_currentImage, offset[0], offset[1], size[0], size[1]); + + if (g_currentDevice.id == 'wear_round') { + var scratchCanvas = document.createElement('canvas'); + scratchCanvas.width = width; + scratchCanvas.height = height; + var scratchCtx = scratchCanvas.getContext('2d'); + + + //drawing code + scratchCtx.clearRect(offset[0], offset[1], scratchCanvas.width, scratchCanvas.height); + + scratchCtx.globalCompositeOperation = 'source-over'; //default + + scratchCtx.drawImage(g_currentImage, offset[0], offset[1], size[0], size[1]); + + scratchCtx.fillStyle = '#fff'; //color doesn't matter, but we want full opacity + scratchCtx.globalCompositeOperation = 'destination-in'; + scratchCtx.beginPath(); + scratchCtx.arc(288, 294, size[0] / 2, 0, 2 * Math.PI, false); + scratchCtx.closePath(); + scratchCtx.fill(); + + // After tinkering with the offset, the 1 in the x-position drew the image + // perfectly + ctx.drawImage(scratchCanvas, 1, 0); + } else { + ctx.fillStyle = '#000'; + ctx.fillRect(offset[0], offset[1], size[0], size[1]); + ctx.drawImage(g_currentImage, offset[0], offset[1], size[0], size[1]); + } + if (resourceImages['fore'] && $('#output-glare').is(':checked')) { ctx.drawImage(resourceImages['fore'], 0, 0); } @@ -546,7 +656,13 @@ feature image or screenshots for your Google Play app listing.</p> .attr('data-downloadurl', ['image/png', filename, imageUrl].join(':'))) .appendTo($('#output').empty()); - $('#frame-customizations').show(); + if (g_currentDevice.id == 'wear' || g_currentDevice.id == 'wear_round' || g_currentDevice.id == 'wear_square') { + $('#wear-customizations').show(); + $('#frame-customizations').hide(); + } else { + $('#frame-customizations').show(); + $('#wear-customizations').hide(); + } } } diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd index f09ff9e..5710a47 100644 --- a/docs/html/guide/topics/data/backup.jd +++ b/docs/html/guide/topics/data/backup.jd @@ -643,7 +643,8 @@ public class MyPrefsBackupAgent extends BackupAgentHelper { // Allocate a helper and add it to the backup agent @Override public void onCreate() { - SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS); + SharedPreferencesBackupHelper helper = + new SharedPreferencesBackupHelper(this, PREFS); addHelper(PREFS_BACKUP_KEY, helper); } } @@ -688,8 +689,10 @@ public class MyFileBackupAgent extends BackupAgentHelper { static final String FILES_BACKUP_KEY = "myfiles"; // Allocate a helper and add it to the backup agent - void onCreate() { - FileBackupHelper helper = new FileBackupHelper(this, TOP_SCORES, PLAYER_STATS); + @Override + public void onCreate() { + FileBackupHelper helper = new FileBackupHelper(this, + TOP_SCORES, PLAYER_STATS); addHelper(FILES_BACKUP_KEY, helper); } } diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd index 1ee6606..0a96a15 100644 --- a/docs/html/guide/topics/resources/localization.jd +++ b/docs/html/guide/topics/resources/localization.jd @@ -433,8 +433,8 @@ application, however, should localize properly.</p> <p>To change the locale in the emulator by using the adb shell. </p>
<ol>
- <li>Pick the locale you want to test and determine its language and region codes, for
-example <code>fr</code> for French and <code>CA</code> for Canada.<br>
+ <li>Pick the locale you want to test and determine its BCP-47 language tag, for
+example, Canadian French would be <code>fr-CA</code>.<br>
</li>
<li>Launch an emulator.</li>
<li>From a command-line shell on the host computer, run the following
@@ -444,16 +444,14 @@ command:<br> the <code>-e</code> option:<br>
<code>adb -e shell</code></li>
<li>At the adb shell prompt (<code>#</code>), run this command: <br>
- <code>setprop persist.sys.language [<em>language code</em>];setprop
-persist.sys.country [<em>country code</em>];stop;sleep 5;start <br>
+ <code>setprop persist.sys.locale [<em>BCP-47 language tag</em>];stop;sleep 5;start <br>
</code>Replace bracketed sections with the appropriate codes from Step
1.</li>
</ol>
<p>For instance, to test in Canadian French:</p>
-<p><code>setprop persist.sys.language fr;setprop persist.sys.country
-CA;stop;sleep 5;start </code></p>
+<p><code>setprop persist.sys.locale fr-CA;stop;sleep 5;start </code></p>
<p>This will cause the emulator to restart. (It will look like a full reboot,
but it is not.) Once the Home screen appears again, re-launch your application (for
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd index e47c77e..976115e 100644 --- a/docs/html/guide/topics/ui/notifiers/notifications.jd +++ b/docs/html/guide/topics/ui/notifiers/notifications.jd @@ -663,20 +663,21 @@ mNotificationManager.notify(id, builder.build()); NotificationCompat.Builder builder = new NotificationCompat.Builder(this); // Creates an Intent for the Activity Intent notifyIntent = - new Intent(new ComponentName(this, ResultActivity.class)); + new Intent(this, ResultActivity.class); // Sets the Activity to start in a new, empty task -notifyIntent.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK); +notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK + | Intent.FLAG_ACTIVITY_CLEAR_TASK); // Creates the PendingIntent -PendingIntent notifyIntent = +PendingIntent notifyPendingIntent = PendingIntent.getActivity( this, 0, - notifyIntent + notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT ); // Puts the PendingIntent into the notification builder -builder.setContentIntent(notifyIntent); +builder.setContentIntent(notifyPendingIntent); // Notifications are issued by sending them to the // NotificationManager system service. NotificationManager mNotificationManager = @@ -715,7 +716,7 @@ mNotificationManager.notify(id, builder.build()); <h3 id="FixedProgress">Displaying a fixed-duration progress indicator</h3> <p> To display a determinate progress bar, add the bar to your notification by calling - {@link android.support.v4.app.NotificationCompat.Builder#setProgress setProgress() + {@link android.support.v4.app.NotificationCompat.Builder#setProgress setProgress(max, progress, false)} and then issue the notification. As your operation proceeds, increment <code>progress</code>, and update the notification. At the end of the operation, <code>progress</code> should equal <code>max</code>. A common way to call @@ -727,7 +728,7 @@ mNotificationManager.notify(id, builder.build()); You can either leave the progress bar showing when the operation is done, or remove it. In either case, remember to update the notification text to show that the operation is complete. To remove the progress bar, call - {@link android.support.v4.app.NotificationCompat.Builder#setProgress setProgress() + {@link android.support.v4.app.NotificationCompat.Builder#setProgress setProgress(0, 0, false)}. For example: </p> <pre> @@ -783,8 +784,8 @@ new Thread( <p> Issue the notification at the beginning of the operation. The animation will run until you modify your notification. When the operation is done, call - {@link android.support.v4.app.NotificationCompat.Builder#setProgress setProgress() - setProgress(0, 0, false)} and then update the notification to remove the activity indicator. + {@link android.support.v4.app.NotificationCompat.Builder#setProgress setProgress(0, 0, false)} + and then update the notification to remove the activity indicator. Always do this; otherwise, the animation will run even when the operation is complete. Also remember to change the notification text to indicate that the operation is complete. </p> diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java index 9e4674b..616aebd 100644 --- a/graphics/java/android/graphics/drawable/LayerDrawable.java +++ b/graphics/java/android/graphics/drawable/LayerDrawable.java @@ -322,7 +322,13 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { return false; } - void addLayer(ChildDrawable layer) { + /** + * Adds a new layer at the end of list of layers and returns its index. + * + * @param layer The layer to add. + * @return The index of the layer. + */ + int addLayer(ChildDrawable layer) { final LayerState st = mLayerState; final int N = st.mChildren != null ? st.mChildren.length : 0; final int i = st.mNum; @@ -338,12 +344,13 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { st.mChildren[i] = layer; st.mNum++; st.invalidateCache(); + return i; } /** * Add a new layer to this drawable. The new layer is identified by an id. * - * @param layer The drawable to add as a layer. + * @param dr The drawable to add as a layer. * @param themeAttrs Theme attributes extracted from the layer. * @param id The id of the new layer. * @param left The left padding of the new layer. @@ -351,12 +358,11 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { * @param right The right padding of the new layer. * @param bottom The bottom padding of the new layer. */ - ChildDrawable addLayer(Drawable layer, int[] themeAttrs, int id, int left, int top, int right, - int bottom) { - final ChildDrawable childDrawable = new ChildDrawable(); + ChildDrawable addLayer(Drawable dr, int[] themeAttrs, int id, + int left, int top, int right, int bottom) { + final ChildDrawable childDrawable = createLayer(dr); childDrawable.mId = id; childDrawable.mThemeAttrs = themeAttrs; - childDrawable.mDrawable = layer; childDrawable.mDrawable.setAutoMirrored(isAutoMirrored()); childDrawable.mInsetL = left; childDrawable.mInsetT = top; @@ -365,12 +371,31 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { addLayer(childDrawable); - mLayerState.mChildrenChangingConfigurations |= layer.getChangingConfigurations(); - layer.setCallback(this); + mLayerState.mChildrenChangingConfigurations |= dr.getChangingConfigurations(); + dr.setCallback(this); return childDrawable; } + private ChildDrawable createLayer(Drawable dr) { + final ChildDrawable layer = new ChildDrawable(); + layer.mDrawable = dr; + return layer; + } + + /** + * Adds a new layer containing the specified {@code drawable} to the end of + * the layer list and returns its index. + * + * @param dr The drawable to add as a new layer. + * @return The index of the new layer. + */ + public int addLayer(Drawable dr) { + final ChildDrawable layer = createLayer(dr); + final int index = addLayer(layer); + return index; + } + /** * Looks for a layer with the given ID and returns its {@link Drawable}. * <p> @@ -395,45 +420,46 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { /** * Sets the ID of a layer. * - * @param index The index of the layer which will received the ID. - * @param id The ID to assign to the layer. + * @param index The index of the layer to modify, must be in the range + * {@code 0...getNumberOfLayers()-1}. + * @param id The id to assign to the layer. + * + * @see #getId(int) + * @attr ref android.R.styleable#LayerDrawableItem_id */ public void setId(int index, int id) { mLayerState.mChildren[index].mId = id; } /** - * Returns the number of layers contained within this. - * @return The number of layers. - */ - public int getNumberOfLayers() { - return mLayerState.mNum; - } - - /** - * Returns the drawable at the specified layer index. + * Returns the ID of the specified layer. * - * @param index The layer index of the drawable to retrieve. + * @param index The index of the layer, must be in the range + * {@code 0...getNumberOfLayers()-1}. + * @return The id of the layer or {@link android.view.View#NO_ID} if the + * layer has no id. * - * @return The {@link android.graphics.drawable.Drawable} at the specified layer index. + * @see #setId(int, int) + * @attr ref android.R.styleable#LayerDrawableItem_id */ - public Drawable getDrawable(int index) { - return mLayerState.mChildren[index].mDrawable; + public int getId(int index) { + if (index >= mLayerState.mNum) { + throw new IndexOutOfBoundsException(); + } + return mLayerState.mChildren[index].mId; } /** - * Returns the id of the specified layer. - * - * @param index The index of the layer. + * Returns the number of layers contained within this layer drawable. * - * @return The id of the layer or {@link android.view.View#NO_ID} if the layer has no id. + * @return The number of layers. */ - public int getId(int index) { - return mLayerState.mChildren[index].mId; + public int getNumberOfLayers() { + return mLayerState.mNum; } /** - * Sets (or replaces) the {@link Drawable} for the layer with the given id. + * Replaces the {@link Drawable} for the layer with the given id. * * @param id The layer ID to search for. * @param drawable The replacement {@link Drawable}. @@ -441,31 +467,88 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { * the id was not found). */ public boolean setDrawableByLayerId(int id, Drawable drawable) { + final int index = findIndexByLayerId(id); + if (index < 0) { + return false; + } + + setDrawable(index, drawable); + return true; + } + + /** + * Returns the layer with the specified {@code id}. + * <p> + * If multiple layers have the same ID, returns the layer with the lowest + * index. + * + * @param id The ID of the layer to return. + * @return The index of the layer with the specified ID. + */ + public int findIndexByLayerId(int id) { final ChildDrawable[] layers = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { final ChildDrawable childDrawable = layers[i]; if (childDrawable.mId == id) { - if (childDrawable.mDrawable != null) { - if (drawable != null) { - final Rect bounds = childDrawable.mDrawable.getBounds(); - drawable.setBounds(bounds); - } + return i; + } + } - childDrawable.mDrawable.setCallback(null); - } + return -1; + } - if (drawable != null) { - drawable.setCallback(this); - } + /** + * Sets the drawable for the layer at the specified index. + * + * @param index The index of the layer to modify, must be in the range + * {@code 0...getNumberOfLayers()-1}. + * @param drawable The drawable to set for the layer. + * + * @see #getDrawable(int) + * @attr ref android.R.styleable#LayerDrawableItem_drawable + */ + public void setDrawable(int index, Drawable drawable) { + if (index >= mLayerState.mNum) { + throw new IndexOutOfBoundsException(); + } - childDrawable.mDrawable = drawable; - mLayerState.invalidateCache(); - return true; + final ChildDrawable[] layers = mLayerState.mChildren; + final ChildDrawable childDrawable = layers[index]; + if (childDrawable.mDrawable != null) { + if (drawable != null) { + final Rect bounds = childDrawable.mDrawable.getBounds(); + drawable.setBounds(bounds); } + + childDrawable.mDrawable.setCallback(null); } - return false; + if (drawable != null) { + drawable.setCallback(this); + drawable.setLayoutDirection(getLayoutDirection()); + drawable.setLevel(getLevel()); + } + + childDrawable.mDrawable = drawable; + mLayerState.invalidateCache(); + } + + /** + * Returns the drawable for the layer at the specified index. + * + * @param index The index of the layer, must be in the range + * {@code 0...getNumberOfLayers()-1}. + * @return The {@link Drawable} at the specified layer index. + * + * @see #setDrawable(int, Drawable) + * @attr ref android.R.styleable#LayerDrawableItem_drawable + */ + public Drawable getDrawable(int index) { + if (index >= mLayerState.mNum) { + throw new IndexOutOfBoundsException(); + } + return mLayerState.mChildren[index].mDrawable; } /** diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index d128ffe..cca8a06 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -668,7 +668,8 @@ public: } virtual void output(int level, uint32_t logFlags) const override { - OP_LOG("Draw bitmap %p at %f %f%s", mBitmap, mLocalBounds.left, mLocalBounds.top, + OP_LOG("Draw bitmap %p of size %dx%d%s", + mBitmap, mBitmap->width(), mBitmap->height(), mEntry ? " using AssetAtlas" : ""); } diff --git a/core/java/android/net/http/RequestFeeder.java b/libs/hwui/FloatColor.h index 34ca267..803b9d4 100644 --- a/core/java/android/net/http/RequestFeeder.java +++ b/libs/hwui/FloatColor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 The Android Open Source Project + * Copyright (C) 2015 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. @@ -13,30 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifndef FLOATCOLOR_H +#define FLOATCOLOR_H -/** - * Supplies Requests to a Connection - */ - -package android.net.http; +#include "utils/Macros.h" -import org.apache.http.HttpHost; +namespace android { +namespace uirenderer { -/** - * {@hide} - */ -interface RequestFeeder { +struct FloatColor { + float r; + float g; + float b; + float a; +}; - Request getRequest(); - Request getRequest(HttpHost host); +REQUIRE_COMPATIBLE_LAYOUT(FloatColor); - /** - * @return true if a request for this host is available - */ - boolean haveRequest(HttpHost host); +} /* namespace uirenderer */ +} /* namespace android */ - /** - * Put request back on head of queue - */ - void requeueRequest(Request request); -} +#endif /* FLOATCOLOR_H */ diff --git a/libs/hwui/Glop.h b/libs/hwui/Glop.h index e2adff8..10dbd5c 100644 --- a/libs/hwui/Glop.h +++ b/libs/hwui/Glop.h @@ -17,6 +17,7 @@ #ifndef ANDROID_HWUI_GLOP_H #define ANDROID_HWUI_GLOP_H +#include "FloatColor.h" #include "Matrix.h" #include "Rect.h" #include "utils/Macros.h" @@ -29,6 +30,7 @@ namespace android { namespace uirenderer { class Program; +class RoundRectClipState; /* * Enumerates optional vertex attributes @@ -37,30 +39,27 @@ class Program; * are enabled/disabled dynamically based on mesh content. */ enum VertexAttribFlags { - // NOTE: position attribute always enabled kNone_Attrib = 0, kTextureCoord_Attrib = 1 << 0, kColor_Attrib = 1 << 1, kAlpha_Attrib = 1 << 2, }; - /** - * Structure containing all data required to issue a single OpenGL draw + * Structure containing all data required to issue an OpenGL draw * * Includes all of the mesh, fill, and GL state required to perform * the operation. Pieces of data are either directly copied into the * structure, or stored as a pointer or GL object reference to data - * managed + * managed. + * + * Eventually, a Glop should be able to be drawn multiple times from + * a single construction, up until GL context destruction. Currently, + * vertex/index/Texture/RoundRectClipState pointers prevent this from + * being safe. */ // TODO: PREVENT_COPY_AND_ASSIGN(...) or similar struct Glop { - struct FloatColor { - float a, r, g, b; - }; - - Rect bounds; - /* * Stores mesh - vertex and index data. * @@ -74,12 +73,20 @@ struct Glop { GLuint indexBufferObject; const void* vertices; const void* indices; - int vertexCount; + int elementCount; GLsizei stride; + GLvoid* texCoordOffset; + TextureVertex mappedVertices[4]; } mesh; struct Fill { Program* program; + + Texture* texture; + GLenum textureFilter; + GLenum textureClamp; + + bool colorEnabled; FloatColor color; /* TODO @@ -104,12 +111,25 @@ struct Glop { bool fudgingOffset; } transform; + const RoundRectClipState* roundRectClipState; + + /** + * Blending to be used by this draw - both GL_NONE if blending is disabled. + * + * Defined by fill step, but can be force-enabled by presence of kAlpha_Attrib + */ struct Blend { GLenum src; GLenum dst; } blend; /** + * Bounds of the drawing command in layer space. Only mapped into layer + * space once GlopBuilder::build() is called. + */ + Rect bounds; + + /** * Additional render state to enumerate: * - scissor + (bits for whether each of LTRB needed?) * - stencil mode (draw into, mask, count, etc) diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp index 5373275..91e0f89 100644 --- a/libs/hwui/GlopBuilder.cpp +++ b/libs/hwui/GlopBuilder.cpp @@ -33,52 +33,72 @@ namespace uirenderer { #define TRIGGER_STAGE(stageFlag) \ LOG_ALWAYS_FATAL_IF(stageFlag & mStageFlags, "Stage %d cannot be run twice"); \ - mStageFlags = static_cast<StageFlags>(mStageFlags | stageFlag) + mStageFlags = static_cast<StageFlags>(mStageFlags | (stageFlag)) #define REQUIRE_STAGES(requiredFlags) \ - LOG_ALWAYS_FATAL_IF((mStageFlags & requiredFlags) != requiredFlags, \ + LOG_ALWAYS_FATAL_IF((mStageFlags & (requiredFlags)) != (requiredFlags), \ "not prepared for current stage") +static void setUnitQuadTextureCoords(Rect uvs, TextureVertex* quadVertex) {; + TextureVertex::setUV(quadVertex++, uvs.left, uvs.top); + TextureVertex::setUV(quadVertex++, uvs.right, uvs.top); + TextureVertex::setUV(quadVertex++, uvs.left, uvs.bottom); + TextureVertex::setUV(quadVertex++, uvs.right, uvs.bottom); +} + GlopBuilder::GlopBuilder(RenderState& renderState, Caches& caches, Glop* outGlop) : mRenderState(renderState) , mCaches(caches) - , mOutGlop(outGlop){ + , mOutGlop(outGlop) { mStageFlags = kInitialStage; } -GlopBuilder& GlopBuilder::setMeshVertexBuffer(const VertexBuffer& vertexBuffer, bool shadowInterp) { - TRIGGER_STAGE(kMeshStage); +//////////////////////////////////////////////////////////////////////////////// +// Mesh +//////////////////////////////////////////////////////////////////////////////// - const VertexBuffer::MeshFeatureFlags flags = vertexBuffer.getMeshFeatureFlags(); +GlopBuilder& GlopBuilder::setMeshUnitQuad() { + TRIGGER_STAGE(kMeshStage); - bool alphaVertex = flags & VertexBuffer::kAlpha; - bool indices = flags & VertexBuffer::kIndices; - mOutGlop->mesh.vertexFlags = alphaVertex ? kAlpha_Attrib : kNone_Attrib; + mOutGlop->mesh.vertexFlags = kNone_Attrib; mOutGlop->mesh.primitiveMode = GL_TRIANGLE_STRIP; - mOutGlop->mesh.vertexBufferObject = 0; - mOutGlop->mesh.vertices = vertexBuffer.getBuffer(); + mOutGlop->mesh.vertexBufferObject = mRenderState.meshState().getUnitQuadVBO(); + mOutGlop->mesh.vertices = nullptr; mOutGlop->mesh.indexBufferObject = 0; - mOutGlop->mesh.indices = vertexBuffer.getIndices(); - mOutGlop->mesh.vertexCount = indices - ? vertexBuffer.getIndexCount() : vertexBuffer.getVertexCount(); - mOutGlop->mesh.stride = alphaVertex ? kAlphaVertexStride : kVertexStride; - - mDescription.hasVertexAlpha = alphaVertex; - mDescription.useShadowAlphaInterp = shadowInterp; + mOutGlop->mesh.indices = nullptr; + mOutGlop->mesh.elementCount = 4; + mOutGlop->mesh.stride = kTextureVertexStride; + mOutGlop->mesh.texCoordOffset = nullptr; return *this; } -GlopBuilder& GlopBuilder::setMeshUnitQuad() { +GlopBuilder& GlopBuilder::setMeshTexturedUnitQuad(const UvMapper* uvMapper, + bool isAlphaMaskTexture) { TRIGGER_STAGE(kMeshStage); - mOutGlop->mesh.vertexFlags = kNone_Attrib; + mOutGlop->mesh.vertexFlags = kTextureCoord_Attrib; mOutGlop->mesh.primitiveMode = GL_TRIANGLE_STRIP; - mOutGlop->mesh.vertexBufferObject = mRenderState.meshState().getUnitQuadVBO(); - mOutGlop->mesh.vertices = nullptr; + + if (CC_UNLIKELY(uvMapper)) { + Rect uvs(0, 0, 1, 1); + uvMapper->map(uvs); + setUnitQuadTextureCoords(uvs, &mOutGlop->mesh.mappedVertices[0]); + + mOutGlop->mesh.vertexBufferObject = 0; + mOutGlop->mesh.vertices = &mOutGlop->mesh.mappedVertices[0]; + } else { + // standard UV coordinates, use regular unit quad VBO + mOutGlop->mesh.vertexBufferObject = mRenderState.meshState().getUnitQuadVBO(); + mOutGlop->mesh.vertices = nullptr; + } mOutGlop->mesh.indexBufferObject = 0; mOutGlop->mesh.indices = nullptr; - mOutGlop->mesh.vertexCount = 4; + mOutGlop->mesh.elementCount = 4; mOutGlop->mesh.stride = kTextureVertexStride; + mOutGlop->mesh.texCoordOffset = (GLvoid*) kMeshTextureOffset; + + mDescription.hasTexture = true; + mDescription.hasAlpha8Texture = isAlphaMaskTexture; return *this; } @@ -91,92 +111,64 @@ GlopBuilder& GlopBuilder::setMeshIndexedQuads(void* vertexData, int quadCount) { mOutGlop->mesh.vertices = vertexData; mOutGlop->mesh.indexBufferObject = mRenderState.meshState().getQuadListIBO(); mOutGlop->mesh.indices = nullptr; - mOutGlop->mesh.vertexCount = 6 * quadCount; + mOutGlop->mesh.elementCount = 6 * quadCount; mOutGlop->mesh.stride = kVertexStride; + mOutGlop->mesh.texCoordOffset = nullptr; return *this; } -GlopBuilder& GlopBuilder::setTransform(const Matrix4& ortho, - const Matrix4& transform, bool fudgingOffset) { - TRIGGER_STAGE(kTransformStage); - - mOutGlop->transform.ortho.load(ortho); - mOutGlop->transform.canvas.load(transform); - mOutGlop->transform.fudgingOffset = fudgingOffset; - return *this; -} - -GlopBuilder& GlopBuilder::setModelViewMapUnitToRect(const Rect destination) { - TRIGGER_STAGE(kModelViewStage); - - mOutGlop->transform.modelView.loadTranslate(destination.left, destination.top, 0.0f); - mOutGlop->transform.modelView.scale(destination.getWidth(), destination.getHeight(), 1.0f); - mOutGlop->bounds = destination; - return *this; -} - -GlopBuilder& GlopBuilder::setModelViewOffsetRect(float offsetX, float offsetY, const Rect source) { - TRIGGER_STAGE(kModelViewStage); - - mOutGlop->transform.modelView.loadTranslate(offsetX, offsetY, 0.0f); - mOutGlop->bounds = source; - mOutGlop->bounds.translate(offsetX, offsetY); - return *this; -} - -GlopBuilder& GlopBuilder::setOptionalPaint(const SkPaint* paint, float alphaScale) { - if (paint) { - return setPaint(*paint, alphaScale); - } - - TRIGGER_STAGE(kFillStage); - REQUIRE_STAGES(kMeshStage); +GlopBuilder& GlopBuilder::setMeshVertexBuffer(const VertexBuffer& vertexBuffer, bool shadowInterp) { + TRIGGER_STAGE(kMeshStage); - mOutGlop->fill.color = { alphaScale, alphaScale, alphaScale, alphaScale }; + const VertexBuffer::MeshFeatureFlags flags = vertexBuffer.getMeshFeatureFlags(); - const bool SWAP_SRC_DST = false; - // TODO: account for texture blend - if (alphaScale < 1.0f - || (mOutGlop->mesh.vertexFlags & kAlpha_Attrib)) { - Blend::getFactors(SkXfermode::kSrcOver_Mode, SWAP_SRC_DST, - &mOutGlop->blend.src, &mOutGlop->blend.dst); - } else { - mOutGlop->blend = { GL_ZERO, GL_ZERO }; - } + bool alphaVertex = flags & VertexBuffer::kAlpha; + bool indices = flags & VertexBuffer::kIndices; + mOutGlop->mesh.vertexFlags = alphaVertex ? kAlpha_Attrib : kNone_Attrib; + mOutGlop->mesh.primitiveMode = GL_TRIANGLE_STRIP; + mOutGlop->mesh.vertexBufferObject = 0; + mOutGlop->mesh.vertices = vertexBuffer.getBuffer(); + mOutGlop->mesh.indexBufferObject = 0; + mOutGlop->mesh.indices = vertexBuffer.getIndices(); + mOutGlop->mesh.elementCount = indices + ? vertexBuffer.getIndexCount() : vertexBuffer.getVertexCount(); + mOutGlop->mesh.stride = alphaVertex ? kAlphaVertexStride : kVertexStride; + mDescription.hasVertexAlpha = alphaVertex; + mDescription.useShadowAlphaInterp = shadowInterp; return *this; } -GlopBuilder& GlopBuilder::setPaint(const SkPaint& paint, float alphaScale) { - TRIGGER_STAGE(kFillStage); - REQUIRE_STAGES(kMeshStage); - const SkShader* shader = paint.getShader(); - const SkColorFilter* colorFilter = paint.getColorFilter(); +//////////////////////////////////////////////////////////////////////////////// +// Fill +//////////////////////////////////////////////////////////////////////////////// - SkXfermode::Mode mode = PaintUtils::getXfermode(paint.getXfermode()); +void GlopBuilder::setFill(int color, float alphaScale, SkXfermode::Mode mode, + const SkShader* shader, const SkColorFilter* colorFilter) { if (mode != SkXfermode::kClear_Mode) { - int color = paint.getColor(); float alpha = (SkColorGetA(color) / 255.0f) * alphaScale; if (!shader) { float colorScale = alpha / 255.0f; mOutGlop->fill.color = { - alpha, colorScale * SkColorGetR(color), colorScale * SkColorGetG(color), - colorScale * SkColorGetB(color) + colorScale * SkColorGetB(color), + alpha }; } else { - mOutGlop->fill.color = { alpha, 1, 1, 1 }; + mOutGlop->fill.color = { 1, 1, 1, alpha }; } } else { - mOutGlop->fill.color = { 1, 0, 0, 0 }; + mOutGlop->fill.color = { 0, 0, 0, 1 }; } const bool SWAP_SRC_DST = false; mOutGlop->blend = { GL_ZERO, GL_ZERO }; if (mOutGlop->fill.color.a < 1.0f || (mOutGlop->mesh.vertexFlags & kAlpha_Attrib) + || (mOutGlop->fill.texture && mOutGlop->fill.texture->blend) + || mOutGlop->roundRectClipState || PaintUtils::isBlendedShader(shader) || PaintUtils::isBlendedColorFilter(colorFilter) || mode != SkXfermode::kSrcOver_Mode) { @@ -218,10 +210,10 @@ GlopBuilder& GlopBuilder::setPaint(const SkPaint& paint, float alphaScale) { const float alpha = SkColorGetA(color) / 255.0f; float colorScale = alpha / 255.0f; mOutGlop->fill.filter.color = { - alpha, colorScale * SkColorGetR(color), colorScale * SkColorGetG(color), colorScale * SkColorGetB(color), + alpha, }; } else if (colorFilter->asColorMatrix(srcColorMatrix)) { mOutGlop->fill.filterMode = mDescription.colorOp = ProgramDescription::kColorMatrix; @@ -245,18 +237,173 @@ GlopBuilder& GlopBuilder::setPaint(const SkPaint& paint, float alphaScale) { } else { mOutGlop->fill.filterMode = ProgramDescription::kColorNone; } +} + +GlopBuilder& GlopBuilder::setFillTexturePaint(Texture& texture, bool isAlphaMaskTexture, + const SkPaint* paint, float alphaScale) { + TRIGGER_STAGE(kFillStage); + REQUIRE_STAGES(kMeshStage); + + mOutGlop->fill.texture = &texture; + mOutGlop->fill.textureFilter = PaintUtils::getFilter(paint); + mOutGlop->fill.textureClamp = GL_CLAMP_TO_EDGE; + + if (paint) { + int color = paint->getColor(); + SkShader* shader = paint->getShader(); + + if (!isAlphaMaskTexture) { + // Texture defines color, so disable shaders, and reset all non-alpha color channels + color |= 0x00FFFFFF; + shader = nullptr; + } + setFill(color, alphaScale, PaintUtils::getXfermode(paint->getXfermode()), + shader, paint->getColorFilter()); + } else { + mOutGlop->fill.color = { alphaScale, alphaScale, alphaScale, alphaScale }; + + const bool SWAP_SRC_DST = false; + if (alphaScale < 1.0f + || (mOutGlop->mesh.vertexFlags & kAlpha_Attrib) + || texture.blend + || mOutGlop->roundRectClipState) { + Blend::getFactors(SkXfermode::kSrcOver_Mode, SWAP_SRC_DST, + &mOutGlop->blend.src, &mOutGlop->blend.dst); + } else { + mOutGlop->blend = { GL_ZERO, GL_ZERO }; + } + } + + if (isAlphaMaskTexture) { + mDescription.modulate = mOutGlop->fill.color.a < 1.0f + || mOutGlop->fill.color.r > 0.0f + || mOutGlop->fill.color.g > 0.0f + || mOutGlop->fill.color.b > 0.0f; + } else { + mDescription.modulate = mOutGlop->fill.color.a < 1.0f; + } + return *this; +} + +GlopBuilder& GlopBuilder::setFillPaint(const SkPaint& paint, float alphaScale) { + TRIGGER_STAGE(kFillStage); + REQUIRE_STAGES(kMeshStage); + + mOutGlop->fill.texture = nullptr; + mOutGlop->fill.textureFilter = GL_INVALID_ENUM; + mOutGlop->fill.textureClamp = GL_INVALID_ENUM; + + setFill(paint.getColor(), alphaScale, PaintUtils::getXfermode(paint.getXfermode()), + paint.getShader(), paint.getColorFilter()); + mDescription.modulate = mOutGlop->fill.color.a < 1.0f; + return *this; +} + +GlopBuilder& GlopBuilder::setFillPathTexturePaint(Texture& texture, + const SkPaint& paint, float alphaScale) { + TRIGGER_STAGE(kFillStage); + REQUIRE_STAGES(kMeshStage); + + mOutGlop->fill.texture = &texture; + + //specify invalid, since these are always static for path textures + mOutGlop->fill.textureFilter = GL_INVALID_ENUM; + mOutGlop->fill.textureClamp = GL_INVALID_ENUM; + + setFill(paint.getColor(), alphaScale, PaintUtils::getXfermode(paint.getXfermode()), + paint.getShader(), paint.getColorFilter()); + + mDescription.modulate = mOutGlop->fill.color.a < 1.0f + || mOutGlop->fill.color.r > 0.0f + || mOutGlop->fill.color.g > 0.0f + || mOutGlop->fill.color.b > 0.0f; + return *this; +} + +//////////////////////////////////////////////////////////////////////////////// +// Transform +//////////////////////////////////////////////////////////////////////////////// + +GlopBuilder& GlopBuilder::setTransformClip(const Matrix4& ortho, + const Matrix4& transform, bool fudgingOffset) { + TRIGGER_STAGE(kTransformStage); + + mOutGlop->transform.ortho.load(ortho); + mOutGlop->transform.canvas.load(transform); + mOutGlop->transform.fudgingOffset = fudgingOffset; + return *this; +} + +//////////////////////////////////////////////////////////////////////////////// +// ModelView +//////////////////////////////////////////////////////////////////////////////// + +GlopBuilder& GlopBuilder::setModelViewMapUnitToRect(const Rect destination) { + TRIGGER_STAGE(kModelViewStage); + + mOutGlop->transform.modelView.loadTranslate(destination.left, destination.top, 0.0f); + mOutGlop->transform.modelView.scale(destination.getWidth(), destination.getHeight(), 1.0f); + mOutGlop->bounds = destination; + return *this; +} + +GlopBuilder& GlopBuilder::setModelViewMapUnitToRectSnap(const Rect destination) { + TRIGGER_STAGE(kModelViewStage); + REQUIRE_STAGES(kTransformStage | kFillStage); + + float left = destination.left; + float top = destination.top; + + const Matrix4& canvasTransform = mOutGlop->transform.canvas; + if (CC_LIKELY(canvasTransform.isPureTranslate())) { + const float translateX = canvasTransform.getTranslateX(); + const float translateY = canvasTransform.getTranslateY(); + + left = (int) floorf(left + translateX + 0.5f) - translateX; + top = (int) floorf(top + translateY + 0.5f) - translateY; + mOutGlop->fill.textureFilter = GL_NEAREST; + } + mOutGlop->transform.modelView.loadTranslate(left, top, 0.0f); + mOutGlop->transform.modelView.scale(destination.getWidth(), destination.getHeight(), 1.0f); + mOutGlop->bounds = destination; return *this; } +GlopBuilder& GlopBuilder::setModelViewOffsetRect(float offsetX, float offsetY, const Rect source) { + TRIGGER_STAGE(kModelViewStage); + + mOutGlop->transform.modelView.loadTranslate(offsetX, offsetY, 0.0f); + mOutGlop->bounds = source; + mOutGlop->bounds.translate(offsetX, offsetY); + return *this; +} + +GlopBuilder& GlopBuilder::setRoundRectClipState(const RoundRectClipState* roundRectClipState) { + TRIGGER_STAGE(kRoundRectClipStage); + + mOutGlop->roundRectClipState = roundRectClipState; + mDescription.hasRoundRectClip = roundRectClipState != nullptr; + return *this; +} + +//////////////////////////////////////////////////////////////////////////////// +// Build +//////////////////////////////////////////////////////////////////////////////// + void GlopBuilder::build() { REQUIRE_STAGES(kAllStages); - mDescription.modulate = mOutGlop->fill.color.a < 1.0f; mOutGlop->fill.program = mCaches.programCache.get(mDescription); mOutGlop->transform.canvas.mapRect(mOutGlop->bounds); + + // duplicates ProgramCache's definition of color uniform presence + const bool singleColor = !mDescription.hasTexture + && !mDescription.hasExternalTexture + && !mDescription.hasGradient + && !mDescription.hasBitmap; + mOutGlop->fill.colorEnabled = mDescription.modulate || singleColor; } } /* namespace uirenderer */ } /* namespace android */ - diff --git a/libs/hwui/GlopBuilder.h b/libs/hwui/GlopBuilder.h index 48ce81a..d724041 100644 --- a/libs/hwui/GlopBuilder.h +++ b/libs/hwui/GlopBuilder.h @@ -38,25 +38,37 @@ public: GlopBuilder(RenderState& renderState, Caches& caches, Glop* outGlop); GlopBuilder& setMeshUnitQuad(); + GlopBuilder& setMeshTexturedUnitQuad(const UvMapper* uvMapper, bool isAlphaMaskTexture); GlopBuilder& setMeshVertexBuffer(const VertexBuffer& vertexBuffer, bool shadowInterp); GlopBuilder& setMeshIndexedQuads(void* vertexData, int quadCount); - GlopBuilder& setTransform(const Matrix4& ortho, const Matrix4& transform, bool fudgingOffset); + GlopBuilder& setFillPaint(const SkPaint& paint, float alphaScale); + GlopBuilder& setFillTexturePaint(Texture& texture, bool isAlphaMaskTexture, + const SkPaint* paint, float alphaScale); + GlopBuilder& setFillPathTexturePaint(Texture& texture, + const SkPaint& paint, float alphaScale); + + GlopBuilder& setTransformClip(const Matrix4& ortho, const Matrix4& transform, bool fudgingOffset); GlopBuilder& setModelViewMapUnitToRect(const Rect destination); + GlopBuilder& setModelViewMapUnitToRectSnap(const Rect destination); GlopBuilder& setModelViewOffsetRect(float offsetX, float offsetY, const Rect source); - GlopBuilder& setOptionalPaint(const SkPaint* paint, float alphaScale); - GlopBuilder& setPaint(const SkPaint& paint, float alphaScale); + GlopBuilder& setRoundRectClipState(const RoundRectClipState* roundRectClipState); + void build(); private: + void setFill(int color, float alphaScale, SkXfermode::Mode mode, + const SkShader* shader, const SkColorFilter* colorFilter); + enum StageFlags { kInitialStage = 0, kMeshStage = 1 << 0, kTransformStage = 1 << 1, kModelViewStage = 1 << 2, kFillStage = 1 << 3, - kAllStages = kMeshStage | kTransformStage | kModelViewStage | kFillStage, + kRoundRectClipStage = 1 << 4, + kAllStages = kMeshStage | kFillStage | kTransformStage | kModelViewStage | kRoundRectClipStage, } mStageFlags; ProgramDescription mDescription; diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 61cd16f..a00a2bc 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -57,16 +57,11 @@ #define EVENT_LOGD(...) #endif +#define USE_GLOPS true + namespace android { namespace uirenderer { -static GLenum getFilter(const SkPaint* paint) { - if (!paint || paint->getFilterLevel() != SkPaint::kNone_FilterLevel) { - return GL_LINEAR; - } - return GL_NEAREST; -} - /////////////////////////////////////////////////////////////////////////////// // Globals /////////////////////////////////////////////////////////////////////////////// @@ -1586,6 +1581,7 @@ void OpenGLRenderer::renderGlop(const Glop& glop) { // TODO: specify more clearly when a draw should dirty the layer. // is writing to the stencil the only time we should ignore this? dirtyLayer(glop.bounds.left, glop.bounds.top, glop.bounds.right, glop.bounds.bottom); + mDirty = true; } } @@ -1611,7 +1607,7 @@ void OpenGLRenderer::setupDraw(bool clearLayer) { mSetShaderColor = false; mColorSet = false; - mColorA = mColorR = mColorG = mColorB = 0.0f; + mColor.a = mColor.r = mColor.g = mColor.b = 0.0f; mTextureUnit = 0; mTrackDirtyRegions = true; @@ -1647,21 +1643,21 @@ void OpenGLRenderer::setupDrawVertexAlpha(bool useShadowAlphaInterp) { } void OpenGLRenderer::setupDrawColor(int color, int alpha) { - mColorA = alpha / 255.0f; - mColorR = mColorA * ((color >> 16) & 0xFF) / 255.0f; - mColorG = mColorA * ((color >> 8) & 0xFF) / 255.0f; - mColorB = mColorA * ((color ) & 0xFF) / 255.0f; + mColor.a = alpha / 255.0f; + mColor.r = mColor.a * ((color >> 16) & 0xFF) / 255.0f; + mColor.g = mColor.a * ((color >> 8) & 0xFF) / 255.0f; + mColor.b = mColor.a * ((color ) & 0xFF) / 255.0f; mColorSet = true; - mSetShaderColor = mDescription.setColorModulate(mColorA); + mSetShaderColor = mDescription.setColorModulate(mColor.a); } void OpenGLRenderer::setupDrawAlpha8Color(int color, int alpha) { - mColorA = alpha / 255.0f; - mColorR = mColorA * ((color >> 16) & 0xFF) / 255.0f; - mColorG = mColorA * ((color >> 8) & 0xFF) / 255.0f; - mColorB = mColorA * ((color ) & 0xFF) / 255.0f; + mColor.a = alpha / 255.0f; + mColor.r = mColor.a * ((color >> 16) & 0xFF) / 255.0f; + mColor.g = mColor.a * ((color >> 8) & 0xFF) / 255.0f; + mColor.b = mColor.a * ((color ) & 0xFF) / 255.0f; mColorSet = true; - mSetShaderColor = mDescription.setAlpha8ColorModulate(mColorR, mColorG, mColorB, mColorA); + mSetShaderColor = mDescription.setAlpha8ColorModulate(mColor.r, mColor.g, mColor.b, mColor.a); } void OpenGLRenderer::setupDrawTextGamma(const SkPaint* paint) { @@ -1669,10 +1665,10 @@ void OpenGLRenderer::setupDrawTextGamma(const SkPaint* paint) { } void OpenGLRenderer::setupDrawColor(float r, float g, float b, float a) { - mColorA = a; - mColorR = r; - mColorG = g; - mColorB = b; + mColor.a = a; + mColor.r = r; + mColor.g = g; + mColor.b = b; mColorSet = true; mSetShaderColor = mDescription.setColorModulate(a); } @@ -1699,8 +1695,8 @@ void OpenGLRenderer::setupDrawColorFilter(const SkColorFilter* filter) { void OpenGLRenderer::accountForClear(SkXfermode::Mode mode) { if (mColorSet && mode == SkXfermode::kClear_Mode) { - mColorA = 1.0f; - mColorR = mColorG = mColorB = 0.0f; + mColor.a = 1.0f; + mColor.r = mColor.g = mColor.b = 0.0f; mSetShaderColor = mDescription.modulate = true; } } @@ -1713,7 +1709,7 @@ void OpenGLRenderer::setupDrawBlending(const Layer* layer, bool swapSrcDst) { // TODO: check shader blending, once we have shader drawing support for layers. bool blend = layer->isBlend() || getLayerAlpha(layer) < 1.0f - || (mColorSet && mColorA < 1.0f) + || (mColorSet && mColor.a < 1.0f) || PaintUtils::isBlendedColorFilter(layer->getColorFilter()); chooseBlending(blend, mode, mDescription, swapSrcDst); } @@ -1723,7 +1719,7 @@ void OpenGLRenderer::setupDrawBlending(const SkPaint* paint, bool blend, bool sw // When the blending mode is kClear_Mode, we need to use a modulate color // argb=1,0,0,0 accountForClear(mode); - blend |= (mColorSet && mColorA < 1.0f) + blend |= (mColorSet && mColor.a < 1.0f) || (getShader(paint) && !getShader(paint)->isOpaque()) || PaintUtils::isBlendedColorFilter(getColorFilter(paint)); chooseBlending(blend, mode, mDescription, swapSrcDst); @@ -1775,13 +1771,13 @@ void OpenGLRenderer::setupDrawModelView(ModelViewMode mode, bool offset, void OpenGLRenderer::setupDrawColorUniforms(bool hasShader) { if ((mColorSet && !hasShader) || (hasShader && mSetShaderColor)) { - mCaches.program().setColor(mColorR, mColorG, mColorB, mColorA); + mCaches.program().setColor(mColor); } } void OpenGLRenderer::setupDrawPureColorUniforms() { if (mSetShaderColor) { - mCaches.program().setColor(mColorR, mColorG, mColorB, mColorA); + mCaches.program().setColor(mColor); } } @@ -1973,22 +1969,34 @@ void OpenGLRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t } } -void OpenGLRenderer::drawAlphaBitmap(Texture* texture, float left, float top, - const SkPaint* paint) { - float x = left; - float y = top; +void OpenGLRenderer::drawAlphaBitmap(Texture* texture, const SkPaint* paint) { + if (USE_GLOPS && (!paint || !paint->getShader())) { + Glop glop; + GlopBuilder aBuilder(mRenderState, mCaches, &glop); + aBuilder.setMeshTexturedUnitQuad(texture->uvMapper, true) + .setFillTexturePaint(*texture, true, paint, currentSnapshot()->alpha) + .setTransformClip(currentSnapshot()->getOrthoMatrix(), *currentTransform(), false) + .setModelViewMapUnitToRectSnap(Rect(0, 0, texture->width, texture->height)) + .setRoundRectClipState(currentSnapshot()->roundRectClipState) + .build(); + renderGlop(glop); + return; + } + + float x = 0; + float y = 0; texture->setWrap(GL_CLAMP_TO_EDGE, true); bool ignoreTransform = false; if (currentTransform()->isPureTranslate()) { - x = (int) floorf(left + currentTransform()->getTranslateX() + 0.5f); - y = (int) floorf(top + currentTransform()->getTranslateY() + 0.5f); + x = (int) floorf(currentTransform()->getTranslateX() + 0.5f); + y = (int) floorf(currentTransform()->getTranslateY() + 0.5f); ignoreTransform = true; texture->setFilter(GL_NEAREST, true); } else { - texture->setFilter(getFilter(paint), true); + texture->setFilter(PaintUtils::getFilter(paint), true); } // No need to check for a UV mapper on the texture object, only ARGB_8888 @@ -2013,7 +2021,7 @@ void OpenGLRenderer::drawBitmaps(const SkBitmap* bitmap, AssetAtlas::Entry* entr const AutoTexture autoCleanup(texture); texture->setWrap(GL_CLAMP_TO_EDGE, true); - texture->setFilter(pureTranslate ? GL_NEAREST : getFilter(paint), true); + texture->setFilter(pureTranslate ? GL_NEAREST : PaintUtils::getFilter(paint), true); const float x = (int) floorf(bounds.left + 0.5f); const float y = (int) floorf(bounds.top + 0.5f); @@ -2043,9 +2051,9 @@ void OpenGLRenderer::drawBitmap(const SkBitmap* bitmap, const SkPaint* paint) { const AutoTexture autoCleanup(texture); if (CC_UNLIKELY(bitmap->colorType() == kAlpha_8_SkColorType)) { - drawAlphaBitmap(texture, 0, 0, paint); + drawAlphaBitmap(texture, paint); } else { - drawTextureRect(0, 0, bitmap->width(), bitmap->height(), texture, paint); + drawTextureRect(texture, paint); } mDirty = true; @@ -2130,7 +2138,7 @@ void OpenGLRenderer::drawBitmapMesh(const SkBitmap* bitmap, int meshWidth, int m const AutoTexture autoCleanup(texture); texture->setWrap(GL_CLAMP_TO_EDGE, true); - texture->setFilter(getFilter(paint), true); + texture->setFilter(PaintUtils::getFilter(paint), true); int alpha; SkXfermode::Mode mode; @@ -2213,10 +2221,10 @@ void OpenGLRenderer::drawBitmap(const SkBitmap* bitmap, dstLeft = x; dstTop = y; - texture->setFilter(scaled ? getFilter(paint) : GL_NEAREST, true); + texture->setFilter(scaled ? PaintUtils::getFilter(paint) : GL_NEAREST, true); ignoreTransform = true; } else { - texture->setFilter(getFilter(paint), true); + texture->setFilter(PaintUtils::getFilter(paint), true); } if (CC_UNLIKELY(useScaleTransform)) { @@ -2350,15 +2358,16 @@ void OpenGLRenderer::drawVertexBuffer(float translateX, float translateY, return; } - if (!paint->getShader() && !currentSnapshot()->roundRectClipState) { + if (USE_GLOPS && !paint->getShader()) { Glop glop; GlopBuilder aBuilder(mRenderState, mCaches, &glop); bool fudgeOffset = displayFlags & kVertexBuffer_Offset; bool shadowInterp = displayFlags & kVertexBuffer_ShadowInterp; aBuilder.setMeshVertexBuffer(vertexBuffer, shadowInterp) - .setTransform(currentSnapshot()->getOrthoMatrix(), *currentTransform(), fudgeOffset) + .setFillPaint(*paint, currentSnapshot()->alpha) + .setTransformClip(currentSnapshot()->getOrthoMatrix(), *currentTransform(), fudgeOffset) .setModelViewOffsetRect(translateX, translateY, vertexBuffer.getBounds()) - .setPaint(*paint, currentSnapshot()->alpha) + .setRoundRectClipState(currentSnapshot()->roundRectClipState) .build(); renderGlop(glop); return; @@ -2496,7 +2505,7 @@ void OpenGLRenderer::drawColor(int color, SkXfermode::Mode mode) { mDirty = true; } -void OpenGLRenderer::drawShape(float left, float top, const PathTexture* texture, +void OpenGLRenderer::drawShape(float left, float top, PathTexture* texture, const SkPaint* paint) { if (!texture) return; const AutoTexture autoCleanup(texture); @@ -2519,7 +2528,7 @@ void OpenGLRenderer::drawRoundRect(float left, float top, float right, float bot if (p->getPathEffect() != nullptr) { mCaches.textureState().activateTexture(0); - const PathTexture* texture = mCaches.pathCache.getRoundRect( + PathTexture* texture = mCaches.pathCache.getRoundRect( right - left, bottom - top, rx, ry, p); drawShape(left, top, texture, p); } else { @@ -2537,7 +2546,7 @@ void OpenGLRenderer::drawCircle(float x, float y, float radius, const SkPaint* p } if (p->getPathEffect() != nullptr) { mCaches.textureState().activateTexture(0); - const PathTexture* texture = mCaches.pathCache.getCircle(radius, p); + PathTexture* texture = mCaches.pathCache.getCircle(radius, p); drawShape(x - radius, y - radius, texture, p); } else { SkPath path; @@ -2560,7 +2569,7 @@ void OpenGLRenderer::drawOval(float left, float top, float right, float bottom, if (p->getPathEffect() != nullptr) { mCaches.textureState().activateTexture(0); - const PathTexture* texture = mCaches.pathCache.getOval(right - left, bottom - top, p); + PathTexture* texture = mCaches.pathCache.getOval(right - left, bottom - top, p); drawShape(left, top, texture, p); } else { SkPath path; @@ -2584,7 +2593,7 @@ void OpenGLRenderer::drawArc(float left, float top, float right, float bottom, // TODO: support fills (accounting for concavity if useCenter && sweepAngle > 180) if (p->getStyle() != SkPaint::kStroke_Style || p->getPathEffect() != nullptr || useCenter) { mCaches.textureState().activateTexture(0); - const PathTexture* texture = mCaches.pathCache.getArc(right - left, bottom - top, + PathTexture* texture = mCaches.pathCache.getArc(right - left, bottom - top, startAngle, sweepAngle, useCenter, p); drawShape(left, top, texture, p); return; @@ -2621,7 +2630,7 @@ void OpenGLRenderer::drawRect(float left, float top, float right, float bottom, if (p->getPathEffect() != nullptr || p->getStrokeJoin() != SkPaint::kMiter_Join || p->getStrokeMiter() != SkPaintDefaults_MiterLimit) { mCaches.textureState().activateTexture(0); - const PathTexture* texture = + PathTexture* texture = mCaches.pathCache.getRect(right - left, bottom - top, p); drawShape(left, top, texture, p); } else { @@ -2965,7 +2974,7 @@ void OpenGLRenderer::drawPath(const SkPath* path, const SkPaint* paint) { mCaches.textureState().activateTexture(0); - const PathTexture* texture = mCaches.pathCache.get(path, paint); + PathTexture* texture = mCaches.pathCache.get(path, paint); if (!texture) return; const AutoTexture autoCleanup(texture); @@ -3098,12 +3107,26 @@ Texture* OpenGLRenderer::getTexture(const SkBitmap* bitmap) { return texture; } -void OpenGLRenderer::drawPathTexture(const PathTexture* texture, +void OpenGLRenderer::drawPathTexture(PathTexture* texture, float x, float y, const SkPaint* paint) { if (quickRejectSetupScissor(x, y, x + texture->width, y + texture->height)) { return; } + if (USE_GLOPS && !paint->getShader()) { + Glop glop; + GlopBuilder aBuilder(mRenderState, mCaches, &glop); + aBuilder.setMeshTexturedUnitQuad(nullptr, true) + .setFillPathTexturePaint(*texture, *paint, currentSnapshot()->alpha) + .setTransformClip(currentSnapshot()->getOrthoMatrix(), *currentTransform(), false) + .setModelViewMapUnitToRect(Rect(x, y, x + texture->width, y + texture->height)) + .setRoundRectClipState(currentSnapshot()->roundRectClipState) + .build(); + renderGlop(glop); + return; + } + + int alpha; SkXfermode::Mode mode; getAlphaAndMode(paint, &alpha, &mode); @@ -3251,14 +3274,15 @@ void OpenGLRenderer::drawColorRects(const float* rects, int count, const SkPaint return; } - if (!paint->getShader() && !currentSnapshot()->roundRectClipState) { + if (USE_GLOPS && !paint->getShader()) { const Matrix4& transform = ignoreTransform ? Matrix4::identity() : *currentTransform(); Glop glop; GlopBuilder aBuilder(mRenderState, mCaches, &glop); aBuilder.setMeshIndexedQuads(&mesh[0], count / 4) - .setTransform(currentSnapshot()->getOrthoMatrix(), transform, false) + .setFillPaint(*paint, currentSnapshot()->alpha) + .setTransformClip(currentSnapshot()->getOrthoMatrix(), transform, false) .setModelViewOffsetRect(0, 0, Rect(left, top, right, bottom)) - .setPaint(*paint, currentSnapshot()->alpha) + .setRoundRectClipState(currentSnapshot()->roundRectClipState) .build(); renderGlop(glop); return; @@ -3296,14 +3320,15 @@ void OpenGLRenderer::drawColorRects(const float* rects, int count, const SkPaint void OpenGLRenderer::drawColorRect(float left, float top, float right, float bottom, const SkPaint* paint, bool ignoreTransform) { - if (!paint->getShader() && !currentSnapshot()->roundRectClipState) { + if (USE_GLOPS && !paint->getShader()) { const Matrix4& transform = ignoreTransform ? Matrix4::identity() : *currentTransform(); Glop glop; GlopBuilder aBuilder(mRenderState, mCaches, &glop); aBuilder.setMeshUnitQuad() - .setTransform(currentSnapshot()->getOrthoMatrix(), transform, false) + .setFillPaint(*paint, currentSnapshot()->alpha) + .setTransformClip(currentSnapshot()->getOrthoMatrix(), transform, false) .setModelViewMapUnitToRect(Rect(left, top, right, bottom)) - .setPaint(*paint, currentSnapshot()->alpha) + .setRoundRectClipState(currentSnapshot()->roundRectClipState) .build(); renderGlop(glop); return; @@ -3332,8 +3357,20 @@ void OpenGLRenderer::drawColorRect(float left, float top, float right, float bot glDrawArrays(GL_TRIANGLE_STRIP, 0, kUnitQuadCount); } -void OpenGLRenderer::drawTextureRect(float left, float top, float right, float bottom, - Texture* texture, const SkPaint* paint) { +void OpenGLRenderer::drawTextureRect(Texture* texture, const SkPaint* paint) { + if (USE_GLOPS) { + Glop glop; + GlopBuilder aBuilder(mRenderState, mCaches, &glop); + aBuilder.setMeshTexturedUnitQuad(texture->uvMapper, false) + .setFillTexturePaint(*texture, false, paint, currentSnapshot()->alpha) + .setTransformClip(currentSnapshot()->getOrthoMatrix(), *currentTransform(), false) + .setModelViewMapUnitToRectSnap(Rect(0, 0, texture->width, texture->height)) + .setRoundRectClipState(currentSnapshot()->roundRectClipState) + .build(); + renderGlop(glop); + return; + } + texture->setWrap(GL_CLAMP_TO_EDGE, true); GLvoid* vertices = (GLvoid*) nullptr; @@ -3350,16 +3387,16 @@ void OpenGLRenderer::drawTextureRect(float left, float top, float right, float b } if (CC_LIKELY(currentTransform()->isPureTranslate())) { - const float x = (int) floorf(left + currentTransform()->getTranslateX() + 0.5f); - const float y = (int) floorf(top + currentTransform()->getTranslateY() + 0.5f); + const float x = (int) floorf(currentTransform()->getTranslateX() + 0.5f); + const float y = (int) floorf(currentTransform()->getTranslateY() + 0.5f); texture->setFilter(GL_NEAREST, true); drawTextureMesh(x, y, x + texture->width, y + texture->height, texture->id, paint, texture->blend, vertices, texCoords, GL_TRIANGLE_STRIP, kUnitQuadCount, false, true); } else { - texture->setFilter(getFilter(paint), true); - drawTextureMesh(left, top, right, bottom, texture->id, paint, + texture->setFilter(PaintUtils::getFilter(paint), true); + drawTextureMesh(0, 0, texture->width, texture->height, texture->id, paint, texture->blend, vertices, texCoords, GL_TRIANGLE_STRIP, kUnitQuadCount); } diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index f097041..851effa 100755 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -690,18 +690,16 @@ private: * @param texture The texture reprsenting the shape * @param paint The paint to draw the shape with */ - void drawShape(float left, float top, const PathTexture* texture, const SkPaint* paint); + void drawShape(float left, float top, PathTexture* texture, const SkPaint* paint); /** * Draws the specified texture as an alpha bitmap. Alpha bitmaps obey * different compositing rules. * * @param texture The texture to draw with - * @param left The x coordinate of the bitmap - * @param top The y coordinate of the bitmap * @param paint The paint to render with */ - void drawAlphaBitmap(Texture* texture, float left, float top, const SkPaint* paint); + void drawAlphaBitmap(Texture* texture, const SkPaint* paint); /** * Renders a strip of polygons with the specified paint, used for tessellated geometry. @@ -730,18 +728,12 @@ private: void drawConvexPath(const SkPath& path, const SkPaint* paint); /** - * Draws a textured rectangle with the specified texture. The specified coordinates - * are transformed by the current snapshot's transform matrix. + * Draws a textured rectangle with the specified texture. * - * @param left The left coordinate of the rectangle - * @param top The top coordinate of the rectangle - * @param right The right coordinate of the rectangle - * @param bottom The bottom coordinate of the rectangle * @param texture The texture to use * @param paint The paint containing the alpha, blending mode, etc. */ - void drawTextureRect(float left, float top, float right, float bottom, - Texture* texture, const SkPaint* paint); + void drawTextureRect(Texture* texture, const SkPaint* paint); /** * Draws a textured mesh with the specified texture. If the indices are omitted, @@ -827,7 +819,7 @@ private: * @param y The y coordinate where the texture will be drawn * @param paint The paint to draw the texture with */ - void drawPathTexture(const PathTexture* texture, float x, float y, const SkPaint* paint); + void drawPathTexture(PathTexture* texture, float x, float y, const SkPaint* paint); /** * Resets the texture coordinates stored in mMeshVertices. Setting the values @@ -1010,7 +1002,7 @@ private: ProgramDescription mDescription; // Color description bool mColorSet; - float mColorA, mColorR, mColorG, mColorB; + FloatColor mColor; // Indicates that the shader should get a color bool mSetShaderColor; // Current texture unit diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index 5f34b34..32713e9 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -177,12 +177,12 @@ void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix, glUniformMatrix4fv(transform, 1, GL_FALSE, &t.data[0]); } -void Program::setColor(const float r, const float g, const float b, const float a) { +void Program::setColor(FloatColor color) { if (!mHasColorUniform) { mColorUniform = getUniform("color"); mHasColorUniform = true; } - glUniform4f(mColorUniform, r, g, b, a); + glUniform4f(mColorUniform, color.r, color.g, color.b, color.a); } void Program::use() { diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index 01231b5..af1e4a7 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -25,6 +25,7 @@ #include <SkXfermode.h> #include "Debug.h" +#include "FloatColor.h" #include "Matrix.h" #include "Properties.h" @@ -363,7 +364,7 @@ public: /** * Sets the color associated with this shader. */ - void setColor(const float r, const float g, const float b, const float a); + void setColor(FloatColor color); /** * Name of the texCoords attribute if it exists (kBindingTexCoords), -1 otherwise. diff --git a/libs/hwui/Vertex.h b/libs/hwui/Vertex.h index 5b80bbd..fd3845d 100644 --- a/libs/hwui/Vertex.h +++ b/libs/hwui/Vertex.h @@ -19,11 +19,9 @@ #include "Vector.h" -#include <type_traits> +#include "utils/Macros.h" -#define REQUIRE_COMPATIBLE_LAYOUT(TARGET_TYPE) \ - static_assert(std::is_standard_layout<TARGET_TYPE>::value, \ - #TARGET_TYPE " must have standard layout") +#include <type_traits> namespace android { namespace uirenderer { diff --git a/libs/hwui/renderstate/Blend.cpp b/libs/hwui/renderstate/Blend.cpp index c751dba..789f6cc 100644 --- a/libs/hwui/renderstate/Blend.cpp +++ b/libs/hwui/renderstate/Blend.cpp @@ -119,7 +119,7 @@ void Blend::setFactors(GLenum srcMode, GLenum dstMode) { mEnabled = true; } - if (srcMode != mSrcMode || dstMode != mSrcMode) { + if (srcMode != mSrcMode || dstMode != mDstMode) { glBlendFunc(srcMode, dstMode); mSrcMode = srcMode; mDstMode = dstMode; diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp index 6394dc1..e35327b 100644 --- a/libs/hwui/renderstate/RenderState.cpp +++ b/libs/hwui/renderstate/RenderState.cpp @@ -209,23 +209,25 @@ void RenderState::postDecStrong(VirtualLightRefBase* object) { void RenderState::render(const Glop& glop) { const Glop::Mesh& mesh = glop.mesh; - const Glop::Fill& shader = glop.fill; + const Glop::Fill& fill = glop.fill; - // -------------------------------------------- - // ---------- Shader + uniform setup ---------- - // -------------------------------------------- - mCaches->setProgram(shader.program); + // --------------------------------------------- + // ---------- Program + uniform setup ---------- + // --------------------------------------------- + mCaches->setProgram(fill.program); - Glop::FloatColor color = shader.color; - shader.program->setColor(color.r, color.g, color.b, color.a); + if (fill.colorEnabled) { + fill.program->setColor(fill.color); + } - shader.program->set(glop.transform.ortho, + fill.program->set(glop.transform.ortho, glop.transform.modelView, glop.transform.canvas, glop.transform.fudgingOffset); + // Color filter uniforms if (glop.fill.filterMode == ProgramDescription::kColorBlend) { - const Glop::FloatColor& color = glop.fill.filter.color; + const FloatColor& color = glop.fill.filter.color; glUniform4f(mCaches->program().getUniform("colorBlend"), color.r, color.g, color.b, color.a); } else if (glop.fill.filterMode == ProgramDescription::kColorMatrix) { @@ -235,11 +237,28 @@ void RenderState::render(const Glop& glop) { glop.fill.filter.matrix.vector); } + // Round rect clipping uniforms + if (glop.roundRectClipState) { + // TODO: avoid query, and cache values (or RRCS ptr) in program + const RoundRectClipState* state = glop.roundRectClipState; + const Rect& innerRect = state->innerRect; + glUniform4f(fill.program->getUniform("roundRectInnerRectLTRB"), + innerRect.left, innerRect.top, + innerRect.right, innerRect.bottom); + glUniformMatrix4fv(fill.program->getUniform("roundRectInvTransform"), + 1, GL_FALSE, &state->matrix.data[0]); + + // add half pixel to round out integer rect space to cover pixel centers + float roundedOutRadius = state->radius + 0.5f; + glUniform1f(fill.program->getUniform("roundRectRadius"), + roundedOutRadius); + } + // -------------------------------- // ---------- Mesh setup ---------- // -------------------------------- // vertices - bool force = meshState().bindMeshBufferInternal(mesh.vertexBufferObject) + const bool force = meshState().bindMeshBufferInternal(mesh.vertexBufferObject) || (mesh.vertices != nullptr); meshState().bindPositionVertexPointer(force, mesh.vertices, mesh.stride); @@ -247,19 +266,30 @@ void RenderState::render(const Glop& glop) { meshState().bindIndicesBufferInternal(mesh.indexBufferObject); if (mesh.vertexFlags & kTextureCoord_Attrib) { - // TODO: support textures - LOG_ALWAYS_FATAL("textures not yet supported"); + // TODO: to support shaders, increment texture unit + mCaches->textureState().activateTexture(0); + + if (glop.fill.textureClamp != GL_INVALID_ENUM) { + glop.fill.texture->setWrap(glop.fill.textureClamp, true); + } + if (glop.fill.textureFilter != GL_INVALID_ENUM) { + glop.fill.texture->setFilter(glop.fill.textureFilter, true); + } + + mCaches->textureState().bindTexture(fill.texture->id); + meshState().enableTexCoordsVertexArray(); + meshState().bindTexCoordsVertexPointer(force, mesh.texCoordOffset); } else { meshState().disableTexCoordsVertexArray(); } if (mesh.vertexFlags & kColor_Attrib) { LOG_ALWAYS_FATAL("color vertex attribute not yet supported"); - // TODO: enable color, disable when done + // TODO: enable color attribute, disable when done } int alphaSlot = -1; if (mesh.vertexFlags & kAlpha_Attrib) { const void* alphaCoords = ((const GLbyte*) glop.mesh.vertices) + kVertexAlphaOffset; - alphaSlot = shader.program->getAttrib("vtxAlpha"); + alphaSlot = fill.program->getAttrib("vtxAlpha"); glEnableVertexAttribArray(alphaSlot); glVertexAttribPointer(alphaSlot, 1, GL_FLOAT, GL_FALSE, kAlphaVertexStride, alphaCoords); } @@ -275,7 +305,7 @@ void RenderState::render(const Glop& glop) { if (mesh.indexBufferObject == meshState().getQuadListIBO()) { // Since the indexed quad list is of limited length, we loop over // the glDrawXXX method while updating the vertex pointer - GLsizei elementsCount = mesh.vertexCount; + GLsizei elementsCount = mesh.elementCount; const GLbyte* vertices = static_cast<const GLbyte*>(mesh.vertices); while (elementsCount > 0) { GLsizei drawCount = MathUtils::min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6); @@ -287,9 +317,9 @@ void RenderState::render(const Glop& glop) { vertices += (drawCount / 6) * 4 * mesh.stride; } } else if (mesh.indexBufferObject || mesh.indices) { - glDrawElements(mesh.primitiveMode, mesh.vertexCount, GL_UNSIGNED_SHORT, mesh.indices); + glDrawElements(mesh.primitiveMode, mesh.elementCount, GL_UNSIGNED_SHORT, mesh.indices); } else { - glDrawArrays(mesh.primitiveMode, 0, mesh.vertexCount); + glDrawArrays(mesh.primitiveMode, 0, mesh.elementCount); } // ----------------------------------- diff --git a/libs/hwui/utils/Macros.h b/libs/hwui/utils/Macros.h index fe43fdb..eae73a9 100644 --- a/libs/hwui/utils/Macros.h +++ b/libs/hwui/utils/Macros.h @@ -29,4 +29,8 @@ friend inline int compare_type(const Type& lhs, const Type& rhs) { return lhs.compare(rhs); } \ friend inline hash_t hash_type(const Type& entry) { return entry.hash(); } +#define REQUIRE_COMPATIBLE_LAYOUT(Type) \ + static_assert(std::is_standard_layout<Type>::value, \ + #Type " must have standard layout") + #endif /* MACROS_H */ diff --git a/libs/hwui/utils/PaintUtils.h b/libs/hwui/utils/PaintUtils.h index 679e2bf..1a5cbf8 100644 --- a/libs/hwui/utils/PaintUtils.h +++ b/libs/hwui/utils/PaintUtils.h @@ -37,6 +37,13 @@ public: return resultMode; } + static inline GLenum getFilter(const SkPaint* paint) { + if (!paint || paint->getFilterLevel() != SkPaint::kNone_FilterLevel) { + return GL_LINEAR; + } + return GL_NEAREST; + } + // TODO: move to a method on android:Paint? replace with SkPaint::nothingToDraw()? static inline bool paintWillNotDraw(const SkPaint& paint) { return paint.getAlpha() == 0 diff --git a/media/java/android/media/AudioManagerInternal.java b/media/java/android/media/AudioManagerInternal.java index 873c142..ef5710c 100644 --- a/media/java/android/media/AudioManagerInternal.java +++ b/media/java/android/media/AudioManagerInternal.java @@ -15,8 +15,6 @@ */ package android.media; -import android.os.IBinder; - import com.android.server.LocalServices; /** @@ -47,6 +45,8 @@ public abstract class AudioManagerInternal { public abstract void setRingerModeInternal(int ringerMode, String caller); + public abstract int getVolumeControllerUid(); + public interface RingerModeDelegate { /** Called when external ringer mode is evaluated, returns the new internal ringer mode */ int onSetRingerModeExternal(int ringerModeOld, int ringerModeNew, String caller, diff --git a/packages/SettingsProvider/Android.mk b/packages/SettingsProvider/Android.mk index c16f7b6..2b833b2 100644 --- a/packages/SettingsProvider/Android.mk +++ b/packages/SettingsProvider/Android.mk @@ -3,7 +3,8 @@ include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := $(call all-subdir-java-files) +LOCAL_SRC_FILES := $(call all-subdir-java-files) \ + src/com/android/providers/settings/EventLogTags.logtags LOCAL_JAVA_LIBRARIES := telephony-common ims-common diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 06e26bd..729efcb 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -58,6 +58,7 @@ import java.io.File; import java.io.IOException; import java.util.HashSet; import java.util.List; +import java.util.Set; /** * Database helper class for {@link SettingsProvider}. @@ -78,6 +79,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { private static final HashSet<String> mValidTables = new HashSet<String>(); + private static final String DATABASE_JOURNAL_SUFFIX = "-journal"; + private static final String DATABASE_BACKUP_SUFFIX = "-backup"; + private static final String TABLE_SYSTEM = "system"; private static final String TABLE_SECURE = "secure"; private static final String TABLE_GLOBAL = "global"; @@ -86,13 +90,13 @@ public class DatabaseHelper extends SQLiteOpenHelper { mValidTables.add(TABLE_SYSTEM); mValidTables.add(TABLE_SECURE); mValidTables.add(TABLE_GLOBAL); - mValidTables.add("bluetooth_devices"); - mValidTables.add("bookmarks"); // These are old. + mValidTables.add("bluetooth_devices"); + mValidTables.add("bookmarks"); mValidTables.add("favorites"); - mValidTables.add("gservices"); mValidTables.add("old_favorites"); + mValidTables.add("android_metadata"); } static String dbNameForUser(final int userHandle) { @@ -118,6 +122,33 @@ public class DatabaseHelper extends SQLiteOpenHelper { return mValidTables.contains(name); } + public void dropDatabase() { + close(); + File databaseFile = mContext.getDatabasePath(getDatabaseName()); + if (databaseFile.exists()) { + databaseFile.delete(); + } + File databaseJournalFile = mContext.getDatabasePath(getDatabaseName() + + DATABASE_JOURNAL_SUFFIX); + if (databaseJournalFile.exists()) { + databaseJournalFile.delete(); + } + } + + public void backupDatabase() { + close(); + File databaseFile = mContext.getDatabasePath(getDatabaseName()); + if (!databaseFile.exists()) { + return; + } + File backupFile = mContext.getDatabasePath(getDatabaseName() + + DATABASE_BACKUP_SUFFIX); + if (backupFile.exists()) { + return; + } + databaseFile.renameTo(backupFile); + } + private void createSecureTable(SQLiteDatabase db) { db.execSQL("CREATE TABLE secure (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT," + @@ -1221,9 +1252,11 @@ public class DatabaseHelper extends SQLiteOpenHelper { // Migrate now-global settings. Note that this happens before // new users can be created. createGlobalTable(db); - String[] settingsToMove = hashsetToStringArray(SettingsProvider.sSystemGlobalKeys); + String[] settingsToMove = setToStringArray( + SettingsProvider.sSystemMovedToGlobalSettings); moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_GLOBAL, settingsToMove, false); - settingsToMove = hashsetToStringArray(SettingsProvider.sSecureGlobalKeys); + settingsToMove = setToStringArray( + SettingsProvider.sSecureMovedToGlobalSettings); moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, false); db.setTransactionSuccessful(); @@ -1489,9 +1522,11 @@ public class DatabaseHelper extends SQLiteOpenHelper { db.beginTransaction(); try { // Migrate now-global settings - String[] settingsToMove = hashsetToStringArray(SettingsProvider.sSystemGlobalKeys); + String[] settingsToMove = setToStringArray( + SettingsProvider.sSystemMovedToGlobalSettings); moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_GLOBAL, settingsToMove, true); - settingsToMove = hashsetToStringArray(SettingsProvider.sSecureGlobalKeys); + settingsToMove = setToStringArray( + SettingsProvider.sSecureMovedToGlobalSettings); moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true); db.setTransactionSuccessful(); @@ -1855,7 +1890,8 @@ public class DatabaseHelper extends SQLiteOpenHelper { try { stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)" + " VALUES(?,?);"); - loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED, ImsConfig.FeatureValueConstants.ON); + loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED, + ImsConfig.FeatureValueConstants.ON); db.setTransactionSuccessful(); } finally { db.endTransaction(); @@ -1895,34 +1931,50 @@ public class DatabaseHelper extends SQLiteOpenHelper { } upgradeVersion = 118; } + + /** + * IMPORTANT: Do not add any more upgrade steps here as the global, + * secure, and system settings are no longer stored in a database + * but are kept in memory and persisted to XML. The correct places + * for adding upgrade steps are: + * + * Global: SettingsProvider.UpgradeController#onUpgradeGlobalSettings + * Secure: SettingsProvider.UpgradeController#onUpgradeSecureSettings + * System: SettingsProvider.UpgradeController#onUpgradeSystemSettings + */ + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { - Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion - + ", must wipe the settings provider"); - db.execSQL("DROP TABLE IF EXISTS global"); - db.execSQL("DROP TABLE IF EXISTS globalIndex1"); - db.execSQL("DROP TABLE IF EXISTS system"); - db.execSQL("DROP INDEX IF EXISTS systemIndex1"); - db.execSQL("DROP TABLE IF EXISTS secure"); - db.execSQL("DROP INDEX IF EXISTS secureIndex1"); - db.execSQL("DROP TABLE IF EXISTS gservices"); - db.execSQL("DROP INDEX IF EXISTS gservicesIndex1"); - db.execSQL("DROP TABLE IF EXISTS bluetooth_devices"); - db.execSQL("DROP TABLE IF EXISTS bookmarks"); - db.execSQL("DROP INDEX IF EXISTS bookmarksIndex1"); - db.execSQL("DROP INDEX IF EXISTS bookmarksIndex2"); - db.execSQL("DROP TABLE IF EXISTS favorites"); - onCreate(db); - - // Added for diagnosing settings.db wipes after the fact - String wipeReason = oldVersion + "/" + upgradeVersion + "/" + currentVersion; - db.execSQL("INSERT INTO secure(name,value) values('" + - "wiped_db_reason" + "','" + wipeReason + "');"); + recreateDatabase(db, oldVersion, upgradeVersion, currentVersion); } } - private String[] hashsetToStringArray(HashSet<String> set) { + public void recreateDatabase(SQLiteDatabase db, int oldVersion, + int upgradeVersion, int currentVersion) { + db.execSQL("DROP TABLE IF EXISTS global"); + db.execSQL("DROP TABLE IF EXISTS globalIndex1"); + db.execSQL("DROP TABLE IF EXISTS system"); + db.execSQL("DROP INDEX IF EXISTS systemIndex1"); + db.execSQL("DROP TABLE IF EXISTS secure"); + db.execSQL("DROP INDEX IF EXISTS secureIndex1"); + db.execSQL("DROP TABLE IF EXISTS gservices"); + db.execSQL("DROP INDEX IF EXISTS gservicesIndex1"); + db.execSQL("DROP TABLE IF EXISTS bluetooth_devices"); + db.execSQL("DROP TABLE IF EXISTS bookmarks"); + db.execSQL("DROP INDEX IF EXISTS bookmarksIndex1"); + db.execSQL("DROP INDEX IF EXISTS bookmarksIndex2"); + db.execSQL("DROP TABLE IF EXISTS favorites"); + + onCreate(db); + + // Added for diagnosing settings.db wipes after the fact + String wipeReason = oldVersion + "/" + upgradeVersion + "/" + currentVersion; + db.execSQL("INSERT INTO secure(name,value) values('" + + "wiped_db_reason" + "','" + wipeReason + "');"); + } + + private String[] setToStringArray(Set<String> set) { String[] array = new String[set.size()]; return set.toArray(array); } @@ -2639,7 +2691,8 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Global.GUEST_USER_ENABLED, R.bool.def_guest_user_enabled); - loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED, ImsConfig.FeatureValueConstants.ON); + loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED, + ImsConfig.FeatureValueConstants.ON); // --- New global settings start here } finally { if (stmt != null) stmt.close(); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags b/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags new file mode 100644 index 0000000..298d776 --- /dev/null +++ b/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags @@ -0,0 +1,5 @@ +# See system/core/logcat/e for a description of the format of this file. + +option java_package com.android.providers.settings; + +52100 unsupported_settings_query (uri|3),(selection|3),(whereArgs|3) diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java index 264dcae..8371117 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java @@ -110,11 +110,7 @@ public class SettingsBackupAgent extends BackupAgentHelper { private static final String TAG = "SettingsBackupAgent"; - private static final int COLUMN_NAME = 1; - private static final int COLUMN_VALUE = 2; - private static final String[] PROJECTION = { - Settings.NameValueTable._ID, Settings.NameValueTable.NAME, Settings.NameValueTable.VALUE }; @@ -473,8 +469,8 @@ public class SettingsBackupAgent extends BackupAgentHelper { ParcelFileDescriptor newState) throws IOException { HashSet<String> movedToGlobal = new HashSet<String>(); - Settings.System.getMovedKeys(movedToGlobal); - Settings.Secure.getMovedKeys(movedToGlobal); + Settings.System.getMovedToGlobalSettings(movedToGlobal); + Settings.Secure.getMovedToGlobalSettings(movedToGlobal); while (data.readNextHeader()) { final String key = data.getKey(); @@ -577,8 +573,8 @@ public class SettingsBackupAgent extends BackupAgentHelper { if (version <= FULL_BACKUP_VERSION) { // Generate the moved-to-global lookup table HashSet<String> movedToGlobal = new HashSet<String>(); - Settings.System.getMovedKeys(movedToGlobal); - Settings.Secure.getMovedKeys(movedToGlobal); + Settings.System.getMovedToGlobalSettings(movedToGlobal); + Settings.Secure.getMovedToGlobalSettings(movedToGlobal); // system settings data first int nBytes = in.readInt(); @@ -824,11 +820,14 @@ public class SettingsBackupAgent extends BackupAgentHelper { String key = settings[i]; String value = cachedEntries.remove(key); + final int nameColumnIndex = cursor.getColumnIndex(Settings.NameValueTable.NAME); + final int valueColumnIndex = cursor.getColumnIndex(Settings.NameValueTable.VALUE); + // If the value not cached, let us look it up. if (value == null) { while (!cursor.isAfterLast()) { - String cursorKey = cursor.getString(COLUMN_NAME); - String cursorValue = cursor.getString(COLUMN_VALUE); + String cursorKey = cursor.getString(nameColumnIndex); + String cursorValue = cursor.getString(valueColumnIndex); cursor.moveToNext(); if (key.equals(cursorKey)) { value = cursorValue; diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 6828301..5aac06d 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -16,981 +16,997 @@ package com.android.providers.settings; -import java.io.FileNotFoundException; -import java.security.SecureRandom; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; - +import android.Manifest; import android.app.ActivityManager; import android.app.AppOpsManager; import android.app.backup.BackupManager; import android.content.BroadcastReceiver; import android.content.ContentProvider; -import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.UserInfo; -import android.database.AbstractCursor; import android.database.Cursor; +import android.database.MatrixCursor; import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteQueryBuilder; +import android.hardware.camera2.utils.ArrayUtils; import android.net.Uri; import android.os.Binder; +import android.os.Build; import android.os.Bundle; import android.os.DropBoxManager; -import android.os.FileObserver; +import android.os.Environment; import android.os.ParcelFileDescriptor; import android.os.Process; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; -import android.provider.Settings.Secure; import android.text.TextUtils; -import android.util.Log; -import android.util.LruCache; +import android.util.ArrayMap; +import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; - +import com.android.internal.annotations.GuardedBy; +import com.android.internal.content.PackageMonitor; +import com.android.internal.os.BackgroundThread; +import java.io.File; +import java.io.FileNotFoundException; +import java.security.SecureRandom; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +import com.android.providers.settings.SettingsState.Setting; + +/** + * <p> + * This class is a content provider that publishes the system settings. + * It can be accessed via the content provider APIs or via custom call + * commands. The latter is a bit faster and is the preferred way to access + * the platform settings. + * </p> + * <p> + * There are three settings types, global (with signature level protection + * and shared across users), secure (with signature permission level + * protection and per user), and system (with dangerous permission level + * protection and per user). Global settings are stored under the device owner. + * Each of these settings is represented by a {@link + * com.android.providers.settings.SettingsState} object mapped to an integer + * key derived from the setting type in the most significant bits and user + * id in the least significant bits. Settings are synchronously loaded on + * instantiation of a SettingsState and asynchronously persisted on mutation. + * Settings are stored in the user specific system directory. + * </p> + * <p> + * Apps targeting APIs Lollipop MR1 and lower can add custom settings entries + * and get a warning. Targeting higher API version prohibits this as the + * system settings are not a place for apps to save their state. When a package + * is removed the settings it added are deleted. Apps cannot delete system + * settings added by the platform. System settings values are validated to + * ensure the clients do not put bad values. Global and secure settings are + * changed only by trusted parties, therefore no validation is performed. Also + * there is a limit on the amount of app specific settings that can be added + * to prevent unlimited growth of the system process memory footprint. + * </p> + */ +@SuppressWarnings("deprecation") public class SettingsProvider extends ContentProvider { - private static final String TAG = "SettingsProvider"; - private static final boolean LOCAL_LOGV = false; + private static final boolean DEBUG = false; + + private static final boolean DROP_DATABASE_ON_MIGRATION = !Build.IS_DEBUGGABLE; - private static final boolean USER_CHECK_THROWS = true; + private static final String LOG_TAG = "SettingsProvider"; private static final String TABLE_SYSTEM = "system"; private static final String TABLE_SECURE = "secure"; private static final String TABLE_GLOBAL = "global"; + + // Old tables no longer exist. private static final String TABLE_FAVORITES = "favorites"; private static final String TABLE_OLD_FAVORITES = "old_favorites"; + private static final String TABLE_BLUETOOTH_DEVICES = "bluetooth_devices"; + private static final String TABLE_BOOKMARKS = "bookmarks"; + private static final String TABLE_ANDROID_METADATA = "android_metadata"; - private static final String[] COLUMN_VALUE = new String[] { "value" }; + // The set of removed legacy tables. + private static final Set<String> REMOVED_LEGACY_TABLES = new ArraySet<>(); + static { + REMOVED_LEGACY_TABLES.add(TABLE_FAVORITES); + REMOVED_LEGACY_TABLES.add(TABLE_OLD_FAVORITES); + REMOVED_LEGACY_TABLES.add(TABLE_BLUETOOTH_DEVICES); + REMOVED_LEGACY_TABLES.add(TABLE_BOOKMARKS); + REMOVED_LEGACY_TABLES.add(TABLE_ANDROID_METADATA); + } - // Caches for each user's settings, access-ordered for acting as LRU. - // Guarded by themselves. - private static final int MAX_CACHE_ENTRIES = 200; - private static final SparseArray<SettingsCache> sSystemCaches - = new SparseArray<SettingsCache>(); - private static final SparseArray<SettingsCache> sSecureCaches - = new SparseArray<SettingsCache>(); - private static final SettingsCache sGlobalCache = new SettingsCache(TABLE_GLOBAL); + private static final int MUTATION_OPERATION_INSERT = 1; + private static final int MUTATION_OPERATION_DELETE = 2; + private static final int MUTATION_OPERATION_UPDATE = 3; - // The count of how many known (handled by SettingsProvider) - // database mutations are currently being handled for this user. - // Used by file observers to not reload the database when it's ourselves - // modifying it. - private static final SparseArray<AtomicInteger> sKnownMutationsInFlight - = new SparseArray<AtomicInteger>(); + private static final String[] ALL_COLUMNS = new String[] { + Settings.NameValueTable._ID, + Settings.NameValueTable.NAME, + Settings.NameValueTable.VALUE + }; - // Each defined user has their own settings - protected final SparseArray<DatabaseHelper> mOpenHelpers = new SparseArray<DatabaseHelper>(); + private static final Bundle NULL_SETTING = Bundle.forPair(Settings.NameValueTable.VALUE, null); - // Keep the list of managed profiles synced here - private List<UserInfo> mManagedProfiles = null; + // Per user settings that cannot be modified if associated user restrictions are enabled. + private static final Map<String, String> sSettingToUserRestrictionMap = new ArrayMap<>(); + static { + sSettingToUserRestrictionMap.put(Settings.Secure.LOCATION_MODE, + UserManager.DISALLOW_SHARE_LOCATION); + sSettingToUserRestrictionMap.put(Settings.Secure.LOCATION_PROVIDERS_ALLOWED, + UserManager.DISALLOW_SHARE_LOCATION); + sSettingToUserRestrictionMap.put(Settings.Secure.INSTALL_NON_MARKET_APPS, + UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); + sSettingToUserRestrictionMap.put(Settings.Global.ADB_ENABLED, + UserManager.DISALLOW_DEBUGGING_FEATURES); + sSettingToUserRestrictionMap.put(Settings.Global.PACKAGE_VERIFIER_ENABLE, + UserManager.ENSURE_VERIFY_APPS); + sSettingToUserRestrictionMap.put(Settings.Global.PREFERRED_NETWORK_MODE, + UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS); + } - // Over this size we don't reject loading or saving settings but - // we do consider them broken/malicious and don't keep them in - // memory at least: - private static final int MAX_CACHE_ENTRY_SIZE = 500; + // Per user secure settings that moved to the for all users global settings. + static final Set<String> sSecureMovedToGlobalSettings = new ArraySet<>(); + static { + Settings.Secure.getMovedToGlobalSettings(sSecureMovedToGlobalSettings); + } - private static final Bundle NULL_SETTING = Bundle.forPair("value", null); + // Per user system settings that moved to the for all users global settings. + static final Set<String> sSystemMovedToGlobalSettings = new ArraySet<>(); + static { + Settings.System.getMovedToGlobalSettings(sSystemMovedToGlobalSettings); + } - // Used as a sentinel value in an instance equality test when we - // want to cache the existence of a key, but not store its value. - private static final Bundle TOO_LARGE_TO_CACHE_MARKER = Bundle.forPair("_dummy", null); + // Per user system settings that moved to the per user secure settings. + static final Set<String> sSystemMovedToSecureSettings = new ArraySet<>(); + static { + Settings.System.getMovedToSecureSettings(sSystemMovedToSecureSettings); + } - private UserManager mUserManager; - private BackupManager mBackupManager; + // Per all users global settings that moved to the per user secure settings. + static final Set<String> sGlobalMovedToSecureSettings = new ArraySet<>(); + static { + Settings.Global.getMovedToSecureSettings(sGlobalMovedToSecureSettings); + } - /** - * Settings which need to be treated as global/shared in multi-user environments. - */ - static final HashSet<String> sSecureGlobalKeys; - static final HashSet<String> sSystemGlobalKeys; + // Per user secure settings that are cloned for the managed profiles of the user. + private static final Set<String> sSecureCloneToManagedSettings = new ArraySet<>(); + static { + Settings.Secure.getCloneToManagedProfileSettings(sSecureCloneToManagedSettings); + } - // Settings that cannot be modified if associated user restrictions are enabled. - static final Map<String, String> sRestrictedKeys; + // Per user system settings that are cloned for the managed profiles of the user. + private static final Set<String> sSystemCloneToManagedSettings = new ArraySet<>(); + static { + Settings.System.getCloneToManagedProfileSettings(sSystemCloneToManagedSettings); + } - private static final String DROPBOX_TAG_USERLOG = "restricted_profile_ssaid"; + private final Object mLock = new Object(); - static final HashSet<String> sSecureCloneToManagedKeys; - static final HashSet<String> sSystemCloneToManagedKeys; + @GuardedBy("mLock") + private SettingsRegistry mSettingsRegistry; - static { - // Keys (name column) from the 'secure' table that are now in the owner user's 'global' - // table, shared across all users - // These must match Settings.Secure.MOVED_TO_GLOBAL - sSecureGlobalKeys = new HashSet<String>(); - Settings.Secure.getMovedKeys(sSecureGlobalKeys); - - // Keys from the 'system' table now moved to 'global' - // These must match Settings.System.MOVED_TO_GLOBAL - sSystemGlobalKeys = new HashSet<String>(); - Settings.System.getNonLegacyMovedKeys(sSystemGlobalKeys); - - sRestrictedKeys = new HashMap<String, String>(); - sRestrictedKeys.put(Settings.Secure.LOCATION_MODE, UserManager.DISALLOW_SHARE_LOCATION); - sRestrictedKeys.put(Settings.Secure.LOCATION_PROVIDERS_ALLOWED, - UserManager.DISALLOW_SHARE_LOCATION); - sRestrictedKeys.put(Settings.Secure.INSTALL_NON_MARKET_APPS, - UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); - sRestrictedKeys.put(Settings.Global.ADB_ENABLED, UserManager.DISALLOW_DEBUGGING_FEATURES); - sRestrictedKeys.put(Settings.Global.PACKAGE_VERIFIER_ENABLE, - UserManager.ENSURE_VERIFY_APPS); - sRestrictedKeys.put(Settings.Global.PREFERRED_NETWORK_MODE, - UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS); + @GuardedBy("mLock") + private UserManager mUserManager; + + @GuardedBy("mLock") + private AppOpsManager mAppOpsManager; - sSecureCloneToManagedKeys = new HashSet<String>(); - for (int i = 0; i < Settings.Secure.CLONE_TO_MANAGED_PROFILE.length; i++) { - sSecureCloneToManagedKeys.add(Settings.Secure.CLONE_TO_MANAGED_PROFILE[i]); + @GuardedBy("mLock") + private PackageManager mPackageManager; + + @Override + public boolean onCreate() { + synchronized (mLock) { + mUserManager = (UserManager) getContext().getSystemService(Context.USER_SERVICE); + mAppOpsManager = (AppOpsManager) getContext().getSystemService(Context.APP_OPS_SERVICE); + mPackageManager = getContext().getPackageManager(); + mSettingsRegistry = new SettingsRegistry(); } - sSystemCloneToManagedKeys = new HashSet<String>(); - for (int i = 0; i < Settings.System.CLONE_TO_MANAGED_PROFILE.length; i++) { - sSystemCloneToManagedKeys.add(Settings.System.CLONE_TO_MANAGED_PROFILE[i]); + registerBroadcastReceivers(); + return true; + } + + @Override + public Bundle call(String method, String name, Bundle args) { + synchronized (mLock) { + final int requestingUserId = getRequestingUserId(args); + switch (method) { + case Settings.CALL_METHOD_GET_GLOBAL: { + Setting setting = getGlobalSettingLocked(name); + return packageValueForCallResult(setting); + } + + case Settings.CALL_METHOD_GET_SECURE: { + Setting setting = getSecureSettingLocked(name, requestingUserId); + return packageValueForCallResult(setting); + } + + case Settings.CALL_METHOD_GET_SYSTEM: { + Setting setting = getSystemSettingLocked(name, requestingUserId); + return packageValueForCallResult(setting); + } + + case Settings.CALL_METHOD_PUT_GLOBAL: { + String value = getSettingValue(args); + insertGlobalSettingLocked(name, value, requestingUserId); + } break; + + case Settings.CALL_METHOD_PUT_SECURE: { + String value = getSettingValue(args); + insertSecureSettingLocked(name, value, requestingUserId); + } break; + + case Settings.CALL_METHOD_PUT_SYSTEM: { + String value = getSettingValue(args); + insertSystemSettingLocked(name, value, requestingUserId); + } break; + + default: { + Slog.w(LOG_TAG, "call() with invalid method: " + method); + } break; + } } + return null; } - private boolean settingMovedToGlobal(final String name) { - return sSecureGlobalKeys.contains(name) || sSystemGlobalKeys.contains(name); + @Override + public String getType(Uri uri) { + Arguments args = new Arguments(uri, null, null, true); + if (TextUtils.isEmpty(args.name)) { + return "vnd.android.cursor.dir/" + args.table; + } else { + return "vnd.android.cursor.item/" + args.table; + } } - /** - * Decode a content URL into the table, projection, and arguments - * used to access the corresponding database rows. - */ - private static class SqlArguments { - public String table; - public final String where; - public final String[] args; - - /** Operate on existing rows. */ - SqlArguments(Uri url, String where, String[] args) { - if (url.getPathSegments().size() == 1) { - // of the form content://settings/secure, arbitrary where clause - this.table = url.getPathSegments().get(0); - if (!DatabaseHelper.isValidTable(this.table)) { - throw new IllegalArgumentException("Bad root path: " + this.table); + @Override + public Cursor query(Uri uri, String[] projection, String where, String[] whereArgs, + String order) { + if (DEBUG) { + Slog.v(LOG_TAG, "query() for user: " + UserHandle.getCallingUserId()); + } + + Arguments args = new Arguments(uri, where, whereArgs, true); + String[] normalizedProjection = normalizeProjection(projection); + + // If a legacy table that is gone, done. + if (REMOVED_LEGACY_TABLES.contains(args.table)) { + return new MatrixCursor(normalizedProjection, 0); + } + + synchronized (mLock) { + switch (args.table) { + case TABLE_GLOBAL: { + if (args.name != null) { + Setting setting = getGlobalSettingLocked(args.name); + return packageSettingForQuery(setting, normalizedProjection); + } else { + return getAllGlobalSettingsLocked(projection); + } } - this.where = where; - this.args = args; - } else if (url.getPathSegments().size() != 2) { - throw new IllegalArgumentException("Invalid URI: " + url); - } else if (!TextUtils.isEmpty(where)) { - throw new UnsupportedOperationException("WHERE clause not supported: " + url); - } else { - // of the form content://settings/secure/element_name, no where clause - this.table = url.getPathSegments().get(0); - if (!DatabaseHelper.isValidTable(this.table)) { - throw new IllegalArgumentException("Bad root path: " + this.table); + + case TABLE_SECURE: { + final int userId = UserHandle.getCallingUserId(); + if (args.name != null) { + Setting setting = getSecureSettingLocked(args.name, userId); + return packageSettingForQuery(setting, normalizedProjection); + } else { + return getAllSecureSettingsLocked(userId, projection); + } } - if (TABLE_SYSTEM.equals(this.table) || TABLE_SECURE.equals(this.table) || - TABLE_GLOBAL.equals(this.table)) { - this.where = Settings.NameValueTable.NAME + "=?"; - final String name = url.getPathSegments().get(1); - this.args = new String[] { name }; - // Rewrite the table for known-migrated names - if (TABLE_SYSTEM.equals(this.table) || TABLE_SECURE.equals(this.table)) { - if (sSecureGlobalKeys.contains(name) || sSystemGlobalKeys.contains(name)) { - this.table = TABLE_GLOBAL; - } + + case TABLE_SYSTEM: { + final int userId = UserHandle.getCallingUserId(); + if (args.name != null) { + Setting setting = getSystemSettingLocked(args.name, userId); + return packageSettingForQuery(setting, normalizedProjection); + } else { + return getAllSystemSettingsLocked(userId, projection); } - } else { - // of the form content://bookmarks/19 - this.where = "_id=" + ContentUris.parseId(url); - this.args = null; + } + + default: { + throw new IllegalArgumentException("Invalid Uri path:" + uri); } } } + } + + @Override + public Uri insert(Uri uri, ContentValues values) { + if (DEBUG) { + Slog.v(LOG_TAG, "insert() for user: " + UserHandle.getCallingUserId()); + } + + String table = getValidTableOrThrow(uri); + + // If a legacy table that is gone, done. + if (REMOVED_LEGACY_TABLES.contains(table)) { + return null; + } + + String name = values.getAsString(Settings.Secure.NAME); + if (TextUtils.isEmpty(name)) { + return null; + } - /** Insert new rows (no where clause allowed). */ - SqlArguments(Uri url) { - if (url.getPathSegments().size() == 1) { - this.table = url.getPathSegments().get(0); - if (!DatabaseHelper.isValidTable(this.table)) { - throw new IllegalArgumentException("Bad root path: " + this.table); + String value = values.getAsString(Settings.Secure.VALUE); + + synchronized (mLock) { + switch (table) { + case TABLE_GLOBAL: { + if (insertGlobalSettingLocked(name, value, UserHandle.getCallingUserId())) { + return Uri.withAppendedPath(Settings.Global.CONTENT_URI, name); + } + } break; + + case TABLE_SECURE: { + if (insertSecureSettingLocked(name, value, UserHandle.getCallingUserId())) { + return Uri.withAppendedPath(Settings.Secure.CONTENT_URI, name); + } + } break; + + case TABLE_SYSTEM: { + if (insertSystemSettingLocked(name, value, UserHandle.getCallingUserId())) { + return Uri.withAppendedPath(Settings.System.CONTENT_URI, name); + } + } break; + + default: { + throw new IllegalArgumentException("Bad Uri path:" + uri); } - this.where = null; - this.args = null; - } else { - throw new IllegalArgumentException("Invalid URI: " + url); } } + + return null; } - /** - * Get the content URI of a row added to a table. - * @param tableUri of the entire table - * @param values found in the row - * @param rowId of the row - * @return the content URI for this particular row - */ - private Uri getUriFor(Uri tableUri, ContentValues values, long rowId) { - if (tableUri.getPathSegments().size() != 1) { - throw new IllegalArgumentException("Invalid URI: " + tableUri); - } - String table = tableUri.getPathSegments().get(0); - if (TABLE_SYSTEM.equals(table) || - TABLE_SECURE.equals(table) || - TABLE_GLOBAL.equals(table)) { - String name = values.getAsString(Settings.NameValueTable.NAME); - return Uri.withAppendedPath(tableUri, name); - } else { - return ContentUris.withAppendedId(tableUri, rowId); + @Override + public int bulkInsert(Uri uri, ContentValues[] allValues) { + if (DEBUG) { + Slog.v(LOG_TAG, "bulkInsert() for user: " + UserHandle.getCallingUserId()); } - } - /** - * Send a notification when a particular content URI changes. - * Modify the system property used to communicate the version of - * this table, for tables which have such a property. (The Settings - * contract class uses these to provide client-side caches.) - * @param uri to send notifications for - */ - private void sendNotify(Uri uri, int userHandle) { - // Update the system property *first*, so if someone is listening for - // a notification and then using the contract class to get their data, - // the system property will be updated and they'll get the new data. - - boolean backedUpDataChanged = false; - String property = null, table = uri.getPathSegments().get(0); - final boolean isGlobal = table.equals(TABLE_GLOBAL); - if (table.equals(TABLE_SYSTEM)) { - property = Settings.System.SYS_PROP_SETTING_VERSION; - backedUpDataChanged = true; - } else if (table.equals(TABLE_SECURE)) { - property = Settings.Secure.SYS_PROP_SETTING_VERSION; - backedUpDataChanged = true; - } else if (isGlobal) { - property = Settings.Global.SYS_PROP_SETTING_VERSION; // this one is global - backedUpDataChanged = true; - } - - if (property != null) { - long version = SystemProperties.getLong(property, 0) + 1; - if (LOCAL_LOGV) Log.v(TAG, "property: " + property + "=" + version); - SystemProperties.set(property, Long.toString(version)); - } - - // Inform the backup manager about a data change - if (backedUpDataChanged) { - mBackupManager.dataChanged(); - } - // Now send the notification through the content framework. - - String notify = uri.getQueryParameter("notify"); - if (notify == null || "true".equals(notify)) { - final int notifyTarget = isGlobal ? UserHandle.USER_ALL : userHandle; - final long oldId = Binder.clearCallingIdentity(); - try { - getContext().getContentResolver().notifyChange(uri, null, true, notifyTarget); - } finally { - Binder.restoreCallingIdentity(oldId); + int insertionCount = 0; + final int valuesCount = allValues.length; + for (int i = 0; i < valuesCount; i++) { + ContentValues values = allValues[i]; + if (insert(uri, values) != null) { + insertionCount++; } - if (LOCAL_LOGV) Log.v(TAG, "notifying for " + notifyTarget + ": " + uri); - } else { - if (LOCAL_LOGV) Log.v(TAG, "notification suppressed: " + uri); } + + return insertionCount; } - /** - * Make sure the caller has permission to write this data. - * @param args supplied by the caller - * @throws SecurityException if the caller is forbidden to write. - */ - private void checkWritePermissions(SqlArguments args) { - if ((TABLE_SECURE.equals(args.table) || TABLE_GLOBAL.equals(args.table)) && - getContext().checkCallingOrSelfPermission( - android.Manifest.permission.WRITE_SECURE_SETTINGS) != - PackageManager.PERMISSION_GRANTED) { - throw new SecurityException( - String.format("Permission denial: writing to secure settings requires %1$s", - android.Manifest.permission.WRITE_SECURE_SETTINGS)); + @Override + public int delete(Uri uri, String where, String[] whereArgs) { + if (DEBUG) { + Slog.v(LOG_TAG, "delete() for user: " + UserHandle.getCallingUserId()); } - } - private void checkUserRestrictions(String setting, int userId) { - String userRestriction = sRestrictedKeys.get(setting); - if (!TextUtils.isEmpty(userRestriction) - && mUserManager.hasUserRestriction(userRestriction, new UserHandle(userId))) { - throw new SecurityException( - "Permission denial: user is restricted from changing this setting."); + Arguments args = new Arguments(uri, where, whereArgs, false); + + // If a legacy table that is gone, done. + if (REMOVED_LEGACY_TABLES.contains(args.table)) { + return 0; } - } - // FileObserver for external modifications to the database file. - // Note that this is for platform developers only with - // userdebug/eng builds who should be able to tinker with the - // sqlite database out from under the SettingsProvider, which is - // normally the exclusive owner of the database. But we keep this - // enabled all the time to minimize development-vs-user - // differences in testing. - private static SparseArray<SettingsFileObserver> sObserverInstances - = new SparseArray<SettingsFileObserver>(); - private class SettingsFileObserver extends FileObserver { - private final AtomicBoolean mIsDirty = new AtomicBoolean(false); - private final int mUserHandle; - private final String mPath; - - public SettingsFileObserver(int userHandle, String path) { - super(path, FileObserver.CLOSE_WRITE | - FileObserver.CREATE | FileObserver.DELETE | - FileObserver.MOVED_TO | FileObserver.MODIFY); - mUserHandle = userHandle; - mPath = path; - } - - public void onEvent(int event, String path) { - final AtomicInteger mutationCount; - synchronized (SettingsProvider.this) { - mutationCount = sKnownMutationsInFlight.get(mUserHandle); - } - if (mutationCount != null && mutationCount.get() > 0) { - // our own modification. - return; - } - Log.d(TAG, "User " + mUserHandle + " external modification to " + mPath - + "; event=" + event); - if (!mIsDirty.compareAndSet(false, true)) { - // already handled. (we get a few update events - // during an sqlite write) - return; + if (TextUtils.isEmpty(args.name)) { + return 0; + } + + synchronized (mLock) { + switch (args.table) { + case TABLE_GLOBAL: { + final int userId = UserHandle.getCallingUserId(); + return deleteGlobalSettingLocked(args.name, userId) ? 1 : 0; + } + + case TABLE_SECURE: { + final int userId = UserHandle.getCallingUserId(); + return deleteSecureSettingLocked(args.name, userId) ? 1 : 0; + } + + case TABLE_SYSTEM: { + final int userId = UserHandle.getCallingUserId(); + return deleteSystemSettingLocked(args.name, userId) ? 1 : 0; + } + + default: { + throw new IllegalArgumentException("Bad Uri path:" + uri); + } } - Log.d(TAG, "User " + mUserHandle + " updating our caches for " + mPath); - fullyPopulateCaches(mUserHandle); - mIsDirty.set(false); } } @Override - public boolean onCreate() { - mBackupManager = new BackupManager(getContext()); - mUserManager = UserManager.get(getContext()); + public int update(Uri uri, ContentValues values, String where, String[] whereArgs) { + if (DEBUG) { + Slog.v(LOG_TAG, "update() for user: " + UserHandle.getCallingUserId()); + } + + Arguments args = new Arguments(uri, where, whereArgs, false); + + // If a legacy table that is gone, done. + if (REMOVED_LEGACY_TABLES.contains(args.table)) { + return 0; + } - setAppOps(AppOpsManager.OP_NONE, AppOpsManager.OP_WRITE_SETTINGS); - establishDbTracking(UserHandle.USER_OWNER); + String value = values.getAsString(Settings.Secure.VALUE); + if (TextUtils.isEmpty(value)) { + return 0; + } + synchronized (mLock) { + switch (args.table) { + case TABLE_GLOBAL: { + final int userId = UserHandle.getCallingUserId(); + return updateGlobalSettingLocked(args.name, value, userId) ? 1 : 0; + } + + case TABLE_SECURE: { + final int userId = UserHandle.getCallingUserId(); + return updateSecureSettingLocked(args.name, value, userId) ? 1 : 0; + } + + case TABLE_SYSTEM: { + final int userId = UserHandle.getCallingUserId(); + return updateSystemSettingLocked(args.name, value, userId) ? 1 : 0; + } + + default: { + throw new IllegalArgumentException("Invalid Uri path:" + uri); + } + } + } + } + + @Override + public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { + throw new FileNotFoundException("Direct file access no longer supported; " + + "ringtone playback is available through android.media.Ringtone"); + } + + private void registerBroadcastReceivers() { IntentFilter userFilter = new IntentFilter(); userFilter.addAction(Intent.ACTION_USER_REMOVED); - userFilter.addAction(Intent.ACTION_USER_ADDED); + userFilter.addAction(Intent.ACTION_USER_STOPPED); + getContext().registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, + final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_OWNER); - if (intent.getAction().equals(Intent.ACTION_USER_REMOVED)) { - onUserRemoved(userHandle); - } else if (intent.getAction().equals(Intent.ACTION_USER_ADDED)) { - onProfilesChanged(); + + switch (intent.getAction()) { + case Intent.ACTION_USER_REMOVED: { + mSettingsRegistry.removeUserStateLocked(userId, true); + } break; + + case Intent.ACTION_USER_STOPPED: { + mSettingsRegistry.removeUserStateLocked(userId, false); + } break; } } }, userFilter); - onProfilesChanged(); + PackageMonitor monitor = new PackageMonitor() { + @Override + public void onPackageRemoved(String packageName, int uid) { + synchronized (mLock) { + mSettingsRegistry.onPackageRemovedLocked(packageName, + UserHandle.getUserId(uid)); + } + } + }; - return true; + // package changes + monitor.register(getContext(), BackgroundThread.getHandler().getLooper(), + UserHandle.ALL, true); } - void onUserRemoved(int userHandle) { - synchronized (this) { - // the db file itself will be deleted automatically, but we need to tear down - // our caches and other internal bookkeeping. - FileObserver observer = sObserverInstances.get(userHandle); - if (observer != null) { - observer.stopWatching(); - sObserverInstances.delete(userHandle); - } + private Cursor getAllGlobalSettingsLocked(String[] projection) { + if (DEBUG) { + Slog.v(LOG_TAG, "getAllGlobalSettingsLocked()"); + } + + // Get the settings. + SettingsState settingsState = mSettingsRegistry.getSettingsLocked( + SettingsRegistry.SETTINGS_TYPE_GLOBAL, UserHandle.USER_OWNER); + + List<String> names = settingsState.getSettingNamesLocked(); + + final int nameCount = names.size(); - mOpenHelpers.delete(userHandle); - sSystemCaches.delete(userHandle); - sSecureCaches.delete(userHandle); - sKnownMutationsInFlight.delete(userHandle); - onProfilesChanged(); + String[] normalizedProjection = normalizeProjection(projection); + MatrixCursor result = new MatrixCursor(normalizedProjection, nameCount); + + // Anyone can get the global settings, so no security checks. + for (int i = 0; i < nameCount; i++) { + String name = names.get(i); + Setting setting = settingsState.getSettingLocked(name); + appendSettingToCursor(result, setting); } + + return result; } - /** - * Updates the list of managed profiles. It assumes that only the primary user - * can have managed profiles. Modify this code if that changes in the future. - */ - void onProfilesChanged() { - synchronized (this) { - mManagedProfiles = mUserManager.getProfiles(UserHandle.USER_OWNER); - if (mManagedProfiles != null) { - // Remove the primary user from the list - for (int i = mManagedProfiles.size() - 1; i >= 0; i--) { - if (mManagedProfiles.get(i).id == UserHandle.USER_OWNER) { - mManagedProfiles.remove(i); - } - } - // If there are no managed profiles, reset the variable - if (mManagedProfiles.size() == 0) { - mManagedProfiles = null; - } - } - if (LOCAL_LOGV) { - Slog.d(TAG, "Managed Profiles = " + mManagedProfiles); - } + private Setting getGlobalSettingLocked(String name) { + if (DEBUG) { + Slog.v(LOG_TAG, "getGlobalSetting(" + name + ")"); } + + // Get the value. + return mSettingsRegistry.getSettingLocked(SettingsRegistry.SETTINGS_TYPE_GLOBAL, + UserHandle.USER_OWNER, name); } - private void establishDbTracking(int userHandle) { - if (LOCAL_LOGV) { - Slog.i(TAG, "Installing settings db helper and caches for user " + userHandle); + private boolean updateGlobalSettingLocked(String name, String value, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "updateGlobalSettingLocked(" + name + ", " + value + ")"); } + return mutateGlobalSettingLocked(name, value, requestingUserId, MUTATION_OPERATION_UPDATE); + } - DatabaseHelper dbhelper; + private boolean insertGlobalSettingLocked(String name, String value, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "insertGlobalSettingLocked(" + name + ", " + value + ")"); + } + return mutateGlobalSettingLocked(name, value, requestingUserId, MUTATION_OPERATION_INSERT); + } - synchronized (this) { - dbhelper = mOpenHelpers.get(userHandle); - if (dbhelper == null) { - dbhelper = new DatabaseHelper(getContext(), userHandle); - mOpenHelpers.append(userHandle, dbhelper); + private boolean deleteGlobalSettingLocked(String name, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "deleteGlobalSettingLocked(" + name + ")"); + } + return mutateGlobalSettingLocked(name, null, requestingUserId, MUTATION_OPERATION_DELETE); + } - sSystemCaches.append(userHandle, new SettingsCache(TABLE_SYSTEM)); - sSecureCaches.append(userHandle, new SettingsCache(TABLE_SECURE)); - sKnownMutationsInFlight.append(userHandle, new AtomicInteger(0)); - } + private boolean mutateGlobalSettingLocked(String name, String value, int requestingUserId, + int operation) { + // Make sure the caller can change the settings - treated as secure. + enforceWritePermission(Manifest.permission.WRITE_SECURE_SETTINGS); + + // Verify whether this operation is allowed for the calling package. + if (!isAppOpWriteSettingsAllowedForCallingPackage()) { + return false; } - // Initialization of the db *outside* the locks. It's possible that racing - // threads might wind up here, the second having read the cache entries - // written by the first, but that's benign: the SQLite helper implementation - // manages concurrency itself, and it's important that we not run the db - // initialization with any of our own locks held, so we're fine. - SQLiteDatabase db = dbhelper.getWritableDatabase(); - - // Watch for external modifications to the database files, - // keeping our caches in sync. We synchronize the observer set - // separately, and of course it has to run after the db file - // itself was set up by the DatabaseHelper. - synchronized (sObserverInstances) { - if (sObserverInstances.get(userHandle) == null) { - SettingsFileObserver observer = new SettingsFileObserver(userHandle, db.getPath()); - sObserverInstances.append(userHandle, observer); - observer.startWatching(); - } + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(requestingUserId); + + // If this is a setting that is currently restricted for this user, done. + if (isGlobalOrSecureSettingRestrictedForUser(name, callingUserId)) { + return false; } - ensureAndroidIdIsSet(userHandle); + // Perform the mutation. + switch (operation) { + case MUTATION_OPERATION_INSERT: { + return mSettingsRegistry.insertSettingLocked(SettingsRegistry.SETTINGS_TYPE_GLOBAL, + UserHandle.USER_OWNER, name, value, getCallingPackage()); + } - startAsyncCachePopulation(userHandle); - } + case MUTATION_OPERATION_DELETE: { + return mSettingsRegistry.deleteSettingLocked( + SettingsRegistry.SETTINGS_TYPE_GLOBAL, + UserHandle.USER_OWNER, name); + } + + case MUTATION_OPERATION_UPDATE: { + return mSettingsRegistry.updateSettingLocked(SettingsRegistry.SETTINGS_TYPE_GLOBAL, + UserHandle.USER_OWNER, name, value, getCallingPackage()); + } + } - class CachePrefetchThread extends Thread { - private int mUserHandle; + return false; + } - CachePrefetchThread(int userHandle) { - super("populate-settings-caches"); - mUserHandle = userHandle; + private Cursor getAllSecureSettingsLocked(int userId, String[] projection) { + if (DEBUG) { + Slog.v(LOG_TAG, "getAllSecureSettings(" + userId + ")"); } - @Override - public void run() { - fullyPopulateCaches(mUserHandle); + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(userId); + + List<String> names = mSettingsRegistry.getSettingsNamesLocked( + SettingsRegistry.SETTINGS_TYPE_SECURE, callingUserId); + + final int nameCount = names.size(); + + String[] normalizedProjection = normalizeProjection(projection); + MatrixCursor result = new MatrixCursor(normalizedProjection, nameCount); + + for (int i = 0; i < nameCount; i++) { + String name = names.get(i); + + // Determine the owning user as some profile settings are cloned from the parent. + final int owningUserId = resolveOwningUserIdForSecureSettingLocked(callingUserId, name); + + // Special case for location (sigh). + if (isLocationProvidersAllowedRestricted(name, callingUserId, owningUserId)) { + return null; + } + + Setting setting = mSettingsRegistry.getSettingLocked( + SettingsRegistry.SETTINGS_TYPE_SECURE, owningUserId, name); + appendSettingToCursor(result, setting); } - } - private void startAsyncCachePopulation(int userHandle) { - new CachePrefetchThread(userHandle).start(); + return result; } - private void fullyPopulateCaches(final int userHandle) { - DatabaseHelper dbHelper; - synchronized (this) { - dbHelper = mOpenHelpers.get(userHandle); - } - if (dbHelper == null) { - // User is gone. - return; + private Setting getSecureSettingLocked(String name, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "getSecureSetting(" + name + ", " + requestingUserId + ")"); } - // Only populate the globals cache once, for the owning user - if (userHandle == UserHandle.USER_OWNER) { - fullyPopulateCache(dbHelper, TABLE_GLOBAL, sGlobalCache); + + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(requestingUserId); + + // Determine the owning user as some profile settings are cloned from the parent. + final int owningUserId = resolveOwningUserIdForSecureSettingLocked(callingUserId, name); + + // Special case for location (sigh). + if (isLocationProvidersAllowedRestricted(name, callingUserId, owningUserId)) { + return null; } - fullyPopulateCache(dbHelper, TABLE_SECURE, sSecureCaches.get(userHandle)); - fullyPopulateCache(dbHelper, TABLE_SYSTEM, sSystemCaches.get(userHandle)); + + // Get the value. + return mSettingsRegistry.getSettingLocked(SettingsRegistry.SETTINGS_TYPE_SECURE, + owningUserId, name); } - // Slurp all values (if sane in number & size) into cache. - private void fullyPopulateCache(DatabaseHelper dbHelper, String table, SettingsCache cache) { - SQLiteDatabase db = dbHelper.getReadableDatabase(); - Cursor c = db.query( - table, - new String[] { Settings.NameValueTable.NAME, Settings.NameValueTable.VALUE }, - null, null, null, null, null, - "" + (MAX_CACHE_ENTRIES + 1) /* limit */); - try { - synchronized (cache) { - cache.evictAll(); - cache.setFullyMatchesDisk(true); // optimistic - int rows = 0; - while (c.moveToNext()) { - rows++; - String name = c.getString(0); - String value = c.getString(1); - cache.populate(name, value); - } - if (rows > MAX_CACHE_ENTRIES) { - // Somewhat redundant, as removeEldestEntry() will - // have already done this, but to be explicit: - cache.setFullyMatchesDisk(false); - Log.d(TAG, "row count exceeds max cache entries for table " + table); - } - if (LOCAL_LOGV) Log.d(TAG, "cache for settings table '" + table - + "' rows=" + rows + "; fullycached=" + cache.fullyMatchesDisk()); - } - } finally { - c.close(); + private boolean insertSecureSettingLocked(String name, String value, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "insertSecureSettingLocked(" + name + ", " + value + ", " + + requestingUserId + ")"); } - } - private boolean ensureAndroidIdIsSet(int userHandle) { - final Cursor c = queryForUser(Settings.Secure.CONTENT_URI, - new String[] { Settings.NameValueTable.VALUE }, - Settings.NameValueTable.NAME + "=?", - new String[] { Settings.Secure.ANDROID_ID }, null, - userHandle); - try { - final String value = c.moveToNext() ? c.getString(0) : null; - if (value == null) { - // sanity-check the user before touching the db - final UserInfo user = mUserManager.getUserInfo(userHandle); - if (user == null) { - // can happen due to races when deleting users; treat as benign - return false; - } + return mutateSecureSettingLocked(name, value, requestingUserId, MUTATION_OPERATION_INSERT); + } - final SecureRandom random = new SecureRandom(); - final String newAndroidIdValue = Long.toHexString(random.nextLong()); - final ContentValues values = new ContentValues(); - values.put(Settings.NameValueTable.NAME, Settings.Secure.ANDROID_ID); - values.put(Settings.NameValueTable.VALUE, newAndroidIdValue); - final Uri uri = insertForUser(Settings.Secure.CONTENT_URI, values, userHandle); - if (uri == null) { - Slog.e(TAG, "Unable to generate new ANDROID_ID for user " + userHandle); - return false; - } - Slog.d(TAG, "Generated and saved new ANDROID_ID [" + newAndroidIdValue - + "] for user " + userHandle); - // Write a dropbox entry if it's a restricted profile - if (user.isRestricted()) { - DropBoxManager dbm = (DropBoxManager) - getContext().getSystemService(Context.DROPBOX_SERVICE); - if (dbm != null && dbm.isTagEnabled(DROPBOX_TAG_USERLOG)) { - dbm.addText(DROPBOX_TAG_USERLOG, System.currentTimeMillis() - + ",restricted_profile_ssaid," - + newAndroidIdValue + "\n"); - } - } - } - return true; - } finally { - c.close(); + private boolean deleteSecureSettingLocked(String name, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "deleteSecureSettingLocked(" + name + ", " + requestingUserId + ")"); } + + return mutateSecureSettingLocked(name, null, requestingUserId, MUTATION_OPERATION_DELETE); } - // Lazy-initialize the settings caches for non-primary users - private SettingsCache getOrConstructCache(int callingUser, SparseArray<SettingsCache> which) { - getOrEstablishDatabase(callingUser); // ignore return value; we don't need it - return which.get(callingUser); + private boolean updateSecureSettingLocked(String name, String value, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "updateSecureSettingLocked(" + name + ", " + value + ", " + + requestingUserId + ")"); + } + + return mutateSecureSettingLocked(name, value, requestingUserId, MUTATION_OPERATION_UPDATE); } - // Lazy initialize the database helper and caches for this user, if necessary - private DatabaseHelper getOrEstablishDatabase(int callingUser) { - if (callingUser >= Process.SYSTEM_UID) { - if (USER_CHECK_THROWS) { - throw new IllegalArgumentException("Uid rather than user handle: " + callingUser); - } else { - Slog.wtf(TAG, "establish db for uid rather than user: " + callingUser); - } + private boolean mutateSecureSettingLocked(String name, String value, int requestingUserId, + int operation) { + // Make sure the caller can change the settings. + enforceWritePermission(Manifest.permission.WRITE_SECURE_SETTINGS); + + // Verify whether this operation is allowed for the calling package. + if (!isAppOpWriteSettingsAllowedForCallingPackage()) { + return false; } - long oldId = Binder.clearCallingIdentity(); - try { - DatabaseHelper dbHelper; - synchronized (this) { - dbHelper = mOpenHelpers.get(callingUser); + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(requestingUserId); + + // If this is a setting that is currently restricted for this user, done. + if (isGlobalOrSecureSettingRestrictedForUser(name, callingUserId)) { + return false; + } + + // Determine the owning user as some profile settings are cloned from the parent. + final int owningUserId = resolveOwningUserIdForSecureSettingLocked(callingUserId, name); + + // Only the owning user can change the setting. + if (owningUserId != callingUserId) { + return false; + } + + // Special cases for location providers (sigh). + if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name)) { + return updateLocationProvidersAllowed(value, owningUserId); + } + + // Mutate the value. + switch(operation) { + case MUTATION_OPERATION_INSERT: { + return mSettingsRegistry.insertSettingLocked(SettingsRegistry.SETTINGS_TYPE_SECURE, + owningUserId, name, value, getCallingPackage()); } - if (null == dbHelper) { - establishDbTracking(callingUser); - synchronized (this) { - dbHelper = mOpenHelpers.get(callingUser); - } + + case MUTATION_OPERATION_DELETE: { + return mSettingsRegistry.deleteSettingLocked( + SettingsRegistry.SETTINGS_TYPE_SECURE, + owningUserId, name); + } + + case MUTATION_OPERATION_UPDATE: { + return mSettingsRegistry.updateSettingLocked(SettingsRegistry.SETTINGS_TYPE_SECURE, + owningUserId, name, value, getCallingPackage()); } - return dbHelper; - } finally { - Binder.restoreCallingIdentity(oldId); } + + return false; } - public SettingsCache cacheForTable(final int callingUser, String tableName) { - if (TABLE_SYSTEM.equals(tableName)) { - return getOrConstructCache(callingUser, sSystemCaches); + private Cursor getAllSystemSettingsLocked(int userId, String[] projection) { + if (DEBUG) { + Slog.v(LOG_TAG, "getAllSecureSystemLocked(" + userId + ")"); } - if (TABLE_SECURE.equals(tableName)) { - return getOrConstructCache(callingUser, sSecureCaches); - } - if (TABLE_GLOBAL.equals(tableName)) { - return sGlobalCache; + + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(userId); + + List<String> names = mSettingsRegistry.getSettingsNamesLocked( + SettingsRegistry.SETTINGS_TYPE_SYSTEM, callingUserId); + + final int nameCount = names.size(); + + String[] normalizedProjection = normalizeProjection(projection); + MatrixCursor result = new MatrixCursor(normalizedProjection, nameCount); + + for (int i = 0; i < nameCount; i++) { + String name = names.get(i); + + // Determine the owning user as some profile settings are cloned from the parent. + final int owningUserId = resolveOwningUserIdForSystemSettingLocked(callingUserId, name); + + Setting setting = mSettingsRegistry.getSettingLocked( + SettingsRegistry.SETTINGS_TYPE_SYSTEM, owningUserId, name); + appendSettingToCursor(result, setting); } - return null; + + return result; } - /** - * Used for wiping a whole cache on deletes when we're not - * sure what exactly was deleted or changed. - */ - public void invalidateCache(final int callingUser, String tableName) { - SettingsCache cache = cacheForTable(callingUser, tableName); - if (cache == null) { - return; + private Setting getSystemSettingLocked(String name, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "getSystemSetting(" + name + ", " + requestingUserId + ")"); } - synchronized (cache) { - cache.evictAll(); - cache.mCacheFullyMatchesDisk = false; + + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(requestingUserId); + + // Determine the owning user as some profile settings are cloned from the parent. + final int owningUserId = resolveOwningUserIdForSystemSettingLocked(callingUserId, name); + + // Get the value. + return mSettingsRegistry.getSettingLocked(SettingsRegistry.SETTINGS_TYPE_SYSTEM, + owningUserId, name); + } + + private boolean insertSystemSettingLocked(String name, String value, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "insertSystemSettingLocked(" + name + ", " + value + ", " + + requestingUserId + ")"); } + + return mutateSystemSettingLocked(name, value, requestingUserId, MUTATION_OPERATION_INSERT); } - /** - * Checks if the calling user is a managed profile of the primary user. - * Currently only the primary user (USER_OWNER) can have managed profiles. - * @param callingUser the user trying to read/write settings - * @return true if it is a managed profile of the primary user - */ - private boolean isManagedProfile(int callingUser) { - synchronized (this) { - if (mManagedProfiles == null) return false; - for (int i = mManagedProfiles.size() - 1; i >= 0; i--) { - if (mManagedProfiles.get(i).id == callingUser) { - return true; - } - } - return false; + private boolean deleteSystemSettingLocked(String name, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "deleteSystemSettingLocked(" + name + ", " + requestingUserId + ")"); } + + return mutateSystemSettingLocked(name, null, requestingUserId, MUTATION_OPERATION_DELETE); } - /** - * Fast path that avoids the use of chatty remoted Cursors. - */ - @Override - public Bundle call(String method, String request, Bundle args) { - int callingUser = UserHandle.getCallingUserId(); - if (args != null) { - int reqUser = args.getInt(Settings.CALL_METHOD_USER_KEY, callingUser); - if (reqUser != callingUser) { - callingUser = ActivityManager.handleIncomingUser(Binder.getCallingPid(), - Binder.getCallingUid(), reqUser, false, true, - "get/set setting for user", null); - if (LOCAL_LOGV) Slog.v(TAG, " access setting for user " + callingUser); - } + private boolean updateSystemSettingLocked(String name, String value, int requestingUserId) { + if (DEBUG) { + Slog.v(LOG_TAG, "updateSystemSettingLocked(" + name + ", " + value + ", " + + requestingUserId + ")"); } - // Note: we assume that get/put operations for moved-to-global names have already - // been directed to the new location on the caller side (otherwise we'd fix them - // up here). - DatabaseHelper dbHelper; - SettingsCache cache; + return mutateSystemSettingLocked(name, value, requestingUserId, MUTATION_OPERATION_UPDATE); + } - // Get methods - if (Settings.CALL_METHOD_GET_SYSTEM.equals(method)) { - if (LOCAL_LOGV) Slog.v(TAG, "call(system:" + request + ") for " + callingUser); - // Check if this request should be (re)directed to the primary user's db - if (callingUser != UserHandle.USER_OWNER - && shouldShadowParentProfile(callingUser, sSystemCloneToManagedKeys, request)) { - callingUser = UserHandle.USER_OWNER; - } - dbHelper = getOrEstablishDatabase(callingUser); - cache = sSystemCaches.get(callingUser); - return lookupValue(dbHelper, TABLE_SYSTEM, cache, request); - } - if (Settings.CALL_METHOD_GET_SECURE.equals(method)) { - if (LOCAL_LOGV) Slog.v(TAG, "call(secure:" + request + ") for " + callingUser); - // Check if this is a setting to be copied from the primary user - if (shouldShadowParentProfile(callingUser, sSecureCloneToManagedKeys, request)) { - // If the request if for location providers and there's a restriction, return none - if (Secure.LOCATION_PROVIDERS_ALLOWED.equals(request) - && mUserManager.hasUserRestriction( - UserManager.DISALLOW_SHARE_LOCATION, new UserHandle(callingUser))) { - return sSecureCaches.get(callingUser).putIfAbsent(request, ""); - } - callingUser = UserHandle.USER_OWNER; - } - dbHelper = getOrEstablishDatabase(callingUser); - cache = sSecureCaches.get(callingUser); - return lookupValue(dbHelper, TABLE_SECURE, cache, request); - } - if (Settings.CALL_METHOD_GET_GLOBAL.equals(method)) { - if (LOCAL_LOGV) Slog.v(TAG, "call(global:" + request + ") for " + callingUser); - // fast path: owner db & cache are immutable after onCreate() so we need not - // guard on the attempt to look them up - return lookupValue(getOrEstablishDatabase(UserHandle.USER_OWNER), TABLE_GLOBAL, - sGlobalCache, request); - } - - // Put methods - new value is in the args bundle under the key named by - // the Settings.NameValueTable.VALUE static. - final String newValue = (args == null) - ? null : args.getString(Settings.NameValueTable.VALUE); - - // Framework can't do automatic permission checking for calls, so we need - // to do it here. - if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS) - != PackageManager.PERMISSION_GRANTED) { - throw new SecurityException( - String.format("Permission denial: writing to settings requires %1$s", - android.Manifest.permission.WRITE_SETTINGS)); + private boolean mutateSystemSettingLocked(String name, String value, int runAsUserId, + int operation) { + // Make sure the caller can change the settings. + enforceWritePermission(Manifest.permission.WRITE_SETTINGS); + + // Verify whether this operation is allowed for the calling package. + if (!isAppOpWriteSettingsAllowedForCallingPackage()) { + return false; } - // Also need to take care of app op. - if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SETTINGS, Binder.getCallingUid(), - getCallingPackage()) != AppOpsManager.MODE_ALLOWED) { - return null; + // Enforce what the calling package can mutate in the system settings. + enforceRestrictedSystemSettingsMutationForCallingPackageLocked(operation, name); + + // Resolve the userId on whose behalf the call is made. + final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(runAsUserId); + + // Determine the owning user as some profile settings are cloned from the parent. + final int owningUserId = resolveOwningUserIdForSystemSettingLocked(callingUserId, name); + + // Only the owning user id can change the setting. + if (owningUserId != callingUserId) { + return false; } - final ContentValues values = new ContentValues(); - values.put(Settings.NameValueTable.NAME, request); - values.put(Settings.NameValueTable.VALUE, newValue); - if (Settings.CALL_METHOD_PUT_SYSTEM.equals(method)) { - if (LOCAL_LOGV) { - Slog.v(TAG, "call_put(system:" + request + "=" + newValue + ") for " - + callingUser); - } - // Extra check for USER_OWNER to optimize for the 99% - if (callingUser != UserHandle.USER_OWNER && shouldShadowParentProfile(callingUser, - sSystemCloneToManagedKeys, request)) { - // Don't write these settings, as they are cloned from the parent profile - return null; + // Mutate the value. + switch (operation) { + case MUTATION_OPERATION_INSERT: { + validateSystemSettingValue(name, value); + return mSettingsRegistry.insertSettingLocked(SettingsRegistry.SETTINGS_TYPE_SYSTEM, + owningUserId, name, value, getCallingPackage()); } - insertForUser(Settings.System.CONTENT_URI, values, callingUser); - // Clone the settings to the managed profiles so that notifications can be sent out - if (callingUser == UserHandle.USER_OWNER && mManagedProfiles != null - && sSystemCloneToManagedKeys.contains(request)) { - final long token = Binder.clearCallingIdentity(); - try { - for (int i = mManagedProfiles.size() - 1; i >= 0; i--) { - if (LOCAL_LOGV) { - Slog.v(TAG, "putting to additional user " - + mManagedProfiles.get(i).id); - } - insertForUser(Settings.System.CONTENT_URI, values, - mManagedProfiles.get(i).id); - } - } finally { - Binder.restoreCallingIdentity(token); - } - } - } else if (Settings.CALL_METHOD_PUT_SECURE.equals(method)) { - if (LOCAL_LOGV) { - Slog.v(TAG, "call_put(secure:" + request + "=" + newValue + ") for " - + callingUser); - } - // Extra check for USER_OWNER to optimize for the 99% - if (callingUser != UserHandle.USER_OWNER && shouldShadowParentProfile(callingUser, - sSecureCloneToManagedKeys, request)) { - // Don't write these settings, as they are cloned from the parent profile - return null; - } - insertForUser(Settings.Secure.CONTENT_URI, values, callingUser); - // Clone the settings to the managed profiles so that notifications can be sent out - if (callingUser == UserHandle.USER_OWNER && mManagedProfiles != null - && sSecureCloneToManagedKeys.contains(request)) { - final long token = Binder.clearCallingIdentity(); - try { - for (int i = mManagedProfiles.size() - 1; i >= 0; i--) { - if (LOCAL_LOGV) { - Slog.v(TAG, "putting to additional user " - + mManagedProfiles.get(i).id); - } - try { - insertForUser(Settings.Secure.CONTENT_URI, values, - mManagedProfiles.get(i).id); - } catch (SecurityException e) { - // Temporary fix, see b/17450158 - Slog.w(TAG, "Cannot clone request '" + request + "' with value '" - + newValue + "' to managed profile (id " - + mManagedProfiles.get(i).id + ")", e); - } - } - } finally { - Binder.restoreCallingIdentity(token); - } + + case MUTATION_OPERATION_DELETE: { + return mSettingsRegistry.deleteSettingLocked( + SettingsRegistry.SETTINGS_TYPE_SYSTEM, + owningUserId, name); } - } else if (Settings.CALL_METHOD_PUT_GLOBAL.equals(method)) { - if (LOCAL_LOGV) { - Slog.v(TAG, "call_put(global:" + request + "=" + newValue + ") for " - + callingUser); + + case MUTATION_OPERATION_UPDATE: { + validateSystemSettingValue(name, value); + return mSettingsRegistry.updateSettingLocked(SettingsRegistry.SETTINGS_TYPE_SYSTEM, + owningUserId, name, value, getCallingPackage()); } - insertForUser(Settings.Global.CONTENT_URI, values, callingUser); - } else { - Slog.w(TAG, "call() with invalid method: " + method); } - return null; + return false; } - /** - * Check if the user is a managed profile and name is one of the settings to be cloned - * from the parent profile. - */ - private boolean shouldShadowParentProfile(int userId, HashSet<String> keys, String name) { - return isManagedProfile(userId) && keys.contains(name); + private void validateSystemSettingValue(String name, String value) { + Settings.System.Validator validator = Settings.System.VALIDATORS.get(name); + if (validator != null && !validator.validate(value)) { + throw new IllegalArgumentException("Invalid value: " + value + + " for setting: " + name); + } } - // Looks up value 'key' in 'table' and returns either a single-pair Bundle, - // possibly with a null value, or null on failure. - private Bundle lookupValue(DatabaseHelper dbHelper, String table, - final SettingsCache cache, String key) { - if (cache == null) { - Slog.e(TAG, "cache is null for user " + UserHandle.getCallingUserId() + " : key=" + key); - return null; + private boolean isLocationProvidersAllowedRestricted(String name, int callingUserId, + int owningUserId) { + // Optimization - location providers are restricted only for managed profiles. + if (callingUserId == owningUserId) { + return false; } - synchronized (cache) { - Bundle value = cache.get(key); - if (value != null) { - if (value != TOO_LARGE_TO_CACHE_MARKER) { - return value; - } - // else we fall through and read the value from disk - } else if (cache.fullyMatchesDisk()) { - // Fast path (very common). Don't even try touch disk - // if we know we've slurped it all in. Trying to - // touch the disk would mean waiting for yaffs2 to - // give us access, which could takes hundreds of - // milliseconds. And we're very likely being called - // from somebody's UI thread... - return NULL_SETTING; - } + if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name) + && mUserManager.hasUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, + new UserHandle(callingUserId))) { + return true; } + return false; + } - SQLiteDatabase db = dbHelper.getReadableDatabase(); - Cursor cursor = null; - try { - cursor = db.query(table, COLUMN_VALUE, "name=?", new String[]{key}, - null, null, null, null); - if (cursor != null && cursor.getCount() == 1) { - cursor.moveToFirst(); - return cache.putIfAbsent(key, cursor.getString(0)); - } - } catch (SQLiteException e) { - Log.w(TAG, "settings lookup error", e); - return null; - } finally { - if (cursor != null) cursor.close(); + private boolean isGlobalOrSecureSettingRestrictedForUser(String setting, int userId) { + String restriction = sSettingToUserRestrictionMap.get(setting); + if (restriction == null) { + return false; } - cache.putIfAbsent(key, null); - return NULL_SETTING; + return mUserManager.hasUserRestriction(restriction, new UserHandle(userId)); } - @Override - public Cursor query(Uri url, String[] select, String where, String[] whereArgs, String sort) { - return queryForUser(url, select, where, whereArgs, sort, UserHandle.getCallingUserId()); + private int resolveOwningUserIdForSecureSettingLocked(int userId, String setting) { + return resolveOwningUserIdLocked(userId, sSecureCloneToManagedSettings, setting); } - private Cursor queryForUser(Uri url, String[] select, String where, String[] whereArgs, - String sort, int forUser) { - if (LOCAL_LOGV) Slog.v(TAG, "query(" + url + ") for user " + forUser); - SqlArguments args = new SqlArguments(url, where, whereArgs); - DatabaseHelper dbH; - dbH = getOrEstablishDatabase( - TABLE_GLOBAL.equals(args.table) ? UserHandle.USER_OWNER : forUser); - SQLiteDatabase db = dbH.getReadableDatabase(); - - // The favorites table was moved from this provider to a provider inside Home - // Home still need to query this table to upgrade from pre-cupcake builds - // However, a cupcake+ build with no data does not contain this table which will - // cause an exception in the SQL stack. The following line is a special case to - // let the caller of the query have a chance to recover and avoid the exception - if (TABLE_FAVORITES.equals(args.table)) { - return null; - } else if (TABLE_OLD_FAVORITES.equals(args.table)) { - args.table = TABLE_FAVORITES; - Cursor cursor = db.rawQuery("PRAGMA table_info(favorites);", null); - if (cursor != null) { - boolean exists = cursor.getCount() > 0; - cursor.close(); - if (!exists) return null; - } else { - return null; - } + private int resolveOwningUserIdForSystemSettingLocked(int userId, String setting) { + return resolveOwningUserIdLocked(userId, sSystemCloneToManagedSettings, setting); + } + + private int resolveOwningUserIdLocked(int userId, Set<String> keys, String name) { + final int parentId = getGroupParentLocked(userId); + if (parentId != userId && keys.contains(name)) { + return parentId; } + return userId; + } - SQLiteQueryBuilder qb = new SQLiteQueryBuilder(); - qb.setTables(args.table); + private void enforceRestrictedSystemSettingsMutationForCallingPackageLocked(int operation, + String name) { + // System/root/shell can mutate whatever secure settings they want. + final int callingUid = Binder.getCallingUid(); + if (callingUid == android.os.Process.SYSTEM_UID + || callingUid == Process.SHELL_UID + || callingUid == Process.ROOT_UID) { + return; + } - Cursor ret = qb.query(db, select, args.where, args.args, null, null, sort); - // the default Cursor interface does not support per-user observation - try { - AbstractCursor c = (AbstractCursor) ret; - c.setNotificationUri(getContext().getContentResolver(), url, forUser); - } catch (ClassCastException e) { - // details of the concrete Cursor implementation have changed and this code has - // not been updated to match -- complain and fail hard. - Log.wtf(TAG, "Incompatible cursor derivation!"); - throw e; - } - return ret; - } + switch (operation) { + case MUTATION_OPERATION_INSERT: + // Insert updates. + case MUTATION_OPERATION_UPDATE: { + if (Settings.System.PUBLIC_SETTINGS.contains(name)) { + return; + } - @Override - public String getType(Uri url) { - // If SqlArguments supplies a where clause, then it must be an item - // (because we aren't supplying our own where clause). - SqlArguments args = new SqlArguments(url, null, null); - if (TextUtils.isEmpty(args.where)) { - return "vnd.android.cursor.dir/" + args.table; - } else { - return "vnd.android.cursor.item/" + args.table; + // The calling package is already verified. + PackageInfo packageInfo = getCallingPackageInfoOrThrow(); + + // Privileged apps can do whatever they want. + if ((packageInfo.applicationInfo.privateFlags + & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0) { + return; + } + + warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk( + packageInfo.applicationInfo.targetSdkVersion, name); + } break; + + case MUTATION_OPERATION_DELETE: { + if (Settings.System.PUBLIC_SETTINGS.contains(name) + || Settings.System.PRIVATE_SETTINGS.contains(name)) { + throw new IllegalArgumentException("You cannot delete system defined" + + " secure settings."); + } + + // The calling package is already verified. + PackageInfo packageInfo = getCallingPackageInfoOrThrow(); + + // Privileged apps can do whatever they want. + if ((packageInfo.applicationInfo.privateFlags & + ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0) { + return; + } + + warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk( + packageInfo.applicationInfo.targetSdkVersion, name); + } break; } } - @Override - public int bulkInsert(Uri uri, ContentValues[] values) { - final int callingUser = UserHandle.getCallingUserId(); - if (LOCAL_LOGV) Slog.v(TAG, "bulkInsert() for user " + callingUser); - SqlArguments args = new SqlArguments(uri); - if (TABLE_FAVORITES.equals(args.table)) { - return 0; + private PackageInfo getCallingPackageInfoOrThrow() { + try { + return mPackageManager.getPackageInfo(getCallingPackage(), 0); + } catch (PackageManager.NameNotFoundException e) { + throw new IllegalStateException("Calling package doesn't exist"); } - checkWritePermissions(args); - SettingsCache cache = cacheForTable(callingUser, args.table); + } - final AtomicInteger mutationCount; - synchronized (this) { - mutationCount = sKnownMutationsInFlight.get(callingUser); - } - if (mutationCount != null) { - mutationCount.incrementAndGet(); + private int getGroupParentLocked(int userId) { + // Most frequent use case. + if (userId == UserHandle.USER_OWNER) { + return userId; } - DatabaseHelper dbH = getOrEstablishDatabase( - TABLE_GLOBAL.equals(args.table) ? UserHandle.USER_OWNER : callingUser); - SQLiteDatabase db = dbH.getWritableDatabase(); - db.beginTransaction(); + // We are in the same process with the user manager and the returned + // user info is a cached instance, so just look up instead of cache. + final long identity = Binder.clearCallingIdentity(); try { - int numValues = values.length; - for (int i = 0; i < numValues; i++) { - checkUserRestrictions(values[i].getAsString(Settings.Secure.NAME), callingUser); - if (db.insert(args.table, null, values[i]) < 0) return 0; - SettingsCache.populate(cache, values[i]); - if (LOCAL_LOGV) Log.v(TAG, args.table + " <- " + values[i]); - } - db.setTransactionSuccessful(); + UserInfo userInfo = mUserManager.getProfileParent(userId); + return (userInfo != null) ? userInfo.id : userId; } finally { - db.endTransaction(); - if (mutationCount != null) { - mutationCount.decrementAndGet(); - } + Binder.restoreCallingIdentity(identity); } + } + + private boolean isAppOpWriteSettingsAllowedForCallingPackage() { + final int callingUid = Binder.getCallingUid(); + + mAppOpsManager.checkPackage(Binder.getCallingUid(), getCallingPackage()); + + return mAppOpsManager.noteOp(AppOpsManager.OP_WRITE_SETTINGS, callingUid, + getCallingPackage()) == AppOpsManager.MODE_ALLOWED; + } - sendNotify(uri, callingUser); - return values.length; + private void enforceWritePermission(String permission) { + if (getContext().checkCallingOrSelfPermission(permission) + != PackageManager.PERMISSION_GRANTED) { + throw new SecurityException("Permission denial: writing to settings requires:" + + permission); + } } /* @@ -999,332 +1015,830 @@ public class SettingsProvider extends ContentProvider { * But helper functions in android.providers.Settings can enable or disable * a single provider by using a "+" or "-" prefix before the provider name. * - * @returns whether the database needs to be updated or not, also modifying - * 'initialValues' if needed. + * @returns whether the enabled location providers changed. */ - private boolean parseProviderList(Uri url, ContentValues initialValues, int desiredUser) { - String value = initialValues.getAsString(Settings.Secure.VALUE); - String newProviders = null; - if (value != null && value.length() > 1) { - char prefix = value.charAt(0); - if (prefix == '+' || prefix == '-') { - // skip prefix - value = value.substring(1); - - // read list of enabled providers into "providers" - String providers = ""; - String[] columns = {Settings.Secure.VALUE}; - String where = Settings.Secure.NAME + "=\'" + Settings.Secure.LOCATION_PROVIDERS_ALLOWED + "\'"; - Cursor cursor = queryForUser(url, columns, where, null, null, desiredUser); - if (cursor != null && cursor.getCount() == 1) { - try { - cursor.moveToFirst(); - providers = cursor.getString(0); - } finally { - cursor.close(); - } - } + private boolean updateLocationProvidersAllowed(String value, int owningUserId) { + if (TextUtils.isEmpty(value)) { + return false; + } - int index = providers.indexOf(value); - int end = index + value.length(); - // check for commas to avoid matching on partial string - if (index > 0 && providers.charAt(index - 1) != ',') index = -1; - if (end < providers.length() && providers.charAt(end) != ',') index = -1; + final char prefix = value.charAt(0); + if (prefix != '+' && prefix != '-') { + return false; + } - if (prefix == '+' && index < 0) { - // append the provider to the list if not present - if (providers.length() == 0) { - newProviders = value; - } else { - newProviders = providers + ',' + value; - } - } else if (prefix == '-' && index >= 0) { - // remove the provider from the list if present - // remove leading or trailing comma - if (index > 0) { - index--; - } else if (end < providers.length()) { - end++; - } + // skip prefix + value = value.substring(1); - newProviders = providers.substring(0, index); - if (end < providers.length()) { - newProviders += providers.substring(end); - } - } else { - // nothing changed, so no need to update the database - return false; - } + Setting settingValue = getSecureSettingLocked( + Settings.Secure.LOCATION_PROVIDERS_ALLOWED, owningUserId); - if (newProviders != null) { - initialValues.put(Settings.Secure.VALUE, newProviders); - } + String oldProviders = (settingValue != null) ? settingValue.getValue() : ""; + + int index = oldProviders.indexOf(value); + int end = index + value.length(); + + // check for commas to avoid matching on partial string + if (index > 0 && oldProviders.charAt(index - 1) != ',') { + index = -1; + } + + // check for commas to avoid matching on partial string + if (end < oldProviders.length() && oldProviders.charAt(end) != ',') { + index = -1; + } + + String newProviders; + + if (prefix == '+' && index < 0) { + // append the provider to the list if not present + if (oldProviders.length() == 0) { + newProviders = value; + } else { + newProviders = oldProviders + ',' + value; + } + } else if (prefix == '-' && index >= 0) { + // remove the provider from the list if present + // remove leading or trailing comma + if (index > 0) { + index--; + } else if (end < oldProviders.length()) { + end++; } + + newProviders = oldProviders.substring(0, index); + if (end < oldProviders.length()) { + newProviders += oldProviders.substring(end); + } + } else { + // nothing changed, so no need to update the database + return false; } + updateSecureSettingLocked(Settings.Secure.LOCATION_PROVIDERS_ALLOWED, + newProviders, owningUserId); + return true; } - @Override - public Uri insert(Uri url, ContentValues initialValues) { - return insertForUser(url, initialValues, UserHandle.getCallingUserId()); + private void sendNotify(Uri uri, int userId) { + final long identity = Binder.clearCallingIdentity(); + try { + getContext().getContentResolver().notifyChange(uri, null, true, userId); + if (DEBUG) { + Slog.v(LOG_TAG, "Notifying for " + userId + ": " + uri); + } + } finally { + Binder.restoreCallingIdentity(identity); + } } - // Settings.put*ForUser() always winds up here, so this is where we apply - // policy around permission to write settings for other users. - private Uri insertForUser(Uri url, ContentValues initialValues, int desiredUserHandle) { - final int callingUser = UserHandle.getCallingUserId(); - if (callingUser != desiredUserHandle) { - getContext().enforceCallingOrSelfPermission( - android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, - "Not permitted to access settings for other users"); + private static void warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk( + int targetSdkVersion, String name) { + // If the app targets Lollipop MR1 or older SDK we warn, otherwise crash. + if (targetSdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1) { + if (Settings.System.PRIVATE_SETTINGS.contains(name)) { + Slog.w(LOG_TAG, "You shouldn't not change private system settings." + + " This will soon become an error."); + } else { + Slog.w(LOG_TAG, "You shouldn't keep your settings in the secure settings." + + " This will soon become an error."); + } + } else { + if (Settings.System.PRIVATE_SETTINGS.contains(name)) { + throw new IllegalArgumentException("You cannot change private secure settings."); + } else { + throw new IllegalArgumentException("You cannot keep your settings in" + + " the secure settings."); + } } + } - if (LOCAL_LOGV) Slog.v(TAG, "insert(" + url + ") for user " + desiredUserHandle - + " by " + callingUser); - - SqlArguments args = new SqlArguments(url); - if (TABLE_FAVORITES.equals(args.table)) { - return null; + private static int resolveCallingUserIdEnforcingPermissionsLocked(int requestingUserId) { + if (requestingUserId == UserHandle.getCallingUserId()) { + return requestingUserId; } + return ActivityManager.handleIncomingUser(Binder.getCallingPid(), + Binder.getCallingUid(), requestingUserId, false, true, + "get/set setting for user", null); + } - // Special case LOCATION_PROVIDERS_ALLOWED. - // Support enabling/disabling a single provider (using "+" or "-" prefix) - String name = initialValues.getAsString(Settings.Secure.NAME); - if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name)) { - if (!parseProviderList(url, initialValues, desiredUserHandle)) return null; + private static Bundle packageValueForCallResult(Setting setting) { + if (setting == null) { + return NULL_SETTING; } + return Bundle.forPair(Settings.NameValueTable.VALUE, setting.getValue()); + } - // If this is an insert() of a key that has been migrated to the global store, - // redirect the operation to that store - if (name != null) { - if (sSecureGlobalKeys.contains(name) || sSystemGlobalKeys.contains(name)) { - if (!TABLE_GLOBAL.equals(args.table)) { - if (LOCAL_LOGV) Slog.i(TAG, "Rewrite of insert() of now-global key " + name); - } - args.table = TABLE_GLOBAL; // next condition will rewrite the user handle - } - } + private static int getRequestingUserId(Bundle args) { + final int callingUserId = UserHandle.getCallingUserId(); + return (args != null) ? args.getInt(Settings.CALL_METHOD_USER_KEY, callingUserId) + : callingUserId; + } - // Check write permissions only after determining which table the insert will touch - checkWritePermissions(args); + private static String getSettingValue(Bundle args) { + return (args != null) ? args.getString(Settings.NameValueTable.VALUE) : null; + } - checkUserRestrictions(name, desiredUserHandle); + private static String getValidTableOrThrow(Uri uri) { + if (uri.getPathSegments().size() > 0) { + String table = uri.getPathSegments().get(0); + if (DatabaseHelper.isValidTable(table)) { + return table; + } + throw new IllegalArgumentException("Bad root path: " + table); + } + throw new IllegalArgumentException("Invalid URI:" + uri); + } - // The global table is stored under the owner, always - if (TABLE_GLOBAL.equals(args.table)) { - desiredUserHandle = UserHandle.USER_OWNER; + private static MatrixCursor packageSettingForQuery(Setting setting, String[] projection) { + if (setting == null) { + return new MatrixCursor(projection, 0); } + MatrixCursor cursor = new MatrixCursor(projection, 1); + appendSettingToCursor(cursor, setting); + return cursor; + } - SettingsCache cache = cacheForTable(desiredUserHandle, args.table); - String value = initialValues.getAsString(Settings.NameValueTable.VALUE); - if (SettingsCache.isRedundantSetValue(cache, name, value)) { - return Uri.withAppendedPath(url, name); + private static String[] normalizeProjection(String[] projection) { + if (projection == null) { + return ALL_COLUMNS; } - final AtomicInteger mutationCount; - synchronized (this) { - mutationCount = sKnownMutationsInFlight.get(callingUser); + final int columnCount = projection.length; + for (int i = 0; i < columnCount; i++) { + String column = projection[i]; + if (!ArrayUtils.contains(ALL_COLUMNS, column)) { + throw new IllegalArgumentException("Invalid column: " + column); + } } - if (mutationCount != null) { - mutationCount.incrementAndGet(); + + return projection; + } + + private static void appendSettingToCursor(MatrixCursor cursor, Setting setting) { + final int columnCount = cursor.getColumnCount(); + + String[] values = new String[columnCount]; + + for (int i = 0; i < columnCount; i++) { + String column = cursor.getColumnName(i); + + switch (column) { + case Settings.NameValueTable._ID: { + values[i] = setting.getId(); + } break; + + case Settings.NameValueTable.NAME: { + values[i] = setting.getName(); + } break; + + case Settings.NameValueTable.VALUE: { + values[i] = setting.getValue(); + } break; + } } - DatabaseHelper dbH = getOrEstablishDatabase(desiredUserHandle); - SQLiteDatabase db = dbH.getWritableDatabase(); - final long rowId = db.insert(args.table, null, initialValues); - if (mutationCount != null) { - mutationCount.decrementAndGet(); + + cursor.addRow(values); + } + + private static final class Arguments { + private static final Pattern WHERE_PATTERN_WITH_PARAM_NO_BRACKETS = + Pattern.compile("[\\s]*name[\\s]*=[\\s]*\\?[\\s]*"); + + private static final Pattern WHERE_PATTERN_WITH_PARAM_IN_BRACKETS = + Pattern.compile("[\\s]*\\([\\s]*name[\\s]*=[\\s]*\\?[\\s]*\\)[\\s]*"); + + private static final Pattern WHERE_PATTERN_NO_PARAM_IN_BRACKETS = + Pattern.compile("[\\s]*\\([\\s]*name[\\s]*=[\\s]*['\"].*['\"][\\s]*\\)[\\s]*"); + + private static final Pattern WHERE_PATTERN_NO_PARAM_NO_BRACKETS = + Pattern.compile("[\\s]*name[\\s]*=[\\s]*['\"].*['\"][\\s]*"); + + public final String table; + public final String name; + + public Arguments(Uri uri, String where, String[] whereArgs, boolean supportAll) { + final int segmentSize = uri.getPathSegments().size(); + switch (segmentSize) { + case 1: { + if (where != null + && (WHERE_PATTERN_WITH_PARAM_NO_BRACKETS.matcher(where).matches() + || WHERE_PATTERN_WITH_PARAM_IN_BRACKETS.matcher(where).matches()) + && whereArgs.length == 1) { + name = whereArgs[0]; + table = computeTableForSetting(uri, name); + return; + } else if (where != null + && (WHERE_PATTERN_NO_PARAM_NO_BRACKETS.matcher(where).matches() + || WHERE_PATTERN_NO_PARAM_IN_BRACKETS.matcher(where).matches())) { + final int startIndex = Math.max(where.indexOf("'"), + where.indexOf("\"")) + 1; + final int endIndex = Math.max(where.lastIndexOf("'"), + where.lastIndexOf("\"")); + name = where.substring(startIndex, endIndex); + table = computeTableForSetting(uri, name); + return; + } else if (supportAll && where == null && whereArgs == null) { + name = null; + table = computeTableForSetting(uri, null); + return; + } + } break; + + case 2: { + if (where == null && whereArgs == null) { + name = uri.getPathSegments().get(1); + table = computeTableForSetting(uri, name); + return; + } + } break; + } + + EventLogTags.writeUnsupportedSettingsQuery( + uri.toSafeString(), where, Arrays.toString(whereArgs)); + String message = String.format( "Supported SQL:\n" + + " uri content://some_table/some_property with null where and where args\n" + + " uri content://some_table with query name=? and single name as arg\n" + + " uri content://some_table with query name=some_name and null args\n" + + " but got - uri:%1s, where:%2s whereArgs:%3s", uri, where, + Arrays.toString(whereArgs)); + throw new IllegalArgumentException(message); } - if (rowId <= 0) return null; - SettingsCache.populate(cache, initialValues); // before we notify + private static String computeTableForSetting(Uri uri, String name) { + String table = getValidTableOrThrow(uri); + + if (name != null) { + if (sSystemMovedToSecureSettings.contains(name)) { + table = TABLE_SECURE; + } + + if (sSystemMovedToGlobalSettings.contains(name)) { + table = TABLE_GLOBAL; + } + + if (sSecureMovedToGlobalSettings.contains(name)) { + table = TABLE_GLOBAL; + } + + if (sGlobalMovedToSecureSettings.contains(name)) { + table = TABLE_SECURE; + } + } - if (LOCAL_LOGV) Log.v(TAG, args.table + " <- " + initialValues - + " for user " + desiredUserHandle); - // Note that we use the original url here, not the potentially-rewritten table name - url = getUriFor(url, initialValues, rowId); - sendNotify(url, desiredUserHandle); - return url; + return table; + } } - @Override - public int delete(Uri url, String where, String[] whereArgs) { - int callingUser = UserHandle.getCallingUserId(); - if (LOCAL_LOGV) Slog.v(TAG, "delete() for user " + callingUser); - SqlArguments args = new SqlArguments(url, where, whereArgs); - if (TABLE_FAVORITES.equals(args.table)) { - return 0; - } else if (TABLE_OLD_FAVORITES.equals(args.table)) { - args.table = TABLE_FAVORITES; - } else if (TABLE_GLOBAL.equals(args.table)) { - callingUser = UserHandle.USER_OWNER; + final class SettingsRegistry { + private static final String DROPBOX_TAG_USERLOG = "restricted_profile_ssaid"; + + private static final int SETTINGS_TYPE_GLOBAL = 0; + private static final int SETTINGS_TYPE_SYSTEM = 1; + private static final int SETTINGS_TYPE_SECURE = 2; + + private static final int SETTINGS_TYPE_MASK = 0xF0000000; + private static final int SETTINGS_TYPE_SHIFT = 28; + + private static final String SETTINGS_FILE_GLOBAL = "settings_global.xml"; + private static final String SETTINGS_FILE_SYSTEM = "settings_system.xml"; + private static final String SETTINGS_FILE_SECURE = "settings_secure.xml"; + + private final SparseArray<SettingsState> mSettingsStates = new SparseArray<>(); + + private final BackupManager mBackupManager; + + public SettingsRegistry() { + mBackupManager = new BackupManager(getContext()); + migrateAllLegacySettingsIfNeeded(); } - checkWritePermissions(args); - final AtomicInteger mutationCount; - synchronized (this) { - mutationCount = sKnownMutationsInFlight.get(callingUser); + public List<String> getSettingsNamesLocked(int type, int userId) { + final int key = makeKey(type, userId); + SettingsState settingsState = peekSettingsStateLocked(key); + return settingsState.getSettingNamesLocked(); } - if (mutationCount != null) { - mutationCount.incrementAndGet(); + + public SettingsState getSettingsLocked(int type, int userId) { + final int key = makeKey(type, userId); + return peekSettingsStateLocked(key); } - DatabaseHelper dbH = getOrEstablishDatabase(callingUser); - SQLiteDatabase db = dbH.getWritableDatabase(); - int count = db.delete(args.table, args.where, args.args); - if (mutationCount != null) { - mutationCount.decrementAndGet(); + + public void ensureSettingsForUserLocked(int userId) { + // Migrate the setting for this user if needed. + migrateLegacySettingsForUserIfNeededLocked(userId); + + // Ensure global settings loaded if owner. + if (userId == UserHandle.USER_OWNER) { + final int globalKey = makeKey(SETTINGS_TYPE_GLOBAL, UserHandle.USER_OWNER); + ensureSettingsStateLocked(globalKey); + } + + // Ensure secure settings loaded. + final int secureKey = makeKey(SETTINGS_TYPE_SECURE, userId); + ensureSettingsStateLocked(secureKey); + + // Make sure the secure settings have an Android id set. + SettingsState secureSettings = getSettingsLocked(SETTINGS_TYPE_SECURE, userId); + ensureSecureSettingAndroidIdSetLocked(secureSettings); + + // Ensure system settings loaded. + final int systemKey = makeKey(SETTINGS_TYPE_SYSTEM, userId); + ensureSettingsStateLocked(systemKey); + + // Upgrade the settings to the latest version. + UpgradeController upgrader = new UpgradeController(userId); + upgrader.upgradeIfNeededLocked(); } - if (count > 0) { - invalidateCache(callingUser, args.table); // before we notify - sendNotify(url, callingUser); + + private void ensureSettingsStateLocked(int key) { + if (mSettingsStates.get(key) == null) { + final int maxBytesPerPackage = getMaxBytesPerPackageForType(getTypeFromKey(key)); + SettingsState settingsState = new SettingsState(mLock, getSettingsFile(key), key, + maxBytesPerPackage); + mSettingsStates.put(key, settingsState); + } } - startAsyncCachePopulation(callingUser); - if (LOCAL_LOGV) Log.v(TAG, args.table + ": " + count + " row(s) deleted"); - return count; - } - @Override - public int update(Uri url, ContentValues initialValues, String where, String[] whereArgs) { - // NOTE: update() is never called by the front-end Settings API, and updates that - // wind up affecting rows in Secure that are globally shared will not have the - // intended effect (the update will be invisible to the rest of the system). - // This should have no practical effect, since writes to the Secure db can only - // be done by system code, and that code should be using the correct API up front. - int callingUser = UserHandle.getCallingUserId(); - if (LOCAL_LOGV) Slog.v(TAG, "update() for user " + callingUser); - SqlArguments args = new SqlArguments(url, where, whereArgs); - if (TABLE_FAVORITES.equals(args.table)) { - return 0; - } else if (TABLE_GLOBAL.equals(args.table)) { - callingUser = UserHandle.USER_OWNER; + public void removeUserStateLocked(int userId, boolean permanently) { + // We always keep the global settings in memory. + + // Nuke system settings. + final int systemKey = makeKey(SETTINGS_TYPE_SYSTEM, userId); + final SettingsState systemSettingsState = mSettingsStates.get(systemKey); + if (systemSettingsState != null) { + if (permanently) { + mSettingsStates.remove(systemKey); + systemSettingsState.destroyLocked(null); + } else { + systemSettingsState.destroyLocked(new Runnable() { + @Override + public void run() { + mSettingsStates.remove(systemKey); + } + }); + } + } + + // Nuke secure settings. + final int secureKey = makeKey(SETTINGS_TYPE_SECURE, userId); + final SettingsState secureSettingsState = mSettingsStates.get(secureKey); + if (secureSettingsState != null) { + if (permanently) { + mSettingsStates.remove(secureKey); + secureSettingsState.destroyLocked(null); + } else { + secureSettingsState.destroyLocked(new Runnable() { + @Override + public void run() { + mSettingsStates.remove(secureKey); + } + }); + } + } } - checkWritePermissions(args); - checkUserRestrictions(initialValues.getAsString(Settings.Secure.NAME), callingUser); - final AtomicInteger mutationCount; - synchronized (this) { - mutationCount = sKnownMutationsInFlight.get(callingUser); + public boolean insertSettingLocked(int type, int userId, String name, String value, + String packageName) { + final int key = makeKey(type, userId); + + SettingsState settingsState = peekSettingsStateLocked(key); + final boolean success = settingsState.insertSettingLocked(name, value, packageName); + + if (success) { + notifyForSettingsChange(key, name); + } + return success; } - if (mutationCount != null) { - mutationCount.incrementAndGet(); + + public boolean deleteSettingLocked(int type, int userId, String name) { + final int key = makeKey(type, userId); + + SettingsState settingsState = peekSettingsStateLocked(key); + final boolean success = settingsState.deleteSettingLocked(name); + + if (success) { + notifyForSettingsChange(key, name); + } + return success; } - DatabaseHelper dbH = getOrEstablishDatabase(callingUser); - SQLiteDatabase db = dbH.getWritableDatabase(); - int count = db.update(args.table, initialValues, args.where, args.args); - if (mutationCount != null) { - mutationCount.decrementAndGet(); + + public Setting getSettingLocked(int type, int userId, String name) { + final int key = makeKey(type, userId); + + SettingsState settingsState = peekSettingsStateLocked(key); + return settingsState.getSettingLocked(name); } - if (count > 0) { - invalidateCache(callingUser, args.table); // before we notify - sendNotify(url, callingUser); + + public boolean updateSettingLocked(int type, int userId, String name, String value, + String packageName) { + final int key = makeKey(type, userId); + + SettingsState settingsState = peekSettingsStateLocked(key); + final boolean success = settingsState.updateSettingLocked(name, value, packageName); + + if (success) { + notifyForSettingsChange(key, name); + } + + return success; } - startAsyncCachePopulation(callingUser); - if (LOCAL_LOGV) Log.v(TAG, args.table + ": " + count + " row(s) <- " + initialValues); - return count; - } - @Override - public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { - throw new FileNotFoundException("Direct file access no longer supported; " - + "ringtone playback is available through android.media.Ringtone"); - } + public void onPackageRemovedLocked(String packageName, int userId) { + final int globalKey = makeKey(SETTINGS_TYPE_GLOBAL, UserHandle.USER_OWNER); + SettingsState globalSettings = mSettingsStates.get(globalKey); + globalSettings.onPackageRemovedLocked(packageName); - /** - * In-memory LRU Cache of system and secure settings, along with - * associated helper functions to keep cache coherent with the - * database. - */ - private static final class SettingsCache extends LruCache<String, Bundle> { + final int secureKey = makeKey(SETTINGS_TYPE_SECURE, userId); + SettingsState secureSettings = mSettingsStates.get(secureKey); + secureSettings.onPackageRemovedLocked(packageName); - private final String mCacheName; - private boolean mCacheFullyMatchesDisk = false; // has the whole database slurped. + final int systemKey = makeKey(SETTINGS_TYPE_SYSTEM, userId); + SettingsState systemSettings = mSettingsStates.get(systemKey); + systemSettings.onPackageRemovedLocked(packageName); + } + + private SettingsState peekSettingsStateLocked(int key) { + SettingsState settingsState = mSettingsStates.get(key); + if (settingsState != null) { + return settingsState; + } - public SettingsCache(String name) { - super(MAX_CACHE_ENTRIES); - mCacheName = name; + ensureSettingsForUserLocked(getUserIdFromKey(key)); + return mSettingsStates.get(key); } - /** - * Is the whole database table slurped into this cache? - */ - public boolean fullyMatchesDisk() { - synchronized (this) { - return mCacheFullyMatchesDisk; + private void migrateAllLegacySettingsIfNeeded() { + synchronized (mLock) { + final int key = makeKey(SETTINGS_TYPE_GLOBAL, UserHandle.USER_OWNER); + File globalFile = getSettingsFile(key); + if (globalFile.exists()) { + return; + } + + final long identity = Binder.clearCallingIdentity(); + try { + List<UserInfo> users = mUserManager.getUsers(true); + + final int userCount = users.size(); + for (int i = 0; i < userCount; i++) { + final int userId = users.get(i).id; + + DatabaseHelper dbHelper = new DatabaseHelper(getContext(), userId); + SQLiteDatabase database = dbHelper.getWritableDatabase(); + migrateLegacySettingsForUserLocked(dbHelper, database, userId); + + // Upgrade to the latest version. + UpgradeController upgrader = new UpgradeController(userId); + upgrader.upgradeIfNeededLocked(); + + // Drop from memory if not a running user. + if (!mUserManager.isUserRunning(new UserHandle(userId))) { + removeUserStateLocked(userId, false); + } + } + } finally { + Binder.restoreCallingIdentity(identity); + } } } - public void setFullyMatchesDisk(boolean value) { - synchronized (this) { - mCacheFullyMatchesDisk = value; + private void migrateLegacySettingsForUserIfNeededLocked(int userId) { + // Every user has secure settings and if no file we need to migrate. + final int secureKey = makeKey(SETTINGS_TYPE_SECURE, userId); + File secureFile = getSettingsFile(secureKey); + if (secureFile.exists()) { + return; } + + DatabaseHelper dbHelper = new DatabaseHelper(getContext(), userId); + SQLiteDatabase database = dbHelper.getWritableDatabase(); + + migrateLegacySettingsForUserLocked(dbHelper, database, userId); } - @Override - protected void entryRemoved(boolean evicted, String key, Bundle oldValue, Bundle newValue) { - if (evicted) { - mCacheFullyMatchesDisk = false; + private void migrateLegacySettingsForUserLocked(DatabaseHelper dbHelper, + SQLiteDatabase database, int userId) { + // Move over the global settings if owner. + if (userId == UserHandle.USER_OWNER) { + final int globalKey = makeKey(SETTINGS_TYPE_GLOBAL, userId); + ensureSettingsStateLocked(globalKey); + SettingsState globalSettings = mSettingsStates.get(globalKey); + migrateLegacySettingsLocked(globalSettings, database, TABLE_GLOBAL); + globalSettings.persistSyncLocked(); + } + + // Move over the secure settings. + final int secureKey = makeKey(SETTINGS_TYPE_SECURE, userId); + ensureSettingsStateLocked(secureKey); + SettingsState secureSettings = mSettingsStates.get(secureKey); + migrateLegacySettingsLocked(secureSettings, database, TABLE_SECURE); + ensureSecureSettingAndroidIdSetLocked(secureSettings); + secureSettings.persistSyncLocked(); + + // Move over the system settings. + final int systemKey = makeKey(SETTINGS_TYPE_SYSTEM, userId); + ensureSettingsStateLocked(systemKey); + SettingsState systemSettings = mSettingsStates.get(systemKey); + migrateLegacySettingsLocked(systemSettings, database, TABLE_SYSTEM); + systemSettings.persistSyncLocked(); + + // Drop the database as now all is moved and persisted. + if (DROP_DATABASE_ON_MIGRATION) { + dbHelper.dropDatabase(); + } else { + dbHelper.backupDatabase(); } } - /** - * Atomic cache population, conditional on size of value and if - * we lost a race. - * - * @returns a Bundle to send back to the client from call(), even - * if we lost the race. - */ - public Bundle putIfAbsent(String key, String value) { - Bundle bundle = (value == null) ? NULL_SETTING : Bundle.forPair("value", value); - if (value == null || value.length() <= MAX_CACHE_ENTRY_SIZE) { - synchronized (this) { - if (get(key) == null) { - put(key, bundle); - } + private void migrateLegacySettingsLocked(SettingsState settingsState, + SQLiteDatabase database, String table) { + SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder(); + queryBuilder.setTables(table); + + Cursor cursor = queryBuilder.query(database, ALL_COLUMNS, + null, null, null, null, null); + + if (cursor == null) { + return; + } + + try { + if (!cursor.moveToFirst()) { + return; + } + + final int nameColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.NAME); + final int valueColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.VALUE); + + settingsState.setVersionLocked(database.getVersion()); + + while (!cursor.isAfterLast()) { + String name = cursor.getString(nameColumnIdx); + String value = cursor.getString(valueColumnIdx); + settingsState.insertSettingLocked(name, value, + SettingsState.SYSTEM_PACKAGE_NAME); + cursor.moveToNext(); } + } finally { + cursor.close(); } - return bundle; } - /** - * Populates a key in a given (possibly-null) cache. - */ - public static void populate(SettingsCache cache, ContentValues contentValues) { - if (cache == null) { + private void ensureSecureSettingAndroidIdSetLocked(SettingsState secureSettings) { + Setting value = secureSettings.getSettingLocked(Settings.Secure.ANDROID_ID); + + if (value != null) { return; } - String name = contentValues.getAsString(Settings.NameValueTable.NAME); - if (name == null) { - Log.w(TAG, "null name populating settings cache."); + + final int userId = getUserIdFromKey(secureSettings.mKey); + + final UserInfo user; + final long identity = Binder.clearCallingIdentity(); + try { + user = mUserManager.getUserInfo(userId); + } finally { + Binder.restoreCallingIdentity(identity); + } + if (user == null) { + // Can happen due to races when deleting users - treat as benign. return; } - String value = contentValues.getAsString(Settings.NameValueTable.VALUE); - cache.populate(name, value); + + String androidId = Long.toHexString(new SecureRandom().nextLong()); + secureSettings.insertSettingLocked(Settings.Secure.ANDROID_ID, androidId, + SettingsState.SYSTEM_PACKAGE_NAME); + + Slog.d(LOG_TAG, "Generated and saved new ANDROID_ID [" + androidId + + "] for user " + userId); + + // Write a drop box entry if it's a restricted profile + if (user.isRestricted()) { + DropBoxManager dbm = (DropBoxManager) getContext().getSystemService( + Context.DROPBOX_SERVICE); + if (dbm != null && dbm.isTagEnabled(DROPBOX_TAG_USERLOG)) { + dbm.addText(DROPBOX_TAG_USERLOG, System.currentTimeMillis() + + "," + DROPBOX_TAG_USERLOG + "," + androidId + "\n"); + } + } } - public void populate(String name, String value) { - synchronized (this) { - if (value == null || value.length() <= MAX_CACHE_ENTRY_SIZE) { - put(name, Bundle.forPair(Settings.NameValueTable.VALUE, value)); - } else { - put(name, TOO_LARGE_TO_CACHE_MARKER); + private void notifyForSettingsChange(int key, String name) { + // Update the system property *first*, so if someone is listening for + // a notification and then using the contract class to get their data, + // the system property will be updated and they'll get the new data. + + boolean backedUpDataChanged = false; + String property = null; + if (isGlobalSettingsKey(key)) { + property = Settings.Global.SYS_PROP_SETTING_VERSION; + backedUpDataChanged = true; + } else if (isSecureSettingsKey(key)) { + property = Settings.Secure.SYS_PROP_SETTING_VERSION; + backedUpDataChanged = true; + } else if (isSystemSettingsKey(key)) { + property = Settings.System.SYS_PROP_SETTING_VERSION; + backedUpDataChanged = true; + } + + if (property != null) { + final long version = SystemProperties.getLong(property, 0) + 1; + SystemProperties.set(property, Long.toString(version)); + if (DEBUG) { + Slog.v(LOG_TAG, "System property " + property + "=" + version); } } + + // Inform the backup manager about a data change + if (backedUpDataChanged) { + mBackupManager.dataChanged(); + } + + // Now send the notification through the content framework. + + final int userId = getUserIdFromKey(key); + Uri uri = getNotificationUriFor(key, name); + + sendNotify(uri, userId); + } + + private int makeKey(int type, int userId) { + return (type << SETTINGS_TYPE_SHIFT) | userId; + } + + private int getTypeFromKey(int key) { + return key >> SETTINGS_TYPE_SHIFT; + } + + private int getUserIdFromKey(int key) { + return key & ~SETTINGS_TYPE_MASK; + } + + private boolean isGlobalSettingsKey(int key) { + return getTypeFromKey(key) == SETTINGS_TYPE_GLOBAL; + } + + private boolean isSystemSettingsKey(int key) { + return getTypeFromKey(key) == SETTINGS_TYPE_SYSTEM; + } + + private boolean isSecureSettingsKey(int key) { + return getTypeFromKey(key) == SETTINGS_TYPE_SECURE; + } + + private File getSettingsFile(int key) { + if (isGlobalSettingsKey(key)) { + final int userId = getUserIdFromKey(key); + return new File(Environment.getUserSystemDirectory(userId), + SETTINGS_FILE_GLOBAL); + } else if (isSystemSettingsKey(key)) { + final int userId = getUserIdFromKey(key); + return new File(Environment.getUserSystemDirectory(userId), + SETTINGS_FILE_SYSTEM); + } else if (isSecureSettingsKey(key)) { + final int userId = getUserIdFromKey(key); + return new File(Environment.getUserSystemDirectory(userId), + SETTINGS_FILE_SECURE); + } else { + throw new IllegalArgumentException("Invalid settings key:" + key); + } } - /** - * For suppressing duplicate/redundant settings inserts early, - * checking our cache first (but without faulting it in), - * before going to sqlite with the mutation. - */ - public static boolean isRedundantSetValue(SettingsCache cache, String name, String value) { - if (cache == null) return false; - synchronized (cache) { - Bundle bundle = cache.get(name); - if (bundle == null) return false; - String oldValue = bundle.getPairValue(); - if (oldValue == null && value == null) return true; - if ((oldValue == null) != (value == null)) return false; - return oldValue.equals(value); + private Uri getNotificationUriFor(int key, String name) { + if (isGlobalSettingsKey(key)) { + return (name != null) ? Uri.withAppendedPath(Settings.Global.CONTENT_URI, name) + : Settings.Global.CONTENT_URI; + } else if (isSecureSettingsKey(key)) { + return (name != null) ? Uri.withAppendedPath(Settings.Secure.CONTENT_URI, name) + : Settings.Secure.CONTENT_URI; + } else if (isSystemSettingsKey(key)) { + return (name != null) ? Uri.withAppendedPath(Settings.System.CONTENT_URI, name) + : Settings.System.CONTENT_URI; + } else { + throw new IllegalArgumentException("Invalid settings key:" + key); + } + } + + private int getMaxBytesPerPackageForType(int type) { + switch (type) { + case SETTINGS_TYPE_GLOBAL: + case SETTINGS_TYPE_SECURE: { + return SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED; + } + + default: { + return SettingsState.MAX_BYTES_PER_APP_PACKAGE_LIMITED; + } + } + } + + private final class UpgradeController { + private static final int SETTINGS_VERSION = 118; + + private final int mUserId; + + public UpgradeController(int userId) { + mUserId = userId; + } + + public void upgradeIfNeededLocked() { + // The version of all settings for a user is the same (all users have secure). + SettingsState secureSettings = getSettingsLocked( + SettingsRegistry.SETTINGS_TYPE_SECURE, mUserId); + + // Try an update from the current state. + final int oldVersion = secureSettings.getVersionLocked(); + final int newVersion = SETTINGS_VERSION; + + // If up do data - done. + if (oldVersion == newVersion) { + return; + } + + // Try to upgrade. + final int curVersion = onUpgradeLocked(mUserId, oldVersion, newVersion); + + // If upgrade failed start from scratch and upgrade. + if (curVersion != newVersion) { + // Drop state we have for this user. + removeUserStateLocked(mUserId, true); + + // Recreate the database. + DatabaseHelper dbHelper = new DatabaseHelper(getContext(), mUserId); + SQLiteDatabase database = dbHelper.getWritableDatabase(); + dbHelper.recreateDatabase(database, newVersion, curVersion, oldVersion); + + // Migrate the settings for this user. + migrateLegacySettingsForUserLocked(dbHelper, database, mUserId); + + // Now upgrade should work fine. + onUpgradeLocked(mUserId, oldVersion, newVersion); + } + + // Set the global settings version if owner. + if (mUserId == UserHandle.USER_OWNER) { + SettingsState globalSettings = getSettingsLocked( + SettingsRegistry.SETTINGS_TYPE_GLOBAL, mUserId); + globalSettings.setVersionLocked(newVersion); + } + + // Set the secure settings version. + secureSettings.setVersionLocked(newVersion); + + // Set the system settings version. + SettingsState systemSettings = getSettingsLocked( + SettingsRegistry.SETTINGS_TYPE_SYSTEM, mUserId); + systemSettings.setVersionLocked(newVersion); + } + + private SettingsState getGlobalSettingsLocked() { + return getSettingsLocked(SETTINGS_TYPE_GLOBAL, UserHandle.USER_OWNER); + } + + private SettingsState getSecureSettingsLocked(int userId) { + return getSettingsLocked(SETTINGS_TYPE_SECURE, userId); + } + + private SettingsState getSystemSettingsLocked(int userId) { + return getSettingsLocked(SETTINGS_TYPE_SYSTEM, userId); + } + + private int onUpgradeLocked(int userId, int oldVersion, int newVersion) { + if (DEBUG) { + Slog.w(LOG_TAG, "Upgrading settings for user: " + userId + " from version: " + + oldVersion + " to version: " + newVersion); + } + + // You must perform all necessary mutations to bring the settings + // for this user from the old to the new version. When you add a new + // upgrade step you *must* update SETTINGS_VERSION. + + /** + * This is an example of moving a setting from secure to global. + * + * int currentVersion = oldVersion; + * if (currentVersion == 118) { + * // Remove from the secure settings. + * SettingsState secureSettings = getSecureSettingsLocked(userId); + * String name = "example_setting_to_move"; + * String value = secureSettings.getSetting(name); + * secureSettings.deleteSetting(name); + * + * // Add to the global settings. + * SettingsState globalSettings = getGlobalSettingsLocked(); + * globalSettings.insertSetting(name, value, SettingsState.SYSTEM_PACKAGE_NAME); + * + * // Update the current version. + * currentVersion = 119; + * } + * + * // Return the current version. + * return currentVersion; + */ + + return SettingsState.VERSION_UNDEFINED; } } } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java new file mode 100644 index 0000000..833638c --- /dev/null +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java @@ -0,0 +1,575 @@ +/* + * Copyright (C) 2015 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.providers.settings; + +import android.os.Handler; +import android.os.Message; +import android.os.SystemClock; +import android.provider.Settings; +import android.text.TextUtils; +import android.util.ArrayMap; +import android.util.AtomicFile; +import android.util.Slog; +import android.util.Xml; +import com.android.internal.annotations.GuardedBy; +import com.android.internal.os.BackgroundThread; +import libcore.io.IoUtils; +import libcore.util.Objects; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlSerializer; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * This class contains the state for one type of settings. It is responsible + * for saving the state asynchronously to an XML file after a mutation and + * loading the from an XML file on construction. + * <p> + * This class uses the same lock as the settings provider to ensure that + * multiple changes made by the settings provider, e,g, upgrade, bulk insert, + * etc, are atomically persisted since the asynchronous persistence is using + * the same lock to grab the current state to write to disk. + * </p> + */ +final class SettingsState { + private static final boolean DEBUG = false; + private static final boolean DEBUG_PERSISTENCE = false; + + private static final String LOG_TAG = "SettingsState"; + + private static final long WRITE_SETTINGS_DELAY_MILLIS = 200; + private static final long MAX_WRITE_SETTINGS_DELAY_MILLIS = 2000; + + public static final int MAX_BYTES_PER_APP_PACKAGE_UNLIMITED = -1; + public static final int MAX_BYTES_PER_APP_PACKAGE_LIMITED = 20000; + + public static final String SYSTEM_PACKAGE_NAME = "android"; + + public static final int VERSION_UNDEFINED = -1; + + private static final String TAG_SETTINGS = "settings"; + private static final String TAG_SETTING = "setting"; + private static final String ATTR_PACKAGE = "package"; + + private static final String ATTR_VERSION = "version"; + private static final String ATTR_ID = "id"; + private static final String ATTR_NAME = "name"; + private static final String ATTR_VALUE = "value"; + + private static final String NULL_VALUE = "null"; + + private final Object mLock; + + private final Handler mHandler = new MyHandler(); + + @GuardedBy("mLock") + private final ArrayMap<String, Setting> mSettings = new ArrayMap<>(); + + @GuardedBy("mLock") + private final ArrayMap<String, Integer> mPackageToMemoryUsage; + + @GuardedBy("mLock") + private final int mMaxBytesPerAppPackage; + + @GuardedBy("mLock") + private final File mStatePersistFile; + + public final int mKey; + + @GuardedBy("mLock") + private int mVersion = VERSION_UNDEFINED; + + @GuardedBy("mLock") + private long mLastNotWrittenMutationTimeMillis; + + @GuardedBy("mLock") + private boolean mDirty; + + @GuardedBy("mLock") + private boolean mWriteScheduled; + + public SettingsState(Object lock, File file, int key, int maxBytesPerAppPackage) { + // It is important that we use the same lock as the settings provider + // to ensure multiple mutations on this state are atomicaly persisted + // as the async persistence should be blocked while we make changes. + mLock = lock; + mStatePersistFile = file; + mKey = key; + if (maxBytesPerAppPackage == MAX_BYTES_PER_APP_PACKAGE_LIMITED) { + mMaxBytesPerAppPackage = maxBytesPerAppPackage; + mPackageToMemoryUsage = new ArrayMap<>(); + } else { + mMaxBytesPerAppPackage = maxBytesPerAppPackage; + mPackageToMemoryUsage = null; + } + synchronized (mLock) { + readStateSyncLocked(); + } + } + + // The settings provider must hold its lock when calling here. + public int getVersionLocked() { + return mVersion; + } + + // The settings provider must hold its lock when calling here. + public void setVersionLocked(int version) { + if (version == mVersion) { + return; + } + mVersion = version; + + scheduleWriteIfNeededLocked(); + } + + // The settings provider must hold its lock when calling here. + public void onPackageRemovedLocked(String packageName) { + boolean removedSomething = false; + + final int settingCount = mSettings.size(); + for (int i = settingCount - 1; i >= 0; i--) { + String name = mSettings.keyAt(i); + // Settings defined by use are never dropped. + if (Settings.System.PUBLIC_SETTINGS.contains(name) + || Settings.System.PRIVATE_SETTINGS.contains(name)) { + continue; + } + Setting setting = mSettings.valueAt(i); + if (packageName.equals(setting.packageName)) { + mSettings.removeAt(i); + removedSomething = true; + } + } + + if (removedSomething) { + scheduleWriteIfNeededLocked(); + } + } + + // The settings provider must hold its lock when calling here. + public List<String> getSettingNamesLocked() { + ArrayList<String> names = new ArrayList<>(); + final int settingsCount = mSettings.size(); + for (int i = 0; i < settingsCount; i++) { + String name = mSettings.keyAt(i); + names.add(name); + } + return names; + } + + // The settings provider must hold its lock when calling here. + public Setting getSettingLocked(String name) { + if (TextUtils.isEmpty(name)) { + return null; + } + return mSettings.get(name); + } + + // The settings provider must hold its lock when calling here. + public boolean updateSettingLocked(String name, String value, String packageName) { + if (!hasSettingLocked(name)) { + return false; + } + + return insertSettingLocked(name, value, packageName); + } + + // The settings provider must hold its lock when calling here. + public boolean insertSettingLocked(String name, String value, String packageName) { + if (TextUtils.isEmpty(name)) { + return false; + } + + Setting oldState = mSettings.get(name); + String oldValue = (oldState != null) ? oldState.value : null; + + if (oldState != null) { + if (!oldState.update(value, packageName)) { + return false; + } + } else { + Setting state = new Setting(name, value, packageName); + mSettings.put(name, state); + } + + updateMemoryUsagePerPackageLocked(packageName, oldValue, value); + + scheduleWriteIfNeededLocked(); + + return true; + } + + // The settings provider must hold its lock when calling here. + public void persistSyncLocked() { + mHandler.removeMessages(MyHandler.MSG_PERSIST_SETTINGS); + doWriteState(); + } + + // The settings provider must hold its lock when calling here. + public boolean deleteSettingLocked(String name) { + if (TextUtils.isEmpty(name) || !hasSettingLocked(name)) { + return false; + } + + Setting oldState = mSettings.remove(name); + + updateMemoryUsagePerPackageLocked(oldState.packageName, oldState.value, null); + + scheduleWriteIfNeededLocked(); + + return true; + } + + // The settings provider must hold its lock when calling here. + public void destroyLocked(Runnable callback) { + mHandler.removeMessages(MyHandler.MSG_PERSIST_SETTINGS); + if (callback != null) { + if (mDirty) { + // Do it without a delay. + mHandler.obtainMessage(MyHandler.MSG_PERSIST_SETTINGS, + callback).sendToTarget(); + return; + } + callback.run(); + } + } + + private void updateMemoryUsagePerPackageLocked(String packageName, String oldValue, + String newValue) { + if (mMaxBytesPerAppPackage == MAX_BYTES_PER_APP_PACKAGE_UNLIMITED) { + return; + } + + if (SYSTEM_PACKAGE_NAME.equals(packageName)) { + return; + } + + final int oldValueSize = (oldValue != null) ? oldValue.length() : 0; + final int newValueSize = (newValue != null) ? newValue.length() : 0; + final int deltaSize = newValueSize - oldValueSize; + + Integer currentSize = mPackageToMemoryUsage.get(packageName); + final int newSize = Math.max((currentSize != null) + ? currentSize + deltaSize : deltaSize, 0); + + if (newSize > mMaxBytesPerAppPackage) { + throw new IllegalStateException("You are adding too many system settings. " + + "You should stop using system settings for app specific data" + + " package: " + packageName); + } + + if (DEBUG) { + Slog.i(LOG_TAG, "Settings for package: " + packageName + + " size: " + newSize + " bytes."); + } + + mPackageToMemoryUsage.put(packageName, newSize); + } + + private boolean hasSettingLocked(String name) { + return mSettings.indexOfKey(name) >= 0; + } + + private void scheduleWriteIfNeededLocked() { + // If dirty then we have a write already scheduled. + if (!mDirty) { + mDirty = true; + writeStateAsyncLocked(); + } + } + + private void writeStateAsyncLocked() { + final long currentTimeMillis = SystemClock.uptimeMillis(); + + if (mWriteScheduled) { + mHandler.removeMessages(MyHandler.MSG_PERSIST_SETTINGS); + + // If enough time passed, write without holding off anymore. + final long timeSinceLastNotWrittenMutationMillis = currentTimeMillis + - mLastNotWrittenMutationTimeMillis; + if (timeSinceLastNotWrittenMutationMillis >= MAX_WRITE_SETTINGS_DELAY_MILLIS) { + mHandler.obtainMessage(MyHandler.MSG_PERSIST_SETTINGS).sendToTarget(); + return; + } + + // Hold off a bit more as settings are frequently changing. + final long maxDelayMillis = Math.max(mLastNotWrittenMutationTimeMillis + + MAX_WRITE_SETTINGS_DELAY_MILLIS - currentTimeMillis, 0); + final long writeDelayMillis = Math.min(WRITE_SETTINGS_DELAY_MILLIS, maxDelayMillis); + + Message message = mHandler.obtainMessage(MyHandler.MSG_PERSIST_SETTINGS); + mHandler.sendMessageDelayed(message, writeDelayMillis); + } else { + mLastNotWrittenMutationTimeMillis = currentTimeMillis; + Message message = mHandler.obtainMessage(MyHandler.MSG_PERSIST_SETTINGS); + mHandler.sendMessageDelayed(message, WRITE_SETTINGS_DELAY_MILLIS); + mWriteScheduled = true; + } + } + + private void doWriteState() { + if (DEBUG_PERSISTENCE) { + Slog.i(LOG_TAG, "[PERSIST START]"); + } + + AtomicFile destination = new AtomicFile(mStatePersistFile); + + final int version; + final ArrayMap<String, Setting> settings; + + synchronized (mLock) { + version = mVersion; + settings = new ArrayMap<>(mSettings); + mDirty = false; + mWriteScheduled = false; + } + + FileOutputStream out = null; + try { + out = destination.startWrite(); + + XmlSerializer serializer = Xml.newSerializer(); + serializer.setOutput(out, "utf-8"); + serializer.startDocument(null, true); + serializer.startTag(null, TAG_SETTINGS); + serializer.attribute(null, ATTR_VERSION, String.valueOf(version)); + + final int settingCount = settings.size(); + for (int i = 0; i < settingCount; i++) { + Setting setting = settings.valueAt(i); + + serializer.startTag(null, TAG_SETTING); + serializer.attribute(null, ATTR_ID, setting.getId()); + serializer.attribute(null, ATTR_NAME, setting.getName()); + serializer.attribute(null, ATTR_VALUE, packValue(setting.getValue())); + serializer.attribute(null, ATTR_PACKAGE, packValue(setting.getPackageName())); + serializer.endTag(null, TAG_SETTING); + + if (DEBUG_PERSISTENCE) { + Slog.i(LOG_TAG, "[PERSISTED]" + setting.getName() + "=" + setting.getValue()); + } + } + + serializer.endTag(null, TAG_SETTINGS); + serializer.endDocument(); + destination.finishWrite(out); + + if (DEBUG_PERSISTENCE) { + Slog.i(LOG_TAG, "[PERSIST END]"); + } + + } catch (IOException e) { + Slog.w(LOG_TAG, "Failed to write settings, restoring backup", e); + destination.failWrite(out); + } finally { + IoUtils.closeQuietly(out); + } + } + + private void readStateSyncLocked() { + FileInputStream in; + if (!mStatePersistFile.exists()) { + return; + } + try { + in = new FileInputStream(mStatePersistFile); + } catch (FileNotFoundException fnfe) { + Slog.i(LOG_TAG, "No settings state"); + return; + } + try { + XmlPullParser parser = Xml.newPullParser(); + parser.setInput(in, null); + parseStateLocked(parser); + } catch (XmlPullParserException | IOException ise) { + throw new IllegalStateException("Failed parsing settings file: " + + mStatePersistFile , ise); + } finally { + IoUtils.closeQuietly(in); + } + } + + private void parseStateLocked(XmlPullParser parser) + throws IOException, XmlPullParserException { + parser.next(); + skipEmptyTextTags(parser); + expect(parser, XmlPullParser.START_TAG, TAG_SETTINGS); + + mVersion = Integer.parseInt(parser.getAttributeValue(null, ATTR_VERSION)); + + parser.next(); + + while (parseSettingLocked(parser)) { + parser.next(); + } + + skipEmptyTextTags(parser); + expect(parser, XmlPullParser.END_TAG, TAG_SETTINGS); + } + + private boolean parseSettingLocked(XmlPullParser parser) + throws IOException, XmlPullParserException { + skipEmptyTextTags(parser); + if (!accept(parser, XmlPullParser.START_TAG, TAG_SETTING)) { + return false; + } + + String id = parser.getAttributeValue(null, ATTR_ID); + String name = parser.getAttributeValue(null, ATTR_NAME); + String value = parser.getAttributeValue(null, ATTR_VALUE); + String packageName = parser.getAttributeValue(null, ATTR_PACKAGE); + mSettings.put(name, new Setting(name, unpackValue(value), + unpackValue(packageName), id)); + + if (DEBUG_PERSISTENCE) { + Slog.i(LOG_TAG, "[RESTORED] " + name + "=" + value); + } + + parser.next(); + + skipEmptyTextTags(parser); + expect(parser, XmlPullParser.END_TAG, TAG_SETTING); + + return true; + } + + private void expect(XmlPullParser parser, int type, String tag) + throws IOException, XmlPullParserException { + if (!accept(parser, type, tag)) { + throw new XmlPullParserException("Expected event: " + type + + " and tag: " + tag + " but got event: " + parser.getEventType() + + " and tag:" + parser.getName()); + } + } + + private void skipEmptyTextTags(XmlPullParser parser) + throws IOException, XmlPullParserException { + while (accept(parser, XmlPullParser.TEXT, null) + && "\n".equals(parser.getText())) { + parser.next(); + } + } + + private boolean accept(XmlPullParser parser, int type, String tag) + throws IOException, XmlPullParserException { + if (parser.getEventType() != type) { + return false; + } + if (tag != null) { + if (!tag.equals(parser.getName())) { + return false; + } + } else if (parser.getName() != null) { + return false; + } + return true; + } + + private final class MyHandler extends Handler { + public static final int MSG_PERSIST_SETTINGS = 1; + + public MyHandler() { + super(BackgroundThread.getHandler().getLooper()); + } + + @Override + public void handleMessage(Message message) { + switch (message.what) { + case MSG_PERSIST_SETTINGS: { + Runnable callback = (Runnable) message.obj; + doWriteState(); + if (callback != null) { + callback.run(); + } + } + break; + } + } + } + + private static String packValue(String value) { + if (value == null) { + return NULL_VALUE; + } + return value; + } + + private static String unpackValue(String value) { + if (NULL_VALUE.equals(value)) { + return null; + } + return value; + } + + public static final class Setting { + private static long sNextId; + + private String name; + private String value; + private String packageName; + private String id; + + public Setting(String name, String value, String packageName) { + init(name, value, packageName, String.valueOf(sNextId++)); + } + + public Setting(String name, String value, String packageName, String id) { + sNextId = Math.max(sNextId, Long.valueOf(id)); + init(name, value, packageName, String.valueOf(sNextId)); + } + + private void init(String name, String value, String packageName, String id) { + this.name = name; + this.value = value; + this.packageName = packageName; + this.id = id; + } + + public String getName() { + return name; + } + + public String getValue() { + return value; + } + + public String getPackageName() { + return packageName; + } + + public String getId() { + return id; + } + + public boolean update(String value, String packageName) { + if (Objects.equal(value, this.value)) { + return false; + } + this.value = value; + this.packageName = packageName; + this.id = String.valueOf(sNextId++); + return true; + } + } +} diff --git a/packages/SettingsProvider/test/Android.mk b/packages/SettingsProvider/test/Android.mk new file mode 100644 index 0000000..01c6ccf --- /dev/null +++ b/packages/SettingsProvider/test/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_PACKAGE_NAME := SettingsProviderTest + +LOCAL_MODULE_TAGS := tests + +LOCAL_CERTIFICATE := platform + +include $(BUILD_PACKAGE)
\ No newline at end of file diff --git a/packages/SettingsProvider/test/AndroidManifest.xml b/packages/SettingsProvider/test/AndroidManifest.xml new file mode 100644 index 0000000..7a86b5f --- /dev/null +++ b/packages/SettingsProvider/test/AndroidManifest.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.providers.setting.test"> + + <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" /> + + <uses-permission android:name="android.permission.WRITE_SETTINGS"/> + <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/> + <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/> + <uses-permission android:name="android.permission.MANAGE_USERS"/> + + <application> + <uses-library android:name="android.test.runner" /> + </application> + + <instrumentation + android:name="android.test.InstrumentationTestRunner" + android:targetPackage="com.android.providers.setting.test" + android:label="Settings Provider Tests" /> +</manifest> diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/BaseSettingsProviderTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/BaseSettingsProviderTest.java new file mode 100644 index 0000000..8473db4 --- /dev/null +++ b/packages/SettingsProvider/test/src/com/android/providers/settings/BaseSettingsProviderTest.java @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2015 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.providers.settings; + +import android.content.ContentResolver; +import android.content.ContentValues; +import android.content.Context; +import android.content.pm.UserInfo; +import android.database.Cursor; +import android.net.Uri; +import android.os.UserHandle; +import android.os.UserManager; +import android.provider.Settings; +import android.test.AndroidTestCase; + +import java.util.List; + +/** + * Base class for the SettingContentProvider tests. + */ +abstract class BaseSettingsProviderTest extends AndroidTestCase { + protected static final int SETTING_TYPE_GLOBAL = 1; + protected static final int SETTING_TYPE_SECURE = 2; + protected static final int SETTING_TYPE_SYSTEM = 3; + + protected static final String FAKE_SETTING_NAME = "fake_setting_name"; + protected static final String FAKE_SETTING_NAME_1 = "fake_setting_name1"; + protected static final String FAKE_SETTING_VALUE = "fake_setting_value"; + protected static final String FAKE_SETTING_VALUE_1 = "fake_setting_value_1"; + + private static final String[] NAME_VALUE_COLUMNS = new String[] { + Settings.NameValueTable.NAME, Settings.NameValueTable.VALUE + }; + + protected int mSecondaryUserId = UserHandle.USER_OWNER; + + @Override + public void setContext(Context context) { + super.setContext(context); + + UserManager userManager = (UserManager) context.getSystemService(Context.USER_SERVICE); + List<UserInfo> users = userManager.getUsers(); + final int userCount = users.size(); + for (int i = 0; i < userCount; i++) { + UserInfo user = users.get(i); + if (!user.isPrimary() && !user.isManagedProfile()) { + mSecondaryUserId = user.id; + break; + } + } + } + + protected void setStringViaFrontEndApiSetting(int type, String name, String value, int userId) { + ContentResolver contentResolver = getContext().getContentResolver(); + + switch (type) { + case SETTING_TYPE_GLOBAL: { + Settings.Global.putStringForUser(contentResolver, name, value, userId); + } break; + + case SETTING_TYPE_SECURE: { + Settings.Secure.putStringForUser(contentResolver, name, value, userId); + } break; + + case SETTING_TYPE_SYSTEM: { + Settings.System.putStringForUser(contentResolver, name, value, userId); + } break; + + default: { + throw new IllegalArgumentException("Invalid type: " + type); + } + } + } + + protected String getStringViaFrontEndApiSetting(int type, String name, int userId) { + ContentResolver contentResolver = getContext().getContentResolver(); + + switch (type) { + case SETTING_TYPE_GLOBAL: { + return Settings.Global.getStringForUser(contentResolver, name, userId); + } + + case SETTING_TYPE_SECURE: { + return Settings.Secure.getStringForUser(contentResolver, name, userId); + } + + case SETTING_TYPE_SYSTEM: { + return Settings.System.getStringForUser(contentResolver, name, userId); + } + + default: { + throw new IllegalArgumentException("Invalid type: " + type); + } + } + } + + protected Uri insertStringViaProviderApi(int type, String name, String value, + boolean withTableRowUri) { + Uri uri = getBaseUriForType(type); + if (withTableRowUri) { + uri = Uri.withAppendedPath(uri, name); + } + ContentValues values = new ContentValues(); + values.put(Settings.NameValueTable.NAME, name); + values.put(Settings.NameValueTable.VALUE, value); + + return getContext().getContentResolver().insert(uri, values); + } + + protected int deleteStringViaProviderApi(int type, String name) { + Uri uri = getBaseUriForType(type); + return getContext().getContentResolver().delete(uri, "name=?", new String[]{name}); + } + + protected int updateStringViaProviderApiSetting(int type, String name, String value) { + Uri uri = getBaseUriForType(type); + ContentValues values = new ContentValues(); + values.put(Settings.NameValueTable.NAME, name); + values.put(Settings.NameValueTable.VALUE, value); + return getContext().getContentResolver().update(uri, values, "name=?", + new String[]{name}); + } + + protected String queryStringViaProviderApi(int type, String name) { + return queryStringViaProviderApi(type, name, false, false); + } + + protected String queryStringViaProviderApi(int type, String name, boolean queryStringInQuotes, + boolean appendNameToUri) { + final Uri uri; + final String queryString; + final String[] queryArgs; + + if (appendNameToUri) { + uri = Uri.withAppendedPath(getBaseUriForType(type), name); + queryString = null; + queryArgs = null; + } else { + uri = getBaseUriForType(type); + queryString = queryStringInQuotes ? "(name=?)" : "name=?"; + queryArgs = new String[]{name}; + } + + Cursor cursor = getContext().getContentResolver().query(uri, NAME_VALUE_COLUMNS, + queryString, queryArgs, null); + + if (cursor == null) { + return null; + } + + try { + if (cursor.moveToFirst()) { + final int valueColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.VALUE); + return cursor.getString(valueColumnIdx); + } + } finally { + cursor.close(); + } + + return null; + } + + protected static Uri getBaseUriForType(int type) { + switch (type) { + case SETTING_TYPE_GLOBAL: { + return Settings.Global.CONTENT_URI; + } + + case SETTING_TYPE_SECURE: { + return Settings.Secure.CONTENT_URI; + } + + case SETTING_TYPE_SYSTEM: { + return Settings.System.CONTENT_URI; + } + + default: { + throw new IllegalArgumentException("Invalid type: " + type); + } + } + } +} diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderPerformanceTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderPerformanceTest.java new file mode 100644 index 0000000..d581f3b --- /dev/null +++ b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderPerformanceTest.java @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2015 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.providers.settings; + +import android.os.SystemClock; +import android.os.UserHandle; +import android.util.Log; + +/** +* Performance tests for the SettingContentProvider. +*/ +public class SettingsProviderPerformanceTest extends BaseSettingsProviderTest { + private static final String LOG_TAG = "SettingsProviderPerformanceTest"; + + private static final int ITERATION_COUNT = 100; + + private static final int MICRO_SECONDS_IN_MILLISECOND = 1000; + + private static final long MAX_AVERAGE_SET_AND_GET_SETTING_DURATION_MILLIS = 20; + + public void testSetAndGetPerformanceForGlobalViaFrontEndApi() throws Exception { + // Start with a clean slate. + insertStringViaProviderApi(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME, FAKE_SETTING_VALUE, false); + + final long startTimeMicro = SystemClock.currentTimeMicro(); + + try { + for (int i = 0; i < ITERATION_COUNT; i++) { + // Set the setting to its first value. + updateStringViaProviderApiSetting(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE); + + // Make sure the setting changed. + String firstValue = getStringViaFrontEndApiSetting(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME, UserHandle.USER_OWNER); + assertEquals("Setting value didn't change", FAKE_SETTING_VALUE, firstValue); + + // Set the setting to its second value. + updateStringViaProviderApiSetting(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE_1); + + // Make sure the setting changed. + String secondValue = getStringViaFrontEndApiSetting(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME, UserHandle.USER_OWNER); + assertEquals("Setting value didn't change", FAKE_SETTING_VALUE_1, secondValue); + } + } finally { + // Clean up. + deleteStringViaProviderApi(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME); + } + + final long elapsedTimeMicro = SystemClock.currentTimeMicro() - startTimeMicro; + + final long averageTimePerIterationMillis = (long) ((((float) elapsedTimeMicro) + / ITERATION_COUNT) / MICRO_SECONDS_IN_MILLISECOND); + + Log.i(LOG_TAG, "Average time to set and get setting via provider APIs: " + + averageTimePerIterationMillis + " ms"); + + assertTrue("Setting and getting a settings takes too long.", averageTimePerIterationMillis + < MAX_AVERAGE_SET_AND_GET_SETTING_DURATION_MILLIS); + } + + public void testSetAndGetPerformanceForGlobalViaProviderApi() throws Exception { + // Start with a clean slate. + deleteStringViaProviderApi(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME); + + final long startTimeMicro = SystemClock.currentTimeMicro(); + + try { + for (int i = 0; i < ITERATION_COUNT; i++) { + // Set the setting to its first value. + setStringViaFrontEndApiSetting(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE, UserHandle.USER_OWNER); + + // Make sure the setting changed. + String firstValue = getStringViaFrontEndApiSetting(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME, UserHandle.USER_OWNER); + assertEquals("Setting value didn't change", FAKE_SETTING_VALUE, firstValue); + + // Set the setting to its second value. + setStringViaFrontEndApiSetting(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE_1, UserHandle.USER_OWNER); + + // Make sure the setting changed. + String secondValue = getStringViaFrontEndApiSetting(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME, UserHandle.USER_OWNER); + assertEquals("Setting value didn't change", FAKE_SETTING_VALUE_1, secondValue); + } + } finally { + // Clean up. + deleteStringViaProviderApi(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME); + } + + final long elapsedTimeMicro = SystemClock.currentTimeMicro() - startTimeMicro; + + final long averageTimePerIterationMillis = (long) ((((float) elapsedTimeMicro) + / ITERATION_COUNT) / MICRO_SECONDS_IN_MILLISECOND); + + Log.i(LOG_TAG, "Average time to set and get setting via front-eng APIs: " + + averageTimePerIterationMillis + " ms"); + + assertTrue("Setting and getting a settings takes too long.", averageTimePerIterationMillis + < MAX_AVERAGE_SET_AND_GET_SETTING_DURATION_MILLIS); + } +} diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java new file mode 100644 index 0000000..b89fb10 --- /dev/null +++ b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java @@ -0,0 +1,429 @@ +/* + * Copyright (C) 2015 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.providers.settings; + +import android.content.ContentResolver; +import android.content.ContentValues; +import android.database.ContentObserver; +import android.database.Cursor; +import android.net.Uri; +import android.os.Handler; +import android.os.Looper; +import android.os.SystemClock; +import android.os.UserHandle; +import android.provider.Settings; +import android.util.Log; + +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * Tests for the SettingContentProvider. + * + * Before you run this test you must add a secondary user. + */ +public class SettingsProviderTest extends BaseSettingsProviderTest { + private static final String LOG_TAG = "SettingsProviderTest"; + + private static final long WAIT_FOR_SETTING_URI_CHANGE_TIMEOUT_MILLIS = 2000; // 2 sec + + private static final String[] NAME_VALUE_COLUMNS = new String[]{ + Settings.NameValueTable.NAME, Settings.NameValueTable.VALUE + }; + + private final Object mLock = new Object(); + + public void testSetAndGetGlobalViaFrontEndApiForOwnerUser() throws Exception { + performSetAndGetSettingTestViaFrontEndApi(SETTING_TYPE_GLOBAL, UserHandle.USER_OWNER); + } + + public void testSetAndGetGlobalViaFrontEndApiForNonOwnerUser() throws Exception { + if (mSecondaryUserId == UserHandle.USER_OWNER) { + Log.w(LOG_TAG, "No secondary user. Skipping " + + "testSetAndGetGlobalViaFrontEndApiForNonOwnerUser"); + return; + } + performSetAndGetSettingTestViaFrontEndApi(SETTING_TYPE_GLOBAL, mSecondaryUserId); + } + + public void testSetAndGetSecureViaFrontEndApiForOwnerUser() throws Exception { + performSetAndGetSettingTestViaFrontEndApi(SETTING_TYPE_SECURE, UserHandle.USER_OWNER); + } + + public void testSetAndGetSecureViaFrontEndApiForNonOwnerUser() throws Exception { + if (mSecondaryUserId == UserHandle.USER_OWNER) { + Log.w(LOG_TAG, "No secondary user. Skipping " + + "testSetAndGetSecureViaFrontEndApiForNonOwnerUser"); + return; + } + performSetAndGetSettingTestViaFrontEndApi(SETTING_TYPE_SECURE, mSecondaryUserId); + } + + public void testSetAndGetSystemViaFrontEndApiForOwnerUser() throws Exception { + performSetAndGetSettingTestViaFrontEndApi(SETTING_TYPE_SYSTEM, UserHandle.USER_OWNER); + } + + public void testSetAndGetSystemViaFrontEndApiForNonOwnerUser() throws Exception { + if (mSecondaryUserId == UserHandle.USER_OWNER) { + Log.w(LOG_TAG, "No secondary user. Skipping " + + "testSetAndGetSystemViaFrontEndApiForNonOwnerUser"); + return; + } + performSetAndGetSettingTestViaFrontEndApi(SETTING_TYPE_SYSTEM, mSecondaryUserId); + } + + public void testSetAndGetGlobalViaProviderApi() throws Exception { + performSetAndGetSettingTestViaProviderApi(SETTING_TYPE_GLOBAL); + } + + public void testSetAndGetSecureViaProviderApi() throws Exception { + performSetAndGetSettingTestViaProviderApi(SETTING_TYPE_SECURE); + } + + public void testSetAndGetSystemViaProviderApi() throws Exception { + performSetAndGetSettingTestViaProviderApi(SETTING_TYPE_SYSTEM); + } + + public void testSelectAllGlobalViaProviderApi() throws Exception { + setSettingViaProviderApiAndAssertSuccessfulChange(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME, FAKE_SETTING_VALUE, false); + try { + queryAllSettingsViaProviderApiSettingAndAssertSettingPresent(SETTING_TYPE_GLOBAL, + FAKE_SETTING_NAME); + } finally { + deleteStringViaProviderApi(SETTING_TYPE_GLOBAL, FAKE_SETTING_NAME); + } + } + + public void testSelectAllSecureViaProviderApi() throws Exception { + setSettingViaProviderApiAndAssertSuccessfulChange(SETTING_TYPE_SECURE, + FAKE_SETTING_NAME, FAKE_SETTING_VALUE, false); + try { + queryAllSettingsViaProviderApiSettingAndAssertSettingPresent(SETTING_TYPE_SECURE, + FAKE_SETTING_NAME); + } finally { + deleteStringViaProviderApi(SETTING_TYPE_SECURE, FAKE_SETTING_NAME); + } + } + + public void testSelectAllSystemViaProviderApi() throws Exception { + setSettingViaProviderApiAndAssertSuccessfulChange(SETTING_TYPE_SYSTEM, + FAKE_SETTING_NAME, FAKE_SETTING_VALUE, true); + try { + queryAllSettingsViaProviderApiSettingAndAssertSettingPresent(SETTING_TYPE_SYSTEM, + FAKE_SETTING_NAME); + } finally { + deleteStringViaProviderApi(SETTING_TYPE_SYSTEM, FAKE_SETTING_NAME); + } + } + + public void testQueryUpdateDeleteGlobalViaProviderApi() throws Exception { + doTestQueryUpdateDeleteGlobalViaProviderApiForType(SETTING_TYPE_GLOBAL); + } + + public void testQueryUpdateDeleteSecureViaProviderApi() throws Exception { + doTestQueryUpdateDeleteGlobalViaProviderApiForType(SETTING_TYPE_SECURE); + } + + public void testQueryUpdateDeleteSystemViaProviderApi() throws Exception { + doTestQueryUpdateDeleteGlobalViaProviderApiForType(SETTING_TYPE_SYSTEM); + } + + public void testBulkInsertGlobalViaProviderApi() throws Exception { + toTestBulkInsertViaProviderApiForType(SETTING_TYPE_GLOBAL); + } + + public void testBulkInsertSystemViaProviderApi() throws Exception { + toTestBulkInsertViaProviderApiForType(SETTING_TYPE_SYSTEM); + } + + public void testBulkInsertSecureViaProviderApi() throws Exception { + toTestBulkInsertViaProviderApiForType(SETTING_TYPE_SECURE); + } + + public void testAppCannotRunsSystemOutOfMemoryWritingSystemSettings() throws Exception { + int insertedCount = 0; + try { + for (; insertedCount < 1200; insertedCount++) { + Log.w(LOG_TAG, "Adding app specific setting: " + insertedCount); + insertStringViaProviderApi(SETTING_TYPE_SYSTEM, + String.valueOf(insertedCount), FAKE_SETTING_VALUE, false); + } + fail("Adding app specific settings must be bound."); + } catch (Exception e) { + for (; insertedCount >= 0; insertedCount--) { + Log.w(LOG_TAG, "Removing app specific setting: " + insertedCount); + deleteStringViaProviderApi(SETTING_TYPE_SYSTEM, + String.valueOf(insertedCount)); + } + } + } + + public void testQueryStringInBracketsGlobalViaProviderApiForType() throws Exception { + doTestQueryStringInBracketsViaProviderApiForType(SETTING_TYPE_GLOBAL); + } + + public void testQueryStringInBracketsSecureViaProviderApiForType() throws Exception { + doTestQueryStringInBracketsViaProviderApiForType(SETTING_TYPE_SECURE); + } + + public void testQueryStringInBracketsSystemViaProviderApiForType() throws Exception { + doTestQueryStringInBracketsViaProviderApiForType(SETTING_TYPE_SYSTEM); + } + + public void testQueryStringWithAppendedNameToUriViaProviderApi() throws Exception { + // Make sure we have a clean slate. + deleteStringViaProviderApi(SETTING_TYPE_SYSTEM, FAKE_SETTING_NAME); + + try { + // Insert the setting. + final Uri uri = insertStringViaProviderApi(SETTING_TYPE_SYSTEM, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE, false); + Uri expectUri = Uri.withAppendedPath(getBaseUriForType(SETTING_TYPE_SYSTEM), + FAKE_SETTING_NAME); + assertEquals("Did not get expected Uri.", expectUri, uri); + + // Make sure the first setting is there. + String firstValue = queryStringViaProviderApi(SETTING_TYPE_SYSTEM, FAKE_SETTING_NAME, + false, true); + assertEquals("Setting must be present", FAKE_SETTING_VALUE, firstValue); + } finally { + // Clean up. + deleteStringViaProviderApi(SETTING_TYPE_SYSTEM, FAKE_SETTING_NAME); + } + } + + private void doTestQueryStringInBracketsViaProviderApiForType(int type) { + // Make sure we have a clean slate. + deleteStringViaProviderApi(type, FAKE_SETTING_NAME); + + try { + // Insert the setting. + final Uri uri = insertStringViaProviderApi(type, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE, false); + Uri expectUri = Uri.withAppendedPath(getBaseUriForType(type), FAKE_SETTING_NAME); + assertEquals("Did not get expected Uri.", expectUri, uri); + + // Make sure the first setting is there. + String firstValue = queryStringViaProviderApi(type, FAKE_SETTING_NAME, true, false); + assertEquals("Setting must be present", FAKE_SETTING_VALUE, firstValue); + } finally { + // Clean up. + deleteStringViaProviderApi(type, FAKE_SETTING_NAME); + } + } + + private void toTestBulkInsertViaProviderApiForType(int type) { + // Make sure we have a clean slate. + deleteStringViaProviderApi(type, FAKE_SETTING_NAME); + deleteStringViaProviderApi(type, FAKE_SETTING_NAME_1); + + try { + Uri uri = getBaseUriForType(type); + ContentValues[] allValues = new ContentValues[2]; + + // Insert the first setting. + ContentValues firstValues = new ContentValues(); + firstValues.put(Settings.NameValueTable.NAME, FAKE_SETTING_NAME); + firstValues.put(Settings.NameValueTable.VALUE, FAKE_SETTING_VALUE); + allValues[0] = firstValues; + + // Insert the first setting. + ContentValues secondValues = new ContentValues(); + secondValues.put(Settings.NameValueTable.NAME, FAKE_SETTING_NAME_1); + secondValues.put(Settings.NameValueTable.VALUE, FAKE_SETTING_VALUE_1); + allValues[1] = secondValues; + + // Verify insertion count. + final int insertCount = getContext().getContentResolver().bulkInsert(uri, allValues); + assertSame("Couldn't insert both values", 2, insertCount); + + // Make sure the first setting is there. + String firstValue = queryStringViaProviderApi(type, FAKE_SETTING_NAME); + assertEquals("First setting must be present", FAKE_SETTING_VALUE, firstValue); + + // Make sure the second setting is there. + String secondValue = queryStringViaProviderApi(type, FAKE_SETTING_NAME_1); + assertEquals("Second setting must be present", FAKE_SETTING_VALUE_1, secondValue); + } finally { + // Clean up. + deleteStringViaProviderApi(type, FAKE_SETTING_NAME); + deleteStringViaProviderApi(type, FAKE_SETTING_NAME_1); + } + } + + private void doTestQueryUpdateDeleteGlobalViaProviderApiForType(int type) throws Exception { + // Make sure it is not there. + deleteStringViaProviderApi(type, FAKE_SETTING_NAME); + + // Now selection should return nothing. + String value = queryStringViaProviderApi(type, FAKE_SETTING_NAME); + assertNull("Setting should not be present.", value); + + // Insert the setting. + Uri uri = insertStringViaProviderApi(type, + FAKE_SETTING_NAME, FAKE_SETTING_VALUE, false); + Uri expectUri = Uri.withAppendedPath(getBaseUriForType(type), FAKE_SETTING_NAME); + assertEquals("Did not get expected Uri.", expectUri, uri); + + // Now selection should return the setting. + value = queryStringViaProviderApi(type, FAKE_SETTING_NAME); + assertEquals("Setting should be present.", FAKE_SETTING_VALUE, value); + + // Update the setting. + final int changeCount = updateStringViaProviderApiSetting(type, + FAKE_SETTING_NAME, FAKE_SETTING_VALUE_1); + assertEquals("Did not get expected change count.", 1, changeCount); + + // Now selection should return the new setting. + value = queryStringViaProviderApi(type, FAKE_SETTING_NAME); + assertEquals("Setting should be present.", FAKE_SETTING_VALUE_1, value); + + // Delete the setting. + final int deletedCount = deleteStringViaProviderApi(type, + FAKE_SETTING_NAME); + assertEquals("Did not get expected deleted count", 1, deletedCount); + + // Now selection should return nothing. + value = queryStringViaProviderApi(type, FAKE_SETTING_NAME); + assertNull("Setting should not be present.", value); + } + + private void performSetAndGetSettingTestViaFrontEndApi(int type, int userId) + throws Exception { + try { + // Change the setting and assert a successful change. + setSettingViaFrontEndApiAndAssertSuccessfulChange(type, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE, userId); + } finally { + // Remove the setting. + setStringViaFrontEndApiSetting(type, FAKE_SETTING_NAME, null, userId); + } + } + + private void performSetAndGetSettingTestViaProviderApi(int type) + throws Exception { + try { + // Change the setting and assert a successful change. + setSettingViaProviderApiAndAssertSuccessfulChange(type, FAKE_SETTING_NAME, + FAKE_SETTING_VALUE, true); + } finally { + // Remove the setting. + setSettingViaProviderApiAndAssertSuccessfulChange(type, FAKE_SETTING_NAME, null, + true); + } + } + + private void setSettingViaFrontEndApiAndAssertSuccessfulChange(final int type, + final String name, final String value, final int userId) throws Exception { + setSettingAndAssertSuccessfulChange(new Runnable() { + @Override + public void run() { + setStringViaFrontEndApiSetting(type, name, value, userId); + } + }, type, name, value, userId); + } + + private void setSettingViaProviderApiAndAssertSuccessfulChange(final int type, + final String name, final String value, final boolean withTableRowUri) + throws Exception { + setSettingAndAssertSuccessfulChange(new Runnable() { + @Override + public void run() { + insertStringViaProviderApi(type, name, value, withTableRowUri); + } + }, type, name, value, UserHandle.USER_OWNER); + } + + private void setSettingAndAssertSuccessfulChange(Runnable setCommand, final int type, + final String name, final String value, final int userId) throws Exception { + ContentResolver contentResolver = getContext().getContentResolver(); + + final Uri settingUri = getBaseUriForType(type); + + final AtomicBoolean success = new AtomicBoolean(); + + ContentObserver contentObserver = new ContentObserver(new Handler(Looper.getMainLooper())) { + public void onChange(boolean selfChange, Uri changeUri, int changeId) { + Log.i(LOG_TAG, "onChange(" + selfChange + ", " + changeUri + ", " + changeId + ")"); + assertEquals("Wrong change Uri", changeUri, settingUri); + assertEquals("Wrong user id", userId, changeId); + String changeValue = getStringViaFrontEndApiSetting(type, name, userId); + assertEquals("Wrong setting value", value, changeValue); + + success.set(true); + + synchronized (mLock) { + mLock.notifyAll(); + } + } + }; + + contentResolver.registerContentObserver(settingUri, false, contentObserver, userId); + + try { + setCommand.run(); + + final long startTimeMillis = SystemClock.uptimeMillis(); + synchronized (mLock) { + if (success.get()) { + return; + } + final long elapsedTimeMillis = SystemClock.uptimeMillis() - startTimeMillis; + if (elapsedTimeMillis > WAIT_FOR_SETTING_URI_CHANGE_TIMEOUT_MILLIS) { + fail("Could not change setting for " + + WAIT_FOR_SETTING_URI_CHANGE_TIMEOUT_MILLIS + " ms"); + } + final long remainingTimeMillis = WAIT_FOR_SETTING_URI_CHANGE_TIMEOUT_MILLIS + - elapsedTimeMillis; + try { + mLock.wait(remainingTimeMillis); + } catch (InterruptedException ie) { + /* ignore */ + } + } + } finally { + contentResolver.unregisterContentObserver(contentObserver); + } + } + + private void queryAllSettingsViaProviderApiSettingAndAssertSettingPresent(int type, + String name) { + Uri uri = getBaseUriForType(type); + + Cursor cursor = getContext().getContentResolver().query(uri, NAME_VALUE_COLUMNS, + null, null, null); + + if (cursor == null || !cursor.moveToFirst()) { + fail("Nothing selected"); + } + + try { + final int nameColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.NAME); + + while (cursor.moveToNext()) { + String currentName = cursor.getString(nameColumnIdx); + if (name.equals(currentName)) { + return; + } + } + + fail("Not found setting: " + name); + } finally { + cursor.close(); + } + } +} diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml index 6d3f976..532e1b7 100644 --- a/packages/SystemUI/res/layout/super_status_bar.xml +++ b/packages/SystemUI/res/layout/super_status_bar.xml @@ -22,9 +22,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:focusable="true" - android:fitsSystemWindows="true" - android:descendantFocusability="afterDescendants"> + android:fitsSystemWindows="true"> <com.android.systemui.statusbar.BackDropView android:id="@+id/backdrop" @@ -45,7 +43,8 @@ <com.android.systemui.statusbar.ScrimView android:id="@+id/scrim_behind" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:importantForAccessibility="no" /> <include layout="@layout/status_bar" android:layout_width="match_parent" @@ -82,6 +81,7 @@ <com.android.systemui.statusbar.ScrimView android:id="@+id/scrim_in_front" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:importantForAccessibility="no" /> </com.android.systemui.statusbar.phone.StatusBarWindowView> diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml index aa53a3e..3fc75d2 100644 --- a/packages/SystemUI/res/values/ids.xml +++ b/packages/SystemUI/res/values/ids.xml @@ -40,6 +40,7 @@ <item type="id" name="notification_power"/> <item type="id" name="notification_screenshot"/> <item type="id" name="notification_hidden"/> + <item type="id" name="notification_volumeui"/> <!-- Whether the icon is from a notification for which targetSdk < L --> <item type="id" name="icon_is_pre_L"/> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 6afca8a..0420d35 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -932,4 +932,19 @@ <!-- Hide quick settings tile confirmation button --> <string name="quick_settings_reset_confirmation_button">Hide</string> + + <!-- VolumeUI activation dialog: warning message --> + <string name="volumeui_prompt_message"><xliff:g id="app_name" example="Volume Prototype 1">%1$s</xliff:g> wants to be the volume dialog.</string> + + <!-- VolumeUI activation dialog: allow button label --> + <string name="volumeui_prompt_allow">Allow</string> + + <!-- VolumeUI activation dialog: deny button label --> + <string name="volumeui_prompt_deny">Deny</string> + + <!-- VolumeUI restoration notification: title --> + <string name="volumeui_notification_title"><xliff:g id="app_name" example="Volume Prototype 1">%1$s</xliff:g> is the volume dialog</string> + + <!-- VolumeUI restoration notification: text --> + <string name="volumeui_notification_text">Touch to restore the original.</string> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java b/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java index aea9ec6..69a4932 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java @@ -279,4 +279,14 @@ public class ServiceMonitor { } return sb.append('}').toString(); } + + public ComponentName getComponent() { + return getComponentNameFromSetting(); + } + + public void setComponent(ComponentName component) { + final String setting = component == null ? null : component.flattenToShortString(); + Settings.Secure.putStringForUser(mContext.getContentResolver(), + mSettingKey, setting, UserHandle.USER_CURRENT); + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java index dbdb578..bea0c86 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java @@ -17,7 +17,6 @@ package com.android.systemui.statusbar.policy; import android.app.AlarmManager; -import android.app.INotificationManager; import android.app.NotificationManager; import android.content.BroadcastReceiver; import android.content.ComponentName; @@ -28,8 +27,6 @@ import android.content.IntentFilter; import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; -import android.os.RemoteException; -import android.os.ServiceManager; import android.os.UserHandle; import android.provider.Settings.Global; import android.provider.Settings.Secure; @@ -53,7 +50,7 @@ public class ZenModeControllerImpl implements ZenModeController { private final Context mContext; private final GlobalSetting mModeSetting; private final GlobalSetting mConfigSetting; - private final INotificationManager mNoMan; + private final NotificationManager mNoMan; private final LinkedHashMap<Uri, Condition> mConditions = new LinkedHashMap<Uri, Condition>(); private final AlarmManager mAlarmManager; private final SetupObserver mSetupObserver; @@ -78,8 +75,7 @@ public class ZenModeControllerImpl implements ZenModeController { }; mModeSetting.setListening(true); mConfigSetting.setListening(true); - mNoMan = INotificationManager.Stub.asInterface( - ServiceManager.getService(Context.NOTIFICATION_SERVICE)); + mNoMan = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); mSetupObserver = new SetupObserver(handler); mSetupObserver.register(); @@ -113,11 +109,7 @@ public class ZenModeControllerImpl implements ZenModeController { @Override public void requestConditions(boolean request) { mRequesting = request; - try { - mNoMan.requestZenModeConditions(mListener, request ? Condition.FLAG_RELEVANT_NOW : 0); - } catch (RemoteException e) { - // noop - } + mNoMan.requestZenModeConditions(mListener, request ? Condition.FLAG_RELEVANT_NOW : 0); if (!mRequesting) { mConditions.clear(); } @@ -125,24 +117,12 @@ public class ZenModeControllerImpl implements ZenModeController { @Override public void setExitCondition(Condition exitCondition) { - try { - mNoMan.setZenModeCondition(exitCondition); - } catch (RemoteException e) { - // noop - } + mNoMan.setZenModeCondition(exitCondition); } @Override public Condition getExitCondition() { - try { - final ZenModeConfig config = mNoMan.getZenModeConfig(); - if (config != null) { - return config.exitCondition; - } - } catch (RemoteException e) { - // noop - } - return null; + return mNoMan.getZenModeCondition(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java index 7102c2a..8048a48 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -1,60 +1,73 @@ +/* + * Copyright (C) 2014 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.systemui.volume; +import android.app.Notification; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.BroadcastReceiver; +import android.content.ComponentName; import android.content.Context; +import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.pm.ApplicationInfo; import android.content.res.Configuration; -import android.database.ContentObserver; import android.media.AudioManager; import android.media.IRemoteVolumeController; import android.media.IVolumeController; import android.media.session.ISessionController; import android.media.session.MediaController; import android.media.session.MediaSessionManager; -import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.RemoteException; import android.provider.Settings; +import android.text.TextUtils; import android.util.Log; import com.android.systemui.R; import com.android.systemui.SystemUI; import com.android.systemui.keyguard.KeyguardViewMediator; +import com.android.systemui.statusbar.ServiceMonitor; import com.android.systemui.statusbar.phone.PhoneStatusBar; +import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.statusbar.policy.ZenModeControllerImpl; import java.io.FileDescriptor; import java.io.PrintWriter; -/* - * Copyright (C) 2014 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. - */ - public class VolumeUI extends SystemUI { private static final String TAG = "VolumeUI"; - private static final String SETTING = "systemui_volume_controller"; // for testing - private static final Uri SETTING_URI = Settings.Global.getUriFor(SETTING); - private static final int DEFAULT = 1; // enabled by default + private static boolean LOGD = Log.isLoggable(TAG, Log.DEBUG); private final Handler mHandler = new Handler(); + private final Receiver mReceiver = new Receiver(); + private final RestorationNotification mRestorationNotification = new RestorationNotification(); private boolean mEnabled; private AudioManager mAudioManager; + private NotificationManager mNotificationManager; private MediaSessionManager mMediaSessionManager; private VolumeController mVolumeController; private RemoteVolumeController mRemoteVolumeController; + private ServiceMonitor mVolumeControllerService; private VolumePanel mPanel; private int mDismissDelay; @@ -64,14 +77,19 @@ public class VolumeUI extends SystemUI { mEnabled = mContext.getResources().getBoolean(R.bool.enable_volume_ui); if (!mEnabled) return; mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + mNotificationManager = + (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); mMediaSessionManager = (MediaSessionManager) mContext .getSystemService(Context.MEDIA_SESSION_SERVICE); initPanel(); mVolumeController = new VolumeController(); mRemoteVolumeController = new RemoteVolumeController(); putComponent(VolumeComponent.class, mVolumeController); - updateController(); - mContext.getContentResolver().registerContentObserver(SETTING_URI, false, mObserver); + mReceiver.start(); + mVolumeControllerService = new ServiceMonitor(TAG, LOGD, + mContext, Settings.Secure.VOLUME_CONTROLLER_SERVICE_COMPONENT, + new ServiceMonitorCallbacks()); + mVolumeControllerService.start(); } @Override @@ -85,18 +103,19 @@ public class VolumeUI extends SystemUI { @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.print("mEnabled="); pw.println(mEnabled); + pw.print("mVolumeControllerService="); pw.println(mVolumeControllerService.getComponent()); if (mPanel != null) { mPanel.dump(fd, pw, args); } } - private void updateController() { - if (Settings.Global.getInt(mContext.getContentResolver(), SETTING, DEFAULT) != 0) { - Log.d(TAG, "Registering volume controller"); + private void setVolumeController(boolean register) { + if (register) { + if (LOGD) Log.d(TAG, "Registering volume controller"); mAudioManager.setVolumeController(mVolumeController); mMediaSessionManager.setRemoteVolumeController(mRemoteVolumeController); } else { - Log.d(TAG, "Unregistering volume controller"); + if (LOGD) Log.d(TAG, "Unregistering volume controller"); mAudioManager.setVolumeController(null); mMediaSessionManager.setRemoteVolumeController(null); } @@ -129,13 +148,32 @@ public class VolumeUI extends SystemUI { }); } - private final ContentObserver mObserver = new ContentObserver(mHandler) { - public void onChange(boolean selfChange, Uri uri) { - if (SETTING_URI.equals(uri)) { - updateController(); + private String getAppLabel(ComponentName component) { + final String pkg = component.getPackageName(); + try { + final ApplicationInfo ai = mContext.getPackageManager().getApplicationInfo(pkg, 0); + final String rt = mContext.getPackageManager().getApplicationLabel(ai).toString(); + if (!TextUtils.isEmpty(rt)) { + return rt; } + } catch (Exception e) { + Log.w(TAG, "Error loading app label", e); } - }; + return pkg; + } + + private void showServiceActivationDialog(final ComponentName component) { + final SystemUIDialog d = new SystemUIDialog(mContext); + d.setMessage(mContext.getString(R.string.volumeui_prompt_message, getAppLabel(component))); + d.setPositiveButton(R.string.volumeui_prompt_allow, new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + mVolumeControllerService.setComponent(component); + } + }); + d.setNegativeButton(R.string.volumeui_prompt_deny, null); + d.show(); + } private final Runnable mStartZenSettings = new Runnable() { @Override @@ -213,4 +251,83 @@ public class VolumeUI extends SystemUI { // than by remoteVolumeChanged. } } + + private final class ServiceMonitorCallbacks implements ServiceMonitor.Callbacks { + @Override + public void onNoService() { + if (LOGD) Log.d(TAG, "onNoService"); + setVolumeController(true); + mRestorationNotification.hide(); + } + + @Override + public long onServiceStartAttempt() { + if (LOGD) Log.d(TAG, "onServiceStartAttempt"); + setVolumeController(false); + mVolumeController.dismissNow(); + mRestorationNotification.show(); + return 0; + } + } + + private final class Receiver extends BroadcastReceiver { + private static final String ENABLE = "com.android.systemui.vui.ENABLE"; + private static final String DISABLE = "com.android.systemui.vui.DISABLE"; + private static final String EXTRA_COMPONENT = "component"; + + public void start() { + final IntentFilter filter = new IntentFilter(); + filter.addAction(ENABLE); + filter.addAction(DISABLE); + mContext.registerReceiver(this, filter, null, mHandler); + } + + @Override + public void onReceive(Context context, Intent intent) { + final String action = intent.getAction(); + final ComponentName component = intent.getParcelableExtra(EXTRA_COMPONENT); + final boolean current = component.equals(mVolumeControllerService.getComponent()); + if (ENABLE.equals(action) && component != null) { + if (!current) { + showServiceActivationDialog(component); + } + } + if (DISABLE.equals(action) && component != null) { + if (current) { + mVolumeControllerService.setComponent(null); + } + } + } + } + + private final class RestorationNotification { + public void hide() { + mNotificationManager.cancel(R.id.notification_volumeui); + } + + public void show() { + final ComponentName component = mVolumeControllerService.getComponent(); + if (component == null) { + Log.w(TAG, "Not showing restoration notification, component not active"); + return; + } + final Intent intent = new Intent(Receiver.DISABLE) + .putExtra(Receiver.EXTRA_COMPONENT, component); + mNotificationManager.notify(R.id.notification_volumeui, + new Notification.Builder(mContext) + .setSmallIcon(R.drawable.ic_ringer_audible) + .setWhen(0) + .setShowWhen(false) + .setOngoing(true) + .setContentTitle(mContext.getString( + R.string.volumeui_notification_title, getAppLabel(component))) + .setContentText(mContext.getString(R.string.volumeui_notification_text)) + .setContentIntent(PendingIntent.getBroadcast(mContext, 0, intent, 0)) + .setPriority(Notification.PRIORITY_MIN) + .setVisibility(Notification.VISIBILITY_PUBLIC) + .setColor(mContext.getResources().getColor( + com.android.internal.R.color.system_notification_accent_color)) + .build()); + } + } } diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 551a5dc..b72b29d 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -2636,9 +2636,15 @@ public class ConnectivityService extends IConnectivityManager.Stub // 100 percent is full good, 0 is full bad. public void reportInetCondition(int networkType, int percentage) { - if (percentage > 50) return; // don't handle good network reports NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType); - if (nai != null) reportBadNetwork(nai.network); + if (nai == null) return; + boolean isGood = percentage > 50; + // Revalidate if the app report does not match our current validated state. + if (isGood != nai.lastValidated) { + // Make the message logged by reportBadNetwork below less confusing. + if (DBG && isGood) log("reportInetCondition: type=" + networkType + " ok, revalidate"); + reportBadNetwork(nai.network); + } } public void reportBadNetwork(Network network) { diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index 1405fc1..1e3b46b 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -892,11 +892,6 @@ class MountService extends IMountService.Stub // Temporary workaround for http://b/17945169. Slog.d(TAG, "Setting system properties to " + systemLocale + " from mount service"); SystemProperties.set("persist.sys.locale", locale.toLanguageTag()); - - // TODO: Stop setting these properties once we've removed all - // references to them. - SystemProperties.set("persist.sys.language", locale.getLanguage()); - SystemProperties.set("persist.sys.country", locale.getCountry()); } /** diff --git a/services/core/java/com/android/server/UiModeManagerService.java b/services/core/java/com/android/server/UiModeManagerService.java index d1b4569..aeacd45 100644 --- a/services/core/java/com/android/server/UiModeManagerService.java +++ b/services/core/java/com/android/server/UiModeManagerService.java @@ -31,6 +31,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.res.Configuration; +import android.content.res.Resources; import android.os.BatteryManager; import android.os.Binder; import android.os.Handler; @@ -63,7 +64,7 @@ final class UiModeManagerService extends SystemService { private int mDockState = Intent.EXTRA_DOCK_STATE_UNDOCKED; private int mLastBroadcastState = Intent.EXTRA_DOCK_STATE_UNDOCKED; - int mNightMode = UiModeManager.MODE_NIGHT_NO; + private int mNightMode = UiModeManager.MODE_NIGHT_NO; private boolean mCarModeEnabled = false; private boolean mCharging = false; @@ -157,6 +158,7 @@ final class UiModeManagerService extends SystemService { public void onStart() { final Context context = getContext(); mTwilightManager = getLocalService(TwilightManager.class); + final PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); mWakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG); @@ -168,20 +170,23 @@ final class UiModeManagerService extends SystemService { mConfiguration.setToDefaults(); - mDefaultUiModeType = context.getResources().getInteger( + final Resources res = context.getResources(); + mDefaultUiModeType = res.getInteger( com.android.internal.R.integer.config_defaultUiModeType); - mCarModeKeepsScreenOn = (context.getResources().getInteger( + mCarModeKeepsScreenOn = (res.getInteger( com.android.internal.R.integer.config_carDockKeepsScreenOn) == 1); - mDeskModeKeepsScreenOn = (context.getResources().getInteger( + mDeskModeKeepsScreenOn = (res.getInteger( com.android.internal.R.integer.config_deskDockKeepsScreenOn) == 1); - mTelevision = context.getPackageManager().hasSystemFeature( - PackageManager.FEATURE_TELEVISION) || - context.getPackageManager().hasSystemFeature( - PackageManager.FEATURE_LEANBACK); - mWatch = context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH); + final PackageManager pm = context.getPackageManager(); + mTelevision = pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION) + || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK); + mWatch = pm.hasSystemFeature(PackageManager.FEATURE_WATCH); + + final int defaultNightMode = res.getInteger( + com.android.internal.R.integer.config_defaultNightMode); mNightMode = Settings.Secure.getInt(context.getContentResolver(), - Settings.Secure.UI_NIGHT_MODE, UiModeManager.MODE_NIGHT_AUTO); + Settings.Secure.UI_NIGHT_MODE, defaultNightMode); mTwilightManager.registerListener(mTwilightListener, mHandler); @@ -245,7 +250,7 @@ final class UiModeManagerService extends SystemService { final long ident = Binder.clearCallingIdentity(); try { synchronized (mLock) { - if (isDoingNightModeLocked() && mNightMode != mode) { + if (mNightMode != mode) { Settings.Secure.putInt(getContext().getContentResolver(), Settings.Secure.UI_NIGHT_MODE, mode); mNightMode = mode; @@ -309,10 +314,6 @@ final class UiModeManagerService extends SystemService { } } - boolean isDoingNightModeLocked() { - return mCarModeEnabled || mDockState != Intent.EXTRA_DOCK_STATE_UNDOCKED; - } - void setCarModeLocked(boolean enabled, int flags) { if (mCarModeEnabled != enabled) { mCarModeEnabled = enabled; @@ -354,17 +355,13 @@ final class UiModeManagerService extends SystemService { } else if (isDeskDockState(mDockState)) { uiMode = Configuration.UI_MODE_TYPE_DESK; } - if (mCarModeEnabled) { - if (mNightMode == UiModeManager.MODE_NIGHT_AUTO) { - updateComputedNightModeLocked(); - uiMode |= mComputedNightMode ? Configuration.UI_MODE_NIGHT_YES - : Configuration.UI_MODE_NIGHT_NO; - } else { - uiMode |= mNightMode << 4; - } + + if (mNightMode == UiModeManager.MODE_NIGHT_AUTO) { + updateComputedNightModeLocked(); + uiMode |= mComputedNightMode ? Configuration.UI_MODE_NIGHT_YES + : Configuration.UI_MODE_NIGHT_NO; } else { - // Disabling the car mode clears the night mode. - uiMode = (uiMode & ~Configuration.UI_MODE_NIGHT_MASK) | Configuration.UI_MODE_NIGHT_NO; + uiMode |= mNightMode << 4; } if (LOG) { @@ -618,7 +615,7 @@ final class UiModeManagerService extends SystemService { void updateTwilight() { synchronized (mLock) { - if (isDoingNightModeLocked() && mNightMode == UiModeManager.MODE_NIGHT_AUTO) { + if (mNightMode == UiModeManager.MODE_NIGHT_AUTO) { updateComputedNightModeLocked(); updateLocked(0, 0); } diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 6c267ea..c4718b8 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -16275,10 +16275,11 @@ public final class ActivityManagerService extends ActivityManagerNative EventLog.writeEvent(EventLogTags.CONFIGURATION_CHANGED, changes); - if (values.locale != null && !initLocale) { - saveLocaleLocked(values.locale, - !values.locale.equals(mConfiguration.locale), - values.userSetLocale); + if (!initLocale && values.locale != null && values.userSetLocale) { + final String languageTag = values.locale.toLanguageTag(); + SystemProperties.set("persist.sys.locale", languageTag); + mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, + values.locale)); } mConfigurationSeq++; @@ -16385,36 +16386,6 @@ public final class ActivityManagerService extends ActivityManagerNative && config.navigation == Configuration.NAVIGATION_NONAV); } - /** - * Save the locale. You must be inside a synchronized (this) block. - */ - private void saveLocaleLocked(Locale l, boolean isDiff, boolean isPersist) { - final String languageTag = l.toLanguageTag(); - if (isDiff) { - SystemProperties.set("user.locale", languageTag); - - // TODO: Who uses these ? There are no references to these system - // properties in documents or code. Did the author intend to call - // System.setProperty() instead ? Even that wouldn't have any effect. - SystemProperties.set("user.language", l.getLanguage()); - SystemProperties.set("user.region", l.getCountry()); - } - - if (isPersist) { - SystemProperties.set("persist.sys.locale", languageTag); - - // These values are *deprecated*, use persist.sys.locale instead. - // - // TODO: Stop setting these values once all code that references - // them has been removed. - SystemProperties.set("persist.sys.language", l.getLanguage()); - SystemProperties.set("persist.sys.country", l.getCountry()); - SystemProperties.set("persist.sys.localevar", l.getVariant()); - - mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, l)); - } - } - @Override public boolean shouldUpRecreateTask(IBinder token, String destAffinity) { synchronized (this) { diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index eaece09..4301427 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -182,6 +182,7 @@ public class AudioService extends IAudioService.Stub { /** The controller for the volume UI. */ private final VolumeController mVolumeController = new VolumeController(); + private final ControllerService mControllerService = new ControllerService(); // sendMsg() flags /** If the msg is already queued, replace it with this one. */ @@ -708,6 +709,7 @@ public class AudioService extends IAudioService.Stub { SAFE_VOLUME_CONFIGURE_TIMEOUT_MS); StreamOverride.init(mContext); + mControllerService.init(); } private void createAudioSystemThread() { @@ -1833,7 +1835,7 @@ public class AudioService extends IAudioService.Stub { } public void setRingerModeInternal(int ringerMode, String caller) { - enforceSelfOrSystemUI("setRingerModeInternal"); + enforceVolumeController("setRingerModeInternal"); setRingerMode(ringerMode, caller, false /*external*/); } @@ -5013,7 +5015,7 @@ public class AudioService extends IAudioService.Stub { @Override public void setRemoteStreamVolume(int index) { - enforceSelfOrSystemUI("set the remote stream volume"); + enforceVolumeController("set the remote stream volume"); mMediaFocusControl.setRemoteStreamVolume(index); } @@ -5333,7 +5335,7 @@ public class AudioService extends IAudioService.Stub { @Override public void disableSafeMediaVolume() { - enforceSelfOrSystemUI("disable the safe media volume"); + enforceVolumeController("disable the safe media volume"); synchronized (mSafeMediaVolumeState) { setSafeMediaVolumeEnabled(false); if (mPendingVolumeCommand != null) { @@ -5505,6 +5507,7 @@ public class AudioService extends IAudioService.Stub { pw.print(" mMusicActiveMs="); pw.println(mMusicActiveMs); pw.print(" mMcc="); pw.println(mMcc); pw.print(" mHasVibrator="); pw.println(mHasVibrator); + pw.print(" mControllerService="); pw.println(mControllerService); dumpAudioPolicies(pw); } @@ -5528,14 +5531,17 @@ public class AudioService extends IAudioService.Stub { } } - private void enforceSelfOrSystemUI(String action) { + private void enforceVolumeController(String action) { + if (mControllerService.mUid != 0 && Binder.getCallingUid() == mControllerService.mUid) { + return; + } mContext.enforceCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR_SERVICE, "Only SystemUI can " + action); } @Override public void setVolumeController(final IVolumeController controller) { - enforceSelfOrSystemUI("set the volume controller"); + enforceVolumeController("set the volume controller"); // return early if things are not actually changing if (mVolumeController.isSameBinder(controller)) { @@ -5566,7 +5572,7 @@ public class AudioService extends IAudioService.Stub { @Override public void notifyVolumeControllerVisible(final IVolumeController controller, boolean visible) { - enforceSelfOrSystemUI("notify about volume controller visibility"); + enforceVolumeController("notify about volume controller visibility"); // return early if the controller is not current if (!mVolumeController.isSameBinder(controller)) { @@ -5751,6 +5757,11 @@ public class AudioService extends IAudioService.Stub { public void setRingerModeInternal(int ringerMode, String caller) { AudioService.this.setRingerModeInternal(ringerMode, caller); } + + @Override + public int getVolumeControllerUid() { + return mControllerService.mUid; + } } //========================================================================================== @@ -5915,4 +5926,42 @@ public class AudioService extends IAudioService.Stub { private HashMap<IBinder, AudioPolicyProxy> mAudioPolicies = new HashMap<IBinder, AudioPolicyProxy>(); private int mAudioPolicyCounter = 0; // always accessed synchronized on mAudioPolicies + + private class ControllerService extends ContentObserver { + private int mUid; + private ComponentName mComponent; + + public ControllerService() { + super(null); + } + + @Override + public String toString() { + return String.format("{mUid=%d,mComponent=%s}", mUid, mComponent); + } + + public void init() { + onChange(true); + mContentResolver.registerContentObserver(Settings.Secure.getUriFor( + Settings.Secure.VOLUME_CONTROLLER_SERVICE_COMPONENT), false, this); + } + + @Override + public void onChange(boolean selfChange) { + mUid = 0; + mComponent = null; + final String setting = Settings.Secure.getString(mContentResolver, + Settings.Secure.VOLUME_CONTROLLER_SERVICE_COMPONENT); + if (setting == null) return; + try { + mComponent = ComponentName.unflattenFromString(setting); + if (mComponent == null) return; + mUid = mContext.getPackageManager() + .getApplicationInfo(mComponent.getPackageName(), 0).uid; + } catch (Exception e) { + Log.w(TAG, "Error loading controller service", e); + } + if (DEBUG_VOL) Log.d(TAG, "Reloaded controller service: " + this); + } + } } diff --git a/services/core/java/com/android/server/display/ColorFade.java b/services/core/java/com/android/server/display/ColorFade.java index 6e61e41..4e075c3 100644 --- a/services/core/java/com/android/server/display/ColorFade.java +++ b/services/core/java/com/android/server/display/ColorFade.java @@ -37,7 +37,6 @@ import android.opengl.EGLDisplay; import android.opengl.EGLSurface; import android.opengl.GLES20; import android.opengl.GLES11Ext; -import android.util.FloatMath; import android.util.Slog; import android.view.DisplayInfo; import android.view.Surface.OutOfResourcesException; @@ -372,13 +371,13 @@ final class ColorFade { GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); // Draw the frame. - float one_minus_level = 1 - level; - float cos = FloatMath.cos((float)Math.PI * one_minus_level); - float sign = cos < 0 ? -1 : 1; - float opacity = -FloatMath.pow(one_minus_level, 2) + 1; - float saturation = FloatMath.pow(level, 4); - float scale = (-FloatMath.pow(one_minus_level, 2) + 1) * 0.1f + 0.9f; - float gamma = (0.5f * sign * FloatMath.pow(cos, 2) + 0.5f) * 0.9f + 0.1f; + double one_minus_level = 1 - level; + double cos = Math.cos(Math.PI * one_minus_level); + double sign = cos < 0 ? -1 : 1; + float opacity = (float) -Math.pow(one_minus_level, 2) + 1; + float saturation = (float) Math.pow(level, 4); + float scale = (float) ((-Math.pow(one_minus_level, 2) + 1) * 0.1d + 0.9d); + float gamma = (float) ((0.5d * sign * Math.pow(cos, 2) + 0.5d) * 0.9d + 0.1d); drawFaded(opacity, 1.f / gamma, saturation, scale); if (checkGlErrors("drawFrame")) { return false; diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 02cacd9..9b6b5fb 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -50,6 +50,7 @@ import android.content.res.Resources; import android.database.ContentObserver; import android.media.AudioAttributes; import android.media.AudioManager; +import android.media.AudioManagerInternal; import android.media.AudioSystem; import android.media.IRingtonePlayer; import android.net.Uri; @@ -179,6 +180,7 @@ public class NotificationManagerService extends SystemService { private IActivityManager mAm; AudioManager mAudioManager; + AudioManagerInternal mAudioManagerInternal; StatusBarManagerInternal mStatusBar; Vibrator mVibrator; @@ -207,7 +209,7 @@ public class NotificationManagerService extends SystemService { private final ArraySet<ManagedServiceInfo> mListenersDisablingEffects = new ArraySet<>(); private ComponentName mEffectsSuppressor; private int mListenerHints; // right now, all hints are global - private int mInterruptionFilter; // current ZEN mode as communicated to listeners + private int mInterruptionFilter = NotificationListenerService.INTERRUPTION_FILTER_UNKNOWN; // for enabling and disabling notification pulse behavior private boolean mScreenOn = true; @@ -931,6 +933,7 @@ public class NotificationManagerService extends SystemService { mDisableNotificationEffects = true; } mZenModeHelper.readZenModeFromSetting(); + mInterruptionFilter = mZenModeHelper.getZenModeListenerInterruptionFilter(); mUserProfiles.updateCache(getContext()); listenForCallState(); @@ -996,6 +999,7 @@ public class NotificationManagerService extends SystemService { // Grab our optional AudioService mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); + mAudioManagerInternal = getLocalService(AudioManagerInternal.class); mZenModeHelper.onSystemReady(); } else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) { // This observer will force an update when observe is called, causing us to @@ -1468,7 +1472,7 @@ public class NotificationManagerService extends SystemService { @Override public ZenModeConfig getZenModeConfig() { - enforceSystemOrSystemUI("INotificationManager.getZenModeConfig"); + enforceSystemOrSystemUIOrVolume("INotificationManager.getZenModeConfig"); return mZenModeHelper.getConfig(); } @@ -1479,6 +1483,17 @@ public class NotificationManagerService extends SystemService { } @Override + public void setZenMode(int mode) throws RemoteException { + enforceSystemOrSystemUIOrVolume("INotificationManager.setZenMode"); + final long identity = Binder.clearCallingIdentity(); + try { + mZenModeHelper.setZenMode(mode, "NotificationManager"); + } finally { + Binder.restoreCallingIdentity(identity); + } + } + + @Override public void notifyConditions(String pkg, IConditionProvider provider, Condition[] conditions) { final ManagedServiceInfo info = mConditionProviders.checkServiceToken(provider); @@ -1493,13 +1508,13 @@ public class NotificationManagerService extends SystemService { @Override public void requestZenModeConditions(IConditionListener callback, int relevance) { - enforceSystemOrSystemUI("INotificationManager.requestZenModeConditions"); + enforceSystemOrSystemUIOrVolume("INotificationManager.requestZenModeConditions"); mConditionProviders.requestZenModeConditions(callback, relevance); } @Override public void setZenModeCondition(Condition condition) { - enforceSystemOrSystemUI("INotificationManager.setZenModeCondition"); + enforceSystemOrSystemUIOrVolume("INotificationManager.setZenModeCondition"); final long identity = Binder.clearCallingIdentity(); try { mConditionProviders.setZenModeCondition(condition, "binderCall"); @@ -1520,6 +1535,16 @@ public class NotificationManagerService extends SystemService { return mConditionProviders.getAutomaticZenModeConditions(); } + private void enforceSystemOrSystemUIOrVolume(String message) { + if (mAudioManagerInternal != null) { + final int vcuid = mAudioManagerInternal.getVolumeControllerUid(); + if (vcuid > 0 && Binder.getCallingUid() == vcuid) { + return; + } + } + enforceSystemOrSystemUI(message); + } + private void enforceSystemOrSystemUI(String message) { if (isCallerSystem()) return; getContext().enforceCallingPermission(android.Manifest.permission.STATUS_BAR_SERVICE, @@ -1541,7 +1566,7 @@ public class NotificationManagerService extends SystemService { @Override public ComponentName getEffectsSuppressor() { - enforceSystemOrSystemUI("INotificationManager.getEffectsSuppressor"); + enforceSystemOrSystemUIOrVolume("INotificationManager.getEffectsSuppressor"); return mEffectsSuppressor; } @@ -1558,7 +1583,7 @@ public class NotificationManagerService extends SystemService { @Override public boolean isSystemConditionProviderEnabled(String path) { - enforceSystemOrSystemUI("INotificationManager.isSystemConditionProviderEnabled"); + enforceSystemOrSystemUIOrVolume("INotificationManager.isSystemConditionProviderEnabled"); return mConditionProviders.isSystemConditionProviderEnabled(path); } }; @@ -1671,6 +1696,7 @@ public class NotificationManagerService extends SystemService { if (filter == null || zenOnly) { pw.println("\n Zen Mode:"); + pw.print(" mInterruptionFilter="); pw.println(mInterruptionFilter); mZenModeHelper.dump(pw, " "); pw.println("\n Zen Log:"); diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index ec8a775..5bb193a 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -1195,8 +1195,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } catch (RemoteException ex) { } mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); - mShortcutManager = new ShortcutManager(context, mHandler); - mShortcutManager.observe(); + mShortcutManager = new ShortcutManager(context); mUiMode = context.getResources().getInteger( com.android.internal.R.integer.config_defaultUiModeType); mHomeIntent = new Intent(Intent.ACTION_MAIN, null); @@ -4751,7 +4750,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { msg.setAsynchronous(true); msg.sendToTarget(); } - break; } } diff --git a/services/core/java/com/android/server/policy/ShortcutManager.java b/services/core/java/com/android/server/policy/ShortcutManager.java index 6a0136a..76f56bc 100644 --- a/services/core/java/com/android/server/policy/ShortcutManager.java +++ b/services/core/java/com/android/server/policy/ShortcutManager.java @@ -16,81 +16,47 @@ package com.android.server.policy; +import android.content.ComponentName; import android.content.Context; import android.content.Intent; -import android.database.ContentObserver; -import android.database.Cursor; -import android.os.Handler; -import android.provider.Settings; +import android.content.pm.ActivityInfo; +import android.content.pm.PackageManager; +import android.content.res.XmlResourceParser; +import android.text.TextUtils; import android.util.Log; import android.util.SparseArray; import android.view.KeyCharacterMap; +import com.android.internal.util.XmlUtils; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; -import java.net.URISyntaxException; +import java.io.IOException; /** * Manages quick launch shortcuts by: * <li> Keeping the local copy in sync with the database (this is an observer) * <li> Returning a shortcut-matching intent to clients */ -class ShortcutManager extends ContentObserver { - +class ShortcutManager { private static final String TAG = "ShortcutManager"; - - private static final int COLUMN_SHORTCUT = 0; - private static final int COLUMN_INTENT = 1; - private static final String[] sProjection = new String[] { - Settings.Bookmarks.SHORTCUT, Settings.Bookmarks.INTENT - }; - - private Context mContext; - private Cursor mCursor; - /** Map of a shortcut to its intent. */ - private SparseArray<Intent> mShortcutIntents; - - public ShortcutManager(Context context, Handler handler) { - super(handler); - - mContext = context; - mShortcutIntents = new SparseArray<Intent>(); - } - /** Observes the provider of shortcut+intents */ - public void observe() { - mCursor = mContext.getContentResolver().query( - Settings.Bookmarks.CONTENT_URI, sProjection, null, null, null); - mCursor.registerContentObserver(this); - updateShortcuts(); - } + private static final String TAG_BOOKMARKS = "bookmarks"; + private static final String TAG_BOOKMARK = "bookmark"; - @Override - public void onChange(boolean selfChange) { - updateShortcuts(); - } - - private void updateShortcuts() { - Cursor c = mCursor; - if (!c.requery()) { - Log.e(TAG, "ShortcutObserver could not re-query shortcuts."); - return; - } + private static final String ATTRIBUTE_PACKAGE = "package"; + private static final String ATTRIBUTE_CLASS = "class"; + private static final String ATTRIBUTE_SHORTCUT = "shortcut"; + private static final String ATTRIBUTE_CATEGORY = "category"; - mShortcutIntents.clear(); - while (c.moveToNext()) { - int shortcut = c.getInt(COLUMN_SHORTCUT); - if (shortcut == 0) continue; - String intentURI = c.getString(COLUMN_INTENT); - Intent intent = null; - try { - intent = Intent.getIntent(intentURI); - } catch (URISyntaxException e) { - Log.w(TAG, "Intent URI for shortcut invalid.", e); - } - if (intent == null) continue; - mShortcutIntents.put(shortcut, intent); - } - } + private final SparseArray<ShortcutInfo> mShortcuts = new SparseArray<>(); + + private final Context mContext; + public ShortcutManager(Context context) { + mContext = context; + loadShortcuts(); + } + /** * Gets the shortcut intent for a given keycode+modifier. Make sure you * strip whatever modifier is used for invoking shortcuts (for example, @@ -107,23 +73,105 @@ class ShortcutManager extends ContentObserver { * @return The intent that matches the shortcut, or null if not found. */ public Intent getIntent(KeyCharacterMap kcm, int keyCode, int metaState) { - Intent intent = null; + ShortcutInfo shortcut = null; // First try the exact keycode (with modifiers). - int shortcut = kcm.get(keyCode, metaState); - if (shortcut != 0) { - intent = mShortcutIntents.get(shortcut); + int shortcutChar = kcm.get(keyCode, metaState); + if (shortcutChar != 0) { + shortcut = mShortcuts.get(shortcutChar); } // Next try the primary character on that key. - if (intent == null) { - shortcut = Character.toLowerCase(kcm.getDisplayLabel(keyCode)); - if (shortcut != 0) { - intent = mShortcutIntents.get(shortcut); + if (shortcut == null) { + shortcutChar = Character.toLowerCase(kcm.getDisplayLabel(keyCode)); + if (shortcutChar != 0) { + shortcut = mShortcuts.get(shortcutChar); } } - return intent; + return (shortcut != null) ? shortcut.intent : null; } + private void loadShortcuts() { + PackageManager packageManager = mContext.getPackageManager(); + try { + XmlResourceParser parser = mContext.getResources().getXml( + com.android.internal.R.xml.bookmarks); + XmlUtils.beginDocument(parser, TAG_BOOKMARKS); + + while (true) { + XmlUtils.nextElement(parser); + + if (parser.getEventType() == XmlPullParser.END_DOCUMENT) { + break; + } + + if (!TAG_BOOKMARK.equals(parser.getName())) { + break; + } + + String packageName = parser.getAttributeValue(null, ATTRIBUTE_PACKAGE); + String className = parser.getAttributeValue(null, ATTRIBUTE_CLASS); + String shortcutName = parser.getAttributeValue(null, ATTRIBUTE_SHORTCUT); + String categoryName = parser.getAttributeValue(null, ATTRIBUTE_CATEGORY); + + if (TextUtils.isEmpty(shortcutName)) { + Log.w(TAG, "Unable to get shortcut for: " + packageName + "/" + className); + continue; + } + + final int shortcutChar = shortcutName.charAt(0); + + final Intent intent; + final String title; + if (packageName != null && className != null) { + ActivityInfo info = null; + ComponentName componentName = new ComponentName(packageName, className); + try { + info = packageManager.getActivityInfo(componentName, 0); + } catch (PackageManager.NameNotFoundException e) { + String[] packages = packageManager.canonicalToCurrentPackageNames( + new String[] { packageName }); + componentName = new ComponentName(packages[0], className); + try { + info = packageManager.getActivityInfo(componentName, 0); + } catch (PackageManager.NameNotFoundException e1) { + Log.w(TAG, "Unable to add bookmark: " + packageName + + "/" + className, e); + continue; + } + } + + intent = new Intent(Intent.ACTION_MAIN); + intent.addCategory(Intent.CATEGORY_LAUNCHER); + intent.setComponent(componentName); + title = info.loadLabel(packageManager).toString(); + } else if (categoryName != null) { + intent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, categoryName); + title = ""; + } else { + Log.w(TAG, "Unable to add bookmark for shortcut " + shortcutName + + ": missing package/class or category attributes"); + continue; + } + + ShortcutInfo shortcut = new ShortcutInfo(title, intent); + mShortcuts.put(shortcutChar, shortcut); + } + } catch (XmlPullParserException e) { + Log.w(TAG, "Got exception parsing bookmarks.", e); + } catch (IOException e) { + Log.w(TAG, "Got exception parsing bookmarks.", e); + } + } + + private static final class ShortcutInfo { + public final String title; + public final Intent intent; + + public ShortcutInfo(String title, Intent intent) { + this.title = title; + this.intent = intent; + } + } } diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java index f8b40d1..b5d4caf 100644 --- a/services/core/java/com/android/server/wm/AccessibilityController.java +++ b/services/core/java/com/android/server/wm/AccessibilityController.java @@ -397,8 +397,6 @@ final class AccessibilityController { private final class MagnifiedViewport { - private static final int DEFAUTLT_BORDER_WIDTH_DIP = 5; - private final SparseArray<WindowState> mTempWindowStates = new SparseArray<WindowState>(); @@ -411,6 +409,8 @@ final class AccessibilityController { private final Region mMagnifiedBounds = new Region(); private final Region mOldMagnifiedBounds = new Region(); + private final Path mCircularPath; + private final MagnificationSpec mMagnificationSpec = MagnificationSpec.obtain(); private final WindowManager mWindowManager; @@ -425,12 +425,22 @@ final class AccessibilityController { public MagnifiedViewport() { mWindowManager = (WindowManager) mContext.getSystemService(Service.WINDOW_SERVICE); - mBorderWidth = TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, DEFAUTLT_BORDER_WIDTH_DIP, - mContext.getResources().getDisplayMetrics()); + mBorderWidth = mContext.getResources().getDimension( + com.android.internal.R.dimen.accessibility_magnification_indicator_width); mHalfBorderWidth = (int) Math.ceil(mBorderWidth / 2); mDrawBorderInset = (int) mBorderWidth / 2; mWindow = new ViewportWindow(mContext); + + if (mContext.getResources().getBoolean( + com.android.internal.R.bool.config_windowIsRound)) { + mCircularPath = new Path(); + mWindowManager.getDefaultDisplay().getRealSize(mTempPoint); + final int centerXY = mTempPoint.x / 2; + mCircularPath.addCircle(centerXY, centerXY, centerXY, Path.Direction.CW); + } else { + mCircularPath = null; + } + recomputeBoundsLocked(); } @@ -459,6 +469,10 @@ final class AccessibilityController { Region availableBounds = mTempRegion1; availableBounds.set(0, 0, screenWidth, screenHeight); + if (mCircularPath != null) { + availableBounds.setPath(mCircularPath, availableBounds); + } + Region nonMagnifiedBounds = mTempRegion4; nonMagnifiedBounds.set(0, 0, 0, 0); diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java index 0c5d06a..abf8412 100644 --- a/services/core/java/com/android/server/wm/WindowAnimator.java +++ b/services/core/java/com/android/server/wm/WindowAnimator.java @@ -146,35 +146,6 @@ public class WindowAnimator { mDisplayContentsAnimators.delete(displayId); } - void hideWallpapersLocked(final WindowState w) { - final WindowState wallpaperTarget = mService.mWallpaperTarget; - final WindowState lowerWallpaperTarget = mService.mLowerWallpaperTarget; - final ArrayList<WindowToken> wallpaperTokens = mService.mWallpaperTokens; - - if ((wallpaperTarget == w && lowerWallpaperTarget == null) || wallpaperTarget == null) { - final int numTokens = wallpaperTokens.size(); - for (int i = numTokens - 1; i >= 0; i--) { - final WindowToken token = wallpaperTokens.get(i); - final int numWindows = token.windows.size(); - for (int j = numWindows - 1; j >= 0; j--) { - final WindowState wallpaper = token.windows.get(j); - final WindowStateAnimator winAnimator = wallpaper.mWinAnimator; - if (!winAnimator.mLastHidden) { - winAnimator.hide(); - mService.dispatchWallpaperVisibility(wallpaper, false); - setPendingLayoutChanges(Display.DEFAULT_DISPLAY, - WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER); - } - } - if (WindowManagerService.DEBUG_WALLPAPER_LIGHT && !token.hidden) Slog.d(TAG, - "Hiding wallpaper " + token + " from " + w - + " target=" + wallpaperTarget + " lower=" + lowerWallpaperTarget - + "\n" + Debug.getCallers(5, " ")); - token.hidden = true; - } - } - } - private void updateAppWindowsLocked(int displayId) { ArrayList<TaskStack> stacks = mService.getDisplayContentLocked(displayId).getStacks(); for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) { diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 792aaa0..9461faa 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -582,7 +582,7 @@ public class WindowManagerService extends IWindowManager.Stub } } - final ArrayList<WindowToken> mWallpaperTokens = new ArrayList<WindowToken>(); + private final ArrayList<WindowToken> mWallpaperTokens = new ArrayList<WindowToken>(); // If non-null, this is the currently visible window that is associated // with the wallpaper. @@ -1694,7 +1694,7 @@ public class WindowManagerService extends IWindowManager.Stub return true; } - final boolean isWallpaperVisible(WindowState wallpaperTarget) { + private boolean isWallpaperVisible(WindowState wallpaperTarget) { if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target " + wallpaperTarget + ", obscured=" + (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??") + " anim=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null) @@ -1708,6 +1708,34 @@ public class WindowManagerService extends IWindowManager.Stub || mLowerWallpaperTarget != null; } + void hideWallpapersLocked(final WindowState winGoingAway) { + if (mWallpaperTarget != null && + (mWallpaperTarget != winGoingAway || mLowerWallpaperTarget != null)) { + return; + } + + for (int i = mWallpaperTokens.size() - 1; i >= 0; i--) { + final WindowToken token = mWallpaperTokens.get(i); + for (int j = token.windows.size() - 1; j >= 0; j--) { + final WindowState wallpaper = token.windows.get(j); + final WindowStateAnimator winAnimator = wallpaper.mWinAnimator; + if (!winAnimator.mLastHidden) { + winAnimator.hide(); + dispatchWallpaperVisibility(wallpaper, false); + final DisplayContent displayContent = wallpaper.getDisplayContent(); + if (displayContent != null) { + displayContent.pendingLayoutChanges |= + WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; + } + } + } + if (DEBUG_WALLPAPER_LIGHT && !token.hidden) Slog.d(TAG, "Hiding wallpaper " + token + + " from " + winGoingAway + " target=" + mWallpaperTarget + " lower=" + + mLowerWallpaperTarget + "\n" + Debug.getCallers(5, " ")); + token.hidden = true; + } + } + static final int ADJUST_WALLPAPER_LAYERS_CHANGED = 1<<1; static final int ADJUST_WALLPAPER_VISIBILITY_CHANGED = 1<<2; @@ -1890,7 +1918,7 @@ public class WindowManagerService extends IWindowManager.Stub // AND any starting window associated with it, AND below the // maximum layer the policy allows for wallpapers. while (foundI > 0) { - WindowState wb = windows.get(foundI-1); + WindowState wb = windows.get(foundI - 1); if (wb.mBaseLayer < maxLayer && wb.mAttachedWindow != foundW && (foundW.mAttachedWindow == null || @@ -1916,7 +1944,7 @@ public class WindowManagerService extends IWindowManager.Stub } else { // Okay i is the position immediately above the wallpaper. Look at // what is below it for later. - foundW = foundI > 0 ? windows.get(foundI-1) : null; + foundW = foundI > 0 ? windows.get(foundI - 1) : null; } if (visible) { @@ -1939,43 +1967,37 @@ public class WindowManagerService extends IWindowManager.Stub // Start stepping backwards from here, ensuring that our wallpaper windows // are correctly placed. int changed = 0; - int curTokenIndex = mWallpaperTokens.size(); - while (curTokenIndex > 0) { - curTokenIndex--; - WindowToken token = mWallpaperTokens.get(curTokenIndex); + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowToken token = mWallpaperTokens.get(curTokenNdx); if (token.hidden == visible) { if (DEBUG_WALLPAPER_LIGHT) Slog.d(TAG, "Wallpaper token " + token + " hidden=" + !visible); changed |= ADJUST_WALLPAPER_VISIBILITY_CHANGED; token.hidden = !visible; - // Need to do a layout to ensure the wallpaper now has the - // correct size. + // Need to do a layout to ensure the wallpaper now has the correct size. getDefaultDisplayContentLocked().layoutNeeded = true; } - int curWallpaperIndex = token.windows.size(); - while (curWallpaperIndex > 0) { - curWallpaperIndex--; - WindowState wallpaper = token.windows.get(curWallpaperIndex); + final WindowList tokenWindows = token.windows; + for (int wallpaperNdx = tokenWindows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = tokenWindows.get(wallpaperNdx); if (visible) { updateWallpaperOffsetLocked(wallpaper, dw, dh, false); } - // First, make sure the client has the current visibility - // state. + // First, make sure the client has the current visibility state. dispatchWallpaperVisibility(wallpaper, visible); - wallpaper.mWinAnimator.mAnimLayer = wallpaper.mLayer + mWallpaperAnimLayerAdjustment; + wallpaper.mWinAnimator.mAnimLayer = + wallpaper.mLayer + mWallpaperAnimLayerAdjustment; if (DEBUG_LAYERS || DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, "adjustWallpaper win " + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer); - // First, if this window is at the current index, then all - // is well. + // First, if this window is at the current index, then all is well. if (wallpaper == foundW) { foundI--; - foundW = foundI > 0 - ? windows.get(foundI-1) : null; + foundW = foundI > 0 ? windows.get(foundI - 1) : null; continue; } @@ -2015,48 +2037,20 @@ public class WindowManagerService extends IWindowManager.Stub } } - /* - final TaskStack targetStack = - mWallpaperTarget == null ? null : mWallpaperTarget.getStack(); - if ((changed & ADJUST_WALLPAPER_LAYERS_CHANGED) != 0 && - targetStack != null && !targetStack.isHomeStack()) { - // If the wallpaper target is not on the home stack then make sure that all windows - // from other non-home stacks are above the wallpaper. - for (i = foundI - 1; i >= 0; --i) { - WindowState win = windows.get(i); - if (!win.isVisibleLw()) { - continue; - } - final TaskStack winStack = win.getStack(); - if (winStack != null && !winStack.isHomeStack() && winStack != targetStack) { - windows.remove(i); - windows.add(foundI + 1, win); - } - } - } - */ - - if (targetChanged && DEBUG_WALLPAPER_LIGHT) { - Slog.d(TAG, "New wallpaper: target=" + mWallpaperTarget - + " lower=" + mLowerWallpaperTarget + " upper=" - + mUpperWallpaperTarget); - } + if (targetChanged && DEBUG_WALLPAPER_LIGHT) Slog.d(TAG, "New wallpaper: target=" + + mWallpaperTarget + " lower=" + mLowerWallpaperTarget + " upper=" + + mUpperWallpaperTarget); return changed; } void setWallpaperAnimLayerAdjustmentLocked(int adj) { - if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, - "Setting wallpaper layer adj to " + adj); + if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "Setting wallpaper layer adj to " + adj); mWallpaperAnimLayerAdjustment = adj; - int curTokenIndex = mWallpaperTokens.size(); - while (curTokenIndex > 0) { - curTokenIndex--; - WindowToken token = mWallpaperTokens.get(curTokenIndex); - int curWallpaperIndex = token.windows.size(); - while (curWallpaperIndex > 0) { - curWallpaperIndex--; - WindowState wallpaper = token.windows.get(curWallpaperIndex); + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); wallpaper.mWinAnimator.mAnimLayer = wallpaper.mLayer + adj; if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "setWallpaper win " + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer); @@ -2190,14 +2184,10 @@ public class WindowManagerService extends IWindowManager.Stub } } - int curTokenIndex = mWallpaperTokens.size(); - while (curTokenIndex > 0) { - curTokenIndex--; - WindowToken token = mWallpaperTokens.get(curTokenIndex); - int curWallpaperIndex = token.windows.size(); - while (curWallpaperIndex > 0) { - curWallpaperIndex--; - WindowState wallpaper = token.windows.get(curWallpaperIndex); + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); if (updateWallpaperOffsetLocked(wallpaper, dw, dh, sync)) { WindowStateAnimator winAnimator = wallpaper.mWinAnimator; winAnimator.computeShownFrameLocked(); @@ -2229,7 +2219,7 @@ public class WindowManagerService extends IWindowManager.Stub } } - void updateWallpaperVisibilityLocked() { + private void updateWallpaperVisibilityLocked() { final boolean visible = isWallpaperVisible(mWallpaperTarget); final DisplayContent displayContent = mWallpaperTarget.getDisplayContent(); if (displayContent == null) { @@ -2239,21 +2229,18 @@ public class WindowManagerService extends IWindowManager.Stub final int dw = displayInfo.logicalWidth; final int dh = displayInfo.logicalHeight; - int curTokenIndex = mWallpaperTokens.size(); - while (curTokenIndex > 0) { - curTokenIndex--; - WindowToken token = mWallpaperTokens.get(curTokenIndex); + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowToken token = mWallpaperTokens.get(curTokenNdx); if (token.hidden == visible) { token.hidden = !visible; // Need to do a layout to ensure the wallpaper now has the // correct size. - getDefaultDisplayContentLocked().layoutNeeded = true; + displayContent.layoutNeeded = true; } - int curWallpaperIndex = token.windows.size(); - while (curWallpaperIndex > 0) { - curWallpaperIndex--; - WindowState wallpaper = token.windows.get(curWallpaperIndex); + final WindowList windows = token.windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); if (visible) { updateWallpaperOffsetLocked(wallpaper, dw, dh, false); } @@ -2911,14 +2898,10 @@ public class WindowManagerService extends IWindowManager.Stub if (window == mWallpaperTarget || window == mLowerWallpaperTarget || window == mUpperWallpaperTarget) { boolean doWait = sync; - int curTokenIndex = mWallpaperTokens.size(); - while (curTokenIndex > 0) { - curTokenIndex--; - WindowToken token = mWallpaperTokens.get(curTokenIndex); - int curWallpaperIndex = token.windows.size(); - while (curWallpaperIndex > 0) { - curWallpaperIndex--; - WindowState wallpaper = token.windows.get(curWallpaperIndex); + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + final WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); try { wallpaper.mClient.dispatchWallpaperCommand(action, x, y, z, extras, sync); @@ -3556,13 +3539,13 @@ public class WindowManagerService extends IWindowManager.Stub false /*updateInputWindows*/); } - if (delayed) { - if (displayContent != null) { - displayContent.mExitingTokens.add(wtoken); - } + if (delayed && displayContent != null) { + displayContent.mExitingTokens.add(wtoken); } else if (wtoken.windowType == TYPE_WALLPAPER) { mWallpaperTokens.remove(wtoken); } + } else if (wtoken.windowType == TYPE_WALLPAPER) { + mWallpaperTokens.remove(wtoken); } mInputMonitor.updateInputWindowsLw(true /*force*/); @@ -9592,9 +9575,6 @@ public class WindowManagerService extends IWindowManager.Stub // it is animating. displayContent.pendingLayoutChanges = 0; - if (DEBUG_LAYOUT_REPEATS) debugLayoutRepeats("loop number " - + mLayoutRepeatCount, displayContent.pendingLayoutChanges); - if (isDefaultDisplay) { mPolicy.beginPostLayoutPolicyLw(dw, dh); for (i = windows.size() - 1; i >= 0; i--) { @@ -9678,7 +9658,7 @@ public class WindowManagerService extends IWindowManager.Stub if (w.mHasSurface && !w.isHiddenFromUserLocked()) { // Take care of the window being ready to display. final boolean committed = - winAnimator.commitFinishDrawingLocked(currentTime); + winAnimator.commitFinishDrawingLocked(); if (isDefaultDisplay && committed) { if (w.mAttrs.type == TYPE_DREAM) { // HACK: When a dream is shown, it may at that @@ -10808,7 +10788,7 @@ public class WindowManagerService extends IWindowManager.Stub void dumpTokensLocked(PrintWriter pw, boolean dumpAll) { pw.println("WINDOW MANAGER TOKENS (dumpsys window tokens)"); - if (mTokenMap.size() > 0) { + if (!mTokenMap.isEmpty()) { pw.println(" All tokens:"); Iterator<WindowToken> it = mTokenMap.values().iterator(); while (it.hasNext()) { @@ -10822,7 +10802,7 @@ public class WindowManagerService extends IWindowManager.Stub } } } - if (mWallpaperTokens.size() > 0) { + if (!mWallpaperTokens.isEmpty()) { pw.println(); pw.println(" Wallpaper tokens:"); for (int i=mWallpaperTokens.size()-1; i>=0; i--) { @@ -10837,7 +10817,7 @@ public class WindowManagerService extends IWindowManager.Stub } } } - if (mFinishedStarting.size() > 0) { + if (!mFinishedStarting.isEmpty()) { pw.println(); pw.println(" Finishing start of application tokens:"); for (int i=mFinishedStarting.size()-1; i>=0; i--) { @@ -10852,7 +10832,7 @@ public class WindowManagerService extends IWindowManager.Stub } } } - if (mOpeningApps.size() > 0 || mClosingApps.size() > 0) { + if (!mOpeningApps.isEmpty() || !mClosingApps.isEmpty()) { pw.println(); if (mOpeningApps.size() > 0) { pw.print(" mOpeningApps="); pw.println(mOpeningApps); diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 8c79cf0..a78bab4 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -53,21 +53,16 @@ import android.view.View; import android.view.WindowManager; import android.view.WindowManagerPolicy; import android.view.WindowManager.LayoutParams; -import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; -import com.android.internal.R; import com.android.server.wm.WindowManagerService.H; import java.io.PrintWriter; import java.util.ArrayList; -class WinAnimatorList extends ArrayList<WindowStateAnimator> { -} - /** * Keep track of animations and surface operations for a single WindowState. **/ @@ -185,7 +180,7 @@ class WindowStateAnimator { int mAttrType; - public WindowStateAnimator(final WindowState win) { + WindowStateAnimator(final WindowState win) { final WindowManagerService service = win.mService; mService = service; @@ -482,7 +477,7 @@ class WindowStateAnimator { mService.mPendingRemove.add(mWin); mWin.mRemoveOnExit = false; } - mAnimator.hideWallpapersLocked(mWin); + mService.hideWallpapersLocked(mWin); } void hide() { @@ -523,7 +518,7 @@ class WindowStateAnimator { } // This must be called while inside a transaction. - boolean commitFinishDrawingLocked(long currentTime) { + boolean commitFinishDrawingLocked() { if (DEBUG_STARTING_WINDOW && mWin.mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING) { Slog.i(TAG, "commitFinishDrawingLocked: " + mWin + " cur mDrawState=" @@ -980,7 +975,7 @@ class WindowStateAnimator { } mSurfaceControl.destroy(); } - mAnimator.hideWallpapersLocked(mWin); + mService.hideWallpapersLocked(mWin); } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " + this + " surface " + mSurfaceControl + " session " + mSession @@ -1006,7 +1001,7 @@ class WindowStateAnimator { WindowManagerService.logSurface(mWin, "DESTROY PENDING", e); } mPendingDestroySurface.destroy(); - mAnimator.hideWallpapersLocked(mWin); + mService.hideWallpapersLocked(mWin); } } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " @@ -1454,7 +1449,7 @@ class WindowStateAnimator { hide(); } else if (w.mAttachedHidden || !w.isOnScreen()) { hide(); - mAnimator.hideWallpapersLocked(w); + mService.hideWallpapersLocked(w); // If we are waiting for this window to handle an // orientation change, well, it is hidden, so @@ -1626,13 +1621,8 @@ class WindowStateAnimator { } if (DEBUG_VISIBILITY || (DEBUG_STARTING_WINDOW && mWin.mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING)) { - RuntimeException e = null; - if (!WindowManagerService.HIDE_STACK_CRAWLS) { - e = new RuntimeException(); - e.fillInStackTrace(); - } Slog.v(TAG, "performShow on " + this - + ": mDrawState=" + mDrawState + " readyForDisplay=" + + ": mDrawState=" + drawStateToString() + " readyForDisplay=" + mWin.isReadyForDisplayIgnoringKeyguard() + " starting=" + (mWin.mAttrs.type == TYPE_APPLICATION_STARTING) + " during animation: policyVis=" + mWin.mPolicyVisibility @@ -1643,7 +1633,8 @@ class WindowStateAnimator { + (mWin.mAppToken != null ? mWin.mAppToken.hidden : false) + " animating=" + mAnimating + " tok animating=" - + (mAppAnimator != null ? mAppAnimator.animating : false), e); + + (mAppAnimator != null ? mAppAnimator.animating : false) + " Callers=" + + Debug.getCallers(3)); } if (mDrawState == READY_TO_SHOW && mWin.isReadyForDisplayIgnoringKeyguard()) { if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION) diff --git a/services/usb/java/com/android/server/usb/UsbMidiDevice.java b/services/usb/java/com/android/server/usb/UsbMidiDevice.java index 8d44905..396ed38 100644 --- a/services/usb/java/com/android/server/usb/UsbMidiDevice.java +++ b/services/usb/java/com/android/server/usb/UsbMidiDevice.java @@ -112,7 +112,7 @@ public final class UsbMidiDevice implements Closeable { MidiReceiver receiver = new MidiReceiver() { @Override - public void onPost(byte[] data, int offset, int count, long timestamp) + public void post(byte[] data, int offset, int count, long timestamp) throws IOException { // FIXME - timestamps are ignored, future posting not supported yet. mOutputStreams[portNumberF].write(data, offset, count); @@ -137,7 +137,7 @@ public final class UsbMidiDevice implements Closeable { pfd.revents = 0; int count = mInputStreams[index].read(buffer); - mOutputPortReceivers[index].onPost(buffer, 0, count, + mOutputPortReceivers[index].post(buffer, 0, count, System.nanoTime()); } else if ((pfd.revents & (OsConstants.POLLERR | OsConstants.POLLHUP)) != 0) { diff --git a/tests/CoreTests/android/Android.mk b/tests/CoreTests/android/Android.mk index bc0e4e4..5f3d0d9 100644 --- a/tests/CoreTests/android/Android.mk +++ b/tests/CoreTests/android/Android.mk @@ -6,7 +6,7 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := \ $(call all-subdir-java-files) -LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle conscrypt +LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle conscrypt org.apache.http.legacy LOCAL_PACKAGE_NAME := CoreTests diff --git a/tests/CoreTests/android/AndroidManifest.xml b/tests/CoreTests/android/AndroidManifest.xml index 8331f0c..bf46d15 100644 --- a/tests/CoreTests/android/AndroidManifest.xml +++ b/tests/CoreTests/android/AndroidManifest.xml @@ -35,6 +35,7 @@ <application> <uses-library android:name="android.test.runner" /> + <uses-library android:name="org.apache.http.legacy" android:required="false" /> </application> <instrumentation diff --git a/tests/OneMedia/Android.mk b/tests/OneMedia/Android.mk index 4feac68..b7d7f98 100644 --- a/tests/OneMedia/Android.mk +++ b/tests/OneMedia/Android.mk @@ -12,6 +12,8 @@ LOCAL_CERTIFICATE := platform LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-media-protocols +LOCAL_JAVA_LIBRARIES += org.apache.http.legacy + LOCAL_PROGUARD_ENABLED := disabled include $(BUILD_PACKAGE) diff --git a/tests/OneMedia/AndroidManifest.xml b/tests/OneMedia/AndroidManifest.xml index 95072a4..ef3fad5 100644 --- a/tests/OneMedia/AndroidManifest.xml +++ b/tests/OneMedia/AndroidManifest.xml @@ -13,6 +13,8 @@ android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > + + <uses-library android:name="org.apache.http.legacy" android:required="false" /> <activity android:name="com.android.onemedia.OnePlayerActivity" android:label="@string/app_name" > diff --git a/tools/apilint/apilint.py b/tools/apilint/apilint.py index 393d2ec..1330c28 100644 --- a/tools/apilint/apilint.py +++ b/tools/apilint/apilint.py @@ -48,8 +48,9 @@ def format(fg=None, bg=None, bright=False, bold=False, dim=False, reset=False): class Field(): - def __init__(self, clazz, raw, blame): + def __init__(self, clazz, line, raw, blame): self.clazz = clazz + self.line = line self.raw = raw.strip(" {;") self.blame = blame @@ -73,8 +74,9 @@ class Field(): class Method(): - def __init__(self, clazz, raw, blame): + def __init__(self, clazz, line, raw, blame): self.clazz = clazz + self.line = line self.raw = raw.strip(" {;") self.blame = blame @@ -110,8 +112,9 @@ class Method(): class Class(): - def __init__(self, pkg, raw, blame): + def __init__(self, pkg, line, raw, blame): self.pkg = pkg + self.line = line self.raw = raw.strip(" {;") self.blame = blame self.ctors = [] @@ -140,7 +143,8 @@ class Class(): class Package(): - def __init__(self, raw, blame): + def __init__(self, line, raw, blame): + self.line = line self.raw = raw.strip(" {;") self.blame = blame @@ -151,64 +155,92 @@ class Package(): return self.raw -def parse_api(fn): +def parse_api(f): + line = 0 api = {} pkg = None clazz = None blame = None re_blame = re.compile("^([a-z0-9]{7,}) \(<([^>]+)>.+?\) (.+?)$") + for raw in f.readlines(): + line += 1 + raw = raw.rstrip() + match = re_blame.match(raw) + if match is not None: + blame = match.groups()[0:2] + raw = match.groups()[2] + else: + blame = None + + if raw.startswith("package"): + pkg = Package(line, raw, blame) + elif raw.startswith(" ") and raw.endswith("{"): + clazz = Class(pkg, line, raw, blame) + api[clazz.fullname] = clazz + elif raw.startswith(" ctor"): + clazz.ctors.append(Method(clazz, line, raw, blame)) + elif raw.startswith(" method"): + clazz.methods.append(Method(clazz, line, raw, blame)) + elif raw.startswith(" field"): + clazz.fields.append(Field(clazz, line, raw, blame)) + + return api + +def parse_api_file(fn): with open(fn) as f: - for raw in f.readlines(): - raw = raw.rstrip() - match = re_blame.match(raw) - if match is not None: - blame = match.groups()[0:2] - raw = match.groups()[2] - else: - blame = None - - if raw.startswith("package"): - pkg = Package(raw, blame) - elif raw.startswith(" ") and raw.endswith("{"): - clazz = Class(pkg, raw, blame) - api[clazz.fullname] = clazz - elif raw.startswith(" ctor"): - clazz.ctors.append(Method(clazz, raw, blame)) - elif raw.startswith(" method"): - clazz.methods.append(Method(clazz, raw, blame)) - elif raw.startswith(" field"): - clazz.fields.append(Field(clazz, raw, blame)) + return parse_api(f) - return api + +class Failure(): + def __init__(self, sig, clazz, detail, error, msg): + self.sig = sig + self.clazz = clazz + self.detail = detail + self.error = error + self.msg = msg + + if error: + dump = "%sError:%s %s" % (format(fg=RED, bg=BLACK, bold=True), format(reset=True), msg) + else: + dump = "%sWarning:%s %s" % (format(fg=YELLOW, bg=BLACK, bold=True), format(reset=True), msg) + + self.line = clazz.line + blame = clazz.blame + if detail is not None: + dump += "\n in " + repr(detail) + self.line = detail.line + blame = detail.blame + dump += "\n in " + repr(clazz) + dump += "\n in " + repr(clazz.pkg) + dump += "\n at line " + repr(self.line) + if blame is not None: + dump += "\n last modified by %s in %s" % (blame[1], blame[0]) + + self.dump = dump + + def __repr__(self): + return self.dump failures = {} -def _fail(clazz, detail, msg): +def _fail(clazz, detail, error, msg): """Records an API failure to be processed later.""" global failures sig = "%s-%s-%s" % (clazz.fullname, repr(detail), msg) sig = sig.replace(" deprecated ", " ") - res = msg - blame = clazz.blame - if detail is not None: - res += "\n in " + repr(detail) - blame = detail.blame - res += "\n in " + repr(clazz) - res += "\n in " + repr(clazz.pkg) - if blame is not None: - res += "\n last modified by %s in %s" % (blame[1], blame[0]) - failures[sig] = res + failures[sig] = Failure(sig, clazz, detail, error, msg) + def warn(clazz, detail, msg): - _fail(clazz, detail, "%sWarning:%s %s" % (format(fg=YELLOW, bg=BLACK, bold=True), format(reset=True), msg)) + _fail(clazz, detail, False, msg) def error(clazz, detail, msg): - _fail(clazz, detail, "%sError:%s %s" % (format(fg=RED, bg=BLACK, bold=True), format(reset=True), msg)) + _fail(clazz, detail, True, msg) def verify_constants(clazz): @@ -770,28 +802,29 @@ def verify_compat(cur, prev): return failures -cur = parse_api(sys.argv[1]) -cur_fail = verify_style(cur) +if __name__ == "__main__": + cur = parse_api_file(sys.argv[1]) + cur_fail = verify_style(cur) -if len(sys.argv) > 2: - prev = parse_api(sys.argv[2]) - prev_fail = verify_style(prev) + if len(sys.argv) > 2: + prev = parse_api_file(sys.argv[2]) + prev_fail = verify_style(prev) - # ignore errors from previous API level - for p in prev_fail: - if p in cur_fail: - del cur_fail[p] + # ignore errors from previous API level + for p in prev_fail: + if p in cur_fail: + del cur_fail[p] - # look for compatibility issues - compat_fail = verify_compat(cur, prev) + # look for compatibility issues + compat_fail = verify_compat(cur, prev) - print "%s API compatibility issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True))) - for f in sorted(compat_fail): - print compat_fail[f] - print + print "%s API compatibility issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True))) + for f in sorted(compat_fail): + print compat_fail[f] + print -print "%s API style issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True))) -for f in sorted(cur_fail): - print cur_fail[f] - print + print "%s API style issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True))) + for f in sorted(cur_fail): + print cur_fail[f] + print |