-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Hotfix for Android 12 support #1337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-v11.2.0
Are you sure you want to change the base?
Conversation
…-switch"" Summary: This is revert of the back out Original commit changeset: 8d26e984bdb1 Original Phabricator Diff: D33556637 (facebook@e91f090) Reviewed By: ppansy Differential Revision: D33828209 fbshipit-source-id: 898e4152b490367235468846606f96e181aa2845
Summary: Fix the following two problems: 1. If there is an exception, it should default back to PLAIN method, with original `code verifier` as the code challenge 2. Remove redundant `response_type` setting Reviewed By: ppansy Differential Revision: D33784682 fbshipit-source-id: b13e727fc571d4e56fd0dccb68780da89d7d3b90
Summary: As title. By executing `processCodeExchange` on side threads to avoid network IO on main thread exception without introducing timeout/lock or any other waiting on the main thread. If the `processCodeExchange` cannot return in a short time, the app will keep waiting as if the login procedure is not complete and the spinner in LoginFragment will also keep rotating. Reviewed By: alsun2001 Differential Revision: D33851822 fbshipit-source-id: 23c176545377ed29a0213a739920f8de84addc80
Summary: Refactored code so that I could completely remove Assert in favor of `assertThat` Reviewed By: panavenue Differential Revision: D33945622 fbshipit-source-id: 224d873e017e622f0831665d71c498cf72fe0369
Summary: As title. Some members become public for allowing testing and overriding. Reviewed By: xiaohaiguicc Differential Revision: D33796322 fbshipit-source-id: 90fc7817b378ed1503cb2624be18e93cb8c06e2e
Summary: As title. `validRedirectURI` may be initialized to empty string if the login handler is destroyed. We need to set it when the handler is reloaded from parcel. Reviewed By: panavenue Differential Revision: D33949036 fbshipit-source-id: add672dc20419875df572b9119acf10a36d77860
Summary: ^ Reviewed By: linmx0130 Differential Revision: D33965931 fbshipit-source-id: ff0cef14ec2d7138ddc6879a7bf9adb8c008e08e
Summary: As title. The backfilled unit tests are about native/service intent creation. Reviewed By: jawwad Differential Revision: D33958844 fbshipit-source-id: 1d284e6048f50a3258e3dda403e8fc0a756c61be
Summary: This method was used to create the service token for refreshing access token. Now the token refreshing is done by a graph API request so we don't need it. Reviewed By: ppansy Differential Revision: D33959841 fbshipit-source-id: 61aaaace96e2a691b6de62b0d3e60a52d7c234c8
Summary: By using `appEventCollection.addPersistedEvents` as a proxy to verify whether the events are flush to avoid static mock of AppEventQueue to make unit tests robust and accurate. Reviewed By: jawwad Differential Revision: D34014106 fbshipit-source-id: 681f4d247da98b0403e330de6150854007debd13
Summary: Because PKCE has been delayed to next release. This diff will stop the PKCE feature by forcing implicit flow with TOKEN response type. NOTE: when we are ready to turn on PKCE, just revert this diff. Reviewed By: linmx0130 Differential Revision: D34019708 fbshipit-source-id: e4ad272314001d32fcda319b9f2054a6b334c3d4
…reation Summary: Backfilling unit tests for `NativeProtocol.createPlatformActivityIntent()` and `NativeProtocol.createProtocolResultIntent()`. Reviewed By: jawwad Differential Revision: D34019895 fbshipit-source-id: 67d905b8b970b7fed09f6709df3037e3507111c1
Summary: Backfilled unit tests on receiving cancel result in NativeAppLoginMethodHandler. Also fixed a potential NPE and the duplicated connection failure handling. Reviewed By: jawwad Differential Revision: D33985789 fbshipit-source-id: 2394fac871ed71b4730efafbdc1dd9f96116a414
Summary: Test the code exchange result handling. Reviewed By: jawwad Differential Revision: D33988927 fbshipit-source-id: 2ec4e384c02fdc36a07400831b782cd466ba0548
Reviewed By: jawwad Differential Revision: D34054167 fbshipit-source-id: 6a46d20be7863ec19a7984ca14b83b47760d6c25
Summary: Remove all referrals code given that they're deprecated. Reviewed By: jawwad, ppansy Differential Revision: D34054159 fbshipit-source-id: 1690e89aa1e90d982d20aa0bd0693de7ef744a84
Summary: As title. Reviewed By: jawwad Differential Revision: D34053770 fbshipit-source-id: 9420c78ed3d752628b0620b70fa047bb5bee9ff5
Summary: Backfilled unit tests for `putJSONValueInBundle` and `getBundleLongAsDate`. Also simplify `isNullOrEmpty` and `putCommaSeparatedStringList`. Reviewed By: jawwad Differential Revision: D34053089 fbshipit-source-id: dbbd402f142f833dd34921b549335d929491ba52
Summary: `contentDescription`, `contentTitle` and `imageUrl` of `ShareLinkContent` are deprecated from Graph API in v2.9 and the builder won't set it for many years. Now we can remove them from the codebase. Also back filled the unit test for existing fields. Reviewed By: jawwad Differential Revision: D34056845 fbshipit-source-id: 124e2b277ee8b199121d49ed2f004d0421f9f474
Summary: As title. Reviewed By: jawwad Differential Revision: D34057025 fbshipit-source-id: 14375423549f43c8778056b1885d7afcb62290b8
Summary: It's possible that the sharing succeed but postId is null because the permission is not authorized for obtaining the post ID. Reviewed By: jawwad Differential Revision: D34100238 fbshipit-source-id: f902abe1d3e7fc276d5f81f7f385bccfcb6bab9b
Summary: As title. Also backfilled one more unit test. Reviewed By: jawwad Differential Revision: D33990209 fbshipit-source-id: bb6e27dd93c61dacc44771be0b83060985cf8b0d
Summary: As title. This change will have small impacts on public API: 1. nullability are confirmed 2. have to make all default setters of the fields private and only expose the setters that return login manager instance to minimize API change. Reviewed By: jawwad Differential Revision: D34123191 fbshipit-source-id: a8e59b72a6b57aee61d8b2ae089ab85acda40635
Summary: As title. Also backfilled the unit tests on `getApplicationSignature`. Reviewed By: jawwad Differential Revision: D34152521 fbshipit-source-id: bd04e0185d2c99d46b272fa8d29ce8b877aa3208
Summary: Following Android latest update: Apps with target API level set to 31 (Android 12) or later must declare the normal permission com.google.android.gms.AD_ID as below in the AndroidManifest.xml in order to use this API. We decide to give permission default from FBSDK, developers can declare `<tools:node="remove"/>` to remove the permission Reviewed By: dreamolight Differential Revision: D32027488 fbshipit-source-id: 8252d4d089df1f6b92e8e8913ee9cee5fc335be5
Summary: As title. Reviewed By: jawwad Differential Revision: D34060027 fbshipit-source-id: 055ee43779610a3c27ce1da6f6febba1c3a28f7c
Summary: As title. Reviewed By: jawwad Differential Revision: D34184537 fbshipit-source-id: 7c6699b4a5fe2556add200712b4768abe3980730
Summary: As title. Reviewed By: jawwad Differential Revision: D33797594 fbshipit-source-id: edf370129edf12c1f0e41ab63ec8d99b9c53d143
Summary: As title. Reviewed By: jawwad Differential Revision: D34060754 fbshipit-source-id: 849ce46ef062dde2a541c91cb15f0b13d3691863
Summary: Was originally deprecated in D31701648 (facebook@3f11bf6) (Oct 15, 2021) and the commit mentions that this will be removed in v13 Reviewed By: roim Differential Revision: D34199130 fbshipit-source-id: 55ab94c2d76b8e9f773f2083ae3624fbe5e349a3
Summary: Using `constants.gradle` is an older way of managing dependencies. The recommendation is now to use the kotlin-dsl plugin which allows an reserved `buildSrc` module which is accessible to all other modules. This enables IDE support which is a huge QoL improvement when dealing with dependencies as we no longer have to rely on full text search only. See: https://docs.gradle.org/current/userguide/organizing_gradle_projects.html https://proandroiddev.com/better-dependencies-management-using-buildsrc-kotlin-dsl-eda31cdb81bf https://github.com/antoniolg/Bandhook-Kotlin Reviewed By: linmx0130 Differential Revision: D38715544 fbshipit-source-id: a700cf59ce10c1ff863a88b060b886c1b19e61fa
Summary: Move `jacoco.gradle` and `settings.gradle` to kotlin, and removes constants.gradle as we use `buildSrc` for constants now. Reviewed By: linmx0130 Differential Revision: D38796609 fbshipit-source-id: 7e992588d27359dd0d78ebb6aaff87623970b770
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38831204 fbshipit-source-id: 3e743e4b94b462f5308141f55b8baf705d9a17e9
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38836337 fbshipit-source-id: 84a854e0369d7f42caa88e9024a45887cfa93d24
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38836338 fbshipit-source-id: 96624c828f5377ad5f934bca0fceda040eda3637
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38844222 fbshipit-source-id: 62f5f96c5f09b2c2debe9c6462d365cd4e3883e8
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38866230 fbshipit-source-id: a60a3dfbce2d05f1200ef8540984f11edac9dadb
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38867270 fbshipit-source-id: 426fc3e0c93781e7d8415259863244564173ea7e
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38867979 fbshipit-source-id: 6c28f13105b1aede6cff9634adc6515f1d180695
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38872932 fbshipit-source-id: 3cf8c4c6ff4179989197cae3c630aa37b9d1c150
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38873150 fbshipit-source-id: f2155d9fd715332677e1f4e0c4c459a2b24dfb7e
Summary: Migrate gradle scripts to kotlin for IDE support. Reviewed By: linmx0130 Differential Revision: D38873369 fbshipit-source-id: 16197b086120b9aeec410974f803d89a45a73a05
Summary: Chronos Job Instance ID: 1125907497044814 Sandcastle Job Instance ID: 18014399266449106 allow-large-files ignore-conflict-markers opt-out-review Differential Revision: D38925205 fbshipit-source-id: 8ce4f917d45ff2601bb90242c3559aa7d8f039d3
Summary: Mistakenly removed some sourceSets in the previous diffs in the stack. which makes it so that Android Studio no longer marks the `src/test/kotlin` files are test source files. Re-add the sources to have IDE support. Reviewed By: joesus Differential Revision: D38909312 fbshipit-source-id: bac4ac60519b9f25efceadc0aa4db98e770bac24
Summary: Running `./gradlew build` on modules that use jacoco also generates a `jacoco.exec` file that we don't want to check in to git. Reviewed By: joesus Differential Revision: D38979512 fbshipit-source-id: 1e5f85ba73961234aba45696771c1520e2cfc56e
Summary: Hackbook apk failing on launch because of missing jacoco.exec. Jacoco is pulled in by gaming-services, so we can apply the below fix in that module. See: jacoco/jacoco#968 Reviewed By: joesus Differential Revision: D38993822 fbshipit-source-id: 2fb7e7d3a08bd1088ad4a5fe6454bff5beb7d813
Summary: `testCoverageEnabled = true` was in the release build type, which causes jacoco to init when running the release apk. We previously put `output=none` in `jacoco-agent.properties` under `src/debug/resources` which corresponds to the debug build. See for more details: jacoco/jacoco#968 (comment) Reviewed By: joesus Differential Revision: D39027728 fbshipit-source-id: 66d9543e48435d1efe36a97b7a01675aea0a5470
…uncher Summary: When upgrading to AndroidX Activity/Fragment 1.5.1, if FB4A is not installed then the backup CCT flow will break. The following video is HB4A using Android Acitivty/Fragment 1.5.1 and reproducing the CCT problem. Note that nothing can be clicked on after the login flow is complete. Then clicking the back button says no permissions were granted. https://pxl.cl/2bHRd The root cause of the issue is that there were internal changes for the 1.5.1 update and using startActivityForResult does not trigger onActivityResult correctly. This seems to only happen when you try to start an activity when it doesn't exist. In NativeAppLoginMethodHandler, we can't tell if FB4A is installed so we just attempt to start the activity and catch the ActivityNotFoundException if it does not start. If the native flow cannot be attempted, then we fallback to CCT flow. For some reason, after failing to start the FB4A intent, the LoginFragment does not correctly trigger the onActivityResult function when the backup CCT flow completes. The error also seems to occur if you click cancel on the CCT flow. This diff updates the LoginFragment to have a new ActivityLauncher member and updates NativeAppLoginMethodHandler to use the launcher to launch the FB4A intent. We also now query for the intent instead of try/catch the start attempt. It seems this is the primary issue. In 1.4.0 and below, if an activity cannot be started, it will still trigger the on result flow. In 1.5.0 and above, if an activity cannot be started, it will not trigger the on result flow. Reviewed By: ct2mak Differential Revision: D38929817 fbshipit-source-id: b985157050e1b9c68627c97055cd93d83f3c3752
Summary: Bump version for patch Reviewed By: joesus Differential Revision: D39112460 fbshipit-source-id: 22fbbba4c776fa4122845a31daa64fc0b1e86adc
Summary: Chronos Job Instance ID: 1125907514300346 Sandcastle Job Instance ID: 36028797782392272 allow-large-files ignore-conflict-markers opt-out-review Differential Revision: D39233396 fbshipit-source-id: 24949508d8de50d48ee1f046282ce0b000eaa127
Summary: D38673457 (facebook@66df49e) updated the mockito-kotlin version being used frrom 2.2.0 to 2.2.11 and includes a package rename. We cherry-picked some commits that were reverted for the git migration which refactored the way we manage dependencies so the change was missed. Reviewed By: joesus Differential Revision: D39284217 fbshipit-source-id: cf9095e6ded73230c257211fca9e7f0c4d67ea15
Summary: Adds ci job for unit tests Reviewed By: mingcaozhang Differential Revision: D38209845 fbshipit-source-id: 657ee495d73e8beeee91421c3e0cf669c4b1c6d6
Summary: $title Reviewed By: joesus Differential Revision: D39625406 fbshipit-source-id: 5501a7605749084296da612dc766f26ddba3ba4d
Summary: Bug reported on github facebook#1114. This is a common issue with the Android 12 rollout, notably `androidx.test:core` defines test activities with intent-filters without specifying an explicit `android:exported` value. Version `1.4.0` fixes this issue. Reviewed By: jawwad Differential Revision: D39930204 fbshipit-source-id: b84070e1a867e91568b1e6032ecfde0bd72205b1
Hi @zaid007320! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/
Summary:
Bug reported on github #1114.
This is a common issue with the Android 12 rollout, notably
androidx.test:core
defines test activities with intent-filters without specifying an explicitandroid:exported
value. Version1.4.0
fixes this issue.Reviewed By: jawwad
Differential Revision: D39930204
fbshipit-source-id: b84070e1a867e91568b1e6032ecfde0bd72205b1
Thanks for proposing a pull request!
To help us review the request, please complete the following:
bug
for bug fixes)Pull Request Details
Describe what you accomplished in this pull request (for example, what happens before the change, and after the change)
Test Plan
Test Plan: Add your test plan here