Commit Graph

272 Commits

Author SHA1 Message Date
Torsten Grote b9b1ef6246 Detect missing heartbeat ACKs and broken connections faster
Waiting twice the heartbeat interval since the last ACK can make us miss dead connections for more than 10min in which no push messages get received.

This change requires the ACK to come within 90 seconds of sending the heartbeat ping, otherwise the connection is considered dead which will trigger a re-connect.

We use a high timeout of 90 seconds, because in some mobile networks (like in trains) ping times of more than 60 seconds have been observed in practice.

Change-Id: I8e63843400b47e1a6d23faf180f9446bcb5e0cd8
2022-01-25 12:37:08 +01:00
Torsten Grote 2ba2c04cc0 Don't say we are connected when push is disabled for current network
This may cause a connection attempt, but in connect(), we'll notice that it is disabled and won't continue to connect.

Change-Id: Id5f00539a48fad16b5e5f55bd336fb8890aa1acc
2022-01-25 12:37:08 +01:00
Torsten Grote bb68674cae Initiate connection teardown only once
Otherwise, this gets called multiple times from different places via MSG_TEARDOWN. This causes the reconnect delay to increase with each call to scheduleReconnect(), increasing the time we stay disconnected.

This commit introduces a boolean flag preventing handleTeardown() to run twice or more until connect() was called again.

Change-Id: I3d7cb08d696be48532a61819fbb279a908919a3d
2022-01-25 12:37:08 +01:00
Marvin W 7969aa817b
Fix Lint issues 2022-01-24 19:51:54 +01:00
Marvin W 552aaf856d
Update stub services 2022-01-24 17:47:34 +01:00
Marvin W 854f879da4
Update checkin service API 2022-01-24 17:47:34 +01:00
Marvin W fd8ce71a83
Add initial UI for new features 2022-01-24 17:47:34 +01:00
Marvin W 56b8bc9f65
Update DroidGuard + SafetyNet 2022-01-18 18:42:23 +01:00
Marvin W a7b2b7e3f8
Add profile manager 2022-01-14 10:39:10 +01:00
Marvin W 6d45bfb7ed
Add DroidGuard support 2022-01-14 10:39:09 +01:00
Marvin W a7eb9a2732
Update firebase dynamic links API 2022-01-14 10:39:09 +01:00
Torsten Grote 00a06d4b94 Don't reconnect to gcm when opening settings
This doesn't treat the underlying issues and can make debugging harder if we suddenly auto-connect due to this.

Change-Id: I9c04c78e8ebda8472b0cd8c7b0b0deb2e2300139
2021-11-03 13:02:51 +01:00
Torsten Grote 14d666a163 Do a check-in if we are not actually checked in, but should be, e.g. cleared app data
Change-Id: If800339fa35644d8783203fbd511128457d6d101
2021-11-03 13:02:51 +01:00
Torsten Grote f806e1bcdb When check-in fails due to missing internet access, try again as soon as access is restored 2021-11-03 13:02:51 +01:00
Torsten Grote 1367649a18 Lower heartbeat interval when we find the connection reset when wanting to send a message 2021-11-03 13:02:51 +01:00
Marvin W e90ce370d4
Don't log callbacks of Google Sign-In page to logcat
Google seems to include sensitive account details in some of these fields.
Fixes #1567
2021-10-06 11:51:04 +02:00
Marvin W 60d26b80eb
Clearcut: Get rid of log spam due to missing fields in tracking function 2021-08-20 10:28:03 +02:00
Marvin W db6fd73736
Add Cronet to About screen 2021-07-01 21:20:20 +02:00
Torsten Grote aa3a2d65cd Refactor settings access to use a SettingsProvider
to enable safe usage of settings no matter which process is getting/setting them.
Previously, different processes were accessing settings in an unsafe way and the warn methods were throwing Runtime exceptions which went largely unnoticed, but happened, especially on a fresh start of the OS.

Change-Id: Ie4134e7be2a7ca4a373790f45fbcbd09bf02ad86
2021-06-27 22:39:15 +02:00
Marvin W 602a34ff4b
TapAndPay: Add Dummy 2021-06-27 20:18:40 +02:00
Marvin W a746e79b91
Auth: Update API implementation 2021-05-15 14:45:50 +02:00
Marvin W 1a809e0e47
SafetyNet updates
- Add more API details
- preliminary support for SafetyNet reCAPTCHA
- prepare for improved DroidGuard handling
2021-05-05 23:35:27 +02:00
Marvin W 91b0f6893f
GCM: Fix confirm dialog in dark theme 2021-03-18 01:20:40 +01:00
Marvin W 5eb04b44db
Fix typo 2021-03-18 01:20:39 +01:00
Marvin W c9e09e9714
Use Cursor.getColumnIndexOrThrow() 2021-03-17 19:38:34 +01:00
Marvin W ecfe3da3f7
Wakeful receivers only handle non-null intents 2021-03-09 22:21:25 +01:00
Marvin W baf890cf18
Bump version 2021-01-12 14:27:36 +01:00
Marvin W af0aa2288a
Auth: Log and handle invalid package names 2021-01-06 12:13:20 +01:00
Marvin W 68a16af53b
Change background service notification
Fixes #1324
2020-12-21 21:46:03 +01:00
Marvin W c648883128
UI: Move advanced GCM configuration get/set off ui process 2020-12-20 19:29:51 +01:00
Marvin W f0337b5dcd
Move EN and GCM service in persistent subprocess
This increases stability/durability of these services in case of crashes
2020-12-20 19:29:50 +01:00
Marvin W 3db548187d
Workaround for Android 8.0 NotificationChannel bug
Fixes #1312
2020-12-14 10:04:39 +01:00
Marvin W eaef4bc151
Auth: Do not try to get token for non-existing accounts 2020-12-05 10:03:22 +01:00
Marvin W c0324710f3
Return empty list of accounts when receiving weird requests
This is an attempt to fix #1052
2020-12-01 18:30:07 +01:00
Marvin W 9ef9f29940
Wallet: Add dummy for isReadyToPay() API 2020-11-19 16:53:50 +01:00
Marvin W a95f6449f5
GCM: Fix apps not always whitelisted from powersave
Fixes #1188
2020-10-18 10:20:41 +02:00
Marvin W ebbf78a876
Bump version to 20.39.15 2020-10-17 23:49:58 +02:00
Marvin W 26f2e859b8
Ensure checkin before gcm registration, fix gcm permission requests 2020-10-15 22:08:05 +02:00
Marvin W e20a6c3a3c
Checkin: Ensure we recheckin regularly 2020-10-14 10:57:55 +02:00
Marvin W 0ee18ae6f7
Add new permission requirements for Firebase Auth to Self-Check 2020-10-12 21:29:49 +02:00
Marvin W c3bfb63f27
Add initial support for Firebase Auth 2020-10-12 21:29:36 +02:00
Marvin W d0668d3c83
Make nearby module optional, move UI bits in own module 2020-10-09 15:19:43 +02:00
Marvin W 04c955e998
Self-Check: Add missing permission check, allow to grant FakeStore spoofing perm
Fixes #1178
2020-09-27 11:40:46 +02:00
Marvin W a2afbe07fd
Only apply preferences when they actually changed 2020-09-13 02:14:32 +02:00
Marvin W 6ec8332b1e
GCM: Ensure we have a context for preferences 2020-09-09 00:49:05 +02:00
Marvin W d641ca7e7e
Fix UI mismatching actual configuration due to multiprocess 2020-09-03 00:50:39 +02:00
Marvin W 60cc63ed60
GCM: Add support for message acking, deliver to all receivers of package when working permissionless 2020-08-22 23:43:14 +02:00
Marvin W 0388917350
Add more stubs for measurement API 2020-08-11 22:33:30 +02:00
Marvin W 2076970d40
Disable fragment transitions when system transitions/animations are disabled
Fixes #1119
2020-08-05 15:49:22 +02:00
Alexandru Chircu 312d2a1930
Actually instantiate objects so that we don't pass `null`. Fixes #1120 (#1121) 2020-08-04 17:24:02 +02:00