diff options
151 files changed, 2592 insertions, 1286 deletions
| diff --git a/Android.mk b/Android.mk index 22cc27b6be87..b77c2edc15b9 100644 --- a/Android.mk +++ b/Android.mk @@ -737,7 +737,8 @@ sample_groups := -samplegroup Background \                   -samplegroup Sensors \                   -samplegroup Testing \                   -samplegroup UI \ -                 -samplegroup Views +                 -samplegroup Views \ +                 -samplegroup Wearable  ## SDK version identifiers used in the published docs    # major[.minor] version for current SDK. (full releases only) diff --git a/api/current.txt b/api/current.txt index 074175b5d347..bfe8d7a65e37 100644 --- a/api/current.txt +++ b/api/current.txt @@ -4405,6 +4405,7 @@ package android.app {      method public boolean inKeyguardRestrictedInputMode();      method public boolean isKeyguardLocked();      method public boolean isKeyguardSecure(); +    method public boolean isKeyguardInTrustedState();      method public deprecated android.app.KeyguardManager.KeyguardLock newKeyguardLock(java.lang.String);    } @@ -16547,15 +16548,21 @@ package android.media.tv {      method public static java.lang.String[] decode(java.lang.String);      method public static java.lang.String encode(java.lang.String...);      field public static final java.lang.String ANIMAL_WILDLIFE = "ANIMAL_WILDLIFE"; +    field public static final java.lang.String ARTS = "ARTS";      field public static final java.lang.String COMEDY = "COMEDY";      field public static final java.lang.String DRAMA = "DRAMA";      field public static final java.lang.String EDUCATION = "EDUCATION"; +    field public static final java.lang.String ENTERTAINMENT = "ENTERTAINMENT";      field public static final java.lang.String FAMILY_KIDS = "FAMILY_KIDS";      field public static final java.lang.String GAMING = "GAMING"; +    field public static final java.lang.String LIFE_STYLE = "LIFE_STYLE";      field public static final java.lang.String MOVIES = "MOVIES"; +    field public static final java.lang.String MUSIC = "MUSIC";      field public static final java.lang.String NEWS = "NEWS"; +    field public static final java.lang.String PREMIER = "PREMIER";      field public static final java.lang.String SHOPPING = "SHOPPING";      field public static final java.lang.String SPORTS = "SPORTS"; +    field public static final java.lang.String TECH_SCIENCE = "TECH_SCIENCE";      field public static final java.lang.String TRAVEL = "TRAVEL";    } @@ -17155,7 +17162,7 @@ package android.net {      field public static final java.lang.String PROXY_CHANGE_ACTION = "android.intent.action.PROXY_CHANGE";    } -  public class ProxyInfo implements android.os.Parcelable { +  public deprecated class ProxyInfo implements android.os.Parcelable {      method public static android.net.ProxyInfo buildDirectProxy(java.lang.String, int);      method public static android.net.ProxyInfo buildDirectProxy(java.lang.String, int, java.util.List<java.lang.String>);      method public static android.net.ProxyInfo buildPacProxy(android.net.Uri); @@ -17202,7 +17209,7 @@ package android.net {      method public static javax.net.SocketFactory getDefault(int);      method public static javax.net.ssl.SSLSocketFactory getDefault(int, android.net.SSLSessionCache);      method public java.lang.String[] getDefaultCipherSuites(); -    method public static org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache); +    method public static deprecated org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache);      method public static javax.net.ssl.SSLSocketFactory getInsecure(int, android.net.SSLSessionCache);      method public byte[] getNpnSelectedProtocol(java.net.Socket);      method public java.lang.String[] getSupportedCipherSuites(); @@ -17420,7 +17427,7 @@ package android.net {  package android.net.http { -  public final class AndroidHttpClient implements org.apache.http.client.HttpClient { +  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); @@ -17438,8 +17445,8 @@ package android.net.http {      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 android.net.http.AndroidHttpClient newInstance(java.lang.String, android.content.Context); -    method public static android.net.http.AndroidHttpClient newInstance(java.lang.String); +    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;    } @@ -28221,6 +28228,7 @@ package android.telecom {      method public android.telecom.PhoneAccountHandle getAccountHandle();      method public android.net.Uri getAddress();      method public int getCapabilities(); +    method public int getColor();      method public android.graphics.drawable.Drawable getIcon(android.content.Context);      method public int getIconResId();      method public java.lang.CharSequence getLabel(); @@ -28234,6 +28242,7 @@ package android.telecom {      field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10      field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4      field public static final android.os.Parcelable.Creator CREATOR; +    field public static final int NO_COLOR = -1; // 0xffffffff      field public static final java.lang.String SCHEME_SIP = "sip";      field public static final java.lang.String SCHEME_TEL = "tel";      field public static final java.lang.String SCHEME_VOICEMAIL = "voicemail"; @@ -28245,6 +28254,7 @@ package android.telecom {      method public android.telecom.PhoneAccount build();      method public android.telecom.PhoneAccount.Builder setAddress(android.net.Uri);      method public android.telecom.PhoneAccount.Builder setCapabilities(int); +    method public android.telecom.PhoneAccount.Builder setColor(int);      method public android.telecom.PhoneAccount.Builder setIconResId(int);      method public android.telecom.PhoneAccount.Builder setShortDescription(java.lang.CharSequence);      method public android.telecom.PhoneAccount.Builder setSubscriptionAddress(android.net.Uri); @@ -30336,7 +30346,7 @@ package android.text.format {      method public static java.lang.String formatShortFileSize(android.content.Context, long);    } -  public class Time { +  public deprecated class Time {      ctor public Time(java.lang.String);      ctor public Time();      ctor public Time(android.text.format.Time); @@ -31707,7 +31717,7 @@ package android.util {      field public final int mTag;    } -  public class FloatMath { +  public deprecated class FloatMath {      method public static float ceil(float);      method public static float cos(float);      method public static float exp(float); @@ -34964,6 +34974,7 @@ package android.view {      field public static final int SOFT_INPUT_STATE_UNSPECIFIED = 0; // 0x0      field public static final int SOFT_INPUT_STATE_VISIBLE = 4; // 0x4      field public static final int TITLE_CHANGED = 64; // 0x40 +    field public static final int TYPE_ACCESSIBILITY_OVERLAY = 2032; // 0x7f0      field public static final int TYPE_APPLICATION = 2; // 0x2      field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb      field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9 @@ -35383,6 +35394,7 @@ package android.view.accessibility {      method public void recycle();      method public void writeToParcel(android.os.Parcel, int);      field public static final android.os.Parcelable.Creator CREATOR; +    field public static final int TYPE_ACCESSIBILITY_OVERLAY = 4; // 0x4      field public static final int TYPE_APPLICATION = 1; // 0x1      field public static final int TYPE_INPUT_METHOD = 2; // 0x2      field public static final int TYPE_SYSTEM = 3; // 0x3 @@ -54394,7 +54406,7 @@ package junit.runner {  package org.apache.commons.logging { -  public abstract interface Log { +  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); @@ -54419,26 +54431,26 @@ package org.apache.commons.logging {  package org.apache.http { -  public class ConnectionClosedException extends java.io.IOException { +  public deprecated class ConnectionClosedException extends java.io.IOException {      ctor public ConnectionClosedException(java.lang.String);    } -  public abstract interface ConnectionReuseStrategy { +  public abstract deprecated interface ConnectionReuseStrategy {      method public abstract boolean keepAlive(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext);    } -  public abstract interface FormattedHeader implements org.apache.http.Header { +  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 interface Header { +  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 interface HeaderElement { +  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); @@ -54447,17 +54459,17 @@ package org.apache.http {      method public abstract java.lang.String getValue();    } -  public abstract interface HeaderElementIterator implements java.util.Iterator { +  public abstract deprecated interface HeaderElementIterator implements java.util.Iterator {      method public abstract boolean hasNext();      method public abstract org.apache.http.HeaderElement nextElement();    } -  public abstract interface HeaderIterator implements java.util.Iterator { +  public abstract deprecated interface HeaderIterator implements java.util.Iterator {      method public abstract boolean hasNext();      method public abstract org.apache.http.Header nextHeader();    } -  public abstract interface HttpClientConnection implements org.apache.http.HttpConnection { +  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; @@ -54466,7 +54478,7 @@ package org.apache.http {      method public abstract void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException;    } -  public abstract interface HttpConnection { +  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(); @@ -54476,7 +54488,7 @@ package org.apache.http {      method public abstract void shutdown() throws java.io.IOException;    } -  public abstract interface HttpConnectionMetrics { +  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(); @@ -54485,7 +54497,7 @@ package org.apache.http {      method public abstract void reset();    } -  public abstract interface HttpEntity { +  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(); @@ -54497,19 +54509,19 @@ package org.apache.http {      method public abstract void writeTo(java.io.OutputStream) throws java.io.IOException;    } -  public abstract interface HttpEntityEnclosingRequest implements org.apache.http.HttpRequest { +  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 class HttpException extends java.lang.Exception { +  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 class HttpHost implements java.lang.Cloneable { +  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); @@ -54527,14 +54539,14 @@ package org.apache.http {      field protected final java.lang.String schemeName;    } -  public abstract interface HttpInetConnection implements org.apache.http.HttpConnection { +  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 interface HttpMessage { +  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); @@ -54554,20 +54566,20 @@ package org.apache.http {      method public abstract void setParams(org.apache.http.params.HttpParams);    } -  public abstract interface HttpRequest implements org.apache.http.HttpMessage { +  public abstract deprecated interface HttpRequest implements org.apache.http.HttpMessage {      method public abstract org.apache.http.RequestLine getRequestLine();    } -  public abstract interface HttpRequestFactory { +  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 interface HttpRequestInterceptor { +  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 interface HttpResponse implements org.apache.http.HttpMessage { +  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(); @@ -54580,16 +54592,16 @@ package org.apache.http {      method public abstract void setStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String);    } -  public abstract interface HttpResponseFactory { +  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 interface HttpResponseInterceptor { +  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 interface HttpServerConnection implements org.apache.http.HttpConnection { +  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; @@ -54597,7 +54609,7 @@ package org.apache.http {      method public abstract void sendResponseHeader(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException;    } -  public abstract interface HttpStatus { +  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 @@ -54648,7 +54660,7 @@ package org.apache.http {      field public static final int SC_USE_PROXY = 305; // 0x131    } -  public final class HttpVersion extends org.apache.http.ProtocolVersion implements java.io.Serializable { +  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; @@ -54656,37 +54668,37 @@ package org.apache.http {      field public static final org.apache.http.HttpVersion HTTP_1_1;    } -  public class MalformedChunkCodingException extends java.io.IOException { +  public deprecated class MalformedChunkCodingException extends java.io.IOException {      ctor public MalformedChunkCodingException();      ctor public MalformedChunkCodingException(java.lang.String);    } -  public class MethodNotSupportedException extends org.apache.http.HttpException { +  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 interface NameValuePair { +  public abstract deprecated interface NameValuePair {      method public abstract java.lang.String getName();      method public abstract java.lang.String getValue();    } -  public class NoHttpResponseException extends java.io.IOException { +  public deprecated class NoHttpResponseException extends java.io.IOException {      ctor public NoHttpResponseException(java.lang.String);    } -  public class ParseException extends java.lang.RuntimeException { +  public deprecated class ParseException extends java.lang.RuntimeException {      ctor public ParseException();      ctor public ParseException(java.lang.String);    } -  public class ProtocolException extends org.apache.http.HttpException { +  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 class ProtocolVersion implements java.lang.Cloneable java.io.Serializable { +  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); @@ -54704,28 +54716,28 @@ package org.apache.http {      field protected final java.lang.String protocol;    } -  public abstract interface ReasonPhraseCatalog { +  public abstract deprecated interface ReasonPhraseCatalog {      method public abstract java.lang.String getReason(int, java.util.Locale);    } -  public abstract interface RequestLine { +  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 interface StatusLine { +  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 interface TokenIterator implements java.util.Iterator { +  public abstract deprecated interface TokenIterator implements java.util.Iterator {      method public abstract boolean hasNext();      method public abstract java.lang.String nextToken();    } -  public class UnsupportedHttpVersionException extends org.apache.http.ProtocolException { +  public deprecated class UnsupportedHttpVersionException extends org.apache.http.ProtocolException {      ctor public UnsupportedHttpVersionException();      ctor public UnsupportedHttpVersionException(java.lang.String);    } @@ -54734,14 +54746,14 @@ package org.apache.http {  package org.apache.http.auth { -  public final class 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 interface AuthScheme { +  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(); @@ -54751,11 +54763,11 @@ package org.apache.http.auth {      method public abstract void processChallenge(org.apache.http.Header) throws org.apache.http.auth.MalformedChallengeException;    } -  public abstract interface AuthSchemeFactory { +  public abstract deprecated interface AuthSchemeFactory {      method public abstract org.apache.http.auth.AuthScheme newInstance(org.apache.http.params.HttpParams);    } -  public final class AuthSchemeRegistry { +  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(); @@ -54764,7 +54776,7 @@ package org.apache.http.auth {      method public synchronized void unregister(java.lang.String);    } -  public class AuthScope { +  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); @@ -54781,7 +54793,7 @@ package org.apache.http.auth {      field public static final java.lang.String ANY_SCHEME;    } -  public class AuthState { +  public deprecated class AuthState {      ctor public AuthState();      method public org.apache.http.auth.AuthScheme getAuthScheme();      method public org.apache.http.auth.AuthScope getAuthScope(); @@ -54793,35 +54805,35 @@ package org.apache.http.auth {      method public void setCredentials(org.apache.http.auth.Credentials);    } -  public class AuthenticationException extends org.apache.http.ProtocolException { +  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 class BasicUserPrincipal implements java.security.Principal { +  public final deprecated class BasicUserPrincipal implements java.security.Principal {      ctor public BasicUserPrincipal(java.lang.String);      method public java.lang.String getName();    } -  public abstract interface Credentials { +  public abstract deprecated interface Credentials {      method public abstract java.lang.String getPassword();      method public abstract java.security.Principal getUserPrincipal();    } -  public class InvalidCredentialsException extends org.apache.http.auth.AuthenticationException { +  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 class MalformedChallengeException extends org.apache.http.ProtocolException { +  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 class NTCredentials implements org.apache.http.auth.Credentials { +  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(); @@ -54831,14 +54843,14 @@ package org.apache.http.auth {      method public java.lang.String getWorkstation();    } -  public class NTUserPrincipal implements java.security.Principal { +  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 class UsernamePasswordCredentials implements org.apache.http.auth.Credentials { +  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(); @@ -54850,16 +54862,16 @@ package org.apache.http.auth {  package org.apache.http.auth.params { -  public abstract interface AuthPNames { +  public abstract deprecated interface AuthPNames {      field public static final java.lang.String CREDENTIAL_CHARSET = "http.auth.credential-charset";    } -  public class AuthParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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 class AuthParams { +  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);    } @@ -54868,39 +54880,39 @@ package org.apache.http.auth.params {  package org.apache.http.client { -  public abstract interface AuthenticationHandler { +  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 class CircularRedirectException extends org.apache.http.client.RedirectException { +  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 class ClientProtocolException extends java.io.IOException { +  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 interface CookieStore { +  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 interface CredentialsProvider { +  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 interface HttpClient { +  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; @@ -54913,40 +54925,40 @@ package org.apache.http.client {      method public abstract org.apache.http.params.HttpParams getParams();    } -  public abstract interface HttpRequestRetryHandler { +  public abstract deprecated interface HttpRequestRetryHandler {      method public abstract boolean retryRequest(java.io.IOException, int, org.apache.http.protocol.HttpContext);    } -  public class HttpResponseException extends org.apache.http.client.ClientProtocolException { +  public deprecated class HttpResponseException extends org.apache.http.client.ClientProtocolException {      ctor public HttpResponseException(int, java.lang.String);      method public int getStatusCode();    } -  public class NonRepeatableRequestException extends org.apache.http.ProtocolException { +  public deprecated class NonRepeatableRequestException extends org.apache.http.ProtocolException {      ctor public NonRepeatableRequestException();      ctor public NonRepeatableRequestException(java.lang.String);    } -  public class RedirectException extends org.apache.http.ProtocolException { +  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 interface RedirectHandler { +  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 interface RequestDirector { +  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 interface ResponseHandler { +  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 interface UserTokenHandler { +  public abstract deprecated interface UserTokenHandler {      method public abstract java.lang.Object getUserToken(org.apache.http.protocol.HttpContext);    } @@ -54954,7 +54966,7 @@ package org.apache.http.client {  package org.apache.http.client.entity { -  public class UrlEncodedFormEntity extends org.apache.http.entity.StringEntity { +  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;    } @@ -54963,13 +54975,13 @@ package org.apache.http.client.entity {  package org.apache.http.client.methods { -  public abstract interface AbortableHttpRequest { +  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 class HttpDelete extends org.apache.http.client.methods.HttpRequestBase { +  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); @@ -54977,14 +54989,14 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "DELETE";    } -  public abstract class HttpEntityEnclosingRequestBase extends org.apache.http.client.methods.HttpRequestBase implements org.apache.http.HttpEntityEnclosingRequest { +  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 class HttpGet extends org.apache.http.client.methods.HttpRequestBase { +  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); @@ -54992,7 +55004,7 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "GET";    } -  public class HttpHead extends org.apache.http.client.methods.HttpRequestBase { +  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); @@ -55000,7 +55012,7 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "HEAD";    } -  public class HttpOptions extends org.apache.http.client.methods.HttpRequestBase { +  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); @@ -55009,7 +55021,7 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "OPTIONS";    } -  public class HttpPost extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase { +  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); @@ -55017,7 +55029,7 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "POST";    } -  public class HttpPut extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase { +  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); @@ -55025,7 +55037,7 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "PUT";    } -  public abstract class HttpRequestBase extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.client.methods.AbortableHttpRequest java.lang.Cloneable org.apache.http.client.methods.HttpUriRequest { +  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; @@ -55039,7 +55051,7 @@ package org.apache.http.client.methods {      method public void setURI(java.net.URI);    } -  public class HttpTrace extends org.apache.http.client.methods.HttpRequestBase { +  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); @@ -55047,7 +55059,7 @@ package org.apache.http.client.methods {      field public static final java.lang.String METHOD_NAME = "TRACE";    } -  public abstract interface HttpUriRequest implements org.apache.http.HttpRequest { +  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(); @@ -55058,16 +55070,16 @@ package org.apache.http.client.methods {  package org.apache.http.client.params { -  public abstract 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 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 class AuthPolicy { +  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 interface ClientPNames { +  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"; @@ -55081,7 +55093,7 @@ package org.apache.http.client.params {      field public static final java.lang.String VIRTUAL_HOST = "http.virtual-host";    } -  public class ClientParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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); @@ -55096,7 +55108,7 @@ package org.apache.http.client.params {      method public void setVirtualHost(org.apache.http.HttpHost);    } -  public final class CookiePolicy { +  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"; @@ -55104,7 +55116,7 @@ package org.apache.http.client.params {      field public static final java.lang.String RFC_2965 = "rfc2965";    } -  public class HttpClientParams { +  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); @@ -55117,7 +55129,7 @@ package org.apache.http.client.params {  package org.apache.http.client.protocol { -  public abstract interface ClientContext { +  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"; @@ -55130,7 +55142,7 @@ package org.apache.http.client.protocol {      field public static final java.lang.String USER_TOKEN = "http.user-token";    } -  public class ClientContextConfigurer implements org.apache.http.client.protocol.ClientContext { +  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); @@ -55139,27 +55151,27 @@ package org.apache.http.client.protocol {      method public void setCredentialsProvider(org.apache.http.client.CredentialsProvider);    } -  public class RequestAddCookies implements org.apache.http.HttpRequestInterceptor { +  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 class RequestDefaultHeaders implements org.apache.http.HttpRequestInterceptor { +  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 class RequestProxyAuthentication implements org.apache.http.HttpRequestInterceptor { +  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 class RequestTargetAuthentication implements org.apache.http.HttpRequestInterceptor { +  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 class ResponseProcessCookies implements org.apache.http.HttpResponseInterceptor { +  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;    } @@ -55168,11 +55180,11 @@ package org.apache.http.client.protocol {  package org.apache.http.client.utils { -  public class CloneUtils { +  public deprecated class CloneUtils {      method public static java.lang.Object clone(java.lang.Object) throws java.lang.CloneNotSupportedException;    } -  public class URIUtils { +  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); @@ -55180,7 +55192,7 @@ package org.apache.http.client.utils {      method public static java.net.URI rewriteURI(java.net.URI, org.apache.http.HttpHost) throws java.net.URISyntaxException;    } -  public class URLEncodedUtils { +  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); @@ -55194,7 +55206,7 @@ package org.apache.http.client.utils {  package org.apache.http.conn { -  public class BasicEofSensorWatcher implements org.apache.http.conn.EofSensorWatcher { +  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; @@ -55203,7 +55215,7 @@ package org.apache.http.conn {      field protected org.apache.http.conn.ManagedClientConnection managedConn;    } -  public class BasicManagedEntity extends org.apache.http.entity.HttpEntityWrapper implements org.apache.http.conn.ConnectionReleaseTrigger org.apache.http.conn.EofSensorWatcher { +  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; @@ -55215,7 +55227,7 @@ package org.apache.http.conn {      field protected org.apache.http.conn.ManagedClientConnection managedConn;    } -  public abstract interface ClientConnectionManager { +  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(); @@ -55224,41 +55236,41 @@ package org.apache.http.conn {      method public abstract void shutdown();    } -  public abstract interface ClientConnectionManagerFactory { +  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 interface ClientConnectionOperator { +  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 interface ClientConnectionRequest { +  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 class ConnectTimeoutException extends java.io.InterruptedIOException { +  public deprecated class ConnectTimeoutException extends java.io.InterruptedIOException {      ctor public ConnectTimeoutException();      ctor public ConnectTimeoutException(java.lang.String);    } -  public abstract interface ConnectionKeepAliveStrategy { +  public abstract deprecated interface ConnectionKeepAliveStrategy {      method public abstract long getKeepAliveDuration(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext);    } -  public class ConnectionPoolTimeoutException extends org.apache.http.conn.ConnectTimeoutException { +  public deprecated class ConnectionPoolTimeoutException extends org.apache.http.conn.ConnectTimeoutException {      ctor public ConnectionPoolTimeoutException();      ctor public ConnectionPoolTimeoutException(java.lang.String);    } -  public abstract interface ConnectionReleaseTrigger { +  public abstract deprecated interface ConnectionReleaseTrigger {      method public abstract void abortConnection() throws java.io.IOException;      method public abstract void releaseConnection() throws java.io.IOException;    } -  public class EofSensorInputStream extends java.io.InputStream implements org.apache.http.conn.ConnectionReleaseTrigger { +  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; @@ -55270,18 +55282,18 @@ package org.apache.http.conn {      field protected java.io.InputStream wrappedStream;    } -  public abstract interface EofSensorWatcher { +  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 class HttpHostConnectException extends java.net.ConnectException { +  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 interface ManagedClientConnection implements org.apache.http.conn.ConnectionReleaseTrigger org.apache.http.HttpClientConnection org.apache.http.HttpInetConnection { +  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(); @@ -55297,14 +55309,14 @@ package org.apache.http.conn {      method public abstract void unmarkReusable();    } -  public final class MultihomePlainSocketFactory implements org.apache.http.conn.scheme.SocketFactory { +  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 interface OperatedClientConnection implements org.apache.http.HttpClientConnection org.apache.http.HttpInetConnection { +  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(); @@ -55317,29 +55329,29 @@ package org.apache.http.conn {  package org.apache.http.conn.params { -  public abstract interface ConnConnectionPNames { +  public abstract deprecated interface ConnConnectionPNames {      field public static final java.lang.String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage";    } -  public class ConnConnectionParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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 interface ConnManagerPNames { +  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 class ConnManagerParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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 class ConnManagerParams implements org.apache.http.conn.params.ConnManagerPNames { +  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); @@ -55350,11 +55362,11 @@ package org.apache.http.conn.params {      field public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20; // 0x14    } -  public abstract interface ConnPerRoute { +  public abstract deprecated interface ConnPerRoute {      method public abstract int getMaxForRoute(org.apache.http.conn.routing.HttpRoute);    } -  public final class ConnPerRouteBean implements org.apache.http.conn.params.ConnPerRoute { +  public final deprecated class ConnPerRouteBean implements org.apache.http.conn.params.ConnPerRoute {      ctor public ConnPerRouteBean(int);      ctor public ConnPerRouteBean();      method public int getDefaultMax(); @@ -55365,20 +55377,20 @@ package org.apache.http.conn.params {      field public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 2; // 0x2    } -  public abstract interface ConnRoutePNames { +  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 class ConnRouteParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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 class ConnRouteParams implements org.apache.http.conn.params.ConnRoutePNames { +  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); @@ -55393,7 +55405,7 @@ package org.apache.http.conn.params {  package org.apache.http.conn.routing { -  public class BasicRouteDirector implements org.apache.http.conn.routing.HttpRouteDirector { +  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); @@ -55401,7 +55413,7 @@ package org.apache.http.conn.routing {      method protected int proxiedStep(org.apache.http.conn.routing.RouteInfo, org.apache.http.conn.routing.RouteInfo);    } -  public final class HttpRoute implements java.lang.Cloneable 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); @@ -55423,7 +55435,7 @@ package org.apache.http.conn.routing {      method public final java.lang.String toString();    } -  public abstract interface HttpRouteDirector { +  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 @@ -55434,11 +55446,11 @@ package org.apache.http.conn.routing {      field public static final int UNREACHABLE = -1; // 0xffffffff    } -  public abstract interface HttpRoutePlanner { +  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 interface RouteInfo { +  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(); @@ -55465,7 +55477,7 @@ package org.apache.http.conn.routing {      enum_constant public static final org.apache.http.conn.routing.RouteInfo.TunnelType TUNNELLED;    } -  public final class RouteTracker implements java.lang.Cloneable org.apache.http.conn.routing.RouteInfo { +  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; @@ -55495,15 +55507,15 @@ package org.apache.http.conn.routing {  package org.apache.http.conn.scheme { -  public abstract interface HostNameResolver { +  public abstract deprecated interface HostNameResolver {      method public abstract java.net.InetAddress resolve(java.lang.String) throws java.io.IOException;    } -  public abstract interface LayeredSocketFactory implements org.apache.http.conn.scheme.SocketFactory { +  public abstract deprecated interface LayeredSocketFactory implements org.apache.http.conn.scheme.SocketFactory {      method public abstract java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException, java.net.UnknownHostException;    } -  public final class PlainSocketFactory implements org.apache.http.conn.scheme.SocketFactory { +  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; @@ -55512,7 +55524,7 @@ package org.apache.http.conn.scheme {      method public final boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException;    } -  public final class Scheme { +  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(); @@ -55523,7 +55535,7 @@ package org.apache.http.conn.scheme {      method public final java.lang.String toString();    } -  public final class SchemeRegistry { +  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); @@ -55534,7 +55546,7 @@ package org.apache.http.conn.scheme {      method public final synchronized org.apache.http.conn.scheme.Scheme unregister(java.lang.String);    } -  public abstract interface SocketFactory { +  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;      method public abstract boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException; @@ -55544,7 +55556,7 @@ package org.apache.http.conn.scheme {  package org.apache.http.conn.ssl { -  public abstract class AbstractVerifier implements org.apache.http.conn.ssl.X509HostnameVerifier { +  public abstract deprecated class AbstractVerifier implements org.apache.http.conn.ssl.X509HostnameVerifier {      ctor public AbstractVerifier();      method public static boolean acceptableCountryWildcard(java.lang.String);      method public static int countDots(java.lang.String); @@ -55556,19 +55568,19 @@ package org.apache.http.conn.ssl {      method public final void verify(java.lang.String, java.lang.String[], java.lang.String[], boolean) throws javax.net.ssl.SSLException;    } -  public class AllowAllHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier { +  public deprecated class AllowAllHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {      ctor public AllowAllHostnameVerifier();      method public final java.lang.String toString();      method public final void verify(java.lang.String, java.lang.String[], java.lang.String[]);    } -  public class BrowserCompatHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier { +  public deprecated class BrowserCompatHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {      ctor public BrowserCompatHostnameVerifier();      method public final java.lang.String toString();      method public final void verify(java.lang.String, java.lang.String[], java.lang.String[]) throws javax.net.ssl.SSLException;    } -  public class SSLSocketFactory implements org.apache.http.conn.scheme.LayeredSocketFactory { +  public deprecated class SSLSocketFactory implements org.apache.http.conn.scheme.LayeredSocketFactory {      ctor public SSLSocketFactory(java.lang.String, java.security.KeyStore, java.lang.String, java.security.KeyStore, java.security.SecureRandom, org.apache.http.conn.scheme.HostNameResolver) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;      ctor public SSLSocketFactory(java.security.KeyStore, java.lang.String, java.security.KeyStore) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;      ctor public SSLSocketFactory(java.security.KeyStore, java.lang.String) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException; @@ -55588,13 +55600,13 @@ package org.apache.http.conn.ssl {      field public static final java.lang.String TLS = "TLS";    } -  public class StrictHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier { +  public deprecated class StrictHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {      ctor public StrictHostnameVerifier();      method public final java.lang.String toString();      method public final void verify(java.lang.String, java.lang.String[], java.lang.String[]) throws javax.net.ssl.SSLException;    } -  public abstract interface X509HostnameVerifier implements javax.net.ssl.HostnameVerifier { +  public abstract deprecated interface X509HostnameVerifier implements javax.net.ssl.HostnameVerifier {      method public abstract boolean verify(java.lang.String, javax.net.ssl.SSLSession);      method public abstract void verify(java.lang.String, javax.net.ssl.SSLSocket) throws java.io.IOException;      method public abstract void verify(java.lang.String, java.security.cert.X509Certificate) throws javax.net.ssl.SSLException; @@ -55605,7 +55617,7 @@ package org.apache.http.conn.ssl {  package org.apache.http.conn.util { -  public class InetAddressUtils { +  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); @@ -55616,7 +55628,7 @@ package org.apache.http.conn.util {  package org.apache.http.cookie { -  public abstract interface ClientCookie implements org.apache.http.cookie.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"; @@ -55631,7 +55643,7 @@ package org.apache.http.cookie {      field public static final java.lang.String VERSION_ATTR = "version";    } -  public abstract interface Cookie { +  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(); @@ -55646,18 +55658,18 @@ package org.apache.http.cookie {      method public abstract boolean isSecure();    } -  public abstract interface CookieAttributeHandler { +  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 class CookieIdentityComparator implements java.util.Comparator java.io.Serializable { +  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 class CookieOrigin { +  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(); @@ -55665,12 +55677,12 @@ package org.apache.http.cookie {      method public boolean isSecure();    } -  public class CookiePathComparator implements java.util.Comparator java.io.Serializable { +  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 interface CookieSpec { +  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(); @@ -55679,11 +55691,11 @@ package org.apache.http.cookie {      method public abstract void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException;    } -  public abstract interface CookieSpecFactory { +  public abstract deprecated interface CookieSpecFactory {      method public abstract org.apache.http.cookie.CookieSpec newInstance(org.apache.http.params.HttpParams);    } -  public final class CookieSpecRegistry { +  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; @@ -55693,20 +55705,20 @@ package org.apache.http.cookie {      method public synchronized void unregister(java.lang.String);    } -  public class MalformedCookieException extends org.apache.http.ProtocolException { +  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 interface SM { +  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 interface SetCookie implements org.apache.http.cookie.Cookie { +  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); @@ -55716,7 +55728,7 @@ package org.apache.http.cookie {      method public abstract void setVersion(int);    } -  public abstract interface SetCookie2 implements org.apache.http.cookie.SetCookie { +  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[]); @@ -55726,12 +55738,12 @@ package org.apache.http.cookie {  package org.apache.http.cookie.params { -  public abstract interface CookieSpecPNames { +  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 class CookieSpecParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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); @@ -55741,7 +55753,7 @@ package org.apache.http.cookie.params {  package org.apache.http.entity { -  public abstract class AbstractHttpEntity implements org.apache.http.HttpEntity { +  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(); @@ -55757,7 +55769,7 @@ package org.apache.http.entity {      field protected org.apache.http.Header contentType;    } -  public class BasicHttpEntity extends org.apache.http.entity.AbstractHttpEntity { +  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(); @@ -55768,11 +55780,11 @@ package org.apache.http.entity {      method public void writeTo(java.io.OutputStream) throws java.io.IOException;    } -  public class BufferedHttpEntity extends org.apache.http.entity.HttpEntityWrapper { +  public deprecated class BufferedHttpEntity extends org.apache.http.entity.HttpEntityWrapper {      ctor public BufferedHttpEntity(org.apache.http.HttpEntity) throws java.io.IOException;    } -  public class ByteArrayEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { +  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(); @@ -55783,17 +55795,17 @@ package org.apache.http.entity {      field protected final byte[] content;    } -  public abstract interface ContentLengthStrategy { +  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 interface ContentProducer { +  public abstract deprecated interface ContentProducer {      method public abstract void writeTo(java.io.OutputStream) throws java.io.IOException;    } -  public class EntityTemplate extends org.apache.http.entity.AbstractHttpEntity { +  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(); @@ -55802,7 +55814,7 @@ package org.apache.http.entity {      method public void writeTo(java.io.OutputStream) throws java.io.IOException;    } -  public class FileEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { +  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; @@ -55813,7 +55825,7 @@ package org.apache.http.entity {      field protected final java.io.File file;    } -  public class HttpEntityWrapper implements org.apache.http.HttpEntity { +  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; @@ -55827,7 +55839,7 @@ package org.apache.http.entity {      field protected org.apache.http.HttpEntity wrappedEntity;    } -  public class InputStreamEntity extends org.apache.http.entity.AbstractHttpEntity { +  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(); @@ -55836,7 +55848,7 @@ package org.apache.http.entity {      method public void writeTo(java.io.OutputStream) throws java.io.IOException;    } -  public class SerializableEntity extends org.apache.http.entity.AbstractHttpEntity { +  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(); @@ -55845,7 +55857,7 @@ package org.apache.http.entity {      method public void writeTo(java.io.OutputStream) throws java.io.IOException;    } -  public class StringEntity extends org.apache.http.entity.AbstractHttpEntity implements java.lang.Cloneable { +  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; @@ -55861,7 +55873,7 @@ package org.apache.http.entity {  package org.apache.http.impl { -  public abstract class AbstractHttpClientConnection implements org.apache.http.HttpClientConnection { +  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(); @@ -55881,7 +55893,7 @@ package org.apache.http.impl {      method public void sendRequestHeader(org.apache.http.HttpRequest) throws org.apache.http.HttpException, java.io.IOException;    } -  public abstract class AbstractHttpServerConnection implements org.apache.http.HttpServerConnection { +  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(); @@ -55900,24 +55912,24 @@ package org.apache.http.impl {      method public void sendResponseHeader(org.apache.http.HttpResponse) throws org.apache.http.HttpException, java.io.IOException;    } -  public class DefaultConnectionReuseStrategy implements org.apache.http.ConnectionReuseStrategy { +  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 class DefaultHttpClientConnection extends org.apache.http.impl.SocketHttpClientConnection { +  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 class DefaultHttpRequestFactory implements org.apache.http.HttpRequestFactory { +  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 class DefaultHttpResponseFactory implements org.apache.http.HttpResponseFactory { +  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); @@ -55926,18 +55938,18 @@ package org.apache.http.impl {      field protected final org.apache.http.ReasonPhraseCatalog reasonCatalog;    } -  public class DefaultHttpServerConnection extends org.apache.http.impl.SocketHttpServerConnection { +  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 class EnglishReasonPhraseCatalog implements org.apache.http.ReasonPhraseCatalog { +  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 class HttpConnectionMetricsImpl implements org.apache.http.HttpConnectionMetrics { +  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(); @@ -55954,12 +55966,12 @@ package org.apache.http.impl {      field public static final java.lang.String SENT_BYTES_COUNT = "http.sent-bytes-count";    } -  public class NoConnectionReuseStrategy implements org.apache.http.ConnectionReuseStrategy { +  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 class SocketHttpClientConnection extends org.apache.http.impl.AbstractHttpClientConnection implements org.apache.http.HttpInetConnection { +  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(); @@ -55978,7 +55990,7 @@ package org.apache.http.impl {      method public void shutdown() throws java.io.IOException;    } -  public class SocketHttpServerConnection extends org.apache.http.impl.AbstractHttpServerConnection implements org.apache.http.HttpInetConnection { +  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(); @@ -56001,14 +56013,14 @@ package org.apache.http.impl {  package org.apache.http.impl.auth { -  public abstract class AuthSchemeBase implements org.apache.http.auth.AuthScheme { +  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 class BasicScheme extends org.apache.http.impl.auth.RFC2617Scheme { +  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); @@ -56017,12 +56029,12 @@ package org.apache.http.impl.auth {      method public boolean isConnectionBased();    } -  public class BasicSchemeFactory implements org.apache.http.auth.AuthSchemeFactory { +  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 class DigestScheme extends org.apache.http.impl.auth.RFC2617Scheme { +  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(); @@ -56032,23 +56044,23 @@ package org.apache.http.impl.auth {      method public void overrideParamter(java.lang.String, java.lang.String);    } -  public class DigestSchemeFactory implements org.apache.http.auth.AuthSchemeFactory { +  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 interface NTLMEngine { +  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 class NTLMEngineException extends org.apache.http.auth.AuthenticationException { +  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 class NTLMScheme extends org.apache.http.impl.auth.AuthSchemeBase { +  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); @@ -56059,7 +56071,7 @@ package org.apache.http.impl.auth {      method protected void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException;    } -  public abstract class RFC2617Scheme extends org.apache.http.impl.auth.AuthSchemeBase { +  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(); @@ -56067,7 +56079,7 @@ package org.apache.http.impl.auth {      method protected void parseChallenge(org.apache.http.util.CharArrayBuffer, int, int) throws org.apache.http.auth.MalformedChallengeException;    } -  public class UnsupportedDigestAlgorithmException extends java.lang.RuntimeException { +  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); @@ -56077,14 +56089,14 @@ package org.apache.http.impl.auth {  package org.apache.http.impl.client { -  public abstract class AbstractAuthenticationHandler implements org.apache.http.client.AuthenticationHandler { +  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 class AbstractHttpClient implements org.apache.http.client.HttpClient { +  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); @@ -56156,7 +56168,7 @@ package org.apache.http.impl.client {      method public synchronized void setUserTokenHandler(org.apache.http.client.UserTokenHandler);    } -  public class BasicCookieStore implements org.apache.http.client.CookieStore { +  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[]); @@ -56165,19 +56177,19 @@ package org.apache.http.impl.client {      method public synchronized java.util.List<org.apache.http.cookie.Cookie> getCookies();    } -  public class BasicCredentialsProvider implements org.apache.http.client.CredentialsProvider { +  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 class BasicResponseHandler implements org.apache.http.client.ResponseHandler { +  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 class ClientParamsStack extends org.apache.http.params.AbstractHttpParams { +  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); @@ -56195,12 +56207,12 @@ package org.apache.http.impl.client {      field protected final org.apache.http.params.HttpParams requestParams;    } -  public class DefaultConnectionKeepAliveStrategy implements org.apache.http.conn.ConnectionKeepAliveStrategy { +  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 class DefaultHttpClient extends org.apache.http.impl.client.AbstractHttpClient { +  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(); @@ -56223,7 +56235,7 @@ package org.apache.http.impl.client {      method protected org.apache.http.client.UserTokenHandler createUserTokenHandler();    } -  public class DefaultHttpRequestRetryHandler implements org.apache.http.client.HttpRequestRetryHandler { +  public deprecated class DefaultHttpRequestRetryHandler implements org.apache.http.client.HttpRequestRetryHandler {      ctor public DefaultHttpRequestRetryHandler(int, boolean);      ctor public DefaultHttpRequestRetryHandler();      method public int getRetryCount(); @@ -56231,19 +56243,19 @@ package org.apache.http.impl.client {      method public boolean retryRequest(java.io.IOException, int, org.apache.http.protocol.HttpContext);    } -  public class DefaultProxyAuthenticationHandler extends org.apache.http.impl.client.AbstractAuthenticationHandler { +  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 class DefaultRedirectHandler implements org.apache.http.client.RedirectHandler { +  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 class DefaultRequestDirector implements org.apache.http.client.RequestDirector { +  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; @@ -56266,32 +56278,32 @@ package org.apache.http.impl.client {      field protected final org.apache.http.conn.routing.HttpRoutePlanner routePlanner;    } -  public class DefaultTargetAuthenticationHandler extends org.apache.http.impl.client.AbstractAuthenticationHandler { +  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 class DefaultUserTokenHandler implements org.apache.http.client.UserTokenHandler { +  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 class EntityEnclosingRequestWrapper extends org.apache.http.impl.client.RequestWrapper implements org.apache.http.HttpEntityEnclosingRequest { +  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 class RedirectLocations { +  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 class RequestWrapper extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.client.methods.HttpUriRequest { +  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(); @@ -56309,7 +56321,7 @@ package org.apache.http.impl.client {      method public void setURI(java.net.URI);    } -  public class RoutedRequest { +  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(); @@ -56317,7 +56329,7 @@ package org.apache.http.impl.client {      field protected final org.apache.http.conn.routing.HttpRoute route;    } -  public class TunnelRefusedException extends org.apache.http.HttpException { +  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();    } @@ -56326,7 +56338,7 @@ package org.apache.http.impl.client {  package org.apache.http.impl.conn { -  public abstract class AbstractClientConnAdapter implements org.apache.http.conn.ManagedClientConnection { +  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; @@ -56358,7 +56370,7 @@ package org.apache.http.impl.conn {      method public void unmarkReusable();    } -  public abstract class AbstractPoolEntry { +  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; @@ -56374,7 +56386,7 @@ package org.apache.http.impl.conn {      field protected volatile org.apache.http.conn.routing.RouteTracker tracker;    } -  public abstract class AbstractPooledConnAdapter extends org.apache.http.impl.conn.AbstractClientConnAdapter { +  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; @@ -56389,7 +56401,7 @@ package org.apache.http.impl.conn {      field protected volatile org.apache.http.impl.conn.AbstractPoolEntry poolEntry;    } -  public class DefaultClientConnection extends org.apache.http.impl.SocketHttpClientConnection implements org.apache.http.conn.OperatedClientConnection { +  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(); @@ -56399,7 +56411,7 @@ package org.apache.http.impl.conn {      method public void update(java.net.Socket, org.apache.http.HttpHost, boolean, org.apache.http.params.HttpParams) throws java.io.IOException;    } -  public class DefaultClientConnectionOperator implements org.apache.http.conn.ClientConnectionOperator { +  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; @@ -56408,18 +56420,18 @@ package org.apache.http.impl.conn {      field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry;    } -  public class DefaultHttpRoutePlanner implements org.apache.http.conn.routing.HttpRoutePlanner { +  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 class DefaultResponseParser extends org.apache.http.impl.io.AbstractMessageParser { +  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 class IdleConnectionHandler { +  public deprecated class IdleConnectionHandler {      ctor public IdleConnectionHandler();      method public void add(org.apache.http.HttpConnection, long, java.util.concurrent.TimeUnit);      method public void closeExpiredConnections(); @@ -56428,7 +56440,7 @@ package org.apache.http.impl.conn {      method public void removeAll();    } -  public class LoggingSessionInputBuffer implements org.apache.http.io.SessionInputBuffer { +  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; @@ -56439,7 +56451,7 @@ package org.apache.http.impl.conn {      method public int readLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException;    } -  public class LoggingSessionOutputBuffer implements org.apache.http.io.SessionOutputBuffer { +  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(); @@ -56450,7 +56462,7 @@ package org.apache.http.impl.conn {      method public void writeLine(java.lang.String) throws java.io.IOException;    } -  public class ProxySelectorRoutePlanner implements org.apache.http.conn.routing.HttpRoutePlanner { +  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; @@ -56462,7 +56474,7 @@ package org.apache.http.impl.conn {      field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry;    } -  public class SingleClientConnManager implements org.apache.http.conn.ClientConnectionManager { +  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(); @@ -56495,7 +56507,7 @@ package org.apache.http.impl.conn {      method protected void shutdown() throws java.io.IOException;    } -  public class Wire { +  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; @@ -56514,7 +56526,7 @@ package org.apache.http.impl.conn {  package org.apache.http.impl.conn.tsccm { -  public abstract class AbstractConnPool implements org.apache.http.impl.conn.tsccm.RefQueueHandler { +  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(); @@ -56535,24 +56547,24 @@ package org.apache.http.impl.conn.tsccm {      field protected java.lang.ref.ReferenceQueue refQueue;    } -  public class BasicPoolEntry extends org.apache.http.impl.conn.AbstractPoolEntry { +  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 class BasicPoolEntryRef extends java.lang.ref.WeakReference { +  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 class BasicPooledConnAdapter extends org.apache.http.impl.conn.AbstractPooledConnAdapter { +  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 class ConnPoolByRoute extends org.apache.http.impl.conn.tsccm.AbstractConnPool { +  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(); @@ -56578,16 +56590,16 @@ package org.apache.http.impl.conn.tsccm {      field protected java.util.Queue waitingThreads;    } -  public abstract interface PoolEntryRequest { +  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 interface RefQueueHandler { +  public abstract deprecated interface RefQueueHandler {      method public abstract void handleReference(java.lang.ref.Reference<?>);    } -  public class RefQueueWorker implements java.lang.Runnable { +  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(); @@ -56596,7 +56608,7 @@ package org.apache.http.impl.conn.tsccm {      field protected volatile java.lang.Thread workerThread;    } -  public class RouteSpecificPool { +  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); @@ -56619,7 +56631,7 @@ package org.apache.http.impl.conn.tsccm {      field protected final java.util.Queue waitingThreads;    } -  public class ThreadSafeClientConnManager implements org.apache.http.conn.ClientConnectionManager { +  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); @@ -56636,7 +56648,7 @@ package org.apache.http.impl.conn.tsccm {      field protected org.apache.http.conn.scheme.SchemeRegistry schemeRegistry;    } -  public class WaitingThread { +  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(); @@ -56646,7 +56658,7 @@ package org.apache.http.impl.conn.tsccm {      method public void wakeup();    } -  public class WaitingThreadAborter { +  public deprecated class WaitingThreadAborter {      ctor public WaitingThreadAborter();      method public void abort();      method public void setWaitingThread(org.apache.http.impl.conn.tsccm.WaitingThread); @@ -56656,13 +56668,13 @@ package org.apache.http.impl.conn.tsccm {  package org.apache.http.impl.cookie { -  public abstract class AbstractCookieAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class AbstractCookieSpec implements org.apache.http.cookie.CookieSpec { +  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); @@ -56670,7 +56682,7 @@ package org.apache.http.impl.cookie {      method public void registerAttribHandler(java.lang.String, org.apache.http.cookie.CookieAttributeHandler);    } -  public class BasicClientCookie implements org.apache.http.cookie.ClientCookie java.lang.Cloneable org.apache.http.cookie.SetCookie { +  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); @@ -56697,48 +56709,48 @@ package org.apache.http.impl.cookie {      method public void setVersion(int);    } -  public class BasicClientCookie2 extends org.apache.http.impl.cookie.BasicClientCookie implements org.apache.http.cookie.SetCookie2 { +  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 class BasicCommentHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { +  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 class BasicDomainHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class BasicExpiresHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { +  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 class BasicMaxAgeHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { +  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 class BasicPathHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class BasicSecureHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { +  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 class BestMatchSpec implements org.apache.http.cookie.CookieSpec { +  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>); @@ -56749,12 +56761,12 @@ package org.apache.http.impl.cookie {      method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException;    } -  public class BestMatchSpecFactory implements org.apache.http.cookie.CookieSpecFactory { +  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 class BrowserCompatSpec extends org.apache.http.impl.cookie.CookieSpecBase { +  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>); @@ -56764,12 +56776,12 @@ package org.apache.http.impl.cookie {      field protected static final java.lang.String[] DATE_PATTERNS;    } -  public class BrowserCompatSpecFactory implements org.apache.http.cookie.CookieSpecFactory { +  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 class CookieSpecBase extends org.apache.http.impl.cookie.AbstractCookieSpec { +  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); @@ -56778,12 +56790,12 @@ package org.apache.http.impl.cookie {      method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException;    } -  public class DateParseException extends java.lang.Exception { +  public deprecated class DateParseException extends java.lang.Exception {      ctor public DateParseException();      ctor public DateParseException(java.lang.String);    } -  public final class DateUtils { +  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; @@ -56795,17 +56807,17 @@ package org.apache.http.impl.cookie {      field public static final java.lang.String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz";    } -  public class NetscapeDomainHandler extends org.apache.http.impl.cookie.BasicDomainHandler { +  public deprecated class NetscapeDomainHandler extends org.apache.http.impl.cookie.BasicDomainHandler {      ctor public NetscapeDomainHandler();    } -  public class NetscapeDraftHeaderParser { +  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 class NetscapeDraftSpec extends org.apache.http.impl.cookie.CookieSpecBase { +  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>); @@ -56815,19 +56827,19 @@ package org.apache.http.impl.cookie {      field protected static final java.lang.String EXPIRES_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z";    } -  public class NetscapeDraftSpecFactory implements org.apache.http.cookie.CookieSpecFactory { +  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 class RFC2109DomainHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class RFC2109Spec extends org.apache.http.impl.cookie.CookieSpecBase { +  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); @@ -56838,31 +56850,31 @@ package org.apache.http.impl.cookie {      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 class RFC2109SpecFactory implements org.apache.http.cookie.CookieSpecFactory { +  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 class RFC2109VersionHandler extends org.apache.http.impl.cookie.AbstractCookieAttributeHandler { +  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 class RFC2965CommentUrlAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class RFC2965DiscardAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class RFC2965DomainAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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); @@ -56870,24 +56882,24 @@ package org.apache.http.impl.cookie {      method public void validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin) throws org.apache.http.cookie.MalformedCookieException;    } -  public class RFC2965PortAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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 class RFC2965Spec extends org.apache.http.impl.cookie.RFC2109Spec { +  public deprecated class RFC2965Spec extends org.apache.http.impl.cookie.RFC2109Spec {      ctor public RFC2965Spec();      ctor public RFC2965Spec(java.lang.String[], boolean);    } -  public class RFC2965SpecFactory implements org.apache.http.cookie.CookieSpecFactory { +  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 class RFC2965VersionAttributeHandler implements org.apache.http.cookie.CookieAttributeHandler { +  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; @@ -56898,24 +56910,24 @@ package org.apache.http.impl.cookie {  package org.apache.http.impl.entity { -  public class EntityDeserializer { +  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 class EntitySerializer { +  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 class LaxContentLengthStrategy implements org.apache.http.entity.ContentLengthStrategy { +  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 class StrictContentLengthStrategy implements org.apache.http.entity.ContentLengthStrategy { +  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;    } @@ -56924,7 +56936,7 @@ package org.apache.http.impl.entity {  package org.apache.http.impl.io { -  public abstract class AbstractMessageParser implements org.apache.http.io.HttpMessageParser { +  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; @@ -56932,7 +56944,7 @@ package org.apache.http.impl.io {      field protected final org.apache.http.message.LineParser lineParser;    } -  public abstract class AbstractMessageWriter implements org.apache.http.io.HttpMessageWriter { +  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; @@ -56941,7 +56953,7 @@ package org.apache.http.impl.io {      field protected final org.apache.http.io.SessionOutputBuffer sessionBuffer;    } -  public abstract class AbstractSessionInputBuffer implements org.apache.http.io.SessionInputBuffer { +  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(); @@ -56954,7 +56966,7 @@ package org.apache.http.impl.io {      method public java.lang.String readLine() throws java.io.IOException;    } -  public abstract class AbstractSessionOutputBuffer implements org.apache.http.io.SessionOutputBuffer { +  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; @@ -56967,13 +56979,13 @@ package org.apache.http.impl.io {      method public void writeLine(org.apache.http.util.CharArrayBuffer) throws java.io.IOException;    } -  public class ChunkedInputStream extends java.io.InputStream { +  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 class ChunkedOutputStream extends java.io.OutputStream { +  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; @@ -56983,37 +56995,37 @@ package org.apache.http.impl.io {      method protected void writeClosingChunk() throws java.io.IOException;    } -  public class ContentLengthInputStream extends java.io.InputStream { +  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 class ContentLengthOutputStream extends java.io.OutputStream { +  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 class HttpRequestParser extends org.apache.http.impl.io.AbstractMessageParser { +  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 class HttpRequestWriter extends org.apache.http.impl.io.AbstractMessageWriter { +  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 class HttpResponseParser extends org.apache.http.impl.io.AbstractMessageParser { +  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 class HttpResponseWriter extends org.apache.http.impl.io.AbstractMessageWriter { +  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 class HttpTransportMetricsImpl implements org.apache.http.io.HttpTransportMetrics { +  public deprecated class HttpTransportMetricsImpl implements org.apache.http.io.HttpTransportMetrics {      ctor public HttpTransportMetricsImpl();      method public long getBytesTransferred();      method public void incrementBytesTransferred(long); @@ -57021,22 +57033,22 @@ package org.apache.http.impl.io {      method public void setBytesTransferred(long);    } -  public class IdentityInputStream extends java.io.InputStream { +  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 class IdentityOutputStream extends java.io.OutputStream { +  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 class SocketInputBuffer extends org.apache.http.impl.io.AbstractSessionInputBuffer { +  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 class SocketOutputBuffer extends org.apache.http.impl.io.AbstractSessionOutputBuffer { +  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;    } @@ -57044,20 +57056,20 @@ package org.apache.http.impl.io {  package org.apache.http.io { -  public abstract interface HttpMessageParser { +  public abstract deprecated interface HttpMessageParser {      method public abstract org.apache.http.HttpMessage parse() throws org.apache.http.HttpException, java.io.IOException;    } -  public abstract interface HttpMessageWriter { +  public abstract deprecated interface HttpMessageWriter {      method public abstract void write(org.apache.http.HttpMessage) throws org.apache.http.HttpException, java.io.IOException;    } -  public abstract interface HttpTransportMetrics { +  public abstract deprecated interface HttpTransportMetrics {      method public abstract long getBytesTransferred();      method public abstract void reset();    } -  public abstract interface SessionInputBuffer { +  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; @@ -57067,7 +57079,7 @@ package org.apache.http.io {      method public abstract java.lang.String readLine() throws java.io.IOException;    } -  public abstract interface SessionOutputBuffer { +  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; @@ -57081,7 +57093,7 @@ package org.apache.http.io {  package org.apache.http.message { -  public abstract class AbstractHttpMessage implements org.apache.http.HttpMessage { +  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); @@ -57104,7 +57116,7 @@ package org.apache.http.message {      field protected org.apache.http.params.HttpParams params;    } -  public class BasicHeader implements java.lang.Cloneable org.apache.http.Header { +  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; @@ -57112,7 +57124,7 @@ package org.apache.http.message {      method public java.lang.String getValue();    } -  public class BasicHeaderElement implements java.lang.Cloneable org.apache.http.HeaderElement { +  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; @@ -57124,7 +57136,7 @@ package org.apache.http.message {      method public java.lang.String getValue();    } -  public class BasicHeaderElementIterator implements org.apache.http.HeaderElementIterator { +  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(); @@ -57133,7 +57145,7 @@ package org.apache.http.message {      method public void remove() throws java.lang.UnsupportedOperationException;    } -  public class BasicHeaderIterator implements org.apache.http.HeaderIterator { +  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); @@ -57146,7 +57158,7 @@ package org.apache.http.message {      field protected java.lang.String headerName;    } -  public class BasicHeaderValueFormatter implements org.apache.http.message.HeaderValueFormatter { +  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[]); @@ -57168,7 +57180,7 @@ package org.apache.http.message {      field public static final java.lang.String UNSAFE_CHARS = "\"\\";    } -  public class BasicHeaderValueParser implements org.apache.http.message.HeaderValueParser { +  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); @@ -57184,7 +57196,7 @@ package org.apache.http.message {      field public static final org.apache.http.message.BasicHeaderValueParser DEFAULT;    } -  public class BasicHttpEntityEnclosingRequest extends org.apache.http.message.BasicHttpRequest implements org.apache.http.HttpEntityEnclosingRequest { +  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); @@ -57193,7 +57205,7 @@ package org.apache.http.message {      method public void setEntity(org.apache.http.HttpEntity);    } -  public class BasicHttpRequest extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.HttpRequest { +  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); @@ -57201,7 +57213,7 @@ package org.apache.http.message {      method public org.apache.http.RequestLine getRequestLine();    } -  public class BasicHttpResponse extends org.apache.http.message.AbstractHttpMessage implements org.apache.http.HttpResponse { +  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); @@ -57219,7 +57231,7 @@ package org.apache.http.message {      method public void setStatusLine(org.apache.http.ProtocolVersion, int, java.lang.String);    } -  public class BasicLineFormatter implements org.apache.http.message.LineFormatter { +  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); @@ -57237,7 +57249,7 @@ package org.apache.http.message {      field public static final org.apache.http.message.BasicLineFormatter DEFAULT;    } -  public class BasicLineParser implements org.apache.http.message.LineParser { +  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); @@ -57257,7 +57269,7 @@ package org.apache.http.message {      field protected final org.apache.http.ProtocolVersion protocol;    } -  public class BasicListHeaderIterator implements org.apache.http.HeaderIterator { +  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); @@ -57271,14 +57283,14 @@ package org.apache.http.message {      field protected int lastIndex;    } -  public class BasicNameValuePair implements java.lang.Cloneable org.apache.http.NameValuePair { +  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 class BasicRequestLine implements java.lang.Cloneable org.apache.http.RequestLine { +  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(); @@ -57286,7 +57298,7 @@ package org.apache.http.message {      method public java.lang.String getUri();    } -  public class BasicStatusLine implements java.lang.Cloneable org.apache.http.StatusLine { +  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(); @@ -57294,7 +57306,7 @@ package org.apache.http.message {      method public int getStatusCode();    } -  public class BasicTokenIterator implements org.apache.http.TokenIterator { +  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; @@ -57316,7 +57328,7 @@ package org.apache.http.message {      field protected int searchPos;    } -  public class BufferedHeader implements java.lang.Cloneable org.apache.http.FormattedHeader { +  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(); @@ -57326,7 +57338,7 @@ package org.apache.http.message {      method public int getValuePos();    } -  public class HeaderGroup implements java.lang.Cloneable { +  public deprecated class HeaderGroup implements java.lang.Cloneable {      ctor public HeaderGroup();      method public void addHeader(org.apache.http.Header);      method public void clear(); @@ -57345,28 +57357,28 @@ package org.apache.http.message {      method public void updateHeader(org.apache.http.Header);    } -  public abstract interface HeaderValueFormatter { +  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 interface HeaderValueParser { +  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 interface LineFormatter { +  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 interface LineParser { +  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; @@ -57374,7 +57386,7 @@ package org.apache.http.message {      method public abstract org.apache.http.StatusLine parseStatusLine(org.apache.http.util.CharArrayBuffer, org.apache.http.message.ParserCursor) throws org.apache.http.ParseException;    } -  public class ParserCursor { +  public deprecated class ParserCursor {      ctor public ParserCursor(int, int);      method public boolean atEnd();      method public int getLowerBound(); @@ -57387,7 +57399,7 @@ package org.apache.http.message {  package org.apache.http.params { -  public abstract class AbstractHttpParams implements org.apache.http.params.HttpParams { +  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); @@ -57401,7 +57413,7 @@ package org.apache.http.params {      method public org.apache.http.params.HttpParams setLongParameter(java.lang.String, long);    } -  public final class BasicHttpParams extends org.apache.http.params.AbstractHttpParams implements java.lang.Cloneable java.io.Serializable { +  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; @@ -57415,7 +57427,7 @@ package org.apache.http.params {      method public void setParameters(java.lang.String[], java.lang.Object);    } -  public abstract interface CoreConnectionPNames { +  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";      field public static final java.lang.String MAX_LINE_LENGTH = "http.connection.max-line-length"; @@ -57426,7 +57438,7 @@ package org.apache.http.params {      field public static final java.lang.String TCP_NODELAY = "http.tcp.nodelay";    } -  public abstract interface CoreProtocolPNames { +  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"; @@ -57437,7 +57449,7 @@ package org.apache.http.params {      field public static final java.lang.String WAIT_FOR_CONTINUE = "http.protocol.wait-for-continue";    } -  public final class DefaultedHttpParams extends org.apache.http.params.AbstractHttpParams { +  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(); @@ -57446,12 +57458,12 @@ package org.apache.http.params {      method public org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object);    } -  public abstract class HttpAbstractParamBean { +  public abstract deprecated class HttpAbstractParamBean {      ctor public HttpAbstractParamBean(org.apache.http.params.HttpParams);      field protected final org.apache.http.params.HttpParams params;    } -  public class HttpConnectionParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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); @@ -57461,7 +57473,7 @@ package org.apache.http.params {      method public void setTcpNoDelay(boolean);    } -  public final class HttpConnectionParams implements org.apache.http.params.CoreConnectionPNames { +  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);      method public static int getSoTimeout(org.apache.http.params.HttpParams); @@ -57476,7 +57488,7 @@ package org.apache.http.params {      method public static void setTcpNoDelay(org.apache.http.params.HttpParams, boolean);    } -  public abstract interface HttpParams { +  public abstract deprecated interface HttpParams {      method public abstract org.apache.http.params.HttpParams copy();      method public abstract boolean getBooleanParameter(java.lang.String, boolean);      method public abstract double getDoubleParameter(java.lang.String, double); @@ -57493,7 +57505,7 @@ package org.apache.http.params {      method public abstract org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object);    } -  public class HttpProtocolParamBean extends org.apache.http.params.HttpAbstractParamBean { +  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); @@ -57502,7 +57514,7 @@ package org.apache.http.params {      method public void setVersion(org.apache.http.HttpVersion);    } -  public final class HttpProtocolParams implements org.apache.http.params.CoreProtocolPNames { +  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); @@ -57519,7 +57531,7 @@ package org.apache.http.params {  package org.apache.http.protocol { -  public class BasicHttpContext implements org.apache.http.protocol.HttpContext { +  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); @@ -57527,7 +57539,7 @@ package org.apache.http.protocol {      method public void setAttribute(java.lang.String, java.lang.Object);    } -  public final class BasicHttpProcessor implements java.lang.Cloneable org.apache.http.protocol.HttpProcessor org.apache.http.protocol.HttpRequestInterceptorList org.apache.http.protocol.HttpResponseInterceptorList { +  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); @@ -57556,7 +57568,7 @@ package org.apache.http.protocol {      field protected java.util.List responseInterceptors;    } -  public final class DefaultedHttpContext implements org.apache.http.protocol.HttpContext { +  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(); @@ -57564,7 +57576,7 @@ package org.apache.http.protocol {      method public void setAttribute(java.lang.String, java.lang.Object);    } -  public abstract interface ExecutionContext { +  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"; @@ -57573,7 +57585,7 @@ package org.apache.http.protocol {      field public static final java.lang.String HTTP_TARGET_HOST = "http.target_host";    } -  public final class HTTP { +  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="; @@ -57607,28 +57619,28 @@ package org.apache.http.protocol {      field public static final java.lang.String UTF_8 = "UTF-8";    } -  public abstract interface HttpContext { +  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 class HttpDateGenerator { +  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 interface HttpExpectationVerifier { +  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 interface HttpProcessor implements org.apache.http.HttpRequestInterceptor org.apache.http.HttpResponseInterceptor { +  public abstract deprecated interface HttpProcessor implements org.apache.http.HttpRequestInterceptor org.apache.http.HttpResponseInterceptor {    } -  public class HttpRequestExecutor { +  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; @@ -57638,11 +57650,11 @@ package org.apache.http.protocol {      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 interface HttpRequestHandler { +  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 class HttpRequestHandlerRegistry implements org.apache.http.protocol.HttpRequestHandlerResolver { +  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); @@ -57651,11 +57663,11 @@ package org.apache.http.protocol {      method public void unregister(java.lang.String);    } -  public abstract interface HttpRequestHandlerResolver { +  public abstract deprecated interface HttpRequestHandlerResolver {      method public abstract org.apache.http.protocol.HttpRequestHandler lookup(java.lang.String);    } -  public abstract interface HttpRequestInterceptorList { +  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(); @@ -57665,7 +57677,7 @@ package org.apache.http.protocol {      method public abstract void setInterceptors(java.util.List);    } -  public abstract interface HttpResponseInterceptorList { +  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(); @@ -57675,7 +57687,7 @@ package org.apache.http.protocol {      method public abstract void setInterceptors(java.util.List);    } -  public class HttpService { +  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(); @@ -57689,61 +57701,61 @@ package org.apache.http.protocol {      method public void setResponseFactory(org.apache.http.HttpResponseFactory);    } -  public class RequestConnControl implements org.apache.http.HttpRequestInterceptor { +  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 class RequestContent implements org.apache.http.HttpRequestInterceptor { +  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 class RequestDate implements org.apache.http.HttpRequestInterceptor { +  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 class RequestExpectContinue implements org.apache.http.HttpRequestInterceptor { +  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 class RequestTargetHost implements org.apache.http.HttpRequestInterceptor { +  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 class RequestUserAgent implements org.apache.http.HttpRequestInterceptor { +  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 class ResponseConnControl implements org.apache.http.HttpResponseInterceptor { +  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 class ResponseContent implements org.apache.http.HttpResponseInterceptor { +  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 class ResponseDate implements org.apache.http.HttpResponseInterceptor { +  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 class ResponseServer implements org.apache.http.HttpResponseInterceptor { +  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 class SyncBasicHttpContext extends org.apache.http.protocol.BasicHttpContext { +  public deprecated class SyncBasicHttpContext extends org.apache.http.protocol.BasicHttpContext {      ctor public SyncBasicHttpContext(org.apache.http.protocol.HttpContext);    } -  public class UriPatternMatcher { +  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); @@ -57756,7 +57768,7 @@ package org.apache.http.protocol {  package org.apache.http.util { -  public final class ByteArrayBuffer { +  public final deprecated class ByteArrayBuffer {      ctor public ByteArrayBuffer(int);      method public void append(byte[], int, int);      method public void append(int); @@ -57773,7 +57785,7 @@ package org.apache.http.util {      method public byte[] toByteArray();    } -  public final class CharArrayBuffer { +  public final deprecated class CharArrayBuffer {      ctor public CharArrayBuffer(int);      method public void append(char[], int, int);      method public void append(java.lang.String); @@ -57799,7 +57811,7 @@ package org.apache.http.util {      method public char[] toCharArray();    } -  public final class EncodingUtils { +  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[]); @@ -57808,18 +57820,18 @@ package org.apache.http.util {      method public static java.lang.String getString(byte[], java.lang.String);    } -  public final class EntityUtils { +  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 class ExceptionUtils { +  public final deprecated class ExceptionUtils {      method public static void initCause(java.lang.Throwable, java.lang.Throwable);    } -  public final class LangUtils { +  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); @@ -57829,7 +57841,7 @@ package org.apache.http.util {      field public static final int HASH_SEED = 17; // 0x11    } -  public class VersionInfo { +  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(); diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java index 13ceb4adfcdd..1e1b33f67496 100644 --- a/core/java/android/accessibilityservice/AccessibilityService.java +++ b/core/java/android/accessibilityservice/AccessibilityService.java @@ -24,13 +24,18 @@ import android.os.Looper;  import android.os.Message;  import android.os.RemoteException;  import android.util.Log; +import android.view.Display;  import android.view.KeyEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.WindowManager;  import android.view.accessibility.AccessibilityEvent;  import android.view.accessibility.AccessibilityInteractionClient;  import android.view.accessibility.AccessibilityNodeInfo;  import android.view.accessibility.AccessibilityWindowInfo;  import com.android.internal.os.HandlerCaller; +import com.android.internal.os.SomeArgs;  import java.util.List; @@ -366,7 +371,7 @@ public abstract class AccessibilityService extends Service {          public void onAccessibilityEvent(AccessibilityEvent event);          public void onInterrupt();          public void onServiceConnected(); -        public void onSetConnectionId(int connectionId); +        public void init(int connectionId, IBinder windowToken);          public boolean onGesture(int gestureId);          public boolean onKeyEvent(KeyEvent event);      } @@ -375,6 +380,10 @@ public abstract class AccessibilityService extends Service {      private AccessibilityServiceInfo mInfo; +    private IBinder mWindowToken; + +    private WindowManager mWindowManager; +      /**       * Callback for {@link android.view.accessibility.AccessibilityEvent}s.       * @@ -611,6 +620,18 @@ public abstract class AccessibilityService extends Service {          }      } +    @Override +    public Object getSystemService(String name) { +        if (Context.WINDOW_SERVICE.equals(name)) { +            if (mWindowManager == null) { +                WindowManager wrapped = (WindowManager) super.getSystemService(name); +                mWindowManager = new LocalWindowManager(wrapped); +            } +            return mWindowManager; +        } +        return super.getSystemService(name); +    } +      /**       * Implement to return the implementation of the internal accessibility       * service interface. @@ -634,8 +655,9 @@ public abstract class AccessibilityService extends Service {              }              @Override -            public void onSetConnectionId( int connectionId) { +            public void init(int connectionId, IBinder windowToken) {                  mConnectionId = connectionId; +                mWindowToken = windowToken;              }              @Override @@ -658,7 +680,7 @@ public abstract class AccessibilityService extends Service {       */      public static class IAccessibilityServiceClientWrapper extends IAccessibilityServiceClient.Stub              implements HandlerCaller.Callback { -        private static final int DO_SET_SET_CONNECTION = 1; +        private static final int DO_INIT = 1;          private static final int DO_ON_INTERRUPT = 2;          private static final int DO_ON_ACCESSIBILITY_EVENT = 3;          private static final int DO_ON_GESTURE = 4; @@ -677,9 +699,10 @@ public abstract class AccessibilityService extends Service {              mCaller = new HandlerCaller(context, looper, this, true /*asyncHandler*/);          } -        public void setConnection(IAccessibilityServiceConnection connection, int connectionId) { -            Message message = mCaller.obtainMessageIO(DO_SET_SET_CONNECTION, connectionId, -                    connection); +        public void init(IAccessibilityServiceConnection connection, int connectionId, +                IBinder windowToken) { +            Message message = mCaller.obtainMessageIOO(DO_INIT, connectionId, +                    connection, windowToken);              mCaller.sendMessage(message);          } @@ -730,20 +753,24 @@ public abstract class AccessibilityService extends Service {                      mCallback.onInterrupt();                  } return; -                case DO_SET_SET_CONNECTION: { +                case DO_INIT: {                      mConnectionId = message.arg1; +                    SomeArgs args = (SomeArgs) message.obj;                      IAccessibilityServiceConnection connection = -                        (IAccessibilityServiceConnection) message.obj; +                            (IAccessibilityServiceConnection) args.arg1; +                    IBinder windowToken = (IBinder) args.arg2; +                    args.recycle();                      if (connection != null) {                          AccessibilityInteractionClient.getInstance().addConnection(mConnectionId,                                  connection); -                        mCallback.onSetConnectionId(mConnectionId); +                        mCallback.init(mConnectionId, windowToken);                          mCallback.onServiceConnected();                      } else {                          AccessibilityInteractionClient.getInstance().removeConnection(                                  mConnectionId); +                        mConnectionId = AccessibilityInteractionClient.NO_ID;                          AccessibilityInteractionClient.getInstance().clearCache(); -                        mCallback.onSetConnectionId(AccessibilityInteractionClient.NO_ID); +                        mCallback.init(AccessibilityInteractionClient.NO_ID, null);                      }                  } return; @@ -785,4 +812,53 @@ public abstract class AccessibilityService extends Service {              }          }      } + +    private class LocalWindowManager implements WindowManager { +        private final WindowManager mImpl; + +        private LocalWindowManager(WindowManager impl) { +            mImpl = impl; +        } + +        @Override +        public Display getDefaultDisplay() { +            return mImpl.getDefaultDisplay(); +        } + +        @Override +        public void addView(View view, ViewGroup.LayoutParams params) { +            if (!(params instanceof WindowManager.LayoutParams)) { +                throw new IllegalArgumentException("Params must be WindowManager.LayoutParams"); +            } +            WindowManager.LayoutParams windowParams = (WindowManager.LayoutParams) params; +            if (windowParams.type == LayoutParams.TYPE_ACCESSIBILITY_OVERLAY +                    && windowParams.token == null) { +                windowParams.token = mWindowToken; +            } +            mImpl.addView(view, params); +        } + +        @Override +        public void updateViewLayout(View view, ViewGroup.LayoutParams params) { +            if (!(params instanceof WindowManager.LayoutParams)) { +                throw new IllegalArgumentException("Params must be WindowManager.LayoutParams"); +            } +            WindowManager.LayoutParams windowParams = (WindowManager.LayoutParams) params; +            if (windowParams.type == LayoutParams.TYPE_ACCESSIBILITY_OVERLAY +                    && windowParams.token == null) { +                windowParams.token = mWindowToken; +            } +            mImpl.updateViewLayout(view, params); +        } + +        @Override +        public void removeViewImmediate(View view) { +            mImpl.removeViewImmediate(view); +        } + +        @Override +        public void removeView(View view) { +            mImpl.removeView(view); +        } +    }  } diff --git a/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl b/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl index 6ce0219b81f5..8b503ddad947 100644 --- a/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl +++ b/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl @@ -28,7 +28,7 @@ import android.view.KeyEvent;   */   oneway interface IAccessibilityServiceClient { -    void setConnection(in IAccessibilityServiceConnection connection, int connectionId); +    void init(in IAccessibilityServiceConnection connection, int connectionId, IBinder windowToken);      void onAccessibilityEvent(in AccessibilityEvent event); diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index dd49009281f3..fa15ad758cc6 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -2513,7 +2513,12 @@ public final class ActivityThread {      }      public void handleInstallProvider(ProviderInfo info) { -        installContentProviders(mInitialApplication, Lists.newArrayList(info)); +        final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites(); +        try { +            installContentProviders(mInitialApplication, Lists.newArrayList(info)); +        } finally { +            StrictMode.setThreadPolicy(oldPolicy); +        }      }      private void handleEnterAnimationComplete(IBinder token) { diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java index cc9aed8ccdbc..5038df93192d 100644 --- a/core/java/android/app/KeyguardManager.java +++ b/core/java/android/app/KeyguardManager.java @@ -16,10 +16,14 @@  package android.app; +import android.app.trust.ITrustManager; +import android.content.Context;  import android.content.Intent;  import android.os.Binder;  import android.os.RemoteException;  import android.os.IBinder; +import android.os.ServiceManager; +import android.os.UserHandle;  import android.view.IWindowManager;  import android.view.IOnKeyguardExitResult;  import android.view.WindowManagerGlobal; @@ -33,6 +37,7 @@ import android.view.WindowManagerGlobal;   */  public class KeyguardManager {      private IWindowManager mWM; +    private ITrustManager mTrustManager;      /**       * Intent used to prompt user for device credentials. @@ -151,6 +156,8 @@ public class KeyguardManager {      KeyguardManager() {          mWM = WindowManagerGlobal.getWindowManagerService(); +        mTrustManager = ITrustManager.Stub.asInterface( +                ServiceManager.getService(Context.TRUST_SERVICE));      }      /** @@ -218,6 +225,34 @@ public class KeyguardManager {      }      /** +     * Return whether unlocking the device is currently not requiring a password +     * because of a trust agent. +     * +     * @return true if the keyguard can currently be unlocked without entering credentials +     *         because the device is in a trusted environment. +     */ +    public boolean isKeyguardInTrustedState() { +        return isKeyguardInTrustedState(UserHandle.getCallingUserId()); +    } + +    /** +     * Return whether unlocking the device is currently not requiring a password +     * because of a trust agent. +     * +     * @param userId the user for which the trusted state should be reported. +     * @return true if the keyguard can currently be unlocked without entering credentials +     *         because the device is in a trusted environment. +     * @hide +     */ +    public boolean isKeyguardInTrustedState(int userId) { +        try { +            return mTrustManager.isTrusted(userId); +        } catch (RemoteException e) { +            return false; +        } +    } + +    /**       * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD}       * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED}       * instead; this allows you to seamlessly hide the keyguard as your application diff --git a/core/java/android/app/UiAutomation.java b/core/java/android/app/UiAutomation.java index 4aec9e00e56f..b0dd70f34fd2 100644 --- a/core/java/android/app/UiAutomation.java +++ b/core/java/android/app/UiAutomation.java @@ -25,6 +25,7 @@ import android.graphics.Bitmap;  import android.graphics.Canvas;  import android.graphics.Point;  import android.hardware.display.DisplayManagerGlobal; +import android.os.IBinder;  import android.os.Looper;  import android.os.ParcelFileDescriptor;  import android.os.RemoteException; @@ -919,7 +920,7 @@ public final class UiAutomation {          public IAccessibilityServiceClientImpl(Looper looper) {              super(null, looper, new Callbacks() {                  @Override -                public void onSetConnectionId(int connectionId) { +                public void init(int connectionId, IBinder windowToken) {                      synchronized (mLock) {                          mConnectionId = connectionId;                          mLock.notifyAll(); diff --git a/core/java/android/app/trust/ITrustManager.aidl b/core/java/android/app/trust/ITrustManager.aidl index 6fbf87d2d335..0193711fd588 100644 --- a/core/java/android/app/trust/ITrustManager.aidl +++ b/core/java/android/app/trust/ITrustManager.aidl @@ -29,4 +29,5 @@ interface ITrustManager {      void reportRequireCredentialEntry(int userId);      void registerTrustListener(in ITrustListener trustListener);      void unregisterTrustListener(in ITrustListener trustListener); +    boolean isTrusted(int userId);  } diff --git a/core/java/android/hardware/hdmi/HdmiClient.java b/core/java/android/hardware/hdmi/HdmiClient.java index c2b9846c0cdd..45a79e1f3cae 100644 --- a/core/java/android/hardware/hdmi/HdmiClient.java +++ b/core/java/android/hardware/hdmi/HdmiClient.java @@ -8,7 +8,7 @@ import android.util.Log;  /**   * Parent for classes of various HDMI-CEC device type used to access - * {@link HdmiControlService}. Contains methods and data used in common. + * the HDMI control system service. Contains methods and data used in common.   *   * @hide   */ @@ -16,11 +16,13 @@ import android.util.Log;  public abstract class HdmiClient {      private static final String TAG = "HdmiClient"; -    protected final IHdmiControlService mService; +    /* package */ final IHdmiControlService mService; -    protected abstract int getDeviceType(); +    private IHdmiVendorCommandListener mIHdmiVendorCommandListener; -    public HdmiClient(IHdmiControlService service) { +    /* package */ abstract int getDeviceType(); + +    /* package */ HdmiClient(IHdmiControlService service) {          mService = service;      } @@ -40,7 +42,7 @@ public abstract class HdmiClient {      }      /** -     * Send a key event to other logical device. +     * Sends a key event to other logical device.       *       * @param keyCode key code to send. Defined in {@link android.view.KeyEvent}.       * @param isPressed true if this is key press event @@ -54,7 +56,7 @@ public abstract class HdmiClient {      }      /** -     * Send vendor-specific command. +     * Sends vendor-specific command.       *       * @param targetAddress address of the target device       * @param params vendor-specific parameter. For <Vendor Command With ID> do not @@ -71,18 +73,23 @@ public abstract class HdmiClient {      }      /** -     * Add a listener used to receive incoming vendor-specific command. +     * Sets a listener used to receive incoming vendor-specific command.       *       * @param listener listener object       */ -    public void addVendorCommandListener(@NonNull VendorCommandListener listener) { +    public void setVendorCommandListener(@NonNull VendorCommandListener listener) {          if (listener == null) {              throw new IllegalArgumentException("listener cannot be null");          } +        if (mIHdmiVendorCommandListener != null) { +            throw new IllegalStateException("listener was already set"); +        }          try { -            mService.addVendorCommandListener(getListenerWrapper(listener), getDeviceType()); +            IHdmiVendorCommandListener wrappedListener = getListenerWrapper(listener); +            mService.addVendorCommandListener(wrappedListener, getDeviceType()); +            mIHdmiVendorCommandListener = wrappedListener;          } catch (RemoteException e) { -            Log.e(TAG, "failed to add vendor command listener: ", e); +            Log.e(TAG, "failed to set vendor command listener: ", e);          }      } diff --git a/core/java/android/hardware/hdmi/HdmiControlManager.java b/core/java/android/hardware/hdmi/HdmiControlManager.java index ff2ba1eec20f..308a21918ba9 100644 --- a/core/java/android/hardware/hdmi/HdmiControlManager.java +++ b/core/java/android/hardware/hdmi/HdmiControlManager.java @@ -21,6 +21,8 @@ import android.annotation.SdkConstant;  import android.annotation.SdkConstant.SdkConstantType;  import android.annotation.SystemApi;  import android.os.RemoteException; +import android.util.ArrayMap; +import android.util.Log;  /**   * The {@link HdmiControlManager} class is used to send HDMI control messages @@ -36,6 +38,8 @@ import android.os.RemoteException;   */  @SystemApi  public final class HdmiControlManager { +    private static final String TAG = "HdmiControlManager"; +      @Nullable private final IHdmiControlService mService;      /** @@ -56,7 +60,7 @@ public final class HdmiControlManager {      /**       * Message used by TV to receive volume status from Audio Receiver. It should check volume value -     * that is retrieved from extra value with the key {@link #EXTRA_MESSAGE_EXTRAM_PARAM1}. If the +     * that is retrieved from extra value with the key {@link #EXTRA_MESSAGE_EXTRA_PARAM1}. If the       * value is in range of [0,100], it is current volume of Audio Receiver. And there is another       * value, {@link #AVR_VOLUME_MUTED}, which is used to inform volume mute.       */ @@ -71,7 +75,7 @@ public final class HdmiControlManager {       * Used as an extra field in the intent {@link #ACTION_OSD_MESSAGE}. Contains the extra value       * of the message.       */ -    public static final String EXTRA_MESSAGE_EXTRAM_PARAM1 = +    public static final String EXTRA_MESSAGE_EXTRA_PARAM1 =              "android.hardware.hdmi.extra.MESSAGE_EXTRA_PARAM1";      /** @@ -251,10 +255,9 @@ public final class HdmiControlManager {      private final boolean mHasTvDevice;      /** -     * @hide - hide this constructor because it has a parameter of type -     * IHdmiControlService, which is a system private class. The right way -     * to create an instance of this class is using the factory -     * Context.getSystemService. +     * {@hide} - hide this constructor because it has a parameter of type IHdmiControlService, +     * which is a system private class. The right way to create an instance of this class is +     * using the factory Context.getSystemService.       */      public HdmiControlManager(IHdmiControlService service) {          mService = service; @@ -340,6 +343,9 @@ public final class HdmiControlManager {          void onReceived(HdmiHotplugEvent event);      } +    private final ArrayMap<HotplugEventListener, IHdmiHotplugEventListener> +            mHotplugEventListeners = new ArrayMap<>(); +      /**       * Listener used to get vendor-specific commands.       */ @@ -384,12 +390,19 @@ public final class HdmiControlManager {       */      public void addHotplugEventListener(HotplugEventListener listener) {          if (mService == null) { +            Log.e(TAG, "HdmiControlService is not available"); +            return; +        } +        if (mHotplugEventListeners.containsKey(listener)) { +            Log.e(TAG, "listener is already registered");              return;          } +        IHdmiHotplugEventListener wrappedListener = getHotplugEventListenerWrapper(listener); +        mHotplugEventListeners.put(listener, wrappedListener);          try { -            mService.addHotplugEventListener(getHotplugEventListenerWrapper(listener)); +            mService.addHotplugEventListener(wrappedListener);          } catch (RemoteException e) { -            // Do nothing. +            Log.e(TAG, "failed to add hotplug event listener: ", e);          }      } @@ -400,12 +413,18 @@ public final class HdmiControlManager {       */      public void removeHotplugEventListener(HotplugEventListener listener) {          if (mService == null) { +            Log.e(TAG, "HdmiControlService is not available"); +            return; +        } +        IHdmiHotplugEventListener wrappedListener = mHotplugEventListeners.remove(listener); +        if (wrappedListener == null) { +            Log.e(TAG, "tried to remove not-registered listener");              return;          }          try { -            mService.removeHotplugEventListener(getHotplugEventListenerWrapper(listener)); +            mService.removeHotplugEventListener(wrappedListener);          } catch (RemoteException e) { -            // Do nothing. +            Log.e(TAG, "failed to remove hotplug event listener: ", e);          }      } diff --git a/core/java/android/hardware/hdmi/HdmiDeviceInfo.java b/core/java/android/hardware/hdmi/HdmiDeviceInfo.java index 7abea3696f44..fe414e6b11b5 100644 --- a/core/java/android/hardware/hdmi/HdmiDeviceInfo.java +++ b/core/java/android/hardware/hdmi/HdmiDeviceInfo.java @@ -237,14 +237,14 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return the id of the device. +     * Returns the id of the device.       */      public int getId() {          return mId;      }      /** -     * Return the id to be used for CEC device. +     * Returns the id to be used for CEC device.       *       * @param address logical address of CEC device       * @return id for CEC device @@ -255,7 +255,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return the id to be used for MHL device. +     * Returns the id to be used for MHL device.       *       * @param portId port which the MHL device is connected to       * @return id for MHL device @@ -266,7 +266,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return the id to be used for hardware port. +     * Returns the id to be used for hardware port.       *       * @param portId port id       * @return id for hardware port @@ -276,28 +276,28 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return the CEC logical address of the device. +     * Returns the CEC logical address of the device.       */      public int getLogicalAddress() {          return mLogicalAddress;      }      /** -     * Return the physical address of the device. +     * Returns the physical address of the device.       */      public int getPhysicalAddress() {          return mPhysicalAddress;      }      /** -     * Return the port ID. +     * Returns the port ID.       */      public int getPortId() {          return mPortId;      }      /** -     * Return CEC type of the device. For more details, refer constants between {@link #DEVICE_TV} +     * Returns CEC type of the device. For more details, refer constants between {@link #DEVICE_TV}       * and {@link #DEVICE_INACTIVE}.       */      public int getDeviceType() { @@ -305,7 +305,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return device's power status. It should be one of the following values. +     * Returns device's power status. It should be one of the following values.       * <ul>       * <li>{@link HdmiControlManager#POWER_STATUS_ON}       * <li>{@link HdmiControlManager#POWER_STATUS_STANDBY} @@ -319,21 +319,21 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return MHL device id. Return -1 for non-MHL device. +     * Returns MHL device id. Return -1 for non-MHL device.       */      public int getDeviceId() {          return mDeviceId;      }      /** -     * Return MHL adopter id. Return -1 for non-MHL device. +     * Returns MHL adopter id. Return -1 for non-MHL device.       */      public int getAdopterId() {          return mAdopterId;      }      /** -     * Return {@code true} if the device is of a type that can be an input source. +     * Returns {@code true} if the device is of a type that can be an input source.       */      public boolean isSourceType() {          return mDeviceType == DEVICE_PLAYBACK @@ -342,7 +342,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return {@code true} if the device represents an HDMI-CEC device. {@code false} if the device +     * Returns {@code true} if the device represents an HDMI-CEC device. {@code false} if the device       * is either MHL or other device.       */      public boolean isCecDevice() { @@ -350,7 +350,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return {@code true} if the device represents an MHL device. {@code false} if the device is +     * Returns {@code true} if the device represents an MHL device. {@code false} if the device is       * either CEC or other device.       */      public boolean isMhlDevice() { @@ -358,14 +358,14 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Return display (OSD) name of the device. +     * Returns display (OSD) name of the device.       */      public String getDisplayName() {          return mDisplayName;      }      /** -     * Return vendor id of the device. Vendor id is used to distinguish devices built by other +     * Returns vendor id of the device. Vendor id is used to distinguish devices built by other       * manufactures. This is required for vendor-specific command on CEC standard.       */      public int getVendorId() { @@ -373,7 +373,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Describe the kinds of special objects contained in this Parcelable's marshalled +     * Describes the kinds of special objects contained in this Parcelable's marshalled       * representation.       */      @Override @@ -382,7 +382,7 @@ public class HdmiDeviceInfo implements Parcelable {      }      /** -     * Serialize this object into a {@link Parcel}. +     * Serializes this object into a {@link Parcel}.       *       * @param dest The Parcel in which the object should be written.       * @param flags Additional flags about how the object should be written. May be 0 or diff --git a/core/java/android/hardware/hdmi/HdmiHotplugEvent.java b/core/java/android/hardware/hdmi/HdmiHotplugEvent.java index 7be4bc57a329..94767428d031 100644 --- a/core/java/android/hardware/hdmi/HdmiHotplugEvent.java +++ b/core/java/android/hardware/hdmi/HdmiHotplugEvent.java @@ -44,7 +44,7 @@ public final class HdmiHotplugEvent implements Parcelable {      }      /** -     * Return the port number for which the event occurred. +     * Returns the port number for which the event occurred.       *       * @return port number       */ @@ -53,7 +53,7 @@ public final class HdmiHotplugEvent implements Parcelable {      }      /** -     * Return the connection status associated with this event +     * Returns the connection status associated with this event       *       * @return true if the device gets connected; otherwise false       */ @@ -62,7 +62,7 @@ public final class HdmiHotplugEvent implements Parcelable {      }      /** -     * Describe the kinds of special objects contained in this Parcelable's +     * Describes the kinds of special objects contained in this Parcelable's       * marshalled representation.       */      @Override @@ -71,7 +71,7 @@ public final class HdmiHotplugEvent implements Parcelable {      }      /** -     * Flatten this object in to a Parcel. +     * Flattens this object in to a Parcel.       *       * @param dest The Parcel in which the object should be written.       * @param flags Additional flags about how the object should be written. @@ -86,17 +86,19 @@ public final class HdmiHotplugEvent implements Parcelable {      public static final Parcelable.Creator<HdmiHotplugEvent> CREATOR              = new Parcelable.Creator<HdmiHotplugEvent>() {          /** -         * Rebuild a {@link HdmiHotplugEvent} previously stored with +         * Rebuilds a {@link HdmiHotplugEvent} previously stored with           * {@link Parcelable#writeToParcel(Parcel, int)}.           *           * @param p {@link HdmiHotplugEvent} object to read the Rating from           * @return a new {@link HdmiHotplugEvent} created from the data in the parcel           */ +        @Override          public HdmiHotplugEvent createFromParcel(Parcel p) {              int port = p.readInt();              boolean connected = p.readByte() == 1;              return new HdmiHotplugEvent(port, connected);          } +        @Override          public HdmiHotplugEvent[] newArray(int size) {              return new HdmiHotplugEvent[size];          } diff --git a/core/java/android/hardware/hdmi/HdmiPlaybackClient.java b/core/java/android/hardware/hdmi/HdmiPlaybackClient.java index 85ccb7455216..263d6b1872ff 100644 --- a/core/java/android/hardware/hdmi/HdmiPlaybackClient.java +++ b/core/java/android/hardware/hdmi/HdmiPlaybackClient.java @@ -64,12 +64,12 @@ public final class HdmiPlaybackClient extends HdmiClient {          public void onComplete(int status);      } -    HdmiPlaybackClient(IHdmiControlService service) { +    /* package */ HdmiPlaybackClient(IHdmiControlService service) {          super(service);      }      /** -     * Perform the feature 'one touch play' from playback device to turn on display +     * Performs the feature 'one touch play' from playback device to turn on display       * and switch the input.       *       * @param callback {@link OneTouchPlayCallback} object to get informed @@ -90,7 +90,7 @@ public final class HdmiPlaybackClient extends HdmiClient {      }      /** -     * Get the status of display device connected through HDMI bus. +     * Gets the status of display device connected through HDMI bus.       *       * @param callback {@link DisplayStatusCallback} object to get informed       *         of the result diff --git a/core/java/android/hardware/hdmi/HdmiPortInfo.java b/core/java/android/hardware/hdmi/HdmiPortInfo.java index 2ec6126eb7b1..e52baed525a1 100644 --- a/core/java/android/hardware/hdmi/HdmiPortInfo.java +++ b/core/java/android/hardware/hdmi/HdmiPortInfo.java @@ -114,7 +114,7 @@ public final class HdmiPortInfo implements Parcelable {      }      /** -     * Describe the kinds of special objects contained in this Parcelable's +     * Describes the kinds of special objects contained in this Parcelable's       * marshalled representation.       */      @Override @@ -146,7 +146,7 @@ public final class HdmiPortInfo implements Parcelable {              };      /** -     * Serialize this object into a {@link Parcel}. +     * Serializes this object into a {@link Parcel}.       *       * @param dest The Parcel in which the object should be written.       * @param flags Additional flags about how the object should be written. diff --git a/core/java/android/hardware/hdmi/HdmiRecordListener.java b/core/java/android/hardware/hdmi/HdmiRecordListener.java index f6a348a65f68..29f6cfc3a29a 100644 --- a/core/java/android/hardware/hdmi/HdmiRecordListener.java +++ b/core/java/android/hardware/hdmi/HdmiRecordListener.java @@ -25,7 +25,7 @@ import android.hardware.hdmi.HdmiRecordSources.RecordSource;   */  @SystemApi  public abstract class HdmiRecordListener { -    protected HdmiRecordListener() {} +    public HdmiRecordListener() {}      /**       * Called when TV received one touch record request from record device. The client of this @@ -34,7 +34,7 @@ public abstract class HdmiRecordListener {       * @param recorderAddress       * @return record source to be used for recording. Null if no device is available.       */ -    public abstract RecordSource getOneTouchRecordSource(int recorderAddress); +    public abstract RecordSource onOneTouchRecordSourceRequested(int recorderAddress);      /**       * Called when one touch record is started or failed during initialization. diff --git a/core/java/android/hardware/hdmi/HdmiRecordSources.java b/core/java/android/hardware/hdmi/HdmiRecordSources.java index c294f72d3425..922b8e7ae14f 100644 --- a/core/java/android/hardware/hdmi/HdmiRecordSources.java +++ b/core/java/android/hardware/hdmi/HdmiRecordSources.java @@ -59,21 +59,21 @@ public final class HdmiRecordSources {       */      @SystemApi      public static abstract class RecordSource { -        protected final int mSourceType; -        protected final int mExtraDataSize; +        /* package */ final int mSourceType; +        /* package */ final int mExtraDataSize; -        protected RecordSource(int sourceType, int extraDataSize) { +        /* package */ RecordSource(int sourceType, int extraDataSize) {              mSourceType = sourceType;              mExtraDataSize = extraDataSize;          } -        abstract int extraParamToByteArray(byte[] data, int index); +        /* package */ abstract int extraParamToByteArray(byte[] data, int index); -        final int getDataSize(boolean includeType)  { +        /* package */ final int getDataSize(boolean includeType)  {              return includeType ? mExtraDataSize + 1 : mExtraDataSize;          } -        final int toByteArray(boolean includeType, byte[] data, int index) { +        /* package */ final int toByteArray(boolean includeType, byte[] data, int index) {              if (includeType) {                  // 1 to 8 bytes (depends on source).                  // {[Record Source Type]} | @@ -94,7 +94,7 @@ public final class HdmiRecordSources {      // ---- Own source -----------------------------------------------------------------------------      // ---------------------------------------------------------------------------------------------      /** -     * Create {@link OwnSource} of own source. +     * Creates {@link OwnSource} of own source.       */      public static OwnSource ofOwnSource() {          return new OwnSource(); @@ -311,7 +311,7 @@ public final class HdmiRecordSources {       */      public static final class DigitalChannelData implements DigitalServiceIdentification {          /** Identifies the logical or virtual channel number of a service. */ -        private ChannelIdentifier mChannelIdentifier; +        private final ChannelIdentifier mChannelIdentifier;          public static DigitalChannelData ofTwoNumbers(int majorNumber, int minorNumber) {              return new DigitalChannelData( @@ -338,7 +338,7 @@ public final class HdmiRecordSources {      }      /** -     * Create {@link DigitalServiceSource} with channel type. +     * Creates {@link DigitalServiceSource} with channel type.       *       * @param broadcastSystem digital broadcast system. It should be one of       *            <ul> @@ -389,7 +389,7 @@ public final class HdmiRecordSources {      }      /** -     * Create {@link DigitalServiceSource} of ARIB type. +     * Creates {@link DigitalServiceSource} of ARIB type.       *       * @param aribType ARIB type. It should be one of       *            <ul> @@ -420,7 +420,7 @@ public final class HdmiRecordSources {      }      /** -     * Create {@link DigitalServiceSource} of ATSC type. +     * Creates {@link DigitalServiceSource} of ATSC type.       *       * @param atscType ATSC type. It should be one of       *            <ul> @@ -451,7 +451,7 @@ public final class HdmiRecordSources {      }      /** -     * Create {@link DigitalServiceSource} of ATSC type. +     * Creates {@link DigitalServiceSource} of ATSC type.       *       * @param dvbType DVB type. It should be one of       *            <ul> @@ -572,7 +572,7 @@ public final class HdmiRecordSources {      public static final int BROADCAST_SYSTEM_PAL_OTHER_SYSTEM = 31;      /** -     * Create {@link AnalogueServiceSource} of analogue service. +     * Creates {@link AnalogueServiceSource} of analogue service.       *       * @param broadcastType       * @param frequency @@ -615,7 +615,7 @@ public final class HdmiRecordSources {       */      @SystemApi      public static final class AnalogueServiceSource extends RecordSource { -        static final int EXTRA_DATA_SIZE = 4; +        /* package */ static final int EXTRA_DATA_SIZE = 4;          /** Indicates the Analogue broadcast type. */          private final int mBroadcastType; @@ -635,7 +635,7 @@ public final class HdmiRecordSources {          }          @Override -        protected int extraParamToByteArray(byte[] data, int index) { +        /* package */ int extraParamToByteArray(byte[] data, int index) {              // [Analogue Broadcast Type] - 1 byte              data[index] = (byte) mBroadcastType;              // [Analogue Frequency] - 2 bytes @@ -651,7 +651,7 @@ public final class HdmiRecordSources {      // ---- External plug data ---------------------------------------------------------------------      // ---------------------------------------------------------------------------------------------      /** -     * Create {@link ExternalPlugData} of external plug type. +     * Creates {@link ExternalPlugData} of external plug type.       *       * @param plugNumber plug number. It should be in range of [1, 255]       * @hide @@ -695,7 +695,7 @@ public final class HdmiRecordSources {      // ---- External physical address --------------------------------------------------------------      // ---------------------------------------------------------------------------------------------      /** -     * Create {@link ExternalPhysicalAddress} of external physical address. +     * Creates {@link ExternalPhysicalAddress} of external physical address.       *       * @param physicalAddress       * @hide @@ -754,7 +754,7 @@ public final class HdmiRecordSources {      }      /** -     * Check the byte array of record source. +     * Checks the byte array of record source.       * @hide       */      @SystemApi diff --git a/core/java/android/hardware/hdmi/HdmiTimerRecordSources.java b/core/java/android/hardware/hdmi/HdmiTimerRecordSources.java index 178070762ba7..bf97375c8f95 100644 --- a/core/java/android/hardware/hdmi/HdmiTimerRecordSources.java +++ b/core/java/android/hardware/hdmi/HdmiTimerRecordSources.java @@ -67,7 +67,7 @@ public class HdmiTimerRecordSources {      private HdmiTimerRecordSources() {}      /** -     * Create {@link TimerRecordSource} for digital source which is used for <Set Digital +     * Creates {@link TimerRecordSource} for digital source which is used for <Set Digital       * Timer>.       *       * @param timerInfo timer info used for timer recording @@ -82,7 +82,7 @@ public class HdmiTimerRecordSources {      }      /** -     * Create {@link TimerRecordSource} for analogue source which is used for <Set Analogue +     * Creates {@link TimerRecordSource} for analogue source which is used for <Set Analogue       * Timer>.       *       * @param timerInfo timer info used for timer recording @@ -97,7 +97,7 @@ public class HdmiTimerRecordSources {      }      /** -     * Create {@link TimerRecordSource} for external plug which is used for <Set External +     * Creates {@link TimerRecordSource} for external plug which is used for <Set External       * Timer>.       *       * @param timerInfo timer info used for timer recording @@ -112,7 +112,7 @@ public class HdmiTimerRecordSources {      }      /** -     * Create {@link TimerRecordSource} for external physical address which is used for <Set +     * Creates {@link TimerRecordSource} for external physical address which is used for <Set       * External Timer>.       *       * @param timerInfo timer info used for timer recording @@ -140,7 +140,7 @@ public class HdmiTimerRecordSources {      }      /** -     * Create {@link Duration} for time value. +     * Creates {@link Duration} for time value.       *       * @param hour hour in range of [0, 23]       * @param minute minute in range of [0, 60] @@ -162,7 +162,7 @@ public class HdmiTimerRecordSources {      }      /** -     * Create {@link Duration} for duration value. +     * Creates {@link Duration} for duration value.       *       * @param hour hour in range of [0, 99]       * @param minute minute in range of [0, 59] @@ -184,21 +184,21 @@ public class HdmiTimerRecordSources {      }      private static class TimeUnit { -        protected final int mHour; -        protected final int mMinute; +        /* package */ final int mHour; +        /* package */ final int mMinute; -        protected TimeUnit(int hour, int minute) { +        /* package */ TimeUnit(int hour, int minute) {              mHour = hour;              mMinute = minute;          } -        protected int toByteArray(byte[] data, int index) { +        /* package */ int toByteArray(byte[] data, int index) {              data[index] = toBcdByte(mHour);              data[index + 1] = toBcdByte(mMinute);              return 2;          } -        protected static byte toBcdByte(int value) { +        /* package */ static byte toBcdByte(int value) {              int digitOfTen = (value / 10) % 10;              int digitOfOne = value % 10;              return (byte) ((digitOfTen << 4) | digitOfOne); @@ -247,7 +247,7 @@ public class HdmiTimerRecordSources {              RECORDING_SEQUENCE_REPEAT_SATUREDAY);      /** -     * Create {@link TimerInfo} with the given information. +     * Creates {@link TimerInfo} with the given information.       *       * @param dayOfMonth day of month       * @param monthOfYear month of year @@ -426,7 +426,7 @@ public class HdmiTimerRecordSources {      }      /** -     * Check the byte array of timer record source. +     * Checks the byte array of timer record source.       * @param sourcetype       * @param recordSource       * @hide diff --git a/core/java/android/hardware/hdmi/HdmiTvClient.java b/core/java/android/hardware/hdmi/HdmiTvClient.java index 683d04b3ef5d..dbfb4efe52a3 100644 --- a/core/java/android/hardware/hdmi/HdmiTvClient.java +++ b/core/java/android/hardware/hdmi/HdmiTvClient.java @@ -22,11 +22,11 @@ import android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource;  import android.os.RemoteException;  import android.util.Log; +import libcore.util.EmptyArray; +  import java.util.Collections;  import java.util.List; -import libcore.util.EmptyArray; -  /**   * HdmiTvClient represents HDMI-CEC logical device of type TV in the Android system   * which acts as TV/Display. It provides with methods that manage, interact with other @@ -43,13 +43,13 @@ public final class HdmiTvClient extends HdmiClient {       */      public static final int VENDOR_DATA_SIZE = 16; -    HdmiTvClient(IHdmiControlService service) { +    /* package */ HdmiTvClient(IHdmiControlService service) {          super(service);      }      // Factory method for HdmiTvClient.      // Declared package-private. Accessed by HdmiControlManager only. -    static HdmiTvClient create(IHdmiControlService service) { +    /* package */ static HdmiTvClient create(IHdmiControlService service) {          return new HdmiTvClient(service);      } @@ -71,7 +71,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Select a CEC logical device to be a new active source. +     * Selects a CEC logical device to be a new active source.       *       * @param logicalAddress logical address of the device to select       * @param callback callback to get the result with @@ -98,7 +98,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Select a HDMI port to be a new route path. +     * Selects a HDMI port to be a new route path.       *       * @param portId HDMI port to select       * @param callback callback to get the result with @@ -128,7 +128,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Set the listener used to get informed of the input change event. +     * Sets the listener used to get informed of the input change event.       *       * @param listener listener object       */ @@ -168,7 +168,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Set system audio volume +     * Sets system audio volume       *       * @param oldIndex current volume index       * @param newIndex volume index to be set @@ -183,7 +183,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Set system audio mute status +     * Sets system audio mute status       *       * @param mute {@code true} if muted; otherwise, {@code false}       */ @@ -196,7 +196,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Set record listener +     * Sets record listener       *       * @param listener       */ @@ -216,7 +216,7 @@ public final class HdmiTvClient extends HdmiClient {              @Override              public byte[] getOneTouchRecordSource(int recorderAddress) {                  HdmiRecordSources.RecordSource source = -                        callback.getOneTouchRecordSource(recorderAddress); +                        callback.onOneTouchRecordSourceRequested(recorderAddress);                  if (source == null) {                      return EmptyArray.BYTE;                  } @@ -244,13 +244,13 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Start one touch recording with the given recorder address and recorder source. +     * Starts one touch recording with the given recorder address and recorder source.       * <p>       * Usage       * <pre>       * HdmiTvClient tvClient = ....;       * // for own source. -     * OwnSource ownSource = ownHdmiRecordSources.ownSource(); +     * OwnSource ownSource = HdmiRecordSources.ofOwnSource();       * tvClient.startOneTouchRecord(recorderAddress, ownSource);       * </pre>       */ @@ -269,7 +269,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Stop one touch record. +     * Stops one touch record.       *       * @param recorderAddress recorder address where recoding will be stopped       */ @@ -282,7 +282,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Start timer recording with the given recoder address and recorder source. +     * Starts timer recording with the given recoder address and recorder source.       * <p>       * Usage       * <pre> @@ -331,7 +331,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Clear timer recording with the given recorder address and recording source. +     * Clears timer recording with the given recorder address and recording source.       * For more details, please refer {@link #startTimerRecording(int, int, TimerRecordSource)}.       */      public void clearTimerRecording(int recorderAddress, int sourceType, TimerRecordSource source) { @@ -357,7 +357,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Set {@link HdmiMhlVendorCommandListener} to get incoming MHL vendor command. +     * Sets {@link HdmiMhlVendorCommandListener} to get incoming MHL vendor command.       *       * @param listener to receive incoming MHL vendor command       */ @@ -383,7 +383,7 @@ public final class HdmiTvClient extends HdmiClient {      }      /** -     * Send MHL vendor command to the device connected to a port of the given portId. +     * Sends MHL vendor command to the device connected to a port of the given portId.       *       * @param portId id of port to send MHL vendor command       * @param offset offset in the in given data diff --git a/core/java/android/net/Proxy.java b/core/java/android/net/Proxy.java index 6a78c29c15ac..3477b029f793 100644 --- a/core/java/android/net/Proxy.java +++ b/core/java/android/net/Proxy.java @@ -19,17 +19,10 @@ package android.net;  import android.annotation.SdkConstant;  import android.annotation.SdkConstant.SdkConstantType;  import android.content.Context; -import android.net.ProxyInfo;  import android.text.TextUtils;  import android.util.Log; -  import org.apache.http.HttpHost; -import org.apache.http.HttpRequest; -import org.apache.http.conn.routing.HttpRoute; -import org.apache.http.conn.routing.HttpRoutePlanner; -import org.apache.http.conn.scheme.SchemeRegistry; -import org.apache.http.protocol.HttpContext;  import java.net.InetSocketAddress;  import java.net.ProxySelector; @@ -212,6 +205,7 @@ public final class Proxy {       * is no proxy.       * {@hide}       */ +    // TODO: Get rid of this method. It's used only in tests.      public static final HttpHost getPreferredHttpHost(Context context,              String url) {          java.net.Proxy prefProxy = getProxy(context, url); diff --git a/core/java/android/net/ProxyInfo.java b/core/java/android/net/ProxyInfo.java index 1534e2c7f4b1..7694420e7065 100644 --- a/core/java/android/net/ProxyInfo.java +++ b/core/java/android/net/ProxyInfo.java @@ -36,7 +36,13 @@ import java.util.Locale;   *   * 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}. + * + * @deprecated Please use {@link java.net.URL#openConnection}, {@link java.net.Proxy} and + *     friends. 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 ProxyInfo implements Parcelable {      private String mHost; diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java index b0278d39e072..c15e6e55ab45 100644 --- a/core/java/android/net/SSLCertificateSocketFactory.java +++ b/core/java/android/net/SSLCertificateSocketFactory.java @@ -154,7 +154,13 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {       *         for none.  The socket timeout is reset to 0 after the handshake.       * @param cache The {@link SSLSessionCache} to use, or null for no cache.       * @return a new SocketFactory with the specified parameters +     * +     * @deprecated Use {@link #getDefault()} along with a {@link javax.net.ssl.HttpsURLConnection} +     *     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 static org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(              int handshakeTimeoutMillis, SSLSessionCache cache) {          return new org.apache.http.conn.ssl.SSLSocketFactory( diff --git a/core/java/android/net/http/AndroidHttpClient.java b/core/java/android/net/http/AndroidHttpClient.java index 04f3974f4132..a26207666283 100644 --- a/core/java/android/net/http/AndroidHttpClient.java +++ b/core/java/android/net/http/AndroidHttpClient.java @@ -74,7 +74,13 @@ import java.util.zip.GZIPOutputStream;   * 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 @@ -108,7 +114,13 @@ public final class AndroidHttpClient implements HttpClient {       * @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(); @@ -148,7 +160,13 @@ public final class AndroidHttpClient implements HttpClient {       * 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 */);      } diff --git a/core/java/android/text/format/Time.java b/core/java/android/text/format/Time.java index aa6ad2048719..1e04eb45471d 100644 --- a/core/java/android/text/format/Time.java +++ b/core/java/android/text/format/Time.java @@ -48,7 +48,10 @@ import libcore.util.ZoneInfoDB;   *     <li>Much of the formatting / parsing assumes ASCII text and is therefore not suitable for   *     use with non-ASCII scripts.</li>   * </ul> + * + * @deprecated Use {@link java.util.GregorianCalendar} instead.   */ +@Deprecated  public class Time {      private static final String Y_M_D_T_H_M_S_000 = "%Y-%m-%dT%H:%M:%S.000";      private static final String Y_M_D_T_H_M_S_000_Z = "%Y-%m-%dT%H:%M:%S.000Z"; diff --git a/core/java/android/util/FloatMath.java b/core/java/android/util/FloatMath.java index 0ffd5bd61098..bdcf5ca2bc9e 100644 --- a/core/java/android/util/FloatMath.java +++ b/core/java/android/util/FloatMath.java @@ -21,7 +21,10 @@ package android.util;   * versions of Android with a JIT, these are significantly slower than   * the equivalent {@code Math} functions, which should be used in preference   * to these. + * + * @deprecated Use {@link java.lang.Math} instead.   */ +@Deprecated  public class FloatMath {      /** Prevents instantiation. */ diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 3f84c9bef725..5b48c0d2d433 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -542,6 +542,19 @@ public interface WindowManager extends ViewManager {          public static final int TYPE_VOICE_INTERACTION = FIRST_SYSTEM_WINDOW+31;          /** +         * Window type: Windows that are overlaid <em>only</em> by an {@link +         * android.accessibilityservice.AccessibilityService} for interception of +         * user interactions without changing the windows an accessibility service +         * can introspect. In particular, an accessibility service can introspect +         * only windows that a sighted user can interact with which is they can touch +         * these windows or can type into these windows. For example, if there +         * is a full screen accessibility overlay that is touchable, the windows +         * below it will be introspectable by an accessibility service regardless +         * they are covered by a touchable window. +         */ +        public static final int TYPE_ACCESSIBILITY_OVERLAY = FIRST_SYSTEM_WINDOW+32; + +        /**           * End of types of system windows.           */          public static final int LAST_SYSTEM_WINDOW      = 2999; diff --git a/core/java/android/view/WindowManagerInternal.java b/core/java/android/view/WindowManagerInternal.java index 38e372367ac5..f557b976d535 100644 --- a/core/java/android/view/WindowManagerInternal.java +++ b/core/java/android/view/WindowManagerInternal.java @@ -173,4 +173,20 @@ public abstract class WindowManagerInternal {       * redrawn.       */      public abstract void waitForAllWindowsDrawn(Runnable callback, long timeout); + +    /** +     * Adds a window token for a given window type. +     * +     * @param token The token to add. +     * @param type The window type. +     */ +    public abstract void addWindowToken(android.os.IBinder token, int type); + +    /** +     * Removes a window token. +     * +     * @param token The toke to remove. +     * @param removeWindows Whether to also remove the windows associated with the token. +     */ +    public abstract void removeWindowToken(android.os.IBinder token, boolean removeWindows);  } diff --git a/core/java/android/view/accessibility/AccessibilityWindowInfo.java b/core/java/android/view/accessibility/AccessibilityWindowInfo.java index ad55f5f2a097..e1942beaaa0f 100644 --- a/core/java/android/view/accessibility/AccessibilityWindowInfo.java +++ b/core/java/android/view/accessibility/AccessibilityWindowInfo.java @@ -51,11 +51,24 @@ public final class AccessibilityWindowInfo implements Parcelable {       */      public static final int TYPE_SYSTEM = 3; +    /** +     * Window type: Windows that are overlaid <em>only</em> by an {@link +     * android.accessibilityservice.AccessibilityService} for interception of +     * user interactions without changing the windows an accessibility service +     * can introspect. In particular, an accessibility service can introspect +     * only windows that a sighted user can interact with which they can touch +     * these windows or can type into these windows. For example, if there +     * is a full screen accessibility overlay that is touchable, the windows +     * below it will be introspectable by an accessibility service regardless +     * they are covered by a touchable window. +     */ +    public static final int TYPE_ACCESSIBILITY_OVERLAY = 4; +      private static final int UNDEFINED = -1;      private static final int BOOLEAN_PROPERTY_ACTIVE = 1 << 0;      private static final int BOOLEAN_PROPERTY_FOCUSED = 1 << 1; -    private static final int BOOLEAN_PROPERTY_ACCESSIBLITY_FOCUSED = 1 << 2; +    private static final int BOOLEAN_PROPERTY_ACCESSIBILITY_FOCUSED = 1 << 2;      // Housekeeping.      private static final int MAX_POOL_SIZE = 10; @@ -85,6 +98,7 @@ public final class AccessibilityWindowInfo implements Parcelable {       * @see #TYPE_APPLICATION       * @see #TYPE_INPUT_METHOD       * @see #TYPE_SYSTEM +     * @see #TYPE_ACCESSIBILITY_OVERLAY       */      public int getType() {          return mType; @@ -93,7 +107,7 @@ public final class AccessibilityWindowInfo implements Parcelable {      /**       * Sets the type of the window.       * -     * @param The type +     * @param type The type       *       * @hide       */ @@ -115,7 +129,7 @@ public final class AccessibilityWindowInfo implements Parcelable {       * Sets the layer which determines the Z-order of the window. Windows       * with greater layer appear on top of windows with lesser layer.       * -     * @param The window layer. +     * @param layer The window layer.       *       * @hide       */ @@ -174,7 +188,7 @@ public final class AccessibilityWindowInfo implements Parcelable {      /**       * Sets the unique window id.       * -     * @param windowId The window id. +     * @param id The window id.       *       * @hide       */ @@ -230,7 +244,7 @@ public final class AccessibilityWindowInfo implements Parcelable {       * the user is currently touching or the window has input focus       * and the user is not touching any window.       * -     * @param Whether this is the active window. +     * @param active Whether this is the active window.       *       * @hide       */ @@ -250,7 +264,7 @@ public final class AccessibilityWindowInfo implements Parcelable {      /**       * Sets if this window has input focus.       * -     * @param Whether has input focus. +     * @param focused Whether has input focus.       *       * @hide       */ @@ -264,18 +278,18 @@ public final class AccessibilityWindowInfo implements Parcelable {       * @return Whether has accessibility focus.       */      public boolean isAccessibilityFocused() { -        return getBooleanProperty(BOOLEAN_PROPERTY_ACCESSIBLITY_FOCUSED); +        return getBooleanProperty(BOOLEAN_PROPERTY_ACCESSIBILITY_FOCUSED);      }      /**       * Sets if this window has accessibility focus.       * -     * @param Whether has accessibility focus. +     * @param focused Whether has accessibility focus.       *       * @hide       */      public void setAccessibilityFocused(boolean focused) { -        setBooleanProperty(BOOLEAN_PROPERTY_ACCESSIBLITY_FOCUSED, focused); +        setBooleanProperty(BOOLEAN_PROPERTY_ACCESSIBILITY_FOCUSED, focused);      }      /** @@ -534,6 +548,9 @@ public final class AccessibilityWindowInfo implements Parcelable {              case TYPE_SYSTEM: {                  return "TYPE_SYSTEM";              } +            case TYPE_ACCESSIBILITY_OVERLAY: { +                return "TYPE_ACCESSIBILITY_OVERLAY"; +            }              default:                  return "<UNKNOWN>";          } diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index f90a9fe24e92..75dfccad3728 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -1120,6 +1120,9 @@ public class ImageView extends View {      /** @hide */      public void animateTransform(Matrix matrix) { +        if (mDrawable == null) { +            return; +        }          if (matrix == null) {              mDrawable.setBounds(0, 0, getWidth(), getHeight());          } else { diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java index dd165ae94ecb..be4cdc16e1d3 100644 --- a/core/java/android/widget/Toast.java +++ b/core/java/android/widget/Toast.java @@ -235,6 +235,14 @@ public class Toast {      public int getYOffset() {          return mTN.mY;      } + +    /** +     * Gets the LayoutParams for the Toast window. +     * @hide +     */ +    public WindowManager.LayoutParams getWindowParams() { +        return mTN.mParams; +    }      /**       * Make a standard toast that just contains a text view. diff --git a/core/java/com/android/internal/http/multipart/FilePart.java b/core/java/com/android/internal/http/multipart/FilePart.java index bfcda0074f0f..45e4be68dd16 100644 --- a/core/java/com/android/internal/http/multipart/FilePart.java +++ b/core/java/com/android/internal/http/multipart/FilePart.java @@ -51,9 +51,14 @@ import org.apache.commons.logging.LogFactory;   * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>   * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>   *    - * @since 2.0  + * @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. */ diff --git a/core/java/com/android/internal/http/multipart/MultipartEntity.java b/core/java/com/android/internal/http/multipart/MultipartEntity.java index 2c5e7f64e33e..531925174453 100644 --- a/core/java/com/android/internal/http/multipart/MultipartEntity.java +++ b/core/java/com/android/internal/http/multipart/MultipartEntity.java @@ -80,7 +80,13 @@ import org.apache.commons.logging.LogFactory;   * </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); diff --git a/core/java/com/android/internal/http/multipart/Part.java b/core/java/com/android/internal/http/multipart/Part.java index cb1b5465389f..1d66dc674331 100644 --- a/core/java/com/android/internal/http/multipart/Part.java +++ b/core/java/com/android/internal/http/multipart/Part.java @@ -48,7 +48,13 @@ import org.apache.commons.logging.LogFactory;   * @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. */ diff --git a/core/java/com/android/internal/http/multipart/StringPart.java b/core/java/com/android/internal/http/multipart/StringPart.java index c98257e27041..73d0f908ac2a 100644 --- a/core/java/com/android/internal/http/multipart/StringPart.java +++ b/core/java/com/android/internal/http/multipart/StringPart.java @@ -46,7 +46,13 @@ import org.apache.commons.logging.LogFactory;   * @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. */ diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index 8794d319e179..e6bcea1eb4ab 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -43,6 +43,7 @@ interface IStatusBarService      void onPanelRevealed();      void onPanelHidden();      void onNotificationClick(String key); +    void onNotificationActionClick(String key, int actionIndex);      void onNotificationError(String pkg, String tag, int id,              int uid, int initialPid, String message, int userId);      void onClearAllNotifications(int userId); diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp index b3d9890a2199..a0b2ca830b65 100644 --- a/core/jni/android_view_Surface.cpp +++ b/core/jni/android_view_Surface.cpp @@ -374,6 +374,7 @@ static jlong create(JNIEnv* env, jclass clazz, jlong rootNodePtr, jlong surfaceP      ContextFactory factory;      RenderProxy* proxy = new RenderProxy(false, rootNode, &factory);      proxy->loadSystemProperties(); +    proxy->setSwapBehavior(kSwap_discardBuffer);      proxy->initialize(surface);      // Shadows can't be used via this interface, so just set the light source      // to all 0s. (and width & height are unused, TODO remove them) diff --git a/docs/html/distribute/essentials/quality/wear.jd b/docs/html/distribute/essentials/quality/wear.jd index aa3e126abec5..667e945fbd1e 100644 --- a/docs/html/distribute/essentials/quality/wear.jd +++ b/docs/html/distribute/essentials/quality/wear.jd @@ -24,9 +24,7 @@ page.image=/distribute/images/gp-wear-quality.png  </div>  </div> -<div class="top-right-float" style="padding-right:0;margin-bottom:1em;"> -  <img src="{@docRoot}distribute/images/gp-wear-quality.png" style="width:460px;"> -</div> +<img src="{@docRoot}distribute/images/gp-wear-quality.png" style="width:480px;">  <p>    Android Wear aims to provide users with just the right information at just the right time. Great @@ -334,7 +332,7 @@ data-sortorder="-timestamp" data-cardsizes="6x2" data-maxresults="6">    </td>    <td>      <p style="margin-bottom:.5em;"> -      App includes at least one Wear screenshot in Play details page. +      App includes at least one Wear screenshot in its Play Store Listing.        (<a href="https://support.google.com/googleplay/android-developer/answer/1078870?hl=en">Learn how</a>)      </p>    </td> diff --git a/docs/html/distribute/images/gp-wear-quality.png b/docs/html/distribute/images/gp-wear-quality.pngBinary files differ index 41ae2bc493c1..a51a32c1ad09 100644 --- a/docs/html/distribute/images/gp-wear-quality.png +++ b/docs/html/distribute/images/gp-wear-quality.png diff --git a/docs/html/samples/wearable.jd b/docs/html/samples/wearable.jd new file mode 100644 index 000000000000..311437425a1c --- /dev/null +++ b/docs/html/samples/wearable.jd @@ -0,0 +1,11 @@ +page.title=Wearable +@jd:body + + +<div id="samples" class="wearable"> +</div> + + +<script> +  $(document).ready(showSamples); +</script> diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd index 3d9ef21bfc5b..a64679532d7c 100644 --- a/docs/html/sdk/index.jd +++ b/docs/html/sdk/index.jd @@ -243,7 +243,7 @@ This is the Android Software Development Kit License Agreement  <h1 style="margin-top:0">Get the Android SDK</h1> -<p>The Android SDK provides you the API libraries and developer tools necessary to build, test, +<p>The Android SDK provides the API libraries and developer tools necessary to build, test,    and debug apps for Android.</p>  <p>Download the ADT Bundle to quickly start developing apps. It includes the essential Android diff --git a/docs/html/tools/debugging/debugging-memory.jd b/docs/html/tools/debugging/debugging-memory.jd index fccb67ec7a60..ae67b3c16df7 100644 --- a/docs/html/tools/debugging/debugging-memory.jd +++ b/docs/html/tools/debugging/debugging-memory.jd @@ -243,7 +243,7 @@ here, as some details of the output differ across platform versions.</p>     Other mmap    107       0       8       8     324      68        Unknown   6994(4)    0     252    6992(4)    0       0          TOTAL  24358(1) 4188    9724   17972(2)16388    4260(2)16968   16595     336 -  +   Objects                 Views:    426         ViewRootImpl:        3(8)           AppContexts:      6(7)        Activities:        2(7) @@ -251,7 +251,7 @@ here, as some details of the output differ across platform versions.</p>         Local Binders:     64        Proxy Binders:       34      Death Recipients:      0       OpenSSL Sockets:      1 -  +   SQL           MEMORY_USED:   1739    PAGECACHE_OVERFLOW:   1164          MALLOC_SIZE:       62 @@ -374,7 +374,7 @@ all app processes, they don’t matter very much to your own heap analysis.</p>  <p>To analyze your heap dump, you can use a standard tool like jhat or the <a href=  "http://www.eclipse.org/mat/downloads.php">Eclipse Memory Analyzer Tool</a> (MAT). However, first  you'll need to convert the HPROF file from Android's format to the J2SE HPROF format. You can do -this using the <code>hprof-conv</code> tool provided in the <code><sdk>/tools/</code> +this using the <code>hprof-conv</code> tool provided in the <code><sdk>/platform-tools/</code>  directory. Simply run the <code>hprof-conv</code> command with two arguments: the original HPROF  file and the location to write the converted HPROF file. For example:</p> diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd index 20388be11fa7..3e3cb4b374da 100644 --- a/docs/html/tools/sdk/tools-notes.jd +++ b/docs/html/tools/sdk/tools-notes.jd @@ -13,7 +13,7 @@ latest revision of the SDK Tools in the <code><sdk>/tools</code> directory  of the SDK Tools, use the <em>Android SDK Manager</em> to get the  update, rather than downloading a new SDK starter package. For more information  about how to update, see <a -href="{@docRoot}sdk/exploring.html#UpdatingComponents">Exploring the SDK</a>.</p> +href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</p>  <h2 id="notes">Revisions</h2> diff --git a/docs/html/training/building-wearables.jd b/docs/html/training/building-wearables.jd index 0745c93a015d..d751a8195b66 100644 --- a/docs/html/training/building-wearables.jd +++ b/docs/html/training/building-wearables.jd @@ -1,6 +1,6 @@  page.title=Building Apps for Wearables  page.trainingcourse=true -page.image=wear/images/notifications.png +page.image=wear/images/02_create.png  page.metaDescription=Learn how to build notifications, send and sync data, and use voice actions.  @jd:body diff --git a/docs/html/training/search/index.jd b/docs/html/training/search/index.jd index 612e8e88aced..66874bb2732b 100644 --- a/docs/html/training/search/index.jd +++ b/docs/html/training/search/index.jd @@ -49,5 +49,5 @@ startpage=true      <dt><b><a href="backward-compat.html">Remaining Backward Compatible</a></b></dt> -    <dd>Learn how to keep search features backward compatible with older devices by using.</dd> +    <dd>Learn how to keep search features backward compatible with older devices.</dd>    </dl> diff --git a/docs/html/training/wearables/apps/index.jd b/docs/html/training/wearables/apps/index.jd index ffb4131a2e16..256205bc7a05 100644 --- a/docs/html/training/wearables/apps/index.jd +++ b/docs/html/training/wearables/apps/index.jd @@ -1,6 +1,6 @@  page.title=Creating Wearable Apps  page.tags="wear","wearable","app" -page.image=wear/images/02_notifications.png +page.image=wear/images/01_create.png  @jd:body diff --git a/docs/html/training/wearables/ui/index.jd b/docs/html/training/wearables/ui/index.jd index 8ef6fe7baa17..5d9749091411 100644 --- a/docs/html/training/wearables/ui/index.jd +++ b/docs/html/training/wearables/ui/index.jd @@ -1,4 +1,5 @@  page.title=Creating Custom UIs for Wear Devices +page.image=wear/images/10_uilib.png  @jd:body diff --git a/docs/html/wear/images/01_create.png b/docs/html/wear/images/01_create.pngBinary files differ new file mode 100644 index 000000000000..5a39dde4d1bd --- /dev/null +++ b/docs/html/wear/images/01_create.png diff --git a/docs/html/wear/images/02_create.png b/docs/html/wear/images/02_create.pngBinary files differ new file mode 100644 index 000000000000..e722df1170ce --- /dev/null +++ b/docs/html/wear/images/02_create.png diff --git a/docs/html/wear/images/10_uilib.png b/docs/html/wear/images/10_uilib.pngBinary files differ new file mode 100644 index 000000000000..de7be57e6971 --- /dev/null +++ b/docs/html/wear/images/10_uilib.png diff --git a/libs/androidfw/tests/Android.mk b/libs/androidfw/tests/Android.mk index 5808d201643e..1344dd9905d8 100644 --- a/libs/androidfw/tests/Android.mk +++ b/libs/androidfw/tests/Android.mk @@ -26,6 +26,7 @@ testFiles := \      Idmap_test.cpp \      ResTable_test.cpp \      Split_test.cpp \ +    TestHelpers.cpp \      Theme_test.cpp \      TypeWrappers_test.cpp \      ZipUtils_test.cpp diff --git a/libs/androidfw/tests/ResTable_test.cpp b/libs/androidfw/tests/ResTable_test.cpp index 89d271d0bcd6..6a9314e5ffb8 100644 --- a/libs/androidfw/tests/ResTable_test.cpp +++ b/libs/androidfw/tests/ResTable_test.cpp @@ -37,8 +37,6 @@ namespace {  #include "data/lib/lib_arsc.h" -enum { MAY_NOT_BE_BAG = false }; -  TEST(ResTableTest, shouldLoadSuccessfully) {      ResTable table;      ASSERT_EQ(NO_ERROR, table.add(basic_arsc, basic_arsc_len)); @@ -48,15 +46,7 @@ TEST(ResTableTest, simpleTypeIsRetrievedCorrectly) {      ResTable table;      ASSERT_EQ(NO_ERROR, table.add(basic_arsc, basic_arsc_len)); -    Res_value val; -    ssize_t block = table.getResource(base::R::string::test1, &val, MAY_NOT_BE_BAG); - -    ASSERT_GE(block, 0); -    ASSERT_EQ(Res_value::TYPE_STRING, val.dataType); - -    const ResStringPool* pool = table.getTableStringBlock(block); -    ASSERT_TRUE(NULL != pool); -    ASSERT_EQ(String8("test1"), pool->string8ObjectAt(val.data)); +    EXPECT_TRUE(IsStringEqual(table, base::R::string::test1, "test1"));  }  TEST(ResTableTest, resourceNameIsResolved) { diff --git a/libs/androidfw/tests/Split_test.cpp b/libs/androidfw/tests/Split_test.cpp index f63f566fa444..b69d68572e6a 100644 --- a/libs/androidfw/tests/Split_test.cpp +++ b/libs/androidfw/tests/Split_test.cpp @@ -42,6 +42,9 @@ namespace {   * Package: com.android.test.basic   */  #include "data/basic/split_de_fr_arsc.h" +#include "data/basic/split_hdpi_v4_arsc.h" +#include "data/basic/split_xhdpi_v4_arsc.h" +#include "data/basic/split_xxhdpi_v4_arsc.h"  /**   * Include a binary resource table. This table @@ -163,6 +166,33 @@ TEST(SplitTest, TypeEntrySpecFlagsAreUpdated) {      EXPECT_EQ(ResTable_config::CONFIG_LOCALE, frSpecFlags);  } +TEST(SplitTest, SelectBestDensity) { +    ResTable_config baseConfig; +    memset(&baseConfig, 0, sizeof(baseConfig)); +    baseConfig.density = ResTable_config::DENSITY_XHIGH; +    baseConfig.sdkVersion = 21; + +    ResTable table; +    table.setParameters(&baseConfig); +    ASSERT_EQ(NO_ERROR, table.add(basic_arsc, basic_arsc_len)); +    ASSERT_EQ(NO_ERROR, table.add(split_hdpi_v4_arsc, split_hdpi_v4_arsc_len)); + +    EXPECT_TRUE(IsStringEqual(table, base::R::string::density, "hdpi")); + +    ASSERT_EQ(NO_ERROR, table.add(split_xhdpi_v4_arsc, split_xhdpi_v4_arsc_len)); + +    EXPECT_TRUE(IsStringEqual(table, base::R::string::density, "xhdpi")); + +    ASSERT_EQ(NO_ERROR, table.add(split_xxhdpi_v4_arsc, split_xxhdpi_v4_arsc_len)); + +    EXPECT_TRUE(IsStringEqual(table, base::R::string::density, "xhdpi")); + +    baseConfig.density = ResTable_config::DENSITY_XXHIGH; +    table.setParameters(&baseConfig); + +    EXPECT_TRUE(IsStringEqual(table, base::R::string::density, "xxhdpi")); +} +  TEST(SplitFeatureTest, TestNewResourceIsAccessible) {      ResTable table;      ASSERT_EQ(NO_ERROR, table.add(basic_arsc, basic_arsc_len)); @@ -188,7 +218,7 @@ TEST(SplitFeatureTest, TestNewResourceNameHasCorrectName) {      ASSERT_EQ(NO_ERROR, table.add(feature_arsc, feature_arsc_len)); -    EXPECT_TRUE(table.getResourceName(base::R::string::test3, false, &name)); +    ASSERT_TRUE(table.getResourceName(base::R::string::test3, false, &name));      EXPECT_EQ(String16("com.android.test.basic"),              String16(name.package, name.packageLen)); diff --git a/libs/androidfw/tests/TestHelpers.cpp b/libs/androidfw/tests/TestHelpers.cpp new file mode 100644 index 000000000000..41a19a7f2b24 --- /dev/null +++ b/libs/androidfw/tests/TestHelpers.cpp @@ -0,0 +1,48 @@ +/* + * 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. + */ + +#include "TestHelpers.h" + +#include <androidfw/ResourceTypes.h> +#include <utils/String8.h> +#include <gtest/gtest.h> + +namespace android { + +::testing::AssertionResult IsStringEqual(const ResTable& table, uint32_t resourceId, const char* expectedStr) { +    Res_value val; +    ssize_t block = table.getResource(resourceId, &val, MAY_NOT_BE_BAG); +    if (block < 0) { +        return ::testing::AssertionFailure() << "could not find resource"; +    } + +    if (val.dataType != Res_value::TYPE_STRING) { +        return ::testing::AssertionFailure() << "resource is not a string"; +    } + +    const ResStringPool* pool = table.getTableStringBlock(block); +    if (pool == NULL) { +        return ::testing::AssertionFailure() << "table has no string pool for block " << block; +    } + +    const String8 actual = pool->string8ObjectAt(val.data); +    if (String8(expectedStr) != actual) { +        return ::testing::AssertionFailure() << actual.string(); +    } +    return ::testing::AssertionSuccess() << actual.string(); +} + +} // namespace android diff --git a/libs/androidfw/tests/TestHelpers.h b/libs/androidfw/tests/TestHelpers.h index fe2e5ce29eff..ac80d8868090 100644 --- a/libs/androidfw/tests/TestHelpers.h +++ b/libs/androidfw/tests/TestHelpers.h @@ -6,6 +6,7 @@  #include <androidfw/ResourceTypes.h>  #include <utils/String8.h>  #include <utils/String16.h> +#include <gtest/gtest.h>  static inline ::std::ostream& operator<<(::std::ostream& out, const android::String8& str) {      return out << str.string(); @@ -17,6 +18,8 @@ static inline ::std::ostream& operator<<(::std::ostream& out, const android::Str  namespace android { +enum { MAY_NOT_BE_BAG = false }; +  static inline bool operator==(const android::ResTable_config& a, const android::ResTable_config& b) {      return memcmp(&a, &b, sizeof(a)) == 0;  } @@ -25,6 +28,8 @@ static inline ::std::ostream& operator<<(::std::ostream& out, const android::Res      return out << c.toString().string();  } +::testing::AssertionResult IsStringEqual(const ResTable& table, uint32_t resourceId, const char* expectedStr); +  } // namespace android  #endif // __TEST_HELPERS_H diff --git a/libs/androidfw/tests/data/app/R.h b/libs/androidfw/tests/data/app/R.h index 780a11610ef5..23e68e3e80dc 100644 --- a/libs/androidfw/tests/data/app/R.h +++ b/libs/androidfw/tests/data/app/R.h @@ -1,3 +1,19 @@ +/* + * 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. + */ +  #ifndef __APP_R_H  #define __APP_R_H diff --git a/libs/androidfw/tests/data/app/build b/libs/androidfw/tests/data/app/build index 89c464120ea3..62257bc26d4b 100755 --- a/libs/androidfw/tests/data/app/build +++ b/libs/androidfw/tests/data/app/build @@ -1,4 +1,19 @@  #!/bin/bash +# +# 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. +#  aapt package -v -I ../system/bundle.apk -M AndroidManifest.xml -S res -F bundle.apk -f && \  unzip bundle.apk resources.arsc && \ diff --git a/libs/androidfw/tests/data/app/res/values/values.xml b/libs/androidfw/tests/data/app/res/values/values.xml index b0ead387b0a8..c1cf64c247a3 100644 --- a/libs/androidfw/tests/data/app/res/values/values.xml +++ b/libs/androidfw/tests/data/app/res/values/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <attr name="number" format="integer"/>      <style name="Theme.One" parent="@android:style/Theme.One"> diff --git a/libs/androidfw/tests/data/basic/R.h b/libs/androidfw/tests/data/basic/R.h index 363dcb9e170c..aaac74059f58 100644 --- a/libs/androidfw/tests/data/basic/R.h +++ b/libs/androidfw/tests/data/basic/R.h @@ -1,3 +1,19 @@ +/* + * 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. + */ +  #ifndef __BASE_R_H  #define __BASE_R_H @@ -21,9 +37,10 @@ namespace string {      enum {          test1       = 0x7f030000,   // default          test2       = 0x7f030001,   // default +        density     = 0x7f030002,   // default -        test3       = 0x7f070000,   // default (in feature) -        test4       = 0x7f070001,   // default (in feature) +        test3       = 0x7f080000,   // default (in feature) +        test4       = 0x7f080001,   // default (in feature)      };  } @@ -32,7 +49,7 @@ namespace integer {          number1     = 0x7f040000,   // default, sv          number2     = 0x7f040001,   // default -        test3       = 0x7f080000,   // default (in feature) +        test3       = 0x7f090000,   // default (in feature)      };  } diff --git a/libs/androidfw/tests/data/basic/basic_arsc.h b/libs/androidfw/tests/data/basic/basic_arsc.h index 61cb94c65828..13ab4fa0d0ea 100644 --- a/libs/androidfw/tests/data/basic/basic_arsc.h +++ b/libs/androidfw/tests/data/basic/basic_arsc.h @@ -1,5 +1,5 @@  unsigned char basic_arsc[] = { -  0x02, 0x00, 0x0c, 0x00, 0x60, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x0c, 0x00, 0x68, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,    0x01, 0x00, 0x1c, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, @@ -16,7 +16,7 @@ unsigned char basic_arsc[] = {    0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,    0x31, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,    0x74, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, -  0x98, 0x06, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, +  0xa0, 0x06, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00,    0x6d, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00,    0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00,    0x73, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00, @@ -101,61 +101,61 @@ unsigned char basic_arsc[] = {    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,    0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, -  0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, -  0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, -  0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x02, 0x44, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, -  0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, -  0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, -  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, -  0x6c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, -  0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, +  0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, -  0xc8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x06, 0x7f, 0x01, 0x02, 0x44, 0x00, -  0x5c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, -  0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x73, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -  0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, -  0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, -  0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x90, 0x00, 0x00, 0x00, -  0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, -  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, +  0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0xc8, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01, +  0x00, 0x00, 0x06, 0x7f, 0x01, 0x02, 0x44, 0x00, 0x5c, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x76, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, +  0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0x90, 0x01, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x02, 0x44, 0x00, 0x90, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, -  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, 0x64, 0x00, 0x00, 0x00, -  0x01, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x7f, -  0x10, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x7f, -  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, -  0x2c, 0x01, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, -  0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x01, 0x02, 0x44, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, -  0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f, +  0x08, 0x00, 0x00, 0x10, 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, +  0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x7f, 0x10, 0x00, 0x01, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x7f, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, 0x2c, 0x01, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, +  0x7c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x10, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, -  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, -  0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, -  0x03, 0x00, 0x00, 0x00 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, +  0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00  }; -unsigned int basic_arsc_len = 1888; +unsigned int basic_arsc_len = 1896; diff --git a/libs/androidfw/tests/data/basic/build b/libs/androidfw/tests/data/basic/build index 036e46828189..fd289fad62b1 100755 --- a/libs/androidfw/tests/data/basic/build +++ b/libs/androidfw/tests/data/basic/build @@ -1,11 +1,39 @@  #!/bin/bash +# +# 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. +#  PATH_TO_FRAMEWORK_RES=$(gettop)/prebuilts/sdk/current/android.jar -aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES --split fr,de -F bundle.apk -f && \ +aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES --split hdpi --split xhdpi --split xxhdpi --split fr,de -F bundle.apk -f && \  unzip bundle.apk resources.arsc && \  mv resources.arsc basic.arsc && \  xxd -i basic.arsc > basic_arsc.h && \ +\  unzip bundle_de_fr.apk resources.arsc && \  mv resources.arsc split_de_fr.arsc && \ -xxd -i split_de_fr.arsc > split_de_fr_arsc.h +xxd -i split_de_fr.arsc > split_de_fr_arsc.h && \ +\ +unzip bundle_hdpi-v4.apk resources.arsc && \ +mv resources.arsc split_hdpi_v4.arsc && \ +xxd -i split_hdpi_v4.arsc > split_hdpi_v4_arsc.h && \ +\ +unzip bundle_xhdpi-v4.apk resources.arsc && \ +mv resources.arsc split_xhdpi_v4.arsc && \ +xxd -i split_xhdpi_v4.arsc > split_xhdpi_v4_arsc.h && \ +\ +unzip bundle_xxhdpi-v4.apk resources.arsc && \ +mv resources.arsc split_xxhdpi_v4.arsc && \ +xxd -i split_xxhdpi_v4.arsc > split_xxhdpi_v4_arsc.h \ diff --git a/libs/androidfw/tests/data/basic/res/layout-fr-sw600dp/main.xml b/libs/androidfw/tests/data/basic/res/layout-fr-sw600dp/main.xml index 05ffd5856487..0dcf7e092577 100644 --- a/libs/androidfw/tests/data/basic/res/layout-fr-sw600dp/main.xml +++ b/libs/androidfw/tests/data/basic/res/layout-fr-sw600dp/main.xml @@ -1,3 +1,18 @@  <?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. +--> +  <merge>  </merge> diff --git a/libs/androidfw/tests/data/basic/res/layout/main.xml b/libs/androidfw/tests/data/basic/res/layout/main.xml index 05ffd5856487..0dcf7e092577 100644 --- a/libs/androidfw/tests/data/basic/res/layout/main.xml +++ b/libs/androidfw/tests/data/basic/res/layout/main.xml @@ -1,3 +1,18 @@  <?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. +--> +  <merge>  </merge> diff --git a/libs/androidfw/tests/data/basic/res/values-de/values.xml b/libs/androidfw/tests/data/basic/res/values-de/values.xml index 103c6a3643c4..2683a7eee68c 100644 --- a/libs/androidfw/tests/data/basic/res/values-de/values.xml +++ b/libs/androidfw/tests/data/basic/res/values-de/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <string name="test1">versuch 1</string>      <string name="test2">versuch 2</string> diff --git a/libs/androidfw/tests/data/basic/res/values-fr/values.xml b/libs/androidfw/tests/data/basic/res/values-fr/values.xml index 1806a2dc12a9..7d3bed3f220f 100644 --- a/libs/androidfw/tests/data/basic/res/values-fr/values.xml +++ b/libs/androidfw/tests/data/basic/res/values-fr/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <string name="test1">essai 1</string>      <string name="test2">essai 2</string> diff --git a/libs/androidfw/tests/data/basic/res/values-hdpi/values.xml b/libs/androidfw/tests/data/basic/res/values-hdpi/values.xml new file mode 100644 index 000000000000..04bf943f7fe4 --- /dev/null +++ b/libs/androidfw/tests/data/basic/res/values-hdpi/values.xml @@ -0,0 +1,19 @@ +<?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. +--> + +<resources> +    <string name="density">hdpi</string> +</resources> diff --git a/libs/androidfw/tests/data/basic/res/values-sv/values.xml b/libs/androidfw/tests/data/basic/res/values-sv/values.xml index 9d523071dd07..7351b4989c92 100644 --- a/libs/androidfw/tests/data/basic/res/values-sv/values.xml +++ b/libs/androidfw/tests/data/basic/res/values-sv/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <integer name="number1">400</integer>  </resources> diff --git a/libs/androidfw/tests/data/basic/res/values-xhdpi/values.xml b/libs/androidfw/tests/data/basic/res/values-xhdpi/values.xml new file mode 100644 index 000000000000..845e9a02e9b0 --- /dev/null +++ b/libs/androidfw/tests/data/basic/res/values-xhdpi/values.xml @@ -0,0 +1,19 @@ +<?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. +--> + +<resources> +    <string name="density">xhdpi</string> +</resources> diff --git a/libs/androidfw/tests/data/basic/res/values-xxhdpi/values.xml b/libs/androidfw/tests/data/basic/res/values-xxhdpi/values.xml new file mode 100644 index 000000000000..964da020d847 --- /dev/null +++ b/libs/androidfw/tests/data/basic/res/values-xxhdpi/values.xml @@ -0,0 +1,19 @@ +<?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. +--> + +<resources> +    <string name="density">xxhdpi</string> +</resources> diff --git a/libs/androidfw/tests/data/basic/res/values/values.xml b/libs/androidfw/tests/data/basic/res/values/values.xml index 662eda6a4ed5..a010cca182ee 100644 --- a/libs/androidfw/tests/data/basic/res/values/values.xml +++ b/libs/androidfw/tests/data/basic/res/values/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <attr name="attr1" format="reference|integer" />      <attr name="attr2" format="reference|integer" /> diff --git a/libs/androidfw/tests/data/basic/split_de_fr_arsc.h b/libs/androidfw/tests/data/basic/split_de_fr_arsc.h index a8eaf0b2f69d..b742d2811487 100644 --- a/libs/androidfw/tests/data/basic/split_de_fr_arsc.h +++ b/libs/androidfw/tests/data/basic/split_de_fr_arsc.h @@ -1,5 +1,5 @@  unsigned char split_de_fr_arsc[] = { -  0x02, 0x00, 0x0c, 0x00, 0xd8, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x0c, 0x00, 0xe4, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,    0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, @@ -10,7 +10,7 @@ unsigned char split_de_fr_arsc[] = {    0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00,    0x61, 0x00, 0x69, 0x00, 0x20, 0x00, 0x31, 0x00, 0x00, 0x00, 0x07, 0x00,    0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x61, 0x00, 0x69, 0x00, 0x20, 0x00, -  0x32, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x50, 0x03, 0x00, 0x00, +  0x32, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x5c, 0x03, 0x00, 0x00,    0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,    0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,    0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, @@ -55,24 +55,25 @@ unsigned char split_de_fr_arsc[] = {    0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,    0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, -  0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, -  0x04, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00, -  0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, -  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x1c, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, +  0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, -  0x01, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00, -  0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, -  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x72, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, +  0xff, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, +  0x01, 0x02, 0x44, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x66, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, +  0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00,    0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,    0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, @@ -82,4 +83,4 @@ unsigned char split_de_fr_arsc[] = {    0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,    0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  }; -unsigned int split_de_fr_arsc_len = 984; +unsigned int split_de_fr_arsc_len = 996; diff --git a/libs/androidfw/tests/data/basic/split_hdpi_v4_arsc.h b/libs/androidfw/tests/data/basic/split_hdpi_v4_arsc.h new file mode 100644 index 000000000000..e9fb7ea47b75 --- /dev/null +++ b/libs/androidfw/tests/data/basic/split_hdpi_v4_arsc.h @@ -0,0 +1,68 @@ +unsigned char split_hdpi_v4_arsc[] = { +  0x02, 0x00, 0x0c, 0x00, 0x08, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x68, 0x00, +  0x64, 0x00, 0x70, 0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, +  0xd0, 0x02, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, +  0x6d, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, +  0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, +  0x73, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00, +  0x69, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x20, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, +  0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, +  0x2c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, +  0x06, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00, 0x6f, 0x00, 0x75, 0x00, +  0x74, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, +  0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x07, 0x00, 0x69, 0x00, +  0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00, +  0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, 0x79, 0x00, 0x6c, 0x00, +  0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00, 0x72, 0x00, 0x72, 0x00, +  0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, +  0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6e, 0x00, +  0x73, 0x00, 0x69, 0x00, 0x74, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, +  0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x02, 0x44, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +unsigned int split_hdpi_v4_arsc_len = 776; diff --git a/libs/androidfw/tests/data/basic/split_xhdpi_v4_arsc.h b/libs/androidfw/tests/data/basic/split_xhdpi_v4_arsc.h new file mode 100644 index 000000000000..7835f71419f2 --- /dev/null +++ b/libs/androidfw/tests/data/basic/split_xhdpi_v4_arsc.h @@ -0,0 +1,68 @@ +unsigned char split_xhdpi_v4_arsc[] = { +  0x02, 0x00, 0x0c, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x78, 0x00, +  0x68, 0x00, 0x64, 0x00, 0x70, 0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x02, 0x20, 0x01, 0xd0, 0x02, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +  0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x6e, 0x00, +  0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x2e, 0x00, +  0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x62, 0x00, +  0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0xb0, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, +  0x1c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, +  0x4c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00, +  0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00, +  0x6f, 0x00, 0x75, 0x00, 0x74, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00, +  0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, +  0x07, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, +  0x65, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, +  0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00, +  0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x64, 0x00, +  0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x69, 0x00, 0x74, 0x00, 0x79, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x60, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, +  0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +unsigned int split_xhdpi_v4_arsc_len = 780; diff --git a/libs/androidfw/tests/data/basic/split_xxhdpi_v4_arsc.h b/libs/androidfw/tests/data/basic/split_xxhdpi_v4_arsc.h new file mode 100644 index 000000000000..f805db1b009e --- /dev/null +++ b/libs/androidfw/tests/data/basic/split_xxhdpi_v4_arsc.h @@ -0,0 +1,68 @@ +unsigned char split_xxhdpi_v4_arsc[] = { +  0x02, 0x00, 0x0c, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x78, 0x00, +  0x78, 0x00, 0x68, 0x00, 0x64, 0x00, 0x70, 0x00, 0x69, 0x00, 0x00, 0x00, +  0x00, 0x02, 0x20, 0x01, 0xd0, 0x02, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +  0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x6e, 0x00, +  0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x2e, 0x00, +  0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x62, 0x00, +  0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0xb0, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, +  0x1c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, +  0x4c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00, +  0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00, +  0x6f, 0x00, 0x75, 0x00, 0x74, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00, +  0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, +  0x07, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, +  0x65, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, +  0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00, +  0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x64, 0x00, +  0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x69, 0x00, 0x74, 0x00, 0x79, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x60, 0x00, 0x00, 0x00, +  0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, +  0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, +  0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +unsigned int split_xxhdpi_v4_arsc_len = 780; diff --git a/libs/androidfw/tests/data/feature/build b/libs/androidfw/tests/data/feature/build index b547dc215595..0f3307f518ec 100755 --- a/libs/androidfw/tests/data/feature/build +++ b/libs/androidfw/tests/data/feature/build @@ -1,4 +1,19 @@  #!/bin/bash +# +# 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. +#  aapt package -M AndroidManifest.xml -S res --feature-of ../basic/bundle.apk -F bundle.apk -f && \  unzip bundle.apk resources.arsc && \ diff --git a/libs/androidfw/tests/data/feature/feature_arsc.h b/libs/androidfw/tests/data/feature/feature_arsc.h index cf7647d71b05..cd299102e8f6 100644 --- a/libs/androidfw/tests/data/feature/feature_arsc.h +++ b/libs/androidfw/tests/data/feature/feature_arsc.h @@ -1,11 +1,11 @@  unsigned char feature_arsc[] = { -  0x02, 0x00, 0x0c, 0x00, 0x40, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x0c, 0x00, 0x44, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,    0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,    0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x33, 0x00,    0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, -  0x34, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xf4, 0x02, 0x00, 0x00, +  0x34, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xf8, 0x02, 0x00, 0x00,    0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,    0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,    0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, @@ -28,46 +28,46 @@ unsigned char feature_arsc[] = {    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, -  0x2e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x3c, 0x00, 0x65, 0x00, 0x6d, 0x00, -  0x70, 0x00, 0x74, 0x00, 0x79, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x04, 0x00, -  0x61, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, -  0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, -  0x00, 0x00, 0x07, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, -  0x67, 0x00, 0x65, 0x00, 0x72, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, -  0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, -  0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x33, 0x00, -  0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, -  0x34, 0x00, 0x00, 0x00, 0x07, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00, -  0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x02, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, -  0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00, -  0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, +  0x09, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x80, 0x00, 0x00, 0x00, +  0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, +  0x1e, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x3c, 0x00, +  0x65, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x74, 0x00, 0x79, 0x00, 0x3e, 0x00, +  0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, +  0x00, 0x00, 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, +  0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x07, 0x00, 0x69, 0x00, 0x6e, 0x00, +  0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x1c, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, +  0x1c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, +  0x74, 0x00, 0x33, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, +  0x73, 0x00, 0x74, 0x00, 0x34, 0x00, 0x00, 0x00, 0x07, 0x00, 0x6e, 0x00, +  0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x33, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, +  0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, +  0x6c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +  0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, +  0x14, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, +  0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,    0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, -  0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, -  0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, -  0xc8, 0x00, 0x00, 0x00 +  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x10, 0xc8, 0x00, 0x00, 0x00  }; -unsigned int feature_arsc_len = 832; +unsigned int feature_arsc_len = 836; diff --git a/libs/androidfw/tests/data/feature/res/values/values.xml b/libs/androidfw/tests/data/feature/res/values/values.xml index d03445a33d72..343fd6c8389f 100644 --- a/libs/androidfw/tests/data/feature/res/values/values.xml +++ b/libs/androidfw/tests/data/feature/res/values/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <string name="test3">test3</string>      <string name="test4">test4</string> diff --git a/libs/androidfw/tests/data/lib/R.h b/libs/androidfw/tests/data/lib/R.h index 13bf09528c90..ff311208d61a 100644 --- a/libs/androidfw/tests/data/lib/R.h +++ b/libs/androidfw/tests/data/lib/R.h @@ -1,3 +1,19 @@ +/* + * 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. + */ +  #ifndef __LIB_R_H  #define __LIB_R_H diff --git a/libs/androidfw/tests/data/lib/build b/libs/androidfw/tests/data/lib/build index 8e6e70cdc553..41029031028c 100755 --- a/libs/androidfw/tests/data/lib/build +++ b/libs/androidfw/tests/data/lib/build @@ -1,4 +1,19 @@  #!/bin/bash +# +# 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. +#  aapt package -M AndroidManifest.xml -S res -F bundle.apk -f --shared-lib && \  unzip bundle.apk resources.arsc && \ diff --git a/libs/androidfw/tests/data/lib/lib_arsc.h b/libs/androidfw/tests/data/lib/lib_arsc.h index d670c5be18a3..dd3dad5d5f3d 100644 --- a/libs/androidfw/tests/data/lib/lib_arsc.h +++ b/libs/androidfw/tests/data/lib/lib_arsc.h @@ -1,8 +1,8 @@  unsigned char lib_arsc[] = { -  0x02, 0x00, 0x0c, 0x00, 0xc8, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x0c, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,    0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xa0, 0x03, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x90, 0x02, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,    0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,    0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, @@ -37,48 +37,25 @@ unsigned char lib_arsc[] = {    0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00,    0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x00, 0x00, 0x05, 0x00,    0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x00, 0x00, -  0x03, 0x02, 0x0c, 0x00, 0x10, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00, -  0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00, -  0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, -  0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, -  0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x64, 0x00, 0x00, 0x00, -  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, -  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, +  0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, -  0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, -  0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x64, 0x00, 0x00, 0x00, -  0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, -  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, +  0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, +  0x64, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, -  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, -  0x08, 0x00, 0x00, 0x10, 0xbc, 0x02, 0x00, 0x00 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x10, 0xbc, 0x02, 0x00, 0x00  }; -unsigned int lib_arsc_len = 968; +unsigned int lib_arsc_len = 696; diff --git a/libs/androidfw/tests/data/lib/res/values/values.xml b/libs/androidfw/tests/data/lib/res/values/values.xml index a77f0c79b74b..3ec79b1c7663 100644 --- a/libs/androidfw/tests/data/lib/res/values/values.xml +++ b/libs/androidfw/tests/data/lib/res/values/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <attr name="attr1" format="integer" /> diff --git a/libs/androidfw/tests/data/overlay/build b/libs/androidfw/tests/data/overlay/build index 87cf6de4c933..f73767749274 100755 --- a/libs/androidfw/tests/data/overlay/build +++ b/libs/androidfw/tests/data/overlay/build @@ -1,4 +1,19 @@  #!/bin/bash +# +# 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. +#  aapt package -M AndroidManifest.xml -S res -F bundle.apk -f && \  unzip bundle.apk resources.arsc && \ diff --git a/libs/androidfw/tests/data/overlay/res/values/values.xml b/libs/androidfw/tests/data/overlay/res/values/values.xml index 227e88973cc7..3e1af9878429 100644 --- a/libs/androidfw/tests/data/overlay/res/values/values.xml +++ b/libs/androidfw/tests/data/overlay/res/values/values.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <string name="test2">test2-overlay</string>      <integer-array name="integerArray1"> diff --git a/libs/androidfw/tests/data/system/R.h b/libs/androidfw/tests/data/system/R.h index 7a9d3db95586..27f25fec0d01 100644 --- a/libs/androidfw/tests/data/system/R.h +++ b/libs/androidfw/tests/data/system/R.h @@ -1,3 +1,19 @@ +/* + * 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. + */ +  #ifndef __ANDROID_R_H  #define __ANDROID_R_H diff --git a/libs/androidfw/tests/data/system/build b/libs/androidfw/tests/data/system/build index 2a3ac0b9f7d4..1a70e84114b0 100755 --- a/libs/androidfw/tests/data/system/build +++ b/libs/androidfw/tests/data/system/build @@ -1,4 +1,19 @@  #!/bin/bash +# +# 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. +#  aapt package -x -M AndroidManifest.xml -S res -F bundle.apk -f && \  unzip bundle.apk resources.arsc && \ diff --git a/libs/androidfw/tests/data/system/res/values/themes.xml b/libs/androidfw/tests/data/system/res/values/themes.xml index b29848efd023..35d43c77fc7a 100644 --- a/libs/androidfw/tests/data/system/res/values/themes.xml +++ b/libs/androidfw/tests/data/system/res/values/themes.xml @@ -1,4 +1,19 @@  <?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. +--> +  <resources>      <public name="background" type="attr" id="0x01010000"/>      <public name="foreground" type="attr" id="0x01010001"/> diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 3bb47786b223..9d2ae8b6d8ad 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -42,7 +42,8 @@ CanvasContext::CanvasContext(RenderThread& thread, bool translucent,          : mRenderThread(thread)          , mEglManager(thread.eglManager())          , mEglSurface(EGL_NO_SURFACE) -        , mDirtyRegionsEnabled(false) +        , mBufferPreserved(false) +        , mSwapBehavior(kSwap_default)          , mOpaque(!translucent)          , mCanvas(NULL)          , mHaveNewSurface(false) @@ -82,7 +83,8 @@ void CanvasContext::setSurface(ANativeWindow* window) {      }      if (mEglSurface != EGL_NO_SURFACE) { -        mDirtyRegionsEnabled = mEglManager.enableDirtyRegions(mEglSurface); +        const bool preserveBuffer = (mSwapBehavior != kSwap_discardBuffer); +        mBufferPreserved = mEglManager.setPreserveBuffer(mEglSurface, preserveBuffer);          mHaveNewSurface = true;          makeCurrent();      } else { @@ -103,6 +105,10 @@ void CanvasContext::requireSurface() {      makeCurrent();  } +void CanvasContext::setSwapBehavior(SwapBehavior swapBehavior) { +    mSwapBehavior = swapBehavior; +} +  bool CanvasContext::initialize(ANativeWindow* window) {      setSurface(window);      if (mCanvas) return false; @@ -200,7 +206,7 @@ void CanvasContext::draw() {      if (width != mCanvas->getViewportWidth() || height != mCanvas->getViewportHeight()) {          mCanvas->setViewport(width, height);          dirty.setEmpty(); -    } else if (!mDirtyRegionsEnabled || mHaveNewSurface) { +    } else if (!mBufferPreserved || mHaveNewSurface) {          dirty.setEmpty();      } else {          if (!dirty.isEmpty() && !dirty.intersect(0, 0, width, height)) { diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index d4282fada940..e20564b26124 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -48,6 +48,11 @@ namespace renderthread {  class EglManager; +enum SwapBehavior { +    kSwap_default, +    kSwap_discardBuffer, +}; +  // This per-renderer class manages the bridge between the global EGL context  // and the render surface.  // TODO: Rename to Renderer or some other per-window, top-level manager @@ -57,6 +62,9 @@ public:              IContextFactory* contextFactory);      virtual ~CanvasContext(); +    // Won't take effect until next EGLSurface creation +    void setSwapBehavior(SwapBehavior swapBehavior); +      bool initialize(ANativeWindow* window);      void updateSurface(ANativeWindow* window);      void pauseSurface(ANativeWindow* window); @@ -111,7 +119,8 @@ private:      EglManager& mEglManager;      sp<ANativeWindow> mNativeWindow;      EGLSurface mEglSurface; -    bool mDirtyRegionsEnabled; +    bool mBufferPreserved; +    SwapBehavior mSwapBehavior;      bool mOpaque;      OpenGLRenderer* mCanvas; diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index a87834ee0c63..760fc15a8cf7 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -70,12 +70,12 @@ EglManager::EglManager(RenderThread& thread)          , mEglConfig(0)          , mEglContext(EGL_NO_CONTEXT)          , mPBufferSurface(EGL_NO_SURFACE) -        , mRequestDirtyRegions(load_dirty_regions_property()) +        , mAllowPreserveBuffer(load_dirty_regions_property())          , mCurrentSurface(EGL_NO_SURFACE)          , mAtlasMap(NULL)          , mAtlasMapSize(0) { -    mCanSetDirtyRegions = mRequestDirtyRegions; -    ALOGD("Render dirty regions requested: %s", mRequestDirtyRegions ? "true" : "false"); +    mCanSetPreserveBuffer = mAllowPreserveBuffer; +    ALOGD("Use EGL_SWAP_BEHAVIOR_PRESERVED: %s", mAllowPreserveBuffer ? "true" : "false");  }  void EglManager::initialize() { @@ -113,7 +113,7 @@ void EglManager::requireGlContext() {  }  void EglManager::loadConfig() { -    EGLint swapBehavior = mCanSetDirtyRegions ? EGL_SWAP_BEHAVIOR_PRESERVED_BIT : 0; +    EGLint swapBehavior = mCanSetPreserveBuffer ? EGL_SWAP_BEHAVIOR_PRESERVED_BIT : 0;      EGLint attribs[] = {              EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,              EGL_RED_SIZE, 8, @@ -131,10 +131,10 @@ void EglManager::loadConfig() {      if (!eglChooseConfig(mEglDisplay, attribs, &mEglConfig, num_configs, &num_configs)              || num_configs != 1) {          // Failed to get a valid config -        if (mCanSetDirtyRegions) { +        if (mCanSetPreserveBuffer) {              ALOGW("Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...");              // Try again without dirty regions enabled -            mCanSetDirtyRegions = false; +            mCanSetPreserveBuffer = false;              loadConfig();          } else {              LOG_ALWAYS_FATAL("Failed to choose config, error = %s", egl_error_str()); @@ -273,25 +273,30 @@ bool EglManager::swapBuffers(EGLSurface surface) {      return false;  } -bool EglManager::enableDirtyRegions(EGLSurface surface) { -    if (!mRequestDirtyRegions) return false; +bool EglManager::setPreserveBuffer(EGLSurface surface, bool preserve) { +    if (CC_UNLIKELY(!mAllowPreserveBuffer)) return false; -    if (mCanSetDirtyRegions) { -        if (!eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED)) { +    bool preserved = false; +    if (mCanSetPreserveBuffer) { +        preserved = eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, +                preserve ? EGL_BUFFER_PRESERVED : EGL_BUFFER_DESTROYED); +        if (CC_UNLIKELY(!preserved)) {              ALOGW("Failed to set EGL_SWAP_BEHAVIOR on surface %p, error=%s",                      (void*) surface, egl_error_str()); -            return false;          } -        return true;      } -    // Perhaps it is already enabled? -    EGLint value; -    if (!eglQuerySurface(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, &value)) { -        ALOGW("Failed to query EGL_SWAP_BEHAVIOR on surface %p, error=%p", -                (void*) surface, egl_error_str()); -        return false; +    if (CC_UNLIKELY(!preserved)) { +        // Maybe it's already set? +        EGLint swapBehavior; +        if (eglQuerySurface(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, &swapBehavior)) { +            preserved = (swapBehavior == EGL_BUFFER_PRESERVED); +        } else { +            ALOGW("Failed to query EGL_SWAP_BEHAVIOR on surface %p, error=%p", +                                (void*) surface, egl_error_str()); +        }      } -    return value == EGL_BUFFER_PRESERVED; + +    return preserved;  }  } /* namespace renderthread */ diff --git a/libs/hwui/renderthread/EglManager.h b/libs/hwui/renderthread/EglManager.h index 71213fbf9343..ae03ea1fc3b8 100644 --- a/libs/hwui/renderthread/EglManager.h +++ b/libs/hwui/renderthread/EglManager.h @@ -49,7 +49,8 @@ public:      void beginFrame(EGLSurface surface, EGLint* width, EGLint* height);      bool swapBuffers(EGLSurface surface); -    bool enableDirtyRegions(EGLSurface surface); +    // Returns true iff the surface is now preserving buffers. +    bool setPreserveBuffer(EGLSurface surface, bool preserve);      void setTextureAtlas(const sp<GraphicBuffer>& buffer, int64_t* map, size_t mapSize); @@ -71,8 +72,8 @@ private:      EGLContext mEglContext;      EGLSurface mPBufferSurface; -    const bool mRequestDirtyRegions; -    bool mCanSetDirtyRegions; +    const bool mAllowPreserveBuffer; +    bool mCanSetPreserveBuffer;      EGLSurface mCurrentSurface; diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 047819de239a..8f99b4ed90c6 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -103,6 +103,18 @@ void RenderProxy::setFrameInterval(nsecs_t frameIntervalNanos) {      post(task);  } +CREATE_BRIDGE2(setSwapBehavior, CanvasContext* context, SwapBehavior swapBehavior) { +    args->context->setSwapBehavior(args->swapBehavior); +    return NULL; +} + +void RenderProxy::setSwapBehavior(SwapBehavior swapBehavior) { +    SETUP_TASK(setSwapBehavior); +    args->context = mContext; +    args->swapBehavior = swapBehavior; +    post(task); +} +  CREATE_BRIDGE1(loadSystemProperties, CanvasContext* context) {      bool needsRedraw = false;      if (Caches::hasInstance()) { diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h index 678e7e261c77..dddf0c746249 100644 --- a/libs/hwui/renderthread/RenderProxy.h +++ b/libs/hwui/renderthread/RenderProxy.h @@ -31,6 +31,7 @@  #include "../Caches.h"  #include "../IContextFactory.h" +#include "CanvasContext.h"  #include "DrawFrameTask.h"  namespace android { @@ -44,7 +45,6 @@ class Rect;  namespace renderthread { -class CanvasContext;  class ErrorChannel;  class RenderThread;  class RenderProxyBridge; @@ -63,6 +63,8 @@ public:      ANDROID_API virtual ~RenderProxy();      ANDROID_API void setFrameInterval(nsecs_t frameIntervalNanos); +    // Won't take effect until next EGLSurface creation +    ANDROID_API void setSwapBehavior(SwapBehavior swapBehavior);      ANDROID_API bool loadSystemProperties();      ANDROID_API bool initialize(const sp<ANativeWindow>& window); diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java index b3890d45f4d5..691df77e9541 100644 --- a/media/java/android/media/tv/TvContract.java +++ b/media/java/android/media/tv/TvContract.java @@ -1052,6 +1052,24 @@ public final class TvContract {              /** The genre for Gaming. */              public static final String GAMING = "GAMING"; +            /** The genre for Arts. */ +            public static final String ARTS = "ARTS"; + +            /** The genre for Entertainment. */ +            public static final String ENTERTAINMENT = "ENTERTAINMENT"; + +            /** The genre for Life Style. */ +            public static final String LIFE_STYLE = "LIFE_STYLE"; + +            /** The genre for Music. */ +            public static final String MUSIC = "MUSIC"; + +            /** The genre for Premier. */ +            public static final String PREMIER = "PREMIER"; + +            /** The genre for Tech/Science. */ +            public static final String TECH_SCIENCE = "TECH_SCIENCE"; +              private static final ArraySet<String> CANONICAL_GENRES = new ArraySet<String>();              static {                  CANONICAL_GENRES.add(FAMILY_KIDS); @@ -1065,6 +1083,12 @@ public final class TvContract {                  CANONICAL_GENRES.add(ANIMAL_WILDLIFE);                  CANONICAL_GENRES.add(NEWS);                  CANONICAL_GENRES.add(GAMING); +                CANONICAL_GENRES.add(ARTS); +                CANONICAL_GENRES.add(ENTERTAINMENT); +                CANONICAL_GENRES.add(LIFE_STYLE); +                CANONICAL_GENRES.add(MUSIC); +                CANONICAL_GENRES.add(PREMIER); +                CANONICAL_GENRES.add(TECH_SCIENCE);              }              private Genres() {} diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java index 54ebc6aad10c..b9e99d2c14a4 100644 --- a/media/java/android/media/tv/TvInputInfo.java +++ b/media/java/android/media/tv/TvInputInfo.java @@ -241,6 +241,9 @@ public final class TvInputInfo implements Parcelable {              if (DEBUG) {                  Log.d(TAG, "Setup activity loaded. [" + input.mSetupActivity + "] for " + si.name);              } +            if (inputType == TYPE_TUNER && TextUtils.isEmpty(input.mSetupActivity)) { +                throw new XmlPullParserException("Setup activity not found in " + si.name); +            }              input.mSettingsActivity = sa.getString(                      com.android.internal.R.styleable.TvInputService_settingsActivity);              if (DEBUG) { diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java index 78714d202649..51bd205dbf2d 100644 --- a/media/java/android/media/tv/TvInputManager.java +++ b/media/java/android/media/tv/TvInputManager.java @@ -159,12 +159,12 @@ public final class TvInputManager {      private final Object mLock = new Object(); -    // @GuardedBy(mLock) +    // @GuardedBy("mLock")      private final List<TvInputCallbackRecord> mCallbackRecords =              new LinkedList<TvInputCallbackRecord>();      // A mapping from TV input ID to the state of corresponding input. -    // @GuardedBy(mLock) +    // @GuardedBy("mLock")      private final Map<String, Integer> mStateMap = new ArrayMap<String, Integer>();      // A mapping from the sequence number of a session to its SessionCallbackRecord. @@ -207,7 +207,7 @@ public final class TvInputManager {          /**           * This is called when the channel of this session is changed by the underlying TV input -         * with out any {@link TvInputManager.Session#tune(Uri)} request. +         * without any {@link TvInputManager.Session#tune(Uri)} request.           *           * @param session A {@link TvInputManager.Session} associated with this callback.           * @param channelUri The URI of a channel. @@ -227,7 +227,7 @@ public final class TvInputManager {          /**           * This is called when a track for a given type is selected.           * -         * @param session A {@link TvInputManager.Session} associated with this callback +         * @param session A {@link TvInputManager.Session} associated with this callback.           * @param type The type of the selected track. The type can be           *            {@link TvTrackInfo#TYPE_AUDIO}, {@link TvTrackInfo#TYPE_VIDEO} or           *            {@link TvTrackInfo#TYPE_SUBTITLE}. @@ -238,6 +238,18 @@ public final class TvInputManager {          }          /** +         * This is invoked when the video size has been changed. It is also called when the first +         * time video size information becomes available after the session is tuned to a specific +         * channel. +         * +         * @param session A {@link TvInputManager.Session} associated with this callback. +         * @param width The width of the video. +         * @param height The height of the video. +         */ +        public void onVideoSizeChanged(Session session, int width, int height) { +        } + +        /**           * This is called when the video is available, so the TV input starts the playback.           *           * @param session A {@link TvInputManager.Session} associated with this callback. @@ -312,13 +324,13 @@ public final class TvInputManager {          private final Handler mHandler;          private Session mSession; -        public SessionCallbackRecord(SessionCallback sessionCallback, +        SessionCallbackRecord(SessionCallback sessionCallback,                  Handler handler) {              mSessionCallback = sessionCallback;              mHandler = handler;          } -        public void postSessionCreated(final Session session) { +        void postSessionCreated(final Session session) {              mSession = session;              mHandler.post(new Runnable() {                  @Override @@ -328,7 +340,7 @@ public final class TvInputManager {              });          } -        public void postSessionReleased() { +        void postSessionReleased() {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -337,7 +349,7 @@ public final class TvInputManager {              });          } -        public void postChannelRetuned(final Uri channelUri) { +        void postChannelRetuned(final Uri channelUri) {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -346,49 +358,34 @@ public final class TvInputManager {              });          } -        public void postTracksChanged(final List<TvTrackInfo> tracks) { +        void postTracksChanged(final List<TvTrackInfo> tracks) {              mHandler.post(new Runnable() {                  @Override                  public void run() { -                    mSession.mAudioTracks.clear(); -                    mSession.mVideoTracks.clear(); -                    mSession.mSubtitleTracks.clear(); -                    for (TvTrackInfo track : tracks) { -                        if (track.getType() == TvTrackInfo.TYPE_AUDIO) { -                            mSession.mAudioTracks.add(track); -                        } else if (track.getType() == TvTrackInfo.TYPE_VIDEO) { -                            mSession.mVideoTracks.add(track); -                        } else if (track.getType() == TvTrackInfo.TYPE_SUBTITLE) { -                            mSession.mSubtitleTracks.add(track); -                        } else { -                            // Silently ignore. -                        } -                    }                      mSessionCallback.onTracksChanged(mSession, tracks);                  }              });          } -        public void postTrackSelected(final int type, final String trackId) { +        void postTrackSelected(final int type, final String trackId) {              mHandler.post(new Runnable() {                  @Override                  public void run() { -                    if (type == TvTrackInfo.TYPE_AUDIO) { -                        mSession.mSelectedAudioTrackId = trackId; -                    } else if (type == TvTrackInfo.TYPE_VIDEO) { -                        mSession.mSelectedVideoTrackId = trackId; -                    } else if (type == TvTrackInfo.TYPE_SUBTITLE) { -                        mSession.mSelectedSubtitleTrackId = trackId; -                    } else { -                        // Silently ignore. -                        return; -                    }                      mSessionCallback.onTrackSelected(mSession, type, trackId);                  }              });          } -        public void postVideoAvailable() { +        void postVideoSizeChanged(final int width, final int height) { +            mHandler.post(new Runnable() { +                @Override +                public void run() { +                    mSessionCallback.onVideoSizeChanged(mSession, width, height); +                } +            }); +        } + +        void postVideoAvailable() {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -397,7 +394,7 @@ public final class TvInputManager {              });          } -        public void postVideoUnavailable(final int reason) { +        void postVideoUnavailable(final int reason) {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -406,7 +403,7 @@ public final class TvInputManager {              });          } -        public void postContentAllowed() { +        void postContentAllowed() {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -415,7 +412,7 @@ public final class TvInputManager {              });          } -        public void postContentBlocked(final TvContentRating rating) { +        void postContentBlocked(final TvContentRating rating) {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -424,7 +421,7 @@ public final class TvInputManager {              });          } -        public void postLayoutSurface(final int left, final int top, final int right, +        void postLayoutSurface(final int left, final int top, final int right,                  final int bottom) {              mHandler.post(new Runnable() {                  @Override @@ -434,7 +431,7 @@ public final class TvInputManager {              });          } -        public void postSessionEvent(final String eventType, final Bundle eventArgs) { +        void postSessionEvent(final String eventType, final Bundle eventArgs) {              mHandler.post(new Runnable() {                  @Override                  public void run() { @@ -610,7 +607,10 @@ public final class TvInputManager {                          Log.e(TAG, "Callback not found for seq " + seq);                          return;                      } -                    record.postTracksChanged(tracks); +                    if (record.mSession.updateTracks(tracks)) { +                        record.postTracksChanged(tracks); +                        postVideoSizeChangedIfNeededLocked(record); +                    }                  }              } @@ -622,7 +622,17 @@ public final class TvInputManager {                          Log.e(TAG, "Callback not found for seq " + seq);                          return;                      } -                    record.postTrackSelected(type, trackId); +                    if (record.mSession.updateTrackSelection(type, trackId)) { +                        record.postTrackSelected(type, trackId); +                        postVideoSizeChangedIfNeededLocked(record); +                    } +                } +            } + +            private void postVideoSizeChangedIfNeededLocked(SessionCallbackRecord record) { +                TvTrackInfo track = record.mSession.getVideoTrackToNotify(); +                if (track != null) { +                    record.postVideoSizeChanged(track.getVideoWidth(), track.getVideoHeight());                  }              } @@ -778,7 +788,7 @@ public final class TvInputManager {      }      /** -     * Returns the state of a given TV input. It retuns one of the following: +     * Returns the state of a given TV input. It returns one of the following:       * <ul>       * <li>{@link #INPUT_STATE_CONNECTED}       * <li>{@link #INPUT_STATE_CONNECTED_STANDBY} @@ -1133,12 +1143,24 @@ public final class TvInputManager {          private IBinder mToken;          private TvInputEventSender mSender;          private InputChannel mChannel; + +        private final Object mTrackLock = new Object(); +        // @GuardedBy("mTrackLock")          private final List<TvTrackInfo> mAudioTracks = new ArrayList<TvTrackInfo>(); +        // @GuardedBy("mTrackLock")          private final List<TvTrackInfo> mVideoTracks = new ArrayList<TvTrackInfo>(); +        // @GuardedBy("mTrackLock")          private final List<TvTrackInfo> mSubtitleTracks = new ArrayList<TvTrackInfo>(); +        // @GuardedBy("mTrackLock")          private String mSelectedAudioTrackId; +        // @GuardedBy("mTrackLock")          private String mSelectedVideoTrackId; +        // @GuardedBy("mTrackLock")          private String mSelectedSubtitleTrackId; +        // @GuardedBy("mTrackLock") +        private int mVideoWidth; +        // @GuardedBy("mTrackLock") +        private int mVideoHeight;          private Session(IBinder token, InputChannel channel, ITvInputManager service, int userId,                  int seq, SparseArray<SessionCallbackRecord> sessionCallbackRecordMap) { @@ -1273,12 +1295,16 @@ public final class TvInputManager {                  Log.w(TAG, "The session has been already released");                  return;              } -            mAudioTracks.clear(); -            mVideoTracks.clear(); -            mSubtitleTracks.clear(); -            mSelectedAudioTrackId = null; -            mSelectedVideoTrackId = null; -            mSelectedSubtitleTrackId = null; +            synchronized (mTrackLock) { +                mAudioTracks.clear(); +                mVideoTracks.clear(); +                mSubtitleTracks.clear(); +                mSelectedAudioTrackId = null; +                mSelectedVideoTrackId = null; +                mSelectedSubtitleTrackId = null; +                mVideoWidth = 0; +                mVideoHeight = 0; +            }              try {                  mService.tune(mToken, channelUri, params, mUserId);              } catch (RemoteException e) { @@ -1314,23 +1340,25 @@ public final class TvInputManager {           * @see #getTracks           */          public void selectTrack(int type, String trackId) { -            if (type == TvTrackInfo.TYPE_AUDIO) { -                if (trackId != null && !containsTrack(mAudioTracks, trackId)) { -                    Log.w(TAG, "Invalid audio trackId: " + trackId); -                    return; -                } -            } else if (type == TvTrackInfo.TYPE_VIDEO) { -                if (trackId != null && !containsTrack(mVideoTracks, trackId)) { -                    Log.w(TAG, "Invalid video trackId: " + trackId); -                    return; -                } -            } else if (type == TvTrackInfo.TYPE_SUBTITLE) { -                if (trackId != null && !containsTrack(mSubtitleTracks, trackId)) { -                    Log.w(TAG, "Invalid subtitle trackId: " + trackId); -                    return; +            synchronized (mTrackLock) { +                if (type == TvTrackInfo.TYPE_AUDIO) { +                    if (trackId != null && !containsTrack(mAudioTracks, trackId)) { +                        Log.w(TAG, "Invalid audio trackId: " + trackId); +                        return; +                    } +                } else if (type == TvTrackInfo.TYPE_VIDEO) { +                    if (trackId != null && !containsTrack(mVideoTracks, trackId)) { +                        Log.w(TAG, "Invalid video trackId: " + trackId); +                        return; +                    } +                } else if (type == TvTrackInfo.TYPE_SUBTITLE) { +                    if (trackId != null && !containsTrack(mSubtitleTracks, trackId)) { +                        Log.w(TAG, "Invalid subtitle trackId: " + trackId); +                        return; +                    } +                } else { +                    throw new IllegalArgumentException("invalid type: " + type);                  } -            } else { -                throw new IllegalArgumentException("invalid type: " + type);              }              if (mToken == null) {                  Log.w(TAG, "The session has been already released"); @@ -1361,21 +1389,23 @@ public final class TvInputManager {           * @return the list of tracks for the given type.           */          public List<TvTrackInfo> getTracks(int type) { -            if (type == TvTrackInfo.TYPE_AUDIO) { -                if (mAudioTracks == null) { -                    return null; -                } -                return mAudioTracks; -            } else if (type == TvTrackInfo.TYPE_VIDEO) { -                if (mVideoTracks == null) { -                    return null; -                } -                return mVideoTracks; -            } else if (type == TvTrackInfo.TYPE_SUBTITLE) { -                if (mSubtitleTracks == null) { -                    return null; +            synchronized (mTrackLock) { +                if (type == TvTrackInfo.TYPE_AUDIO) { +                    if (mAudioTracks == null) { +                        return null; +                    } +                    return new ArrayList<TvTrackInfo>(mAudioTracks); +                } else if (type == TvTrackInfo.TYPE_VIDEO) { +                    if (mVideoTracks == null) { +                        return null; +                    } +                    return new ArrayList<TvTrackInfo>(mVideoTracks); +                } else if (type == TvTrackInfo.TYPE_SUBTITLE) { +                    if (mSubtitleTracks == null) { +                        return null; +                    } +                    return new ArrayList<TvTrackInfo>(mSubtitleTracks);                  } -                return mSubtitleTracks;              }              throw new IllegalArgumentException("invalid type: " + type);          } @@ -1388,17 +1418,89 @@ public final class TvInputManager {           * @see #selectTrack           */          public String getSelectedTrack(int type) { -            if (type == TvTrackInfo.TYPE_AUDIO) { -                return mSelectedAudioTrackId; -            } else if (type == TvTrackInfo.TYPE_VIDEO) { -                return mSelectedVideoTrackId; -            } else if (type == TvTrackInfo.TYPE_SUBTITLE) { -                return mSelectedSubtitleTrackId; +            synchronized (mTrackLock) { +                if (type == TvTrackInfo.TYPE_AUDIO) { +                    return mSelectedAudioTrackId; +                } else if (type == TvTrackInfo.TYPE_VIDEO) { +                    return mSelectedVideoTrackId; +                } else if (type == TvTrackInfo.TYPE_SUBTITLE) { +                    return mSelectedSubtitleTrackId; +                }              }              throw new IllegalArgumentException("invalid type: " + type);          }          /** +         * Responds to onTracksChanged() and updates the internal track information. Returns true if +         * there is an update. +         */ +        boolean updateTracks(List<TvTrackInfo> tracks) { +            synchronized (mTrackLock) { +                mAudioTracks.clear(); +                mVideoTracks.clear(); +                mSubtitleTracks.clear(); +                for (TvTrackInfo track : tracks) { +                    if (track.getType() == TvTrackInfo.TYPE_AUDIO) { +                        mAudioTracks.add(track); +                    } else if (track.getType() == TvTrackInfo.TYPE_VIDEO) { +                        mVideoTracks.add(track); +                    } else if (track.getType() == TvTrackInfo.TYPE_SUBTITLE) { +                        mSubtitleTracks.add(track); +                    } +                } +                return !mAudioTracks.isEmpty() || !mVideoTracks.isEmpty() +                        || !mSubtitleTracks.isEmpty(); +            } +        } + +        /** +         * Responds to onTrackSelected() and updates the internal track selection information. +         * Returns true if there is an update. +         */ +        boolean updateTrackSelection(int type, String trackId) { +            synchronized (mTrackLock) { +                if (type == TvTrackInfo.TYPE_AUDIO && trackId != mSelectedAudioTrackId) { +                    mSelectedAudioTrackId = trackId; +                    return true; +                } else if (type == TvTrackInfo.TYPE_VIDEO && trackId != mSelectedVideoTrackId) { +                    mSelectedVideoTrackId = trackId; +                    return true; +                } else if (type == TvTrackInfo.TYPE_SUBTITLE +                        && trackId != mSelectedSubtitleTrackId) { +                    mSelectedSubtitleTrackId = trackId; +                    return true; +                } +            } +            return false; +        } + +        /** +         * Returns the new/updated video track that contains new video size information. Returns +         * null if there is no video track to notify. Subsequent calls of this method results in a +         * non-null video track returned only by the first call and null returned by following +         * calls. The caller should immediately notify of the video size change upon receiving the +         * track. +         */ +        TvTrackInfo getVideoTrackToNotify() { +            synchronized (mTrackLock) { +                if (!mVideoTracks.isEmpty() && mSelectedVideoTrackId != null) { +                    for (TvTrackInfo track : mVideoTracks) { +                        if (track.getId().equals(mSelectedVideoTrackId)) { +                            int videoWidth = track.getVideoWidth(); +                            int videoHeight = track.getVideoHeight(); +                            if (mVideoWidth != videoWidth || mVideoHeight != videoHeight) { +                                mVideoWidth = videoWidth; +                                mVideoHeight = videoHeight; +                                return track; +                            } +                        } +                    } +                } +            } +            return null; +        } + +        /**           * Calls {@link TvInputService.Session#appPrivateCommand(String, Bundle)           * TvInputService.Session.appPrivateCommand()} on the current TvView.           * diff --git a/media/java/android/media/tv/TvStreamConfig.java b/media/java/android/media/tv/TvStreamConfig.java index a7e7e44ac6e6..1bdc63eb0e97 100644 --- a/media/java/android/media/tv/TvStreamConfig.java +++ b/media/java/android/media/tv/TvStreamConfig.java @@ -33,7 +33,6 @@ public class TvStreamConfig implements Parcelable {      private int mStreamId;      private int mType; -    // TODO: Revisit if max widht/height really make sense.      private int mMaxWidth;      private int mMaxHeight;      /** @@ -166,4 +165,17 @@ public class TvStreamConfig implements Parcelable {              return config;          }      } + +    @Override +    public boolean equals(Object obj) { +        if (obj == null) return false; +        if (!(obj instanceof TvStreamConfig)) return false; + +        TvStreamConfig config = (TvStreamConfig) obj; +        return config.mGeneration == mGeneration +            && config.mStreamId == mStreamId +            && config.mType == mType +            && config.mMaxWidth == mMaxWidth +            && config.mMaxHeight == mMaxHeight; +    }  } diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java index 0949b1af9dc8..f9d84c1b037f 100644 --- a/media/java/android/media/tv/TvView.java +++ b/media/java/android/media/tv/TvView.java @@ -59,8 +59,6 @@ public class TvView extends ViewGroup {      private static final String TAG = "TvView";      private static final boolean DEBUG = false; -    private static final int VIDEO_SIZE_VALUE_UNKNOWN = 0; -      private static final int ZORDER_MEDIA = 0;      private static final int ZORDER_MEDIA_OVERLAY = 1;      private static final int ZORDER_ON_TOP = 2; @@ -69,7 +67,7 @@ public class TvView extends ViewGroup {      private static final int CAPTION_ENABLED = 1;      private static final int CAPTION_DISABLED = 2; -    private static final WeakReference<TvView> NULL_TV_VIEW = new WeakReference(null); +    private static final WeakReference<TvView> NULL_TV_VIEW = new WeakReference<>(null);      private static final Object sMainTvViewLock = new Object();      private static WeakReference<TvView> sMainTvView = NULL_TV_VIEW; @@ -86,8 +84,10 @@ public class TvView extends ViewGroup {      private OnUnhandledInputEventListener mOnUnhandledInputEventListener;      private boolean mHasStreamVolume;      private float mStreamVolume; -    private int mVideoWidth = VIDEO_SIZE_VALUE_UNKNOWN; -    private int mVideoHeight = VIDEO_SIZE_VALUE_UNKNOWN; +    private int mCaptionEnabled; +    private String mAppPrivateCommandAction; +    private Bundle mAppPrivateCommandData; +      private boolean mSurfaceChanged;      private int mSurfaceFormat;      private int mSurfaceWidth; @@ -100,7 +100,6 @@ public class TvView extends ViewGroup {      private int mSurfaceViewRight;      private int mSurfaceViewTop;      private int mSurfaceViewBottom; -    private int mCaptionEnabled;      private final SurfaceHolder.Callback mSurfaceHolderCallback = new SurfaceHolder.Callback() {          @Override @@ -197,7 +196,7 @@ public class TvView extends ViewGroup {      @SystemApi      public void setMain() {          synchronized (sMainTvViewLock) { -            sMainTvView = new WeakReference(this); +            sMainTvView = new WeakReference<>(this);              if (hasWindowFocus() && mSession != null) {                  mSession.setMain();              } @@ -291,7 +290,7 @@ public class TvView extends ViewGroup {          }          synchronized (sMainTvViewLock) {              if (sMainTvView.get() == null) { -                sMainTvView = new WeakReference(this); +                sMainTvView = new WeakReference<>(this);              }          }          if (mSessionCallback != null && mSessionCallback.mInputId.equals(inputId)) { @@ -421,10 +420,10 @@ public class TvView extends ViewGroup {       * Calls {@link TvInputService.Session#appPrivateCommand(String, Bundle)       * TvInputService.Session.appPrivateCommand()} on the current TvView.       * -     * @param action Name of the command to be performed. This <em>must</em> be a scoped name, i.e. -     *            prefixed with a package name you own, so that different developers will not create -     *            conflicting commands. -     * @param data Any data to include with the command. +     * @param action The name of the private command to send. This <em>must</em> be a scoped name, +     *            i.e. prefixed with a package name you own, so that different developers will not +     *            create conflicting commands. +     * @param data An optional bundle to send with the command.       * @hide       */      @SystemApi @@ -434,6 +433,13 @@ public class TvView extends ViewGroup {          }          if (mSession != null) {              mSession.sendAppPrivateCommand(action, data); +        } else { +            Log.w(TAG, "sendAppPrivateCommand - session not created (action " + action + " cached)"); +            if (mAppPrivateCommandAction != null) { +                Log.w(TAG, "previous cached action " + action + " removed"); +            } +            mAppPrivateCommandAction = action; +            mAppPrivateCommandData = data;          }      } @@ -619,6 +625,9 @@ public class TvView extends ViewGroup {      }      private void release() { +        mAppPrivateCommandAction = null; +        mAppPrivateCommandData = null; +          setSessionSurface(null);          removeSessionOverlayView();          mUseRequestedSurfaceLayout = false; @@ -703,19 +712,8 @@ public class TvView extends ViewGroup {          }          /** -         * This is invoked when the view is tuned to a specific channel and starts decoding video -         * stream from there. It is also called later when the video size is changed. -         * -         * @param inputId The ID of the TV input bound to this view. -         * @param width The width of the video. -         * @param height The height of the video. -         */ -        public void onVideoSizeChanged(String inputId, int width, int height) { -        } - -        /**           * This is invoked when the channel of this TvView is changed by the underlying TV input -         * with out any {@link TvView#tune(String, Uri)} request. +         * without any {@link TvView#tune(String, Uri)} request.           *           * @param inputId The ID of the TV input bound to this view.           * @param channelUri The URI of a channel. @@ -745,6 +743,18 @@ public class TvView extends ViewGroup {          }          /** +         * This is invoked when the video size has been changed. It is also called when the first +         * time video size information becomes available after this view is tuned to a specific +         * channel. +         * +         * @param inputId The ID of the TV input bound to this view. +         * @param width The width of the video. +         * @param height The height of the video. +         */ +        public void onVideoSizeChanged(String inputId, int width, int height) { +        } + +        /**           * This is called when the video is available, so the TV input starts the playback.           *           * @param inputId The ID of the TV input bound to this view. @@ -828,16 +838,17 @@ public class TvView extends ViewGroup {          @Override          public void onSessionCreated(Session session) { +            if (DEBUG) { +                Log.d(TAG, "onSessionCreated()"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onSessionCreated - session already created");                  // This callback is obsolete.                  if (session != null) {                      session.release();                  }                  return;              } -            if (DEBUG) { -                Log.d(TAG, "onSessionCreated()"); -            }              mSession = session;              if (session != null) {                  synchronized (sMainTvViewLock) { @@ -862,6 +873,12 @@ public class TvView extends ViewGroup {                  if (mHasStreamVolume) {                      mSession.setStreamVolume(mStreamVolume);                  } +                if (mAppPrivateCommandAction != null) { +                    mSession.sendAppPrivateCommand( +                            mAppPrivateCommandAction, mAppPrivateCommandData); +                    mAppPrivateCommandAction = null; +                    mAppPrivateCommandData = null; +                }              } else {                  mSessionCallback = null;                  if (mCallback != null) { @@ -872,7 +889,11 @@ public class TvView extends ViewGroup {          @Override          public void onSessionReleased(Session session) { +            if (DEBUG) { +                Log.d(TAG, "onSessionReleased()"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onSessionReleased - session not created");                  return;              }              mOverlayViewCreated = false; @@ -886,12 +907,13 @@ public class TvView extends ViewGroup {          @Override          public void onChannelRetuned(Session session, Uri channelUri) { -            if (this != mSessionCallback) { -                return; -            }              if (DEBUG) {                  Log.d(TAG, "onChannelChangedByTvInput(" + channelUri + ")");              } +            if (this != mSessionCallback) { +                Log.w(TAG, "onChannelRetuned - session not created"); +                return; +            }              if (mCallback != null) {                  mCallback.onChannelRetuned(mInputId, channelUri);              } @@ -899,12 +921,13 @@ public class TvView extends ViewGroup {          @Override          public void onTracksChanged(Session session, List<TvTrackInfo> tracks) { +            if (DEBUG) { +                Log.d(TAG, "onTracksChanged(" + tracks + ")"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onTracksChanged - session not created");                  return;              } -            if (DEBUG) { -                Log.d(TAG, "onTracksChanged()"); -            }              if (mCallback != null) {                  mCallback.onTracksChanged(mInputId, tracks);              } @@ -912,26 +935,41 @@ public class TvView extends ViewGroup {          @Override          public void onTrackSelected(Session session, int type, String trackId) { +            if (DEBUG) { +                Log.d(TAG, "onTrackSelected(type=" + type + ", trackId=" + trackId + ")"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onTrackSelected - session not created");                  return;              } -            if (DEBUG) { -                Log.d(TAG, "onTrackSelected()"); -            } -            // TODO: Update the video size when the type is TYPE_VIDEO.              if (mCallback != null) {                  mCallback.onTrackSelected(mInputId, type, trackId);              }          }          @Override -        public void onVideoAvailable(Session session) { +        public void onVideoSizeChanged(Session session, int width, int height) { +            if (DEBUG) { +                Log.d(TAG, "onVideoSizeChanged()"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onVideoSizeChanged - session not created");                  return;              } +            if (mCallback != null) { +                mCallback.onVideoSizeChanged(mInputId, width, height); +            } +        } + +        @Override +        public void onVideoAvailable(Session session) {              if (DEBUG) {                  Log.d(TAG, "onVideoAvailable()");              } +            if (this != mSessionCallback) { +                Log.w(TAG, "onVideoAvailable - session not created"); +                return; +            }              if (mCallback != null) {                  mCallback.onVideoAvailable(mInputId);              } @@ -939,12 +977,13 @@ public class TvView extends ViewGroup {          @Override          public void onVideoUnavailable(Session session, int reason) { +            if (DEBUG) { +                Log.d(TAG, "onVideoUnavailable(reason=" + reason + ")"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onVideoUnavailable - session not created");                  return;              } -            if (DEBUG) { -                Log.d(TAG, "onVideoUnavailable(" + reason + ")"); -            }              if (mCallback != null) {                  mCallback.onVideoUnavailable(mInputId, reason);              } @@ -952,12 +991,13 @@ public class TvView extends ViewGroup {          @Override          public void onContentAllowed(Session session) { -            if (this != mSessionCallback) { -                return; -            }              if (DEBUG) {                  Log.d(TAG, "onContentAllowed()");              } +            if (this != mSessionCallback) { +                Log.w(TAG, "onContentAllowed - session not created"); +                return; +            }              if (mCallback != null) {                  mCallback.onContentAllowed(mInputId);              } @@ -965,12 +1005,13 @@ public class TvView extends ViewGroup {          @Override          public void onContentBlocked(Session session, TvContentRating rating) { +            if (DEBUG) { +                Log.d(TAG, "onContentBlocked(rating=" + rating + ")"); +            }              if (this != mSessionCallback) { +                Log.w(TAG, "onContentBlocked - session not created");                  return;              } -            if (DEBUG) { -                Log.d(TAG, "onContentBlocked()"); -            }              if (mCallback != null) {                  mCallback.onContentBlocked(mInputId, rating);              } @@ -978,13 +1019,14 @@ public class TvView extends ViewGroup {          @Override          public void onLayoutSurface(Session session, int left, int top, int right, int bottom) { -            if (this != mSessionCallback) { -                return; -            }              if (DEBUG) {                  Log.d(TAG, "onLayoutSurface (left=" + left + ", top=" + top + ", right="                          + right + ", bottom=" + bottom + ",)");              } +            if (this != mSessionCallback) { +                Log.w(TAG, "onLayoutSurface - session not created"); +                return; +            }              mSurfaceViewLeft = left;              mSurfaceViewTop = top;              mSurfaceViewRight = right; @@ -995,12 +1037,13 @@ public class TvView extends ViewGroup {          @Override          public void onSessionEvent(Session session, String eventType, Bundle eventArgs) { -            if (this != mSessionCallback) { -                return; -            }              if (DEBUG) {                  Log.d(TAG, "onSessionEvent(" + eventType + ")");              } +            if (this != mSessionCallback) { +                Log.w(TAG, "onSessionEvent - session not created"); +                return; +            }              if (mCallback != null) {                  mCallback.onEvent(mInputId, eventType, eventArgs);              } diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp index 56467403179d..3b1b1d7875a1 100644 --- a/media/jni/android_media_MediaRecorder.cpp +++ b/media/jni/android_media_MediaRecorder.cpp @@ -182,7 +182,8 @@ static void  android_media_MediaRecorder_setAudioSource(JNIEnv *env, jobject thiz, jint as)  {      ALOGV("setAudioSource(%d)", as); -    if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_CNT) { +    if (as < AUDIO_SOURCE_DEFAULT || +        (as >= AUDIO_SOURCE_CNT && as != AUDIO_SOURCE_FM_TUNER)) {          jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio source");          return;      } diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java index fef1f4a2871b..219de383ee91 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java @@ -574,7 +574,8 @@ public class DocumentsActivity extends Activity {          // Only sort by size when visible          sortSize.setVisible(mState.showSize); -        final boolean searchVisible; +        boolean searchVisible; +        boolean fileSizeVisible = mState.action != ACTION_MANAGE;          if (mState.action == ACTION_CREATE || mState.action == ACTION_OPEN_TREE) {              createDir.setVisible(cwd != null && cwd.isCreateSupported());              searchVisible = false; @@ -583,6 +584,7 @@ public class DocumentsActivity extends Activity {              if (cwd == null) {                  grid.setVisible(false);                  list.setVisible(false); +                fileSizeVisible = false;              }              if (mState.action == ACTION_CREATE) { @@ -604,7 +606,7 @@ public class DocumentsActivity extends Activity {                  ? R.string.menu_file_size_hide : R.string.menu_file_size_show);          advanced.setVisible(mState.action != ACTION_MANAGE); -        fileSize.setVisible(mState.action != ACTION_MANAGE); +        fileSize.setVisible(fileSizeVisible);          return true;      } diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java index 85b2490c68fb..acc2b694fee9 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java @@ -110,13 +110,12 @@ public final class PageContentRepository {          mRenderer.close(callback);      } -    public void destroy(Runnable callback) { -        throwIfNotClosed(); +    public void destroy() {          mState = STATE_DESTROYED;          if (DEBUG) {              Log.i(LOG_TAG, "STATE_DESTROYED");          } -        doDestroy(callback); +        mRenderer.destroy();      }      public void startPreload(int firstShownPage, int lastShownPage) { @@ -163,21 +162,13 @@ public final class PageContentRepository {          try {              if (mState != STATE_DESTROYED) {                  mCloseGuard.warnIfOpen(); -                doDestroy(null); +                destroy();              }          } finally {              super.finalize();          }      } -    private void doDestroy(Runnable callback) { -        mState = STATE_DESTROYED; -        if (DEBUG) { -            Log.i(LOG_TAG, "STATE_DESTROYED"); -        } -        mRenderer.destroy(callback); -    } -      private void throwIfNotOpened() {          if (mState != STATE_OPENED) {              throw new IllegalStateException("Not opened"); @@ -428,6 +419,7 @@ public final class PageContentRepository {          private IPdfRenderer mRenderer;          private boolean mBoundToService; +        private boolean mDestroyed;          public AsyncRenderer(Context context, OnMalformedPdfFileListener malformedPdfFileListener) {              mContext = context; @@ -441,7 +433,6 @@ public final class PageContentRepository {          @Override          public void onServiceConnected(ComponentName name, IBinder service) { -            mBoundToService = true;              synchronized (mLock) {                  mRenderer = IPdfRenderer.Stub.asInterface(service);                  mLock.notifyAll(); @@ -465,9 +456,14 @@ public final class PageContentRepository {              new AsyncTask<Void, Void, Integer>() {                  @Override                  protected void onPreExecute() { +                    if (mDestroyed) { +                        cancel(true); +                        return; +                    }                      Intent intent = new Intent(PdfManipulationService.ACTION_GET_RENDERER);                      intent.setClass(mContext, PdfManipulationService.class);                      mContext.bindService(intent, AsyncRenderer.this, Context.BIND_AUTO_CREATE); +                    mBoundToService = true;                  }                  @Override @@ -513,6 +509,14 @@ public final class PageContentRepository {              new AsyncTask<Void, Void, Void>() {                  @Override +                protected void onPreExecute() { +                    if (mDestroyed) { +                        cancel(true); +                        return; +                    } +                } + +                @Override                  protected Void doInBackground(Void... params) {                      synchronized (mLock) {                          try { @@ -534,27 +538,14 @@ public final class PageContentRepository {              }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);          } -        public void destroy(final Runnable callback) { -            new AsyncTask<Void, Void, Void>() { -                @Override -                protected Void doInBackground(Void... params) { -                    return null; -                } - -                @Override -                public void onPostExecute(Void result) { -                    if (mBoundToService) { -                        mBoundToService = false; -                        mContext.unbindService(AsyncRenderer.this); -                    } -                    mPageContentCache.invalidate(); -                    mPageContentCache.clear(); -                    if (callback != null) { -                        callback.run(); -                    } - -                } -            }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); +        public void destroy() { +            if (mBoundToService) { +                mBoundToService = false; +                mContext.unbindService(AsyncRenderer.this); +            } +            mPageContentCache.invalidate(); +            mPageContentCache.clear(); +            mDestroyed = true;          }          public void startPreload(int firstShownPage, int lastShownPage, RenderSpec renderSpec) { diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java index 045a2f9ea2f2..2cc5e049e3aa 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java @@ -78,7 +78,7 @@ public final class PrintSpoolerService extends Service {      private static final boolean DEBUG_PERSISTENCE = false; -    private static final boolean PERSISTNECE_MANAGER_ENABLED = true; +    private static final boolean PERSISTENCE_MANAGER_ENABLED = true;      private static final long CHECK_ALL_PRINTJOBS_HANDLED_DELAY = 5000; @@ -728,7 +728,7 @@ public final class PrintSpoolerService extends Service {          }          public void writeStateLocked() { -            if (!PERSISTNECE_MANAGER_ENABLED) { +            if (!PERSISTENCE_MANAGER_ENABLED) {                  return;              }              if (mWriteStateScheduled) { @@ -935,7 +935,7 @@ public final class PrintSpoolerService extends Service {          }          public void readStateLocked() { -            if (!PERSISTNECE_MANAGER_ENABLED) { +            if (!PERSISTENCE_MANAGER_ENABLED) {                  return;              }              FileInputStream in = null; diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java index c53fcadde4e7..f6ace41d6e9d 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java @@ -137,7 +137,7 @@ public final class RemotePrintDocument {      private final DeathRecipient mDeathRecipient = new DeathRecipient() {          @Override          public void binderDied() { -            notifyPrintingAppDied(); +            onPrintingAppDied();          }      }; @@ -268,7 +268,7 @@ public final class RemotePrintDocument {              mPrintDocumentAdapter.finish();              mState = STATE_FINISHED;          } catch (RemoteException re) { -            Log.e(LOG_TAG, "Error calling finish()", re); +            Log.e(LOG_TAG, "Error calling finish()");              mState = STATE_FAILED;          }      } @@ -1108,7 +1108,8 @@ public final class RemotePrintDocument {          }      } -    private void notifyPrintingAppDied() { +    private void onPrintingAppDied() { +        mState = STATE_FAILED;          new Handler(mLooper).post(new Runnable() {              @Override              public void run() { @@ -1129,7 +1130,7 @@ public final class RemotePrintDocument {          public void onDestroy() {              final RemotePrintDocument document = mWeakDocument.get();              if (document != null) { -                document.notifyPrintingAppDied(); +                document.onPrintingAppDied();              }          }      } diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java index 8a65a2ef1652..02d2715c035f 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java @@ -48,6 +48,7 @@ import java.io.FileOutputStream;  import java.io.IOException;  import java.util.ArrayList;  import java.util.Collections; +import java.util.LinkedHashMap;  import java.util.List;  import java.util.Map;  import java.util.Set; @@ -91,14 +92,14 @@ public final class FusedPrintersProvider extends Loader<List<PrinterInfo>> {          mPersistenceManager.addPrinterAndWritePrinterHistory(printer);      } -    private void computeAndDeliverResult(ArrayMap<PrinterId, PrinterInfo> discoveredPrinters, -            ArrayMap<PrinterId, PrinterInfo> favoritePrinters) { +    private void computeAndDeliverResult(Map<PrinterId, PrinterInfo> discoveredPrinters, +            List<PrinterInfo> favoritePrinters) {          List<PrinterInfo> printers = new ArrayList<>();          // Add the updated favorite printers.          final int favoritePrinterCount = favoritePrinters.size();          for (int i = 0; i < favoritePrinterCount; i++) { -            PrinterInfo favoritePrinter = favoritePrinters.valueAt(i); +            PrinterInfo favoritePrinter = favoritePrinters.get(i);              PrinterInfo updatedPrinter = discoveredPrinters.remove(                      favoritePrinter.getId());              if (updatedPrinter != null) { @@ -215,21 +216,14 @@ public final class FusedPrintersProvider extends Loader<List<PrinterInfo>> {          // printer to use its current name instead of the historical one.          mPersistenceManager.updatePrintersHistoricalNamesIfNeeded(printers); -        ArrayMap<PrinterId, PrinterInfo> printersMap = new ArrayMap<>(); +        Map<PrinterId, PrinterInfo> printersMap = new LinkedHashMap<>();          final int printerCount = printers.size();          for (int i = 0; i < printerCount; i++) {              PrinterInfo printer = printers.get(i);              printersMap.put(printer.getId(), printer);          } -        ArrayMap<PrinterId, PrinterInfo> favoritePrintersMap = new ArrayMap<>(); -        final int favoritePrinterCount = favoritePrinters.size(); -        for (int i = 0; i < favoritePrinterCount; i++) { -            PrinterInfo favoritePrinter = favoritePrinters.get(i); -            favoritePrintersMap.put(favoritePrinter.getId(), favoritePrinter); -        } - -        computeAndDeliverResult(printersMap, favoritePrintersMap); +        computeAndDeliverResult(printersMap, favoritePrinters);      }      @Override @@ -544,7 +538,7 @@ public final class FusedPrintersProvider extends Loader<List<PrinterInfo>> {                  mReadHistoryCompleted = true;                  // Deliver the printers. -                updatePrinters(mDiscoverySession.getPrinters(), mHistoricalPrinters); +                updatePrinters(mDiscoverySession.getPrinters(), mFavoritePrinters);                  // Loading the available printers if needed.                  loadInternal(); diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java index fbf72048133a..aa7956859f75 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java @@ -484,9 +484,13 @@ public final class PageAdapter extends Adapter implements          return selectedPages;      } -    public void destroy(Runnable callback) { -        throwIfNotClosed(); -        doDestroy(callback); +    public void destroy() { +        mPageContentRepository.destroy(); +        mCloseGuard.close(); +        mState = STATE_DESTROYED; +        if (DEBUG) { +            Log.i(LOG_TAG, "STATE_DESTROYED"); +        }      }      @Override @@ -494,7 +498,7 @@ public final class PageAdapter extends Adapter implements          try {              if (mState != STATE_DESTROYED) {                  mCloseGuard.warnIfOpen(); -                doDestroy(null); +                destroy();              }          } finally {              super.finalize(); @@ -741,15 +745,6 @@ public final class PageAdapter extends Adapter implements          mPageContentRepository.stopPreload();      } -    private void doDestroy(Runnable callback) { -        mPageContentRepository.destroy(callback); -        mCloseGuard.close(); -        mState = STATE_DESTROYED; -        if (DEBUG) { -            Log.i(LOG_TAG, "STATE_DESTROYED"); -        } -    } -      private void throwIfNotOpened() {          if (mState != STATE_OPENED) {              throw new IllegalStateException("Not opened"); diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index 01ea3c85534b..15ea9a73c665 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -1412,12 +1412,16 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat              mCopiesEditText.setEnabled(true);              mCopiesEditText.setFocusableInTouchMode(true);          } else { +            CharSequence text = mCopiesEditText.getText(); +            if (TextUtils.isEmpty(text) || !MIN_COPIES_STRING.equals(text.toString())) { +                mCopiesEditText.setText(MIN_COPIES_STRING); +            }              mCopiesEditText.setEnabled(false);              mCopiesEditText.setFocusable(false);          }          if (mCopiesEditText.getError() == null                  && TextUtils.isEmpty(mCopiesEditText.getText())) { -            mCopiesEditText.setText(String.valueOf(MIN_COPIES)); +            mCopiesEditText.setText(MIN_COPIES_STRING);              mCopiesEditText.requestFocus();          }      } @@ -1612,15 +1616,9 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat              mSpoolerProvider.destroy();              mPrintedDocument.finish();              mPrintedDocument.destroy(); -            mPrintPreviewController.destroy(new Runnable() { -                @Override -                public void run() { -                    finish(); -                } -            }); -        } else { -            finish(); +            mPrintPreviewController.destroy();          } +        finish();      }      private final class SpinnerItem<T> { diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java index e4eab10e1b8c..15342ae3f595 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java @@ -192,15 +192,10 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba          });      } -    public void destroy(Runnable callback) { -        if (mPageAdapter.isOpened()) { -            Message operation = mHandler.obtainMessage(MyHandler.MSG_CLOSE); -            mHandler.enqueueOperation(operation); -        } - -        Message operation = mHandler.obtainMessage(MyHandler.MSG_DESTROY); -        operation.obj = callback; -        mHandler.enqueueOperation(operation); +    public void destroy() { +        mHandler.cancelQueuedOperations(); +        mRecyclerView.setAdapter(null); +        mPageAdapter.destroy();      }      @Override @@ -226,7 +221,6 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba      private final class MyHandler extends Handler {          public static final int MSG_OPEN = 1;          public static final int MSG_CLOSE = 2; -        public static final int MSG_DESTROY = 3;          public static final int MSG_UPDATE = 4;          public static final int MSG_START_PRELOAD = 5; @@ -246,6 +240,10 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba              super(looper, null, false);          } +        public void cancelQueuedOperations() { +            mPendingOperations.clear(); +        } +          public void enqueueOperation(Message message) {              mPendingOperations.add(message);              handleNextOperation(); @@ -294,13 +292,6 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba                      });                  } break; -                case MSG_DESTROY: { -                    Runnable callback = (Runnable) message.obj; -                    mRecyclerView.setAdapter(null); -                    mPageAdapter.destroy(callback); -                    handleNextOperation(); -                } break; -                  case MSG_UPDATE: {                      SomeArgs args = (SomeArgs) message.obj;                      PageRange[] writtenPages = (PageRange[]) args.arg1; diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index aaa350c603ea..4f867a0e422a 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -252,5 +252,8 @@      <!-- Zen toast visibility duration -->      <integer name="zen_toast_visible_duration">500</integer> + +    <!-- Enable the default volume dialog --> +    <bool name="enable_volume_ui">true</bool>  </resources> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index c4780716e110..513722764812 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -239,7 +239,7 @@      <dimen name="recents_search_bar_space_height">64dp</dimen>      <!-- The side padding for the task stack as a percentage of the width. --> -    <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.04444</item> +    <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.03333</item>      <!-- The overscroll percentage allowed on the stack. -->      <item name="recents_stack_overscroll_percentage" format="float" type="dimen">0.0875</item> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 89bbacf48470..7a0d655514e4 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -657,8 +657,8 @@      <string name="recents_empty_message">Your recent screens appear here</string>      <!-- Recents: The info panel app info button string. [CHAR LIMIT=NONE] -->      <string name="recents_app_info_button_label">Application Info</string> -    <!-- Recents: The lock-to-app button. [CHAR LIMIT=NONE] --> -    <string name="recents_lock_to_app_button_label">lock to app</string> +    <!-- Recents: The screen pinning button. [CHAR LIMIT=NONE] --> +    <string name="recents_lock_to_app_button_label">screen pinning</string>      <!-- Recents: Temporary string for the button in the recents search bar. [CHAR LIMIT=NONE] -->      <string name="recents_search_bar_label">search</string>      <!-- Recents: Launch error string. [CHAR LIMIT=NONE] --> diff --git a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java index 1ca67bc07cab..97c3ad934dbc 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +++ b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java @@ -54,7 +54,7 @@ import java.util.List;  import java.util.concurrent.atomic.AtomicBoolean;  /** A proxy implementation for the recents component */ -public class AlternateRecentsComponent implements ActivityOptions.OnAnimationStartedListener { +public class AlternateRecentsComponent {      final public static String EXTRA_FROM_HOME = "recents.triggeredOverHome";      final public static String EXTRA_FROM_SEARCH_HOME = "recents.triggeredOverSearchHome"; @@ -63,7 +63,6 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta      final public static String EXTRA_TRIGGERED_FROM_ALT_TAB = "recents.triggeredFromAltTab";      final public static String EXTRA_TRIGGERED_FROM_HOME_KEY = "recents.triggeredFromHomeKey"; -    final public static String ACTION_START_ENTER_ANIMATION = "action_start_enter_animation";      final public static String ACTION_TOGGLE_RECENTS_ACTIVITY = "action_toggle_recents_activity";      final public static String ACTION_HIDE_RECENTS_ACTIVITY = "action_hide_recents_activity"; @@ -78,9 +77,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta      Context mContext;      LayoutInflater mInflater;      SystemServicesProxy mSystemServicesProxy; -    Handler mHandler;      boolean mBootCompleted; -    boolean mStartAnimationTriggered;      // Task launching      RecentsConfiguration mConfig; @@ -106,7 +103,6 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta          mInflater = LayoutInflater.from(context);          mContext = context;          mSystemServicesProxy = new SystemServicesProxy(context); -        mHandler = new Handler();          mTaskStackBounds = new Rect();      } @@ -327,7 +323,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta          // If the user has toggled it too quickly, then just eat up the event here (it's better than          // showing a janky screenshot).          // NOTE: Ideally, the screenshot mechanism would take the window transform into account -        if (System.currentTimeMillis() - mLastToggleTime < sMinToggleDelay) { +        long currentTime = System.currentTimeMillis(); +        if ((currentTime > mLastToggleTime) && (currentTime - mLastToggleTime) < sMinToggleDelay) {              return;          } @@ -364,30 +361,27 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta       * Creates the activity options for a unknown state->recents transition.       */      ActivityOptions getUnknownTransitionActivityOptions() { -        mStartAnimationTriggered = false;          return ActivityOptions.makeCustomAnimation(mContext,                  R.anim.recents_from_unknown_enter, -                R.anim.recents_from_unknown_exit, mHandler, this); +                R.anim.recents_from_unknown_exit);      }      /**       * Creates the activity options for a home->recents transition.       */      ActivityOptions getHomeTransitionActivityOptions(boolean fromSearchHome) { -        mStartAnimationTriggered = false;          if (fromSearchHome) {              return ActivityOptions.makeCustomAnimation(mContext,                      R.anim.recents_from_search_launcher_enter, -                    R.anim.recents_from_search_launcher_exit, mHandler, this); +                    R.anim.recents_from_search_launcher_exit);          }          return ActivityOptions.makeCustomAnimation(mContext,                  R.anim.recents_from_launcher_enter, -                R.anim.recents_from_launcher_exit, mHandler, this); +                R.anim.recents_from_launcher_exit);      }      /** -     * Creates the activity options for an app->recents transition.  If this method sets the static -     * screenshot, then we will use that for the transition. +     * Creates the activity options for an app->recents transition.       */      ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask,              boolean isTopTaskHome) { @@ -411,10 +405,9 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta                  c.setBitmap(null);              } -            mStartAnimationTriggered = false;              return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mStatusBarView,                      thumbnail, toTaskRect.left, toTaskRect.top, toTaskRect.width(), -                    toTaskRect.height(), this); +                    toTaskRect.height(), null);          }          // If both the screenshot and thumbnail fails, then just fall back to the default transition @@ -551,42 +544,4 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta              sRecentsComponentCallbacks.onVisibilityChanged(visible);          }      } - -    /**** OnAnimationStartedListener Implementation ****/ - -    @Override -    public void onAnimationStarted() { -        // Notify recents to start the enter animation -        if (!mStartAnimationTriggered) { -            // There can be a race condition between the start animation callback and -            // the start of the new activity (where we register the receiver that listens -            // to this broadcast, so we add our own receiver and if that gets called, then -            // we know the activity has not yet started and we can retry sending the broadcast. -            BroadcastReceiver fallbackReceiver = new BroadcastReceiver() { -                @Override -                public void onReceive(Context context, Intent intent) { -                    if (getResultCode() == Activity.RESULT_OK) { -                        mStartAnimationTriggered = true; -                        return; -                    } - -                    // Schedule for the broadcast to be sent again after some time -                    mHandler.postDelayed(new Runnable() { -                        @Override -                        public void run() { -                            onAnimationStarted(); -                        } -                    }, 75); -                } -            }; - -            // Send the broadcast to notify Recents that the animation has started -            Intent intent = new Intent(ACTION_START_ENTER_ANIMATION); -            intent.setPackage(mContext.getPackageName()); -            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | -                    Intent.FLAG_RECEIVER_FOREGROUND); -            mContext.sendOrderedBroadcastAsUser(intent, UserHandle.CURRENT, null, -                    fallbackReceiver, null, Activity.RESULT_CANCELED, null, null); -        } -    }  } diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index 1c8f55bc029a..2b55c1f27f11 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -141,14 +141,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView              } else if (action.equals(AlternateRecentsComponent.ACTION_TOGGLE_RECENTS_ACTIVITY)) {                  // If we are toggling Recents, then first unfilter any filtered stacks first                  dismissRecentsToFocusedTaskOrHome(true); -            } else if (action.equals(AlternateRecentsComponent.ACTION_START_ENTER_ANIMATION)) { -                // Try and start the enter animation (or restart it on configuration changed) -                ReferenceCountedTrigger t = new ReferenceCountedTrigger(context, null, null, null); -                mRecentsView.startEnterRecentsAnimation(new ViewAnimation.TaskViewEnterContext(t)); -                onEnterAnimationTriggered(); -                // Notify the fallback receiver that we have successfully got the broadcast -                // See AlternateRecentsComponent.onAnimationStarted() -                setResultCode(Activity.RESULT_OK);              }          }      }; @@ -441,7 +433,8 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView          // Try and start the enter animation (or restart it on configuration changed)          ReferenceCountedTrigger t = new ReferenceCountedTrigger(this, null, null, null);          mRecentsView.startEnterRecentsAnimation(new ViewAnimation.TaskViewEnterContext(t)); -        onEnterAnimationTriggered(); +        // Animate the SystemUI scrim views +        mScrimViews.startEnterRecentsAnimation();      }      @Override @@ -469,7 +462,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView          IntentFilter filter = new IntentFilter();          filter.addAction(AlternateRecentsComponent.ACTION_HIDE_RECENTS_ACTIVITY);          filter.addAction(AlternateRecentsComponent.ACTION_TOGGLE_RECENTS_ACTIVITY); -        filter.addAction(AlternateRecentsComponent.ACTION_START_ENTER_ANIMATION);          registerReceiver(mServiceBroadcastReceiver, filter);          // Register any broadcast receivers for the task loader @@ -512,6 +504,16 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView      }      @Override +    public void onEnterAnimationComplete() { +        // Try and start the enter animation (or restart it on configuration changed) +        ReferenceCountedTrigger t = new ReferenceCountedTrigger(this, null, null, null); +        mRecentsView.startEnterRecentsAnimation(new ViewAnimation.TaskViewEnterContext(t)); + +        // Animate the SystemUI scrim views +        mScrimViews.startEnterRecentsAnimation(); +    } + +    @Override      public void onTrimMemory(int level) {          RecentsTaskLoader loader = RecentsTaskLoader.getInstance();          if (loader != null) { @@ -592,12 +594,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView          }      } -    /** Called when the enter recents animation is triggered. */ -    public void onEnterAnimationTriggered() { -        // Animate the SystemUI scrim views -        mScrimViews.startEnterRecentsAnimation(); -    } -      /**** RecentsView.RecentsViewCallbacks Implementation ****/      @Override diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java index f01d17c611c9..a0dee07e374a 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java +++ b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java @@ -16,6 +16,7 @@  package com.android.systemui.recents.misc; +import android.animation.Animator;  import android.content.Intent;  import android.graphics.Color;  import android.graphics.Matrix; @@ -188,4 +189,15 @@ public class Utilities {          int flags = intent.getFlags();          return (flags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) == Intent.FLAG_ACTIVITY_NEW_DOCUMENT;      } + +    /** +     * Cancels an animation ensuring that if it has listeners, onCancel and onEnd +     * are not called. +     */ +    public static void cancelAnimationWithoutCallbacks(Animator animator) { +        if (animator != null) { +            animator.removeAllListeners(); +            animator.cancel(); +        } +    }  } diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/KeyStoreLruCache.java b/packages/SystemUI/src/com/android/systemui/recents/model/KeyStoreLruCache.java index 7ccefc6ed5f7..97e091613530 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/KeyStoreLruCache.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/KeyStoreLruCache.java @@ -21,15 +21,16 @@ import android.util.LruCache;  import java.util.HashMap;  /** - * An LRU cache that support querying the keys as well as values. By using the Task's key, we can - * prevent holding onto a reference to the Task resource data, while keeping the cache data in - * memory where necessary. + * An LRU cache that internally support querying the keys as well as values.  We use this to keep + * track of the task metadata to determine when to invalidate the cache when tasks have been + * updated. Generally, this cache will return the last known cache value for the requested task + * key.   */  public class KeyStoreLruCache<V> {      // We keep a set of keys that are associated with the LRU cache, so that we can find out      // information about the Task that was previously in the cache.      HashMap<Integer, Task.TaskKey> mTaskKeys = new HashMap<Integer, Task.TaskKey>(); -    // The cache implementation +    // The cache implementation, mapping task id -> value      LruCache<Integer, V> mCache;      public KeyStoreLruCache(int cacheSize) { diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsPackageMonitor.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsPackageMonitor.java index 60e89bf880a6..e48e5f053f5f 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsPackageMonitor.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsPackageMonitor.java @@ -19,6 +19,7 @@ package com.android.systemui.recents.model;  import android.content.ComponentName;  import android.content.Context;  import android.os.Looper; +import android.os.UserHandle;  import com.android.internal.content.PackageMonitor;  import com.android.systemui.recents.misc.SystemServicesProxy; @@ -26,16 +27,16 @@ import java.util.HashSet;  import java.util.List;  /** - * The package monitor listens for changes from PackageManager to update the contents of the Recents - * list. + * The package monitor listens for changes from PackageManager to update the contents of the + * Recents list.   */  public class RecentsPackageMonitor extends PackageMonitor {      public interface PackageCallbacks { -        public void onComponentRemoved(HashSet<ComponentName> cns); +        public void onPackagesChanged(RecentsPackageMonitor monitor, String packageName, +                                      int userId);      }      PackageCallbacks mCb; -    List<Task.TaskKey> mTasks;      SystemServicesProxy mSystemServicesProxy;      /** Registers the broadcast receivers with the specified callbacks. */ @@ -43,7 +44,9 @@ public class RecentsPackageMonitor extends PackageMonitor {          mSystemServicesProxy = new SystemServicesProxy(context);          mCb = cb;          try { -            register(context, Looper.getMainLooper(), true); +            // We register for events from all users, but will cross-reference them with +            // packages for the current user and any profiles they have +            register(context, Looper.getMainLooper(), UserHandle.ALL, true);          } catch (IllegalStateException e) {              e.printStackTrace();          } @@ -59,29 +62,15 @@ public class RecentsPackageMonitor extends PackageMonitor {          }          mSystemServicesProxy = null;          mCb = null; -        mTasks.clear(); -    } - -    /** Sets the list of tasks to match against package broadcast changes. */ -    void setTasks(List<Task.TaskKey> tasks) { -        mTasks = tasks;      }      @Override      public void onPackageRemoved(String packageName, int uid) {          if (mCb == null) return; -        // Identify all the tasks that should be removed as a result of the package being removed. -        // Using a set to ensure that we callback once per unique component. -        HashSet<ComponentName> componentsToRemove = new HashSet<ComponentName>(); -        for (Task.TaskKey t : mTasks) { -            ComponentName cn = t.baseIntent.getComponent(); -            if (cn.getPackageName().equals(packageName)) { -                componentsToRemove.add(cn); -            } -        } -        // Notify our callbacks that the components no longer exist -        mCb.onComponentRemoved(componentsToRemove); +        // Notify callbacks that a package has changed +        final int eventUserId = getChangingUserId(); +        mCb.onPackagesChanged(this, packageName, eventUserId);      }      @Override @@ -94,25 +83,38 @@ public class RecentsPackageMonitor extends PackageMonitor {      public void onPackageModified(String packageName) {          if (mCb == null) return; +        // Notify callbacks that a package has changed +        final int eventUserId = getChangingUserId(); +        mCb.onPackagesChanged(this, packageName, eventUserId); +    } + +    /** +     * Computes the components that have been removed as a result of a change in the specified +     * package. +     */ +    public HashSet<ComponentName> computeComponentsRemoved(List<Task.TaskKey> taskKeys, +            String packageName, int userId) {          // Identify all the tasks that should be removed as a result of the package being removed.          // Using a set to ensure that we callback once per unique component. -        HashSet<ComponentName> componentsKnownToExist = new HashSet<ComponentName>(); -        HashSet<ComponentName> componentsToRemove = new HashSet<ComponentName>(); -        for (Task.TaskKey t : mTasks) { +        HashSet<ComponentName> existingComponents = new HashSet<ComponentName>(); +        HashSet<ComponentName> removedComponents = new HashSet<ComponentName>(); +        for (Task.TaskKey t : taskKeys) { +            // Skip if this doesn't apply to the current user +            if (t.userId != userId) continue; +              ComponentName cn = t.baseIntent.getComponent();              if (cn.getPackageName().equals(packageName)) { -                if (componentsKnownToExist.contains(cn)) { +                if (existingComponents.contains(cn)) {                      // If we know that the component still exists in the package, then skip                      continue;                  } -                if (mSystemServicesProxy.getActivityInfo(cn) != null) { -                    componentsKnownToExist.add(cn); +                if (mSystemServicesProxy.getActivityInfo(cn, userId) != null) { +                    existingComponents.add(cn);                  } else { -                    componentsToRemove.add(cn); +                    removedComponents.add(cn);                  }              }          } -        // Notify our callbacks that the components no longer exist -        mCb.onComponentRemoved(componentsToRemove); +        return removedComponents;      }  } diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java index d40e8474e573..114e93f329d9 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java @@ -420,10 +420,6 @@ public class RecentsTaskLoader {          // Start the task loader and add all the tasks we need to load          mLoader.start(context);          mLoadQueue.addTasks(tasksToLoad); - -        // Update the package monitor with the list of packages to listen for -        mPackageMonitor.setTasks(taskKeys); -          return root;      } diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/Task.java b/packages/SystemUI/src/com/android/systemui/recents/model/Task.java index a7e2b0b4f3a3..55dfe4561de8 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/Task.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/Task.java @@ -129,7 +129,7 @@ public class Task {      TaskCallbacks mCb;      public Task() { -        // Only used by RecentsService for task rect calculations. +        // Do nothing      }      public Task(TaskKey key, boolean isActive, int taskAffiliation, int taskAffiliationColor, diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java index 1e47b504baf4..a37b9e63f30f 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java @@ -255,6 +255,17 @@ public class TaskStack {          return mTaskList.getTasks().get(mTaskList.size() - 1);      } +    /** Gets the task keys */ +    public ArrayList<Task.TaskKey> getTaskKeys() { +        ArrayList<Task.TaskKey> taskKeys = new ArrayList<Task.TaskKey>(); +        ArrayList<Task> tasks = mTaskList.getTasks(); +        int taskCount = tasks.size(); +        for (int i = 0; i < taskCount; i++) { +            taskKeys.add(tasks.get(i).key); +        } +        return taskKeys; +    } +      /** Gets the tasks */      public ArrayList<Task> getTasks() {          return mTaskList.getTasks(); diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/AnimateableViewBounds.java b/packages/SystemUI/src/com/android/systemui/recents/views/AnimateableViewBounds.java index 421b905530c8..5f8f3f26b594 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/AnimateableViewBounds.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/AnimateableViewBounds.java @@ -68,7 +68,7 @@ public class AnimateableViewBounds extends ViewOutlineProvider {              mSourceView.invalidateOutline();              updateClipBounds();              if (!mConfig.useHardwareLayers) { -                mSourceView.mThumbnailView.updateVisibility( +                mSourceView.mThumbnailView.updateThumbnailVisibility(                          bottom - mSourceView.getPaddingBottom());              }          } diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java index 9dfebfee627b..6b0d3066720e 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java @@ -18,7 +18,6 @@ package com.android.systemui.recents.views;  import android.app.ActivityOptions;  import android.app.TaskStackBuilder; -import android.content.ComponentName;  import android.content.Context;  import android.content.Intent;  import android.graphics.Bitmap; @@ -42,7 +41,6 @@ import com.android.systemui.recents.model.Task;  import com.android.systemui.recents.model.TaskStack;  import java.util.ArrayList; -import java.util.HashSet;  /**   * This view is the the top level layout that contains TaskStacks (which are laid out according @@ -564,14 +562,14 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV      /**** RecentsPackageMonitor.PackageCallbacks Implementation ****/      @Override -    public void onComponentRemoved(HashSet<ComponentName> cns) { +    public void onPackagesChanged(RecentsPackageMonitor monitor, String packageName, int userId) {          // Propagate this event down to each task stack view          int childCount = getChildCount();          for (int i = 0; i < childCount; i++) {              View child = getChildAt(i);              if (child != mSearchBar) {                  TaskStackView stackView = (TaskStackView) child; -                stackView.onComponentRemoved(cns); +                stackView.onPackagesChanged(monitor, packageName, userId);              }          }      } diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index e479952b4381..dee26e6e45ca 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -1081,12 +1081,16 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal      /**** RecentsPackageMonitor.PackageCallbacks Implementation ****/      @Override -    public void onComponentRemoved(HashSet<ComponentName> cns) { +    public void onPackagesChanged(RecentsPackageMonitor monitor, String packageName, int userId) { +        // Compute which components need to be removed +        HashSet<ComponentName> removedComponents = monitor.computeComponentsRemoved( +                mStack.getTaskKeys(), packageName, userId); +          // For other tasks, just remove them directly if they no longer exist          ArrayList<Task> tasks = mStack.getTasks();          for (int i = tasks.size() - 1; i >= 0; i--) {              final Task t = tasks.get(i); -            if (cns.contains(t.key.baseIntent.getComponent())) { +            if (removedComponents.contains(t.key.baseIntent.getComponent())) {                  TaskView tv = getChildViewForTask(t);                  if (tv != null) {                      // For visible children, defer removing the task until after the animation diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java index c9113fe6cc5b..04f7c6fca64b 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java @@ -23,6 +23,7 @@ import android.animation.ValueAnimator;  import android.content.Context;  import android.widget.OverScroller;  import com.android.systemui.recents.RecentsConfiguration; +import com.android.systemui.recents.misc.Utilities;  /* The scrolling logic for a TaskStackView */  public class TaskStackViewScroller { @@ -161,10 +162,7 @@ public class TaskStackViewScroller {      /** Aborts any current stack scrolls */      void stopBoundScrollAnimation() { -        if (mScrollAnimator != null) { -            mScrollAnimator.removeAllListeners(); -            mScrollAnimator.cancel(); -        } +        Utilities.cancelAnimationWithoutCallbacks(mScrollAnimator);      }      /**** OverScroller ****/ diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java index dfb30f30b378..7b4e10a74b3d 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java @@ -28,10 +28,9 @@ import android.view.ViewPropertyAnimator;  import android.view.animation.AccelerateInterpolator;  import android.widget.FrameLayout;  import com.android.systemui.R; -import com.android.systemui.recents.AlternateRecentsComponent;  import com.android.systemui.recents.Constants;  import com.android.systemui.recents.RecentsConfiguration; -import com.android.systemui.recents.model.RecentsTaskLoader; +import com.android.systemui.recents.misc.Utilities;  import com.android.systemui.recents.model.Task;  import com.android.systemui.statusbar.phone.PhoneStatusBar; @@ -53,11 +52,11 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,      float mTaskProgress;      ObjectAnimator mTaskProgressAnimator; -    ObjectAnimator mDimAnimator;      float mMaxDimScale; -    int mDim; +    int mDimAlpha;      AccelerateInterpolator mDimInterpolator = new AccelerateInterpolator(1f); -    PorterDuffColorFilter mDimColorFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.MULTIPLY); +    PorterDuffColorFilter mDimColorFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP); +    Paint mDimLayerPaint = new Paint();      Task mTask;      boolean mTaskDataLoaded; @@ -65,7 +64,6 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,      boolean mFocusAnimationsEnabled;      boolean mClipViewInStack;      AnimateableViewBounds mViewBounds; -    Paint mLayerPaint = new Paint();      View mContent;      TaskViewThumbnail mThumbnailView; @@ -130,7 +128,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,          mContent = findViewById(R.id.task_view_content);          mHeaderView = (TaskViewHeader) findViewById(R.id.task_view_bar);          mThumbnailView = (TaskViewThumbnail) findViewById(R.id.task_view_thumbnail); -        mThumbnailView.enableTaskBarClip(mHeaderView); +        mThumbnailView.updateClipToTaskBar(mHeaderView);          mActionButtonView = findViewById(R.id.lock_to_app_fab);          mActionButtonView.setOutlineProvider(new ViewOutlineProvider() {              @Override @@ -179,10 +177,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,                  !mConfig.fakeShadows, updateCallback);          // Update the task progress -        if (mTaskProgressAnimator != null) { -            mTaskProgressAnimator.removeAllListeners(); -            mTaskProgressAnimator.cancel(); -        } +        Utilities.cancelAnimationWithoutCallbacks(mTaskProgressAnimator);          if (duration <= 0) {              setTaskProgress(toTransform.p);          } else { @@ -377,7 +372,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,              mThumbnailView.startLaunchTaskAnimation(postAnimRunnable);              // Animate the dim -            if (mDim > 0) { +            if (mDimAlpha > 0) {                  ObjectAnimator anim = ObjectAnimator.ofInt(this, "dim", 0);                  anim.setDuration(mConfig.taskBarExitAnimDuration);                  anim.setInterpolator(mConfig.fastOutLinearInInterpolator); @@ -495,26 +490,16 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,      /** Returns the current dim. */      public void setDim(int dim) { -        mDim = dim; -        if (mDimAnimator != null) { -            mDimAnimator.removeAllListeners(); -            mDimAnimator.cancel(); -        } +        mDimAlpha = dim;          if (mConfig.useHardwareLayers) {              // Defer setting hardware layers if we have not yet measured, or there is no dim to draw              if (getMeasuredWidth() > 0 && getMeasuredHeight() > 0) { -                if (mDimAnimator != null) { -                    mDimAnimator.removeAllListeners(); -                    mDimAnimator.cancel(); -                } - -                int inverse = 255 - mDim; -                mDimColorFilter.setColor(Color.argb(0xFF, inverse, inverse, inverse)); -                mLayerPaint.setColorFilter(mDimColorFilter); -                mContent.setLayerType(LAYER_TYPE_HARDWARE, mLayerPaint); +                mDimColorFilter.setColor(Color.argb(mDimAlpha, 0, 0, 0)); +                mDimLayerPaint.setColorFilter(mDimColorFilter); +                mContent.setLayerType(LAYER_TYPE_HARDWARE, mDimLayerPaint);              }          } else { -            float dimAlpha = mDim / 255.0f; +            float dimAlpha = mDimAlpha / 255.0f;              if (mThumbnailView != null) {                  mThumbnailView.setDimAlpha(dimAlpha);              } @@ -526,7 +511,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,      /** Returns the current dim. */      public int getDim() { -        return mDim; +        return mDimAlpha;      }      /** Animates the dim to the task progress. */ diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java index 6554f820b5a6..ba868f5bc90d 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java @@ -36,7 +36,6 @@ import android.graphics.drawable.ColorDrawable;  import android.graphics.drawable.Drawable;  import android.graphics.drawable.GradientDrawable;  import android.graphics.drawable.RippleDrawable; -import android.graphics.drawable.ShapeDrawable;  import android.util.AttributeSet;  import android.view.MotionEvent;  import android.view.View; @@ -56,23 +55,27 @@ public class TaskViewHeader extends FrameLayout {      RecentsConfiguration mConfig; +    // Header views      ImageView mDismissButton;      ImageView mApplicationIcon;      TextView mActivityDescription; -    RippleDrawable mBackground; -    GradientDrawable mBackgroundColorDrawable; +    // Header drawables +    boolean mCurrentPrimaryColorIsDark; +    int mCurrentPrimaryColor;      int mBackgroundColor;      Drawable mLightDismissDrawable;      Drawable mDarkDismissDrawable; +    RippleDrawable mBackground; +    GradientDrawable mBackgroundColorDrawable;      AnimatorSet mFocusAnimator; -    PorterDuffColorFilter mDimFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP); - -    boolean mCurrentPrimaryColorIsDark; -    int mCurrentPrimaryColor; +    // Static highlight that we draw at the top of each view      static Paint sHighlightPaint; -    private Paint mDimPaint = new Paint(); + +    // Header dim, which is only used when task view hardware layers are not used +    Paint mDimLayerPaint = new Paint(); +    PorterDuffColorFilter mDimColorFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP);      public TaskViewHeader(Context context) {          this(context, null); @@ -172,6 +175,16 @@ public class TaskViewHeader extends FrameLayout {          return false;      } +    /** +     * Sets the dim alpha, only used when we are not using hardware layers. +     * (see RecentsConfiguration.useHardwareLayers) +     */ +    void setDimAlpha(int alpha) { +        mDimColorFilter.setColor(Color.argb(alpha, 0, 0, 0)); +        mDimLayerPaint.setColorFilter(mDimColorFilter); +        setLayerType(LAYER_TYPE_HARDWARE, mDimLayerPaint); +    } +      /** Returns the secondary color for a primary color. */      int getSecondaryColor(int primaryColor, boolean useLightOverlayColor) {          int overlayColor = useLightOverlayColor ? Color.WHITE : Color.BLACK; @@ -266,8 +279,7 @@ public class TaskViewHeader extends FrameLayout {          boolean isRunning = false;          if (mFocusAnimator != null) {              isRunning = mFocusAnimator.isRunning(); -            mFocusAnimator.removeAllListeners(); -            mFocusAnimator.cancel(); +            Utilities.cancelAnimationWithoutCallbacks(mFocusAnimator);          }          if (focused) { @@ -344,11 +356,4 @@ public class TaskViewHeader extends FrameLayout {              }          }      } - -    public void setDimAlpha(int alpha) { -        int color = Color.argb(alpha, 0, 0, 0); -        mDimFilter.setColor(color); -        mDimPaint.setColorFilter(mDimFilter); -        setLayerType(LAYER_TYPE_HARDWARE, mDimPaint); -    }  } diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java index a946a849310b..c83248ef37d9 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java @@ -33,37 +33,48 @@ import android.graphics.Shader;  import android.util.AttributeSet;  import android.view.View;  import com.android.systemui.recents.RecentsConfiguration; +import com.android.systemui.recents.misc.Utilities;  import com.android.systemui.recents.model.Task; -/** The task thumbnail view */ +/** + * The task thumbnail view.  It implements an image view that allows for animating the dim and + * alpha of the thumbnail image. + */  public class TaskViewThumbnail extends View { -    private final int mCornerRadius; -    private final Matrix mScaleMatrix = new Matrix();      RecentsConfiguration mConfig; -    // Task bar clipping -    Rect mClipRect = new Rect(); +    // Drawing +    float mDimAlpha; +    Matrix mScaleMatrix = new Matrix();      Paint mDrawPaint = new Paint(); +    RectF mBitmapRect = new RectF(); +    RectF mLayoutRect = new RectF(); +    BitmapShader mBitmapShader;      LightingColorFilter mLightingColorFilter = new LightingColorFilter(0xffffffff, 0); -    private final RectF mBitmapRect = new RectF(); -    private final RectF mLayoutRect = new RectF(); -    private BitmapShader mBitmapShader; -    private float mBitmapAlpha; -    private float mDimAlpha; -    private View mTaskBar; -    private boolean mInvisible; -    private ValueAnimator mAlphaAnimator; -    private ValueAnimator.AnimatorUpdateListener mAlphaUpdateListener + +    // Thumbnail alpha +    float mThumbnailAlpha; +    ValueAnimator mThumbnailAlphaAnimator; +    ValueAnimator.AnimatorUpdateListener mThumbnailAlphaUpdateListener              = new ValueAnimator.AnimatorUpdateListener() {          @Override          public void onAnimationUpdate(ValueAnimator animation) { -            mBitmapAlpha = (float) animation.getAnimatedValue(); -            updateFilter(); +            mThumbnailAlpha = (float) animation.getAnimatedValue(); +            updateThumbnailPaintFilter();          }      }; +    // Task bar clipping, the top of this thumbnail can be clipped against the opaque header +    // bar that overlaps this thumbnail +    View mTaskBar; +    Rect mClipRect = new Rect(); + +    // Visibility optimization, if the thumbnail height is less than the height of the header +    // bar for the task view, then just mark this thumbnail view as invisible +    boolean mInvisible; +      public TaskViewThumbnail(Context context) {          this(context, null);      } @@ -79,53 +90,82 @@ public class TaskViewThumbnail extends View {      public TaskViewThumbnail(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {          super(context, attrs, defStyleAttr, defStyleRes);          mConfig = RecentsConfiguration.getInstance(); -        mCornerRadius = mConfig.taskViewRoundedCornerRadiusPx;          mDrawPaint.setColorFilter(mLightingColorFilter);          mDrawPaint.setFilterBitmap(true);          mDrawPaint.setAntiAlias(true);      }      @Override +    protected void onFinishInflate() { +        mThumbnailAlpha = mConfig.taskViewThumbnailAlpha; +        updateThumbnailPaintFilter(); +    } + +    @Override +    protected void onLayout(boolean changed, int left, int top, int right, int bottom) { +        super.onLayout(changed, left, top, right, bottom); +        if (changed) { +            mLayoutRect.set(0, 0, getWidth(), getHeight()); +            updateThumbnailScale(); +        } +    } + +    @Override      protected void onDraw(Canvas canvas) {          if (mInvisible) {              return;          } -        canvas.drawRoundRect(0, -                0, -                getWidth(), -                getHeight(), -                mCornerRadius, -                mCornerRadius, -                mDrawPaint); +        // Draw the thumbnail with the rounded corners +        canvas.drawRoundRect(0, 0, getWidth(), getHeight(), +                mConfig.taskViewRoundedCornerRadiusPx, +                mConfig.taskViewRoundedCornerRadiusPx, mDrawPaint);      } -    @Override -    protected void onFinishInflate() { -        mBitmapAlpha = 0.9f; -        updateFilter(); +    /** Sets the thumbnail to a given bitmap. */ +    void setThumbnail(Bitmap bm) { +        if (bm != null) { +            mBitmapShader = new BitmapShader(bm, Shader.TileMode.CLAMP, +                    Shader.TileMode.CLAMP); +            mDrawPaint.setShader(mBitmapShader); +            mBitmapRect.set(0, 0, bm.getWidth(), bm.getHeight()); +            updateThumbnailScale(); +        } else { +            mBitmapShader = null; +            mDrawPaint.setShader(null); +        } +        updateThumbnailPaintFilter();      } -    private void updateFilter() { +    /** Updates the paint to draw the thumbnail. */ +    void updateThumbnailPaintFilter() {          if (mInvisible) {              return;          } -        int mul = (int) ((1.0f - mDimAlpha) * mBitmapAlpha * 255); -        int add = (int) ((1.0f - mDimAlpha) * (1 - mBitmapAlpha) * 255); +        int mul = (int) ((1.0f - mDimAlpha) * mThumbnailAlpha * 255); +        int add = (int) ((1.0f - mDimAlpha) * (1 - mThumbnailAlpha) * 255);          if (mBitmapShader != null) {              mLightingColorFilter.setColorMultiply(Color.argb(255, mul, mul, mul));              mLightingColorFilter.setColorAdd(Color.argb(0, add, add, add));              mDrawPaint.setColorFilter(mLightingColorFilter);              mDrawPaint.setColor(0xffffffff);          } else { -            mDrawPaint.setColorFilter(null);              int grey = mul + add; +            mDrawPaint.setColorFilter(null);              mDrawPaint.setColor(Color.argb(255, grey, grey, grey));          }          invalidate();      } +    /** Updates the thumbnail shader's scale transform. */ +    void updateThumbnailScale() { +        if (mBitmapShader != null) { +            mScaleMatrix.setRectToRect(mBitmapRect, mLayoutRect, Matrix.ScaleToFit.FILL); +            mBitmapShader.setLocalMatrix(mScaleMatrix); +        } +    } +      /** Updates the clip rect based on the given task bar. */ -    void enableTaskBarClip(View taskBar) { +    void updateClipToTaskBar(View taskBar) {          mTaskBar = taskBar;          int top = (int) Math.max(0, taskBar.getTranslationY() +                  taskBar.getMeasuredHeight() - 1); @@ -133,75 +173,39 @@ public class TaskViewThumbnail extends View {          setClipBounds(mClipRect);      } -    void updateVisibility(int clipBottom) { -        boolean invisible = mTaskBar != null && getHeight() - clipBottom < mTaskBar.getHeight(); +    /** Updates the visibility of the the thumbnail. */ +    void updateThumbnailVisibility(int clipBottom) { +        boolean invisible = mTaskBar != null && (getHeight() - clipBottom) <= mTaskBar.getHeight();          if (invisible != mInvisible) {              mInvisible = invisible;              if (!mInvisible) { -                updateFilter(); +                updateThumbnailPaintFilter();              }              invalidate();          }      } -    /** Binds the thumbnail view to the screenshot. */ -    boolean bindToScreenshot(Bitmap ss) { -        setImageBitmap(ss); -        return ss != null; -    } - -    /** Unbinds the thumbnail view from the screenshot. */ -    void unbindFromScreenshot() { -        setImageBitmap(null); +    /** +     * Sets the dim alpha, only used when we are not using hardware layers. +     * (see RecentsConfiguration.useHardwareLayers) +     */ +    public void setDimAlpha(float dimAlpha) { +        mDimAlpha = dimAlpha; +        updateThumbnailPaintFilter();      }      /** Binds the thumbnail view to the task */      void rebindToTask(Task t) {          if (t.thumbnail != null) { -            setImageBitmap(t.thumbnail); +            setThumbnail(t.thumbnail);          } else { -            setImageBitmap(null); +            setThumbnail(null);          }      } -    public void setImageBitmap(Bitmap bm) { -        if (bm != null) { -            mBitmapShader = new BitmapShader(bm, Shader.TileMode.CLAMP, -                    Shader.TileMode.CLAMP); -            mDrawPaint.setShader(mBitmapShader); -            mBitmapRect.set(0, 0, bm.getWidth(), bm.getHeight()); -            updateBitmapScale(); -        } else { -            mBitmapShader = null; -            mDrawPaint.setShader(null); -        } -        updateFilter(); -    } - -    @Override -    protected void onLayout(boolean changed, int left, int top, int right, int bottom) { -        super.onLayout(changed, left, top, right, bottom); -        if (changed) { -            mLayoutRect.set(0, 0, getWidth(), getHeight()); -            updateBitmapScale(); -        } -    } - -    private void updateBitmapScale() { -        if (mBitmapShader != null) { -            mScaleMatrix.setRectToRect(mBitmapRect, mLayoutRect, Matrix.ScaleToFit.FILL); -            mBitmapShader.setLocalMatrix(mScaleMatrix); -        } -    } - -    public void setDimAlpha(float dimAlpha) { -        mDimAlpha = dimAlpha; -        updateFilter(); -    } -      /** Unbinds the thumbnail view from the task */      void unbindFromTask() { -        setImageBitmap(null); +        setThumbnail(null);      }      /** Handles focus changes. */ @@ -217,54 +221,46 @@ public class TaskViewThumbnail extends View {          }      } -    /** Prepares for the enter recents animation. */ +    /** +     * Prepares for the enter recents animation, this gets called before the the view +     * is first visible and will be followed by a startEnterRecentsAnimation() call. +     */      void prepareEnterRecentsAnimation(boolean isTaskViewLaunchTargetTask) {          if (isTaskViewLaunchTargetTask) { -            mBitmapAlpha = 1f; +            mThumbnailAlpha = 1f;          } else { -            mBitmapAlpha = mConfig.taskViewThumbnailAlpha; +            mThumbnailAlpha = mConfig.taskViewThumbnailAlpha;          } -        updateFilter(); +        updateThumbnailPaintFilter();      } -    /** Animates this task thumbnail as it enters recents */ +    /** Animates this task thumbnail as it enters Recents. */      void startEnterRecentsAnimation(int delay, Runnable postAnimRunnable) {          startFadeAnimation(mConfig.taskViewThumbnailAlpha, delay,                  mConfig.taskBarEnterAnimDuration, postAnimRunnable);      } -    /** Animates this task thumbnail as it exits recents */ +    /** Animates this task thumbnail as it exits Recents. */      void startLaunchTaskAnimation(Runnable postAnimRunnable) {          startFadeAnimation(1f, 0, mConfig.taskBarExitAnimDuration, postAnimRunnable);      } -    /** Animates the thumbnail alpha. */ +    /** Starts a new thumbnail alpha animation. */      void startFadeAnimation(float finalAlpha, int delay, int duration, final Runnable postAnimRunnable) { -        if (mAlphaAnimator != null) { -            mAlphaAnimator.cancel(); -        } -        mAlphaAnimator = ValueAnimator.ofFloat(mBitmapAlpha, finalAlpha); -        mAlphaAnimator.addUpdateListener(mAlphaUpdateListener); -        mAlphaAnimator.setStartDelay(delay); -        mAlphaAnimator.setInterpolator(mConfig.fastOutSlowInInterpolator); -        mAlphaAnimator.setDuration(duration); -        mAlphaAnimator.start(); +        Utilities.cancelAnimationWithoutCallbacks(mThumbnailAlphaAnimator); +        mThumbnailAlphaAnimator = ValueAnimator.ofFloat(mThumbnailAlpha, finalAlpha); +        mThumbnailAlphaAnimator.setStartDelay(delay); +        mThumbnailAlphaAnimator.setDuration(duration); +        mThumbnailAlphaAnimator.setInterpolator(mConfig.fastOutSlowInInterpolator); +        mThumbnailAlphaAnimator.addUpdateListener(mThumbnailAlphaUpdateListener);          if (postAnimRunnable != null) { -            mAlphaAnimator.addListener(new AnimatorListenerAdapter() { -                public boolean mCancelled; - -                @Override -                public void onAnimationCancel(Animator animation) { -                    mCancelled = true; -                } - +            mThumbnailAlphaAnimator.addListener(new AnimatorListenerAdapter() {                  @Override                  public void onAnimationEnd(Animator animation) { -                    if (!mCancelled) { -                        postAnimRunnable.run(); -                    } +                    postAnimRunnable.run();                  }              });          } +        mThumbnailAlphaAnimator.start();      }  } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index f5e5517b731c..7c74246ba4d2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -69,6 +69,7 @@ import android.view.View;  import android.view.ViewAnimationUtils;  import android.view.ViewGroup;  import android.view.ViewGroup.LayoutParams; +import android.view.ViewParent;  import android.view.ViewStub;  import android.view.WindowManager;  import android.view.WindowManagerGlobal; @@ -266,6 +267,7 @@ public abstract class BaseStatusBar extends SystemUI implements              if (DEBUG) {                  Log.v(TAG, "Notification click handler invoked for intent: " + pendingIntent);              } +            logActionClick(view);              // The intent we are sending is for the application, which              // won't have permission to immediately start an activity after              // the user switches to home.  We know it is safe to do at this @@ -308,6 +310,37 @@ public abstract class BaseStatusBar extends SystemUI implements              }          } +        private void logActionClick(View view) { +            ViewParent parent = view.getParent(); +            String key = getNotificationKeyForParent(parent); +            if (key == null) { +                Log.w(TAG, "Couldn't determine notification for click."); +                return; +            } +            int index = -1; +            // If this is a default template, determine the index of the button. +            if (view.getId() == com.android.internal.R.id.action0 && +                    parent != null && parent instanceof ViewGroup) { +                ViewGroup actionGroup = (ViewGroup) parent; +                index = actionGroup.indexOfChild(view); +            } +            try { +                mBarService.onNotificationActionClick(key, index); +            } catch (RemoteException e) { +                // Ignore +            } +        } + +        private String getNotificationKeyForParent(ViewParent parent) { +            while (parent != null) { +                if (parent instanceof ExpandableNotificationRow) { +                    return ((ExpandableNotificationRow) parent).getStatusBarNotification().getKey(); +                } +                parent = parent.getParent(); +            } +            return null; +        } +          private boolean superOnClickHandler(View view, PendingIntent pendingIntent,                  Intent fillInIntent) {              return super.onClickHandler(view, pendingIntent, fillInIntent); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 9196dc89c6c3..556c423080b9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -158,6 +158,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {      public void resetHeight() {          mMaxExpandHeight = 0;          mWasReset = true; +        mActualHeight = 0;          onHeightReset();          requestLayout();      } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index a6fccb624ab2..c19bdffaf466 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -802,6 +802,7 @@ public class NotificationPanelView extends PanelView implements              requestPanelHeightUpdate();              mNotificationStackScroller.setInterceptDelegateEnabled(expanded);              mStatusBar.setQsExpanded(expanded); +            mQsPanel.setExpanded(expanded);          }      } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java index f74d2f4baf70..3efaaff21a4d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java @@ -236,4 +236,8 @@ public class PanelBar extends FrameLayout {      public void onExpandingFinished() {      } + +    public void onClosingFinished() { + +    }  } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index a7ff0bde678b..0ddda8a3ab12 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -68,7 +68,6 @@ public abstract class PanelView extends FrameLayout {      protected int mTouchSlop;      protected boolean mHintAnimationRunning;      private boolean mOverExpandedBeforeFling; -    private float mOriginalIndicationY;      private boolean mTouchAboveFalsingThreshold;      private int mUnlockFalsingThreshold; @@ -107,7 +106,7 @@ public abstract class PanelView extends FrameLayout {      };      protected void onExpandingFinished() { -        mClosing = false; +        endClosing();          mBar.onExpandingFinished();      } @@ -250,9 +249,7 @@ public abstract class PanelView extends FrameLayout {                  trackMovement(event);                  if (!waitForTouchSlop || (mHeightAnimator != null && !mHintAnimationRunning) ||                          mPeekPending || mPeekAnimator != null) { -                    if (mHeightAnimator != null) { -                        mHeightAnimator.cancel(); // end any outstanding animations -                    } +                    cancelHeightAnimator();                      cancelPeek();                      mTouchSlopExceeded = (mHeightAnimator != null && !mHintAnimationRunning)                              || mPeekPending || mPeekAnimator != null; @@ -293,9 +290,7 @@ public abstract class PanelView extends FrameLayout {                              mInitialTouchY = y;                              h = 0;                          } -                        if (mHeightAnimator != null) { -                            mHeightAnimator.cancel(); // end any outstanding animations -                        } +                        cancelHeightAnimator();                          removeCallbacks(mPeekRunnable);                          mPeekPending = false;                          onTrackingStarted(); @@ -372,7 +367,7 @@ public abstract class PanelView extends FrameLayout {      }      protected void onTrackingStarted() { -        mClosing = false; +        endClosing();          mTracking = true;          mCollapseAfterPeek = false;          mBar.onTrackingStarted(PanelView.this); @@ -407,9 +402,7 @@ public abstract class PanelView extends FrameLayout {                  mStatusBar.userActivity();                  if (mHeightAnimator != null && !mHintAnimationRunning ||                          mPeekPending || mPeekAnimator != null) { -                    if (mHeightAnimator != null) { -                        mHeightAnimator.cancel(); // end any outstanding animations -                    } +                    cancelHeightAnimator();                      cancelPeek();                      mTouchSlopExceeded = true;                      return true; @@ -441,9 +434,7 @@ public abstract class PanelView extends FrameLayout {                  trackMovement(event);                  if (scrolledToBottom) {                      if (h < -mTouchSlop && h < -Math.abs(x - mInitialTouchX)) { -                        if (mHeightAnimator != null) { -                            mHeightAnimator.cancel(); -                        } +                        cancelHeightAnimator();                          mInitialOffsetOnTouch = mExpandedHeight;                          mInitialTouchY = y;                          mInitialTouchX = x; @@ -461,6 +452,20 @@ public abstract class PanelView extends FrameLayout {          return false;      } +    private void cancelHeightAnimator() { +        if (mHeightAnimator != null) { +            mHeightAnimator.cancel(); +        } +        endClosing(); +    } + +    private void endClosing() { +        if (mClosing) { +            mClosing = false; +            onClosingFinished(); +        } +    } +      private void initVelocityTracker() {          if (mVelocityTracker != null) {              mVelocityTracker.recycle(); @@ -700,9 +705,7 @@ public abstract class PanelView extends FrameLayout {                  mPeekRunnable.run();              }          } else if (!isFullyCollapsed() && !mTracking && !mClosing) { -            if (mHeightAnimator != null) { -                mHeightAnimator.cancel(); -            } +            cancelHeightAnimator();              mClosing = true;              notifyExpandingStarted();              if (delayed) { @@ -785,13 +788,16 @@ public abstract class PanelView extends FrameLayout {      private void abortAnimations() {          cancelPeek(); -        if (mHeightAnimator != null) { -            mHeightAnimator.cancel(); -        } +        cancelHeightAnimator();          removeCallbacks(mPostCollapseRunnable);          removeCallbacks(mFlingCollapseRunnable);      } +    protected void onClosingFinished() { +        mBar.onClosingFinished(); +    } + +      protected void startUnlockHintAnimation() {          // We don't need to hint the user if an animation is already running or the user is changing @@ -841,16 +847,15 @@ public abstract class PanelView extends FrameLayout {          });          animator.start();          mHeightAnimator = animator; -        mOriginalIndicationY = mKeyguardBottomArea.getIndicationView().getY();          mKeyguardBottomArea.getIndicationView().animate() -                .y(mOriginalIndicationY - mHintDistance) +                .translationY(-mHintDistance)                  .setDuration(250)                  .setInterpolator(mFastOutSlowInInterpolator)                  .withEndAction(new Runnable() {                      @Override                      public void run() {                          mKeyguardBottomArea.getIndicationView().animate() -                                .y(mOriginalIndicationY) +                                .translationY(0)                                  .setDuration(450)                                  .setInterpolator(mBounceInterpolator)                                  .start(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index e5c9bddabe1f..be27ddcee42b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -801,7 +801,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,          }          mUserInfoController = new UserInfoController(mContext);          mVolumeComponent = getComponent(VolumeComponent.class); -        mZenModeController = mVolumeComponent.getZenController(); +        if (mVolumeComponent != null) { +            mZenModeController = mVolumeComponent.getZenController(); +        }          mCastController = new CastControllerImpl(mContext);          final SignalClusterView signalCluster =                  (SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster); @@ -3793,6 +3795,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,          runPostCollapseRunnables();      } +    public void onClosingFinished() { +        runPostCollapseRunnables(); +    } +      public void onUnlockHintStarted() {          mKeyguardIndicationController.showTransientIndication(R.string.keyguard_unlock);      } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 6411fb84ccd2..e4eae38fcdcd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -20,7 +20,6 @@ import android.content.Context;  import android.content.res.Resources;  import android.util.AttributeSet;  import android.util.EventLog; -import android.util.Log;  import android.view.MotionEvent;  import android.view.View;  import android.view.accessibility.AccessibilityEvent; @@ -152,6 +151,12 @@ public class PhoneStatusBarView extends PanelBar {      }      @Override +    public void onClosingFinished() { +        super.onClosingFinished(); +        mBar.onClosingFinished(); +    } + +    @Override      public void onTrackingStopped(PanelView panel, boolean expand) {          super.onTrackingStopped(panel, expand);          mBar.onTrackingStopped(expand); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java index ca853a964d29..247252cfcc48 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java @@ -302,9 +302,6 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL          updateSystemIconsLayoutParams();          updateClickTargets();          updateMultiUserSwitch(); -        if (mQSPanel != null) { -            mQSPanel.setExpanded(mExpanded); -        }          updateClockScale();          updateAvatarScale();          updateClockLp(); diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java index 0586a83d12ab..0fe6d892a0f3 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -1,7 +1,6 @@  package com.android.systemui.volume;  import android.content.Context; -import android.content.Intent;  import android.content.res.Configuration;  import android.database.ContentObserver;  import android.media.AudioManager; @@ -11,13 +10,10 @@ import android.media.session.ISessionController;  import android.media.session.MediaController;  import android.media.session.MediaSessionManager;  import android.net.Uri; -import android.os.AsyncTask;  import android.os.Handler;  import android.os.RemoteException; -import android.os.UserHandle;  import android.provider.Settings;  import android.util.Log; -import android.view.WindowManagerGlobal;  import com.android.systemui.R;  import com.android.systemui.SystemUI; @@ -53,6 +49,7 @@ public class VolumeUI extends SystemUI {      private final Handler mHandler = new Handler(); +    private boolean mEnabled;      private AudioManager mAudioManager;      private MediaSessionManager mMediaSessionManager;      private VolumeController mVolumeController; @@ -63,6 +60,8 @@ public class VolumeUI extends SystemUI {      @Override      public void start() { +        mEnabled = mContext.getResources().getBoolean(R.bool.enable_volume_ui); +        if (!mEnabled) return;          mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);          mMediaSessionManager = (MediaSessionManager) mContext                  .getSystemService(Context.MEDIA_SESSION_SERVICE); @@ -84,6 +83,7 @@ public class VolumeUI extends SystemUI {      @Override      public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { +        pw.print("mEnabled="); pw.println(mEnabled);          if (mPanel != null) {              mPanel.dump(fd, pw, args);          } diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index e1845771c6af..558cf56f14d6 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1431,6 +1431,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {              case TYPE_WALLPAPER:              case TYPE_PRIVATE_PRESENTATION:              case TYPE_VOICE_INTERACTION: +            case TYPE_ACCESSIBILITY_OVERLAY:                  // The window manager will check these.                  break;              case TYPE_PHONE: @@ -1660,15 +1661,18 @@ public class PhoneWindowManager implements WindowManagerPolicy {              // the drag layer: input for drag-and-drop is associated with this window,              // which sits above all other focusable windows              return 25; -        case TYPE_SECURE_SYSTEM_OVERLAY: +        case TYPE_ACCESSIBILITY_OVERLAY: +            // overlay put by accessibility services to intercept user interaction              return 26; -        case TYPE_BOOT_PROGRESS: +        case TYPE_SECURE_SYSTEM_OVERLAY:              return 27; +        case TYPE_BOOT_PROGRESS: +            return 28;          case TYPE_POINTER:              // the (mouse) pointer layer -            return 28; -        case TYPE_HIDDEN_NAV_CONSUMER:              return 29; +        case TYPE_HIDDEN_NAV_CONSUMER: +            return 30;          }          Log.e(TAG, "Unknown window type: " + type);          return 2; @@ -1972,7 +1976,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {                  }                  mKeyguardScrim = win;                  break; -          }          return WindowManagerGlobal.ADD_OKAY;      } diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index e1a74d1432d4..278189008362 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -1040,7 +1040,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {      private void addServiceLocked(Service service, UserState userState) {          try { -            service.linkToOwnDeathLocked(); +            service.onAdded();              userState.mBoundServices.add(service);              userState.mComponentNameToServiceMap.put(service.mComponentName, service);          } catch (RemoteException re) { @@ -1056,7 +1056,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {      private void removeServiceLocked(Service service, UserState userState) {          userState.mBoundServices.remove(service);          userState.mComponentNameToServiceMap.remove(service.mComponentName); -        service.unlinkToOwnDeathLocked(); +        service.onRemoved();      }      /** @@ -1931,6 +1931,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {          final ResolveInfo mResolveInfo; +        final IBinder mOverlayWindowToken = new Binder(); +          // the events pending events to be dispatched to this service          final SparseArray<AccessibilityEvent> mPendingEvents =              new SparseArray<>(); @@ -2112,7 +2114,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {                      userState.mBindingServices.remove(mComponentName);                      mWasConnectedAndDied = false;                      try { -                       mServiceInterface.setConnection(this, mId); +                       mServiceInterface.init(this, mId, mOverlayWindowToken);                         onUserStateChangedLocked(userState);                      } catch (RemoteException re) {                          Slog.w(LOG_TAG, "Error while setting connection for service: " @@ -2602,6 +2604,27 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {              /* do nothing - #binderDied takes care */          } +        public void onAdded() throws RemoteException { +            linkToOwnDeathLocked(); +            final long identity = Binder.clearCallingIdentity(); +            try { +                mWindowManagerService.addWindowToken(mOverlayWindowToken, +                        WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY); +            } finally { +                Binder.restoreCallingIdentity(identity); +            } +        } + +        public void onRemoved() { +            final long identity = Binder.clearCallingIdentity(); +            try { +                mWindowManagerService.removeWindowToken(mOverlayWindowToken, true); +            } finally { +                Binder.restoreCallingIdentity(identity); +            } +            unlinkToOwnDeathLocked(); +        } +          public void linkToOwnDeathLocked() throws RemoteException {              mService.linkToDeath(this, 0);          } @@ -2614,7 +2637,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {              try {                  // Clear the proxy in the other process so this                  // IAccessibilityServiceConnection can be garbage collected. -                mServiceInterface.setConnection(null, mId); +                mServiceInterface.init(null, mId, null);              } catch (RemoteException re) {                  /* ignore */              } @@ -3164,6 +3187,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {                      return AccessibilityWindowInfo.TYPE_SYSTEM;                  } +                case WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY: { +                    return AccessibilityWindowInfo.TYPE_ACCESSIBILITY_OVERLAY; +                } +                  default: {                      return -1;                  } diff --git a/services/core/java/com/android/server/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags index 64d8f6fd09f5..eec97f3f7686 100644 --- a/services/core/java/com/android/server/EventLogTags.logtags +++ b/services/core/java/com/android/server/EventLogTags.logtags @@ -69,6 +69,10 @@ option java_package com.android.server  27511 notification_expansion (key|3),(user_action|1),(expanded|1)  # when a notification has been clicked  27520 notification_clicked (key|3) +# when a notification action button has been clicked +27521 notification_action_clicked (key|3),(action_index|1) +# when a notification has been canceled +27530 notification_canceled (key|3),(reason|1)  # ---------------------------  # Watchdog.java diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java index 28a6917cb0c7..d9c96e4a2537 100644 --- a/services/core/java/com/android/server/LocationManagerService.java +++ b/services/core/java/com/android/server/LocationManagerService.java @@ -1796,9 +1796,6 @@ public class LocationManagerService extends ILocationManager.Stub {      @Override      public boolean addGpsStatusListener(IGpsStatusListener listener, String packageName) { -        if (mGpsStatusProvider == null) { -            return false; -        }          int allowedResolutionLevel = getCallerAllowedResolutionLevel();          checkResolutionLevelIsSufficientForProviderUse(allowedResolutionLevel,                  LocationManager.GPS_PROVIDER); @@ -1813,6 +1810,10 @@ public class LocationManagerService extends ILocationManager.Stub {              Binder.restoreCallingIdentity(ident);          } +        if (mGpsStatusProvider == null) { +            return false; +        } +          try {              mGpsStatusProvider.addGpsStatusListener(listener);          } catch (RemoteException e) { diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 970d275ac15a..9f1ce0b44501 100755 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -8852,7 +8852,8 @@ public final class ActivityManagerService extends ActivityManagerNative                  task = mStackSupervisor.anyTaskForIdLocked(task.taskId);                  if (task != null) {                      if (!isSystemInitiated -                            && ((mFocusedActivity == null) || (task != mFocusedActivity.task))) { +                            && ((mStackSupervisor.getFocusedStack() == null) +                                    || (task != mStackSupervisor.getFocusedStack().topTask()))) {                          throw new IllegalArgumentException("Invalid task, not in foreground");                      }                      mStackSupervisor.setLockTaskModeLocked(task, !isSystemInitiated); diff --git a/services/core/java/com/android/server/am/LockTaskNotify.java b/services/core/java/com/android/server/am/LockTaskNotify.java index 5768ddbe8380..b3777ed30c21 100644 --- a/services/core/java/com/android/server/am/LockTaskNotify.java +++ b/services/core/java/com/android/server/am/LockTaskNotify.java @@ -19,6 +19,7 @@ package com.android.server.am;  import android.content.Context;  import android.os.Handler;  import android.os.Message; +import android.view.WindowManager;  import android.view.accessibility.AccessibilityManager;  import android.widget.Toast; @@ -56,8 +57,7 @@ public class LockTaskNotify {          if (mLastToast != null) {              mLastToast.cancel();          } -        mLastToast = Toast.makeText(mContext, text, Toast.LENGTH_LONG); -        mLastToast.show(); +        mLastToast = makeAllUserToastAndShow(text);      }      public void show(boolean starting) { @@ -65,7 +65,15 @@ public class LockTaskNotify {          if (starting) {              showString = R.string.lock_to_app_start;          } -        Toast.makeText(mContext, mContext.getString(showString), Toast.LENGTH_LONG).show(); +        makeAllUserToastAndShow(mContext.getString(showString)); +    } + +    private Toast makeAllUserToastAndShow(String text) { +        Toast toast = Toast.makeText(mContext, text, Toast.LENGTH_LONG); +        toast.getWindowParams().privateFlags |= +                WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; +        toast.show(); +        return toast;      }      private final class H extends Handler { diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java index 953bef288133..e741fc4f8dc1 100644 --- a/services/core/java/com/android/server/hdmi/HdmiControlService.java +++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java @@ -2087,7 +2087,7 @@ public final class HdmiControlService extends SystemService {          assertRunOnServiceThread();          Intent intent = new Intent(HdmiControlManager.ACTION_OSD_MESSAGE);          intent.putExtra(HdmiControlManager.EXTRA_MESSAGE_ID, messageId); -        intent.putExtra(HdmiControlManager.EXTRA_MESSAGE_EXTRAM_PARAM1, extra); +        intent.putExtra(HdmiControlManager.EXTRA_MESSAGE_EXTRA_PARAM1, extra);          getContext().sendBroadcastAsUser(intent, UserHandle.ALL,                  HdmiControlService.PERMISSION);      } diff --git a/services/core/java/com/android/server/notification/NotificationDelegate.java b/services/core/java/com/android/server/notification/NotificationDelegate.java index 97f0a1ec263d..24fc45508bc1 100644 --- a/services/core/java/com/android/server/notification/NotificationDelegate.java +++ b/services/core/java/com/android/server/notification/NotificationDelegate.java @@ -20,6 +20,7 @@ public interface NotificationDelegate {      void onSetDisabled(int status);      void onClearAll(int callingUid, int callingPid, int userId);      void onNotificationClick(int callingUid, int callingPid, String key); +    void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex);      void onNotificationClear(int callingUid, int callingPid,              String pkg, String tag, int id, int userId);      void onNotificationError(int callingUid, int callingPid, diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 22f060f9c8e2..090967f74e29 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -541,6 +541,20 @@ public class NotificationManagerService extends SystemService {          }          @Override +        public void onNotificationActionClick(int callingUid, int callingPid, String key, +                int actionIndex) { +            synchronized (mNotificationList) { +                EventLogTags.writeNotificationActionClicked(key, actionIndex); +                NotificationRecord r = mNotificationsByKey.get(key); +                if (r == null) { +                    Log.w(TAG, "No notification with key: " + key); +                    return; +                } +                // TODO: Log action click via UsageStats. +            } +        } + +        @Override          public void onNotificationClear(int callingUid, int callingPid,                  String pkg, String tag, int id, int userId) {              cancelNotification(callingUid, callingPid, pkg, tag, id, 0, @@ -2358,6 +2372,8 @@ public class NotificationManagerService extends SystemService {          // Save it for users of getHistoricalNotifications()          mArchive.record(r.sbn); + +        EventLogTags.writeNotificationCanceled(r.getKey(), reason);      }      /** diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java index f19bfc25b077..15e0bf03d2e0 100644 --- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java +++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java @@ -525,6 +525,20 @@ public class StatusBarManagerService extends IStatusBarService.Stub {      }      @Override +    public void onNotificationActionClick(String key, int actionIndex) { +        enforceStatusBarService(); +        final int callingUid = Binder.getCallingUid(); +        final int callingPid = Binder.getCallingPid(); +        long identity = Binder.clearCallingIdentity(); +        try { +            mNotificationDelegate.onNotificationActionClick(callingUid, callingPid, key, +                    actionIndex); +        } finally { +            Binder.restoreCallingIdentity(identity); +        } +    } + +    @Override      public void onNotificationError(String pkg, String tag, int id,              int uid, int initialPid, String message, int userId) {          enforceStatusBarService(); diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java index f9b170443d8d..164953589013 100644 --- a/services/core/java/com/android/server/trust/TrustManagerService.java +++ b/services/core/java/com/android/server/trust/TrustManagerService.java @@ -16,6 +16,7 @@  package com.android.server.trust; +import com.android.internal.annotations.GuardedBy;  import com.android.internal.content.PackageMonitor;  import com.android.internal.widget.LockPatternUtils;  import com.android.server.SystemService; @@ -24,6 +25,7 @@ import org.xmlpull.v1.XmlPullParser;  import org.xmlpull.v1.XmlPullParserException;  import android.Manifest; +import android.app.ActivityManager;  import android.app.ActivityManagerNative;  import android.app.admin.DevicePolicyManager;  import android.app.trust.ITrustListener; @@ -41,6 +43,7 @@ import android.content.res.Resources;  import android.content.res.TypedArray;  import android.content.res.XmlResourceParser;  import android.graphics.drawable.Drawable; +import android.os.Binder;  import android.os.DeadObjectException;  import android.os.Handler;  import android.os.IBinder; @@ -100,8 +103,10 @@ public class TrustManagerService extends SystemService {      /* package */ final TrustArchive mArchive = new TrustArchive();      private final Context mContext;      private final LockPatternUtils mLockPatternUtils; +    private final UserManager mUserManager; -    private UserManager mUserManager; +    @GuardedBy("mUserIsTrusted") +    private final SparseBooleanArray mUserIsTrusted = new SparseBooleanArray();      public TrustManagerService(Context context) {          super(context); @@ -160,7 +165,11 @@ public class TrustManagerService extends SystemService {      public void updateTrust(int userId, boolean initiatedByUser) {          dispatchOnTrustManagedChanged(aggregateIsTrustManaged(userId), userId); -        dispatchOnTrustChanged(aggregateIsTrusted(userId), userId, initiatedByUser); +        boolean trusted = aggregateIsTrusted(userId); +        synchronized (mUserIsTrusted) { +            mUserIsTrusted.put(userId, trusted); +        } +        dispatchOnTrustChanged(trusted, userId, initiatedByUser);      }      void refreshAgentList(int userId) { @@ -547,6 +556,16 @@ public class TrustManagerService extends SystemService {              mHandler.obtainMessage(MSG_UNREGISTER_LISTENER, trustListener).sendToTarget();          } +        @Override +        public boolean isTrusted(int userId) throws RemoteException { +            userId = ActivityManager.handleIncomingUser(getCallingPid(), getCallingUid(), userId, +                    false /* allowAll */, true /* requireFull */, "isTrusted", null); +            userId = resolveProfileParent(userId); +            synchronized (mUserIsTrusted) { +                return mUserIsTrusted.get(userId); +            } +        } +          private void enforceReportPermission() {              mContext.enforceCallingOrSelfPermission(                      Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE, "reporting trust events"); @@ -623,6 +642,19 @@ public class TrustManagerService extends SystemService {          }      }; +    private int resolveProfileParent(int userId) { +        long identity = Binder.clearCallingIdentity(); +        try { +            UserInfo parent = mUserManager.getProfileParent(userId); +            if (parent != null) { +                return parent.getUserHandle().getIdentifier(); +            } +            return userId; +        } finally { +            Binder.restoreCallingIdentity(identity); +        } +    } +      private final Handler mHandler = new Handler() {          @Override          public void handleMessage(Message msg) { diff --git a/services/core/java/com/android/server/tv/TvInputHal.java b/services/core/java/com/android/server/tv/TvInputHal.java index 558ffb5e3ddd..c12dd633c07f 100644 --- a/services/core/java/com/android/server/tv/TvInputHal.java +++ b/services/core/java/com/android/server/tv/TvInputHal.java @@ -55,7 +55,7 @@ final class TvInputHal implements Handler.Callback {      private native long nativeOpen(); -    private static native int nativeAddStream(long ptr, int deviceId, int streamId, +    private static native int nativeAddOrUpdateStream(long ptr, int deviceId, int streamId,              Surface surface);      private static native int nativeRemoveStream(long ptr, int deviceId, int streamId);      private static native TvStreamConfig[] nativeGetStreamConfigs(long ptr, int deviceId, @@ -80,7 +80,7 @@ final class TvInputHal implements Handler.Callback {          }      } -    public int addStream(int deviceId, Surface surface, TvStreamConfig streamConfig) { +    public int addOrUpdateStream(int deviceId, Surface surface, TvStreamConfig streamConfig) {          synchronized (mLock) {              if (mPtr == 0) {                  return ERROR_NO_INIT; @@ -89,7 +89,7 @@ final class TvInputHal implements Handler.Callback {              if (generation != streamConfig.getGeneration()) {                  return ERROR_STALE_CONFIG;              } -            if (nativeAddStream(mPtr, deviceId, streamConfig.getStreamId(), surface) == 0) { +            if (nativeAddOrUpdateStream(mPtr, deviceId, streamConfig.getStreamId(), surface) == 0) {                  return SUCCESS;              } else {                  return ERROR_UNKNOWN; diff --git a/services/core/java/com/android/server/tv/TvInputHardwareManager.java b/services/core/java/com/android/server/tv/TvInputHardwareManager.java index 44e4ad10c353..7d031ea8c272 100644 --- a/services/core/java/com/android/server/tv/TvInputHardwareManager.java +++ b/services/core/java/com/android/server/tv/TvInputHardwareManager.java @@ -668,14 +668,14 @@ class TvInputHardwareManager implements TvInputHal.Callback {                      result = mHal.removeStream(mInfo.getDeviceId(), mActiveConfig);                      mActiveConfig = null;                  } else { -                    if (config != mActiveConfig && mActiveConfig != null) { +                    if (!config.equals(mActiveConfig)) {                          result = mHal.removeStream(mInfo.getDeviceId(), mActiveConfig);                          if (result != TvInputHal.SUCCESS) {                              mActiveConfig = null;                              return false;                          }                      } -                    result = mHal.addStream(mInfo.getDeviceId(), surface, config); +                    result = mHal.addOrUpdateStream(mInfo.getDeviceId(), surface, config);                      if (result == TvInputHal.SUCCESS) {                          mActiveConfig = config;                      } @@ -801,7 +801,7 @@ class TvInputHardwareManager implements TvInputHal.Callback {                      return false;                  } -                int result = mHal.addStream(mInfo.getDeviceId(), surface, config); +                int result = mHal.addOrUpdateStream(mInfo.getDeviceId(), surface, config);                  return result == TvInputHal.SUCCESS;              }          } diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java index fde703d63dc3..f947b6ab8654 100644 --- a/services/core/java/com/android/server/wm/AccessibilityController.java +++ b/services/core/java/com/android/server/wm/AccessibilityController.java @@ -992,8 +992,7 @@ final class AccessibilityController {                      final int flags = windowState.mAttrs.flags; -                    // If the window is not touchable, do not report it but take into account -                    // the space it takes since the content behind it cannot be touched. +                    // If the window is not touchable - ignore.                      if ((flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) {                          continue;                      } @@ -1014,9 +1013,14 @@ final class AccessibilityController {                          }                      } -                    // Account for the space this window takes. -                    unaccountedSpace.op(boundsInScreen, unaccountedSpace, -                            Region.Op.REVERSE_DIFFERENCE); +                    // Account for the space this window takes if the window +                    // is not an accessibility overlay which does not change +                    // the reported windows. +                    if (windowState.mAttrs.type == WindowManager.LayoutParams +                            .TYPE_ACCESSIBILITY_OVERLAY) { +                        unaccountedSpace.op(boundsInScreen, unaccountedSpace, +                                Region.Op.REVERSE_DIFFERENCE); +                    }                      // We figured out what is touchable for the entire screen - done.                      if (unaccountedSpace.isEmpty()) { diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 57d793f0c6ae..3fee608d2292 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2337,6 +2337,11 @@ public class WindowManagerService extends IWindowManager.Stub                            + attrs.token + ".  Aborting.");                      return WindowManagerGlobal.ADD_BAD_APP_TOKEN;                  } +                if (type == TYPE_ACCESSIBILITY_OVERLAY) { +                    Slog.w(TAG, "Attempted to add Accessibility overlay window with unknown token " +                            + attrs.token + ".  Aborting."); +                    return WindowManagerGlobal.ADD_BAD_APP_TOKEN; +                }                  token = new WindowToken(this, attrs.token, -1, false);                  addToken = true;              } else if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) { @@ -2380,6 +2385,12 @@ public class WindowManagerService extends IWindowManager.Stub                              + attrs.token + ".  Aborting.");                        return WindowManagerGlobal.ADD_BAD_APP_TOKEN;                  } +            } else if (type == TYPE_ACCESSIBILITY_OVERLAY) { +                if (token.windowType != TYPE_ACCESSIBILITY_OVERLAY) { +                    Slog.w(TAG, "Attempted to add Accessibility overlay window with bad token " +                            + attrs.token + ".  Aborting."); +                    return WindowManagerGlobal.ADD_BAD_APP_TOKEN; +                }              } else if (token.appWindowToken != null) {                  Slog.w(TAG, "Non-null appWindowToken for system window of type=" + type);                  // It is not valid to use an app token with other system types; we will @@ -11627,5 +11638,23 @@ public class WindowManagerService extends IWindowManager.Stub                  checkDrawnWindowsLocked();              }          } + +        @Override +        public void addWindowToken(IBinder token, int type) { +            WindowManagerService.this.addWindowToken(token, type); +        } + +        @Override +        public void removeWindowToken(IBinder token, boolean removeWindows) { +            synchronized(mWindowMap) { +                if (removeWindows) { +                    WindowToken wtoken = mTokenMap.remove(token); +                    if (wtoken != null) { +                        wtoken.removeAllWindows(); +                    } +                } +                WindowManagerService.this.removeWindowToken(token); +            } +        }      }  } diff --git a/services/core/java/com/android/server/wm/WindowToken.java b/services/core/java/com/android/server/wm/WindowToken.java index 22671234c538..1a672e682814 100644 --- a/services/core/java/com/android/server/wm/WindowToken.java +++ b/services/core/java/com/android/server/wm/WindowToken.java @@ -17,6 +17,7 @@  package com.android.server.wm;  import android.os.IBinder; +import android.util.Slog;  import java.io.PrintWriter; @@ -29,7 +30,7 @@ import java.io.PrintWriter;  class WindowToken {      // The window manager!      final WindowManagerService service; -     +      // The actual token.      final IBinder token; @@ -77,6 +78,15 @@ class WindowToken {          explicit = _explicit;      } +    void removeAllWindows() { +        for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) { +            WindowState win = windows.get(winNdx); +            if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) Slog.w(WindowManagerService.TAG, +                    "removeAllWindows: removing win=" + win); +            win.mService.removeWindowLocked(win.mSession, win); +        } +    } +      void dump(PrintWriter pw, String prefix) {          pw.print(prefix); pw.print("windows="); pw.println(windows);          pw.print(prefix); pw.print("windowType="); pw.print(windowType); diff --git a/services/core/jni/com_android_server_tv_TvInputHal.cpp b/services/core/jni/com_android_server_tv_TvInputHal.cpp index d5abe0c25dae..5cb05431fe9e 100644 --- a/services/core/jni/com_android_server_tv_TvInputHal.cpp +++ b/services/core/jni/com_android_server_tv_TvInputHal.cpp @@ -235,7 +235,7 @@ public:      static JTvInputHal* createInstance(JNIEnv* env, jobject thiz); -    int addStream(int deviceId, int streamId, const sp<Surface>& surface); +    int addOrUpdateStream(int deviceId, int streamId, const sp<Surface>& surface);      int removeStream(int deviceId, int streamId);      const tv_stream_config_t* getStreamConfigs(int deviceId, int* numConfigs); @@ -312,7 +312,7 @@ JTvInputHal* JTvInputHal::createInstance(JNIEnv* env, jobject thiz) {      return new JTvInputHal(env, thiz, device);  } -int JTvInputHal::addStream(int deviceId, int streamId, const sp<Surface>& surface) { +int JTvInputHal::addOrUpdateStream(int deviceId, int streamId, const sp<Surface>& surface) {      KeyedVector<int, Connection>& connections = mConnections.editValueFor(deviceId);      if (connections.indexOfKey(streamId) < 0) {          connections.add(streamId, Connection()); @@ -555,14 +555,14 @@ static jlong nativeOpen(JNIEnv* env, jobject thiz) {      return (jlong)JTvInputHal::createInstance(env, thiz);  } -static int nativeAddStream(JNIEnv* env, jclass clazz, +static int nativeAddOrUpdateStream(JNIEnv* env, jclass clazz,          jlong ptr, jint deviceId, jint streamId, jobject jsurface) {      JTvInputHal* tvInputHal = (JTvInputHal*)ptr;      if (!jsurface) {          return BAD_VALUE;      }      sp<Surface> surface(android_view_Surface_getSurface(env, jsurface)); -    return tvInputHal->addStream(deviceId, streamId, surface); +    return tvInputHal->addOrUpdateStream(deviceId, streamId, surface);  }  static int nativeRemoveStream(JNIEnv* env, jclass clazz, @@ -612,8 +612,8 @@ static JNINativeMethod gTvInputHalMethods[] = {      /* name, signature, funcPtr */      { "nativeOpen", "()J",              (void*) nativeOpen }, -    { "nativeAddStream", "(JIILandroid/view/Surface;)I", -            (void*) nativeAddStream }, +    { "nativeAddOrUpdateStream", "(JIILandroid/view/Surface;)I", +            (void*) nativeAddOrUpdateStream },      { "nativeRemoveStream", "(JII)I",              (void*) nativeRemoveStream },      { "nativeGetStreamConfigs", "(JII)[Landroid/media/tv/TvStreamConfig;", diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index ed221d295e05..2652b4532899 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -31,7 +31,6 @@ import java.util.List;  /**   * Provides access to Telecom-related functionality. - * TODO: Move this all into PhoneManager.   */  public class TelecomManager { @@ -587,7 +586,6 @@ public class TelecomManager {       *       * @param account The complete {@link PhoneAccount}.       */ -    @SystemApi      public void registerPhoneAccount(PhoneAccount account) {          try {              if (isServiceConnected()) { @@ -603,7 +601,6 @@ public class TelecomManager {       *       * @param accountHandle A {@link PhoneAccountHandle} for the {@link PhoneAccount} to unregister.       */ -    @SystemApi      public void unregisterPhoneAccount(PhoneAccountHandle accountHandle) {          try {              if (isServiceConnected()) { @@ -617,7 +614,6 @@ public class TelecomManager {      /**       * Remove all Accounts that belong to the calling package from the system.       */ -    @SystemApi      public void clearAccounts() {          try {              if (isServiceConnected()) { @@ -671,7 +667,6 @@ public class TelecomManager {       * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}       * </p>       */ -    @SystemApi      public boolean isInCall() {          try {              if (isServiceConnected()) { @@ -823,7 +818,6 @@ public class TelecomManager {       * @param extras A bundle that will be passed through to       *            {@link ConnectionService#onCreateIncomingConnection}.       */ -    @SystemApi      public void addNewIncomingCall(PhoneAccountHandle phoneAccount, Bundle extras) {          try {              if (isServiceConnected()) { diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl index 98b2d8a9d0bb..2cf720892ad2 100644 --- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl +++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl @@ -225,4 +225,10 @@ interface IImsCallSession {       * intermediates between the propriety implementation and Telecomm/InCall.       */      IImsVideoCallProvider getVideoCallProvider(); + +    /** +     * Determines if the current session is multiparty. +     * @return {@code True} if the session is multiparty. +     */ +    boolean isMultiparty();  } diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 1e9e3e20ddf8..f5f70c5cf2ed 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -307,6 +307,7 @@ enum {      PUBLIC_KEY_ATTR = 0x010103a6,      CATEGORY_ATTR = 0x010103e8,      BANNER_ATTR = 0x10103f2, +    ISGAME_ATTR = 0x10103f4,  };  String8 getComponentName(String8 &pkgName, String8 &componentName) { @@ -1127,13 +1128,35 @@ int doDump(Bundle* bundle)                                      error.string());                              goto bail;                          } + +                        String8 banner = AaptXml::getResolvedAttribute(res, tree, BANNER_ATTR, &error); +                        if (error != "") { +                            fprintf(stderr, "ERROR getting 'android:banner' attribute: %s\n", +                                    error.string()); +                            goto bail; +                        }                          printf("application: label='%s' ",                                  ResTable::normalizeForOutput(label.string()).string()); -                        printf("icon='%s'\n", ResTable::normalizeForOutput(icon.string()).string()); +                        printf("icon='%s'", ResTable::normalizeForOutput(icon.string()).string()); +                        if (banner != "") { +                            printf(" banner='%s'", ResTable::normalizeForOutput(banner.string()).string()); +                        } +                        printf("\n");                          if (testOnly != 0) {                              printf("testOnly='%d'\n", testOnly);                          } +                        int32_t isGame = AaptXml::getResolvedIntegerAttribute(res, tree, +                                ISGAME_ATTR, 0, &error); +                        if (error != "") { +                            fprintf(stderr, "ERROR getting 'android:isGame' attribute: %s\n", +                                    error.string()); +                            goto bail; +                        } +                        if (isGame != 0) { +                            printf("application-isGame\n"); +                        } +                          int32_t debuggable = AaptXml::getResolvedIntegerAttribute(res, tree,                                  DEBUGGABLE_ATTR, 0, &error);                          if (error != "") { |