Commit da0c4e53 authored by Gustavo Perdomo's avatar Gustavo Perdomo

Merge remote-tracking branch 'upstream/master'

parents 89620c49 ac05812c
......@@ -11,6 +11,9 @@
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<!-- Ref: http://stackoverflow.com/questions/13602190/java-lang-securityexception-requires-vibrate-permission-on-jelly-bean-4-2 -->
<uses-permission android:name="android.permission.VIBRATE" android:maxSdkVersion="18" />
<application>
<!--
......
......@@ -24,10 +24,13 @@ public class MainActivity extends ReactActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ViewGroup layout = (ViewGroup) getLayoutInflater().inflate(R.layout.activity_main, null);
ViewGroup layout;
if (SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
layout = (ViewGroup) getLayoutInflater().inflate(R.layout.activity_main, null);
Toolbar toolbar = (Toolbar) layout.findViewById(R.id.toolbar);
setActionBar(toolbar);
} else {
layout = (ViewGroup) getLayoutInflater().inflate(R.layout.activity_main_prelollipop, null);
}
mReactRootView = new ReactRootView(this);
layout.addView(mReactRootView);
......
......@@ -11,7 +11,8 @@
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
android:theme="@style/AppTheme.AppBarOverlay"
>
<android.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.wix.reactnativenotifications.app.MainActivity">
</android.support.design.widget.CoordinatorLayout>
{
"name": "react-native-notifications",
"version": "1.1.7",
"version": "1.1.8",
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
"license": "MIT",
......
......@@ -181,13 +181,13 @@ describe("Notifications-Android > ", () => {
.catch((err) => done(err));
});
it("should return empty notification data if not available", (done) => {
it("should return empty notification if not available", (done) => {
expect(getInitialNotificationStub).to.not.have.been.called;
getInitialNotificationStub.returns(Promise.resolve(null));
libUnderTest.PendingNotifications.getInitialNotification()
.then((notification) => {
expect(notification.getData()).to.equal(null);
expect(notification).to.be.undefined;
done();
})
.catch((err) => done(err));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment