Skip to content

Commit f0a9d5b

Browse files
committed
Merge remote-tracking branch 'origin/master' into ghm
2 parents 135811e + 9aecf1e commit f0a9d5b

File tree

171 files changed

+5819
-3658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+5819
-3658
lines changed

Android/firebase_dependencies.gradle

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,27 @@ import org.gradle.util.ConfigureUtil;
1616

1717
// A map of library to the dependencies that need to be added for it.
1818
def firebaseDependenciesMap = [
19-
'app' : ['com.google.firebase:firebase-analytics:17.4.4'],
20-
'admob' : ['com.google.firebase:firebase-ads:19.2.0',
21-
'com.google.android.gms:play-services-measurement-sdk-api:17.4.4'],
22-
'analytics' : ['com.google.firebase:firebase-analytics:17.4.4'],
19+
'app' : ['com.google.firebase:firebase-analytics:17.5.0'],
20+
'admob' : ['com.google.firebase:firebase-ads:19.3.0',
21+
'com.google.android.gms:play-services-measurement-sdk-api:17.5.0',
22+
'com.google.android.gms:play-services-base:17.4.0'],
23+
'analytics' : ['com.google.firebase:firebase-analytics:17.5.0',
24+
'com.google.android.gms:play-services-base:17.4.0'],
2325
'auth' : ['com.google.firebase:firebase-auth:19.3.2'],
24-
'database' : ['com.google.firebase:firebase-database:19.3.1'],
26+
'database' : ['com.google.firebase:firebase-database:19.4.0'],
2527
'dynamic_links' : ['com.google.firebase:firebase-dynamic-links:19.1.0'],
26-
'firestore' : ['com.google.firebase:firebase-firestore:21.5.0'],
27-
'functions' : ['com.google.firebase:firebase-functions:19.0.2'],
28-
'instance_id' : ['com.google.firebase:firebase-iid:20.2.3'],
28+
'firestore' : ['com.google.firebase:firebase-firestore:21.6.0'],
29+
'functions' : ['com.google.firebase:firebase-functions:19.1.0'],
30+
'instance_id' : ['com.google.firebase:firebase-iid:20.2.4'],
2931
'invites' : ['com.google.firebase:firebase-invites:17.0.0'],
3032
// Messaging has an additional local dependency to include.
31-
'messaging' : ['com.google.firebase:firebase-messaging:20.2.3',
32-
'firebase_cpp_sdk.messaging:messaging_java'],
33-
'performance' : ['com.google.firebase:firebase-perf:19.0.7'],
34-
'remote_config' : ['com.google.firebase:firebase-config:19.2.0'],
35-
'storage' : ['com.google.firebase:firebase-storage:19.1.1']
33+
'messaging' : ['com.google.firebase:firebase-messaging:20.2.4',
34+
'firebase_cpp_sdk.messaging:messaging_java',
35+
'androidx.core:core:1.0.1'],
36+
'performance' : ['com.google.firebase:firebase-perf:19.0.8'],
37+
'remote_config' : ['com.google.firebase:firebase-config:19.2.0',
38+
'com.google.android.gms:play-services-base:17.4.0'],
39+
'storage' : ['com.google.firebase:firebase-storage:19.2.0']
3640
]
3741

3842
// A map of library to the gradle resources that they depend upon.
@@ -157,4 +161,4 @@ project.afterEvaluate {
157161
}
158162
}
159163
}
160-
}
164+
}

admob/admob_resources/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ android {
4545
}
4646

4747
dependencies {
48-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
49-
implementation 'com.google.firebase:firebase-ads:19.2.0'
48+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
49+
implementation 'com.google.firebase:firebase-ads:19.3.0'
5050
}
5151

5252
afterEvaluate {

admob/src/include/firebase/admob/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ enum AdMobError {
7272
/// An attempt has been made to show an ad on an Android Activity that has
7373
/// no window token (such as one that's not done initializing).
7474
kAdMobErrorNoWindowToken,
75+
/// Fallback error for any unidentified cases.
76+
kAdMobErrorUnknown,
7577
};
7678
#ifdef INTERNAL_EXPERIMENTAL
7779
// LINT.ThenChange(//depot_firebase_cpp/admob/client/cpp/src_java/com/google/firebase/admob/internal/cpp/ConstantsHelper.java)

admob/src_java/com/google/firebase/admob/internal/cpp/ConstantsHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public final class ConstantsHelper {
4040
public static final int CALLBACK_ERROR_NO_FILL = 7;
4141

4242
public static final int CALLBACK_ERROR_NO_WINDOW_TOKEN = 8;
43+
44+
public static final int CALLBACK_ERROR_UNKNOWN = 9;
4345
// LINT.ThenChange(//depot_firebase_cpp/admob/client/cpp/src/include/firebase/admob/types.h)
4446

4547
/**
@@ -68,6 +70,8 @@ public final class ConstantsHelper {
6870

6971
public static final String CALLBACK_ERROR_MESSAGE_NO_WINDOW_TOKEN =
7072
"Android Activity does not have a window token.";
73+
74+
public static final String CALLBACK_ERROR_MESSAGE_UNKNOWN = "Unknown error occurred.";
7175
// LINT.ThenChange(//depot_firebase_cpp/admob/client/cpp/src/include/firebase/admob/types.h)
7276

7377
/** Types of notifications to send back to the C++ side for listeners updates. */

admob/src_java/com/google/firebase/admob/internal/cpp/InterstitialAdHelper.java

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,22 @@ public void run() {
9292
int errorCode;
9393
String errorMessage;
9494
if (mInterstitial == null) {
95-
errorCode = ConstantsHelper.CALLBACK_ERROR_NONE;
96-
errorMessage = ConstantsHelper.CALLBACK_ERROR_MESSAGE_NONE;
97-
mInterstitial = new InterstitialAd(mActivity);
98-
mInterstitial.setAdUnitId(mAdUnitId);
99-
mInterstitial.setAdListener(new InterstitialAdListener());
95+
try {
96+
mInterstitial = new InterstitialAd(mActivity);
97+
mInterstitial.setAdUnitId(mAdUnitId);
98+
mInterstitial.setAdListener(new InterstitialAdListener());
99+
errorCode = ConstantsHelper.CALLBACK_ERROR_NONE;
100+
errorMessage = ConstantsHelper.CALLBACK_ERROR_MESSAGE_NONE;
101+
} catch (IllegalStateException e) {
102+
mInterstitial = null;
103+
// This exception can be thrown if the ad unit ID was already set.
104+
errorCode = ConstantsHelper.CALLBACK_ERROR_ALREADY_INITIALIZED;
105+
errorMessage = ConstantsHelper.CALLBACK_ERROR_MESSAGE_ALREADY_INITIALIZED;
106+
}
100107
} else {
101108
errorCode = ConstantsHelper.CALLBACK_ERROR_ALREADY_INITIALIZED;
102109
errorMessage = ConstantsHelper.CALLBACK_ERROR_MESSAGE_ALREADY_INITIALIZED;
110+
103111
}
104112

105113
completeInterstitialAdFutureCallback(callbackDataPtr, errorCode, errorMessage);
@@ -152,7 +160,17 @@ public void run() {
152160
mLoadAdCallbackDataPtr = CPP_NULLPTR;
153161
}
154162
} else {
155-
mInterstitial.loadAd(request);
163+
try {
164+
mInterstitial.loadAd(request);
165+
} catch (IllegalStateException e) {
166+
synchronized (mInterstitialLock) {
167+
completeInterstitialAdFutureCallback(
168+
mLoadAdCallbackDataPtr,
169+
ConstantsHelper.CALLBACK_ERROR_UNINITIALIZED,
170+
ConstantsHelper.CALLBACK_ERROR_MESSAGE_UNINITIALIZED);
171+
mLoadAdCallbackDataPtr = CPP_NULLPTR;
172+
}
173+
}
156174
}
157175
}
158176
});
@@ -222,6 +240,9 @@ public void onAdFailedToLoad(int errorCode) {
222240
callbackErrorCode = ConstantsHelper.CALLBACK_ERROR_NO_FILL;
223241
callbackErrorMessage = ConstantsHelper.CALLBACK_ERROR_MESSAGE_NO_FILL;
224242
break;
243+
default:
244+
callbackErrorCode = ConstantsHelper.CALLBACK_ERROR_UNKNOWN;
245+
callbackErrorMessage = ConstantsHelper.CALLBACK_ERROR_MESSAGE_UNKNOWN;
225246
}
226247

227248
synchronized (mInterstitialLock) {
@@ -233,11 +254,6 @@ public void onAdFailedToLoad(int errorCode) {
233254
super.onAdFailedToLoad(errorCode);
234255
}
235256

236-
@Override
237-
public void onAdLeftApplication() {
238-
super.onAdLeftApplication();
239-
}
240-
241257
@Override
242258
public void onAdLoaded() {
243259
synchronized (mInterstitialLock) {

analytics/ios_headers/FIREventNames.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ static NSString *const kFIREventAddToCart NS_SWIFT_NAME(AnalyticsEventAddToCart)
6969
static NSString *const kFIREventAddToWishlist NS_SWIFT_NAME(AnalyticsEventAddToWishlist) =
7070
@"add_to_wishlist";
7171

72+
/// Ad Impression event. This event signifies when a user sees an ad impression. Note: If you supply
73+
/// the @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency parameter
74+
/// so that revenue metrics can be computed accurately. Params:
75+
///
76+
/// <ul>
77+
/// <li>@c kFIRParameterAdPlatform (NSString) (optional)</li>
78+
/// <li>@c kFIRParameterAdFormat (NSString) (optional)</li>
79+
/// <li>@c kFIRParameterAdSource (NSString) (optional)</li>
80+
/// <li>@c kFIRParameterAdUnitName (NSString) (optional)</li>
81+
/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
82+
/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
83+
/// </ul>
84+
static NSString *const kFIREventAdImpression NS_SWIFT_NAME(AnalyticsEventAdImpression) =
85+
@"ad_impression";
86+
7287
/// App Open event. By logging this event when an App becomes active, developers can understand how
7388
/// often users leave and return during the course of a Session. Although Sessions are automatically
7489
/// reported, this event can provide further clarification around the continuous engagement of

analytics/ios_headers/FIRParameterNames.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@
3939
static NSString *const kFIRParameterAchievementID NS_SWIFT_NAME(AnalyticsParameterAchievementID) =
4040
@"achievement_id";
4141

42+
/// The ad format (e.g. Banner, Interstitial, Rewarded, Native, Rewarded Interstitial, Instream).
43+
/// (NSString).
44+
/// <pre>
45+
/// NSDictionary *params = @{
46+
/// kFIRParameterAdFormat : @"Banner",
47+
/// // ...
48+
/// };
49+
/// </pre>
50+
static NSString *const kFIRParameterAdFormat NS_SWIFT_NAME(AnalyticsParameterAdFormat) =
51+
@"ad_format";
52+
4253
/// Ad Network Click ID (NSString). Used for network-specific click IDs which vary in format.
4354
/// <pre>
4455
/// NSDictionary *params = @{
@@ -49,6 +60,36 @@ static NSString *const kFIRParameterAchievementID NS_SWIFT_NAME(AnalyticsParamet
4960
static NSString *const kFIRParameterAdNetworkClickID
5061
NS_SWIFT_NAME(AnalyticsParameterAdNetworkClickID) = @"aclid";
5162

63+
/// The ad platform (e.g. MoPub, IronSource) (NSString).
64+
/// <pre>
65+
/// NSDictionary *params = @{
66+
/// kFIRParameterAdPlatform : @"MoPub",
67+
/// // ...
68+
/// };
69+
/// </pre>
70+
static NSString *const kFIRParameterAdPlatform NS_SWIFT_NAME(AnalyticsParameterAdPlatform) =
71+
@"ad_platform";
72+
73+
/// The ad source (e.g. AdColony) (NSString).
74+
/// <pre>
75+
/// NSDictionary *params = @{
76+
/// kFIRParameterAdSource : @"AdColony",
77+
/// // ...
78+
/// };
79+
/// </pre>
80+
static NSString *const kFIRParameterAdSource NS_SWIFT_NAME(AnalyticsParameterAdSource) =
81+
@"ad_source";
82+
83+
/// The ad unit name (e.g. Banner_03) (NSString).
84+
/// <pre>
85+
/// NSDictionary *params = @{
86+
/// kFIRParameterAdUnitName : @"Banner_03",
87+
/// // ...
88+
/// };
89+
/// </pre>
90+
static NSString *const kFIRParameterAdUnitName NS_SWIFT_NAME(AnalyticsParameterAdUnitName) =
91+
@"ad_unit_name";
92+
5293
/// A product affiliation to designate a supplying company or brick and mortar store location
5394
/// (NSString). <pre>
5495
/// NSDictionary *params = @{

app/app_resources/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ android {
4646
}
4747

4848
dependencies {
49-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
49+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
5050
}
5151

5252
afterEvaluate {

app/google_api_resources/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ android {
4949
}
5050

5151
dependencies {
52-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
52+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
5353
implementation project(':app:app_resources')
5454
}
5555

app/invites_resources/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ android {
4545
}
4646

4747
dependencies {
48-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
48+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
4949
implementation 'com.google.firebase:firebase-dynamic-links:19.1.0'
5050
implementation project(':app:app_resources')
5151
}

app/src/include/firebase/variant.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class Variant {
131131
template <typename T>
132132
Variant(T value) // NOLINT
133133
: type_(kInternalTypeNull) {
134-
set_value_t<T>(value);
134+
set_value_t(value);
135135
}
136136

137137
/// @brief Construct a Variant containing the given string value (makes a
@@ -1104,14 +1104,11 @@ class Variant {
11041104
value_.blob_value.size = size;
11051105
}
11061106

1107-
// Templated helper function to ensure the value 0 is constructed as int
1108-
// instead of nullptr char*
1109-
//
11101107
// If you hit a compiler error here it means you are trying to construct a
11111108
// variant with unsupported type. Ether cast to correct type or add support
11121109
// below.
11131110
template <typename T>
1114-
void set_value_t(T value);
1111+
void set_value_t(T value) = delete;
11151112

11161113
// Get whether this Variant contains a small string.
11171114
bool is_small_string() const { return type_ == kInternalTypeSmallString; }

auth/auth_resources/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ android {
4545
}
4646

4747
dependencies {
48-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
48+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
4949
implementation 'com.google.firebase:firebase-auth:19.3.2'
5050
implementation project(':app:app_resources')
5151
}

auth/src/include/firebase/auth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class PhoneAuthProvider;
4747
struct AuthCompletionHandle;
4848
class FederatedAuthProvider;
4949
class FederatedOAuthProvider;
50-
class SignInResult;
50+
struct SignInResult;
5151

5252
/// @brief Firebase authentication object.
5353
///

cpp_sdk_version.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"released": "6.15.1",
3-
"stable": "6.15.1",
4-
"head": "6.15.1"
2+
"released": "6.16.0",
3+
"stable": "6.16.0",
4+
"head": "6.16.0"
55
}

database/database_resources/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ android {
4545
}
4646

4747
dependencies {
48-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
49-
implementation 'com.google.firebase:firebase-database:19.3.1'
48+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
49+
implementation 'com.google.firebase:firebase-database:19.4.0'
5050
//implementation project(':app:app_resources')
5151
}
5252

firestore/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,14 @@ set(android_SRCS
7171
src/android/document_snapshot_android.h
7272
src/android/event_listener_android.cc
7373
src/android/event_listener_android.h
74+
src/android/exception_android.cc
75+
src/android/exception_android.h
7476
src/android/field_path_android.cc
7577
src/android/field_path_android.h
7678
src/android/field_path_portable.cc
7779
src/android/field_path_portable.h
7880
src/android/field_value_android.cc
7981
src/android/field_value_android.h
80-
src/android/firebase_firestore_exception_android.cc
81-
src/android/firebase_firestore_exception_android.h
82-
src/android/firebase_firestore_settings_android.cc
83-
src/android/firebase_firestore_settings_android.h
8482
src/android/firestore_android.cc
8583
src/android/firestore_android.h
8684
src/android/geo_point_android.cc
@@ -101,6 +99,8 @@ set(android_SRCS
10199
src/android/server_timestamp_behavior_android.h
102100
src/android/set_options_android.cc
103101
src/android/set_options_android.h
102+
src/android/settings_android.cc
103+
src/android/settings_android.h
104104
src/android/snapshot_metadata_android.cc
105105
src/android/snapshot_metadata_android.h
106106
src/android/source_android.cc

firestore/firestore_resources/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ android {
4646
}
4747

4848
dependencies {
49-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
50-
implementation 'com.google.firebase:firebase-firestore:21.5.0'
49+
implementation 'com.google.firebase:firebase-analytics:17.5.0'
50+
implementation 'com.google.firebase:firebase-firestore:21.6.0'
5151
}
5252

5353
afterEvaluate {

0 commit comments

Comments
 (0)