Move specific classes for FDroid into FDroid variant source code

This commit is contained in:
Benoit Marty
2019-06-26 14:07:53 +02:00
parent 76b890fe06
commit d1642c928a
20 changed files with 116 additions and 53 deletions

View File

@ -9,7 +9,7 @@
android:name="firebase_analytics_collection_deactivated"
android:value="true" />
<service android:name=".push.fcm.VectorFirebaseMessagingService">
<service android:name=".gplay.push.fcm.VectorFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.riotredesign.push.fcm.troubleshoot
package im.vector.riotredesign.gplay.features.settings.troubleshoot
import androidx.fragment.app.Fragment
import com.google.firebase.iid.FirebaseInstanceId

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.riotredesign.push.fcm.troubleshoot
package im.vector.riotredesign.gplay.features.settings.troubleshoot
import androidx.fragment.app.Fragment
import com.google.android.gms.common.ConnectionResult

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.riotredesign.push.fcm.troubleshoot
package im.vector.riotredesign.gplay.features.settings.troubleshoot
import androidx.fragment.app.Fragment
import im.vector.riotredesign.R

View File

@ -0,0 +1,21 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Code exclusively used by the GPlay build and not referenced on the main source code
*/
package im.vector.riotredesign.gplay

View File

@ -17,7 +17,7 @@
* limitations under the License.
*/
package im.vector.riotredesign.push.fcm
package im.vector.riotredesign.gplay.push.fcm
import android.os.Handler
import android.os.Looper
@ -39,6 +39,7 @@ import im.vector.riotredesign.features.notifications.NotifiableMessageEvent
import im.vector.riotredesign.features.notifications.NotificationDrawerManager
import im.vector.riotredesign.features.notifications.SimpleNotifiableEvent
import im.vector.riotredesign.features.settings.PreferencesManager
import im.vector.riotredesign.push.fcm.FcmHelper
import org.koin.android.ext.android.inject
import timber.log.Timber

View File

@ -99,4 +99,12 @@ object FcmHelper {
val resultCode = apiAvailability.isGooglePlayServicesAvailable(activity)
return resultCode == ConnectionResult.SUCCESS
}
fun onEnterForeground(context: Context) {
// No op
}
fun onEnterBackground(context: Context, hasSession: Boolean) {
// TODO FCM fallback
}
}

View File

@ -18,9 +18,9 @@ package im.vector.riotredesign.push.fcm
import androidx.fragment.app.Fragment
import im.vector.matrix.android.api.session.Session
import im.vector.riotredesign.features.settings.troubleshoot.*
import im.vector.riotredesign.push.fcm.troubleshoot.TestFirebaseToken
import im.vector.riotredesign.push.fcm.troubleshoot.TestPlayServices
import im.vector.riotredesign.push.fcm.troubleshoot.TestTokenRegistration
import im.vector.riotredesign.gplay.features.settings.troubleshoot.TestFirebaseToken
import im.vector.riotredesign.gplay.features.settings.troubleshoot.TestPlayServices
import im.vector.riotredesign.gplay.features.settings.troubleshoot.TestTokenRegistration
class NotificationTroubleshootTestManagerFactory {