Skip to content

Commit

Permalink
For mozilla-mobile#162 - add build flag for firebase push service
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbsgilbs committed Aug 15, 2020
1 parent 5290c8d commit 7a98a3d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ dependencies {
implementation Deps.mozilla_ui_widgets

implementation Deps.mozilla_lib_crash
implementation Deps.mozilla_lib_push_firebase
if (project.ext.buildFeatures['firebasePushService']) {
implementation Deps.mozilla_lib_push_firebase
}
implementation Deps.mozilla_lib_dataprotect
debugImplementation Deps.leakcanary

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.mozilla.fenix.push

import android.content.Context
import mozilla.components.concept.push.PushService

@SuppressWarnings("EmptyFunctionBlock")
class FirebasePushService : PushService {
override fun deleteToken() {}
override fun isServiceAvailable(context: Context): Boolean { return false }
override fun start(context: Context) {}
override fun stop() {}
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@

<service
android:name=".push.FirebasePushService"
android:enabled="@bool/ENABLE_FEATURE_FIREBASE_PUSH_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
Expand Down

0 comments on commit 7a98a3d

Please sign in to comment.