mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Tematory disable firebase
This commit is contained in:
@@ -86,3 +86,5 @@ dependencies {
|
|||||||
kapt "androidx.room:room-compiler:2.5.0"
|
kapt "androidx.room:room-compiler:2.5.0"
|
||||||
kapt "androidx.lifecycle:lifecycle-compiler:2.4.0"
|
kapt "androidx.lifecycle:lifecycle-compiler:2.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "94322785672",
|
||||||
|
"firebase_url": "https://amnezia-c6715-default-rtdb.europe-west1.firebasedatabase.app",
|
||||||
|
"project_id": "amnezia-c6715",
|
||||||
|
"storage_bucket": "amnezia-c6715.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:94322785672:android:ed42ab188d6edecf754e3d",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "org.amnezia.vpn"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "94322785672-p3q726tro36fr9nluj45l35gqv6nhjsq.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyCvblU4w_NZbWk9bNQc-KGmg-WODjbb308"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "94322785672-p3q726tro36fr9nluj45l35gqv6nhjsq.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:94322785672:android:95e8779ff76d6641754e3d",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "org.amnezia.vpn.shadowsocks.core"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "94322785672-p3q726tro36fr9nluj45l35gqv6nhjsq.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyCvblU4w_NZbWk9bNQc-KGmg-WODjbb308"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "94322785672-p3q726tro36fr9nluj45l35gqv6nhjsq.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -7,12 +7,21 @@
|
|||||||
android:name="android.hardware.touchscreen"
|
android:name="android.hardware.touchscreen"
|
||||||
android:required="false" />
|
android:required="false" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="28"/>
|
||||||
|
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="com.github.shadowsocks.plugin.ACTION_NATIVE_PLUGIN" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
@@ -75,6 +84,7 @@
|
|||||||
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
|
||||||
<!-- https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/work/workmanager/src/main/AndroidManifest.xml -->
|
<!-- https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/work/workmanager/src/main/AndroidManifest.xml -->
|
||||||
<provider
|
<provider
|
||||||
@@ -128,5 +138,18 @@
|
|||||||
android:directBootAware="true"
|
android:directBootAware="true"
|
||||||
android:process=":QtOnlyProcess"
|
android:process=":QtOnlyProcess"
|
||||||
tools:replace="android:directBootAware" />
|
tools:replace="android:directBootAware" />
|
||||||
|
|
||||||
|
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
|
||||||
|
android:process=":QtOnlyProcess"
|
||||||
|
android:directBootAware="true"/>
|
||||||
|
|
||||||
|
<provider android:name="com.google.firebase.provider.FirebaseInitProvider"
|
||||||
|
android:process=":QtOnlyProcess"
|
||||||
|
tools:node="remove"/>
|
||||||
|
|
||||||
|
<service android:name="androidx.room.MultiInstanceInvalidationService"
|
||||||
|
android:process=":bg"/>
|
||||||
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ object Core : Configuration.Provider {
|
|||||||
|
|
||||||
// overhead of debug mode is minimal: https://github.com/Kotlin/kotlinx.coroutines/blob/f528898/docs/debugging.md#debug-mode
|
// overhead of debug mode is minimal: https://github.com/Kotlin/kotlinx.coroutines/blob/f528898/docs/debugging.md#debug-mode
|
||||||
System.setProperty(DEBUG_PROPERTY_NAME, DEBUG_PROPERTY_VALUE_ON)
|
System.setProperty(DEBUG_PROPERTY_NAME, DEBUG_PROPERTY_VALUE_ON)
|
||||||
Firebase.initialize(deviceStorage) // multiple processes needs manual set-up
|
/* Firebase.initialize(deviceStorage) // multiple processes needs manual set-up
|
||||||
Timber.plant(object : Timber.DebugTree() {
|
Timber.plant(object : Timber.DebugTree() {
|
||||||
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
|
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
|
||||||
if (t == null) {
|
if (t == null) {
|
||||||
@@ -122,7 +122,7 @@ object Core : Configuration.Provider {
|
|||||||
if (priority >= Log.INFO) FirebaseCrashlytics.getInstance().recordException(t)
|
if (priority >= Log.INFO) FirebaseCrashlytics.getInstance().recordException(t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})*/
|
||||||
|
|
||||||
// handle data restored/crash
|
// handle data restored/crash
|
||||||
if (Build.VERSION.SDK_INT >= 24 && DataStore.directBootAware && user.isUserUnlocked) {
|
if (Build.VERSION.SDK_INT >= 24 && DataStore.directBootAware && user.isUserUnlocked) {
|
||||||
|
|||||||
+2
-2
@@ -269,7 +269,7 @@ object BaseService {
|
|||||||
// channge the state
|
// channge the state
|
||||||
data.changeState(State.Stopping)
|
data.changeState(State.Stopping)
|
||||||
GlobalScope.launch(Dispatchers.Main.immediate) {
|
GlobalScope.launch(Dispatchers.Main.immediate) {
|
||||||
Firebase.analytics.logEvent("stop") { param(FirebaseAnalytics.Param.METHOD, tag) }
|
//Firebase.analytics.logEvent("stop") { param(FirebaseAnalytics.Param.METHOD, tag) }
|
||||||
data.connectingJob?.cancelAndJoin() // ensure stop connecting first
|
data.connectingJob?.cancelAndJoin() // ensure stop connecting first
|
||||||
this@Interface as Service
|
this@Interface as Service
|
||||||
// we use a coroutineScope here to allow clean-up in parallel
|
// we use a coroutineScope here to allow clean-up in parallel
|
||||||
@@ -344,7 +344,7 @@ object BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// data.notification = createNotification(profile.formattedName)
|
// data.notification = createNotification(profile.formattedName)
|
||||||
Firebase.analytics.logEvent("start") { param(FirebaseAnalytics.Param.METHOD, tag) }
|
//Firebase.analytics.logEvent("start") { param(FirebaseAnalytics.Param.METHOD, tag) }
|
||||||
|
|
||||||
data.changeState(State.Connecting)
|
data.changeState(State.Connecting)
|
||||||
data.connectingJob = GlobalScope.launch(Dispatchers.Main) {
|
data.connectingJob = GlobalScope.launch(Dispatchers.Main) {
|
||||||
|
|||||||
Reference in New Issue
Block a user