Skip to content

Commit 76b55df

Browse files
authored
Merge branch 'main' into bugfix/android-remote-config-specific-app
2 parents 12c58cf + 7b410d8 commit 76b55df

File tree

523 files changed

+2590
-1759
lines changed

Some content is hidden

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

523 files changed

+2590
-1759
lines changed

.clang-format

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
11
BasedOnStyle: Google
2-
Standard: Cpp11
3-
ColumnLimit: 80
4-
BinPackParameters: false
5-
AllowAllParametersOfDeclarationOnNextLine: true
6-
SpacesInContainerLiterals: true
7-
DerivePointerAlignment: false
8-
PointerAlignment: Left
9-
AllowShortFunctionsOnASingleLine: None
10-
IncludeBlocks: Preserve

.github/workflows/check-labels.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/checks.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Checks
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, labeled, unlabeled]
6+
7+
env:
8+
triggerLabelFull: "tests-requested: full"
9+
triggerLabelQuick: "tests-requested: quick"
10+
statusLabelInProgress: "tests: in-progress"
11+
statusLabelFailed: "tests: failed"
12+
13+
jobs:
14+
file_format_check:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: false
20+
- name: Setup python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.7
24+
- name: Install prerequisites
25+
run: python scripts/gha/install_prereqs_desktop.py
26+
- name: log clang format version
27+
shell: bash
28+
run: clang-format --version
29+
- name: git fetch origin main
30+
shell: bash
31+
run: git fetch origin main
32+
- name: Detect Formatting Changes
33+
shell: bash
34+
run: python3 scripts/format_code.py -git_diff -noformat_file -verbose
35+
36+
check_integration_test_labels:
37+
# This check fails if integration tests are queued, in progress, or failed.
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: docker://agilepathway/pull-request-label-checker:latest
41+
with:
42+
none_of: "${{ env.statusLabelInProgress }},${{ env.statusLabelFailed }},${{ env.triggerLabelFull }},${{ env.triggerLabelQuick }}"
43+
repo_token: ${{ github.token }}
44+
45+

.github/workflows/integration_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,10 @@ jobs:
351351
if: matrix.target_platform == 'Desktop' && !cancelled()
352352
run: |
353353
python scripts/gha/desktop_tester.py --testapp_dir ta
354-
- name: Run iOS integration tests on Simulator locally
355-
if: contains(env.mobileTestOn, 'simulator') && matrix.target_platform == 'iOS' && !cancelled()
354+
- name: Run iOS integration tests on iOS Simulator / Android Emulator locally
355+
if: contains(env.mobileTestOn, 'simulator') && startsWith(matrix.os, 'macos') && matrix.target_platform != 'Desktop' && !cancelled()
356356
run: |
357-
python scripts/gha/test_simulator.py --testapp_dir ta
357+
python scripts/gha/test_simulator.py --testapp_dir ta --ci
358358
# Workaround for https://github.com/GoogleCloudPlatform/github-actions/issues/100
359359
# Must be run after the Python setup action
360360
- name: Set CLOUDSDK_PYTHON (Windows)

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ Before you submit your pull request consider the following guidelines:
118118
* Follow our [Coding Rules](#rules).
119119
* Avoid checking in files that shouldn't be tracked (e.g `.tmp`, `.idea`).
120120
We recommend using a [global](#global-gitignore) gitignore for this.
121+
* Format your code:
122+
```shell
123+
python3 scripts/format_code.py -git_diff -verbose
124+
```
125+
121126
* Commit your changes using a descriptive commit message.
122127
123128
```shell

admob/integration_test/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ platform :ios, '10.0'
44
# Firebase AdMob test application.
55

66
target 'integration_test' do
7-
pod 'Firebase/AdMob', '7.10.0'
7+
pod 'Firebase/AdMob', '7.11.0'
88
end
99

1010
post_install do |installer|

admob/integration_test/integration_test.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
280280
GCC_WARN_UNUSED_FUNCTION = YES;
281281
GCC_WARN_UNUSED_VARIABLE = YES;
282-
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
282+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
283283
MTL_ENABLE_DEBUG_INFO = YES;
284284
ONLY_ACTIVE_ARCH = YES;
285285
SDKROOT = iphoneos;
@@ -316,7 +316,7 @@
316316
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
317317
GCC_WARN_UNUSED_FUNCTION = YES;
318318
GCC_WARN_UNUSED_VARIABLE = YES;
319-
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
319+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
320320
MTL_ENABLE_DEBUG_INFO = NO;
321321
SDKROOT = iphoneos;
322322
TARGETED_DEVICE_FAMILY = "1,2";

admob/integration_test/src/integration_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ TEST_F(FirebaseAdMobTest, TestRewardedVideoAd) {
502502
// Test runs & compiles for phones only.
503503

504504
struct ThreadArgs {
505-
firebase::admob::BannerView* banner;
506-
sem_t* semaphore;
505+
firebase::admob::BannerView* banner;
506+
sem_t* semaphore;
507507
};
508508

509509
static void* DeleteBannerViewOnSignal(void* args) {

admob/src/android/ad_request_converter.cc

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17+
#include "admob/src/android/ad_request_converter.h"
18+
1719
#include <assert.h>
1820
#include <jni.h>
1921

2022
#include <cstdarg>
2123
#include <cstddef>
2224

2325
#include "admob/admob_resources.h"
24-
#include "admob/src/android/ad_request_converter.h"
2526
#include "admob/src/android/admob_android.h"
2627
#include "admob/src/common/admob_common.h"
2728
#include "admob/src/include/firebase/admob.h"
@@ -35,7 +36,8 @@ namespace admob {
3536
static const char* kAdMobAdapterClassName =
3637
"com/google/ads/mediation/admob/AdMobAdapter";
3738

38-
METHOD_LOOKUP_DEFINITION(ad_request_builder, PROGUARD_KEEP_CLASS
39+
METHOD_LOOKUP_DEFINITION(ad_request_builder,
40+
PROGUARD_KEEP_CLASS
3941
"com/google/android/gms/ads/AdRequest$Builder",
4042
ADREQUESTBUILDER_METHODS);
4143

@@ -54,18 +56,20 @@ AdRequestConverter::AdRequestConverter(AdRequest request) {
5456

5557
builder = util::ContinueBuilder(
5658
env, builder,
57-
env->CallObjectMethod(builder, ad_request_builder::GetMethodId(
58-
ad_request_builder::kSetGender),
59-
static_cast<int>(request.gender)));
59+
env->CallObjectMethod(
60+
builder,
61+
ad_request_builder::GetMethodId(ad_request_builder::kSetGender),
62+
static_cast<int>(request.gender)));
6063

6164
// Child-drected treatment.
6265
if (request.tagged_for_child_directed_treatment !=
6366
kChildDirectedTreatmentStateUnknown) {
6467
builder = util::ContinueBuilder(
6568
env, builder,
6669
env->CallObjectMethod(
67-
builder, ad_request_builder::GetMethodId(
68-
ad_request_builder::kTagForChildDirectedTreatment),
70+
builder,
71+
ad_request_builder::GetMethodId(
72+
ad_request_builder::kTagForChildDirectedTreatment),
6973
(request.tagged_for_child_directed_treatment ==
7074
kChildDirectedTreatmentStateTagged)));
7175
}
@@ -75,9 +79,10 @@ AdRequestConverter::AdRequestConverter(AdRequest request) {
7579
jstring test_device_str = env->NewStringUTF(request.test_device_ids[i]);
7680
builder = util::ContinueBuilder(
7781
env, builder,
78-
env->CallObjectMethod(builder, ad_request_builder::GetMethodId(
79-
ad_request_builder::kAddTestDevice),
80-
test_device_str));
82+
env->CallObjectMethod(
83+
builder,
84+
ad_request_builder::GetMethodId(ad_request_builder::kAddTestDevice),
85+
test_device_str));
8186
env->DeleteLocalRef(test_device_str);
8287
}
8388

@@ -86,9 +91,10 @@ AdRequestConverter::AdRequestConverter(AdRequest request) {
8691
jstring keyword_str = env->NewStringUTF(request.keywords[i]);
8792
builder = util::ContinueBuilder(
8893
env, builder,
89-
env->CallObjectMethod(builder, ad_request_builder::GetMethodId(
90-
ad_request_builder::kAddKeyword),
91-
keyword_str));
94+
env->CallObjectMethod(
95+
builder,
96+
ad_request_builder::GetMethodId(ad_request_builder::kAddKeyword),
97+
keyword_str));
9298
env->DeleteLocalRef(keyword_str);
9399
}
94100

@@ -109,9 +115,10 @@ AdRequestConverter::AdRequestConverter(AdRequest request) {
109115
if (date_ref != nullptr) {
110116
builder = util::ContinueBuilder(
111117
env, builder,
112-
env->CallObjectMethod(builder, ad_request_builder::GetMethodId(
113-
ad_request_builder::kSetBirthday),
114-
date_ref));
118+
env->CallObjectMethod(
119+
builder,
120+
ad_request_builder::GetMethodId(ad_request_builder::kSetBirthday),
121+
date_ref));
115122
} else {
116123
LogWarning(
117124
"Skipping invalid AdRequest birthday fields (Y: %d, M: %d, D: %d).",
@@ -164,9 +171,10 @@ AdRequestConverter::AdRequestConverter(AdRequest request) {
164171
env->NewStringUTF(firebase::admob::GetRequestAgentString());
165172
builder = util::ContinueBuilder(
166173
env, builder,
167-
env->CallObjectMethod(builder, ad_request_builder::GetMethodId(
168-
ad_request_builder::kSetRequestAgent),
169-
agent_str));
174+
env->CallObjectMethod(
175+
builder,
176+
ad_request_builder::GetMethodId(ad_request_builder::kSetRequestAgent),
177+
agent_str));
170178
env->DeleteLocalRef(agent_str);
171179

172180
// Build request and load ad.

admob/src/android/banner_view_internal_android.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ BannerViewInternalAndroid::BannerViewInternalAndroid(BannerView* base)
5858
env->DeleteLocalRef(helper_ref);
5959
}
6060

61-
62-
void DestroyOnDeleteCallback(const Future<void>& result,
63-
void* sem_data) {
61+
void DestroyOnDeleteCallback(const Future<void>& result, void* sem_data) {
6462
if (sem_data != nullptr) {
65-
Semaphore* semaphore = static_cast<Semaphore*>(sem_data);
63+
Semaphore* semaphore = static_cast<Semaphore*>(sem_data);
6664
semaphore->Post();
6765
}
6866
}

0 commit comments

Comments
 (0)