Skip to content

Commit

Permalink
AWS SDK for Android 2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Sep 15, 2017
1 parent 3876d78 commit 04a8494
Show file tree
Hide file tree
Showing 56 changed files with 409 additions and 207 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log - AWS SDK for Android

## [Release 2.6.1](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.6.1)

### Bug Fixes:

- **AWS Auth SDK**
- Fixed border and shadow for Facebook and Google SignIn buttons.
- Fixed the Android Support Package dependencies of the different auth clients. The Android Support Packages support-v4 and appcompat-v7 of all the auth clients now have the same version 23.0.1 and are optional dependencies. Apps consuming the auth clients will now declare the appcompat-v7 and support-v4 dependencies in the gradle manually.

- **Amazon Pinpoint**
- Notification icon handling has been improved. By default, when the Notification icon uses the app icon, the icon will now be shown in color on Apps targeting SDK version 21 or greater. This will be achieved by setting the large icon to the app icon and generating the small icon by converting the app icon image to gray scale. For Apps targeting SDK version below 21, the behavior remains the same and the color icon is shown.

## [Release 2.6.0](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.6.0)

### New Features:
Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-apigateway-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
</parent>

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

Expand Down
19 changes: 2 additions & 17 deletions aws-android-sdk-auth-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
</parent>

<repositories>
<repository>
<id>android-support</id>
<url>file://${env.ANDROID_HOME}/extras/android/m2repository/</url>
</repository>
</repositories>

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

<dependency>
Expand All @@ -45,14 +38,6 @@
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>24.2.0</version>
<type>aar</type>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
8 changes: 2 additions & 6 deletions aws-android-sdk-auth-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.amazonaws.mobile.auth.core"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
android:name="android.support.multidex.MultiDexApplication">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amazonaws.mobile.auth.core">

<application android:allowBackup="true"/>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* A default base class easing the work required for implementing the SignInResultHandler for
* {@link IdentityManager#signInOrSignUp(Context, SignInResultHandler)} by providing default
* {@link IdentityManager#setUpToAuthenticate(Context, SignInResultHandler)} by providing default
* behavior in the case that the user cancels signing in or encounters an error. The default for
* canceling is to toast that sign-in was canceled. The default for a sign-in error is to show
* an alert dialog specifying the error message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.util.SparseArray;
import android.view.View;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

/**
* Provides drawable for a vertically split background.
Expand Down Expand Up @@ -54,7 +52,7 @@ public void setSplitPointDistanceFromTop(int distanceFromTop) {
}

@Override
public void draw(@NonNull final Canvas canvas) {
public void draw(final Canvas canvas) {
final Rect b = getBounds();
paint.setColor(this.topBackgroundColor);
float y = distanceFromTopToSplitPoint < b.height() ? distanceFromTopToSplitPoint : b.height();
Expand All @@ -69,7 +67,7 @@ public void setAlpha(final int alpha) {
}

@Override
public void setColorFilter(@Nullable final ColorFilter colorFilter) {
public void setColorFilter(final ColorFilter colorFilter) {
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.StateListDrawable;
import android.support.annotation.Nullable;
import android.text.TextPaint;
import android.text.method.TransformationMethod;
import android.util.AttributeSet;
Expand Down Expand Up @@ -85,7 +84,7 @@ public class SignInButton extends LinearLayout {
/** Boolean to keep track of whether the button should only display the image and no text. */
protected boolean isSmallStyle = false;

public SignInButton(final Context context, @Nullable final AttributeSet attrs,
public SignInButton(final Context context, final AttributeSet attrs,
final int defStyleAttr, final SignInButtonAttributes buttonAttributes) {
super(context, attrs, defStyleAttr);
this.attributes = buttonAttributes;
Expand Down Expand Up @@ -167,19 +166,11 @@ private Drawable getButtonBackground(final int buttonFaceColor) {
attributes.getBottomShadowColor(), attributes.getBottomShadowColor()});
outerShadowBottomDrawable.setCornerRadius(dp(cornerRadius));

final GradientDrawable border = new GradientDrawable();
border.setColor(BORDER_COLOR);
border.setCornerRadius(dp(cornerRadius));

final LayerDrawable layerDrawable = new LayerDrawable(
new Drawable[] {border,
outerShadowTopDrawable,
new Drawable[] {outerShadowTopDrawable,
outerShadowBottomDrawable,
insetBackgroundDrawable});

// Border for the button.
layerDrawable.setLayerInset(0, 0, 0, 0, 0);

// Top shadow is the furthest down drawable, so it is ok if this overlaps the bottom shadow.
layerDrawable.setLayerInset(1, 0, 0, 0, 0);

Expand Down
8 changes: 4 additions & 4 deletions aws-android-sdk-auth-facebook/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
</parent>

<repositories>
Expand All @@ -36,7 +36,7 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-core</artifactId>
<optional>false</optional>
<version>2.6.0</version>
<version>2.6.1</version>
<type>aar</type>
</dependency>
<dependency>
Expand Down Expand Up @@ -65,9 +65,9 @@
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>21.0.0</version>
<version>23.0.1</version>
<type>aar</type>
<optional>false</optional>
<optional>true</optional>
</dependency>
</dependencies>

Expand Down
22 changes: 20 additions & 2 deletions aws-android-sdk-auth-facebook/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.amazonaws.mobile.auth.facebook">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<application android:allowBackup="true"
android:supportsRtl="true">
<application>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />

<activity
android:name="com.facebook.FacebookActivity"
android:exported="true"
tools:ignore="MissingRegistered">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="@string/facebook_login_protocol_scheme" />
</intent-filter>
</activity>

</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ public class FacebookButton extends SignInButton {
/** Button background color when pressed. */
private static final int FB_BACKGROUND_COLOR_PRESSED = 0xFF2D4570;

/** Button top shadow color. */
private static final int BUTTON_TOP_SHADOW_COLOR = 0xFFCCCCCC;

/** Button top shadow thickness in pixels. */
private static final int BUTTON_TOP_SHADOW_THICKNESS = (int) dp(1);

/** Button bottom shadow thickness in pixels. */
private static final int BUTTON_BOTTOM_SHADOW_THICKNESS = (int) dp(2);

/**
* Constructor.
* @param context context.
Expand Down Expand Up @@ -77,13 +86,16 @@ public FacebookButton(@NonNull final Context context,
@Nullable final AttributeSet attrs,
final int defStyleAttr) {
super(context, attrs, defStyleAttr,
new SignInButtonAttributes()
.withCornerRadius(CORNER_RADIUS)
.withBackgroundColor(FB_BACKGROUND_COLOR)
.withBackgroundColorPressed(FB_BACKGROUND_COLOR_PRESSED)
.withTextColor(Color.WHITE)
.withDefaultTextResourceId(R.string.default_facebook_button_text)
.withImageIconResourceId(R.drawable.facebook_icon)
new SignInButtonAttributes()
.withCornerRadius(CORNER_RADIUS)
.withBackgroundColor(FB_BACKGROUND_COLOR)
.withBackgroundColorPressed(FB_BACKGROUND_COLOR_PRESSED)
.withTextColor(Color.WHITE)
.withDefaultTextResourceId(R.string.default_facebook_button_text)
.withImageIconResourceId(R.drawable.facebook_icon)
.withTopShadowColor(BUTTON_TOP_SHADOW_COLOR)
.withTopShadowThickness(BUTTON_TOP_SHADOW_THICKNESS)
.withBottomShadowThickness(BUTTON_BOTTOM_SHADOW_THICKNESS)
);


Expand All @@ -97,7 +109,7 @@ public FacebookButton(@NonNull final Context context,
} catch (Exception exception) {
exception.printStackTrace();
Log.e(LOG_TAG, "Cannot initialize the SignInButton. Please check if IdentityManager : "
+ " startUpAuth and setUpToAuthenticate are invoked");
+ " startUpAuth and setUpToAuthenticate are invoked");
}
}
}
14 changes: 14 additions & 0 deletions aws-android-sdk-auth-facebook/src/main/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="all">
<!--
The Facebook Application ID associated with the Android application.
This should be overridden by the developer to support Facebook SignIn.
Refer https://developers.facebook.com/docs/facebook-login/android for further information.
-->
<!--suppress ParserError -->
<string name="facebook_app_id" translatable="false">YOUR-FACEBOOK-APPLICATION-ID</string>

<!--suppress ParserError -->
<string name="facebook_login_protocol_scheme" translatable="false">fbYOUR-FACEBOOK-APPLICATION-ID</string>
</resources>
8 changes: 4 additions & 4 deletions aws-android-sdk-auth-google/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
</parent>

<repositories>
Expand All @@ -40,7 +40,7 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-core</artifactId>
<optional>false</optional>
<version>2.6.0</version>
<version>2.6.1</version>
<type>aar</type>
</dependency>

Expand All @@ -54,8 +54,8 @@
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>24.2.0</version>
<optional>false</optional>
<version>23.0.1</version>
<optional>true</optional>
<type>aar</type>
</dependency>

Expand Down
10 changes: 7 additions & 3 deletions aws-android-sdk-auth-google/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.amazonaws.mobile.auth.google">

<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -9,7 +10,10 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />

<application android:allowBackup="true"
android:supportsRtl="true">
</application>
<application>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>

</manifest>
Loading

0 comments on commit 04a8494

Please sign in to comment.