Commit Graph

263 Commits

Author SHA1 Message Date
ben temple
97f9873fe1 Make NetworkChangedManager verify internet against different hosts
Summary:
For some reason some wifis appear to have issues contacting `https://example.com/`
In logs provided by Stephen, it is clear in the logs that it is failing to contact this host, and even in a web browser he was unable to open `https://example.com` which is extremely unexpected.
This changes updates the network manager to include two other hosts as options to validate internet connectivity against:
     "https://google.com/"
     "https://www.samsung.com/"

I included samsung in-case google was blocked such as in a region like China.
The verification of the internet will check all 3 domains before determining that network connectivity is down.
If one domain fails (such as example.com) but the next succeeds, because of how the indexing is performed the next time the internet is validated the previously used host that was successfully validated against will be used first in its check.

Test-plan:
I performed multiple network checks and saw no anomolies:
1. I turned the wifi off and then back on
2. I turned the wifi on, and then back off as soon as it connected to force a validation failure
     - Verified in the logs that it attempted to contact all 3 hosts
In all my testing the network connectivity was correctly identified as I would expect and while connected I was able to use the app.

As a final test, I gave Stephen Leicht an APK with these changes to verify that he was no longer experiencing what he reported in FORT-271049.
He saw no issues when using the app and it functioned as expected

[REVIEW] chris.babcock, mor.sela, zhaolong.zhong


#ROBOMERGE-SOURCE: CL 12237831 via CL 12237839 via CL 12237841 via CL 12245951
#ROBOMERGE-BOT: (v668-12245121)

[CL 12246023 by ben temple in Main branch]
2020-03-18 10:39:21 -04:00
ben temple
d81ce55668 Catch exception that can occur when attempting to clear keyboard focus after having used autocomplete
Importing changes applied to 12.10 here: https://p4-swarm.epicgames.net/reviews/12121724/

Test Plan:
Launched app and game without fix
Verified that after typing in text, using auto complete, and dismissing the keyboard the game did crash

Launched app and game with fix
Verified that after typing in text, using auto complete, and dismissing the keyboard the game did not crash

This was tested and verified by QA in 12.10. See this review: https://p4-swarm.epicgames.net/reviews/12121724/ and the referenced jira task.



#ROBOMERGE-SOURCE: CL 12140768 via CL 12140800 via CL 12140828
#ROBOMERGE-BOT: (v659-12123632)

[CL 12140854 by ben temple in Main branch]
2020-03-11 17:21:22 -04:00
wei liu
662fa07f5a Fix an android input issue with floating keyboard
#jira none

#rb mi.wang

#ROBOMERGE-SOURCE: CL 12124819 in //UE4/Release-4.25/... via CL 12124822
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v659-12123632)

[CL 12124826 by wei liu in Main branch]
2020-03-11 09:23:38 -04:00
jack porter
9a7c32c36b Unblocking Robomerge for "Add gameActivityForceQuitAdditions to allow android plugins to be notified when an application requests to quit."
#rb chris.babcock
#rnx
#fyi Allan.Bentham

#ROBOMERGE-OWNER: jack.porter
#ROBOMERGE-AUTHOR: allan.bentham
#ROBOMERGE-SOURCE: CL 12000213 via CL 12000756 via CL 12002284 via CL 12005787
#ROBOMERGE-BOT: (v656-11643781)

[CL 12048213 by jack porter in Main branch]
2020-03-07 05:52:12 -05:00
allan bentham
b457410244 Add option for android crash context to not write log when storing crashinfo.
Add gameActivityOnRestartApplicationAdditions to allow plugins to get notice of app restart requests.
#rb chris.babcock
#rnx


#ROBOMERGE-OWNER: allan.bentham
#ROBOMERGE-AUTHOR: allan.bentham
#ROBOMERGE-SOURCE: CL 11894983 via CL 11894984 via CL 11894986
#ROBOMERGE-BOT: (v656-11643781)

[CL 11895006 by allan bentham in Main branch]
2020-03-04 06:55:54 -05:00
wei liu
ac8745dea8 Try to fix an android input issue with floating keyboard.
#jira UE-89450

#rb chris.babcock, jack.porter, mi.wang, yuntian.chai

#ROBOMERGE-SOURCE: CL 11850513 in //UE4/Release-4.25/... via CL 11850514
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11850704 by wei liu in Main branch]
2020-03-02 21:52:16 -05:00
chris babcock
ac028e9438 Disable autofill manager in GameActivity to prevent Android 10 crash
#android
[REVIEW]
#rb none


#ROBOMERGE-SOURCE: CL 11642140 via CL 11642332 via CL 11642349 via CL 11642365
#ROBOMERGE-BOT: (v656-11643781)

[CL 11834211 by chris babcock in Main branch]
2020-03-02 13:11:01 -05:00
chris babcock
6df461dc0d Provide more control over OBB selection
#jira UE-89810
#ue4
#android
#rb Brandon.Schaefer

#ROBOMERGE-SOURCE: CL 11792686 in //UE4/Release-4.25/... via CL 11792867
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11792949 by chris babcock in Main branch]
2020-02-28 20:20:36 -05:00
chris babcock
c0d1cde0b0 Update Android toolchain to NDK 21 (20 also supported for x86_64)
#jira UE-80046
#ue4
#android
#rb Bradon.Schaefer


#ROBOMERGE-SOURCE: CL 11554677 in //UE4/Release-4.25/... via CL 11554724
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11578268 by chris babcock in Main branch]
2020-02-21 15:06:37 -05:00
ben temple
d249fb877e Update NetworkChangedManager to provide connection transport type
The networkChangedManager is the best place to know what kind of connection type we have. This updates the engine and both related projects (web and native) to support receiving this information in the onNetworkAvailable callback.
The callback will be called each time the transport type changes.

Test-plan:
Built native and web versions of app here:
Native:
https://ec-01.epicgames.net/commander/link/jobDetails/jobs/10035906?
Web:
https://ec-01.epicgames.net/commander/link/jobDetails/jobs/10035907?
Launched both versions of the app
Verified that turning off wifi and back on triggered no connection alert
Verified that switching between wifi and cellular back triggered calls to the onNetworkAvailable as expected

#reviewers chris.babcock, zhao.zhong


#ROBOMERGE-OWNER: ben.temple
#ROBOMERGE-AUTHOR: ben.temple
#ROBOMERGE-SOURCE: CL 11560308 via CL 11560328 via CL 11560331
#ROBOMERGE-BOT: (v654-11333218)

[CL 11560333 by ben temple in Main branch]
2020-02-19 23:27:34 -05:00
chris babcock
a963357022 Add FAndroidMisc::IsSupportedAndroidDevice()
#android
[FYI] Wes.Hunt
#rb Wes.Hunt



#ROBOMERGE-SOURCE: CL 11258490 via CL 11258499 via CL 11258503
#ROBOMERGE-BOT: (v647-11244347)

[CL 11258949 by chris babcock in Main branch]
2020-02-05 14:42:51 -05:00
Billy McCarroll
15d5ea2dd5 Add new features from Google Play Billing API
Create Blueprint Nodes for StoreV2
Modify Match3 to use SToreV2 blueprint nodes

#review-11072654 @eric.newman

#rb eric.newman

[CL 11183040 by Billy McCarroll in Main branch]
2020-01-30 14:21:24 -05:00
chris babcock
6b74e750a6 Add bDeviceSupported to GameActivity for configrules to modfy
#ue4
#android
[at]Allan.Bentham
#rb Allan.Bentham



#ROBOMERGE-SOURCE: CL 11136559 via CL 11136567 via CL 11136570
#ROBOMERGE-BOT: (v640-11091645)

[CL 11136574 by chris babcock in Main branch]
2020-01-28 16:29:45 -05:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
Ryan Durand
28d3d740dd (Integrating from Dev-EngineMerge to Main)
Second batch of remaining Engine copyright updates.

#rnx
#rb none
#jira none

[CL 10871196 by Ryan Durand in Main branch]
2019-12-27 07:44:07 -05:00
Marc Audy
0ea8c363bf Added ability to check OS level notification status on Android.
#author Casey.Spencer
#rb Chris.Babcock
#rnx

[CL 10795670 by Marc Audy in Main branch]
2019-12-18 10:25:26 -05:00
ben temple
28c5c1f5f2 Update engine network check URL to use HTTPS
#Summary
When targeting Android 28, the network check URL should be https by default otherwise the plain-text traffic will be blocked by Android by default.
Switching to HTTPS fixes this issue.

This is the same change made by [at]chris.babcock here: https://p4-swarm.epicgames.net/changes/10609931

#Test Plan
Compiled fortnite locally with: ./RunUAT.sh BuildCookFort -configuration=Development -Platform=Android -kairos-flavor -skipcook -skipserver
Verified that the output properly generated a network file that could properly determine internet connectivity
This is a necessary change for https://p4-swarm.epicgames.net/reviews/10747632 since in this I remove the network code and rely directly on the network code generated by the engine

#android


#ROBOMERGE-SOURCE: CL 10756945 via CL 10756957 via CL 10756961 via CL 10756964 via CL 10756970
#ROBOMERGE-BOT: (v610-10636431)

[CL 10756976 by ben temple in Main branch]
2019-12-16 19:41:24 -05:00
irene yu
714341011a Fix the compiling error: "error: ';' expected"
#jira UE-85609
#android
[REVIEW] [at]zhao.zhong [at]ben.temple


#ROBOMERGE-SOURCE: CL 10637164 via CL 10637514 via CL 10637584
#ROBOMERGE-BOT: (v609-10634694)

[CL 10637657 by irene yu in Main branch]
2019-12-10 13:20:48 -05:00
irene yu
6922ab4017 Exposed a checkConnectivity method in NetworkConnectivityClient to let the Android native app use.
# Summary
It won't affect other parts of the app.
Then users can manually check the connectivity by clicking RETRY button from the Connection Error UI.

To trigger the connectivity checking immediately and to make sure this is only one-time connectivity checking, we call `checkNetworkConnectivity` directly to avoid to affect the scheduled auto-retry and avoid to change the current retry count. And if a check is already in progress (either triggered manually or scheduled), a new check won't be triggered.

#android
[REVIEW] [at]zhao.zhong [at]ben.temple


#ROBOMERGE-SOURCE: CL 10623197 via CL 10623226 via CL 10623249
#ROBOMERGE-BOT: (v608-10590470)

[CL 10623260 by irene yu in Main branch]
2019-12-09 16:40:03 -05:00
chris babcock
7491e3d074 Fix issue with attempting to aquire WRITE_EXTERNAL_STORAGE when we already have it on non-shipping builds
#jira UE-82384
#ue4
#android
[FYI] Jack.Porter
#rb Brandon.Schaefer

#lockdown Cristina.Riveron

#ROBOMERGE-SOURCE: CL 10435757 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v594-10333955)

[CL 10435760 by chris babcock in Main branch]
2019-11-25 18:57:40 -05:00
chris babcock
5273a9dbba Add another check for 64-bit ABI support
#android
#rb trivial



#ROBOMERGE-SOURCE: CL 10362041 via CL 10362903 via CL 10362936
#ROBOMERGE-BOT: (v594-10333955)

[CL 10362955 by chris babcock in Main branch]
2019-11-21 17:36:56 -05:00
don eubanks
57be34a7c5 Fixed an issue with the Android virtual keyboard mangling emoji when using backspace.
[at]chris.babcock, [at]jamie.dale
#tests Compile Development Client Android


#ROBOMERGE-SOURCE: CL 10327728 via CL 10327758 via CL 10327772
#ROBOMERGE-BOT: (v593-10286020)

[CL 10327780 by don eubanks in Main branch]
2019-11-20 17:22:01 -05:00
ben temple
62d4968d91 Fix not handling all exceptions when testing the network connection.
#Summary
Not all the possible exceptions were documented in the google source code, but other exceptions are clearly possible based on the stack trace found here:
https://www.fabric.io/epic-games/android/apps/com.epicgames.fortnite/issues/3bde8d7431602f8e931118dce2d2482a

This changes the code to simply catch all exceptions and treat any exception as a failure to connect to the internet.

#Test-Plan
I can't repro without the specific bluetooth headset, so will send a build to Edouard Dufresne to verify this fixes the issue



#ROBOMERGE-SOURCE: CL 10269972 via CL 10269982 via CL 10269993
#ROBOMERGE-BOT: (v591-10236483)

[CL 10270004 by ben temple in Main branch]
2019-11-15 17:31:45 -05:00
ben temple
8aaf647319 Fix NPE in network capability validation code
#Summary
Remove useless network capability validated code

The crash was caused by failing to check for null in responses from calls to some system methods.
In general this code doesn't help much since this specific check was added prior to adding the more thorough HEAD request to example.com.
By removing it, it should fix the null issue, and in-fact make the naive internet check more in-line with what's expected which is a very simple network check.
This naive check always followed by attempting to connect to example.com which provides a far more guaranteed check into whether the internet is in-fact connected.

#Test Plan
Connected bluetooth headset
Launched app
launched game
Disconnected bluetooth
Verified no crash



#ROBOMERGE-SOURCE: CL 10155147 via CL 10155334 via CL 10155443
#ROBOMERGE-BOT: (v587-10111126)

[CL 10155612 by ben temple in Main branch]
2019-11-13 14:54:20 -05:00
ben temple
40228b81ae Fix not declaring variable accessed by an inner class as final
# Summary
See title, variable needed to be declared as final.




#ROBOMERGE-SOURCE: CL 10084496 via CL 10084499 via CL 10084505 via CL 10084508
#ROBOMERGE-BOT: (v574-10069753)

[CL 10087046 by ben temple in Main branch]
2019-11-08 15:36:50 -05:00