Skip to content

Commit

Permalink
AWS SDK for Android 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Jun 11, 2015
1 parent 38b6824 commit b03c51e
Show file tree
Hide file tree
Showing 60 changed files with 331 additions and 215 deletions.
4 changes: 2 additions & 2 deletions aws-android-sdk-autoscaling/pom.xml
Expand Up @@ -12,15 +12,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.2.1</version>
<version>2.2.2</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.2.1</version>
<version>2.2.2</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-cloudwatch/pom.xml
Expand Up @@ -12,15 +12,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.2.1</version>
<version>2.2.2</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.2.1</version>
<version>2.2.2</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion aws-android-sdk-core/pom.xml
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.2.1</version>
<version>2.2.2</version>
</parent>

<dependencies>
Expand Down
Expand Up @@ -241,7 +241,6 @@ private URI toURI(String endpoint) throws IllegalArgumentException {
* the overriding region for signing purposes.
* @throws IllegalArgumentException If any problems are detected with the
* specified endpoint.
* @deprecated
*/
@Deprecated
public void setEndpoint(String endpoint, String serviceName, String regionId) {
Expand Down Expand Up @@ -474,6 +473,7 @@ public void addRequestHandler(RequestHandler2 requestHandler2) {
* @param requestHandler The handler to remove from the current list of
* request handlers.
*/
@Deprecated
public void removeRequestHandler(RequestHandler requestHandler) {
requestHandler2s.remove(RequestHandler2.adapt(requestHandler));
}
Expand Down Expand Up @@ -508,14 +508,18 @@ protected final ExecutionContext createExecutionContext() {
}

/* Check the profiling system property and return true if set */
@Deprecated
protected static boolean isProfilingEnabled() {
return System.getProperty(PROFILING_SYSTEM_PROPERTY) != null;
}

/**
* Returns true if request metric collection is applicable to the given
* request; false otherwise.
*
* @deprecated metrics is deprecated
*/
@Deprecated
protected final boolean isRequestMetricsEnabled(AmazonWebServiceRequest req) {
RequestMetricCollector c = req.getRequestMetricCollector(); // request
// level
Expand All @@ -529,7 +533,10 @@ protected final boolean isRequestMetricsEnabled(AmazonWebServiceRequest req) {
/**
* Returns true if request metric collection is enabled at the service
* client or AWS SDK level request; false otherwise.
*
* @deprecated metrics is deprecated
*/
@Deprecated
private boolean isRMCEnabledAtClientOrSdkLevel() {
RequestMetricCollector c = requestMetricCollector();
return c != null && c.isEnabled();
Expand Down Expand Up @@ -578,15 +585,21 @@ public int getTimeOffset() {
/**
* Returns the client specific {@link RequestMetricCollector}; or null if
* there is none.
*
* @deprecated metrics is deprecated
*/
@Deprecated
public RequestMetricCollector getRequestMetricsCollector() {
return client.getRequestMetricCollector();
}

/**
* Returns the client specific request metric collector if there is one; or
* the one at the AWS SDK level otherwise.
*
* @deprecated metrics is deprecated
*/
@Deprecated
protected RequestMetricCollector requestMetricCollector() {
RequestMetricCollector mc = client.getRequestMetricCollector();
return mc == null ? AwsSdkMetrics.getRequestMetricCollector() : mc;
Expand All @@ -595,7 +608,10 @@ protected RequestMetricCollector requestMetricCollector() {
/**
* Returns the most specific request metric collector, starting from the
* request level, then client level, then finally the AWS SDK level.
*
* @deprecated metrics is deprecated
*/
@Deprecated
protected final RequestMetricCollector findRequestMetricCollector(Request<?> req) {
AmazonWebServiceRequest origReq = req.getOriginalRequest();
RequestMetricCollector mc = origReq.getRequestMetricCollector();
Expand All @@ -609,7 +625,10 @@ protected final RequestMetricCollector findRequestMetricCollector(Request<?> req
/**
* Convenient method to end the client execution without logging the
* awsRequestMetrics.
*
* @deprecated metrics is deprecated
*/
@Deprecated
protected final void endClientExecution(
AWSRequestMetrics awsRequestMetrics, Request<?> request,
Response<?> response) {
Expand All @@ -625,7 +644,9 @@ protected final void endClientExecution(
*
* @param loggingAwsRequestMetrics true to log the awsRequestMetrics; false
* otherwise.
* @deprecated metrics is deprecated
*/
@Deprecated
protected final void endClientExecution(
AWSRequestMetrics awsRequestMetrics, Request<?> request,
Response<?> response, boolean loggingAwsRequestMetrics) {
Expand Down
Expand Up @@ -37,6 +37,7 @@ public abstract class AmazonWebServiceRequest {
* null if there is none. This collector always takes precedence over the
* ones specified at the http client level and AWS SDK level.
*/
@Deprecated
private RequestMetricCollector requestMetricCollector;

/** The optional STS security token associated with this request */
Expand Down Expand Up @@ -105,8 +106,9 @@ public AWSCredentials getRequestCredentials() {
* Not intended for direct use by callers.
*
* @return private, internal request parameter information.
* @deprecated only passes back the deprecated delegationToken
*/

@Deprecated
public Map<String, String> copyPrivateRequestParameters() {
HashMap<String, String> map = new HashMap<String, String>();
if (delegationToken != null)
Expand All @@ -125,23 +127,32 @@ public RequestClientOptions getRequestClientOptions() {

/**
* Returns a request level metric collector; or null if not specified.
*
* @deprecated metrics is deprecated
*/
@Deprecated
public RequestMetricCollector getRequestMetricCollector() {
return requestMetricCollector;
}

/**
* Sets a request level request metric collector which takes precedence over
* the ones at the http client level and AWS SDK level.
*
* @deprecated metrics is deprecated
*/
@Deprecated
public void setRequestMetricCollector(RequestMetricCollector requestMetricCollector) {
this.requestMetricCollector = requestMetricCollector;
}

/**
* Specifies a request level metric collector which takes precedence over
* the ones at the http client level and AWS SDK level.
*
* @deprecated metrics is deprecated
*/
@Deprecated
public <T extends AmazonWebServiceRequest> T withRequestMetricCollector(
RequestMetricCollector metricCollector) {
setRequestMetricCollector(metricCollector);
Expand Down
Expand Up @@ -106,9 +106,11 @@ public class ClientConfiguration {
private String proxyPassword = null;

/** Optional Windows domain name for configuring NTLM proxy support. */
@Deprecated
private String proxyDomain = null;

/** Optional Windows workstation name for configuring NTLM proxy support. */
@Deprecated
private String proxyWorkstation = null;

/**
Expand Down Expand Up @@ -471,6 +473,7 @@ public ClientConfiguration withProxyPassword(String proxyPassword) {
*
* @return The optional Windows domain name for configuring an NTLM proxy.
*/
@Deprecated
public String getProxyDomain() {
return proxyDomain;
}
Expand All @@ -482,6 +485,7 @@ public String getProxyDomain() {
* @param proxyDomain The optional Windows domain name for configuring an
* NTLM proxy.
*/
@Deprecated
public void setProxyDomain(String proxyDomain) {
this.proxyDomain = proxyDomain;
}
Expand All @@ -496,6 +500,7 @@ public void setProxyDomain(String proxyDomain) {
* NTLM proxy.
* @return The updated ClientConfiguration object.
*/
@Deprecated
public ClientConfiguration withProxyDomain(String proxyDomain) {
setProxyDomain(proxyDomain);
return this;
Expand All @@ -521,6 +526,7 @@ public String getProxyWorkstation() {
* @param proxyWorkstation The optional Windows workstation name for
* configuring NTLM proxy support.
*/
@Deprecated
public void setProxyWorkstation(String proxyWorkstation) {
this.proxyWorkstation = proxyWorkstation;
}
Expand All @@ -535,6 +541,7 @@ public void setProxyWorkstation(String proxyWorkstation) {
* configuring NTLM proxy support.
* @return The updated ClientConfiguration object.
*/
@Deprecated
public ClientConfiguration withProxyWorkstation(String proxyWorkstation) {
setProxyWorkstation(proxyWorkstation);
return this;
Expand Down
Expand Up @@ -305,11 +305,13 @@ public String toString() {
}

@Override
@Deprecated
public AWSRequestMetrics getAWSRequestMetrics() {
return metrics;
}

@Override
@Deprecated
public void setAWSRequestMetrics(AWSRequestMetrics metrics) {
if (this.metrics == null) {
this.metrics = metrics;
Expand Down
Expand Up @@ -60,7 +60,10 @@ public class SDKGlobalConfiguration {
/**
* Path to an override file for the region metadata loaded by the SDK that
* maps service/region pairs to endpoints and vice versa.
*
* @deprecated The SDK no longer supports a regions.xml override
*/
@Deprecated
public static final String REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY =
"com.amazonaws.regions.RegionUtils.fileOverride";

Expand Down
Expand Up @@ -194,7 +194,7 @@ protected String getCanonicalizedHeadersForStringToSign(Request<?> request) {
return builder.toString();
}

protected boolean shouldUseHttpsScheme(Request<?> request) throws AmazonClientException {
boolean shouldUseHttpsScheme(Request<?> request) throws AmazonClientException {
try {
String protocol = request.getEndpoint().toURL().getProtocol().toLowerCase();
if (protocol.equals("http")) {
Expand Down
Expand Up @@ -242,18 +242,6 @@ protected String getSignedHeadersString(Request<?> request) {
return buffer.toString();
}

/**
* Determine if a header needs to be signed. The headers must be signed
* according to sigv4 spec are host, date, and all x-amz headers.
*
* @param header header key
* @return true if it should be sign, false otherwise
*/
private boolean needsSign(String header) {
return header.equalsIgnoreCase("date") || header.equalsIgnoreCase("host")
|| header.startsWith("x-amz") || header.startsWith("X-Amz");
}

protected String getCanonicalRequest(Request<?> request, String contentSha256) {
/* This would url-encode the resource path for the first time */
String path = HttpUtils.appendUri(request.getEndpoint().getPath(),
Expand Down Expand Up @@ -484,4 +472,17 @@ public void presignRequest(Request<?> request, AWSCredentials credentials,
protected String calculateContentHashPresign(Request<?> request) {
return calculateContentHash(request);
}

/**
* Determine if a header needs to be signed. The headers must be signed
* according to sigv4 spec are host, date, Content-MD5and all x-amz headers.
*
* @param header header key
* @return true if it should be sign, false otherwise
*/
boolean needsSign(String header) {
return header.equalsIgnoreCase("date") || header.equalsIgnoreCase("Content-MD5")
|| header.equalsIgnoreCase("host")
|| header.startsWith("x-amz") || header.startsWith("X-Amz");
}
}
Expand Up @@ -146,7 +146,7 @@ public AWSAbstractCognitoIdentityProvider(String accountId, String identityPoolI

/**
* Gets a string with the name of the provider being used. For example,
* Cognito would return "Cognito";
* Cognito would return "Cognito"
*
* @return the name of the provider in a string
*/
Expand Down Expand Up @@ -232,8 +232,7 @@ public boolean isAuthenticated() {
}

@Override
public void unregisterIdentityChangedListener(
IdentityChangedListener listener) {
public void unregisterIdentityChangedListener(IdentityChangedListener listener) {
listeners.remove(listener);
}

Expand All @@ -255,7 +254,7 @@ public void identityChanged(String newIdentityId) {
}
String oldIdentityId = identityId;
identityId = newIdentityId;
for (IdentityChangedListener listener : listeners) {
for (IdentityChangedListener listener: listeners) {
listener.identityChanged(oldIdentityId, identityId);
}
}
Expand Down
Expand Up @@ -64,19 +64,20 @@ public interface AWSCognitoIdentityProvider extends AWSIdentityProvider {
/**
* Handles the new version of an identity changed listener to be handled by
* the provider
*
*
* @param listener the new listener to be registered
*/
public void registerIdentityChangedListener(IdentityChangedListener listener);

/**
* Handles the removing of a version of an identity changed listener from
* the list with the provider
*
*
* @param listener the listener to be removed
*/
public void unregisterIdentityChangedListener(IdentityChangedListener listener);


/**
* Handles the updating of the identityId locally once it has been changed
* for one reason or another
Expand Down
Expand Up @@ -31,7 +31,14 @@
* The AWS access key ID is expected to be in the <code>accessKey</code>
* property and the AWS secret key is expected to be in the
* <code>secretKey</code> property.
*
* @deprecated This is unsafe in mobile applications and should not be used. Use
* temporary credentials provided by services such as Cognito
* Identity
* (http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide
* /cognito-auth.html)
*/
@Deprecated
public class ClasspathPropertiesFileCredentialsProvider implements AWSCredentialsProvider {

/** The name of the properties file to check for credentials */
Expand Down

0 comments on commit b03c51e

Please sign in to comment.