Skip to content

Commit a74118c

Browse files
author
AWS
committed
AWS SDK for Android 2.3.7
1 parent 699f946 commit a74118c

File tree

208 files changed

+21403
-407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+21403
-407
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
# Change Log - AWS SDK for Android
2+
## [Release 2.3.7] (https://github.com/aws/aws-sdk-android/releases/tag/release_v2.3.7) (12/13/2016)
3+
4+
### New Features
5+
- **Support for Amazon Rekognition**: Rekognition is a deep-learning based service to search, verify and organize images. With Rekognition, you can detect objects, scenes, and faces in images. You can also search and compare faces.
6+
- **AWS Core Runtime**: Added Support for `eu-west-2`/LHR region in the SDK.
7+
8+
### Improvements
9+
- **AWS Core Runtime**: Added support for enabling curl logging in the SDK. See [issue](https://github.com/aws/aws-sdk-android/pull/200)
10+
- **AWS Lambda**: Update to Latest Models.
11+
12+
### Bug Fixes:
13+
- **Amazon Pinpoint**: Fixed a bug that caused setting wrong endpoint for pinpoint client.
14+
- **Amazon S3**: Fixed a bug that could cause NPE in Transfer Service. See [issue](https://github.com/aws/aws-sdk-android/issues/223).
15+
- **Amazon Cognito Identity Provider**: Fix incorrect exception being thrown in `CognitoDevice`. See [issue](https://github.com/aws/aws-sdk-android/pull/224).
16+
- **Amazon Cognito Identity Provider**: Fix a bug where `NewPasswordContinuation` throws `CognitoParameterInvalidException: Missing required attribute` even when the required user attributes have been set. See [issue](https://github.com/aws/aws-sdk-android/pull/216).
17+
18+
219
## [Release 2.3.6] (https://github.com/aws/aws-sdk-android/releases/tag/release_v2.3.6) (12/07/2016)
320

421
### Improvements

aws-android-sdk-apigateway-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<parent>
1313
<groupId>com.amazonaws</groupId>
1414
<artifactId>aws-android-sdk-pom</artifactId>
15-
<version>2.3.6</version>
15+
<version>2.3.7</version>
1616
</parent>
1717

1818
<dependencies>
1919
<dependency>
2020
<groupId>com.amazonaws</groupId>
2121
<artifactId>aws-android-sdk-core</artifactId>
2222
<optional>false</optional>
23-
<version>2.3.6</version>
23+
<version>2.3.7</version>
2424
</dependency>
2525
</dependencies>
2626

aws-android-sdk-autoscaling/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<parent>
1313
<groupId>com.amazonaws</groupId>
1414
<artifactId>aws-android-sdk-pom</artifactId>
15-
<version>2.3.6</version>
15+
<version>2.3.7</version>
1616
</parent>
1717

1818
<dependencies>
1919
<dependency>
2020
<groupId>com.amazonaws</groupId>
2121
<artifactId>aws-android-sdk-core</artifactId>
2222
<optional>false</optional>
23-
<version>2.3.6</version>
23+
<version>2.3.7</version>
2424
</dependency>
2525
</dependencies>
2626

aws-android-sdk-cloudwatch/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<parent>
1313
<groupId>com.amazonaws</groupId>
1414
<artifactId>aws-android-sdk-pom</artifactId>
15-
<version>2.3.6</version>
15+
<version>2.3.7</version>
1616
</parent>
1717

1818
<dependencies>
1919
<dependency>
2020
<groupId>com.amazonaws</groupId>
2121
<artifactId>aws-android-sdk-core</artifactId>
2222
<optional>false</optional>
23-
<version>2.3.6</version>
23+
<version>2.3.7</version>
2424
</dependency>
2525
</dependencies>
2626

aws-android-sdk-cognito/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<artifactId>aws-android-sdk-cognito</artifactId>
77
<packaging>jar</packaging>
88
<name>AWS SDK for Android - Amazon Cognito Sync</name>
9-
<version>2.3.6</version>
9+
<version>2.3.7</version>
1010
<description>The AWS Android SDK for Amazon Cognito Sync module holds the client classes that are used for communicating with Amazon Cognito Sync Service</description>
1111
<url>http://aws.amazon.com/sdkforandroid</url>
1212

1313
<parent>
1414
<groupId>com.amazonaws</groupId>
1515
<artifactId>aws-android-sdk-pom</artifactId>
16-
<version>2.3.6</version>
16+
<version>2.3.7</version>
1717
</parent>
1818

1919
<licenses>
@@ -29,7 +29,7 @@
2929
<groupId>com.amazonaws</groupId>
3030
<artifactId>aws-android-sdk-core</artifactId>
3131
<optional>false</optional>
32-
<version>2.3.6</version>
32+
<version>2.3.7</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>com.google.android</groupId>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fabric-identifier=com.amazonaws.aws-android-sdk-cognito
2-
fabric-version=2.3.6
2+
fabric-version=2.3.7
33
fabric-build-type=binary

aws-android-sdk-cognitoidentityprovider/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<artifactId>aws-android-sdk-cognitoidentityprovider</artifactId>
77
<packaging>jar</packaging>
88
<name>AWS SDK for Android - Amazon Cognito Identity Provider</name>
9-
<version>2.3.6</version>
9+
<version>2.3.7</version>
1010
<description>The AWS Android SDK for Amazon Cognito Identity Provider module holds the client classes that are used for communicating with Amazon Cognito Identity Provider Service</description>
1111
<url>http://aws.amazon.com/sdkforandroid</url>
1212

1313
<parent>
1414
<groupId>com.amazonaws</groupId>
1515
<artifactId>aws-android-sdk-pom</artifactId>
16-
<version>2.3.6</version>
16+
<version>2.3.7</version>
1717
</parent>
1818

1919
<licenses>
@@ -29,7 +29,7 @@
2929
<groupId>com.amazonaws</groupId>
3030
<artifactId>aws-android-sdk-core</artifactId>
3131
<optional>false</optional>
32-
<version>2.3.6</version>
32+
<version>2.3.7</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>com.google.android</groupId>

aws-android-sdk-cognitoidentityprovider/src/main/java/com/amazonaws/mobileconnectors/cognitoidentityprovider/CognitoDevice.java

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@
1919

2020
import android.content.Context;
2121
import android.os.Handler;
22-
import android.util.Log;
2322

2423
import com.amazonaws.mobileconnectors.cognitoidentityprovider.exceptions.CognitoInternalErrorException;
2524
import com.amazonaws.mobileconnectors.cognitoidentityprovider.exceptions.CognitoNotAuthorizedException;
2625
import com.amazonaws.mobileconnectors.cognitoidentityprovider.exceptions.CognitoParameterInvalidException;
27-
import com.amazonaws.mobileconnectors.cognitoidentityprovider.handlers.DevicesHandler;
2826
import com.amazonaws.mobileconnectors.cognitoidentityprovider.handlers.GenericHandler;
29-
import com.amazonaws.mobileconnectors.cognitoidentityprovider.util.CognitoDeviceHelper;
3027
import com.amazonaws.services.cognitoidentityprovider.model.DeviceType;
3128
import com.amazonaws.services.cognitoidentityprovider.model.ForgetDeviceRequest;
3229
import com.amazonaws.services.cognitoidentityprovider.model.GetDeviceRequest;
@@ -60,7 +57,7 @@ public class CognitoDevice {
6057
/**
6158
* The date on which the user first authenticated on this device.
6259
*/
63-
private Date createDate;
60+
private final Date createDate;
6461

6562
/**
6663
* The date on which device attribute/s last modified.
@@ -148,7 +145,7 @@ public CognitoUserAttributes getDeviceAttributes() {
148145
public String getDeviceAttribute(String attributeName) {
149146
try {
150147
return deviceAttributes.getAttributes().get(attributeName);
151-
} catch (Exception e) {
148+
} catch (final Exception e) {
152149
return null;
153150
}
154151
}
@@ -203,10 +200,10 @@ public void getDeviceInBackground(final GenericHandler callback) {
203200
new Thread(new Runnable() {
204201
@Override
205202
public void run() {
206-
Handler handler = new Handler(context.getMainLooper());
203+
final Handler handler = new Handler(context.getMainLooper());
207204
Runnable returnCallback;
208205
try {
209-
GetDeviceResult getDeviceResult = getDeviceInternal(user.getCachedSession());
206+
final GetDeviceResult getDeviceResult = getDeviceInternal(user.getCachedSession());
210207
updateThis(getDeviceResult.getDevice());
211208
returnCallback = new Runnable() {
212209
@Override
@@ -244,10 +241,10 @@ public void getDevice(GenericHandler callback) {
244241
}
245242

246243
try {
247-
GetDeviceResult getDeviceResult = getDeviceInternal(user.getCachedSession());
244+
final GetDeviceResult getDeviceResult = getDeviceInternal(user.getCachedSession());
248245
updateThis(getDeviceResult.getDevice());
249246
callback.onSuccess();
250-
} catch (Exception e) {
247+
} catch (final Exception e) {
251248
callback.onFailure(e);
252249
}
253250
}
@@ -264,7 +261,7 @@ public void forgetDeviceInBackground(final GenericHandler callback) {
264261
new Thread(new Runnable() {
265262
@Override
266263
public void run() {
267-
Handler handler = new Handler(context.getMainLooper());
264+
final Handler handler = new Handler(context.getMainLooper());
268265
Runnable returnCallback;
269266
try {
270267
forgetDeviceInternal(user.getCachedSession());
@@ -303,7 +300,7 @@ public void forgetDevice(GenericHandler callback) {
303300
try {
304301
forgetDeviceInternal(user.getCachedSession());
305302
callback.onSuccess();
306-
} catch (Exception e) {
303+
} catch (final Exception e) {
307304
callback.onFailure(e);
308305
}
309306
}
@@ -320,7 +317,7 @@ public void rememberThisDeviceInBackground(final GenericHandler callback) {
320317
new Thread(new Runnable() {
321318
@Override
322319
public void run() {
323-
Handler handler = new Handler(context.getMainLooper());
320+
final Handler handler = new Handler(context.getMainLooper());
324321
Runnable returnCallback;
325322
try {
326323
updateDeviceStatusInternal(user.getCachedSession(), DEVICE_TYPE_REMEMBERED);
@@ -359,7 +356,7 @@ public void rememberThisDevice(GenericHandler callback) {
359356

360357
try {
361358
updateDeviceStatusInternal(user.getCachedSession(), DEVICE_TYPE_REMEMBERED);
362-
} catch (Exception e) {
359+
} catch (final Exception e) {
363360
callback.onFailure(e);
364361
}
365362
}
@@ -377,7 +374,7 @@ public void doNotRememberThisDeviceInBackground(final GenericHandler callback) {
377374
new Thread(new Runnable() {
378375
@Override
379376
public void run() {
380-
Handler handler = new Handler(context.getMainLooper());
377+
final Handler handler = new Handler(context.getMainLooper());
381378
Runnable returnCallback;
382379
try {
383380
updateDeviceStatusInternal(user.getCachedSession(), DEVICE_TYPE_NOT_REMEMBERED);
@@ -415,7 +412,7 @@ public void doNotRememberThisDevice(GenericHandler callback) {
415412
}
416413
try {
417414
updateDeviceStatusInternal(user.getCachedSession(), DEVICE_TYPE_NOT_REMEMBERED);
418-
} catch (Exception e) {
415+
} catch (final Exception e) {
419416
callback.onFailure(e);
420417
}
421418
}
@@ -428,11 +425,11 @@ public void doNotRememberThisDevice(GenericHandler callback) {
428425
private void forgetDeviceInternal(CognitoUserSession session) {
429426
if (session != null && session.isValid()) {
430427
if (this.deviceKey != null) {
431-
CognitoDevice currentDeviceKey = user.thisDevice();
428+
final CognitoDevice currentDeviceKey = user.thisDevice();
432429
if (this.deviceKey.equals(currentDeviceKey.getDeviceKey())) {
433430
// CognitoDeviceHelper.clearCachedDevice(user.context);
434431
}
435-
ForgetDeviceRequest forgetDeviceRequest = new ForgetDeviceRequest();
432+
final ForgetDeviceRequest forgetDeviceRequest = new ForgetDeviceRequest();
436433
forgetDeviceRequest.setAccessToken(session.getAccessToken().getJWTToken());
437434
forgetDeviceRequest.setDeviceKey(this.deviceKey);
438435
user.getCognitoIdentityProviderClient().forgetDevice(forgetDeviceRequest);
@@ -453,7 +450,7 @@ private void forgetDeviceInternal(CognitoUserSession session) {
453450
private GetDeviceResult getDeviceInternal(CognitoUserSession session) {
454451
if (session != null && session.isValid()) {
455452
if (this.deviceKey != null) {
456-
GetDeviceRequest getDeviceRequest = new GetDeviceRequest();
453+
final GetDeviceRequest getDeviceRequest = new GetDeviceRequest();
457454
getDeviceRequest.setAccessToken(session.getAccessToken().getJWTToken());
458455
getDeviceRequest.setDeviceKey(this.deviceKey);
459456
return user.getCognitoIdentityProviderClient().getDevice(getDeviceRequest);
@@ -475,7 +472,7 @@ private GetDeviceResult getDeviceInternal(CognitoUserSession session) {
475472
private UpdateDeviceStatusResult updateDeviceStatusInternal(CognitoUserSession session, String deviceTrustState) {
476473
if (session != null && session.isValid()) {
477474
if (this.deviceKey != null) {
478-
UpdateDeviceStatusRequest updateDeviceStatusRequest = new UpdateDeviceStatusRequest();
475+
final UpdateDeviceStatusRequest updateDeviceStatusRequest = new UpdateDeviceStatusRequest();
479476
updateDeviceStatusRequest.setAccessToken(session.getAccessToken().getJWTToken());
480477
updateDeviceStatusRequest.setDeviceKey(this.deviceKey);
481478
updateDeviceStatusRequest.setDeviceRememberedStatus(deviceTrustState);

aws-android-sdk-cognitoidentityprovider/src/main/java/com/amazonaws/mobileconnectors/cognitoidentityprovider/continuations/NewPasswordContinuation.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package com.amazonaws.mobileconnectors.cognitoidentityprovider.continuations;
1919

2020
import android.content.Context;
21-
import android.util.Log;
2221

2322
import com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUser;
2423
import com.amazonaws.mobileconnectors.cognitoidentityprovider.exceptions.CognitoParameterInvalidException;
@@ -121,12 +120,14 @@ public void setPassword(String userPassword) {
121120
/**
122121
* Calls {@Code continueTask()} of the parent after checking if all the required attributes have been set.
123122
*/
123+
@Override
124124
public void continueTask() {
125125
if (requiredAttributes != null && requiredAttributes.size() > 1) {
126-
for (String requiredAttribute: requiredAttributes) {
127-
String requiredAttrKey = CognitoServiceConstants.CHLG_PARAM_USER_ATTRIBUTE_PREFIX + requiredAttribute;
126+
for (final String requiredAttribute: requiredAttributes) {
127+
final String requiredAttrKey = CognitoServiceConstants.CHLG_PARAM_USER_ATTRIBUTE_PREFIX + requiredAttribute;
128128
if (!challengeResponses.containsKey(requiredAttrKey)) {
129-
throw new CognitoParameterInvalidException(String.format("Missing required attribute: %s", requiredAttribute));
129+
throw new CognitoParameterInvalidException(
130+
String.format("Missing required attribute: %s", requiredAttribute));
130131
}
131132
}
132133
}
@@ -148,14 +149,14 @@ private void parseUserAttributes(String userAttributesJsonString) {
148149
currentUserAttributes = new HashMap<String, String>();
149150
if (userAttributesJsonString != null) {
150151
try {
151-
JSONObject userAttributesJson = new JSONObject(userAttributesJsonString);
152-
Iterator<?> userAttribute = userAttributesJson.keys();
152+
final JSONObject userAttributesJson = new JSONObject(userAttributesJsonString);
153+
final Iterator<?> userAttribute = userAttributesJson.keys();
153154
while (userAttribute.hasNext()) {
154-
String attributeName = (String) userAttribute.next();
155-
String attributeValue = userAttributesJson.getString(attributeName);
155+
final String attributeName = (String) userAttribute.next();
156+
final String attributeValue = userAttributesJson.getString(attributeName);
156157
currentUserAttributes.put(attributeName, attributeValue);
157158
}
158-
} catch (Exception e) {
159+
} catch (final Exception e) {
159160
callback.onFailure(e);
160161
}
161162
}
@@ -170,11 +171,11 @@ private void parseRequiredAttributes(String requiredAttributesJsonString) {
170171
requiredAttributes = new ArrayList<String>();
171172
if (requiredAttributesJsonString != null) {
172173
try {
173-
JSONArray requiredAttributesJson = new JSONArray(requiredAttributesJsonString);
174+
final JSONArray requiredAttributesJson = new JSONArray(requiredAttributesJsonString);
174175
for (int i = 0; i < requiredAttributesJson.length(); i++) {
175176
requiredAttributes.add(requiredAttributesJson.getString(i).split(CognitoServiceConstants.CHLG_PARAM_USER_ATTRIBUTE_PREFIX, 2)[1]);
176177
}
177-
} catch (Exception e) {
178+
} catch (final Exception e) {
178179
callback.onFailure(e);
179180
}
180181
}

aws-android-sdk-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.amazonaws</groupId>
1414
<artifactId>aws-android-sdk-pom</artifactId>
15-
<version>2.3.6</version>
15+
<version>2.3.7</version>
1616
</parent>
1717

1818
<dependencies>

0 commit comments

Comments
 (0)