forked from signalapp/Signal-Android
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub out Google Mobile Services and Firebase with Open Source library…
…, new build flavor 'gms' to use it
- Loading branch information
Showing
52 changed files
with
908 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("signal-library") | ||
} | ||
|
||
android { | ||
namespace = "com.google.android.gms" | ||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.preference) | ||
implementation(libs.osmdroid) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Licensed under GNU GENERAL PUBLIC LICENSE 3.0 | ||
|
||
Files under com/google/android (c) 2020 Angus Turnbull https://www.twinhelix.com/ | ||
Files com/google/android/gms/maps/{GoogleMap.java,MapView.java,SupportMapFragment.java} (c) Fumiaki Yoshimatsu https://github.com/fumiakiy/Signal-Android/tree/fumiakiy/share-location-osm | ||
Files under com/google/firebase (c) Oscar Mira / valldrac https://github.com/mollyim/mollyim-android/tree/master/libfakegms/src/main/java/com/google/firebase |
13 changes: 13 additions & 0 deletions
13
libfakegms/src/main/java/com/google/android/gms/auth/api/phone/SmsRetriever.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.google.android.gms.auth.api.phone; | ||
|
||
import android.content.Context; | ||
|
||
public final class SmsRetriever { | ||
public static final String EXTRA_SMS_MESSAGE = "com.google.android.gms.auth.api.phone.EXTRA_SMS_MESSAGE"; | ||
public static final String EXTRA_STATUS = "com.google.android.gms.auth.api.phone.EXTRA_STATUS"; | ||
public static final String SMS_RETRIEVED_ACTION = "com.google.android.gms.auth.api.phone.SMS_RETRIEVED"; | ||
|
||
public static SmsRetrieverClient getClient(Context context) { | ||
return new SmsRetrieverClient(); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
libfakegms/src/main/java/com/google/android/gms/auth/api/phone/SmsRetrieverClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.google.android.gms.auth.api.phone; | ||
|
||
import com.google.android.gms.tasks.Task; | ||
|
||
public final class SmsRetrieverClient { | ||
public Task startSmsRetriever() { | ||
return new Task(); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
libfakegms/src/main/java/com/google/android/gms/common/ConnectionResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.google.android.gms.common; | ||
|
||
public class ConnectionResult { | ||
public static final int SUCCESS = 0; | ||
public static final int SERVICE_MISSING = 1; | ||
public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2; | ||
public static final int SERVICE_DISABLED = 3; | ||
public static final int SERVICE_INVALID = 9; | ||
public static final int API_UNAVAILABLE = 16; | ||
public static final int SERVICE_MISSING_PERMISSION = 19; | ||
} |
19 changes: 19 additions & 0 deletions
19
libfakegms/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.google.android.gms.common; | ||
|
||
import android.app.Activity; | ||
import android.app.Dialog; | ||
import android.content.Context; | ||
|
||
public class GoogleApiAvailability { | ||
public static GoogleApiAvailability getInstance() { | ||
return new GoogleApiAvailability(); | ||
} | ||
|
||
public int isGooglePlayServicesAvailable(Context context) { | ||
return ConnectionResult.SERVICE_MISSING; | ||
} | ||
|
||
public Dialog getErrorDialog(Activity activity, int errorCode, int requestCode) { | ||
return null; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
libfakegms/src/main/java/com/google/android/gms/common/api/ApiException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.google.android.gms.common.api; | ||
|
||
public class ApiException extends Exception { | ||
} |
7 changes: 7 additions & 0 deletions
7
libfakegms/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.google.android.gms.common.api; | ||
|
||
public class CommonStatusCodes { | ||
public static final int ERROR = 12; | ||
public static final int SUCCESS = 0; | ||
public static final int TIMEOUT = 15; | ||
} |
16 changes: 16 additions & 0 deletions
16
libfakegms/src/main/java/com/google/android/gms/common/api/Status.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.google.android.gms.common.api; | ||
|
||
public final class Status { | ||
public Status(int statusCode) { | ||
} | ||
|
||
public int getStatusCode() { | ||
return CommonStatusCodes.ERROR; | ||
} | ||
|
||
public String getStatusMessage() { | ||
return new String(); | ||
} | ||
|
||
public static final int RESULT_SUCCESS = 0; | ||
} |
13 changes: 13 additions & 0 deletions
13
libfakegms/src/main/java/com/google/android/gms/maps/CameraUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.google.android.gms.maps; | ||
|
||
import com.google.android.gms.maps.model.LatLng; | ||
|
||
public final class CameraUpdate { | ||
public final LatLng latLng; | ||
public final float zoom; | ||
|
||
public CameraUpdate(LatLng latLng, float zoom) { | ||
this.latLng = latLng; | ||
this.zoom = zoom; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
libfakegms/src/main/java/com/google/android/gms/maps/CameraUpdateFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.google.android.gms.maps; | ||
|
||
import com.google.android.gms.maps.model.LatLng; | ||
|
||
public final class CameraUpdateFactory { | ||
public static CameraUpdate newLatLngZoom(LatLng latLng, float zoom) { | ||
return new CameraUpdate(latLng, zoom); | ||
} | ||
} |
Oops, something went wrong.