diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml deleted file mode 100644 index 1913b6f..0000000 --- a/.github/workflows/debug.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Debug APK Builder - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: JDK 8 Setup - uses: actions/setup-java@v1 - with: - java-version: 11.0.8 - - - name: Install NDK - run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.0.6113669" - - - name: Grant rights - run: chmod +x ./gradlew - - - name: Build project - run: ./gradlew build - - - name: Build APK - run: ./gradlew assembleDebug - - - name: Upload to Artifacts - uses: actions/upload-artifact@v2 - with: - name: 'MicroG' - path: play-services-core/build/outputs/apk/debug/play-services-core-debug.apk \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ec5fff5..0000000 --- a/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -*.iml -gen/ -bin/ -build/ -.gradle/ -.idea/ -user.gradle -local.properties -.directory -play-services-core/release - -.settings -.classpath -.project \ No newline at end of file diff --git a/.gitlab/.gitkeep b/.gitlab/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.gitlab/issue_templates/.gitkeep b/.gitlab/issue_templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.gitlab/issue_templates/bug_report.md b/.gitlab/issue_templates/bug_report.md new file mode 100644 index 0000000..4db4375 --- /dev/null +++ b/.gitlab/issue_templates/bug_report.md @@ -0,0 +1,44 @@ +PLEASE FILL OUT THIS FORM, DO NOT CREATE ISSUE WITHOUT THIS FORM, OTHERWISE, ISSUE WILL CLOSE WITHOUT ANY NOTICE + +Make sure that bug only exists on Vanced+ app and NOT in original YouTube app with the same base version of Vanced+ !!!!! + +Environment +=========== +Platform: Android + +Android Version: + +YouTube Vanced+ Version: + +Vanced+ MicroG version : + +Device name : + +Description +=========== + + + +Steps to reproduce +================== +1. +2. +3. +4. + + +Expected result +=============== + + +Actual result +============= + + +Screenshots / Videos / Logs +=========================== + + +Notes +===== + diff --git a/.gitlab/issue_templates/bug_report_root.md b/.gitlab/issue_templates/bug_report_root.md new file mode 100644 index 0000000..3b46c9d --- /dev/null +++ b/.gitlab/issue_templates/bug_report_root.md @@ -0,0 +1,48 @@ + + +PLEASE FILL OUT THIS FORM, DO NOT CREATE ISSUE WITHOUT THIS FORM, OTHERWISE, ISSUE WILL CLOSE WITHOUT ANY NOTICE !!! + +Make sure that bug only exists in Vanced+ app and NOT in original YouTube app with the same version of Vanced+ !!! + +Environment +=========== +Platform: Android + +Android Version: + +YouTube Vanced+ Version: + +Google Play Services (GMS) version : + +Device name: + +Module Download Link (leave empty if manually builded) : + +Description +=========== + + +Steps to reproduce +================== +1. +2. +3. +4. + + +Expected result +=============== + + +Actual result +============= + + +Screenshots / Videos / Logs +=========================== + + +Notes +===== + + diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 2f7c68b..0000000 --- a/Android.mk +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2015 μg Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := GmsCore -LOCAL_MODULE_TAGS := optional -LOCAL_PACKAGE_NAME := GmsCore - -gmscore_root := $(LOCAL_PATH) -gmscore_dir := play-services-core -gmscore_out := $(TARGET_COMMON_OUT_ROOT)/obj/APPS/$(LOCAL_MODULE)_intermediates -gmscore_build := $(gmscore_dir)/build -gmscore_apk := $(gmscore_build)/outputs/apk/release/play-services-core-release-unsigned.apk - -$(gmscore_root)/$(gmscore_apk): - rm -Rf $(gmscore_root)/$(gmscore_build) - mkdir -p $(ANDROID_BUILD_TOP)/$(gmscore_out) - ln -s $(ANDROID_BUILD_TOP)/$(gmscore_out) $(ANDROID_BUILD_TOP)/$(gmscore_root)/$(gmscore_build) - echo "sdk.dir=$(ANDROID_HOME)" > $(gmscore_root)/local.properties - cd $(gmscore_root) && git submodule update --recursive --init - cd $(gmscore_root)/$(gmscore_dir) && JAVA_TOOL_OPTIONS="$(JAVA_TOOL_OPTIONS) -Dfile.encoding=UTF8" ../gradlew assembleRelease - -LOCAL_CERTIFICATE := platform -LOCAL_SRC_FILES := $(gmscore_apk) -LOCAL_MODULE_CLASS := APPS -LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) - -include $(BUILD_PREBUILT) \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f433b1a..0000000 --- a/LICENSE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt deleted file mode 100644 index 4ed90b9..0000000 --- a/LICENSES/Apache-2.0.txt +++ /dev/null @@ -1,208 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, -AND DISTRIBUTION - - 1. Definitions. - - - -"License" shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. - - - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - - - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. - - - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions -granted by this License. - - - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - - - -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. - - - -"Work" shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that -is included in or attached to the work (an example is provided in the Appendix -below). - - - -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) to the interfaces of, the Work and Derivative Works thereof. - - - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative -Works thereof, that is intentionally submitted to Licensor for inclusion in -the Work by the copyright owner or by an individual or Legal Entity authorized -to submit on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - - - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable copyright license to reproduce, prepare -Derivative Works of, publicly display, publicly perform, sublicense, and distribute -the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer the Work, where such license applies only to those patent claims -licensable by such Contributor that are necessarily infringed by their Contribution(s) -alone or by combination of their Contribution(s) with the Work to which such -Contribution(s) was submitted. If You institute patent litigation against -any entity (including a cross-claim or counterclaim in a lawsuit) alleging -that the Work or a Contribution incorporated within the Work constitutes direct -or contributory patent infringement, then any patent licenses granted to You -under this License for that Work shall terminate as of the date such litigation -is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and -in Source or Object form, provided that You meet the following conditions: - -(a) You must give any other recipients of the Work or Derivative Works a copy -of this License; and - -(b) You must cause any modified files to carry prominent notices stating that -You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as -a whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without -any additional terms or conditions. Notwithstanding the above, nothing herein -shall supersede or modify the terms of any separate license agreement you -may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR -A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness -of using or redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses), even if such Contributor has been advised of the possibility -of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such obligations, -You may act only on Your own behalf and on Your sole responsibility, not on -behalf of any other Contributor, and only if You agree to indemnify, defend, -and hold each Contributor harmless for any liability incurred by, or claims -asserted against, such Contributor by reason of your accepting any such warranty -or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own identifying -information. (Don't include the brackets!) The text should be enclosed in -the appropriate comment syntax for the file format. We also recommend that -a file or class name and description of purpose be included on the same "printed -page" as the copyright notice for easier identification within third-party -archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); - -you may not use this file except in compliance with the License. - -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software - -distributed under the License is distributed on an "AS IS" BASIS, - -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and - -limitations under the License. diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt deleted file mode 100644 index 3f92dfc..0000000 --- a/LICENSES/CC-BY-4.0.txt +++ /dev/null @@ -1,324 +0,0 @@ -Creative Commons Attribution 4.0 International Creative Commons Corporation -("Creative Commons") is not a law firm and does not provide legal services -or legal advice. Distribution of Creative Commons public licenses does not -create a lawyer-client or other relationship. Creative Commons makes its licenses -and related information available on an "as-is" basis. Creative Commons gives -no warranties regarding its licenses, any material licensed under their terms -and conditions, or any related information. Creative Commons disclaims all -liability for damages resulting from their use to the fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. - -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors - -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution -4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. - -Section 1 – Definitions. - -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. - -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. - -c. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -d. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. - -e. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. - -f. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. - -g. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. - -h. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. - -i. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. - -j. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. - -k. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. - -Section 2 – Scope. - - a. License grant. - -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: - - A. reproduce and Share the Licensed Material, in whole or in part; and - - B. produce, reproduce, and Share Adapted Material. - -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. - - 3. Term. The term of this Public License is specified in Section 6(a). - -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. - - 5. Downstream recipients. - -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. - -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. - -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). - - b. Other rights. - -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. - -2. Patent and trademark rights are not licensed under this Public License. - -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. - -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. - - a. Attribution. - -1. If You Share the Licensed Material (including in modified form), You must: - -A. retain the following if it is supplied by the Licensor with the Licensed -Material: - -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of warranties; - -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and - -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. - -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. - -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. - -4. If You Share Adapted Material You produce, the Adapter's License You apply -must not prevent recipients of the Adapted Material from complying with this -Public License. - -Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: - -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database; - -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and - -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. - -Section 5 – Disclaimer of Warranties and Limitation of Liability. - -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. - -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. - -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. - -Section 6 – Term and Termination. - -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. - -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: - -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or - - 2. upon express reinstatement by the Licensor. - -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. - -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. - - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. - -Section 7 – Other Terms and Conditions. - -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. - -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. - -Section 8 – Interpretation. - -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. - -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. - -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. - -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. - -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt deleted file mode 100644 index 0e259d4..0000000 --- a/LICENSES/CC0-1.0.txt +++ /dev/null @@ -1,121 +0,0 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. diff --git a/README.md b/README.md index 33bf3db..92b5206 100644 --- a/README.md +++ b/README.md @@ -1,97 +1,58 @@ -# YouTube Vanced -YouTube Vanced & Vanced MicroG Direct APK Install without Vanced Manager +# YouTube Vanced+ [PlaceHolder] -Credits YouTube Vanced .APK Files : [Vanced Team](https://github.com/TeamVanced) +![GitLab Forks](https://img.shields.io/gitlab/forks/46558790?gitlab_url=https%3A%2F%2Fgitlab.com&style=for-the-badge&logo=gitlab) +![GitLab Stars](https://img.shields.io/gitlab/stars/46558790?gitlab_url=https%3A%2F%2Fgitlab.com&style=for-the-badge&logo=gitlab) -Forks not required, this repo will stay here forever. +This is **PLACEHOLDER** project and currently not download or buildable. No ETAs yet. YOU can try other project like [NewPipe](https://github.com/TeamNewPipe/NewPipe), [LibreTube](https://github.com/libre-tube/LibreTube) or [SmartTube for Android TV](https://github.com/yuliskov/SmartTube). -Statistics of downloads: -[![GitHub Releases](https://img.shields.io/github/downloads/cuynu/ytvanced/latest/total?logo=github)](https://github.com/cuynu/ytvanced) - -[Join our Telegram Unofficial Discussion](https://t.me/cuynuytvanced) -____________________________________________________ - -(Without Vanced MicroG, YouTube Vanced will crash due to missing MicroG, Please install Vanced MicroG below.) - -(Không có Vanced MicroG, YouTube Vanced sẽ không chạy) - -Recent fixes : Fixed Play Protect warning, I'm not inject any Virus or Malware on this APK. - -Architecture : Universal (arm64-v8a-armeabi-v7a-x86) - -Minimum Android version : 6 +**Note** : For now, Vanced+ are **still not published** yet. I know that is **bad things**, no one actually **trust this project exists** at all but that **everything i can say right now**. i'll notify you when **Vanced+ ready on these places** ! -[Download YouTube Vanced 17.03.38 Black](https://github.com/cuynu/ytvanced/releases/download/17.03.38/YouTube_Vanced_17.03.38_Black.apk) + +

+ +

+ + Discord + -[Download YouTube Vanced 17.03.38 Dark](https://github.com/cuynu/ytvanced/releases/download/17.03.38/YouTube_Vanced_v17.03.38_Dark.apk) - -[Download YouTube Music Vanced v4.64.51](https://github.com/cuynu/ytvanced/releases/download/17.03.38/Youtube_Music_v4.64.51.apk) - -[Download Vanced MicroG 0.2.24.220220](https://github.com/cuynu/ytvanced/releases/download/17.03.38/Vanced.microG_0.2.24.220220.apk) - -For Root user, please install Vanced Manager, its still works fine. - -[Download Modifed repo Vanced Manager](https://github.com/KhanhNguyen9872/KhanhNguyen9872_VN/releases/download/v2.6.2/VC_Manager_Lau_KhanhNguyen9872.apk) - -[View MD5 Hash](https://github.com/cuynu/ytvanced/wiki/MD5Hash) - -VirusTotal scan results : - -YouTube_Vanced_v17.03.38_Black.apk : [View on VirusTotal](https://www.virustotal.com/gui/file/262ce8ea6d6eb04be448881aa2e99a627f1ff1b208f882ea6df6707697bfdf0c/summary) +![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/cuynuvanced?style=for-the-badge&logo=reddit&label=Reddit%20r%2Fcuynuvanced&link=https%3A%2F%2Fwww.reddit.com%2Fr%2Fcuynuvanced%2F) -YouTube_Vanced_v17.03.38_Dark.apk : [View on VirusTotal](https://www.virustotal.com/gui/file/2defe8f18374ec4f6c907869e4c09aeb515046d6b3d518d5eb48d3fcdb41dbad/summary) + +------------------------- + +## Attention +- By using Vanced+ or share anything related to Vanced+ to YouTube, you are violating YouTube Terms of Service : [About Software in the Service](https://www.youtube.com/t/terms#8c38269fae) ! +- Using at your own risk ! +- Do not upload anything related to Vanced+ to YouTube. Otherwise, your channel might be get banned due to violating YouTube Term of Service mentioned above ! -YouTube_Music_v4.64.51.apk : [View on VirusTotal](https://www.virustotal.com/gui/file/47a8398198f1a5266a28dfcb6281d2b75a1146e0fe4f6d1bd878586d95752445/summary) +## Source code +- Project source code are stored on seperate repository, not this vancedx repository. +- As project are still placeholder and nothing been started, so for now, i'll kept everything private except this repo and VancedxMicroG until i change my life and continue with implement Vanced+ + +## Frequently Asked Questions + +[See FAQs on Wiki](https://gitlab.com/cuynu/vancedx/-/wikis/Frequently-Asked-Questions). -Vanced.MicroG.0.2.24.220220.apk : [View on VirusTotal](https://www.virustotal.com/gui/file/e5ce4f9759d3e70ac479bf2d0707efe5a42fca8513cf387de583b8659dbfbbbf) - -[Some Miui device may not be able to install. If you has this, please use modifed repo vanced manager because Miui blocked./ Một số thiết bị chạy Miui sẽ không thể cài đặt được. Nếu bạn bị lỗi trên, hãy dùng Vanced manager -] +## Evolution of repo +- This repo was originally created for archive the discontinued version of Vanced (17.03.38) on 2022/03 on GitHub, See commit : [e14f2a59](https://gitlab.com/cuynu/vancedx/-/tree/e14f2a598e62192543d699d2109d68ed4d4e26aa) +- Around 2022/07, this repo are used for providing unofficial Vanced which is released by inotia00 on GitHub, See commit : [90fe1ec2](https://gitlab.com/cuynu/vancedx/-/tree/90fe1ec26aa16613b9d97f973da379080b69b7c8) +- Around 2022/10 till 2023/06, this repo switched to newer unofficial Vanced which is BASED on ReVanced stuffs to works (literally just ReVanced but rebranded to Vanced logo), See first commit : [1d5923f1](https://gitlab.com/cuynu/vancedx/-/tree/1d5923f155d18d7435b5662c8d66d681c74b04c0) and last commit : [cb88d8ef](https://gitlab.com/cuynu/vancedx/-/tree/cb88d8efa70cac397ac091ad242cc3a8af8e6396) +- Around 2023/06 till right now, the old project that this repo handle are partially removed and replaced with "Vanced+", but Vanced+ are still Placeholder : First commit : [3cff5d39](https://gitlab.com/cuynu/vancedx/-/tree/3cff5d39527d9d0dbddd8a66e71782e13b79e781) +- This repo are completely switched to GitLab on 2023/31/12, but on GitHub, there still repository that redirect users to this GitLab repo. -Want support me? Just subscribe to [this YouTube channel here](https://m.youtube.com/cuynudtw) +## Credits +- The icon of Aria inside Vanced+ icon was created by [@sevenc_nanashi@voskey.icalo.net](https://voskey.icalo.net/@sevenc_nanashi) and is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). -Thông báo từ Vanced / Important Notification from Vanced -![Preview](https://files.catbox.moe/ricm16.jpg) +- **[Team Vanced](https://github.com/TeamVanced)** : Old YouTube Vanced official which is closed source, I use its icon assets (Vanced, SponsorBlock, RYD icons) -![Preview 2](https://files.catbox.moe/il0n3d.png) +- **[inotia00](https://github.com/inotia00)** : Old YouTube Vanced (RVX) based patches which is used on Unofficial Vanced v17.34.36-v18.21.34 (this is my bad past) -Vanced (v17.03.38) -Changelog: +- **[ReVanced Team](https://github.com/revanced)** : ReVanced Team for CLI used to build old Unofficial Vanced -Main changes: -Bumped base - -ReturnYouTubeDislike integration (NOT FOR SHORTS ALSO SEE KNOWN ISSUES) - -Channel whitelisting for video ads - -Improved ad-blocking - -Comments location (alpha) has been removed (because Google pushed new comments to tablet UI) - -Added tablet style under swipe controls for partially disabling recommended videos in landscape mode and other tablet styled UI - -Added support for themed icon (Android 13+) Sponsorblock changes: - -added support for channel whitelisting (see the "Channel whitelisting" toggle in sb settings) - -added support for setting the minimum segment duration - -added the filler category - -replaced the "Change colors" button with a text field inside of each category's setting -403 messages (warns, locked video/segment) will now be properly displayed -added an option to enable SB browser button. - -Option to change the API URL KNOWN ISSUES: -On new action bar layouts(server-sided feature), the new toggles won't work. (Around 15% of users are currently affected by it) -all the usual previous issues relating to Chromecast, codec override, swipe controls bug while scrolling in landscape mode and swipe down gesture to refresh. PLANNED CHANGES FOR NEXT RELEASE -Option to make SponsorBlock submitting and voting buttons appear under the video -make RYD work in all layouts -add more ad whitelist options such as viewing the entire list of whitelisted channels and a global video ads toggle +------------------------- diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 2faa2f9..0000000 --- a/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2013, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -buildscript { - ext.androidMinSdk = 23 - ext.androidTargetSdk = 30 - ext.androidCompileSdk = 31 - - repositories { - jcenter() - google() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" - classpath "com.squareup.wire:wire-gradle-plugin:3.2.2" - } -} - -allprojects { - apply plugin: 'idea' - - group = 'org.microg.gms' - version = "0.2.24.220220" - ext.appVersionCode = 220220001 - ext.isReleaseVersion = false -} - -subprojects { - repositories { - jcenter() - google() - } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index f2f2be5..0000000 --- a/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -android.useAndroidX=true -org.gradle.jvmargs=-Xmx8192m diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 62d4c05..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 7dadbcd..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Feb 09 22:14:11 CET 2022 -distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip -distributionPath=wrapper/dists -zipStorePath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew deleted file mode 100644 index 60cf9e8..0000000 --- a/gradlew +++ /dev/null @@ -1,233 +0,0 @@ -#!/bin/sh - -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 5093609..0000000 --- a/gradlew.bat +++ /dev/null @@ -1,104 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/play-services-api/build.gradle b/play-services-api/build.gradle deleted file mode 100644 index a7e8a5c..0000000 --- a/play-services-api/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} - -dependencies { - api project(':play-services-basement') - api project(':play-services-cast-api') - api project(':play-services-cast-framework-api') - api project(':play-services-iid-api') - api project(':play-services-location-api') -} \ No newline at end of file diff --git a/play-services-api/gradle.properties b/play-services-api/gradle.properties deleted file mode 100644 index cac2a52..0000000 --- a/play-services-api/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Internal API -POM_DESCRIPTION=Interfaces and objects for IPC between Play Services Library and Play Services Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-api/src/main/AndroidManifest.xml b/play-services-api/src/main/AndroidManifest.xml deleted file mode 100644 index d4a4d07..0000000 --- a/play-services-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl b/play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl deleted file mode 100644 index 3bc9313..0000000 --- a/play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.android.auth; - -import android.os.Bundle; -import android.accounts.Account; - -import com.google.android.gms.auth.AccountChangeEventsResponse; -import com.google.android.gms.auth.AccountChangeEventsRequest; - -interface IAuthManagerService { - Bundle getToken(String accountName, String scope, in Bundle extras) = 0; - Bundle clearToken(String token, in Bundle extras) = 1; - AccountChangeEventsResponse getChangeEvents(in AccountChangeEventsRequest request) = 2; - Bundle getTokenWithAccount(in Account account, String scope, in Bundle extras) = 4; - Bundle getAccounts(in Bundle extras) = 5; - Bundle removeAccount(in Account account) = 6; - Bundle requestGoogleAccountsAccess(String packageName) = 7; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/CorpusStatus.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/CorpusStatus.aidl deleted file mode 100644 index f893aef..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/CorpusStatus.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable CorpusStatus; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdate.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdate.aidl deleted file mode 100644 index c7f5e43..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdate.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable PIMEUpdate; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdateResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdateResponse.aidl deleted file mode 100644 index 0ae6e4b..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdateResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable PIMEUpdateResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/RequestIndexingSpecification.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/RequestIndexingSpecification.aidl deleted file mode 100644 index a0a785c..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/RequestIndexingSpecification.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable RequestIndexingSpecification; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestSpecification.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestSpecification.aidl deleted file mode 100644 index 0b3c47f..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestSpecification.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable SuggestSpecification; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestionResults.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestionResults.aidl deleted file mode 100644 index 57d2d63..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestionResults.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable SuggestionResults; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/UsageInfo.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/UsageInfo.aidl deleted file mode 100644 index b52e3d4..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/UsageInfo.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.appdatasearch; - -parcelable UsageInfo; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/IAppDataSearch.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/IAppDataSearch.aidl deleted file mode 100644 index ebc204c..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/IAppDataSearch.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.appdatasearch.internal; - -import com.google.android.gms.appdatasearch.CorpusStatus; -import com.google.android.gms.appdatasearch.PIMEUpdateResponse; -import com.google.android.gms.appdatasearch.RequestIndexingSpecification; -import com.google.android.gms.appdatasearch.SuggestionResults; -import com.google.android.gms.appdatasearch.SuggestSpecification; - -interface IAppDataSearch { - SuggestionResults getSuggestions(String var1, String packageName, in String[] accounts, int maxNum, in SuggestSpecification specs) = 1; - boolean requestIndexing(String packageName, String accountName, long l, in RequestIndexingSpecification specs) = 3; - CorpusStatus getStatus(String packageName, String accountName) = 4; - PIMEUpdateResponse requestPIMEUpdate(String s1, String s2, int i, in byte[] bs) = 34; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearch.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearch.aidl deleted file mode 100644 index 77e618a..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearch.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.appdatasearch.internal; - -import com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks; -import com.google.android.gms.appdatasearch.UsageInfo; - -interface ILightweightAppDataSearch { - void view(ILightweightAppDataSearchCallbacks callbacks, String packageName, in UsageInfo[] usageInfos); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearchCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearchCallbacks.aidl deleted file mode 100644 index 338a142..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearchCallbacks.aidl +++ /dev/null @@ -1,4 +0,0 @@ -package com.google.android.gms.appdatasearch.internal; - -interface ILightweightAppDataSearchCallbacks { -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl deleted file mode 100644 index 206b1a9..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable AccountChangeEventsRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl deleted file mode 100644 index 832e585..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable AccountChangeEventsResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl deleted file mode 100644 index 82536b9..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials; - -parcelable Credential; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl deleted file mode 100644 index d000f32..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials; - -parcelable CredentialRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl deleted file mode 100644 index 7fa0d4a..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -parcelable DeleteRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl deleted file mode 100644 index 814f68d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -parcelable GeneratePasswordRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl deleted file mode 100644 index da248c3..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.auth.api.credentials.Credential; - -interface ICredentialsCallbacks { - void onStatusAndCredential(in Status status, in Credential credential) = 0; - void onStatus(in Status status) = 1; - void onStatusAndString(in Status status, String string) = 2; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl deleted file mode 100644 index 89c6c7e..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl +++ /dev/null @@ -1,15 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -import com.google.android.gms.auth.api.credentials.CredentialRequest; -import com.google.android.gms.auth.api.credentials.internal.ICredentialsCallbacks; -import com.google.android.gms.auth.api.credentials.internal.DeleteRequest; -import com.google.android.gms.auth.api.credentials.internal.GeneratePasswordRequest; -import com.google.android.gms.auth.api.credentials.internal.SaveRequest; - -interface ICredentialsService { - void request(ICredentialsCallbacks callbacks, in CredentialRequest request) = 0; - void save(ICredentialsCallbacks callbacks, in SaveRequest request) = 1; - void delete(ICredentialsCallbacks callbacks, in DeleteRequest request) = 2; - void disableAutoSignIn(ICredentialsCallbacks callbacks) = 3; - void generatePassword(ICredentialsCallbacks callbacks, in GeneratePasswordRequest request) = 4; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl deleted file mode 100644 index b5bcb59..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -parcelable SaveRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl deleted file mode 100644 index ae8e79c..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.auth.api.internal; - -import com.google.android.gms.auth.api.proxy.ProxyResponse; - -interface IAuthCallbacks { - void onProxyResponse(in ProxyResponse response) = 0; - void onSpatulaHeader(String spatulaHeader) = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl deleted file mode 100644 index a5f6a53..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.android.gms.auth.api.internal; - -import com.google.android.gms.auth.api.internal.IAuthCallbacks; -//import com.google.android.gms.auth.api.proxy.ProxyGrpcRequest; -import com.google.android.gms.auth.api.proxy.ProxyRequest; - -interface IAuthService { - void performProxyRequest(IAuthCallbacks callbacks, in ProxyRequest request) = 0; -// void performProxyGrpcRequest(IAuthCallback callbacks, in ProxyGrpcRequest request) = 1; - void getSpatulaHeader(IAuthCallbacks callbacks) = 2; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl deleted file mode 100644 index fa5885f..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.proxy; - -parcelable ProxyRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl deleted file mode 100644 index eae21f3..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.proxy; - -parcelable ProxyResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl deleted file mode 100644 index ee7f733..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl +++ /dev/null @@ -1,6 +0,0 @@ -package com.google.android.gms.auth.appcert; - -interface IAppCertService { - boolean fetchDeviceKey() = 0; - String getSpatulaHeader(String packageName) = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl deleted file mode 100644 index 973de92..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.checkin.internal; - -interface ICheckinService { - String getDeviceDataVersionInfo(); - long getLastCheckinSuccessTime(); - String getLastSimOperator(); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/LogEventParcelable.aidl b/play-services-api/src/main/aidl/com/google/android/gms/clearcut/LogEventParcelable.aidl deleted file mode 100644 index 25041d4..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/LogEventParcelable.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.clearcut; - -parcelable LogEventParcelable; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/IClearcutLoggerCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/IClearcutLoggerCallbacks.aidl deleted file mode 100644 index 61e23cf..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/IClearcutLoggerCallbacks.aidl +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.android.gms.clearcut.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.common.data.DataHolder; - -interface IClearcutLoggerCallbacks { - oneway void onLogResult(in Status status) = 0; - oneway void onForceUploadResult(in Status status) = 1; - oneway void onStartCollectForDebugResult(in Status status, long l) = 2; - oneway void onStopCollectForDebugResult(in Status status) = 3; - oneway void onCollectForDebugExpiryTime(in Status status, long l) = 4; - oneway void onLogEventParcelables(in DataHolder data) = 6; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/IClearcutLoggerService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/IClearcutLoggerService.aidl deleted file mode 100644 index 018252e..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/IClearcutLoggerService.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.clearcut.internal; - -import com.google.android.gms.clearcut.internal.IClearcutLoggerCallbacks; -import com.google.android.gms.clearcut.LogEventParcelable; - -interface IClearcutLoggerService { - oneway void log(IClearcutLoggerCallbacks callbacks, in LogEventParcelable event) = 0; - oneway void forceUpload(IClearcutLoggerCallbacks callbacks) = 1; - oneway void startCollectForDebug(IClearcutLoggerCallbacks callbacks) = 2; - oneway void stopCollectForDebug(IClearcutLoggerCallbacks callbacks) = 3; - oneway void getCollectForDebugExpiryTime(IClearcutLoggerCallbacks callbacks) = 4; - oneway void getLogEventParcelablesLegacy(IClearcutLoggerCallbacks callbacks) = 5; - oneway void getLogEventParcelables(IClearcutLoggerCallbacks callbacks) = 6; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/PlayLoggerContext.aidl b/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/PlayLoggerContext.aidl deleted file mode 100644 index e213b96..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/clearcut/internal/PlayLoggerContext.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.clearcut.internal; - -parcelable PlayLoggerContext; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl deleted file mode 100644 index ae02e06..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.internal; - -parcelable GoogleCertificatesQuery; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl deleted file mode 100644 index 19839d7..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.common.internal; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ICertData { - IObjectWrapper getWrappedBytes(); - int remoteHashCode(); -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl deleted file mode 100644 index da539f3..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.common.internal; - -import com.google.android.gms.common.internal.GoogleCertificatesQuery; -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IGoogleCertificatesApi { - IObjectWrapper getGoogleCertficates(); - IObjectWrapper getGoogleReleaseCertificates(); - boolean isGoogleReleaseSigned(String packageName, IObjectWrapper certData); - boolean isGoogleSigned(String packageName, IObjectWrapper certData); - boolean isGoogleOrPlatformSigned(in GoogleCertificatesQuery query, IObjectWrapper packageManager); -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl deleted file mode 100644 index f6c5399..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.common.internal; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ISignInButtonCreator { - IObjectWrapper createSignInButton(IObjectWrapper context, int size, int color); // returns View -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl deleted file mode 100644 index 69b856b..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.server; - -parcelable FavaDiagnosticsEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/dynamite/IDynamiteLoader.aidl b/play-services-api/src/main/aidl/com/google/android/gms/dynamite/IDynamiteLoader.aidl deleted file mode 100644 index 017a2dc..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/dynamite/IDynamiteLoader.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.dynamite; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IDynamiteLoader { - int getModuleVersion(IObjectWrapper wrappedContext, String moduleId) = 0; - int getModuleVersion2(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired) = 2; - int getModuleVersion2NoCrashUtils(IObjectWrapper wrappedContext, String moduleId, boolean updateConfigIfRequired) = 4; - - IObjectWrapper createModuleContext(IObjectWrapper wrappedContext, String moduleId, int minVersion) = 1; - IObjectWrapper createModuleContextNoCrashUtils(IObjectWrapper wrappedContext, String moduleId, int minVersion) = 3; - - int getIDynamiteLoaderVersion() = 5; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl deleted file mode 100644 index 72a9af0..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.facs.cache; - -parcelable FacsCacheCallOptions; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl deleted file mode 100644 index 5bac21a..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.facs.cache; - -parcelable ForceSettingsCacheRefreshResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl deleted file mode 100644 index 627417d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.facs.cache; - -parcelable GetActivityControlsSettingsResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl deleted file mode 100644 index 936f2ee..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.facs.cache; - -parcelable ReadDeviceLevelSettingsResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl deleted file mode 100644 index 051f9e0..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.facs.cache; - -parcelable UpdateActivityControlsSettingsResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl deleted file mode 100644 index ecea95a..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl +++ /dev/null @@ -1,15 +0,0 @@ -package com.google.android.gms.facs.cache.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.facs.cache.ForceSettingsCacheRefreshResult; -import com.google.android.gms.facs.cache.GetActivityControlsSettingsResult; -import com.google.android.gms.facs.cache.ReadDeviceLevelSettingsResult; -import com.google.android.gms.facs.cache.UpdateActivityControlsSettingsResult; - -interface IFacsCacheCallbacks { - void onForceSettingsCacheRefreshResult(in Status status, in ForceSettingsCacheRefreshResult result) = 0; - void onUpdateActivityControlsSettingsResult(in Status status, in UpdateActivityControlsSettingsResult result) = 1; - void onGetActivityControlsSettingsResult(in Status status, in GetActivityControlsSettingsResult result) = 2; - void onWriteDeviceLevelSettingsResult(in Status status) = 3; - void onReadDeviceLevelSettingsResult(in Status status, in ReadDeviceLevelSettingsResult result) = 4; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl deleted file mode 100644 index 534c9de..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.facs.cache.internal; - -import com.google.android.gms.facs.cache.FacsCacheCallOptions; -import com.google.android.gms.facs.cache.internal.IFacsCacheCallbacks; - -interface IFacsCacheService { - void forceSettingsCacheRefresh(IFacsCacheCallbacks callbacks, in FacsCacheCallOptions options) = 0; - void updateActivityControlsSettings(IFacsCacheCallbacks callbacks, in byte[] bytes, in FacsCacheCallOptions options) = 1; - void getActivityControlsSettings(IFacsCacheCallbacks callbacks, in FacsCacheCallOptions options) = 2; - void readDeviceLevelSettings(IFacsCacheCallbacks callbacks) = 3; - void writeDeviceLevelSettings(IFacsCacheCallbacks callbacks, in byte[] bytes) = 4; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl deleted file mode 100644 index 58ea0ba..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.http; - -import android.os.Bundle; - -interface IGoogleHttpService { - Bundle checkUrl(String url); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IAppMeasurementDynamiteService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IAppMeasurementDynamiteService.aidl deleted file mode 100644 index 5df0a37..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IAppMeasurementDynamiteService.aidl +++ /dev/null @@ -1,55 +0,0 @@ -package com.google.android.gms.measurement.api.internal; - -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.measurement.api.internal.IBundleReceiver; -import com.google.android.gms.measurement.api.internal.IEventHandlerProxy; -import com.google.android.gms.measurement.api.internal.IStringProvider; -import com.google.android.gms.measurement.api.internal.InitializationParams; - -interface IAppMeasurementDynamiteService { - void initialize(in IObjectWrapper context, in InitializationParams params, long timestamp) = 0; - void logEvent(String str, String str2, in Bundle bundle, boolean z, boolean z2, long timestamp) = 1; - void logEventAndBundle(String str, String str2, in Bundle bundle, IBundleReceiver receiver, long j) = 2; - void setUserProperty(String str, String str2, in IObjectWrapper obj, boolean z, long j) = 3; - void getUserProperties(String str, String str2, boolean z, IBundleReceiver receiver) = 4; - void getMaxUserProperties(String str, IBundleReceiver receiver) = 5; - void setUserId(String str, long j) = 6; - void setConditionalUserProperty(in Bundle bundle, long j) = 7; - void clearConditionalUserProperty(String str, String str2, in Bundle bundle) = 8; - void getConditionalUserProperties(String str, String str2, IBundleReceiver receiver) = 9; - void setMeasurementEnabled(boolean z, long j) = 10; - void resetAnalyticsData(long j) = 11; - void setMinimumSessionDuration(long j) = 12; - void setSessionTimeoutDuration(long j) = 13; - void setCurrentScreen(in IObjectWrapper obj, String str, String str2, long j) = 14; - void getCurrentScreenName(IBundleReceiver receiver) = 15; - void getCurrentScreenClass(IBundleReceiver receiver) = 16; - void setInstanceIdProvider(IStringProvider provider) = 17; - void getCachedAppInstanceId(IBundleReceiver receiver) = 18; - void getAppInstanceId(IBundleReceiver receiver) = 19; - void getGmpAppId(IBundleReceiver receiver) = 20; - void generateEventId(IBundleReceiver receiver) = 21; - void beginAdUnitExposure(String str, long j) = 22; - void endAdUnitExposure(String str, long j) = 23; - void onActivityStarted(in IObjectWrapper activity, long j) = 24; - void onActivityStopped(in IObjectWrapper activity, long j) = 25; - void onActivityCreated(in IObjectWrapper activity, in Bundle bundle, long j) = 26; - void onActivityDestroyed(in IObjectWrapper activity, long j) = 27; - void onActivityPaused(in IObjectWrapper activity, long j) = 28; - void onActivityResumed(in IObjectWrapper activity, long j) = 29; - void onActivitySaveInstanceState(in IObjectWrapper activity, IBundleReceiver receiver, long j) = 30; - void performAction(in Bundle bundle, IBundleReceiver receiver, long j) = 31; - void logHealthData(int i, String str, in IObjectWrapper obj, in IObjectWrapper obj2, in IObjectWrapper obj3) = 32; - void setEventInterceptor(IEventHandlerProxy proxy) = 33; - void registerOnMeasurementEventListener(IEventHandlerProxy proxy) = 34; - void unregisterOnMeasurementEventListener(IEventHandlerProxy proxy) = 35; - void initForTests(in Map map) = 36; - void getTestFlag(IBundleReceiver receiver, int i) = 37; - void setDataCollectionEnabled(boolean z) = 38; - void isDataCollectionEnabled(IBundleReceiver receiver) = 39; - - void setDefaultEventParameters(in Bundle bundle) = 41; - void setConsent(in Bundle bundle, long j) = 43; - void setConsentThirdParty(in Bundle bundle, long j) = 44; - void clearMeasurementEnabled(long j) = 42; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IBundleReceiver.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IBundleReceiver.aidl deleted file mode 100644 index 68d80ee..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IBundleReceiver.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.measurement.api.internal; - -interface IBundleReceiver { - void onBundle(in Bundle bundle); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IEventHandlerProxy.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IEventHandlerProxy.aidl deleted file mode 100644 index 5325899..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IEventHandlerProxy.aidl +++ /dev/null @@ -1,6 +0,0 @@ -package com.google.android.gms.measurement.api.internal; - -interface IEventHandlerProxy { - void f1(String s1, String s2, in Bundle bundle, long j) = 0; - int f2() = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IStringProvider.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IStringProvider.aidl deleted file mode 100644 index 2d8f9d1..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/IStringProvider.aidl +++ /dev/null @@ -1,4 +0,0 @@ -package com.google.android.gms.measurement.api.internal; - -interface IStringProvider { -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/InitializationParams.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/InitializationParams.aidl deleted file mode 100644 index cce367c..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/api/internal/InitializationParams.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.measurement.api.internal; - -parcelable InitializationParams; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/AppMetadata.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/AppMetadata.aidl deleted file mode 100644 index 005edc3..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/AppMetadata.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.measurement.internal; - -parcelable AppMetadata; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.aidl deleted file mode 100644 index de59ae5..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.measurement.internal; - -parcelable ConditionalUserPropertyParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/EventParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/EventParcel.aidl deleted file mode 100644 index 372d66f..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/EventParcel.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.measurement.internal; - -parcelable EventParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/IMeasurementService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/IMeasurementService.aidl deleted file mode 100644 index 1c78896..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/IMeasurementService.aidl +++ /dev/null @@ -1,27 +0,0 @@ -package com.google.android.gms.measurement.internal; - -import com.google.android.gms.measurement.internal.AppMetadata; -import com.google.android.gms.measurement.internal.ConditionalUserPropertyParcel; -import com.google.android.gms.measurement.internal.EventParcel; -import com.google.android.gms.measurement.internal.UserAttributeParcel; - -interface IMeasurementService { - void f1(in EventParcel event, in AppMetadata app) = 0; - void f2(in UserAttributeParcel attribute, in AppMetadata app) = 1; - void f4(in AppMetadata app) = 3; -// void f5(in EventParcel p0, String p1, String p2) = 4; -// void f6(in AppMetadata p0) = 5; -// List f7(in AppMetadata p0, boolean p1) = 6; -// byte[] f9(in EventParcel p0, String p1) = 8; - void f10(long p0, String p1, String p2, String p3) = 9; - String f11(in AppMetadata app) = 10; - void f12(in ConditionalUserPropertyParcel property, in AppMetadata app) = 11; -// void f13(ConditionalUserPropertyParcel p0) = 12; -// List getUserProperties(String p0, String p1, boolean p2, in AppMetadata p3) = 13; -// List getUserPropertiesAs(String p0, String p1, String p2, boolean p3) = 14; -// List getConditionalUserProperties(String p0, String p1, in AppMetadata p2) = 15; -// List getCondtionalUserPropertiesAs(String p0, String p1, String p2) = 16; -// void f18(in AppMetadata p0) = 17; - void setDefaultEventParameters(in Bundle params, in AppMetadata app) = 18; -// void f20(in AppMetadata p0) = 19; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/UserAttributeParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/UserAttributeParcel.aidl deleted file mode 100644 index efb3b72..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/UserAttributeParcel.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.measurement.internal; - -parcelable UserAttributeParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl deleted file mode 100644 index 75db9fa..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.people.internal; - -import android.os.Bundle; -import android.os.ParcelFileDescriptor; - -import com.google.android.gms.common.data.DataHolder; - -interface IPeopleCallbacks { - void onDataHolder(int code, in Bundle resolution, in DataHolder holder) = 1; - void onDataHolders(int code, in Bundle resolution, in DataHolder[] holders) = 3; - void onParcelFileDescriptor(int code, in Bundle resolution, in ParcelFileDescriptor fileDescriptor, in Bundle extras) = 4; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl deleted file mode 100644 index 62ae147..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl +++ /dev/null @@ -1,44 +0,0 @@ -package com.google.android.gms.people.internal; - -import android.os.Bundle; - -import com.google.android.gms.people.internal.IPeopleCallbacks; -import com.google.android.gms.common.server.FavaDiagnosticsEntity; -import com.google.android.gms.common.internal.ICancelToken; - -interface IPeopleService { - // void loadOwners1(IPeopleCallbacks var1, boolean var2, boolean var3, String var4, String var5); - // void loadCirclesOld(IPeopleCallbacks var1, String var2, String var3, String var4, int var5, String var6); - // void loadPeopleOld(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, int var6, boolean var7, long var8); - // void loadAvatarLegacy(IPeopleCallbacks var1, String var2, int var3, int var4); - // void loadContactImageLegacy(IPeopleCallbacks var1, long var2, boolean var4); - // void blockPerson(IPeopleCallbacks var1, String var2, String var3, String var4, boolean var5); - // Bundle syncRawContact(in Uri var1); - // void loadPeopleForAggregation8(IPeopleCallbacks var1, String var2, String var3, String var4, boolean var5, int var6); - // void setSyncToContactsSettings(IPeopleCallbacks var1, String var2, boolean var3, in String[] var4); - - // Bundle startSync(String var1, String var2); - // void requestSync(IPeopleCallbacks var1, String var2, String var3, in Uri var4); - // void updatePersonCirclesOld(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, in List var6); - // boolean isSyncToContactsEnabled(); - // Bundle requestSyncOld(String var1, String var2); - // void setAvatar(IPeopleCallbacks var1, String var2, String var3, in Uri var4, boolean var5); - // void loadCircles(IPeopleCallbacks var1, String var2, String var3, String var4, int var5, String var6, boolean var7); - // Bundle requestSyncOld19(String var1, String var2, long var3); - // void loadPeople20(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, int var6, boolean var7, long var8, String var10, int var11); - // void loadPeopleLive(IPeopleCallbacks var1, String var2, String var3, String var4, int var5, String var6); - // void updatePersonCircles(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, in List var6, in FavaDiagnosticsEntity var7); - // void loadRemoteImageLegacy(IPeopleCallbacks var1, String var2); - // void loadContactsGaiaIds24(IPeopleCallbacks var1, String var2, String var3); - // Bundle requestSyncOld25(String var1, String var2, long var3, boolean var5); - // void addCircle(IPeopleCallbacks var1, String var2, String var3, String var4, String var5); - // void addPeopleToCircle(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5); - - Bundle registerDataChangedListener(IPeopleCallbacks callbacks, boolean register, String var3, String var4, int scopes) = 10; - void loadCircles(IPeopleCallbacks callbacks, String account, String pageGaiaId, String circleId, int type, String var6, boolean var7) = 18; - Bundle requestSync(String account, String var2, long var3, boolean var5, boolean var6) = 204; - void loadOwners(IPeopleCallbacks callbacks, boolean var2, boolean var3, String account, String var5, int sortOrder) = 304; - void loadPeopleForAggregation(IPeopleCallbacks callbacks, String account, String var3, String filter, int var5, boolean var6, int var7, int var8, String var9, boolean var10, int var11, int var12) = 401; - ICancelToken loadOwnerAvatar(IPeopleCallbacks callbacks, String account, String pageId, int size, int flags) = 504; - ICancelToken loadAutocompleteList(IPeopleCallbacks callbacks, String account, String pageId, boolean directorySearch, String var5, String query, int autocompleteType, int var8, int numberOfResults, boolean var10) = 506; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl deleted file mode 100644 index 9bcdee4..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.android.gms.playlog.internal; - -import com.google.android.gms.clearcut.internal.PlayLoggerContext; -import com.google.android.gms.playlog.internal.LogEvent; - -// Deprecated -interface IPlayLogService { - void onEvent(String packageName, in PlayLoggerContext context, in LogEvent event) = 1; - void onMultiEvent(String packageName, in PlayLoggerContext context, in List events) = 2; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/LogEvent.aidl b/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/LogEvent.aidl deleted file mode 100644 index 6e7bed5..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/LogEvent.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.playlog.internal; - -parcelable LogEvent; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/administration/internal/ISearchAdministrationService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/administration/internal/ISearchAdministrationService.aidl deleted file mode 100644 index 404544c..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/administration/internal/ISearchAdministrationService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.search.administration.internal; - -interface ISearchAdministrationService { - -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl deleted file mode 100644 index 9f71893..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.corpora; - -parcelable ClearCorpusRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl deleted file mode 100644 index 11b0a4d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.corpora; - -parcelable GetCorpusInfoRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl deleted file mode 100644 index b2e549d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.corpora; - -parcelable GetCorpusStatusRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl deleted file mode 100644 index a837a7d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.corpora; - -parcelable GetCorpusStatusResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl deleted file mode 100644 index ad68ef3..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.corpora; - -parcelable RequestIndexingRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl deleted file mode 100644 index 7aaa548..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.corpora; - -parcelable RequestIndexingResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl deleted file mode 100644 index 863b016..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl +++ /dev/null @@ -1,9 +0,0 @@ -package com.google.android.gms.search.corpora.internal; - -import com.google.android.gms.search.corpora.RequestIndexingResponse; -import com.google.android.gms.search.corpora.GetCorpusStatusResponse; - -interface ISearchCorporaCallbacks { - void onRequestIndexing(in RequestIndexingResponse response) = 1; - void onGetCorpusStatus(in GetCorpusStatusResponse response) = 3; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl deleted file mode 100644 index fe2073c..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.search.corpora.internal; - -import com.google.android.gms.search.corpora.ClearCorpusRequest; -import com.google.android.gms.search.corpora.GetCorpusStatusRequest; -import com.google.android.gms.search.corpora.GetCorpusInfoRequest; -import com.google.android.gms.search.corpora.RequestIndexingRequest; -import com.google.android.gms.search.corpora.internal.ISearchCorporaCallbacks; - -interface ISearchCorporaService { - void requestIndexing(in RequestIndexingRequest request, ISearchCorporaCallbacks callbacks) = 1; - void clearCorpus(in ClearCorpusRequest request, ISearchCorporaCallbacks callbacks) = 2; - void getCorpusStatus(in GetCorpusStatusRequest request, ISearchCorporaCallbacks callbacks) = 3; - void getCorpusInfo(in GetCorpusInfoRequest request, ISearchCorporaCallbacks callbacks) = 4; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.aidl deleted file mode 100644 index 426cbe4..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable GetCurrentExperimentIdsRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.aidl deleted file mode 100644 index 8fdb456..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable GetCurrentExperimentIdsResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.aidl deleted file mode 100644 index 986ab4d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable GetGlobalSearchSourcesRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.aidl deleted file mode 100644 index 86d52a1..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable GetGlobalSearchSourcesResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.aidl deleted file mode 100644 index 8d7382e..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable GetPendingExperimentIdsRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.aidl deleted file mode 100644 index ca99ad5..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable GetPendingExperimentIdsResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsRequest.aidl deleted file mode 100644 index 2bd4d8b..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable SetExperimentIdsRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsResponse.aidl deleted file mode 100644 index ff55276..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable SetExperimentIdsResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.aidl deleted file mode 100644 index 79cbb17..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable SetIncludeInGlobalSearchRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.aidl deleted file mode 100644 index a5f2d6d..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.global; - -parcelable SetIncludeInGlobalSearchResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminCallbacks.aidl deleted file mode 100644 index b08d953..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminCallbacks.aidl +++ /dev/null @@ -1,16 +0,0 @@ -package com.google.android.gms.search.global.internal; - -import com.google.android.gms.search.global.GetCurrentExperimentIdsResponse; -import com.google.android.gms.search.global.GetGlobalSearchSourcesResponse; -import com.google.android.gms.search.global.GetPendingExperimentIdsResponse; -import com.google.android.gms.search.global.SetExperimentIdsResponse; -import com.google.android.gms.search.global.SetIncludeInGlobalSearchResponse; - -interface IGlobalSearchAdminCallbacks { - void onGetGlobalSearchSourcesResponse(in GetGlobalSearchSourcesResponse request) = 1; - void onSetExperimentIdsResponse(in SetExperimentIdsResponse response) = 2; - void onGetCurrentExperimentIdsResponse(in GetCurrentExperimentIdsResponse response) = 3; - void onGetPendingExperimentIdsResponse(in GetPendingExperimentIdsResponse response) = 4; - - void onSetIncludeInGlobalSearchResponse(in SetIncludeInGlobalSearchResponse response) = 7; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl deleted file mode 100644 index 95bc32a..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.android.gms.search.global.internal; - -import com.google.android.gms.search.global.GetCurrentExperimentIdsRequest; -import com.google.android.gms.search.global.GetGlobalSearchSourcesRequest; -import com.google.android.gms.search.global.GetPendingExperimentIdsRequest; -import com.google.android.gms.search.global.SetExperimentIdsRequest; -import com.google.android.gms.search.global.SetIncludeInGlobalSearchRequest; -import com.google.android.gms.search.global.internal.IGlobalSearchAdminCallbacks; - -interface IGlobalSearchAdminService { - void getGlobalSearchSources(in GetGlobalSearchSourcesRequest request, IGlobalSearchAdminCallbacks callbacks) = 1; - void setExperimentIds(in SetExperimentIdsRequest request, IGlobalSearchAdminCallbacks callbacks) = 2; - void getCurrentExperimentIds(in GetCurrentExperimentIdsRequest request, IGlobalSearchAdminCallbacks callbacks) = 3; - void getPendingExperimentIds(in GetPendingExperimentIdsRequest request, IGlobalSearchAdminCallbacks callbacks) = 4; - - void setIncludeInGlobalSearch(in SetIncludeInGlobalSearchRequest request, IGlobalSearchAdminCallbacks callbacks) = 7; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl deleted file mode 100644 index 1986e95..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.queries; - -parcelable QueryRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl deleted file mode 100644 index 9704725..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.search.queries; - -parcelable QueryResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl deleted file mode 100644 index 8bcb891..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.search.queries.internal; - -import com.google.android.gms.search.queries.QueryResponse; - -interface ISearchQueriesCallbacks { - void onQuery(in QueryResponse response) = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl deleted file mode 100644 index 091cdae..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.search.queries.internal; - -import com.google.android.gms.search.queries.QueryRequest; -import com.google.android.gms.search.queries.internal.ISearchQueriesCallbacks; - -interface ISearchQueriesService { - void query(in QueryRequest request, ISearchQueriesCallbacks callbacks) = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/UsageReportingOptInOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/UsageReportingOptInOptions.aidl deleted file mode 100644 index a88060f..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/UsageReportingOptInOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.usagereporting; - -parcelable UsageReportingOptInOptions; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingCallbacks.aidl deleted file mode 100644 index 3e877c2..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingCallbacks.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.android.gms.usagereporting.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.usagereporting.UsageReportingOptInOptions; - -interface IUsageReportingCallbacks { - oneway void onOptInOptions(in Status status, in UsageReportingOptInOptions options) = 1; - oneway void onOptInOptionsSet(in Status status) = 2; - oneway void onOptInOptionsChangedListenerAdded(in Status status) = 3; - oneway void onOptInOptionsChangedListenerRemoved(in Status status) = 4; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingOptInOptionsChangedListener.aidl b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingOptInOptionsChangedListener.aidl deleted file mode 100644 index 8e9c287..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingOptInOptionsChangedListener.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.usagereporting.internal; - -interface IUsageReportingOptInOptionsChangedListener { - oneway void onOptionsChanged() = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingService.aidl deleted file mode 100644 index 46d6265..0000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingService.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.usagereporting.internal; - -import com.google.android.gms.usagereporting.internal.IUsageReportingCallbacks; -import com.google.android.gms.usagereporting.internal.IUsageReportingOptInOptionsChangedListener; -import com.google.android.gms.usagereporting.UsageReportingOptInOptions; - -interface IUsageReportingService { - oneway void getOptInOptions(IUsageReportingCallbacks callbacks) = 1; - oneway void setOptInOptions(in UsageReportingOptInOptions options, IUsageReportingCallbacks callbacks) = 2; - oneway void addOptInOptionsChangedListener(IUsageReportingOptInOptionsChangedListener listener, IUsageReportingCallbacks callbacks) = 3; - oneway void removeOptInOptionsChangedListener(IUsageReportingOptInOptionsChangedListener listener, IUsageReportingCallbacks callbacks) = 4; -} diff --git a/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/Configurations.aidl b/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/Configurations.aidl deleted file mode 100644 index b6487fc..0000000 --- a/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/Configurations.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.mgoogle.android.gms.phenotype; - -parcelable Configurations; diff --git a/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/internal/IPhenotypeCallbacks.aidl b/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/internal/IPhenotypeCallbacks.aidl deleted file mode 100644 index d7cb4ba..0000000 --- a/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/internal/IPhenotypeCallbacks.aidl +++ /dev/null @@ -1,9 +0,0 @@ -package com.mgoogle.android.gms.phenotype.internal; - -import com.google.android.gms.common.api.Status; -import com.mgoogle.android.gms.phenotype.Configurations; - -interface IPhenotypeCallbacks { - oneway void onRegister(in Status status) = 0; - oneway void onConfigurations(in Status status, in Configurations configurations) = 3; -} diff --git a/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/internal/IPhenotypeService.aidl b/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/internal/IPhenotypeService.aidl deleted file mode 100644 index 51cdf17..0000000 --- a/play-services-api/src/main/aidl/com/mgoogle/android/gms/phenotype/internal/IPhenotypeService.aidl +++ /dev/null @@ -1,9 +0,0 @@ -package com.mgoogle.android.gms.phenotype.internal; - -import com.mgoogle.android.gms.phenotype.internal.IPhenotypeCallbacks; - -interface IPhenotypeService { - void register(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in byte[] p4) = 0; - void register2(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in int[] p4, in byte[] p5) = 1; - void getConfigurationSnapshot(IPhenotypeCallbacks callbacks, String p1, String p2, String p3) = 10; -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/CorpusStatus.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/CorpusStatus.java deleted file mode 100644 index ecfbbd0..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/CorpusStatus.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class CorpusStatus extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode; - @SafeParceled(1) - public boolean found; - @SafeParceled(2) - public long lastIndexedSeqno; - @SafeParceled(3) - public long lastCommittedSeqno; - @SafeParceled(4) - public long committedNumDocuments; - @SafeParceled(5) - public Bundle counters; - @SafeParceled(6) - public String g; - - public CorpusStatus() { - versionCode = 2; - } - - public static final Creator CREATOR = new AutoCreator(CorpusStatus.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdate.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdate.java deleted file mode 100644 index 2f8a596..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdate.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class PIMEUpdate extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator(PIMEUpdate.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdateResponse.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdateResponse.java deleted file mode 100644 index 6bb080b..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdateResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class PIMEUpdateResponse extends AutoSafeParcelable { - @SafeParceled(1000) - private final int versionCode; - - @SafeParceled(1) - private String b; - - @SafeParceled(2) - public final byte[] bytes; - - @SafeParceled(3) - public final PIMEUpdate[] updates; - - public PIMEUpdateResponse() { - versionCode = 1; - this.bytes = null; - this.updates = new PIMEUpdate[0]; - } - - public static final Creator CREATOR = new AutoCreator(PIMEUpdateResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java deleted file mode 100644 index cddcd2a..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.List; - -public class QuerySpecification extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 2; - @SafeParceled(1) - public final boolean b; - //@SafeParceled(value = 2, subType = "TODO") - public final List c; - //@SafeParceled(value = 3, subType = "TODO") - public final List d; - @SafeParceled(4) - public final boolean e; - @SafeParceled(5) - public final int f; - @SafeParceled(6) - public final int g; - @SafeParceled(7) - public final boolean h; - @SafeParceled(8) - public final int i; - - private QuerySpecification() { - b = false; - c = null; - d = null; - e = false; - f = 0; - g = 0; - h = false; - i = 0; - } - - @Override - public String toString() { - return "QuerySpecification{" + - "versionCode=" + versionCode + - ", b=" + b + - ", c=" + c + - ", d=" + d + - ", e=" + e + - ", f=" + f + - ", g=" + g + - ", h=" + h + - ", i=" + i + - '}'; - } - - public static final Creator CREATOR = new AutoCreator(QuerySpecification.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/RequestIndexingSpecification.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/RequestIndexingSpecification.java deleted file mode 100644 index 720f773..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/RequestIndexingSpecification.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class RequestIndexingSpecification extends AutoSafeParcelable { - - @SafeParceled(1000) - private int versionCode; - - public static final Creator CREATOR = new AutoCreator(RequestIndexingSpecification.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java deleted file mode 100644 index 3fc9a6f..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class SearchResults extends AutoSafeParcelable { - @SafeParceled(1000) - private final int versionCode = 2; - - public static Creator CREATOR = new AutoCreator(SearchResults.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestSpecification.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestSpecification.java deleted file mode 100644 index 34dc833..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestSpecification.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class SuggestSpecification extends AutoSafeParcelable { - @SafeParceled(1000) - private final int versionCode; - - public SuggestSpecification() { - versionCode = 2; - } - - public static final Creator CREATOR = new AutoCreator(SuggestSpecification.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestionResults.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestionResults.java deleted file mode 100644 index 6ff6806..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestionResults.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class SuggestionResults extends AutoSafeParcelable { - @SafeParceled(1000) - private final int versionCode; - @SafeParceled(1) - public final String errorMessage; - - @SafeParceled(2) - public final String[] s1; - @SafeParceled(3) - public final String[] s2; - - private SuggestionResults() { - versionCode = 2; - errorMessage = null; - s1 = s2 = null; - } - - public SuggestionResults(String errorMessage) { - versionCode = 2; - this.errorMessage = errorMessage; - this.s1 = null; - this.s2 = null; - } - - public SuggestionResults(String[] s1, String[] s2) { - versionCode = 2; - this.errorMessage = null; - this.s1 = s1; - this.s2 = s2; - } - - public static final Creator CREATOR = new AutoCreator(SuggestionResults.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/UsageInfo.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/UsageInfo.java deleted file mode 100644 index a2f0f9e..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/UsageInfo.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.appdatasearch; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class UsageInfo extends AutoSafeParcelable { - - public static Creator CREATOR = new AutoCreator(UsageInfo.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java b/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java deleted file mode 100644 index 0485f3a..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AccountChangeEvent extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(AccountChangeEvent.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java deleted file mode 100644 index dce80fc..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AccountChangeEventsRequest extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private int i; - @SafeParceled(3) - private String s; - - public static Creator CREATOR = new AutoCreator(AccountChangeEventsRequest.class); - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java b/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java deleted file mode 100644 index 763e5d4..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.ArrayList; -import java.util.List; - -public class AccountChangeEventsResponse extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(value = 2, subClass = AccountChangeEvent.class) - private final List events; - - public AccountChangeEventsResponse() { - events = new ArrayList(); - } - - public static Creator CREATOR = new AutoCreator(AccountChangeEventsResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java b/play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java deleted file mode 100644 index c6fbe9e..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import com.google.android.gms.common.api.Scope; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.List; - -public class TokenData extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - - @SafeParceled(2) - public final String token; - - @SafeParceled(3) - public final Long expiry; - - @SafeParceled(5) - public final boolean isOAuth; - - @SafeParceled(value = 6, subClass = Scope.class) - public final List scopes; - - public TokenData() { - token = null; - expiry = null; - isOAuth = false; - scopes = null; - } - - public TokenData(String token, Long expiry, boolean isOAuth, List scopes) { - this.token = token; - this.expiry = expiry; - this.isOAuth = isOAuth; - this.scopes = scopes; - } - - public TokenData(String token, Long expiry) { - this.token = token; - this.expiry = expiry; - this.isOAuth = false; - this.scopes = null; - } - - public static final Creator CREATOR = new AutoCreator(TokenData.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java deleted file mode 100644 index 5a92ddc..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import android.net.Uri; -import android.text.TextUtils; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.Arrays; -import java.util.List; -import java.util.Locale; - -@PublicApi -public class Credential extends AutoSafeParcelable { - - @Field(1000) - private final int versionCode = 1; - - @Field(1) - private String id; - @Field(2) - private String name; - @Field(3) - private Uri profilePictureUri; - @Field(value = 4, subClass = IdToken.class) - private List tokens; - @Field(5) - private String password; - @Field(6) - private String accountType; - @Field(7) - private String generatedPassword; - - private Credential() { - } - - /** - * Returns the type of federated identity account used to sign in the user. While this may be - * any string, it is strongly recommended that values from {@link com.google.android.gms.auth.api.credentials.IdentityProviders} - * are used, which are the login domains for common identity providers. - * - * @return A string identifying the federated identity provider associated with this account, - * typically in the form of the identity provider's login domain. null will be returned if the - * credential is a password credential. - */ - public String getAccountType() { - return accountType; - } - - /** - * Returns the generated password for an account hint. - */ - public String getGeneratedPassword() { - return generatedPassword; - } - - /** - * Returns the credential identifier, typically an email address or user name, though it may - * also be some encoded unique identifier for a federated identity account. - */ - public String getId() { - return id; - } - - /** - * Returns the ID tokens that assert the identity of the user, if available. ID tokens provide - * a secure mechanism to verify that the user owns the identity asserted by the credential. - *

- * This is useful for account hints, where the ID token can replace the need to separately - * verify that the user owns their claimed email address - with a valid ID token, it is not - * necessary to send an account activation link to the address, simplifying the account - * creation process for the user. - *

- * A signed ID token is returned automatically for credential hints when the credential ID is a - * Google account that is authenticated on the device. This ID token can be sent along with - * your application's account creation operation, where the signature can be verified. - */ - public List getIdTokens() { - return tokens; - } - - /** - * Returns the display name of the credential, if available. Typically, the display name will - * be the name of the user, or some other string which the user can easily recognize and - * distinguish from other accounts they may have. - */ - public String getName() { - return name; - } - - /** - * Returns the password used to sign in the user. - */ - public String getPassword() { - return password; - } - - /** - * Returns the URL to an image of the user, if available. - */ - public Uri getProfilePictureUri() { - return profilePictureUri; - } - - @PublicApi(exclude = true) - public String getAsString() { - if (TextUtils.isEmpty(accountType)) { - return id.toLowerCase(Locale.US) + "|"; - } else { - Uri uri = Uri.parse(accountType); - return id.toLowerCase(Locale.US) + "|" + (TextUtils.isEmpty(uri.getScheme()) ? "" : uri.getScheme().toLowerCase(Locale.US)) + "://" + - (TextUtils.isEmpty(uri.getHost()) ? "unknown" : uri.getHost().toLowerCase(Locale.US)) + ":" + uri.getPort(); - } - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || !(o instanceof Credential)) return false; - - Credential that = (Credential) o; - - if (id != null ? !id.equals(that.id) : that.id != null) return false; - if (name != null ? !name.equals(that.name) : that.name != null) return false; - if (profilePictureUri != null ? !profilePictureUri.equals(that.profilePictureUri) : that.profilePictureUri != null) - return false; - if (password != null ? !password.equals(that.password) : that.password != null) - return false; - if (accountType != null ? !accountType.equals(that.accountType) : that.accountType != null) - return false; - return generatedPassword != null ? generatedPassword.equals(that.generatedPassword) : that.generatedPassword == null; - - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{id, name, profilePictureUri, password, accountType, generatedPassword}); - } - - public static class Builder { - private final String id; - private String name; - private Uri profilePictureUri; - private String password; - private String accountType; - - @PublicApi(exclude = true) - public List tokens; - @PublicApi(exclude = true) - private String generatedPassword; - - public Builder(String id) { - this.id = id; - } - - /** - * Copies the information stored in an existing credential, in order to allow that information to be modified. - * - * @param credential the existing credential - */ - public Builder(Credential credential) { - this.id = credential.id; - this.name = credential.name; - this.profilePictureUri = credential.profilePictureUri; - this.password = credential.password; - this.accountType = credential.accountType; - this.tokens = credential.tokens; - this.generatedPassword = credential.generatedPassword; - } - - public Credential build() { - Credential credential = new Credential(); - credential.id = id; - credential.name = name; - credential.profilePictureUri = profilePictureUri; - credential.password = password; - credential.accountType = accountType; - credential.tokens = tokens; - credential.generatedPassword = generatedPassword; - return credential; - } - - /** - * Specifies the account type for a federated credential. The value should be set to - * identity provider's login domain, such as "https://accounts.google.com" for Google - * accounts. The login domains for common identity providers are listed in {@link IdentityProviders}. - * - * @param accountType The type of the account. Typically, one of the values in {@link IdentityProviders}. - */ - public Builder setAccountType(String accountType) { - this.accountType = accountType; - return this; - } - - /** - * Sets the display name for the credential, which should be easy for the user to recognize - * as associated to the credential, and distinguishable from other credentials they may - * have. This string will be displayed more prominently than, or instead of, the account ID - * whenever available. In most cases, the name of the user is sufficient. - */ - public Builder setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the password for the credential. Either the password or the account type must be - * set for a credential, but not both. - */ - public Builder setPassword(String password) { - this.password = password; - return this; - } - - /** - * Sets a profile picture associated with the credential, typically a picture the user has - * selected to represent the account. - */ - public Builder setProfilePictureUri(Uri profilePictureUri) { - this.profilePictureUri = profilePictureUri; - return this; - } - } - - public static final Creator CREATOR = new AutoCreator(Credential.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java deleted file mode 100644 index 4cb1bbc..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -@PublicApi -public class CredentialPickerConfig extends AutoSafeParcelable { - - @Field(1000) - private final int versionCode = 1; - - @Field(1) - private boolean showAddAccountButton; - @Field(2) - private boolean showCancelButton; - @Field(3) - private boolean forNewAccount; - - private CredentialPickerConfig() { - } - - public CredentialPickerConfig(boolean showAddAccountButton, boolean showCancelButton, boolean forNewAccount) { - this.showAddAccountButton = showAddAccountButton; - this.showCancelButton = showCancelButton; - this.forNewAccount = forNewAccount; - } - - /** - * @deprecated It was determined that this method was not useful for developers. - */ - @Deprecated - public boolean isForNewAccount() { - return forNewAccount; - } - - public boolean shouldShowAddAccountButton() { - return showAddAccountButton; - } - - public boolean shouldShowCancelButton() { - return showCancelButton; - } - - @Override - public String toString() { - return "CredentialPickerConfig{" + - "showAddAccountButton=" + showAddAccountButton + - ", showCancelButton=" + showCancelButton + - '}'; - } - - public class Builder { - private boolean showAddAccountButton; - private boolean showCancelButton; - private boolean forNewAccount; - - public CredentialPickerConfig build() { - return new CredentialPickerConfig(showAddAccountButton, showCancelButton, forNewAccount); - } - - /** - * Sets whether the hint request is for a new account sign-up flow. - */ - public Builder setForNewAccount(boolean forNewAccount) { - this.forNewAccount = forNewAccount; - return this; - } - - /** - * Sets whether the add account button should be shown in credential picker dialog. - */ - public Builder setShowAddAccountButton(boolean showAddAccountButton) { - this.showAddAccountButton = showAddAccountButton; - return this; - } - - /** - * Sets whether the cancel button should be shown in credential picker dialog. - */ - public Builder setShowCancelButton(boolean showCancelButton) { - this.showCancelButton = showCancelButton; - return this; - } - } - - public static final Creator CREATOR = new AutoCreator(CredentialPickerConfig.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java deleted file mode 100644 index 6255fbf..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import org.microg.safeparcel.AutoSafeParcelable; - -/** - * Parameters for requesting a Credential, via Auth.CredentialsApi.request(). Instances can be - * created using CredentialRequest.Builder. - */ -public class CredentialRequest extends AutoSafeParcelable { - - @Field(1000) - private final int versionCode = 1; - - @Field(1) - private boolean passwordLoginSupported; - @Field(2) - private String[] accountTypes; - @Field(3) - private CredentialPickerConfig credentialPickerConfig; - @Field(4) - private CredentialPickerConfig credentialHintPickerConfig; - - private CredentialRequest() { } - - public CredentialRequest(boolean passwordLoginSupported, String[] accountTypes, CredentialPickerConfig credentialPickerConfig, CredentialPickerConfig credentialHintPickerConfig) { - this.passwordLoginSupported = passwordLoginSupported; - this.accountTypes = accountTypes; - this.credentialPickerConfig = credentialPickerConfig; - this.credentialHintPickerConfig = credentialHintPickerConfig; - } - - public String[] getAccountTypes() { - return accountTypes; - } - - public CredentialPickerConfig getCredentialHintPickerConfig() { - return credentialHintPickerConfig; - } - - public CredentialPickerConfig getCredentialPickerConfig() { - return credentialPickerConfig; - } - - /** - * @deprecated Use {@link #isPasswordLoginSupported()} - */ - @Deprecated - public boolean getSupportsPasswordLogin() { - return isPasswordLoginSupported(); - } - - public boolean isPasswordLoginSupported() { - return passwordLoginSupported; - } - - public static final Creator CREATOR = new AutoCreator(CredentialRequest.class); - - public static class Builder { - private boolean passwordLoginSupported; - private String[] accountTypes; - private CredentialPickerConfig credentialPickerConfig; - private CredentialPickerConfig credentialHintPickerConfig; - - public void setAccountTypes(String... accountTypes) { - this.accountTypes = accountTypes.clone(); - } - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java deleted file mode 100644 index 1f1cae8..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.Arrays; - -/** - * Parameters for requesting the display of the hint picker, via {@link CredentalsApi#getHintPickerIntent()}. - * Instances can be created using {@link HintRequest.Builder}. - */ -@PublicApi -public class HintRequest extends AutoSafeParcelable { - @Field(1000) - private final int versionCode = 2; - - @Field(1) - private CredentialPickerConfig hintPickerConfig; - @Field(2) - private boolean emailAddressIdentifierSupported; - @Field(3) - private boolean phoneNumberIdentifierSupported; - @Field(4) - private String[] accountTypes; - @Field(5) - private boolean idTokenRequested = true; - @Field(6) - private String serverClientId; - @Field(7) - private String idTokenNonce; - - private HintRequest() { - } - - public HintRequest(CredentialPickerConfig hintPickerConfig, boolean emailAddressIdentifierSupported, boolean phoneNumberIdentifierSupported, String[] accountTypes, boolean idTokenRequested, String serverClientId, String idTokenNonce) { - this.hintPickerConfig = hintPickerConfig; - this.emailAddressIdentifierSupported = emailAddressIdentifierSupported; - this.phoneNumberIdentifierSupported = phoneNumberIdentifierSupported; - this.accountTypes = accountTypes; - this.idTokenRequested = idTokenRequested; - this.serverClientId = serverClientId; - this.idTokenNonce = idTokenNonce; - } - - public String[] getAccountTypes() { - return accountTypes; - } - - public CredentialPickerConfig getHintPickerConfig() { - return hintPickerConfig; - } - - public String getIdTokenNonce() { - return idTokenNonce; - } - - public String getServerClientId() { - return serverClientId; - } - - public boolean isEmailAddressIdentifierSupported() { - return emailAddressIdentifierSupported; - } - - public boolean isPhoneNumberIdentifierSupported() { - return phoneNumberIdentifierSupported; - } - - public boolean isIdTokenRequested() { - return idTokenRequested; - } - - public static final Creator CREATOR = new AutoCreator<>(HintRequest.class); - - @Override - public String toString() { - return "HintRequest{" + - "hintPickerConfig=" + hintPickerConfig + - ", emailAddressIdentifierSupported=" + emailAddressIdentifierSupported + - ", phoneNumberIdentifierSupported=" + phoneNumberIdentifierSupported + - ", accountTypes=" + Arrays.toString(accountTypes) + - ", idTokenRequested=" + idTokenRequested + - ", serverClientId='" + serverClientId + '\'' + - ", idTokenNonce='" + idTokenNonce + '\'' + - '}'; - } - - public static class Builder { - private CredentialPickerConfig hintPickerConfig; - private boolean emailAddressIdentifierSupported; - private boolean phoneNumberIdentifierSupported; - private String[] accountTypes; - private boolean idTokenRequested = true; - private String serverClientId; - private String idTokenNonce; - - /** - * Builds a {@link HintRequest}. - */ - public HintRequest build() { - return new HintRequest(hintPickerConfig, emailAddressIdentifierSupported, phoneNumberIdentifierSupported, accountTypes, idTokenRequested, serverClientId, idTokenNonce); - } - - /** - * Sets the account types (identity providers) that are accepted by this application. - * It is strongly recommended that the strings listed in {@link IdentityProviders} be used for the most common - * identity providers, and strings representing the login domain of the identity provider be used for any - * others which are not listed. - * - * @param accountTypes The list of account types (identity providers) supported by the app. - * typically in the form of the associated login domain for each identity provider. - */ - public void setAccountTypes(String... accountTypes) { - this.accountTypes = accountTypes.clone(); - } - - /** - * Enables returning {@link Credential} hints where the identifier is an email address, intended for use with a password chosen by the user. - */ - public void setEmailAddressIdentifierSupported(boolean emailAddressIdentifierSupported) { - this.emailAddressIdentifierSupported = emailAddressIdentifierSupported; - } - - /** - * Sets the configuration for the hint picker dialog. - */ - public void setHintPickerConfig(CredentialPickerConfig hintPickerConfig) { - this.hintPickerConfig = hintPickerConfig; - } - - /** - * Specify a nonce value that should be included in any generated ID token for this request. - */ - public void setIdTokenNonce(String idTokenNonce) { - this.idTokenNonce = idTokenNonce; - } - - /** - * Specify whether an ID token should be acquired for hints, if available for the selected credential identifier. - * This is enabled by default; disable this if your app does not use ID tokens as part of authentication to decrease latency in retrieving credentials and credential hints. - */ - public void setIdTokenRequested(boolean idTokenRequested) { - this.idTokenRequested = idTokenRequested; - } - - /** - * Enables returning {@link Credential} hints where the identifier is a phone number, intended for use with a password chosen by the user or SMS verification. - */ - public void setPhoneNumberIdentifierSupported(boolean phoneNumberIdentifierSupported) { - this.phoneNumberIdentifierSupported = phoneNumberIdentifierSupported; - } - - /** - * Specify the server client ID for the backend associated with this app. - * If a Google ID token can be generated for a retrieved credential or hint, and the specified server client ID is correctly configured to be associated with the app, then it will be used as the audience of the generated token. - * If a null value is specified, the default audience will be used for the generated ID token. - */ - public void setServerClientId(String serverClientId) { - this.serverClientId = serverClientId; - } - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java deleted file mode 100644 index aa6d19d..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -@PublicApi -public class IdToken extends AutoSafeParcelable { - - @Field(1000) - private final int versionCode = 1; - - @Field(1) - private String accountType; - - @Field(2) - private String id; - - private IdToken() { - } - - public IdToken(String accountType, String id) { - this.accountType = accountType; - this.id = id; - } - - /** - * Returns {@code AccountManager} account type for the token. - */ - public String getAccountType() { - return accountType; - } - - /** - * Returns the ID token, formatted according to the rules defined by the account type. - */ - public String getIdToken() { - return id; - } - - public static final Creator CREATOR = new AutoCreator(IdToken.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java deleted file mode 100644 index 8cd24ee..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import android.accounts.Account; - -/** - * Identity provider constants for use with {@link CredentialRequest.Builder#setAccountTypes(String...)} - */ -public final class IdentityProviders { - public static final String FACEBOOK = "//www.facebook.com"; - public static final String GOOGLE = "//accounts.google.com"; - public static final String LINKEDIN = "//www.linkedin.com"; - public static final String MICROSOFT = "//login.live.com"; - public static final String PAYPAL = "//www.paypal.com"; - public static final String TWITTER = "//twitter.com"; - public static final String YAHOO = "//login.yahoo.com"; - - /** - * Attempts to translate the account type in the provided account into the string that should be used in the credentials API. - * - * @param account an account on the device. - * @return The identity provider string for use with the Credentials API, or {@code null} if the account type is unknown. - */ - public static String getIdentityProviderForAccount(Account account) { - return null; - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java deleted file mode 100644 index bd7ae6f..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.api.credentials.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class DeleteRequest extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator(DeleteRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java deleted file mode 100644 index 3da7a72..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.api.credentials.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GeneratePasswordRequest extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator(GeneratePasswordRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java deleted file mode 100644 index 5ec2599..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.api.credentials.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class SaveRequest extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator(SaveRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java deleted file mode 100644 index acca03a..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.proxy; - -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ProxyRequest extends AutoSafeParcelable { - public static final int HTTP_METHOD_GET = 0; - public static final int HTTP_METHOD_POST = 1; - public static final int HTTP_METHOD_PUT = 2; - public static final int HTTP_METHOD_DELETE = 3; - public static final int HTTP_METHOD_HEAD = 4; - public static final int HTTP_METHOD_OPTIONS = 5; - public static final int HTTP_METHOD_TRACE = 6; - public static final int HTTP_METHOD_PATCH = 7; - - @Field(1000) - private final int versionCode = 2; - @Field(1) - public String url; - @Field(2) - public int httpMethod; - @Field(3) - public long timeoutMillis; - @Field(4) - public byte[] body; - @Field(5) - public Bundle headers; - - @Override - public String toString() { - return url; - } - - public static final Creator CREATOR = new AutoCreator<>(ProxyRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java deleted file mode 100644 index b18d21b..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.proxy; - -import android.app.PendingIntent; -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ProxyResponse extends AutoSafeParcelable { - public static final int STATUS_CODE_NO_CONNECTION = -1; - - @Field(1000) - private final int versionCode = 1; - @Field(1) - public int gmsStatusCode; - @Field(2) - public PendingIntent recoveryAction; - @Field(3) - public int httpStatusCode; - @Field(4) - public Bundle headers; - @Field(5) - public byte[] body; - - public static final Creator CREATOR = new AutoCreator<>(ProxyResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java deleted file mode 100644 index d5f1d05..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.accounts.Account; - -import org.microg.gms.auth.AuthConstants; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AccountRecoveryGuidanceRequest extends AutoSafeParcelable { - - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - @Deprecated - public final String accountName; - @SafeParceled(3) - public final Account account; - - public AccountRecoveryGuidanceRequest(String accountName) { - this.accountName = accountName; - this.account = new Account(accountName, AuthConstants.DEFAULT_ACCOUNT_TYPE); - } - - public AccountRecoveryGuidanceRequest(Account account) { - this.accountName = account.name; - this.account = account; - } - - public static final Creator CREATOR = new AutoCreator(AccountRecoveryGuidanceRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java deleted file mode 100644 index 439825c..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.accounts.Account; - -import org.microg.gms.auth.AuthConstants; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AccountRemovalRequest extends AutoSafeParcelable { - - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - @Deprecated - public final String accountName; - @SafeParceled(3) - public final Account account; - - public AccountRemovalRequest(String accountName) { - this.accountName = accountName; - this.account = new Account(accountName, AuthConstants.DEFAULT_ACCOUNT_TYPE); - } - - public AccountRemovalRequest(Account account) { - this.accountName = account.name; - this.account = account; - } - - public static final Creator CREATOR = new AutoCreator(AccountRemovalRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java deleted file mode 100644 index 16142d6..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import com.google.android.gms.auth.firstparty.shared.AccountCredentials; -import com.google.android.gms.auth.firstparty.shared.CaptchaSolution; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class ConfirmCredentialsRequest extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - public AccountCredentials accountCredentials; - @SafeParceled(3) - public CaptchaSolution captchaSolution; - - public static final Creator CREATOR = new AutoCreator(ConfirmCredentialsRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java deleted file mode 100644 index 099e56f..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.accounts.Account; -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -// TODO -public class TokenRequest extends AutoSafeParcelable{ - - @SafeParceled(1) - private final int versionCode = 4; - @SafeParceled(3) - public String accountName; - @SafeParceled(4) - public Bundle extras; - @SafeParceled(9) - public String consent; - @SafeParceled(15) - public String accountType; - - public Account getAccount() { - return new Account(accountName, accountType); - } - - public static final Creator CREATOR = new AutoCreator(TokenRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java deleted file mode 100644 index 999e9a9..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -public class TokenResponse { -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java deleted file mode 100644 index d4308ef..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.delegate; - -import android.accounts.Account; -import android.accounts.AccountAuthenticatorResponse; -import android.os.Bundle; - -import com.google.android.gms.auth.firstparty.shared.AppDescription; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class ConfirmCredentialsWorkflowRequest extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 3; - @SafeParceled(2) - public String accountName; - @SafeParceled(3) - public AppDescription appDescription; - @SafeParceled(4) - public Bundle extras; - @SafeParceled(5) - public Account account; - @SafeParceled(6) - public AccountAuthenticatorResponse accountAuthenticatorResponse; - - public static final Creator CREATOR = new AutoCreator(ConfirmCredentialsWorkflowRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/proximity/data/Permit.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/proximity/data/Permit.java deleted file mode 100644 index 139bf29..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/proximity/data/Permit.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.proximity.data; - -public class Permit { -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java deleted file mode 100644 index 33995a9..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.shared; - -import android.accounts.Account; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -// TODO -public class AccountCredentials extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 2; - @SafeParceled(3) - public String accountName; - @SafeParceled(9) - public String accountType; - - public Account getAccount() { - return new Account(accountName, accountType); - } - - public static final Creator CREATOR = new AutoCreator(AccountCredentials.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java deleted file mode 100644 index efa4b2b..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.shared; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AppDescription extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - public int callingUid; - @SafeParceled(3) - public String sessiondId; - @SafeParceled(4) - public String sessiondSig; - @SafeParceled(5) - public String callingPkg; - - public static final Creator CREATOR = new AutoCreator(AppDescription.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java deleted file mode 100644 index c0cb932..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.shared; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -// TODO -public class CaptchaSolution extends AutoSafeParcelable { - - @SafeParceled(1) - private final int versionCode = 1; - - public static final Creator CREATOR = new AutoCreator(CaptchaSolution.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/clearcut/LogEventParcelable.java b/play-services-api/src/main/java/com/google/android/gms/clearcut/LogEventParcelable.java deleted file mode 100644 index cb9cb2e..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/clearcut/LogEventParcelable.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.clearcut; - -import android.util.Base64; - -import com.google.android.gms.clearcut.internal.LogVerifierResultParcelable; -import com.google.android.gms.clearcut.internal.PlayLoggerContext; -import com.mgoogle.android.gms.phenotype.ExperimentToken; -import com.mgoogle.android.gms.phenotype.GenericDimension; - -import org.microg.safeparcel.AutoSafeParcelable; - -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; - -public class LogEventParcelable extends AutoSafeParcelable { - @Field(1) - private final int versionCode = 1; - - @Field(2) - public final PlayLoggerContext context; - - @Field(3) - public final byte[] bytes; - - @Field(4) - public final int[] testCodes; - - @Field(5) - public final String[] mendelPackages; - - @Field(6) - public final int[] experimentIds; - - @Field(7) - public final byte[][] experimentTokens; - - @Field(8) - public final boolean addPhenotypeExperimentTokens; - - @Field(9) - public final ExperimentToken[] experimentTokenParcelables; - - @Field(10) - public final GenericDimension[] genericDimensions; - - @Field(11) - public final LogVerifierResultParcelable logVerifierResult; - - private LogEventParcelable() { - context = null; - bytes = null; - testCodes = experimentIds = null; - mendelPackages = null; - experimentTokens = null; - addPhenotypeExperimentTokens = false; - experimentTokenParcelables = null; - genericDimensions = null; - logVerifierResult = null; - } - - public LogEventParcelable(PlayLoggerContext context, byte[] bytes, int[] testCodes, String[] mendelPackages, int[] experimentIds, byte[][] experimentTokens, boolean addPhenotypeExperimentTokens) { - this.context = context; - this.bytes = bytes; - this.testCodes = testCodes; - this.mendelPackages = mendelPackages; - this.experimentIds = experimentIds; - this.experimentTokens = experimentTokens; - this.addPhenotypeExperimentTokens = addPhenotypeExperimentTokens; - this.experimentTokenParcelables = null; - this.genericDimensions = null; - this.logVerifierResult = null; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("LogEventParcelable[") - .append(versionCode).append(", ").append(context) - .append(", LogEventBytes: ").append(getBytesAsString()); - if (testCodes != null) sb.append(", TestCodes: ").append(Arrays.toString(testCodes)); - if (mendelPackages != null) - sb.append(", MendelPackages: ").append(Arrays.toString(mendelPackages)); - if (experimentIds != null) - sb.append(", ExperimentIds: ").append(Arrays.toString(experimentIds)); - if (experimentTokens != null) - sb.append(", ExperimentTokens: ").append(Arrays.toString(experimentTokens)); - return sb.append(", AddPhenotypeExperimentTokens: ").append(addPhenotypeExperimentTokens) - .append(']').toString(); - } - - private String getBytesAsString() { - if (bytes == null) return "null"; - try { - CharsetDecoder d = StandardCharsets.US_ASCII.newDecoder(); - CharBuffer r = d.decode(ByteBuffer.wrap(bytes)); - return r.toString(); - } catch (Exception e) { - return Base64.encodeToString(bytes, Base64.NO_WRAP); - } - } - - public static final Creator CREATOR = new AutoCreator(LogEventParcelable.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/clearcut/internal/LogVerifierResultParcelable.java b/play-services-api/src/main/java/com/google/android/gms/clearcut/internal/LogVerifierResultParcelable.java deleted file mode 100644 index 4b1fa83..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/clearcut/internal/LogVerifierResultParcelable.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.clearcut.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class LogVerifierResultParcelable extends AutoSafeParcelable { - @Field(1) - public boolean b; - - public static final Creator CREATOR = new AutoCreator<>(LogVerifierResultParcelable.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/clearcut/internal/PlayLoggerContext.java b/play-services-api/src/main/java/com/google/android/gms/clearcut/internal/PlayLoggerContext.java deleted file mode 100644 index 8579940..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/clearcut/internal/PlayLoggerContext.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.clearcut.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class PlayLoggerContext extends AutoSafeParcelable { - - @Field(1) - private final int versionCode = 1; - - @Field(2) - public final String packageName; - - @Field(3) - public final int packageVersionCode; - - @Field(4) - public final int logSource; - - @Field(5) - public final String uploadAccount; - - @Field(6) - public final String loggingId; - - @Field(7) - public final boolean logAndroidId; - - @Field(8) - public final String logSourceName; - - @Field(9) - public final boolean isAnonymous; - - @Field(10) - public final int qosTier; - - @Field(11) - public final Integer appMobileSpecId; - - @Field(12) - public final boolean scrubMccMnc; - - @Field(13) - public final Integer piiLevelset; - - private PlayLoggerContext() { - packageName = uploadAccount = logSourceName = loggingId = null; - qosTier = packageVersionCode = logSource = appMobileSpecId = piiLevelset = -1; - isAnonymous = logAndroidId = scrubMccMnc = false; - } - - public PlayLoggerContext(String packageName, int packageVersionCode, int logSource, String logSourceName, String uploadAccount, String loggingId, boolean isAnonymous, int qosTier, boolean scrubMccMnc, int piiLevelset) { - this.packageName = packageName; - this.packageVersionCode = packageVersionCode; - this.logSource = logSource; - this.logSourceName = logSourceName; - this.uploadAccount = uploadAccount; - this.loggingId = loggingId; - this.logAndroidId = !isAnonymous; - this.isAnonymous = isAnonymous; - this.qosTier = qosTier; - this.appMobileSpecId = null; - this.scrubMccMnc = scrubMccMnc; - this.piiLevelset = piiLevelset; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("PlayLoggerContext[").append(versionCode); - sb.append(", package=").append(packageName); - sb.append(", packageVersionCode=").append(packageVersionCode); - sb.append(", logSource=").append(logSource); - sb.append(", uploadAccount=").append(uploadAccount); - sb.append(", loggingId=").append(loggingId); - sb.append(", logAndroidId=").append(logAndroidId); - sb.append(", logSourceName=").append(logSourceName); - sb.append(", isAnonymous=").append(isAnonymous); - sb.append(", qosTier=").append(qosTier); - sb.append(", appMobileSpecId=").append(appMobileSpecId); - sb.append(", scrubMccMnc=").append(scrubMccMnc); - sb.append(", piiLevelset=").append(piiLevelset); - sb.append(']'); - return sb.toString(); - } - - public static Creator CREATOR = new AutoCreator(PlayLoggerContext.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java b/play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java deleted file mode 100644 index 826d1c3..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.os.RemoteException; - -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.dynamic.ObjectWrapper; - -import java.util.Arrays; - -public class CertData extends ICertData.Stub { - private final byte[] bytes; - private final int hashCode; - - public CertData(byte[] bytes) { - this.bytes = bytes; - if (bytes.length < 25) throw new RuntimeException("CertData to small"); - hashCode = Arrays.hashCode(Arrays.copyOfRange(bytes, 0, 25)); - } - - @Override - public int hashCode() { - return hashCode; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ICertData)) return false; - ICertData cert = (ICertData) obj; - try { - if (cert.remoteHashCode() != hashCode()) return false; - return Arrays.equals(ObjectWrapper.unwrapTyped(cert.getWrappedBytes(), byte[].class), getBytes()); - } catch (RemoteException e) { - return false; - } - } - - public byte[] getBytes() { - return bytes; - } - - @Override - public IObjectWrapper getWrappedBytes() throws RemoteException { - return ObjectWrapper.wrap(getBytes()); - } - - @Override - public int remoteHashCode() throws RemoteException { - return hashCode(); - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java b/play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java deleted file mode 100644 index c824027..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.os.IBinder; -import android.os.RemoteException; - -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.dynamic.ObjectWrapper; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GoogleCertificatesQuery extends AutoSafeParcelable { - @SafeParceled(1) - private String packageName; - @SafeParceled(2) - private IBinder certDataBinder; - private CertData certData; - @SafeParceled(3) - private boolean allowNonRelease; - - public String getPackageName() { - return packageName; - } - - public CertData getCertData() { - if (certData == null && certDataBinder != null) { - ICertData iCertData = null; - if (certDataBinder instanceof CertData) { - certData = (CertData) certDataBinder; - } else if (certDataBinder instanceof IObjectWrapper) { - certData = ObjectWrapper.unwrapTyped((IObjectWrapper) certDataBinder, CertData.class); - if (certData == null) { - byte[] bytes = ObjectWrapper.unwrapTyped((IObjectWrapper) certDataBinder, byte[].class); - if (bytes != null) { - certData = new CertData(bytes); - } - } - if (certData == null) { - iCertData = ObjectWrapper.unwrapTyped((IObjectWrapper) certDataBinder, ICertData.class); - } - } else if (certDataBinder instanceof ICertData) { - iCertData = (ICertData) certDataBinder; - } - if (iCertData != null) { - try { - byte[] bytes = ObjectWrapper.unwrapTyped(iCertData.getWrappedBytes(), byte[].class); - if (bytes != null) { - certData = new CertData(bytes); - } - } catch (RemoteException e) { - // Ignore - } - } - } - return certData; - } - - public static final Creator CREATOR = new AutoCreator(GoogleCertificatesQuery.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java b/play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java deleted file mode 100644 index 6f10959..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.server; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class FavaDiagnosticsEntity extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator(FavaDiagnosticsEntity.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java deleted file mode 100644 index c74383e..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.facs.cache; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class FacsCacheCallOptions extends AutoSafeParcelable { - @Field(1) - public String instanceId; - @Field(2) - public long version; - - public static final Creator CREATOR = new AutoCreator<>(FacsCacheCallOptions.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java deleted file mode 100644 index 18f2177..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.facs.cache; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ForceSettingsCacheRefreshResult extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(ForceSettingsCacheRefreshResult.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java deleted file mode 100644 index 6be6139..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.facs.cache; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GetActivityControlsSettingsResult extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(GetActivityControlsSettingsResult.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java deleted file mode 100644 index b89f861..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.facs.cache; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ReadDeviceLevelSettingsResult extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(ReadDeviceLevelSettingsResult.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java deleted file mode 100644 index 4ef2c91..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.facs.cache; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class UpdateActivityControlsSettingsResult extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(UpdateActivityControlsSettingsResult.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/identity/accounts/api/AccountData.java b/play-services-api/src/main/java/com/google/android/gms/identity/accounts/api/AccountData.java deleted file mode 100644 index d909cbf..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/identity/accounts/api/AccountData.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.identity.accounts.api; - -public class AccountData { -} diff --git a/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/CountrySpecification.java b/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/CountrySpecification.java deleted file mode 100644 index b9770e3..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/CountrySpecification.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.identity.intents.model; - -public class CountrySpecification { -} diff --git a/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/UserAddress.java b/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/UserAddress.java deleted file mode 100644 index aa3959f..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/UserAddress.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.identity.intents.model; - -public class UserAddress { -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/api/internal/InitializationParams.java b/play-services-api/src/main/java/com/google/android/gms/measurement/api/internal/InitializationParams.java deleted file mode 100644 index 43d7ff7..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/api/internal/InitializationParams.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.api.internal; - -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class InitializationParams extends AutoSafeParcelable { - @Field(1) - public long field1; - @Field(2) - public long field2; - @Field(3) - public boolean field3; - @Field(4) - public String field4; - @Field(5) - public String field5; - @Field(6) - public String field6; - @Field(7) - public Bundle field7; - @Field(8) - public String field8; - - @Override - public String toString() { - return "InitializationParams{" + - "field1=" + field1 + - ", field2=" + field2 + - ", field3=" + field3 + - ", field4='" + field4 + '\'' + - ", field5='" + field5 + '\'' + - ", field6='" + field6 + '\'' + - ", field7=" + field7 + - ", field8='" + field8 + '\'' + - '}'; - } - - public static final Creator CREATOR = new AutoCreator<>(InitializationParams.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java deleted file mode 100644 index b2b38f3..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.List; - -public class AppMetadata extends AutoSafeParcelable { - @Field(2) - public String packageName; - @Field(3) - public String googleAppId; - @Field(4) - public String versionName; - @Field(5) - public String installerPackageName; - @Field(6) - private long field6; - @Field(7) - private long field7; - @Field(8) - private String field8; - @Field(9) - private final boolean field9 = true; - @Field(10) - private boolean field10; - @Field(11) - public long versionCode = Integer.MIN_VALUE; - @Field(12) - private String field12; - @Field(13) - private long field13; - @Field(14) - private long field14; - @Field(15) - public int appType; - @Field(16) - private boolean field16; - @Field(17) - public boolean ssaidCollectionEnabled = true; - @Field(18) - public boolean deferredAnalyticsCollection; - @Field(19) - public String admobAppId; - @Field(21) - public Boolean allowAdPersonalization; - @Field(22) - private long field22; - @Field(23) - public List safelistedEvents; - @Field(24) - public String gaAppId; - @Field(25) - private String field25; - - public String toString() { - return "AppMetadata[" + packageName + "]"; - } - - public static final Creator CREATOR = new AutoCreator<>(AppMetadata.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.java b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.java deleted file mode 100644 index 108c8ef..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ConditionalUserPropertyParcel extends AutoSafeParcelable { - @Field(2) - public String appId; - @Field(3) - public String origin; - @Field(4) - public UserAttributeParcel userAttribute; - @Field(5) - public long creationTimestamp; - @Field(6) - public boolean active; - @Field(7) - public String triggerEventName; - @Field(8) - public EventParcel timedOutEvent; - @Field(9) - public long triggerTimeout; - @Field(10) - public EventParcel triggerEvent; - @Field(11) - public long timeToLive; - @Field(12) - public EventParcel expiredEvent; - - public static final Creator CREATOR = new AutoCreator<>(ConditionalUserPropertyParcel.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParams.java b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParams.java deleted file mode 100644 index 54de139..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParams.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.internal; - -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class EventParams extends AutoSafeParcelable { - @Field(2) - public Bundle data; - - public static final Creator CREATOR = new AutoCreator<>(EventParams.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParcel.java b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParcel.java deleted file mode 100644 index 7b5b617..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParcel.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class EventParcel extends AutoSafeParcelable { - @Field(2) - public String name; - @Field(3) - public EventParams params; - @Field(4) - public String origin; - @Field(5) - public long timestamp; - - public static final Creator CREATOR = new AutoCreator<>(EventParcel.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/UserAttributeParcel.java b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/UserAttributeParcel.java deleted file mode 100644 index d9c7466..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/UserAttributeParcel.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class UserAttributeParcel extends AutoSafeParcelable { - @Field(1) - public int field1; - @Field(2) - public String name; - @Field(3) - public long timestamp; - @Field(4) - public Long field4; - @Field(6) - public String field6; - @Field(7) - public String field7; - @Field(8) - public Double field8; - - public static final Creator CREATOR = new AutoCreator<>(UserAttributeParcel.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java b/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java deleted file mode 100644 index d0a7a74..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.people.internal; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class ParcelableLoadImageOptions extends AutoSafeParcelable { - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public int imageSize; - - @SafeParceled(2) - public int avatarOptions; - - @SafeParceled(3) - public boolean useLargePictureForCp2Images; - - public static final Creator CREATOR = new AutoCreator(ParcelableLoadImageOptions.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java b/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java deleted file mode 100644 index 53038bb..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.people.model; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AccountMetadata extends AutoSafeParcelable { - - @SafeParceled(1) - private final int versionCode = 2; - - @SafeParceled(2) - public boolean hasGooglePlus = true; - - @SafeParceled(3) - public boolean hasFeature2 = true; - - @SafeParceled(4) - public boolean hasFeature3 = true; - - @SafeParceled(5) - public boolean hasFeature4 = true; - - public static Creator CREATOR = new AutoCreator(AccountMetadata.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java b/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java deleted file mode 100644 index b03af38..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.people.model; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AvatarReference extends AutoSafeParcelable { - - @SafeParceled(1000) - private int versionCode; - - @SafeParceled(1) - public int source; - - @SafeParceled(2) - public String location; - - public static final Creator CREATOR = new AutoCreator(AvatarReference.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/playlog/internal/LogEvent.java b/play-services-api/src/main/java/com/google/android/gms/playlog/internal/LogEvent.java deleted file mode 100644 index 5b129ba..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/playlog/internal/LogEvent.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.playlog.internal; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Date; - -@Deprecated -public class LogEvent extends AutoSafeParcelable { - - @SafeParceled(1) - private final int versionCode = 1; - - @SafeParceled(2) - public final long eventTime; - - @SafeParceled(3) - public final String tag; - - @SafeParceled(4) - public final byte[] data; - - private LogEvent() { - eventTime = -1; - tag = null; - data = null; - } - - @Override - public String toString() { - return "LogEvent{" + - "eventTime=" + new Date(eventTime) + - ", tag='" + tag + '\'' + - ", data=" + (data == null ? "null" : ('\'' + new String(data) + '\'')) + - '}'; - } - - public static Creator CREATOR = new AutoCreator(LogEvent.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java deleted file mode 100644 index 8e91b86..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.corpora; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ClearCorpusRequest extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(ClearCorpusRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java deleted file mode 100644 index 2da1509..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.corpora; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GetCorpusInfoRequest extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator(GetCorpusInfoRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java deleted file mode 100644 index 923fa08..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.corpora; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GetCorpusStatusRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final String packageName; - - @SafeParceled(2) - public final String corpus; - - private GetCorpusStatusRequest() { - packageName = null; - corpus = null; - } - - @Override - public String toString() { - return "GetCorpusStatusRequest{" + - "versionCode=" + versionCode + - ", packageName='" + packageName + '\'' + - ", corpus='" + corpus + '\'' + - '}'; - } - - public static Creator CREATOR = new AutoCreator(GetCorpusStatusRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java deleted file mode 100644 index 2611d67..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.corpora; - -import com.google.android.gms.appdatasearch.CorpusStatus; -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GetCorpusStatusResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private int versionCode; - - @SafeParceled(1) - public final Status status; - - @SafeParceled(2) - public final CorpusStatus corpusStatus; - - private GetCorpusStatusResponse() { - status = null; - corpusStatus = null; - } - - public GetCorpusStatusResponse(Status status, CorpusStatus corpusStatus) { - this.status = status; - this.corpusStatus = corpusStatus; - } - - public static Creator CREATOR = new AutoCreator(GetCorpusStatusResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java deleted file mode 100644 index 5ad820e..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.corpora; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class RequestIndexingRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final String packageName; - - @SafeParceled(2) - public final String corpus; - - @SafeParceled(3) - public final long sequenceNumber; - - private RequestIndexingRequest() { - packageName = null; - corpus = null; - sequenceNumber = 0; - } - - @Override - public String toString() { - return "RequestIndexingRequest{" + - "versionCode=" + versionCode + - ", packageName='" + packageName + '\'' + - ", corpus='" + corpus + '\'' + - ", sequenceNumber=" + sequenceNumber + - '}'; - } - - public static Creator CREATOR = new AutoCreator(RequestIndexingRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java deleted file mode 100644 index cf25d6a..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.corpora; - -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class RequestIndexingResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private int versionCode; - - @SafeParceled(1) - public final Status status; - - @SafeParceled(2) - public final boolean scheduledIndexing; - - private RequestIndexingResponse() { - status = null; - scheduledIndexing = false; - } - - public RequestIndexingResponse(Status status, boolean scheduledIndexing) { - this.status = status; - this.scheduledIndexing = scheduledIndexing; - } - - public static Creator CREATOR = new AutoCreator(RequestIndexingResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.java deleted file mode 100644 index 4f4fb2f..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GetCurrentExperimentIdsRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - public static final Creator CREATOR = new AutoCreator(GetCurrentExperimentIdsRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.java deleted file mode 100644 index d7c03e8..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Arrays; - -public class GetCurrentExperimentIdsResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final Status status; - - @SafeParceled(2) - public final int[] experimentIds; - - private GetCurrentExperimentIdsResponse() { - status = null; - experimentIds = null; - } - - public GetCurrentExperimentIdsResponse(Status status, int[] experimentIds) { - this.status = status; - this.experimentIds = experimentIds; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("GetCurrentExperimentIdsResponse{"); - sb.append("status=").append(status); - sb.append(", experimentIds=").append(Arrays.toString(experimentIds)); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(GetCurrentExperimentIdsResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.java deleted file mode 100644 index d00af63..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GetGlobalSearchSourcesRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public boolean bool; - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("GetGlobalSearchSourcesRequest{"); - sb.append("bool=").append(bool); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(GetGlobalSearchSourcesRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.java deleted file mode 100644 index e972d4e..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import android.os.Parcelable; - -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Arrays; - -public class GetGlobalSearchSourcesResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final Status status; - - @SafeParceled(2) - public final Parcelable[] sources; - - private GetGlobalSearchSourcesResponse() { - status = null; - sources = null; - } - - public GetGlobalSearchSourcesResponse(Status status, Parcelable[] sources) { - this.status = status; - this.sources = sources; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("GetGlobalSearchSourcesResponse{"); - sb.append("status=").append(status); - sb.append(", sources=").append(Arrays.toString(sources)); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(GetGlobalSearchSourcesResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.java deleted file mode 100644 index 38c0a3b..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GetPendingExperimentIdsRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - public static final Creator CREATOR = new AutoCreator(GetPendingExperimentIdsRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.java deleted file mode 100644 index 0f05c33..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Arrays; - -public class GetPendingExperimentIdsResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final Status status; - - @SafeParceled(2) - public final int[] experimentIds; - - private GetPendingExperimentIdsResponse() { - status = null; - experimentIds = null; - } - - public GetPendingExperimentIdsResponse(Status status, int[] experimentIds) { - this.status = status; - this.experimentIds = experimentIds; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("GetPendingExperimentIdsResponse{"); - sb.append("status=").append(status); - sb.append(", experimentIds=").append(Arrays.toString(experimentIds)); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(GetPendingExperimentIdsResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsRequest.java deleted file mode 100644 index c1c5001..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsRequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Arrays; - -public class SetExperimentIdsRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public byte[] experimentIds; - - @SafeParceled(2) - public boolean enable; - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SetExperimentIdsRequest{"); - sb.append("experimentIds=").append(Arrays.toString(experimentIds)); - sb.append(", enable=").append(enable); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(SetExperimentIdsRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsResponse.java deleted file mode 100644 index ae31e4f..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class SetExperimentIdsResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final Status status; - - private SetExperimentIdsResponse() { - status = null; - } - - public SetExperimentIdsResponse(Status status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SetExperimentIdsResponse{"); - sb.append("status=").append(status); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(SetExperimentIdsResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.java deleted file mode 100644 index ca8ef82..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class SetIncludeInGlobalSearchRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public String packageName; - - @SafeParceled(2) - public String source; - - @SafeParceled(3) - public boolean enabled; - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SetIncludeInGlobalSearchRequest{"); - sb.append("packageName='").append(packageName).append('\''); - sb.append(", source='").append(source).append('\''); - sb.append(", enabled=").append(enabled); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(SetIncludeInGlobalSearchRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.java deleted file mode 100644 index d31ea04..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.global; - -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class SetIncludeInGlobalSearchResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final Status status; - - private SetIncludeInGlobalSearchResponse() { - status = null; - } - - public SetIncludeInGlobalSearchResponse(Status status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SetIncludeInGlobalSearchResponse{"); - sb.append("status=").append(status); - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator(SetIncludeInGlobalSearchResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java deleted file mode 100644 index b3f42a2..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.queries; - -import com.google.android.gms.appdatasearch.QuerySpecification; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Arrays; - -public class QueryRequest extends AutoSafeParcelable { - - @SafeParceled(1000) - public int versionCode = 1; - @SafeParceled(1) - public String searchString; - @SafeParceled(2) - public String packageName; - @SafeParceled(3) - public String[] corpora; - @SafeParceled(4) - public int d; - @SafeParceled(5) - public int e; - @SafeParceled(6) - public QuerySpecification spec; - - @Override - public String toString() { - return "QueryRequest{" + - "versionCode=" + versionCode + - ", searchString='" + searchString + '\'' + - ", packageName='" + packageName + '\'' + - ", corpora=" + Arrays.toString(corpora) + - ", d=" + d + - ", e=" + e + - ", spec=" + spec + - '}'; - } - - public static Creator CREATOR = new AutoCreator(QueryRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java deleted file mode 100644 index 6b9132b..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.search.queries; - -import com.google.android.gms.appdatasearch.SearchResults; -import com.google.android.gms.common.api.Status; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class QueryResponse extends AutoSafeParcelable { - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - public final Status status; - - @SafeParceled(2) - public final SearchResults results; - - private QueryResponse() { - status = null; - results = null; - } - - public QueryResponse(Status status, SearchResults results) { - this.status = status; - this.results = results; - } - - public static Creator CREATOR = new AutoCreator(QueryResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/usagereporting/UsageReportingOptInOptions.java b/play-services-api/src/main/java/com/google/android/gms/usagereporting/UsageReportingOptInOptions.java deleted file mode 100644 index 0e7ec10..0000000 --- a/play-services-api/src/main/java/com/google/android/gms/usagereporting/UsageReportingOptInOptions.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.usagereporting; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class UsageReportingOptInOptions extends AutoSafeParcelable { - @Field(2) - public int optInUsageReporting; - - public static final Creator CREATOR = new AutoCreator<>(UsageReportingOptInOptions.class); -} diff --git a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Configuration.java b/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Configuration.java deleted file mode 100644 index b51ab17..0000000 --- a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Configuration.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.mgoogle.android.gms.phenotype; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class Configuration extends AutoSafeParcelable { - @Field(2) - public int field2; - @Field(3) - public Flag[] field3; - @Field(4) - public String[] field4; - public static final Creator CREATOR = new AutoCreator<>(Configuration.class); -} diff --git a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Configurations.java b/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Configurations.java deleted file mode 100644 index 8b03226..0000000 --- a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Configurations.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.mgoogle.android.gms.phenotype; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class Configurations extends AutoSafeParcelable { - @Field(2) - public String field2; - @Field(3) - public String field3; - @Field(4) - public Configuration[] field4; - @Field(5) - public boolean field5; - @Field(6) - public byte[] field6; - @Field(7) - public long field7; - - public static final Creator CREATOR = new AutoCreator<>(Configurations.class); -} diff --git a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/ExperimentToken.java b/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/ExperimentToken.java deleted file mode 100644 index 4984686..0000000 --- a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/ExperimentToken.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.mgoogle.android.gms.phenotype; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ExperimentToken extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(ExperimentToken.class); -} diff --git a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Flag.java b/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Flag.java deleted file mode 100644 index aa6bba2..0000000 --- a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/Flag.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.mgoogle.android.gms.phenotype; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class Flag extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(Flag.class); -} diff --git a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/GenericDimension.java b/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/GenericDimension.java deleted file mode 100644 index 40e46bd..0000000 --- a/play-services-api/src/main/java/com/mgoogle/android/gms/phenotype/GenericDimension.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.mgoogle.android.gms.phenotype; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GenericDimension extends AutoSafeParcelable { - @Field(1) - public int a; - @Field(2) - public int b; - - public static final Creator CREATOR = new AutoCreator<>(GenericDimension.class); -} diff --git a/play-services-base-api/build.gradle b/play-services-base-api/build.gradle deleted file mode 100644 index f4055b1..0000000 --- a/play-services-base-api/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -dependencies { - api project(':play-services-basement') -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - aidlPackageWhiteList "com/google/android/gms/common/data/DataHolder.aidl" - aidlPackageWhiteList "com/google/android/gms/common/images/WebImage.aidl" - aidlPackageWhiteList "com/google/android/gms/common/api/internal/IStatusCallback.aidl" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} \ No newline at end of file diff --git a/play-services-base-api/src/main/AndroidManifest.xml b/play-services-base-api/src/main/AndroidManifest.xml deleted file mode 100644 index 7c8eeef..0000000 --- a/play-services-base-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl b/play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl deleted file mode 100644 index 6355a13..0000000 --- a/play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.common.api.internal; - -import com.google.android.gms.common.api.Status; - -interface IStatusCallback { - void onResult(in Status status); -} diff --git a/play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl b/play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl deleted file mode 100644 index 3bbd117..0000000 --- a/play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.data; - -parcelable DataHolder; diff --git a/play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl b/play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl deleted file mode 100644 index e31f15a..0000000 --- a/play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.images; - -parcelable WebImage; diff --git a/play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java b/play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java deleted file mode 100644 index 031c5b3..0000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.signin; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GoogleSignInAccount extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(GoogleSignInAccount.class); -} diff --git a/play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java b/play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java deleted file mode 100644 index c154b3e..0000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.data; - -import android.annotation.SuppressLint; -import android.content.ContentValues; -import android.database.AbstractWindowedCursor; -import android.database.CharArrayBuffer; -import android.database.Cursor; -import android.database.CursorWindow; -import android.net.Uri; -import android.os.Build; -import android.os.Bundle; -import android.os.Parcel; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.io.Closeable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Class for accessing collections of data, organized into columns. This provides the backing - * support for DataBuffer. Much like a cursor, the holder supports the notion of a current - * position, and has methods for extracting various types of data from named columns. - */ -@PublicApi(until = "1") -public class DataHolder extends AutoSafeParcelable implements Closeable { - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - private final String[] columns; - - @SafeParceled(2) - private final CursorWindow[] windows; - - @SafeParceled(3) - private final int statusCode; - - @SafeParceled(4) - private final Bundle metadata; - - private boolean closed = false; - private Map columnIndices; - - protected static final int FIELD_TYPE_NULL = 0; - protected static final int FIELD_TYPE_INTEGER = 1; - protected static final int FIELD_TYPE_FLOAT = 2; - protected static final int FIELD_TYPE_STRING = 3; - protected static final int FIELD_TYPE_BLOB = 4; - - private DataHolder() { - columns = null; - windows = null; - statusCode = 0; - metadata = null; - } - - /** - * Creates a data holder with the specified data. - * - * @param columns The column names corresponding to the data in the given windows. - * @param windows The {@link CursorWindow} instances holding the data. - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - */ - public DataHolder(String[] columns, CursorWindow[] windows, int statusCode, Bundle metadata) { - this.columns = columns; - this.windows = windows; - this.statusCode = statusCode; - this.metadata = metadata; - validateContents(); - } - - /** - * Creates a data holder wrapping the provided cursor, with provided status code and metadata. - * - * @param cursor The cursor containing the data. - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - */ - public DataHolder(AbstractWindowedCursor cursor, int statusCode, Bundle metadata) { - this(cursor.getColumnNames(), createCursorWindows(cursor), statusCode, metadata); - } - - /** - * Creates a data holder wrapping the provided cursor, with provided status code and metadata. - * - * @param cursor The cursor containing the data. - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - */ - public DataHolder(Cursor cursor, int statusCode, Bundle metadata) { - this(cursor.getColumnNames(), createCursorWindows(cursor), statusCode, metadata); - } - - /** - * Get a {@link DataHolder.Builder} to create a new {@link DataHolder} manually. - * - * @param columns The array of column names that the object supports. - * @param uniqueColumn The non-null column name that must contain unique values. New rows added to the builder with the same value in this column will replace any older rows. - * @return {@link DataHolder.Builder} object to work with. - */ - public static Builder builder(String[] columns, String uniqueColumn) { - return new Builder(columns, uniqueColumn); - } - - /** - * Get a {@link DataHolder.Builder} to create a new {@link DataHolder} manually. - * - * @param columns The array of column names that the object supports. - * @return {@link DataHolder.Builder} object to work with. - */ - public static Builder builder(String[] columns) { - return builder(columns, null); - } - - /** - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - * @return An empty {@link DataHolder} object with the given status and metadata. - */ - public static DataHolder empty(int statusCode, Bundle metadata) { - return new DataHolder(new String[0], new CursorWindow[0], statusCode, metadata); - } - - /** - * @param statusCode The status code of this {@link DataHolder}. - * @return An empty {@link DataHolder} object with the given status and null metadata. - */ - public static DataHolder empty(int statusCode) { - return empty(statusCode, null); - } - - @SuppressWarnings("deprecation") - @SuppressLint({"NewApi", "ObsoleteSdkInt"}) - static int getCursorType(Cursor cursor, int i) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { - return cursor.getType(i); - } - if (cursor instanceof AbstractWindowedCursor) { - CursorWindow cursorWindow = ((AbstractWindowedCursor) cursor).getWindow(); - int pos = cursor.getPosition(); - int type = -1; - if (cursorWindow.isNull(pos, i)) { - type = FIELD_TYPE_NULL; - } else if (cursorWindow.isLong(pos, i)) { - type = FIELD_TYPE_INTEGER; - } else if (cursorWindow.isFloat(pos, i)) { - type = FIELD_TYPE_FLOAT; - } else if (cursorWindow.isString(pos, i)) { - type = FIELD_TYPE_STRING; - } else if (cursorWindow.isBlob(pos, i)) { - type = FIELD_TYPE_BLOB; - } - - return type; - } - throw new RuntimeException("Unsupported cursor on this platform!"); - } - - /** - * Closes the data holder, releasing all of its resources and making it completely invalid. - */ - @Override - public void close() { - synchronized (this) { - if (!closed) { - closed = true; - for (CursorWindow window : windows) { - window.close(); - } - } - } - } - - /** - * Copies the String content in the given column at the provided position into a {@link CharArrayBuffer}. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @param dataOut The {@link CharArrayBuffer} to copy into. - */ - public void copyToBuffer(String column, int row, int windowIndex, CharArrayBuffer dataOut) { - throw new RuntimeException("Not yet available"); - } - - @SuppressWarnings("deprecation") - private static CursorWindow[] createCursorWindows(Builder builder) { - if (builder.columns.length == 0) return new CursorWindow[0]; - List windows = new ArrayList<>(); - try { - CursorWindow current = null; - for (int rowIndex = 0; rowIndex < builder.rows.size(); rowIndex++) { - Map row = builder.rows.get(rowIndex); - if (current == null || !current.allocRow()) { - current = new CursorWindow(false); - current.setStartPosition(rowIndex); - current.setNumColumns(builder.columns.length); - windows.add(current); - if (!current.allocRow()) { - windows.remove(current); - return windows.toArray(new CursorWindow[0]); - } - } - for (int columnIndex = 0; columnIndex < builder.columns.length; columnIndex++) { - Object val = row.get(builder.columns[columnIndex]); - if (val == null) { - current.putNull(rowIndex, columnIndex); - } else if (val instanceof String) { - current.putString((String) val, rowIndex, columnIndex); - } else if (val instanceof Long) { - current.putLong((Long) val, rowIndex, columnIndex); - } else if (val instanceof Integer) { - current.putLong((Integer) val, rowIndex, columnIndex); - } else if (val instanceof Boolean) { - if ((Boolean) val) - current.putLong(1, rowIndex, columnIndex); - } else if (val instanceof byte[]) { - current.putBlob((byte[]) val, rowIndex, columnIndex); - } else if (val instanceof Double) { - current.putDouble((Double) val, rowIndex, columnIndex); - } else if (val instanceof Float) { - current.putDouble((Float) val, rowIndex, columnIndex); - } else { - throw new IllegalArgumentException("Unsupported object for column " + columnIndex + ": " + val); - } - } - } - } catch (RuntimeException e) { - for (CursorWindow window : windows) { - window.close(); - } - throw e; - } - return windows.toArray(new CursorWindow[0]); - } - - private static CursorWindow[] createCursorWindows(Cursor cursor) { - if (cursor.getColumnCount() == 0) return new CursorWindow[0]; - List windows = new ArrayList<>(); - CursorWindow current = null; - int rowIndex = 0; - while (cursor.moveToNext()) { - if (current == null || !current.allocRow()) { - current = new CursorWindow(false); - current.setStartPosition(rowIndex); - current.setNumColumns(cursor.getColumnCount()); - windows.add(current); - if (!current.allocRow()) { - windows.remove(current); - return windows.toArray(new CursorWindow[0]); - } - } - for (int i = 0; i < cursor.getColumnCount(); i++) { - switch (getCursorType(cursor, i)) { - case FIELD_TYPE_NULL: - current.putNull(rowIndex, i); - break; - case FIELD_TYPE_BLOB: - current.putBlob(cursor.getBlob(i), rowIndex, i); - break; - case FIELD_TYPE_FLOAT: - current.putDouble(cursor.getDouble(i), rowIndex, i); - break; - case FIELD_TYPE_INTEGER: - current.putLong(cursor.getLong(i), rowIndex, i); - break; - case FIELD_TYPE_STRING: - current.putString(cursor.getString(i), rowIndex, i); - break; - } - } - rowIndex++; - } - cursor.close(); - return windows.toArray(new CursorWindow[0]); - } - - /** - * Retrieves the boolean value for a given column at the provided position. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The boolean value in that column. - */ - public boolean getBoolean(String column, int row, int windowIndex) { - return windows[windowIndex].getLong(row, columnIndices.get(column)) == 1; - } - - /** - * Retrieves the byte array value for a given column at the provided position. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The byte array value in that column. - */ - public byte[] getByteArray(String column, int row, int windowIndex) { - return windows[windowIndex].getBlob(row, columnIndices.get(column)); - } - - /** - * Gets the number of rows in the data holder. - * - * @return the number of rows in the data holder. - */ - public int getCount() { - int c = 0; - if (windows != null) { - for (CursorWindow window : windows) { - c += window.getNumRows(); - } - } - return c; - } - - /** - * Retrieves the integer value for a given column at the provided position. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The integer value in that column. - */ - public int getInteger(String column, int row, int windowIndex) { - return windows[windowIndex].getInt(row, columnIndices.get(column)); - } - - /** - * Retrieves the long value for a given column at the provided position. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The long value in that column. - */ - public long getLong(String column, int row, int windowIndex) { - return windows[windowIndex].getLong(row, columnIndices.get(column)); - } - - public int getStatusCode() { - return statusCode; - } - - /** - * Retrieves the string value for a given column at the provided position. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The string value in that column. - */ - public String getString(String column, int row, int windowIndex) { - return windows[windowIndex].getString(row, columnIndices.get(column)); - } - - /** - * Returns whether the given column at the provided position contains null. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return Whether the column value is null at this position. - */ - public boolean isNull(String column, int row, int windowIndex) { - return windows[windowIndex].isNull(row, columnIndices.get(column)); - } - - public boolean isClosed() { - synchronized (this) { - return closed; - } - } - - /** - * Retrieves the column data at the provided position as a URI if possible, checking for null values. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The column data as a URI, or null if not present. - */ - public Uri parseUri(String column, int row, int windowIndex) { - String string = getString(column, row, windowIndex); - if (string != null) return Uri.parse(string); - return null; - } - - @Override - public String toString() { - return "DataHolder{" + - "columns=" + Arrays.toString(columns) + - ", windows=" + Arrays.toString(windows) + - ", statusCode=" + statusCode + - ", metadata=" + metadata + - '}'; - } - - public void validateContents() { - columnIndices = new HashMap<>(); - for (int i = 0; i < columns.length; i++) { - columnIndices.put(columns[i], i); - } - } - - /** - * Helper class to build {@link DataHolder} instances containing arbitrary data. - *

- * Note that the constructor is private; use DataHolder.builder() to create instances of this class. - */ - public static class Builder { - private final String[] columns; - private final ArrayList> rows; - private final String uniqueColumn; - private final Map uniqueIndizes; - - private Builder(String[] columns, String uniqueColumn) { - this.columns = columns; - this.rows = new ArrayList<>(); - this.uniqueColumn = uniqueColumn; - this.uniqueIndizes = new HashMap<>(); - } - - /** - * Instantiate an {@link DataHolder} from this {@link DataHolder.Builder} with the given status code and metadata. - * - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - * @return {@link DataHolder} representation of this object. - */ - public DataHolder build(int statusCode, Bundle metadata) { - return new DataHolder(columns, createCursorWindows(this), statusCode, metadata); - } - - /** - * Instantiate an {@link DataHolder} from this {@link DataHolder.Builder} with the given status code and null metadata. - * - * @param statusCode The status code of this {@link DataHolder}. - * @return {@link DataHolder} representation of this object. - */ - public DataHolder build(int statusCode) { - return build(statusCode, null); - } - - /** - * @return The number of rows that the resulting DataHolder will contain. - */ - public int getCount() { - return rows.size(); - } - - /** - * Sort the rows in this builder based on the standard data type comparisons for the value in the provided column. - * Calling this multiple times with the same column will not change the sort order of the builder. - * Note that any data which is added after this call will not be sorted. - * - * @param sortColumn The column to sort the rows in this builder by. - * @return {@link DataHolder.Builder} to continue construction. - */ - public Builder sort(String sortColumn) { - throw new RuntimeException("Not yet implemented"); - } - - /** - * Add a new row of data to the {@link DataHolder} this {@link DataHolder.Builder} will create. Note that the data must contain an entry for all columns - *

- * Currently the only supported value types that are supported are String, Long, and Boolean (Integer is also accepted and will be stored as a Long). - * - * @param values {@link ContentValues} containing row data. - * @return {@link DataHolder.Builder} to continue construction. - */ - public Builder withRow(ContentValues values) { - HashMap row = new HashMap<>(); - for (Map.Entry entry : values.valueSet()) { - row.put(entry.getKey(), entry.getValue()); - } - return withRow(row); - } - - /** - * Add a new row of data to the {@link DataHolder} this {@link DataHolder.Builder} will create. Note that the data must contain an entry for all columns - *

- * Currently the only supported value types that are supported are String, Long, and Boolean (Integer is also accepted and will be stored as a Long). - * - * @param row Map containing row data. - * @return {@link DataHolder.Builder} to continue construction. - */ - public Builder withRow(HashMap row) { - if (uniqueColumn != null) { - Object val = row.get(uniqueColumn); - if (val != null) { - Integer old = uniqueIndizes.get(val); - if (old != null) { - rows.set(old, row); - return this; - } else { - uniqueIndizes.put(val, rows.size()); - } - } - } - rows.add(row); - return this; - } - } - - public static final Creator CREATOR = new AutoCreator(DataHolder.class) { - @Override - public DataHolder createFromParcel(Parcel parcel) { - DataHolder res = super.createFromParcel(parcel); - res.validateContents(); - return res; - } - }; -} diff --git a/play-services-base-api/src/main/java/com/google/android/gms/common/data/Freezable.java b/play-services-base-api/src/main/java/com/google/android/gms/common/data/Freezable.java deleted file mode 100644 index 51f4847..0000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/common/data/Freezable.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.data; - -public interface Freezable { - /** - * Freeze a volatile representation into an immutable representation. Objects returned from - * this call are safe to cache. - *

- * Note that the output of {@link #freeze} may not be identical to the parent object, but - * should be equal. - * - * @return A concrete implementation of the data object. - */ - T freeze(); - - /** - * Check to see if this object is valid for use. If the object is still volatile, this method - * will indicate whether or not the object can be safely used. - * The output of a call to {@link #freeze()} will always be valid. - * - * @return whether or not the object is valid for use. - */ - boolean isDataValid(); -} diff --git a/play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java b/play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java deleted file mode 100644 index fee7549..0000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.images; - -import android.net.Uri; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Locale; - -public class WebImage extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(WebImage.class); - - public WebImage () { - this.uri = null; - } - - public WebImage (Uri uri) { - this.uri = uri; - } - - @SafeParceled(1) - private final int versionCode = 1; - - @SafeParceled(2) - private final Uri uri; - - @SafeParceled(3) - private final int width = 0; - - @SafeParceled(4) - private final int height = 0; - - public Uri getUrl() { - return uri; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - public String toString() { - return String.format(Locale.getDefault(), "Image %dx%d %s", width, height, uri.toString()); - } -} diff --git a/play-services-base/build.gradle b/play-services-base/build.gradle deleted file mode 100644 index 67fef50..0000000 --- a/play-services-base/build.gradle +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} - -dependencies { - implementation 'com.google.android.gms:play-services-base:18.0.1' - - api project(':play-services-basement') - api project(':play-services-tasks') - api project(':play-services-base-api') - - implementation 'androidx.fragment:fragment:1.4.1' - implementation 'com.google.android.gms:play-services-base:18.0.1' -} \ No newline at end of file diff --git a/play-services-base/gradle.properties b/play-services-base/gradle.properties deleted file mode 100644 index 6949ecb..0000000 --- a/play-services-base/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Library Base -POM_DESCRIPTION=Base classes used by all Play Services Library modules - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsLib - -POM_SCM_URL=https://github.com/microg/android_external_GmsLib -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-base/src/main/AndroidManifest.xml b/play-services-base/src/main/AndroidManifest.xml deleted file mode 100644 index 3ab02d9..0000000 --- a/play-services-base/src/main/AndroidManifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - diff --git a/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java b/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java deleted file mode 100644 index ef43eb7..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import static com.google.android.gms.common.ConnectionResult.INTERNAL_ERROR; -import static com.google.android.gms.common.ConnectionResult.INVALID_ACCOUNT; -import static com.google.android.gms.common.ConnectionResult.NETWORK_ERROR; -import static com.google.android.gms.common.ConnectionResult.RESOLUTION_REQUIRED; -import static com.google.android.gms.common.ConnectionResult.SERVICE_DISABLED; -import static com.google.android.gms.common.ConnectionResult.SERVICE_INVALID; -import static com.google.android.gms.common.ConnectionResult.SERVICE_MISSING; -import static com.google.android.gms.common.ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED; -import static com.google.android.gms.common.ConnectionResult.SIGN_IN_REQUIRED; -import static com.google.android.gms.common.ConnectionResult.SUCCESS; - -import android.app.Activity; -import android.app.Dialog; -import android.app.PendingIntent; -import android.content.Context; -import android.content.DialogInterface; -import android.os.Bundle; -import android.util.Log; - -import androidx.fragment.app.FragmentActivity; - -import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener; -import com.google.android.gms.tasks.Task; -import com.google.android.gms.tasks.Tasks; - -import org.microg.gms.common.Constants; -import org.microg.gms.common.PublicApi; - -@PublicApi -public class GoogleApiAvailability { - private static final String TAG = "GmsApiAvailability"; - - /** - * Package name for Google Play services. - */ - public static final String GOOGLE_PLAY_SERVICES_PACKAGE = Constants.GMS_PACKAGE_NAME; - - /** - * Google Play services client library version (declared in library's AndroidManifest.xml android:versionCode). - */ - public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.GMS_VERSION_CODE; - - private static GoogleApiAvailability instance; - - private GoogleApiAvailability() { - } - - /** - * Returns the singleton instance of GoogleApiAvailability. - */ - public static GoogleApiAvailability getInstance() { - if (instance == null) { - synchronized (GoogleApiAvailability.class) { - if (instance == null) { - instance = new GoogleApiAvailability(); - } - } - } - return instance; - } - - - /** - * Returns a dialog to address the provided errorCode. The returned dialog displays a localized - * message about the error and upon user confirmation (by tapping on dialog) will direct them - * to the Play Store if Google Play services is out of date or missing, or to system settings - * if Google Play services is disabled on the device. - * - * @param activity parent activity for creating the dialog, also used for identifying language to display dialog in. - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param requestCode The requestCode given when calling startActivityForResult. - */ - public Dialog getErrorDialog(Activity activity, int errorCode, int requestCode) { - return getErrorDialog(activity, errorCode, requestCode, null); - } - - /** - * Returns a dialog to address the provided errorCode. The returned dialog displays a localized - * message about the error and upon user confirmation (by tapping on dialog) will direct them - * to the Play Store if Google Play services is out of date or missing, or to system settings - * if Google Play services is disabled on the device. - * - * @param activity parent activity for creating the dialog, also used for identifying language to display dialog in. - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param requestCode The requestCode given when calling startActivityForResult. - * @param cancelListener The {@link DialogInterface.OnCancelListener} to invoke if the dialog is canceled. - */ - public Dialog getErrorDialog(Activity activity, int errorCode, int requestCode, DialogInterface.OnCancelListener cancelListener) { - // TODO - return null; - } - - /** - * Returns a PendingIntent to address the provided connection failure. - *

- * If {@link ConnectionResult#hasResolution()} is true, then {@link ConnectionResult#getResolution()} - * will be returned. Otherwise, the returned PendingIntent will direct the user to either the - * Play Store if Google Play services is out of date or missing, or system settings if Google - * Play services is disabled on the device. - * - * @param context parent context for creating the PendingIntent. - * @param result the connection failure. If successful or the error is not resolvable by the user, null is returned. - */ - public PendingIntent getErrorResolutionPendingIntent(Context context, ConnectionResult result) { - if (result.hasResolution()) { - return result.getResolution(); - } - return getErrorResolutionPendingIntent(context, result.getErrorCode(), 0); - } - - /** - * Returns a PendingIntent to address the provided errorCode. It will direct the user to either - * the Play Store if Google Play services is out of date or missing, or system settings if - * Google Play services is disabled on the device. - * - * @param context parent context for creating the PendingIntent. - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param requestCode The requestCode given when calling startActivityForResult. - */ - public PendingIntent getErrorResolutionPendingIntent(Context context, int errorCode, int requestCode) { - // TODO - return null; - } - - /** - * Returns a human-readable string of the error code returned from {@link #isGooglePlayServicesAvailable(Context)}. - */ - public final String getErrorString(int errorCode) { - return ConnectionResult.getStatusString(errorCode); - } - - /** - * Verifies that Google Play services is installed and enabled on this device, and that the - * version installed on this device is no older than the one required by this client. - * - * @return status code indicating whether there was an error. Can be one of following in - * {@link ConnectionResult}: SUCCESS, SERVICE_MISSING, SERVICE_UPDATING, - * SERVICE_VERSION_UPDATE_REQUIRED, SERVICE_DISABLED, SERVICE_INVALID - */ - public int isGooglePlayServicesAvailable(Context context) { - Log.d(TAG, "As we can't know right now if the later desired feature is available, " + - "we just pretend it to be."); - return SUCCESS; - } - - /** - * Verifies that Google Play services is installed and enabled on this device, and that the version installed on - * this device is no older than the one required by this client or the version is not older than the one specified - * in minApkVersion. - * - * @return status code indicating whether there was an error. Can be one of following in - * {@link ConnectionResult}: SUCCESS, SERVICE_MISSING, SERVICE_UPDATING, - * SERVICE_VERSION_UPDATE_REQUIRED, SERVICE_DISABLED, SERVICE_INVALID - */ - public int isGooglePlayServicesAvailable(Context context, int minApkVersion) { - return isGooglePlayServicesAvailable(context); - } - - /** - * Determines whether an error can be resolved via user action. If true, proceed by calling - * {@link #getErrorDialog(Activity, int, int)} and showing the dialog. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)}, or - * returned to your application via {@link OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} - * @return true if the error is resolvable with {@link #getErrorDialog(Activity, int, int)} - */ - public final boolean isUserResolvableError(int errorCode) { - switch (errorCode) { - case SERVICE_MISSING: - case SERVICE_VERSION_UPDATE_REQUIRED: - case SERVICE_DISABLED: - case SERVICE_INVALID: - return true; - case SIGN_IN_REQUIRED: - case INVALID_ACCOUNT: - case RESOLUTION_REQUIRED: - case NETWORK_ERROR: - case INTERNAL_ERROR: - default: - return false; - } - } - - /** - * Attempts to make Google Play services available on this device. If Play Services is already - * available, the returned {@link Task} may complete immediately. - *

- * If it is necessary to display UI in order to complete this request (e.g. sending the user - * to the Google Play store) the passed {@link Activity} will be used to display this UI. - *

- * It is recommended to call this method from {@link Activity#onCreate(Bundle)}. - * If the passed {@link Activity} completes before the returned {@link Task} completes, the - * Task will fail with a {@link java.util.concurrent.CancellationException}. - *

- * This method must be called from the main thread. - * - * @return A {@link Task}. If this Task completes without throwing an exception, Play Services - * is available on this device. - */ - public Task makeGooglePlayServicesAvailable(Activity activity) { - int status = isGooglePlayServicesAvailable(activity); - if (status == SUCCESS) { - return Tasks.forResult(null); - } - // TODO - return Tasks.forResult(null); - } - - /** - * Displays a DialogFragment for an error code returned by {@link #isGooglePlayServicesAvailable(Context)}. - * - * @param activity parent activity for creating the dialog, also used for identifying language to display dialog in. - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param requestCode The requestCode given when calling startActivityForResult. - * @return true if the dialog is shown, false otherwise - * @throws RuntimeException if API level is below 11 and activity is not a {@link FragmentActivity}. - * @see ErrorDialogFragment - * @see SupportErrorDialogFragmet - */ - public boolean showErrorDialogFragment(Activity activity, int errorCode, int requestCode) { - return showErrorDialogFragment(activity, errorCode, requestCode, null); - } - - /** - * Displays a DialogFragment for an error code returned by {@link #isGooglePlayServicesAvailable(Context)}. - * - * @param activity parent activity for creating the dialog, also used for identifying language to display dialog in. - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param requestCode The requestCode given when calling startActivityForResult. - * @param cancelListener The {@link DialogInterface.OnCancelListener} to invoke if the dialog is canceled. - * @return true if the dialog is shown, false otherwise - * @throws RuntimeException if API level is below 11 and activity is not a {@link FragmentActivity}. - * @see ErrorDialogFragment - * @see SupportErrorDialogFragmet - */ - public boolean showErrorDialogFragment(Activity activity, int errorCode, int requestCode, DialogInterface.OnCancelListener cancelListener) { - Dialog dialog = getErrorDialog(activity, errorCode, requestCode, cancelListener); - if (dialog == null) { - return false; - } else { - // TODO - return false; - } - } - - /** - * Displays a notification for an error code returned from - * {@link #isGooglePlayServicesAvailable(Context)}, if it is resolvable by the user. - *

- * This method is similar to {@link #getErrorDialog(int, android.app.Activity, int)}, but is - * provided for background tasks that cannot or should not display dialogs. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param context used for identifying language to display dialog in as well as accessing the - * {@link android.app.NotificationManager}. - */ - public void showErrorNotification(Context context, int errorCode) { - if (errorCode == RESOLUTION_REQUIRED) { - Log.e(TAG, "showErrorNotification(context, errorCode) is called for RESOLUTION_REQUIRED when showErrorNotification(context, result) should be called"); - } - - if (isUserResolvableError(errorCode)) { - GooglePlayServicesUtil.showErrorNotification(errorCode, context); - } - } - - /** - * Displays a notification for a connection failure, if it is resolvable by the user. - * - * @param context The calling context used to display the notification. - * @param result The connection failure. If successful or the error is not resolvable by the - * user, no notification is shown. - */ - public void showErrorNotification(Context context, ConnectionResult result) { - PendingIntent pendingIntent = getErrorResolutionPendingIntent(context, result); - if (pendingIntent != null) { - // TODO - } - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java b/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java deleted file mode 100644 index a5642fd..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.os.Bundle; - -@Deprecated -public interface GooglePlayServicesClient { - void connect(); - - void disconnect(); - - boolean isConnected(); - - boolean isConnecting(); - - void registerConnectionCallbacks(ConnectionCallbacks listener); - - boolean isConnectionCallbacksRegistered(ConnectionCallbacks listener); - - void unregisterConnectionCallbacks(ConnectionCallbacks listener); - - void registerConnectionFailedListener(OnConnectionFailedListener listener); - - boolean isConnectionFailedListenerRegistered(OnConnectionFailedListener listener); - - void unregisterConnectionFailedListener(OnConnectionFailedListener listener); - - @Deprecated - interface OnConnectionFailedListener { - - void onConnectionFailed(ConnectionResult result); - } - - @Deprecated - interface ConnectionCallbacks { - - void onConnected(Bundle connectionHint); - - void onDisconnected(); - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java b/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java deleted file mode 100644 index 4850b81..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.app.Activity; -import android.app.Dialog; -import android.app.Fragment; -import android.app.PendingIntent; -import android.content.Context; -import android.content.DialogInterface; -import android.content.pm.PackageManager; -import android.content.res.Resources; -import android.util.Log; - -import org.microg.gms.common.Constants; -import org.microg.gms.common.PublicApi; - -/** - * Utility class for verifying that the Google Play services APK is available and up-to-date on - * this device. The same checks are performed if one uses {@link AdvertisingIdClient} or - * {@link GoogleAuthUtil} to connect to the service. - *

- * TODO: methods :) - */ -@PublicApi -public class GooglePlayServicesUtil { - private static final String TAG = "GooglePlayServicesUtil"; - - public static final String GMS_ERROR_DIALOG = "GooglePlayServicesErrorDialog"; - - /** - * Package name for Google Play services. - */ - @Deprecated - public static final String GOOGLE_PLAY_SERVICES_PACKAGE = Constants.GMS_PACKAGE_NAME; - - /** - * Google Play services client library version (declared in library's AndroidManifest.xml android:versionCode). - */ - @Deprecated - public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.GMS_VERSION_CODE; - - /** - * Package name for Google Play Store. - */ - public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending"; - - /** - * Returns a dialog to address the provided errorCode. The returned dialog displays a localized - * message about the error and upon user confirmation (by tapping on dialog) will direct them - * to the Play Store if Google Play services is out of date or missing, or to system settings - * if Google Play services is disabled on the device. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param activity parent activity for creating the dialog, also used for identifying - * language to display dialog in. - * @param requestCode The requestCode given when calling startActivityForResult. - */ - @Deprecated - public static Dialog getErrorDialog(int errorCode, Activity activity, int requestCode) { - return getErrorDialog(errorCode, activity, requestCode, null); - } - - /** - * Returns a dialog to address the provided errorCode. The returned dialog displays a localized - * message about the error and upon user confirmation (by tapping on dialog) will direct them - * to the Play Store if Google Play services is out of date or missing, or to system settings - * if Google Play services is disabled on the device. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param activity parent activity for creating the dialog, also used for identifying - * language to display dialog in. - * @param requestCode The requestCode given when calling startActivityForResult. - * @param cancelListener The {@link DialogInterface.OnCancelListener} to invoke if the dialog - * is canceled. - */ - @Deprecated - public static Dialog getErrorDialog(int errorCode, Activity activity, int requestCode, DialogInterface.OnCancelListener cancelListener) { - return GoogleApiAvailability.getInstance().getErrorDialog(activity, errorCode, requestCode, cancelListener); - } - - /** - * Returns a PendingIntent to address the provided errorCode. It will direct them to one of the - * following places to either the Play Store if Google Play services is out of date or missing, - * or system settings if Google Play services is disabled on the device. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param activity parent context for creating the PendingIntent. - * @param requestCode The requestCode given when calling startActivityForResult. - */ - @Deprecated - public static PendingIntent getErrorPendingIntent(int errorCode, Activity activity, - int requestCode) { - return null; // TODO - } - - /** - * Returns a human-readable string of the error code returned from {@link #isGooglePlayServicesAvailable(Context)}. - */ - @Deprecated - public static String getErrorString(int errorCode) { - return null; // TODO - } - - /** - * Returns the open source software license information for the Google Play services - * application, or null if Google Play services is not available on this device. - */ - @Deprecated - public static String getOpenSourceSoftwareLicenseInfo(Context context) { - return null; // TODO - } - - /** - * This gets the Context object of the Buddy APK. This loads the Buddy APK code from the Buddy - * APK into memory. This returned context can be used to create classes and obtain resources - * defined in the Buddy APK. - * - * @return The Context object of the Buddy APK or null if the Buddy APK is not installed on the device. - */ - public static Context getRemoteContext(Context context) { - return null; // TODO - } - - /** - * This gets the Resources object of the Buddy APK. - * - * @return The Resources object of the Buddy APK or null if the Buddy APK is not installed on the device. - */ - public static Resources getRemoteResources(Context context) { - return null; // TODO - } - - /** - * Verifies that Google Play services is installed and enabled on this device, and that the - * version installed on this device is no older than the one required by this client. - * - * @return status code indicating whether there was an error. Can be one of following in - * {@link ConnectionResult}: SUCCESS, SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED, - * SERVICE_DISABLED, SERVICE_INVALID - */ - @Deprecated - public static int isGooglePlayServicesAvailable(Context context) { - Log.d(TAG, "As we can't know right now if the later desired feature is available, " + - "we just pretend it to be."); - return ConnectionResult.SUCCESS; - } - - @Deprecated - public static boolean isGoogleSignedUid(PackageManager packageManager, int uid) { - return false; // TODO - } - - /** - * Determines whether an error is user-recoverable. If true, proceed by calling - * {@link #getErrorDialog(int, Activity, int)} and showing the dialog. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)}, or - * returned to your application via {@link com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} - * @return true if the error is recoverable with {@link #getErrorDialog(int, Activity, int)} - */ - @Deprecated - public static boolean isUserRecoverableError(int errorCode) { - return false; // TODO - } - - /** - * Display a DialogFragment for an error code returned by {@link #isGooglePlayServicesAvailable(Context)}. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param activity parent activity for creating the dialog, also used for identifying - * language to display dialog in. - * @param requestCode The requestCode given when calling startActivityForResult. - * @return true if the dialog is shown, false otherwise - * @throws RuntimeException if API level is below 11 and activity is not a {@link android.support.v4.app.FragmentActivity}. - */ - @Deprecated - public static boolean showErrorDialogFragment(int errorCode, Activity activity, int requestCode) { - return showErrorDialogFragment(errorCode, activity, requestCode, null); - } - - @Deprecated - public static boolean showErrorDialogFragment(int errorCode, Activity activity, Fragment fragment, int requestCode, DialogInterface.OnCancelListener cancelListener) { - return false; // TODO - } - - /** - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param activity parent activity for creating the dialog, also used for identifying - * language to display dialog in. - * @param requestCode The requestCode given when calling startActivityForResult. - * @param cancelListener The {@link DialogInterface.OnCancelListener} to invoke if the dialog - * is canceled. - * @return true if the dialog is shown, false otherwise. - * @throws RuntimeException if API level is below 11 and activity is not a {@link android.support.v4.app.FragmentActivity}. - */ - @Deprecated - public static boolean showErrorDialogFragment(int errorCode, Activity activity, int requestCode, DialogInterface.OnCancelListener cancelListener) { - return showErrorDialogFragment(errorCode, activity, null, requestCode, cancelListener); - } - - /** - * Displays a notification relevant to the provided error code. This method is similar to - * {@link #getErrorDialog(int, android.app.Activity, int)}, but is provided for background - * tasks that cannot or shouldn't display dialogs. - * - * @param errorCode error code returned by {@link #isGooglePlayServicesAvailable(Context)} call. - * If errorCode is {@link ConnectionResult#SUCCESS} then null is returned. - * @param context used for identifying language to display dialog in as well as accessing the - * {@link android.app.NotificationManager}. - */ - @Deprecated - public static void showErrorNotification(int errorCode, Context context) { - // TODO - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java b/play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java deleted file mode 100644 index fd400c4..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.safeparcel.AutoSafeParcelable; - -@Deprecated -public class AccountInfo extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(AccountInfo.class); -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/Api.java b/play-services-base/src/main/java/com/google/android/gms/common/api/Api.java deleted file mode 100644 index 065fff8..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/Api.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import android.accounts.Account; - -import com.google.android.gms.auth.api.signin.GoogleSignInAccount; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.ApiClientBuilder; - -/** - * Describes a section of the Google Play Services API that should be made available. Instances of - * this should be passed into {@link GoogleApiClient.Builder#addApi(Api)} to enable the appropriate - * parts of Google Play Services. - *

- * Google APIs are partitioned into sections which allow your application to configure only the - * services it requires. Each Google API provides an API object which can be passed to - * {@link GoogleApiClient.Builder#addApi(Api)} in order to configure and enable that functionality - * in your {@link GoogleApiClient} instance. - *

- * See {@link GoogleApiClient.Builder} for usage examples. - */ -@PublicApi -public final class Api { - private final ApiClientBuilder builder; - - @PublicApi(exclude = true) - public Api(ApiClientBuilder builder) { - this.builder = builder; - } - - @PublicApi(exclude = true) - public ApiClientBuilder getBuilder() { - return builder; - } - - /** - * Base interface for API options. These are used to configure specific parameters for - * individual API surfaces. The default implementation has no parameters. - */ - @PublicApi - public interface ApiOptions { - /** - * Base interface for {@link ApiOptions} in {@link Api}s that have options. - */ - @PublicApi - interface HasOptions extends ApiOptions { - } - - /** - * Base interface for {@link ApiOptions} that are not required, don't exist. - */ - @PublicApi - interface NotRequiredOptions extends ApiOptions { - } - - /** - * {@link ApiOptions} implementation for {@link Api}s that do not take any options. - */ - @PublicApi - final class NoOptions implements NotRequiredOptions { - } - - /** - * Base interface for {@link ApiOptions} that are optional. - */ - @PublicApi - interface Optional extends HasOptions, NotRequiredOptions { - } - - /** - * An interface for {@link ApiOptions} that include an account. - */ - @PublicApi - interface HasAccountOptions extends HasOptions, NotRequiredOptions { - Account getAccount(); - } - - /** - * An interface for {@link ApiOptions} that includes a {@link GoogleSignInAccount} - */ - @PublicApi - interface HasGoogleSignInAccountOptions extends HasOptions { - GoogleSignInAccount getGoogleSignInAccount(); - } - } - -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java b/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java deleted file mode 100644 index 54e2c63..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.api; - -import android.content.Context; - -import com.google.android.gms.common.api.internal.ApiKey; -import com.google.android.gms.tasks.Task; -import com.google.android.gms.tasks.TaskCompletionSource; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.ApiClient; -import org.microg.gms.common.api.GoogleApiManager; -import org.microg.gms.common.api.PendingGoogleApiCall; - -@PublicApi -public abstract class GoogleApi implements HasApiKey { - private final GoogleApiManager manager; - @PublicApi(exclude = true) - public Api api; - - @PublicApi(exclude = true) - protected GoogleApi(Context context, Api api) { - this.api = api; - this.manager = GoogleApiManager.getInstance(context); - } - - @PublicApi(exclude = true) - protected Task scheduleTask(PendingGoogleApiCall apiCall) { - TaskCompletionSource completionSource = new TaskCompletionSource<>(); - manager.scheduleTask(this, apiCall, completionSource); - return completionSource.getTask(); - } - - @Override - @PublicApi(exclude = true) - public ApiKey getApiKey() { - return null; - } - - @PublicApi(exclude = true) - public O getOptions() { - return null; - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java b/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java deleted file mode 100644 index ec1482b..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import android.app.Activity; -import android.content.Context; -import android.os.Bundle; -import android.os.Handler; -import android.os.Looper; -import android.view.View; - -import androidx.fragment.app.FragmentActivity; - -import com.google.android.gms.common.ConnectionResult; - -import org.microg.gms.auth.AuthConstants; -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.ApiClientSettings; -import org.microg.gms.common.api.GoogleApiClientImpl; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -/** - * The main entry point for Google Play services integration. - *

- * GoogleApiClient is used with a variety of static methods. Some of these methods require that - * GoogleApiClient be connected, some will queue up calls before GoogleApiClient is connected; - * check the specific API documentation to determine whether you need to be connected. - *

- * Before any operation is executed, the GoogleApiClient must be connected using the - * {@link #connect()} method. The client is not considered connected until the - * {@link ConnectionCallbacks#onConnected(Bundle)} callback has been called. - *

- * When your app is done using this client, call {@link #disconnect()}, even if the async result - * from {@link #connect()} has not yet been delivered. - *

- * You should instantiate a client object in your Activity's {@link Activity#onCreate(Bundle)} - * method and then call {@link #connect()} in {@link Activity#onStart()} and {@link #disconnect()} - * in {@link Activity#onStop()}, regardless of the state. - */ -@PublicApi -@Deprecated -public interface GoogleApiClient { - /** - * Connects the client to Google Play services. Blocks until the connection either succeeds or - * fails. This is not allowed on the UI thread. - * - * @return the result of the connection - */ - ConnectionResult blockingConnect(); - - /** - * Connects the client to Google Play services. Blocks until the connection is set or failed or - * has timed out. This is not allowed on the UI thread. - * - * @param timeout the maximum time to wait - * @param unit the time unit of the {@code timeout} argument - * @return the result of the connection - */ - ConnectionResult blockingConnect(long timeout, TimeUnit unit); - - /** - * Clears the account selected by the user and reconnects the client asking the user to pick an - * account again if {@link Builder#useDefaultAccount()} was set. - * - * @return the pending result is fired once the default account has been cleared, but before - * the client is reconnected - for that {@link ConnectionCallbacks} can be used. - */ - PendingResult clearDefaultAccountAndReconnect(); - - /** - * Connects the client to Google Play services. This method returns immediately, and connects - * to the service in the background. If the connection is successful, - * {@link ConnectionCallbacks#onConnected(Bundle)} is called and enqueued items are executed. - * On a failure, {@link OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} is - * called. - */ - void connect(); - - /** - * Closes the connection to Google Play services. No calls can be made using this client after - * calling this method. Any method calls that haven't executed yet will be canceled. That is - * {@link ResultCallback#onResult(Result)} won't be called, if connection to the service hasn't - * been established yet all calls already made will be canceled. - * - * @see #connect() - */ - void disconnect(); - - /** - * Checks if the client is currently connected to the service, so that requests to other - * methods will succeed. Applications should guard client actions caused by the user with a - * call to this method. - * - * @return {@code true} if the client is connected to the service. - */ - boolean isConnected(); - - /** - * Checks if the client is attempting to connect to the service. - * - * @return {@code true} if the client is attempting to connect to the service. - */ - boolean isConnecting(); - - /** - * Returns {@code true} if the specified listener is currently registered to receive connection - * events. - * - * @param listener The listener to check for. - * @return {@code true} if the specified listener is currently registered to receive connection - * events. - * @see #registerConnectionCallbacks(ConnectionCallbacks) - * @see #unregisterConnectionCallbacks(ConnectionCallbacks) - */ - boolean isConnectionCallbacksRegistered(ConnectionCallbacks listener); - - /** - * Returns {@code true} if the specified listener is currently registered to receive connection - * failed events. - * - * @param listener The listener to check for. - * @return {@code true} if the specified listener is currently registered to receive connection - * failed events. - * @see #registerConnectionFailedListener(OnConnectionFailedListener) - * @see #unregisterConnectionFailedListener(OnConnectionFailedListener) - */ - boolean isConnectionFailedListenerRegistered(OnConnectionFailedListener listener); - - /** - * Closes the current connection to Google Play services and creates a new connection. - *

- * This method closes the current connection then returns immediately and reconnects to the - * service in the background. - *

- * After calling this method, your application will receive - * {@link ConnectionCallbacks#onConnected(Bundle)} if the connection is successful, or - * {@link OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} if the connection - * failed. - * - * @see #connect() - * @see #disconnect() - */ - void reconnect(); - - /** - * Registers a listener to receive connection events from this {@link GoogleApiClient}. If the - * service is already connected, the listener's {@link ConnectionCallbacks#onConnected(Bundle)} - * method will be called immediately. Applications should balance calls to this method with - * calls to {@link #unregisterConnectionCallbacks(ConnectionCallbacks)} to avoid leaking - * resources. - *

- * If the specified listener is already registered to receive connection events, this method - * will not add a duplicate entry for the same listener, but will still call the listener's - * {@link ConnectionCallbacks#onConnected(Bundle)} method if currently connected. - *

- * Note that the order of messages received here may not be stable, so clients should not rely - * on the order that multiple listeners receive events in. - * - * @param listener the listener where the results of the asynchronous {@link #connect()} call - * are delivered. - */ - void registerConnectionCallbacks(ConnectionCallbacks listener); - - /** - * Registers a listener to receive connection failed events from this {@link GoogleApiClient}. - * Unlike {@link #registerConnectionCallbacks(ConnectionCallbacks)}, if the service is not - * already connected, the listener's - * {@link OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} method will not be - * called immediately. Applications should balance calls to this method with calls to - * {@link #unregisterConnectionFailedListener(OnConnectionFailedListener)} to avoid leaking - * resources. - *

- * If the specified listener is already registered to receive connection failed events, this - * method will not add a duplicate entry for the same listener. - *

- * Note that the order of messages received here may not be stable, so clients should not rely - * on the order that multiple listeners receive events in. - * - * @param listener the listener where the results of the asynchronous {@link #connect()} call - * are delivered. - */ - void registerConnectionFailedListener(OnConnectionFailedListener listener); - - /** - * Disconnects the client and stops automatic lifecycle management. Use this before creating a - * new client (which might be necessary when switching accounts, changing the set of used APIs - * etc.). - *

- * This method must be called from the main thread. - * - * @param lifecycleActivity the activity managing the client's lifecycle. - * @throws IllegalStateException if called from outside of the main thread. - * @see Builder#enableAutoManage(FragmentActivity, int, OnConnectionFailedListener) - */ - void stopAutoManager(FragmentActivity lifecycleActivity) throws IllegalStateException; - - /** - * Removes a connection listener from this {@link GoogleApiClient}. Note that removing a - * listener does not generate any callbacks. - *

- * If the specified listener is not currently registered to receive connection events, this - * method will have no effect. - * - * @param listener the listener to unregister. - */ - void unregisterConnectionCallbacks(ConnectionCallbacks listener); - - /** - * Removes a connection failed listener from the {@link GoogleApiClient}. Note that removing a - * listener does not generate any callbacks. - *

- * If the specified listener is not currently registered to receive connection failed events, - * this method will have no effect. - * - * @param listener the listener to unregister. - */ - void unregisterConnectionFailedListener(OnConnectionFailedListener listener); - - /** - * Builder to configure a {@link GoogleApiClient}. - */ - @PublicApi - class Builder { - private final Context context; - private final Map apis = new HashMap<>(); - private final Set connectionCallbacks = new HashSet<>(); - private final Set connectionFailedListeners = new HashSet<>(); - private final Set scopes = new HashSet<>(); - private String accountName; - private int clientId = -1; - private FragmentActivity fragmentActivity; - private Looper looper; - private int gravityForPopups; - private OnConnectionFailedListener unresolvedConnectionFailedListener; - private View viewForPopups; - - /** - * Builder to help construct the {@link GoogleApiClient} object. - * - * @param context The context to use for the connection. - */ - public Builder(Context context) { - this.context = context; - this.looper = context.getMainLooper(); - } - - /** - * Builder to help construct the {@link GoogleApiClient} object. - * - * @param context The context to use for the connection. - * @param connectedListener The listener where the results of the asynchronous - * {@link #connect()} call are delivered. - * @param connectionFailedListener The listener which will be notified if the connection - * attempt fails. - */ - public Builder(Context context, ConnectionCallbacks connectedListener, - OnConnectionFailedListener connectionFailedListener) { - this(context); - addConnectionCallbacks(connectedListener); - addOnConnectionFailedListener(connectionFailedListener); - } - - /** - * Specify which Apis are requested by your app. See {@link Api} for more information. - * - * @param api The Api requested by your app. - * @param options Any additional parameters required for the specific AP - * @see Api - */ - public Builder addApi(Api api, O options) { - apis.put(api, options); - return this; - } - - /** - * Specify which Apis are requested by your app. See {@link Api} for more information. - * - * @param api The Api requested by your app. - * @see Api - */ - public Builder addApi(Api api) { - apis.put(api, null); - return this; - } - - /** - * Registers a listener to receive connection events from this {@link GoogleApiClient}. - * Applications should balance calls to this method with calls to - * {@link #unregisterConnectionCallbacks(ConnectionCallbacks)} to avoid - * leaking resources. - *

- * If the specified listener is already registered to receive connection events, this - * method will not add a duplicate entry for the same listener. - *

- * Note that the order of messages received here may not be stable, so clients should not - * rely on the order that multiple listeners receive events in. - * - * @param listener the listener where the results of the asynchronous {@link #connect()} - * call are delivered. - */ - public Builder addConnectionCallbacks(ConnectionCallbacks listener) { - connectionCallbacks.add(listener); - return this; - } - - /** - * Adds a listener to register to receive connection failed events from this - * {@link GoogleApiClient}. Applications should balance calls to this method with calls to - * {@link #unregisterConnectionFailedListener(OnConnectionFailedListener)} to avoid - * leaking resources. - *

- * If the specified listener is already registered to receive connection failed events, - * this method will not add a duplicate entry for the same listener. - *

- * Note that the order of messages received here may not be stable, so clients should not - * rely on the order that multiple listeners receive events in. - * - * @param listener the listener where the results of the asynchronous {@link #connect()} - * call are delivered. - */ - public Builder addOnConnectionFailedListener(OnConnectionFailedListener listener) { - connectionFailedListeners.add(listener); - return this; - } - - /** - * Specify the OAuth 2.0 scopes requested by your app. See - * {@link com.google.android.gms.common.Scopes} for more information. - * - * @param scope The OAuth 2.0 scopes requested by your app. - * @see com.google.android.gms.common.Scopes - */ - public Builder addScope(Scope scope) { - scopes.add(scope.getScopeUri()); - return this; - } - - /** - * Builds a new {@link GoogleApiClient} object for communicating with the Google APIs. - * - * @return The {@link GoogleApiClient} object. - */ - public GoogleApiClient build() { - return new GoogleApiClientImpl(context, looper, getClientSettings(), apis, connectionCallbacks, connectionFailedListeners, clientId); - } - - private ApiClientSettings getClientSettings() { - return null; - } - - public Builder enableAutoManage(FragmentActivity fragmentActivity, int cliendId, - OnConnectionFailedListener unresolvedConnectionFailedListener) - throws NullPointerException, IllegalArgumentException, IllegalStateException { - this.fragmentActivity = fragmentActivity; - this.clientId = cliendId; - this.unresolvedConnectionFailedListener = unresolvedConnectionFailedListener; - return this; - } - - /** - * Specify an account name on the device that should be used. If this is never called, the - * client will use the current default account for Google Play services for this - * application. - * - * @param accountName The account name on the device that should be used by - * {@link GoogleApiClient}. - */ - public Builder setAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Specifies the part of the screen at which games service popups (for example, - * "welcome back" or "achievement unlocked" popups) will be displayed using gravity. - * - * @param gravityForPopups The gravity which controls the placement of games service popups. - */ - public Builder setGravityForPopups(int gravityForPopups) { - this.gravityForPopups = gravityForPopups; - return this; - } - - /** - * Sets a {@link Handler} to indicate which thread to use when invoking callbacks. Will not - * be used directly to handle callbacks. If this is not called then the application's main - * thread will be used. - */ - public Builder setHandler(Handler handler) { - this.looper = handler.getLooper(); - return this; - } - - /** - * Sets the {@link View} to use as a content view for popups. - * - * @param viewForPopups The view to use as a content view for popups. View cannot be null. - */ - public Builder setViewForPopups(View viewForPopups) { - this.viewForPopups = viewForPopups; - return this; - } - - /** - * Specify that the default account should be used when connecting to services. - */ - public Builder useDefaultAccount() { - this.accountName = AuthConstants.DEFAULT_ACCOUNT; - return this; - } - } - - /** - * Provides callbacks that are called when the client is connected or disconnected from the - * service. Most applications implement {@link #onConnected(Bundle)} to start making requests. - */ - @PublicApi - @Deprecated - interface ConnectionCallbacks extends org.microg.gms.common.api.ConnectionCallbacks { - /** - * A suspension cause informing that the service has been killed. - */ - int CAUSE_SERVICE_DISCONNECTED = 1; - /** - * A suspension cause informing you that a peer device connection was lost. - */ - int CAUSE_NETWORK_LOST = 2; - } - - /** - * Provides callbacks for scenarios that result in a failed attempt to connect the client to - * the service. See {@link ConnectionResult} for a list of error codes and suggestions for - * resolution. - */ - @PublicApi - @Deprecated - interface OnConnectionFailedListener extends org.microg.gms.common.api.OnConnectionFailedListener { - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java b/play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java deleted file mode 100644 index e208b4d..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.api; - -import com.google.android.gms.common.api.internal.ApiKey; - -public interface HasApiKey { - ApiKey getApiKey(); -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java b/play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java deleted file mode 100644 index e388136..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import java.util.concurrent.TimeUnit; - -/** - * Represents a pending result from calling an API method in Google Play services. The final result - * object from a PendingResult is of type R, which can be retrieved in one of two ways. - *

- *

- * After the result has been retrieved using {@link #await()} or delivered to the result callback, - * it is an error to attempt to retrieve the result again. It is the responsibility of the caller - * or callback receiver to release any resources associated with the returned result. Some result - * types may implement {@link Releasable}, in which case {@link Releasable#release()} should be - * used to free the associated resources. - *

- * TODO: Docs - */ -public interface PendingResult { - /** - * Blocks until the task is completed. This is not allowed on the UI thread. The returned - * result object can have an additional failure mode of INTERRUPTED. - */ - R await(); - - /** - * Blocks until the task is completed or has timed out waiting for the result. This is not - * allowed on the UI thread. The returned result object can have an additional failure mode - * of either INTERRUPTED or TIMEOUT. - */ - R await(long time, TimeUnit unit); - - void cancel(); - - boolean isCanceled(); - - void setResultCallback(ResultCallback callback, long time, TimeUnit unit); - - void setResultCallback(ResultCallback callback); -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java b/play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java deleted file mode 100644 index 5a42d8f..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.api.internal; - -import com.google.android.gms.common.api.Api; - -public class ApiKey { - private Api api; -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java b/play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java deleted file mode 100644 index 49c13a9..0000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.data; - -import com.google.android.gms.common.api.Releasable; - -import org.microg.gms.common.PublicApi; - -import java.util.Iterator; - -/** - * TODO - */ -@PublicApi -public abstract class DataBuffer implements Releasable, Iterable { - - private final DataHolder dataHolder; - - @PublicApi(exclude = true) - public DataBuffer(DataHolder dataHolder) { - this.dataHolder = dataHolder; - } - - /** - * @deprecated use {@link #release()} instead - */ - @Deprecated - public final void close() { - release(); - } - - /** - * Get the item at the specified position. Note that the objects returned from subsequent - * invocations of this method for the same position may not be identical objects, but will be - * equal in value. - * - * @param position The position of the item to retrieve. - * @return the item at {@code position} in this buffer. - */ - public abstract T get(int position); - - public int getCount() { - return dataHolder == null ? 0 : dataHolder.getCount(); - } - - /** - * @deprecated {@link #release()} is idempotent, and so is safe to call multiple times - */ - @Deprecated - public boolean isClosed() { - return false; - } - - @Override - public Iterator iterator() { - return null; - } - - /** - * Releases resources used by the buffer. This method is idempotent. - */ - @Override - public void release() { - - } - - /** - * In order to use this one should correctly override setDataRow(int) in his DataBufferRef - * implementation. Be careful: there will be single DataBufferRef while iterating. - * If you are not sure - DO NOT USE this iterator. - */ - public Iterator singleRefIterator() { - return null; - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/DummyApiClient.java b/play-services-base/src/main/java/org/microg/gms/common/DummyApiClient.java deleted file mode 100644 index 132a614..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/DummyApiClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import org.microg.gms.common.api.ApiClient; - -public class DummyApiClient implements ApiClient { - private boolean connected = false; - - @Override - public void connect() { - connected = true; - } - - @Override - public void disconnect() { - connected = false; - } - - @Override - public boolean isConnected() { - return connected; - } - - @Override - public boolean isConnecting() { - return false; - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/ForwardConnectionCallbacks.java b/play-services-base/src/main/java/org/microg/gms/common/ForwardConnectionCallbacks.java deleted file mode 100644 index fdffdac..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/ForwardConnectionCallbacks.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.os.Bundle; - -import com.google.android.gms.common.GooglePlayServicesClient; -import com.google.android.gms.common.api.GoogleApiClient; - -public final class ForwardConnectionCallbacks implements GoogleApiClient.ConnectionCallbacks { - private final GooglePlayServicesClient.ConnectionCallbacks callbacks; - - public ForwardConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks callbacks) { - this.callbacks = callbacks; - } - - @Override - public boolean equals(Object o) { - return o instanceof ForwardConnectionCallbacks && - callbacks.equals(((ForwardConnectionCallbacks) o).callbacks); - } - - @Override - public int hashCode() { - return callbacks.hashCode(); - } - - @Override - public void onConnected(Bundle connectionHint) { - callbacks.onConnected(connectionHint); - } - - @Override - public void onConnectionSuspended(int cause) { - callbacks.onDisconnected(); - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/ForwardConnectionFailedListener.java b/play-services-base/src/main/java/org/microg/gms/common/ForwardConnectionFailedListener.java deleted file mode 100644 index 1d1f443..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/ForwardConnectionFailedListener.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.GooglePlayServicesClient; -import com.google.android.gms.common.api.GoogleApiClient; - -public final class ForwardConnectionFailedListener - implements GoogleApiClient.OnConnectionFailedListener { - private final GooglePlayServicesClient.OnConnectionFailedListener listener; - - public ForwardConnectionFailedListener( - GooglePlayServicesClient.OnConnectionFailedListener listener) { - this.listener = listener; - } - - @Override - public boolean equals(Object o) { - return o instanceof ForwardConnectionFailedListener && - listener.equals(((ForwardConnectionFailedListener) o).listener); - } - - @Override - public int hashCode() { - return listener.hashCode(); - } - - @Override - public void onConnectionFailed(ConnectionResult result) { - listener.onConnectionFailed(result); - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/GmsClient.java b/play-services-base/src/main/java/org/microg/gms/common/GmsClient.java deleted file mode 100644 index adbd9b5..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/GmsClient.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.accounts.Account; -import android.content.ComponentName; -import android.content.Context; -import android.content.ServiceConnection; -import android.os.Bundle; -import android.os.IBinder; -import android.os.IInterface; -import android.os.RemoteException; -import android.util.Log; - -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.internal.GetServiceRequest; -import com.google.android.gms.common.internal.IGmsCallbacks; -import com.google.android.gms.common.internal.IGmsServiceBroker; - -import org.microg.gms.common.api.ApiClient; -import org.microg.gms.common.api.ConnectionCallbacks; -import org.microg.gms.common.api.OnConnectionFailedListener; - -public abstract class GmsClient implements ApiClient { - private static final String TAG = "GmsClient"; - - private final Context context; - protected final ConnectionCallbacks callbacks; - protected final OnConnectionFailedListener connectionFailedListener; - protected ConnectionState state = ConnectionState.NOT_CONNECTED; - private ServiceConnection serviceConnection; - private I serviceInterface; - private final String actionString; - - protected int serviceId = -1; - protected Account account = null; - protected Bundle extras = new Bundle(); - - public GmsClient(Context context, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener, String actionString) { - this.context = context; - this.callbacks = callbacks; - this.connectionFailedListener = connectionFailedListener; - this.actionString = actionString; - } - - protected void onConnectedToBroker(IGmsServiceBroker broker, GmsCallbacks callbacks) throws RemoteException { - if (serviceId == -1) { - throw new IllegalStateException("Service ID not set in constructor and onConnectedToBroker not implemented"); - } - GetServiceRequest request = new GetServiceRequest(serviceId); - request.extras = new Bundle(); - request.packageName = context.getPackageName(); - request.account = account; - request.extras = extras; - broker.getService(callbacks, request); - } - - protected abstract I interfaceFromBinder(IBinder binder); - - @Override - public synchronized void connect() { - Log.d(TAG, "connect()"); - if (state == ConnectionState.CONNECTED || state == ConnectionState.CONNECTING) { - Log.d(TAG, "Already connected/connecting - nothing to do"); - } - state = ConnectionState.CONNECTING; - if (serviceConnection != null) { - MultiConnectionKeeper.getInstance(context).unbind(actionString, serviceConnection); - } - serviceConnection = new GmsServiceConnection(); - if (!MultiConnectionKeeper.getInstance(context).bind(actionString, serviceConnection)) { - state = ConnectionState.ERROR; - handleConnectionFailed(); - } - } - - public void handleConnectionFailed() { - connectionFailedListener.onConnectionFailed(new ConnectionResult(ConnectionResult.API_UNAVAILABLE, null)); - } - - @Override - public synchronized void disconnect() { - Log.d(TAG, "disconnect()"); - if (state == ConnectionState.DISCONNECTING) return; - if (state == ConnectionState.CONNECTING) { - state = ConnectionState.DISCONNECTING; - return; - } - serviceInterface = null; - if (serviceConnection != null) { - MultiConnectionKeeper.getInstance(context).unbind(actionString, serviceConnection); - serviceConnection = null; - } - state = ConnectionState.NOT_CONNECTED; - } - - @Override - public synchronized boolean isConnected() { - return (state == ConnectionState.CONNECTED && serviceInterface != null && serviceInterface.asBinder().isBinderAlive() ) || state == ConnectionState.PSEUDO_CONNECTED; - } - - @Override - public synchronized boolean isConnecting() { - return state == ConnectionState.CONNECTING; - } - - public synchronized boolean hasError() { - return state == ConnectionState.ERROR; - } - - public Context getContext() { - return context; - } - - public synchronized I getServiceInterface() { - if (isConnecting()) { - // TODO: wait for connection to be established and return afterwards. - throw new IllegalStateException("Waiting for connection"); - } else if (!isConnected()) { - throw new IllegalStateException("interface only available once connected!"); - } - return serviceInterface; - } - - protected enum ConnectionState { - NOT_CONNECTED, CONNECTING, CONNECTED, DISCONNECTING, ERROR, PSEUDO_CONNECTED - } - - private class GmsServiceConnection implements ServiceConnection { - - @Override - public void onServiceConnected(ComponentName componentName, IBinder iBinder) { - try { - Log.d(TAG, "ServiceConnection : onServiceConnected(" + componentName + ")"); - onConnectedToBroker(IGmsServiceBroker.Stub.asInterface(iBinder), new GmsCallbacks()); - } catch (RemoteException e) { - disconnect(); - } - } - - @Override - public void onServiceDisconnected(ComponentName componentName) { - synchronized (GmsClient.this) { - state = ConnectionState.NOT_CONNECTED; - } - } - } - - public class GmsCallbacks extends IGmsCallbacks.Stub { - - @Override - public void onPostInitComplete(int statusCode, IBinder binder, Bundle params) - throws RemoteException { - synchronized (GmsClient.this) { - if (state == ConnectionState.DISCONNECTING) { - state = ConnectionState.CONNECTED; - disconnect(); - return; - } - state = ConnectionState.CONNECTED; - serviceInterface = interfaceFromBinder(binder); - } - Log.d(TAG, "GmsCallbacks : onPostInitComplete(" + serviceInterface + ")"); - callbacks.onConnected(params); - } - } - -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/GmsConnector.java b/play-services-base/src/main/java/org/microg/gms/common/GmsConnector.java deleted file mode 100644 index 9a56566..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/GmsConnector.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.os.Looper; -import android.os.Message; -import android.os.RemoteException; -import android.util.Log; - -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.PendingResult; -import com.google.android.gms.common.api.Result; - -import org.microg.gms.common.api.AbstractPendingResult; -import org.microg.gms.common.api.ApiClient; -import org.microg.gms.common.api.GoogleApiClientImpl; - -public class GmsConnector { - private static final String TAG = "GmsConnector"; - - private final GoogleApiClientImpl apiClient; - private final Api api; - private final Callback callback; - - public GmsConnector(GoogleApiClient apiClient, Api api, Callback callback) { - this.apiClient = (GoogleApiClientImpl) apiClient; - this.api = api; - this.callback = callback; - } - - public static PendingResult call(GoogleApiClient client, Api api, GmsConnector.Callback callback) { - return new GmsConnector<>(client, api, callback).connect(); - } - - public AbstractPendingResult connect() { - Log.d(TAG, "connect()"); - apiClient.incrementUsageCounter(); - apiClient.getApiConnection(api); - Looper looper = apiClient.getLooper(); - final AbstractPendingResult result = new AbstractPendingResult<>(looper); - Message msg = new Message(); - msg.obj = result; - new Handler(looper).sendMessage(msg); - return result; - } - - public interface Callback { - void onClientAvailable(C client, ResultProvider resultProvider) throws RemoteException; - - interface ResultProvider { - void onResultAvailable(R result); - } - } - - private class Handler extends android.os.Handler { - private Handler(Looper looper) { - super(looper); - } - - @Override - public void handleMessage(Message msg) { - Log.d(TAG, "Handler : handleMessage"); - final AbstractPendingResult result = (AbstractPendingResult) msg.obj; - try { - C connection = (C) apiClient.getApiConnection(api); - callback.onClientAvailable(connection, realResult -> { - result.deliverResult(realResult); - apiClient.decrementUsageCounter(); - }); - } catch (RemoteException ignored) { - - } - } - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/MultiConnectionKeeper.java b/play-services-base/src/main/java/org/microg/gms/common/MultiConnectionKeeper.java deleted file mode 100644 index 57f63ef..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/MultiConnectionKeeper.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import static android.os.Build.VERSION.SDK_INT; -import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH; -import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME; - -import android.annotation.SuppressLint; -import android.content.ComponentName; -import android.content.Context; -import android.content.Intent; -import android.content.ServiceConnection; -import android.os.IBinder; -import android.util.Log; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -public class MultiConnectionKeeper { - private static final String TAG = "GmsMultiConKeeper"; - - private static MultiConnectionKeeper INSTANCE; - - private final Context context; - private final Map connections = new HashMap<>(); - - public MultiConnectionKeeper(Context context) { - this.context = context; - } - - public synchronized static MultiConnectionKeeper getInstance(Context context) { - if (INSTANCE == null) - INSTANCE = new MultiConnectionKeeper(context); - return INSTANCE; - } - - public synchronized boolean bind(String action, ServiceConnection connection) { - Log.d(TAG, "bind(" + action + ", " + connection + ")"); - Connection con = connections.get(action); - if (con != null) { - if (!con.forwardsConnection(connection)) { - con.addConnectionForward(connection); - if (!con.isBound()) - con.bind(); - } - } else { - con = new Connection(action); - con.addConnectionForward(connection); - con.bind(); - connections.put(action, con); - } - return con.isBound(); - } - - public synchronized void unbind(String action, ServiceConnection connection) { - Log.d(TAG, "unbind(" + action + ", " + connection + ")"); - Connection con = connections.get(action); - if (con != null) { - con.removeConnectionForward(connection); - if (!con.hasForwards() && con.isBound()) { - con.unbind(); - connections.remove(action); - } - } - } - - public class Connection { - private final String actionString; - private final Set connectionForwards = new HashSet<>(); - private boolean bound = false; - private boolean connected = false; - private IBinder binder; - private ComponentName component; - private final ServiceConnection serviceConnection = new ServiceConnection() { - @Override - public void onServiceConnected(ComponentName componentName, IBinder iBinder) { - Log.d(TAG, "Connection(" + actionString + ") : ServiceConnection : " + - "onServiceConnected(" + componentName + ")"); - binder = iBinder; - component = componentName; - for (ServiceConnection connection : connectionForwards) { - connection.onServiceConnected(componentName, iBinder); - } - connected = true; - } - - @Override - public void onServiceDisconnected(ComponentName componentName) { - Log.d(TAG, "Connection(" + actionString + ") : ServiceConnection : " + - "onServiceDisconnected(" + componentName + ")"); - binder = null; - component = componentName; - for (ServiceConnection connection : connectionForwards) { - connection.onServiceDisconnected(componentName); - } - connected = false; - bound = false; - } - }; - - public Connection(String actionString) { - this.actionString = actionString; - } - - @SuppressLint("InlinedApi") - public void bind() { - Log.d(TAG, "Connection(" + actionString + ") : bind()"); - Intent gmsIntent = new Intent(actionString).setPackage(GMS_PACKAGE_NAME); - Intent selfIntent = new Intent(actionString).setPackage(context.getPackageName()); - Intent intent; - if (context.getPackageManager().resolveService(gmsIntent, 0) == null) { - Log.w(TAG, "No GMS service found for " + actionString); - if (context.getPackageManager().resolveService(selfIntent, 0) != null) { - Log.d(TAG, "Found service for "+actionString+" in self package, using it instead"); - intent = selfIntent; - } else { - return; - } - } else { - intent = gmsIntent; - } - int flags = Context.BIND_AUTO_CREATE; - if (SDK_INT >= ICE_CREAM_SANDWICH) { - flags |= Context.BIND_ADJUST_WITH_ACTIVITY; - } - bound = context.bindService(intent, serviceConnection, flags); - if (!bound) { - context.unbindService(serviceConnection); - } - } - - public boolean isBound() { - return bound; - } - - public IBinder getBinder() { - return binder; - } - - public void unbind() { - Log.d(TAG, "Connection(" + actionString + ") : unbind()"); - try { - context.unbindService(serviceConnection); - } catch (IllegalArgumentException e) { // not bound (whatever reason) - Log.w(TAG, e); - } - bound = false; - } - - public void addConnectionForward(ServiceConnection connection) { - connectionForwards.add(connection); - if (connected) { - connection.onServiceConnected(component, binder); - } - } - - public void removeConnectionForward(ServiceConnection connection) { - connectionForwards.remove(connection); - if (connected) { - connection.onServiceDisconnected(component); - } - } - - public boolean forwardsConnection(ServiceConnection connection) { - return connectionForwards.contains(connection); - } - - public boolean hasForwards() { - return !connectionForwards.isEmpty(); - } - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java b/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java deleted file mode 100644 index 560f368..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.os.Looper; - -import com.google.android.gms.common.api.PendingResult; -import com.google.android.gms.common.api.Result; -import com.google.android.gms.common.api.ResultCallback; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -public class AbstractPendingResult implements PendingResult { - private final Object lock = new Object(); - private final CountDownLatch countDownLatch = new CountDownLatch(1); - private final ResultCallbackHandler handler; - private boolean canceled; - private R result; - private ResultCallback resultCallback; - - public AbstractPendingResult(Looper looper) { - handler = new ResultCallbackHandler<>(looper); - } - - private R getResult() { - synchronized (lock) { - return result; - } - } - - @Override - public R await() { - try { - countDownLatch.await(); - } catch (InterruptedException ignored) { - } - return getResult(); - } - - @Override - public R await(long time, TimeUnit unit) { - try { - countDownLatch.await(time, unit); - } catch (InterruptedException ignored) { - } - return getResult(); - } - - @Override - public void cancel() { - // TODO - } - - @Override - public boolean isCanceled() { - synchronized (lock) { - return canceled; - } - } - - public boolean isReady() { - return this.countDownLatch.getCount() == 0L; - } - - @Override - public void setResultCallback(ResultCallback callback, long time, TimeUnit unit) { - synchronized (lock) { - if (!isCanceled()) { - if (isReady()) { - handler.sendResultCallback(callback, getResult()); - } else { - handler.sendTimeoutResultCallback(this, unit.toMillis(time)); - } - } - } - } - - @Override - public void setResultCallback(ResultCallback callback) { - synchronized (lock) { - if (!isCanceled()) { - if (isReady()) { - handler.sendResultCallback(callback, getResult()); - } else { - resultCallback = callback; - } - } - } - } - - public void deliverResult(R result) { - this.result = result; - countDownLatch.countDown(); - - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPlayServicesClient.java b/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPlayServicesClient.java deleted file mode 100644 index eb9d66b..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPlayServicesClient.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.util.Log; - -import com.google.android.gms.common.GooglePlayServicesClient; -import com.google.android.gms.common.api.GoogleApiClient; - -import org.microg.gms.common.ForwardConnectionCallbacks; -import org.microg.gms.common.ForwardConnectionFailedListener; - -public class AbstractPlayServicesClient implements GooglePlayServicesClient { - private static final String TAG = "GmsPlayServicesClient"; - - protected final GoogleApiClient googleApiClient; - - public AbstractPlayServicesClient(GoogleApiClient googleApiClient) { - this.googleApiClient = googleApiClient; - } - - public void assertConnected() { - if (!isConnected()) throw new IllegalStateException("Not connected!"); - } - - @Override - public void connect() { - Log.d(TAG, "connect()"); - googleApiClient.connect(); - } - - @Override - public void disconnect() { - Log.d(TAG, "disconnect()"); - //TODO googleApiClient.disconnect(); - } - - @Override - public boolean isConnected() { - return googleApiClient.isConnected(); - } - - @Override - public boolean isConnecting() { - return googleApiClient.isConnecting(); - } - - @Override - public void registerConnectionCallbacks(final ConnectionCallbacks listener) { - googleApiClient.registerConnectionCallbacks(new ForwardConnectionCallbacks(listener)); - } - - @Override - public boolean isConnectionCallbacksRegistered(ConnectionCallbacks listener) { - return googleApiClient - .isConnectionCallbacksRegistered(new ForwardConnectionCallbacks(listener)); - } - - @Override - public void unregisterConnectionCallbacks( - ConnectionCallbacks listener) { - googleApiClient.unregisterConnectionCallbacks(new ForwardConnectionCallbacks(listener)); - } - - @Override - public void registerConnectionFailedListener( - OnConnectionFailedListener listener) { - googleApiClient.registerConnectionFailedListener( - new ForwardConnectionFailedListener(listener)); - } - - @Override - public boolean isConnectionFailedListenerRegistered( - OnConnectionFailedListener listener) { - return googleApiClient.isConnectionFailedListenerRegistered( - new ForwardConnectionFailedListener(listener)); - } - - @Override - public void unregisterConnectionFailedListener( - OnConnectionFailedListener listener) { - googleApiClient.unregisterConnectionFailedListener( - new ForwardConnectionFailedListener(listener)); - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java b/play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java deleted file mode 100644 index 602e150..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -public interface ApiClient { - void connect(); - - void disconnect(); - - boolean isConnected(); - - boolean isConnecting(); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java b/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java deleted file mode 100644 index b5aa386..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.content.Context; -import android.os.Looper; - -import com.google.android.gms.common.api.Api; - -public interface ApiClientBuilder { - ApiClient build(O options, Context context, Looper looper, ApiClientSettings clientSettings, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java b/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java deleted file mode 100644 index d1e314a..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -public class ApiClientSettings { -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java b/play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java deleted file mode 100644 index 738a43d..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import android.os.Bundle; - -import com.google.android.gms.common.api.GoogleApiClient; - -public interface ConnectionCallbacks { - - /** - * After calling {@link #connect()}, this method will be invoked asynchronously when the - * connect request has successfully completed. After this callback, the application can - * make requests on other methods provided by the client and expect that no user - * intervention is required to call methods that use account and scopes provided to the - * client constructor. - *

- * Note that the contents of the {@code connectionHint} Bundle are defined by the specific - * services. Please see the documentation of the specific implementation of - * {@link GoogleApiClient} you are using for more information. - * - * @param connectionHint Bundle of data provided to clients by Google Play services. May - * be null if no content is provided by the service. - */ - void onConnected(Bundle connectionHint); - - /** - * Called when the client is temporarily in a disconnected state. This can happen if there - * is a problem with the remote service (e.g. a crash or resource problem causes it to be - * killed by the system). When called, all requests have been canceled and no outstanding - * listeners will be executed. GoogleApiClient will automatically attempt to restore the - * connection. Applications should disable UI components that require the service, and wait - * for a call to {@link #onConnected(Bundle)} to re-enable them. - * - * @param cause The reason for the disconnection. Defined by constants {@code CAUSE_*}. - */ - void onConnectionSuspended(int cause); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java b/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java deleted file mode 100644 index e59f68f..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.content.Context; -import android.os.Bundle; -import android.os.Looper; -import android.util.Log; - -import androidx.fragment.app.FragmentActivity; - -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.PendingResult; -import com.google.android.gms.common.api.Status; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -public class GoogleApiClientImpl implements GoogleApiClient { - private static final String TAG = "GmsApiClientImpl"; - - private final Context context; - private final Looper looper; - private final ApiClientSettings clientSettings; - private final Map apis = new HashMap<>(); - private final Map apiConnections = new HashMap<>(); - private final Set connectionCallbacks = new HashSet<>(); - private final Set connectionFailedListeners = new HashSet<>(); - private final int clientId; - private final ConnectionCallbacks baseConnectionCallbacks = new ConnectionCallbacks() { - @Override - public void onConnected(Bundle connectionHint) { - Log.d(TAG, "ConnectionCallbacks : onConnected()"); - for (ConnectionCallbacks callback : connectionCallbacks) { - callback.onConnected(connectionHint); - } - } - - @Override - public void onConnectionSuspended(int cause) { - Log.d(TAG, "ConnectionCallbacks : onConnectionSuspended()"); - for (ConnectionCallbacks callback : connectionCallbacks) { - callback.onConnectionSuspended(cause); - } - } - }; - private final OnConnectionFailedListener baseConnectionFailedListener = result -> { - Log.d(TAG, "OnConnectionFailedListener : onConnectionFailed()"); - for (OnConnectionFailedListener listener : connectionFailedListeners) { - listener.onConnectionFailed(result); - } - }; - private int usageCounter = 0; - private boolean shouldDisconnect = false; - - public GoogleApiClientImpl(Context context, Looper looper, ApiClientSettings clientSettings, - Map apis, - Set connectionCallbacks, - Set connectionFailedListeners, int clientId) { - this.context = context; - this.looper = looper; - this.clientSettings = clientSettings; - this.apis.putAll(apis); - this.connectionCallbacks.addAll(connectionCallbacks); - this.connectionFailedListeners.addAll(connectionFailedListeners); - this.clientId = clientId; - - for (Api api : apis.keySet()) { - apiConnections.put(api, api.getBuilder().build(apis.get(api), context, looper, clientSettings, baseConnectionCallbacks, baseConnectionFailedListener)); - } - } - - public synchronized void incrementUsageCounter() { - usageCounter++; - } - - public synchronized void decrementUsageCounter() { - usageCounter--; - if (shouldDisconnect) disconnect(); - } - - public Looper getLooper() { - return looper; - } - - public ApiClient getApiConnection(Api api) { - return apiConnections.get(api); - } - - @Override - public ConnectionResult blockingConnect() { - return null; - } - - @Override - public ConnectionResult blockingConnect(long timeout, TimeUnit unit) { - return null; - } - - @Override - public PendingResult clearDefaultAccountAndReconnect() { - return null; - } - - @Override - public synchronized void connect() { - Log.d(TAG, "connect()"); - if (isConnected() || isConnecting()) { - if (shouldDisconnect) { - shouldDisconnect = false; - return; - } - Log.d(TAG, "Already connected/connecting, nothing to do"); - return; - } - for (ApiClient connection : apiConnections.values()) { - if (!connection.isConnected()) { - connection.connect(); - } - } - } - - @Override - public synchronized void disconnect() { - if (usageCounter > 0) { - shouldDisconnect = true; - } else { - Log.d(TAG, "disconnect()"); - for (ApiClient connection : apiConnections.values()) { - if (connection.isConnected()) { - connection.disconnect(); - } - } - } - } - - @Override - public synchronized boolean isConnected() { - for (ApiClient connection : apiConnections.values()) { - if (!connection.isConnected()) return false; - } - return true; - } - - @Override - public synchronized boolean isConnecting() { - for (ApiClient connection : apiConnections.values()) { - if (connection.isConnecting()) return true; - } - return false; - } - - @Override - public boolean isConnectionCallbacksRegistered(ConnectionCallbacks listener) { - return connectionCallbacks.contains(listener); - } - - @Override - public boolean isConnectionFailedListenerRegistered( - OnConnectionFailedListener listener) { - return connectionFailedListeners.contains(listener); - } - - @Override - public synchronized void reconnect() { - Log.d(TAG, "reconnect()"); - disconnect(); - connect(); - } - - @Override - public void registerConnectionCallbacks(ConnectionCallbacks listener) { - connectionCallbacks.add(listener); - } - - @Override - public void registerConnectionFailedListener(OnConnectionFailedListener listener) { - connectionFailedListeners.add(listener); - } - - @Override - public void stopAutoManager(FragmentActivity lifecycleActivity) throws IllegalStateException { - - } - - @Override - public void unregisterConnectionCallbacks(ConnectionCallbacks listener) { - connectionCallbacks.remove(listener); - } - - @Override - public void unregisterConnectionFailedListener(OnConnectionFailedListener listener) { - connectionFailedListeners.remove(listener); - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java b/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java deleted file mode 100644 index 4e05aa7..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import android.content.Context; -import android.os.Bundle; - -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApi; -import com.google.android.gms.tasks.TaskCompletionSource; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -public class GoogleApiManager { - private static GoogleApiManager instance; - private final Context context; - private final Map clientMap = new HashMap<>(); - private final Map>> waitingApiCallMap = new HashMap<>(); - - private GoogleApiManager(Context context) { - this.context = context; - } - - public synchronized static GoogleApiManager getInstance(Context context) { - if (instance == null) instance = new GoogleApiManager(context); - return instance; - } - - private synchronized A clientForApi(GoogleApi api) { - ApiInstance apiInstance = new ApiInstance(api); - if (clientMap.containsKey(apiInstance)) { - return (A) clientMap.get(apiInstance); - } else { - ApiClient client = api.api.getBuilder().build(api.getOptions(), context, context.getMainLooper(), null, new ConnectionCallback(apiInstance), new ConnectionFailedListener(apiInstance)); - clientMap.put(apiInstance, client); - waitingApiCallMap.put(apiInstance, new ArrayList<>()); - return (A) client; - } - } - - public synchronized void scheduleTask(GoogleApi api, PendingGoogleApiCall apiCall, TaskCompletionSource completionSource) { - A client = clientForApi(api); - boolean connecting = client.isConnecting(); - boolean connected = client.isConnected(); - if (connected) { - apiCall.execute(client, completionSource); - } else { - waitingApiCallMap.get(new ApiInstance(api)).add(new WaitingApiCall<>((PendingGoogleApiCall) apiCall, completionSource)); - if (!connecting) { - client.connect(); - } - } - } - - private synchronized void onInstanceConnected(ApiInstance apiInstance, Bundle connectionHint) { - List> waitingApiCalls = waitingApiCallMap.get(apiInstance); - for (WaitingApiCall waitingApiCall : waitingApiCalls) { - waitingApiCall.execute(clientMap.get(apiInstance)); - } - waitingApiCalls.clear(); - } - - private synchronized void onInstanceSuspended(ApiInstance apiInstance, int cause) { - - } - - private synchronized void onInstanceFailed(ApiInstance apiInstance, ConnectionResult result) { - List> waitingApiCalls = waitingApiCallMap.get(apiInstance); - for (WaitingApiCall waitingApiCall : waitingApiCalls) { - waitingApiCall.failed(new RuntimeException(result.getErrorMessage())); - } - waitingApiCalls.clear(); - } - - private class ConnectionCallback implements ConnectionCallbacks { - private final ApiInstance apiInstance; - - public ConnectionCallback(ApiInstance apiInstance) { - this.apiInstance = apiInstance; - } - - @Override - public void onConnected(Bundle connectionHint) { - onInstanceConnected(apiInstance, connectionHint); - } - - @Override - public void onConnectionSuspended(int cause) { - onInstanceSuspended(apiInstance, cause); - } - } - - private class ConnectionFailedListener implements OnConnectionFailedListener { - private final ApiInstance apiInstance; - - public ConnectionFailedListener(ApiInstance apiInstance) { - this.apiInstance = apiInstance; - } - - @Override - public void onConnectionFailed(ConnectionResult result) { - onInstanceFailed(apiInstance, result); - } - } - - private static class WaitingApiCall { - private final PendingGoogleApiCall apiCall; - private final TaskCompletionSource completionSource; - - public WaitingApiCall(PendingGoogleApiCall apiCall, TaskCompletionSource completionSource) { - this.apiCall = apiCall; - this.completionSource = completionSource; - } - - public void execute(ApiClient client) { - apiCall.execute(client, completionSource); - } - - public void failed(Exception e) { - completionSource.setException(e); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - WaitingApiCall that = (WaitingApiCall) o; - - if (!Objects.equals(apiCall, that.apiCall)) return false; - return Objects.equals(completionSource, that.completionSource); - } - - @Override - public int hashCode() { - int result = apiCall != null ? apiCall.hashCode() : 0; - result = 31 * result + (completionSource != null ? completionSource.hashCode() : 0); - return result; - } - } - - private static class ApiInstance { - private final Class apiClass; - private final Api.ApiOptions apiOptions; - - public ApiInstance(Class apiClass, Api.ApiOptions apiOptions) { - this.apiClass = apiClass; - this.apiOptions = apiOptions; - } - - public ApiInstance(GoogleApi api) { - this(api.getClass(), api.getOptions()); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ApiInstance that = (ApiInstance) o; - - if (!Objects.equals(apiClass, that.apiClass)) return false; - return Objects.equals(apiOptions, that.apiOptions); - } - - @Override - public int hashCode() { - int result = apiClass != null ? apiClass.hashCode() : 0; - result = 31 * result + (apiOptions != null ? apiOptions.hashCode() : 0); - return result; - } - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/InstantGoogleApiCall.java b/play-services-base/src/main/java/org/microg/gms/common/api/InstantGoogleApiCall.java deleted file mode 100644 index 5e813d8..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/InstantGoogleApiCall.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import com.google.android.gms.tasks.TaskCompletionSource; - -public interface InstantGoogleApiCall extends PendingGoogleApiCall { - R execute(A client) throws Exception; - - @Override - default void execute(A client, TaskCompletionSource completionSource) { - try { - completionSource.setResult(execute(client)); - } catch (Exception e) { - completionSource.setException(e); - } - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/InstantPendingResult.java b/play-services-base/src/main/java/org/microg/gms/common/api/InstantPendingResult.java deleted file mode 100644 index ba75725..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/InstantPendingResult.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import com.google.android.gms.common.api.PendingResult; -import com.google.android.gms.common.api.Result; -import com.google.android.gms.common.api.ResultCallback; - -import java.util.concurrent.TimeUnit; - -public class InstantPendingResult implements PendingResult { - R value; - - public InstantPendingResult(R value) { - this.value = value; - } - - @Override - public R await() { - return value; - } - - @Override - public R await(long time, TimeUnit unit) { - return value; - } - - @Override - public void cancel() { - - } - - @Override - public boolean isCanceled() { - return false; - } - - @Override - public void setResultCallback(ResultCallback callback, long time, TimeUnit unit) { - callback.onResult(value); - } - - @Override - public void setResultCallback(ResultCallback callback) { - callback.onResult(value); - } -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java b/play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java deleted file mode 100644 index cd99423..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import android.app.Activity; - -import com.google.android.gms.common.ConnectionResult; - -public interface OnConnectionFailedListener { - /** - * Called when there was an error connecting the client to the service. - * - * @param result A {@link ConnectionResult} that can be used for resolving the error, and - * deciding what sort of error occurred. To resolve the error, the resolution - * must be started from an activity with a non-negative {@code requestCode} - * passed to {@link ConnectionResult#startResolutionForResult(Activity, int)}. - * Applications should implement {@link Activity#onActivityResult} in their - * Activity to call {@link #connect()} again if the user has resolved the - * issue (resultCode is {@link Activity#RESULT_OK}). - */ - void onConnectionFailed(ConnectionResult result); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/PendingGoogleApiCall.java b/play-services-base/src/main/java/org/microg/gms/common/api/PendingGoogleApiCall.java deleted file mode 100644 index 8c92abd..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/PendingGoogleApiCall.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import com.google.android.gms.tasks.TaskCompletionSource; - -public interface PendingGoogleApiCall { - void execute(A client, TaskCompletionSource completionSource); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java b/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java deleted file mode 100644 index 1ddb4d4..0000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.os.Handler; -import android.os.Looper; -import android.os.Message; -import android.util.Log; - -import com.google.android.gms.common.api.Result; -import com.google.android.gms.common.api.ResultCallback; - -class ResultCallbackHandler extends Handler { - private static final String TAG = "GmsResultCbackHandler"; - public static final int CALLBACK_ON_COMPLETE = 1; - public static final int CALLBACK_ON_TIMEOUT = 2; - - public ResultCallbackHandler(Looper looper) { - super(looper); - } - - @Override - public void handleMessage(Message msg) { - switch (msg.what) { - case CALLBACK_ON_COMPLETE: - OnCompleteObject o = (OnCompleteObject) msg.obj; - Log.d(TAG, "handleMessage() : onResult(" + o.result + ")"); - o.callback.onResult(o.result); - break; - case CALLBACK_ON_TIMEOUT: - // TODO - break; - } - } - - public void sendResultCallback(ResultCallback callback, R result) { - Message message = new Message(); - message.what = CALLBACK_ON_COMPLETE; - message.obj = new OnCompleteObject<>(callback, result); - sendMessage(message); - } - - public void sendTimeoutResultCallback(AbstractPendingResult pendingResult, long millis) { - - } - - public static class OnCompleteObject { - public ResultCallback callback; - public R result; - - public OnCompleteObject(ResultCallback callback, R result) { - this.callback = callback; - this.result = result; - } - } -} diff --git a/play-services-base/src/main/res/values/version.xml b/play-services-base/src/main/res/values/version.xml deleted file mode 100644 index 318bb1c..0000000 --- a/play-services-base/src/main/res/values/version.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 6599436 - diff --git a/play-services-basement/build.gradle b/play-services-basement/build.gradle deleted file mode 100644 index 674edc4..0000000 --- a/play-services-basement/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -dependencies { - api "org.microg:safe-parcel:1.7.0" - - implementation 'androidx.annotation:annotation:1.3.0' - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32' -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - aidlPackageWhiteList "com/google/android/gms/common/api/Status.aidl" - aidlPackageWhiteList "com/google/android/gms/common/internal/ICancelToken.aidl" - aidlPackageWhiteList "com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl" - aidlPackageWhiteList "com/google/android/gms/dynamic/IObjectWrapper.aidl" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - buildConfigField "int", "VERSION_CODE", "$appVersionCode" - } - - buildFeatures { - viewBinding = true - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} \ No newline at end of file diff --git a/play-services-basement/gradle.properties b/play-services-basement/gradle.properties deleted file mode 100644 index f7f3ecc..0000000 --- a/play-services-basement/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Basement -POM_DESCRIPTION=Interfaces and objects used all over Play Services API, Library and Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-basement/src/main/AndroidManifest.xml b/play-services-basement/src/main/AndroidManifest.xml deleted file mode 100644 index bd43677..0000000 --- a/play-services-basement/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl deleted file mode 100644 index 701f99a..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.api; - -parcelable Status; \ No newline at end of file diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl deleted file mode 100644 index 791dbe9..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.internal; - -parcelable GetServiceRequest; diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl deleted file mode 100644 index aebd479..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.common.internal; - -interface ICancelToken { - void cancel(); -} diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl deleted file mode 100644 index b021028..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.common.internal; - -import android.os.Bundle; - -interface IGmsCallbacks { - void onPostInitComplete(int statusCode, IBinder binder, in Bundle params); -} diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl deleted file mode 100644 index e65fe4a..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.android.gms.common.internal; - -import android.os.Bundle; - -import com.google.android.gms.common.internal.IGmsCallbacks; -import com.google.android.gms.common.internal.GetServiceRequest; -import com.google.android.gms.common.internal.ValidateAccountRequest; - -interface IGmsServiceBroker { - void getPeopleService(IGmsCallbacks callback, int code, String str, in Bundle params) = 4; - void getReportingService(IGmsCallbacks callback, int code, String str, in Bundle params) = 5; - void getGoogleLocationManagerService(IGmsCallbacks callback, int code, String str, in Bundle params) = 7; - void getPlayLogService(IGmsCallbacks callback, int code, String str, in Bundle params) = 10; - void getCastMirroringService(IGmsCallbacks callback, int code, String str, in Bundle params) = 14; - void getGoogleIdentityService(IGmsCallbacks callback, int code, String str, in Bundle params) = 16; - void getCastService(IGmsCallbacks callback, int code, String str, IBinder binder, in Bundle params) = 18; - void getAddressService(IGmsCallbacks callback, int code, String str) = 23; - void getService(IGmsCallbacks callback, in GetServiceRequest request) = 45; - void validateAccount(IGmsCallbacks callback, in ValidateAccountRequest request) = 46; -} diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl deleted file mode 100644 index cef6ad7..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.internal; - -parcelable ValidateAccountRequest; diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl deleted file mode 100644 index 35e1474..0000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.dynamic; - -/** - * The concrete class implementing IObjectWrapper must have exactly one declared private field - * for the wrapped object. Preferably, this is an instance of the ObjectWrapper class. - */ -interface IObjectWrapper { -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java b/play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java deleted file mode 100644 index f3272de..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.app.Activity; -import android.app.PendingIntent; -import android.content.Intent; -import android.content.IntentSender; -import android.text.TextUtils; - -import java.util.Arrays; - -/** - * Contains all possible error codes for when a client fails to connect to Google Play services. - * These error codes are used by {@link GoogleApiClient.OnConnectionFailedListener}. - */ -public class ConnectionResult { - /** - * The connection was successful. - */ - public static final int SUCCESS = 0; - /** - * Google Play services is missing on this device. The calling activity should pass this error - * code to {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)} to get a localized - * error dialog that will resolve the error when shown. - */ - public static final int SERVICE_MISSING = 1; - /** - * The installed version of Google Play services is out of date. The calling activity should - * pass this error code to {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)} to - * get a localized error dialog that will resolve the error when shown. - */ - public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2; - /** - * The installed version of Google Play services has been disabled on this device. The calling - * activity should pass this error code to - * {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)} to get a localized error - * dialog that will resolve the error when shown. - */ - public static final int SERVICE_DISABLED = 3; - /** - * The client attempted to connect to the service but the user is not signed in. The client may - * choose to continue without using the API or it may call - * {@link #startResolutionForResult(Activity, int)} to prompt the user to sign in. After the - * sign in activity returns with {@link Activity#RESULT_OK} further attempts to connect should - * succeed. - */ - public static final int SIGN_IN_REQUIRED = 4; - /** - * The client attempted to connect to the service with an invalid account name specified. - */ - public static final int INVALID_ACCOUNT = 5; - /** - * Completing the connection requires some form of resolution. A resolution will be available - * to be started with {@link #startResolutionForResult(Activity, int)}. If the result returned - * is {@link Activity#RESULT_OK}, then further attempts to connect should either complete or - * continue on to the next issue that needs to be resolved. - */ - public static final int RESOLUTION_REQUIRED = 6; - /** - * A network error occurred. Retrying should resolve the problem. - */ - public static final int NETWORK_ERROR = 7; - /** - * An internal error occurred. Retrying should resolve the problem. - */ - public static final int INTERNAL_ERROR = 8; - /** - * The version of the Google Play services installed on this device is not authentic. - */ - public static final int SERVICE_INVALID = 9; - /** - * The application is misconfigured. This error is not recoverable and will be treated as - * fatal. The developer should look at the logs after this to determine more actionable - * information. - */ - public static final int DEVELOPER_ERROR = 10; - /** - * The application is not licensed to the user. This error is not recoverable and will be - * treated as fatal. - */ - public static final int LICENSE_CHECK_FAILED = 11; - /** - * The client canceled the connection by calling {@link GoogleApiClient#disconnect()}. - * Only returned by {@link GoogleApiClient#blockingConnect()}. - */ - public static final int CANCELED = 13; - /** - * The timeout was exceeded while waiting for the connection to complete. Only returned by - * {@link GoogleApiClient#blockingConnect()}. - */ - public static final int TIMEOUT = 14; - /** - * An interrupt occurred while waiting for the connection complete. Only returned by - * {@link GoogleApiClient#blockingConnect()}. - */ - public static final int INTERRUPTED = 15; - /** - * One of the API components you attempted to connect to is not available. The API will not - * work on this device, and updating Google Play services will not likely solve the problem. - * Using the API on the device should be avoided. - */ - public static final int API_UNAVAILABLE = 16; - - /** - * Service doesn't have one or more required permissions. - */ - public static final int SERVICE_MISSING_PERMISSION = 19; - - /** - * The Drive API requires external storage (such as an SD card), but no external storage is - * mounted. This error is recoverable if the user installs external storage (if none is - * present) and ensures that it is mounted (which may involve disabling USB storage mode, - * formatting the storage, or other initialization as required by the device). - *

- * This error should never be returned on a device with emulated external storage. On devices - * with emulated external storage, the emulated "external storage" is always present regardless - * of whether the device also has removable storage. - */ - @Deprecated - public static final int DRIVE_EXTERNAL_STORAGE_REQUIRED = 1500; - - private final int statusCode; - private final PendingIntent pendingIntent; - private final String message; - - /** - * Creates a connection result. - * - * @param statusCode The status code. - */ - public ConnectionResult(int statusCode) { - this(statusCode, null); - } - - /** - * Creates a connection result. - * - * @param statusCode The status code. - * @param pendingIntent A pending intent that will resolve the issue when started, or null. - */ - public ConnectionResult(int statusCode, PendingIntent pendingIntent) { - this(statusCode, pendingIntent, getStatusString(statusCode)); - } - - /** - * Creates a connection result. - * - * @param statusCode The status code. - * @param pendingIntent A pending intent that will resolve the issue when started, or null. - * @param message An additional error message for the connection result, or null. - */ - public ConnectionResult(int statusCode, PendingIntent pendingIntent, String message) { - this.statusCode = statusCode; - this.pendingIntent = pendingIntent; - this.message = message; - } - - static String getStatusString(int statusCode) { - switch (statusCode) { - case -1: - return "UNKNOWN"; - case 0: - return "SUCCESS"; - case 1: - return "SERVICE_MISSING"; - case 2: - return "SERVICE_VERSION_UPDATE_REQUIRED"; - case 3: - return "SERVICE_DISABLED"; - case 4: - return "SIGN_IN_REQUIRED"; - case 5: - return "INVALID_ACCOUNT"; - case 6: - return "RESOLUTION_REQUIRED"; - case 7: - return "NETWORK_ERROR"; - case 8: - return "INTERNAL_ERROR"; - case 9: - return "SERVICE_INVALID"; - case 10: - return "DEVELOPER_ERROR"; - case 11: - return "LICENSE_CHECK_FAILED"; - case 13: - return "CANCELED"; - case 14: - return "TIMEOUT"; - case 15: - return "INTERRUPTED"; - case 16: - return "API_UNAVAILABLE"; - case 17: - return "SIGN_IN_FAILED"; - case 18: - return "SERVICE_UPDATING"; - case 19: - return "SERVICE_MISSING_PERMISSION"; - case 20: - return "RESTRICTED_PROFILE"; - case 21: - return "API_VERSION_UPDATE_REQUIRED"; - case 42: - return "UPDATE_ANDROID_WEAR"; - case 99: - return "UNFINISHED"; - case 1500: - return "DRIVE_EXTERNAL_STORAGE_REQUIRED"; - default: - return "UNKNOWN_ERROR_CODE(" + statusCode + ")"; - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } else if (!(o instanceof ConnectionResult)) { - return false; - } else { - ConnectionResult r = (ConnectionResult)o; - return statusCode == r.statusCode && pendingIntent == null ? r.pendingIntent == null : pendingIntent.equals(r.pendingIntent) && TextUtils.equals(message, r.message); - } - } - - /** - * Indicates the type of error that interrupted connection. - * - * @return the error code, or {@link #SUCCESS} if no error occurred. - */ - public int getErrorCode() { - return statusCode; - } - - /** - * Returns an error message for connection result. - * - * @return the message - */ - public String getErrorMessage() { - return message; - } - - /** - * A pending intent to resolve the connection failure. This intent can be started with - * {@link Activity#startIntentSenderForResult(IntentSender, int, Intent, int, int, int)} to - * present UI to solve the issue. - * - * @return The pending intent to resolve the connection failure. - */ - public PendingIntent getResolution() { - return pendingIntent; - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{statusCode, pendingIntent, message}); - } - - /** - * Returns {@code true} if calling {@link #startResolutionForResult(Activity, int)} will start - * any intents requiring user interaction. - * - * @return {@code true} if there is a resolution that can be started. - */ - public boolean hasResolution() { - return statusCode != 0 && pendingIntent != null; - } - - /** - * Returns {@code true} if the connection was successful. - * - * @return {@code true} if the connection was successful, {@code false} if there was an error. - */ - public boolean isSuccess() { - return statusCode == 0; - } - - /** - * Resolves an error by starting any intents requiring user interaction. See - * {@link #SIGN_IN_REQUIRED}, and {@link #RESOLUTION_REQUIRED}. - * - * @param activity An Activity context to use to resolve the issue. The activity's - * {@link Activity#onActivityResult} method will be invoked after the user - * is done. If the resultCode is {@link Activity#RESULT_OK}, the application - * should try to connect again. - * @param requestCode The request code to pass to {@link Activity#onActivityResult}. - * @throws IntentSender.SendIntentException If the resolution intent has been canceled or is no - * longer able to execute the request. - */ - public void startResolutionForResult(Activity activity, int requestCode) throws - IntentSender.SendIntentException { - if (hasResolution()) { - activity.startIntentSenderForResult(pendingIntent.getIntentSender(), requestCode, null, 0, 0, 0); - } - } -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/Feature.java b/play-services-basement/src/main/java/com/google/android/gms/common/Feature.java deleted file mode 100644 index 0a5b081..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/Feature.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class Feature extends AutoSafeParcelable { - @Field(1) - private String name; - @Field(2) - private int oldVersion; - @Field(3) - private long version = -1; - - private Feature() { - } - - public Feature(String name, long version) { - this.name = name; - this.version = version; - } - - public String getName() { - return name; - } - - public long getVersion() { - if (version == -1) return oldVersion; - return version; - } - - public static final Creator CREATOR = new AutoSafeParcelable.AutoCreator<>(Feature.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java b/play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java deleted file mode 100644 index a3dfbf5..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -public class Scopes { - public static final String PROFILE = "profile"; - public static final String PLUS_LOGIN = "https://www.googleapis.com/auth/plus.login"; - public static final String PLUS_ME = "https://www.googleapis.com/auth/plus.me"; - public static final String GAMES = "https://www.googleapis.com/auth/games"; - public static final String CLOUD_SAVE = "https://www.googleapis.com/auth/datastoremobile"; - public static final String APP_STATE = "https://www.googleapis.com/auth/appstate"; - public static final String DRIVE_FILE = "https://www.googleapis.com/auth/drive.file"; - public static final String DRIVE_APPFOLDER = "https://www.googleapis.com/auth/drive.appdata"; - public static final String FITNESS_ACTIVITY_READ = "https://www.googleapis.com/auth/fitness.activity.read"; - public static final String FITNESS_ACTIVITY_READ_WRITE = "https://www.googleapis.com/auth/fitness.activity.write"; - public static final String FITNESS_LOCATION_READ = "https://www.googleapis.com/auth/fitness.location.read"; - public static final String FITNESS_LOCATION_READ_WRITE = "https://www.googleapis.com/auth/fitness.location.write"; - public static final String FITNESS_BODY_READ = "https://www.googleapis.com/auth/fitness.body.read"; - public static final String FITNESS_BODY_READ_WRITE = "https://www.googleapis.com/auth/fitness.body.write"; -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java deleted file mode 100644 index 6a2cbb5..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import androidx.annotation.NonNull; - -import org.microg.gms.common.PublicApi; - -@PublicApi -public class CommonStatusCodes { - public static final int SUCCESS_CACHE = -1; - public static final int SUCCESS = 0; - @Deprecated - public static final int SERVICE_MISSING = 1; - @Deprecated - public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2; - @Deprecated - public static final int SERVICE_DISABLED = 3; - public static final int SIGN_IN_REQUIRED = 4; - public static final int INVALID_ACCOUNT = 5; - public static final int RESOLUTION_REQUIRED = 6; - public static final int NETWORK_ERROR = 7; - public static final int INTERNAL_ERROR = 8; - public static final int SERVICE_INVALID = 9; - public static final int DEVELOPER_ERROR = 10; - public static final int LICENSE_CHECK_FAILED = 11; - public static final int ERROR = 13; - public static final int INTERRUPTED = 14; - public static final int TIMEOUT = 15; - public static final int CANCELED = 16; - public static final int API_NOT_CONNECTED = 17; - public static final int DEAD_CLIENT = 18; - - @NonNull - public static String getStatusCodeString(int statusCode) { - switch (statusCode) { - case SUCCESS_CACHE: - return "SUCCESS_CACHE"; - case SUCCESS: - return "SUCCESS"; - case SERVICE_VERSION_UPDATE_REQUIRED: - return "SERVICE_VERSION_UPDATE_REQUIRED"; - case SERVICE_DISABLED: - return "SERVICE_DISABLED"; - case SIGN_IN_REQUIRED: - return "SIGN_IN_REQUIRED"; - case INVALID_ACCOUNT: - return "INVALID_ACCOUNT"; - case RESOLUTION_REQUIRED: - return "RESOLUTION_REQUIRED"; - case NETWORK_ERROR: - return "NETWORK_ERROR"; - case INTERNAL_ERROR: - return "INTERNAL_ERROR"; - case SERVICE_INVALID: - return "SERVICE_INVALID"; - case DEVELOPER_ERROR: - return "DEVELOPER_ERROR"; - case LICENSE_CHECK_FAILED: - return "LICENSE_CHECK_FAILED"; - case ERROR: - return "ERROR"; - case INTERRUPTED: - return "INTERRUPTED"; - case TIMEOUT: - return "TIMEOUT"; - case CANCELED: - return "CANCELED"; - case API_NOT_CONNECTED: - return "API_NOT_CONNECTED"; - case DEAD_CLIENT: - return "DEAD_CLIENT"; - default: - return "unknown status code: " + statusCode; - } - } -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java deleted file mode 100644 index cbbbd4c..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -/** - * Represents a resource, or a holder of resources, which may be released once they are no longer needed. - */ -public interface Releasable { - void release(); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java deleted file mode 100644 index 6c4f692..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.gms.common.PublicApi; - -/** - * Represents the final result of invoking an API method in Google Play Services. - */ -@PublicApi -public interface Result { - Status getStatus(); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java deleted file mode 100644 index f6c46b0..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -/** - * An interface for receiving a {@link Result} from a {@link PendingResult} as an asynchronous - * callback. - */ -public interface ResultCallback { - /** - * Called when the {@link Result} is ready. It is the responsibility of each callback to - * release any resources associated with the result. Some result types may implement - * {@link Releasable}, in which case {@link Releasable#release()} should be used to free the - * associated resources. - * - * @param result The result from the API call. May not be null. - */ - void onResult(R result); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java deleted file mode 100644 index 60bc1fb..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -/** - * Describes an OAuth 2.0 scope to request. This has security implications for the user, and - * requesting additional scopes will result in authorization dialogs. - */ -@PublicApi -public class Scope extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private final String scopeUri; - - private Scope() { - scopeUri = null; - } - - /** - * Creates a new scope with the given URI. - */ - public Scope(String scopeUri) { - this.scopeUri = scopeUri; - } - - @Override - public boolean equals(Object o) { - return this == o || o instanceof Scope && scopeUri.equals(((Scope) o).scopeUri); - } - - public String getScopeUri() { - return scopeUri; - } - - @Override - public int hashCode() { - return scopeUri.hashCode(); - } - - @Override - public String toString() { - return scopeUri; - } - - public static final Creator CREATOR = new AutoCreator<>(Scope.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java deleted file mode 100644 index 7b936e6..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import android.app.Activity; -import android.app.PendingIntent; -import android.content.Intent; -import android.content.IntentSender; -import android.content.IntentSender.SendIntentException; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -/** - * Represents the results of work. - */ -@PublicApi -public final class Status extends AutoSafeParcelable implements Result { - @PublicApi(exclude = true) - public static final Status INTERNAL_ERROR = new Status(CommonStatusCodes.INTERNAL_ERROR, "Internal error"); - @PublicApi(exclude = true) - public static final Status CANCELED = new Status(CommonStatusCodes.CANCELED, "Cancelled"); - @PublicApi(exclude = true) - public static final Status SUCCESS = new Status(CommonStatusCodes.SUCCESS, "Success"); - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - private final int statusCode; - - @SafeParceled(2) - private final String statusMessage; - - @SafeParceled(3) - private final PendingIntent resolution; - - private Status() { - statusCode = 0; - statusMessage = null; - resolution = null; - } - - /** - * Creates a representation of the status resulting from a GoogleApiClient operation. - * - * @param statusCode The status code. - */ - public Status(int statusCode) { - this(statusCode, null); - } - - /** - * Creates a representation of the status resulting from a GoogleApiClient operation. - * - * @param statusCode The status code. - * @param statusMessage The message associated with this status, or null. - */ - public Status(int statusCode, String statusMessage) { - this(statusCode, statusMessage, null); - } - - /** - * Creates a representation of the status resulting from a GoogleApiClient operation. - * - * @param statusCode The status code. - * @param statusMessage The message associated with this status, or null. - * @param resolution A pending intent that will resolve the issue when started, or null. - */ - public Status(int statusCode, String statusMessage, PendingIntent resolution) { - this.statusCode = statusCode; - this.statusMessage = statusMessage; - this.resolution = resolution; - } - - /** - * A pending intent to resolve the failure. This intent can be started with - * {@link Activity#startIntentSenderForResult(IntentSender, int, Intent, int, int, int)} to - * present UI to solve the issue. - * - * @return The pending intent to resolve the failure. - */ - public PendingIntent getResolution() { - return resolution; - } - - /** - * Returns the status of this result. Use {@link #isSuccess()} to determine whether the call - * was successful, and {@link #getStatusCode()} to determine what the error cause was. - *

- * Certain errors are due to failures that can be resolved by launching a particular intent. - * The resolution intent is available via {@link #getResolution()}. - */ - @Override - public Status getStatus() { - return this; - } - - /** - * Indicates the status of the operation. - * - * @return Status code resulting from the operation. The value is one of the constants in - * {@link CommonStatusCodes} or specific to the APIs added to the GoogleApiClient. - */ - public int getStatusCode() { - return statusCode; - } - - public String getStatusMessage() { - return statusMessage; - } - - /** - * Returns true if calling {@link #startResolutionForResult(Activity, int)} will start any - * intents requiring user interaction. - * - * @return true if there is a resolution that can be started. - */ - public boolean hasResolution() { - return resolution != null; - } - - /** - * Returns true if the operation was canceled. - */ - public boolean isCanceled() { - return statusCode == CommonStatusCodes.CANCELED; - } - - /** - * Returns true if the operation was interrupted. - */ - public boolean isInterrupted() { - return statusCode == CommonStatusCodes.INTERRUPTED; - } - - /** - * Returns true if the operation was successful. - * - * @return true if the operation was successful, false if there was an error. - */ - public boolean isSuccess() { - return statusCode <= 0; - } - - /** - * Resolves an error by starting any intents requiring user interaction. See - * {@link CommonStatusCodes#SIGN_IN_REQUIRED}, and {@link CommonStatusCodes#RESOLUTION_REQUIRED}. - * - * @param activity An Activity context to use to resolve the issue. The activity's - * onActivityResult method will be invoked after the user is done. If the - * resultCode is {@link Activity#RESULT_OK}, the application should try to - * connect again. - * @param requestCode The request code to pass to onActivityResult. - * @throws SendIntentException If the resolution intent has been canceled or is no longer able - * to execute the request. - */ - public void startResolutionForResult(Activity activity, int requestCode) throws SendIntentException { - if (hasResolution()) { - activity.startIntentSenderForResult(resolution.getIntentSender(), requestCode, null, 0, 0, 0); - } - } - - public static final Creator CREATOR = new AutoCreator<>(Status.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java deleted file mode 100644 index 47ec394..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.os.IBinder; -import android.os.Parcel; -import android.os.Parcelable; - -public class BinderWrapper implements Parcelable { - public IBinder binder; - - public BinderWrapper(IBinder binder) { - this.binder = binder; - } - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeStrongBinder(binder); - } - - public static final Creator CREATOR = new Creator() { - @Override - public BinderWrapper createFromParcel(Parcel source) { - return new BinderWrapper(source.readStrongBinder()); - } - - @Override - public BinderWrapper[] newArray(int size) { - return new BinderWrapper[size]; - } - }; -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java deleted file mode 100644 index a203a99..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.accounts.Account; -import android.os.Bundle; -import android.os.IBinder; - -import com.google.android.gms.common.Feature; -import com.google.android.gms.common.api.Scope; - -import org.microg.gms.common.Constants; -import org.microg.gms.common.GmsService; -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.Arrays; - -public class GetServiceRequest extends AutoSafeParcelable { - @Field(1) - private final int versionCode = 4; - @Field(2) - public final int serviceId; - @Field(3) - public int gmsVersion; - @Field(4) - public String packageName; - @Field(5) - public IBinder accountAccessor; - @Field(6) - public Scope[] scopes; - @Field(7) - public Bundle extras; - @Field(8) - public Account account; - @Field(9) - private long field9; - @Field(10) - public Feature[] defaultFeatures; - @Field(11) - public Feature[] apiFeatures; - @Field(12) - private boolean field12; - @Field(13) - private int field13; - @Field(14) - private boolean field14; - @Field(15) - private String field15; - - private GetServiceRequest() { - serviceId = -1; - gmsVersion = Constants.GMS_VERSION_CODE; - } - - public GetServiceRequest(int serviceId) { - this.serviceId = serviceId; - this.gmsVersion = Constants.GMS_VERSION_CODE; - this.field12 = true; - } - - @Override - public String toString() { - return "GetServiceRequest{" + - "serviceId=" + GmsService.nameFromServiceId(serviceId) + - ", gmsVersion=" + gmsVersion + - ", packageName='" + packageName + '\'' + - (scopes == null || scopes.length == 0 ? "" : (", scopes=" + Arrays.toString(scopes))) + - (extras == null ? "" : (", extras=" + extras)) + - (account == null ? "" : (", account=" + account)) + - '}'; - } - - public static Creator CREATOR = new AutoCreator(GetServiceRequest.class); -} \ No newline at end of file diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java deleted file mode 100644 index 75e59d9..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ValidateAccountRequest extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator<>(ValidateAccountRequest.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java b/play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java deleted file mode 100644 index 967d8cc..0000000 --- a/play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.dynamic; - -import android.os.IBinder; - -import androidx.annotation.Nullable; - -import java.lang.reflect.Field; - -public class ObjectWrapper extends IObjectWrapper.Stub { - private final T t; - - public ObjectWrapper(T t) { - this.t = t; - } - - @Nullable - public static Object unwrap(IObjectWrapper obj) { - if (obj == null) { - return null; - } - if (obj instanceof ObjectWrapper) { - return ((ObjectWrapper) obj).t; - } - IBinder binder = obj.asBinder(); - Field[] fields = binder.getClass().getDeclaredFields(); - if (fields.length != 1) { - throw new IllegalArgumentException(); - } - Field field = fields[0]; - if (!field.isAccessible()) { - field.setAccessible(true); - try { - return field.get(binder); - } catch (NullPointerException localNullPointerException) { - throw new IllegalArgumentException("Binder object is null.", - localNullPointerException); - } catch (IllegalArgumentException localIllegalArgumentException) { - throw new IllegalArgumentException("remoteBinder is the wrong class.", - localIllegalArgumentException); - } catch (IllegalAccessException localIllegalAccessException) { - throw new IllegalArgumentException("Could not access the field in remoteBinder.", - localIllegalAccessException); - } - } else { - throw new IllegalArgumentException(); - } - } - - @Nullable - public static T unwrapTyped(IObjectWrapper obj, Class clazz) { - try { - return clazz.cast(unwrap(obj)); - } catch (ClassCastException e) { - return null; - } - } - - public static ObjectWrapper wrap(T t) { - return new ObjectWrapper<>(t); - } -} diff --git a/play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java b/play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java deleted file mode 100644 index 52c1dc7..0000000 --- a/play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.auth; - -public class AuthConstants { - public static final String DEFAULT_ACCOUNT = "<>"; - public static final String SCOPE_GET_ACCOUNT_ID = "^^_account_id_^^"; - public static final String PROVIDER_METHOD_GET_ACCOUNTS = "get_accounts"; - public static final String PROVIDER_METHOD_CLEAR_PASSWORD = "clear_password"; - public static final String PROVIDER_EXTRA_CLEAR_PASSWORD = "clear_password"; - public static final String PROVIDER_EXTRA_ACCOUNTS = "accounts"; - public static final String DEFAULT_ACCOUNT_TYPE = "com.mgoogle"; -} diff --git a/play-services-basement/src/main/java/org/microg/gms/common/Constants.java b/play-services-basement/src/main/java/org/microg/gms/common/Constants.java deleted file mode 100644 index 881ac54..0000000 --- a/play-services-basement/src/main/java/org/microg/gms/common/Constants.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import org.microg.gms.basement.BuildConfig; - -public class Constants { - public static final int GMS_VERSION_CODE = (BuildConfig.VERSION_CODE / 1000) * 1000; - public static final String GMS_PACKAGE_NAME = "com.google.android.gms"; - public static final String GSF_PACKAGE_NAME = "com.mgoogle.android.gsf"; - public static final String GMS_PACKAGE_SIGNATURE_SHA1 = "38918a453d07199354f8b19af05ec6562ced5788"; - @Deprecated - public static final int MAX_REFERENCE_VERSION = GMS_VERSION_CODE; -} diff --git a/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java b/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java deleted file mode 100644 index 49f864d..0000000 --- a/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -public enum GmsService { - UNKNOWN(-2), - ANY(-1), - PEOPLE(5, "com.google.android.gms.people.service.START"), - LOCATION(6), - ACCOUNT(9, "com.google.android.gms.accounts.ACCOUNT_SERVICE"), - CAST(10, "com.google.android.gms.cast.service.BIND_CAST_DEVICE_CONTROLLER_SERVICE"), - ADDRESS(12, "com.google.android.gms.identity.service.BIND"), - AUTH_PROXY(16, "com.google.android.gms.auth.service.START"), - LIGHTWEIGHT_INDEX(19, "com.google.android.gms.icing.LIGHTWEIGHT_INDEX_SERVICE"), - INDEX(21, "com.google.android.gms.icing.INDEX_SERVICE"), - LOCATION_REPORTING(22, "com.google.android.gms.location.reporting.service.START", "com.google.android.location.reporting.service.START"), - LOCATION_MANAGER(23, "com.google.android.location.internal.GoogleLocationManagerService.START"), - PLAY_LOG(24, "com.google.android.gms.playlog.service.START"), - CAST_MIRRORING(27, "com.google.android.gms.cast_mirroring.service.START"), - SEARCH_ADMINISTRATION(30), - SEARCH_QUERIES(32), - SEARCH_GLOBAL(33), - SEARCH_CORPORA(36), - COMMON(39, "com.google.android.gms.common.service.START"), - CLEARCUT_LOGGER(40, "com.google.android.gms.clearcut.service.START"), - USAGE_REPORTING(41, "com.google.android.gms.usagereporting.service.START"), - SIGN_IN(44, "com.google.android.gms.signin.service.START"), - CONTEXT_MANAGER(47, "com.google.android.contextmanager.service.ContextManagerService.START"), - LIGHTWEIGHT_NETWORK_QUALITY(50, "com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START"), - PHENOTYPE(51, "com.mgoogle.android.gms.phenotype.service.START"), - GEODATA(65, "com.google.android.gms.location.places.GeoDataApi"), - SEARCH_IME(66), - PLACE_DETECTION(67, "com.google.android.gms.location.places.PlaceDetectionApi"), - CREDENTIALS(68, "com.google.android.gms.auth.api.credentials.service.START"), - MEASUREMENT(93, "com.google.android.gms.measurement.START"), - GASS(116, "com.google.android.gms.gass.START"), - FACS_CACHE(202, "com.google.android.gms.facs.cache.service.START"), - IDENTITY_SIGN_IN(212, "com.google.android.gms.auth.api.identity.service.signin.START"), - FACS_SYNC(220, "com.google.android.gms.facs.internal.service.START"), - ; - - public int SERVICE_ID; - public String ACTION; - public String[] SECONDARY_ACTIONS; - - GmsService(int serviceId, String... actions) { - this.SERVICE_ID = serviceId; - this.ACTION = actions.length > 0 ? actions[0] : null; - this.SECONDARY_ACTIONS = actions; - } - - public interface ADVERTISING_ID { - // Has no service id - String ACTION = "com.google.android.gms.ads.identifier.service.START"; - } - - public static GmsService byServiceId(int serviceId) { - for (GmsService service : values()) { - if (service.SERVICE_ID == serviceId) return service; - } - return UNKNOWN; - } - - public static GmsService byAction(String action) { - for (GmsService service : values()) { - for (String serviceAction : service.SECONDARY_ACTIONS) { - if (serviceAction.equals(action)) return service; - } - } - return UNKNOWN; - } - - public static String nameFromServiceId(int serviceId) { - return byServiceId(serviceId).toString(serviceId); - } - - public String toString(int serviceId) { - if (this != UNKNOWN) return toString(); - return "UNKNOWN(" + serviceId + ")"; - } -} \ No newline at end of file diff --git a/play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java b/play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java deleted file mode 100644 index 9266397..0000000 --- a/play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * An class, method or field is named public, if it can be used with the original play services - * client library. - */ -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) -public @interface PublicApi { - /** - * @return the first version that contains the given class, method or field - */ - String since() default "0"; - - /** - * @return the last version that contains the given class, method or field - */ - String until() default "latest"; - - /** - * Used on a method or field to exclude it from the public api if the corresponding class was - * marked as public api. - * - * @return true if the method or field is not part of the public api - */ - boolean exclude() default false; -} diff --git a/play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java b/play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java deleted file mode 100644 index 8ca5c49..0000000 --- a/play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.gcm; - -public final class GcmConstants { - public static final String ACTION_C2DM_RECEIVE = "com.mgoogle.android.c2dm.intent.RECEIVE"; - public static final String ACTION_C2DM_REGISTER = "com.mgoogle.android.c2dm.intent.REGISTER"; - public static final String ACTION_C2DM_REGISTRATION = "com.mgoogle.android.c2dm.intent.REGISTRATION"; - public static final String ACTION_C2DM_UNREGISTER = "com.mgoogle.android.c2dm.intent.UNREGISTER"; - public static final String ACTION_GCM_SEND = "com.google.android.gcm.intent.SEND"; - public static final String ACTION_NOTIFICATION_OPEN = "com.google.android.gms.gcm.NOTIFICATION_OPEN"; - public static final String ACTION_NOTIFICATION_DISMISS = "com.google.android.gms.gcm.NOTIFICATION_DISMISS"; - public static final String ACTION_SCHEDULE = "com.google.android.gms.gcm.ACTION_SCHEDULE"; - public static final String ACTION_TASK_READY = "com.google.android.gms.gcm.ACTION_TASK_READY"; - public static final String ACTION_TASK_INITIALZE = "com.google.android.gms.gcm.SERVICE_ACTION_INITIALIZE"; - public static final String ACTION_INSTANCE_ID = "com.google.android.gms.iid.InstanceID"; - - public static final String EXTRA_APP = "app"; - public static final String EXTRA_APP_OVERRIDE = "org.microg.gms.gcm.APP_OVERRIDE"; - public static final String EXTRA_APP_ID = "appid"; - public static final String EXTRA_APP_VERSION_CODE = "app_ver"; - public static final String EXTRA_APP_VERSION_NAME = "app_ver_name"; - public static final String EXTRA_CLIENT_VERSION = "cliv"; - public static final String EXTRA_COMPONENT = "component"; - public static final String EXTRA_COLLAPSE_KEY = "collapse_key"; - public static final String EXTRA_DELAY = "google.delay"; - public static final String EXTRA_DELETE = "delete"; - public static final String EXTRA_ERROR = "error"; - public static final String EXTRA_FROM = "from"; - public static final String EXTRA_GSF_INTENT = "GSF"; - public static final String EXTRA_GMS_VERSION = "gmsv"; - public static final String EXTRA_IS_MESSENGER2 = "messenger2"; - public static final String EXTRA_KID = "kid"; - public static final String EXTRA_MESSENGER = "google.messenger"; - public static final String EXTRA_MESSAGE_TYPE = "message_type"; - public static final String EXTRA_MESSAGE_ID = "google.message_id"; - public static final String EXTRA_OS_VERSION = "osv"; - public static final String EXTRA_PENDING_INTENT = "com.google.android.gms.gcm.PENDING_INTENT"; - public static final String EXTRA_PUBLIC_KEY = "pub2"; - public static final String EXTRA_RAWDATA = "rawData"; - public static final String EXTRA_RAWDATA_BASE64 = "gcm.rawData64"; - public static final String EXTRA_REGISTRATION_ID = "registration_id"; - public static final String EXTRA_RETRY_AFTER = "Retry-After"; - public static final String EXTRA_SCHEDULER_ACTION = "scheduler_action"; - public static final String EXTRA_SCOPE = "scope"; - public static final String EXTRA_SENDER = "sender"; - public static final String EXTRA_SENDER_LEGACY = "legacy.sender"; - public static final String EXTRA_SEND_TO = "google.to"; - public static final String EXTRA_SEND_FROM = "google.from"; - public static final String EXTRA_SIGNATURE = "sig"; - public static final String EXTRA_SUBSCIPTION = "subscription"; - public static final String EXTRA_SUBTYPE = "subtype"; - public static final String EXTRA_USE_GSF = "useGsf"; - public static final String EXTRA_TAG = "tag"; - public static final String EXTRA_TOPIC = "gcm.topic"; - public static final String EXTRA_TTL = "google.ttl"; - public static final String EXTRA_UNREGISTERED = "unregistered"; - - public static final String MESSAGE_TYPE_GCM = "gcm"; - public static final String MESSAGE_TYPE_DELETED_MESSAGE = "deleted_message"; - public static final String MESSAGE_TYPE_SEND_ERROR = "send_error"; - public static final String MESSAGE_TYPE_SEND_EVENT = "send_event"; - - public static final String SCHEDULER_ACTION_CANCEL = "CANCEL_TASK"; - public static final String SCHEDULER_ACTION_CANCEL_ALL = "CANCEL_ALL"; - public static final String SCHEDULER_ACTION_SCHEDULE = "SCHEDULE_TASK"; - - public static final String PERMISSION_GTALK = "com.google.android.gtalkservice.permission.GTALK_SERVICE"; - public static final String PERMISSION_NETWORK_TASK = "com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"; - public static final String PERMISSION_RECEIVE = "com.google.android.c2dm.permission.RECEIVE"; - public static final String PERMISSION_SEND = "com.google.android.c2dm.permission.SEND"; - - public static final String ERROR_SERVICE_NOT_AVAILABLE = "SERVICE_NOT_AVAILABLE"; - - public static final String INSTANCE_ID_SCOPE_GCM = "GCM"; - - public static final String GCMID_INSTANCE_ID = "google.com/iid"; - public static final String GCMID_REFRESH = "gcm.googleapis.com/refresh"; -} diff --git a/play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt b/play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt deleted file mode 100644 index 06c131a..0000000 --- a/play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.kotlin - -import com.google.android.gms.dynamic.IObjectWrapper -import com.google.android.gms.dynamic.ObjectWrapper - -inline fun IObjectWrapper?.unwrap(): T? = ObjectWrapper.unwrapTyped(this, T::class.java) diff --git a/play-services-cast-api/build.gradle b/play-services-cast-api/build.gradle deleted file mode 100644 index 92e76c5..0000000 --- a/play-services-cast-api/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - aidlPackageWhiteList "com/google/android/gms/cast/ApplicationMetadata.aidl" - aidlPackageWhiteList "com/google/android/gms/cast/LaunchOptions.aidl" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} - -dependencies { - api project(':play-services-basement') - - api project(':play-services-base-api') -} \ No newline at end of file diff --git a/play-services-cast-api/gradle.properties b/play-services-cast-api/gradle.properties deleted file mode 100644 index f2736eb..0000000 --- a/play-services-cast-api/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Internal Cast API -POM_DESCRIPTION=Interfaces and objects for IPC between Play Services Library and Play Services Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-cast-api/src/main/AndroidManifest.xml b/play-services-cast-api/src/main/AndroidManifest.xml deleted file mode 100644 index d559e58..0000000 --- a/play-services-cast-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/ApplicationMetadata.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/ApplicationMetadata.aidl deleted file mode 100644 index 236c4db..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/ApplicationMetadata.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast; - -parcelable ApplicationMetadata; diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/ApplicationStatus.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/ApplicationStatus.aidl deleted file mode 100644 index e7ad053..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/ApplicationStatus.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast; - -parcelable ApplicationStatus; diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/CastDeviceStatus.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/CastDeviceStatus.aidl deleted file mode 100644 index 1585ade..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/CastDeviceStatus.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast; - -parcelable CastDeviceStatus; diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/JoinOptions.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/JoinOptions.aidl deleted file mode 100644 index 3eafbdd..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/JoinOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast; - -parcelable JoinOptions; diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/LaunchOptions.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/LaunchOptions.aidl deleted file mode 100644 index 85ed609..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/LaunchOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast; - -parcelable LaunchOptions; diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/RequestItem.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/RequestItem.aidl deleted file mode 100644 index 96c3751..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/RequestItem.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.cast; - -parcelable RequestItem; diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/IBundleCallback.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/IBundleCallback.aidl deleted file mode 100644 index 1504337..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/IBundleCallback.aidl +++ /dev/null @@ -1,10 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.cast.internal; - -interface IBundleCallback { - oneway void onBundle(in Bundle bundle); -} diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastDeviceController.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastDeviceController.aidl deleted file mode 100644 index 4f91cdd..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastDeviceController.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.cast.internal; - -import com.google.android.gms.cast.LaunchOptions; -import com.google.android.gms.cast.JoinOptions; - -interface ICastDeviceController { - oneway void disconnect() = 0; - oneway void stopApplication(String sessionId) = 4; - oneway void sendMessage(String namespace, String message, long requestId) = 8; - oneway void registerNamespace(String namespace) = 10; - oneway void unregisterNamespace(String namespace) = 11; - oneway void launchApplication(String applicationId, in LaunchOptions launchOptions) = 12; - oneway void joinApplication(String applicationId, String sessionId, in JoinOptions joinOptions) = 13; -} diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastDeviceControllerListener.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastDeviceControllerListener.aidl deleted file mode 100644 index 1d26c14..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastDeviceControllerListener.aidl +++ /dev/null @@ -1,21 +0,0 @@ -package com.google.android.gms.cast.internal; - -import com.google.android.gms.cast.ApplicationMetadata; -import com.google.android.gms.cast.ApplicationStatus; -import com.google.android.gms.cast.CastDeviceStatus; - -interface ICastDeviceControllerListener { - void onDisconnected(int reason) = 0; - void onApplicationConnectionSuccess(in ApplicationMetadata applicationMetadata, String applicationStatus, String sessionId, boolean wasLaunched) = 1; - void onApplicationConnectionFailure(int statusCode) = 2; - // Deprecated: void onStatusReceived(String string1, double double1, boolean boolean1) = 3; - void onTextMessageReceived(String namespace, String message) = 4; - void onBinaryMessageReceived(String namespace, in byte[] data) = 5; - // void onStatusChanged(int status) = 6; // TODO - // void onStatusChanged2(int status) = 7; // TODO - void onApplicationDisconnected(int paramInt) = 8; - void onSendMessageFailure(String response, long requestId, int statusCode) = 9; - void onSendMessageSuccess(String response, long requestId) = 10; - void onApplicationStatusChanged(in ApplicationStatus applicationStatus) = 11; - void onDeviceStatusChanged(in CastDeviceStatus deviceStatus) = 12; -} diff --git a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastService.aidl b/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastService.aidl deleted file mode 100644 index 7ee5c97..0000000 --- a/play-services-cast-api/src/main/aidl/com/google/android/gms/cast/internal/ICastService.aidl +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.cast.internal; - -import com.google.android.gms.common.api.internal.IStatusCallback; -import com.google.android.gms.cast.internal.IBundleCallback; -import com.google.android.gms.cast.RequestItem; - -interface ICastService { - oneway void broadcastPrecacheMessageLegacy(IStatusCallback callback, in String[] arg2, String precacheData) = 0; - oneway void broadcastPrecacheMessage(IStatusCallback callback, in String[] arg2, String precacheData, in List requestItems) = 1; - oneway void getCxLessStatus(IStatusCallback callback) = 3; - oneway void getFeatureFlags(IBundleCallback callback, in String[] flags) = 4; - oneway void getCastStatusCodeDictionary(IBundleCallback callback, in String[] dictionaries) = 5; -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/ApplicationMetadata.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/ApplicationMetadata.java deleted file mode 100644 index 1e3993b..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/ApplicationMetadata.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.net.Uri; - -import com.google.android.gms.common.images.WebImage; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.List; - -@PublicApi -public class ApplicationMetadata extends AutoSafeParcelable { - - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - public String applicationId; - @SafeParceled(3) - public String name; - @SafeParceled(value = 4, subClass = WebImage.class) - public List images; - @SafeParceled(value = 5, subClass = String.class) - public List namespaces; - @SafeParceled(6) - public String senderAppIdentifier; - @SafeParceled(7) - public Uri senderAppLaunchUri; - - public String getApplicationId() { - return applicationId; - } - - public List getImages() { - return images; - } - - public String getName() { - return name; - } - - public String getSenderAppIdentifier() { - return senderAppIdentifier; - } - - public boolean isNamespaceSupported(String namespace) { - return namespaces.contains(namespace); - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ApplicationMetadata{"); - sb.append("applicationId='").append(applicationId).append("'"); - sb.append(", name='").append(name).append("'"); - sb.append(", images=").append(images.toString()); - if (namespaces != null) { - sb.append(", namespaces=").append(namespaces.toString()); - } - sb.append(", senderAppIdentifier='").append(senderAppIdentifier).append("'"); - if (senderAppLaunchUri != null) { - sb.append(", senderAppLaunchUri='").append(senderAppLaunchUri.toString()).append("'"); - } - sb.append('}'); - return sb.toString(); - } - - public static final Creator CREATOR = new AutoCreator<>(ApplicationMetadata.class); -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/ApplicationStatus.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/ApplicationStatus.java deleted file mode 100644 index 46aa773..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/ApplicationStatus.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class ApplicationStatus extends AutoSafeParcelable { - - public ApplicationStatus() {} - - public ApplicationStatus(String applicationStatus) { - this.applicationStatus = applicationStatus; - } - - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private String applicationStatus; - - public static final Creator CREATOR = new AutoCreator<>(ApplicationStatus.class); -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastDevice.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastDevice.java deleted file mode 100644 index aaf50ff..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastDevice.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.net.Uri; -import android.os.Bundle; -import android.text.TextUtils; - -import com.google.android.gms.common.images.WebImage; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.net.InetAddress; -import java.util.ArrayList; -import java.util.List; - -@PublicApi -public class CastDevice extends AutoSafeParcelable { - private static final String EXTRA_CAST_DEVICE = "com.google.android.gms.cast.EXTRA_CAST_DEVICE"; - - public CastDevice () { - } - - public CastDevice ( - String id, String name, InetAddress host, int port, String - deviceVersion, String friendlyName, String modelName, String - iconPath, int status, int capabilities) { - this.deviceId = id; - this.address = host.getHostAddress(); - this.servicePort = port; - this.deviceVersion = deviceVersion; - this.friendlyName = friendlyName; - this.icons = new ArrayList<>(); - this.icons.add(new WebImage(Uri.parse(String.format("http://%s:8008%s", this.address, iconPath)))); - this.modelName = modelName; - this.capabilities = capabilities; - } - - /** - * Video-output device capability. - */ - public static final int CAPABILITY_VIDEO_OUT = 1; - - /** - * Video-input device capability. - */ - public static final int CAPABILITY_VIDEO_IN = 2; - - /** - * Audio-output device capability. - */ - public static final int CAPABILITY_AUDIO_OUT = 4; - - /** - * Audio-input device capability. - */ - public static final int CAPABILITY_AUDIO_IN = 8; - - @SafeParceled(1) - private final int versionCode = 3; - - @SafeParceled(2) - private String deviceId; - - @SafeParceled(3) - private String address; - - @SafeParceled(4) - private String friendlyName; - - @SafeParceled(5) - private String modelName; - - @SafeParceled(6) - private String deviceVersion; - - @SafeParceled(7) - private int servicePort; - - @SafeParceled(value = 8, subClass = WebImage.class) - private ArrayList icons; - - @SafeParceled(9) - private int capabilities; - - @SafeParceled(10) - private int status; - - @SafeParceled(11) - private String unknown; // TODO: Need to figure this one out - - public String getDeviceId() { - return deviceId; - } - - public String getDeviceVersion() { - return deviceVersion; - } - - public String getFriendlyName() { - return friendlyName; - } - - public static CastDevice getFromBundle(Bundle extras) { - if (extras == null) { - return null; - } - extras.setClassLoader(CastDevice.class.getClassLoader()); - return extras.getParcelable(EXTRA_CAST_DEVICE); - } - - public WebImage getIcon(int preferredWidth, int preferredHeight) { - return null; - } - - public List getIcons() { - return icons; - } - - public String getAddress() { - return address; - } - - public String getModelName() { - return modelName; - } - - public int getServicePort() { - return servicePort; - } - - public boolean hasCapabilities(int[] capabilities) { - for (int capability : capabilities) { - if (!this.hasCapability(capability)) { - return false; - } - } - return true; - } - - public boolean hasCapability(int capability) { - return (capability & capabilities) == capability; - } - - public boolean hasIcons() { - return !icons.isEmpty(); - } - - public boolean isOnLocalNetwork() { - return false; - } - - public boolean isSameDevice(CastDevice castDevice) { - return TextUtils.equals(castDevice.deviceId, deviceId); - } - - public void putInBundle(Bundle bundle) { - bundle.putParcelable(EXTRA_CAST_DEVICE, this); - } - - @Override - public String toString() { - return "CastDevice{" + - "deviceId=" + this.deviceId + - ", address=" + address + - ", friendlyName=" + friendlyName + - ", modelName=" + modelName + - ", deviceVersion=" + deviceVersion + - ", servicePort=" + servicePort + - (icons == null ? "" : (", icons=" + icons)) + - ", capabilities=" + capabilities + - ", status=" + status + - "}"; - } - - public static Creator CREATOR = new AutoCreator<>(CastDevice.class); -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastDeviceStatus.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastDeviceStatus.java deleted file mode 100644 index ea781b5..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastDeviceStatus.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class CastDeviceStatus extends AutoSafeParcelable { - - public CastDeviceStatus() { - } - - public CastDeviceStatus(double volume, boolean mute, int activeInputState, ApplicationMetadata applicationMetadata, int standbyState) { - this.volume = volume; - this.mute = mute; - this.activeInputState = activeInputState; - this.applicationMetadata = applicationMetadata; - this.standbyState = standbyState; - } - - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private double volume; - @SafeParceled(3) - private boolean mute; - @SafeParceled(4) - private int activeInputState; - @SafeParceled(5) - private ApplicationMetadata applicationMetadata; - @SafeParceled(6) - private int standbyState; - - public static final Creator CREATOR = new AutoCreator<>(CastDeviceStatus.class); -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastMediaControlIntent.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastMediaControlIntent.java deleted file mode 100644 index ca3a287..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastMediaControlIntent.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.text.TextUtils; - -import java.util.Collection; -import java.util.Locale; - -/** - * Intent constants for use with the Cast MediaRouteProvider. This class also contains utility methods for creating - * a control category for discovering Cast media routes that support a specific app and/or set of namespaces, to be - * used with MediaRouteSelector. - */ -public final class CastMediaControlIntent { - @Deprecated - public static final String CATEGORY_CAST = "com.google.android.gms.cast.CATEGORY_CAST"; - public static final String ACTION_SYNC_STATUS = "com.google.android.gms.cast.ACTION_SYNC_STATUS"; - - /** - * The application ID for the Cast Default Media Receiver. - */ - public static final String DEFAULT_MEDIA_RECEIVER_APPLICATION_ID = "CC1AD845"; - - /** - * An error code indicating that a Cast request has failed. - */ - public static final int ERROR_CODE_REQUEST_FAILED = 1; - - /** - * An error code indicating that the request could not be processed because the session could not be started. - */ - public static final int ERROR_CODE_SESSION_START_FAILED = 2; - - /** - * An error code indicating that the connection to the Cast device has been lost, but the system is actively - * trying to re-establish the connection. - */ - public static final int ERROR_CODE_TEMPORARILY_DISCONNECTED = 3; - - /** - * The extra that contains the ID of the application to launch for an - * {@link android.support.v7.media.MediaContolIntent#ACTION_START_SESSION} request. - * The value is expected to be a String. - */ - public static final String EXTRA_CAST_APPLICATION_ID = "com.google.android.gms.cast.EXTRA_CAST_APPLICATION_ID"; - public static final String EXTRA_CAST_RELAUNCH_APPLICATION = "com.google.android.gms.cast.EXTRA_CAST_RELAUNCH_APPLICATION"; - public static final String EXTRA_CAST_LANGUAGE_CODE = "com.google.android.gms.cast.EXTRA_CAST_LANGUAGE_CODE"; - public static final String EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS = "com.google.android.gms.cast.EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS"; - public static final String EXTRA_CUSTOM_DATA = "com.google.android.gms.cast.EXTRA_CUSTOM_DATA"; - - /** - * The extra that indicates whether debug logging should be enabled for the Cast session. The value is expected to be a boolean. - */ - public static final String EXTRA_DEBUG_LOGGING_ENABLED = "com.google.android.gms.cast.EXTRA_DEBUG_LOGGING_ENABLED"; - - /** - * n error bundle extra for the error code. The value is an integer, and will be one of the {@code ERROR_CODE_*} - * constants declared in this class. - */ - public static final String EXTRA_ERROR_CODE = "com.google.android.gms.cast.EXTRA_ERROR_CODE"; - - public static final String CATEGORY_CAST_REMOTE_PLAYBACK = "com.google.android.gms.cast.CATEGORY_CAST_REMOTE_PLAYBACK"; - - private CastMediaControlIntent() { - } - - /** - * Returns a custom control category for discovering Cast devices that support running the specified app, independent of whether the app is running or not. - * - * @param applicationId The application ID of the receiver application. - */ - public static String categoryForCast(String applicationId) { - return CATEGORY_CAST + "/" + applicationId; - } - - /** - * Returns true if the given category is a custom control category for cast devices, specific to an application ID. - * - * @param applicationId The application ID of the receiver application. - */ - public static boolean isCategoryForCast(String category) { - if (category == null) { - return false; - } - return category.startsWith(CATEGORY_CAST + "/"); - } - - /** - * Returns a custom control category for discovering Cast devices meeting both application ID and namespace - * restrictions. See {@link #categoryForCast(Collection)} and {@link #categoryForCast(String)} for more details. - */ - public static String categoryForCast(String applicationId, Collection namespaces) { - return CATEGORY_CAST + "" + applicationId + "/" + TextUtils.join(",", namespaces); - } - - /** - * Returns a custom control category for discovering Cast devices currently running an application which supports the specified namespaces. Apps supporting additional namespaces beyond those specified here are still considered supported. - */ - public static String categoryForCast(Collection namespaces) { - return CATEGORY_CAST + "//" + TextUtils.join(",", namespaces); - } - - /** - * Returns a custom control category for discovering Cast devices which support the default Android remote - * playback actions using the specified Cast player. If the Default Media Receiver is desired, use - * {@link #DEFAULT_MEDIA_RECEIVER_APPLICATION_ID} as the applicationId. - * - * @param applicationId The application ID of the receiver application. - */ - public static String categoryForRemotePlayback(String applicationId) { - return CATEGORY_CAST_REMOTE_PLAYBACK + "/" + applicationId; - } - - /** - * Returns a custom control category for discovering Cast devices which support the Default Media Receiver. - */ - public static String categoryForRemotePlayback() { - return CATEGORY_CAST_REMOTE_PLAYBACK; - } - - /** - * Returns an RFC-5646 language tag string fo the given locale. - */ - public static String languageTagForLocale(Locale locale) { - StringBuilder sb = new StringBuilder(locale.getLanguage()); - if (!TextUtils.isEmpty(locale.getCountry())) sb.append('-').append(locale.getCountry()); - if (!TextUtils.isEmpty(locale.getVariant())) sb.append('-').append(locale.getVariant()); - return sb.toString(); - } -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastStatusCodes.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastStatusCodes.java deleted file mode 100644 index e95ed75..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/CastStatusCodes.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -public final class CastStatusCodes { - public static final int APPLICATION_NOT_FOUND = 2004; - public static final int APPLICATION_NOT_RUNNING = 2005; - public static final int AUTHENTICATION_FAILED = 2000; - public static final int CANCELED = 2002; - public static final int ERROR_SERVICE_CREATION_FAILED = 2200; - public static final int ERROR_SERVICE_DISCONNECTED = 2201; - public static final int FAILED = 2100; - public static final int INTERNAL_ERROR = 8; - public static final int INTERRUPTED = 14; - public static final int INVALID_REQUEST = 2001; - public static final int MESSAGE_SEND_BUFFER_TOO_FULL = 2007; - public static final int MESSAGE_TOO_LARGE = 2006; - public static final int NETWORK_ERROR = 7; - public static final int NOT_ALLOWED = 2003; - public static final int REPLACED = 2103; - public static final int SUCCESS = 0; - public static final int TIMEOUT = 15; - public static final int UNKNOWN_ERROR = 13; -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/JoinOptions.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/JoinOptions.java deleted file mode 100644 index affa956..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/JoinOptions.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class JoinOptions extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private final int connectionType = 0; - - public static Creator CREATOR = new AutoCreator<>(JoinOptions.class); -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/LaunchOptions.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/LaunchOptions.java deleted file mode 100644 index 609302d..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/LaunchOptions.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class LaunchOptions extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private boolean relaunchIfRunning; - @SafeParceled(3) - private String language; - - public String getLanguage() { - return language; - } - - public boolean getRelaunchIfRunning() { - return relaunchIfRunning; - } - - public void setLanguage(String language) { - this.language = language; - } - - public void setRelaunchIfRunning(boolean relaunchIfRunning) { - this.relaunchIfRunning = relaunchIfRunning; - } - - public static Creator CREATOR = new AutoCreator<>(LaunchOptions.class); -} diff --git a/play-services-cast-api/src/main/java/com/google/android/gms/cast/RequestItem.java b/play-services-cast-api/src/main/java/com/google/android/gms/cast/RequestItem.java deleted file mode 100644 index 0fd47c4..0000000 --- a/play-services-cast-api/src/main/java/com/google/android/gms/cast/RequestItem.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.cast; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class RequestItem extends AutoSafeParcelable { - @Field(2) - public String url; - @Field(3) - public int protocolType; - @Field(4) - public int initialTime; - @Field(5) - public String hlsSegmentFormat; - - public static Creator CREATOR = new AutoCreator(RequestItem.class); -} diff --git a/play-services-cast-framework-api/build.gradle b/play-services-cast-framework-api/build.gradle deleted file mode 100644 index c9b8b63..0000000 --- a/play-services-cast-framework-api/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} - -dependencies { - api project(':play-services-basement') - - api project(':play-services-base-api') - api project(':play-services-cast-api') -} \ No newline at end of file diff --git a/play-services-cast-framework-api/gradle.properties b/play-services-cast-framework-api/gradle.properties deleted file mode 100644 index 69ae483..0000000 --- a/play-services-cast-framework-api/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Internal Cast Framework API -POM_DESCRIPTION=Interfaces and objects for IPC between Play Services Library and Play Services Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/AndroidManifest.xml b/play-services-cast-framework-api/src/main/AndroidManifest.xml deleted file mode 100644 index 8922491..0000000 --- a/play-services-cast-framework-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/CastOptions.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/CastOptions.aidl deleted file mode 100644 index e867d59..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/CastOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast.framework; - -parcelable CastOptions; \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IAppVisibilityListener.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IAppVisibilityListener.aidl deleted file mode 100644 index cb17381..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IAppVisibilityListener.aidl +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IAppVisibilityListener { - IObjectWrapper getThisObject() = 0; - void onAppEnteredForeground() = 1; - void onAppEnteredBackground() = 2; - int getSupportedVersion() = 3; -} \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastConnectionController.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastConnectionController.aidl deleted file mode 100644 index 4ad8ee3..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastConnectionController.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.cast.LaunchOptions; - -interface ICastConnectionController { - void joinApplication(String applicationId, String sessionId) = 0; - void launchApplication(String applicationId, in LaunchOptions launchOptions) = 1; - void stopApplication(String sessionId) = 2; - void closeConnection(int reason) = 3; // Maybe? - int getSupportedVersion() = 4; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastContext.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastContext.aidl deleted file mode 100644 index 717671d..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastContext.aidl +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.cast.framework.IAppVisibilityListener; -import com.google.android.gms.cast.framework.ISessionManager; -import com.google.android.gms.cast.framework.IDiscoveryManager; -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ICastContext { - Bundle getMergedSelectorAsBundle() = 0; - boolean isApplicationVisible() = 1; - void addVisibilityChangeListener(IAppVisibilityListener listener) = 2; - void removeVisibilityChangeListener(IAppVisibilityListener listener) = 3; - ISessionManager getSessionManagerImpl() = 4; - IDiscoveryManager getDiscoveryManagerImpl() = 5; - void destroy() = 6; // deprecated? - void onActivityResumed(in IObjectWrapper activity) = 7; // deprecated? - void onActivityPaused(in IObjectWrapper activity) = 8; // deprecated? - IObjectWrapper getWrappedThis() = 9; - void setReceiverApplicationId(String receiverApplicationId, in Map/**/ sessionProvidersByCategory) = 10; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastSession.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastSession.aidl deleted file mode 100644 index e5c11cb..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastSession.aidl +++ /dev/null @@ -1,15 +0,0 @@ -package com.google.android.gms.cast.framework; - -import android.os.Bundle; - -import com.google.android.gms.cast.ApplicationMetadata; -import com.google.android.gms.common.api.Status; - -interface ICastSession { - void onConnected(in Bundle routeInfoExtra) = 0; - void onConnectionSuspended(int reason) = 1; - void onConnectionFailed(in Status status) = 2; - void onApplicationConnectionSuccess(in ApplicationMetadata applicationMetadata, String applicationStatus, String sessionId, boolean wasLaunched) = 3; - void onApplicationConnectionFailure(int statusCode) = 4; - void disconnectFromDevice(boolean boolean1, int int1) = 5; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastStateListener.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastStateListener.aidl deleted file mode 100644 index 98e2015..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ICastStateListener.aidl +++ /dev/null @@ -1,9 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ICastStateListener { - IObjectWrapper getWrappedThis() = 0; - void onCastStateChanged(int newState) = 1; - int getSupportedVersion() = 2; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IDiscoveryManager.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IDiscoveryManager.aidl deleted file mode 100644 index 0c775ac..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IDiscoveryManager.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.cast.framework.IDiscoveryManagerListener; -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IDiscoveryManager { - void startDiscovery() = 0; // Maybe? - void stopDiscovery() = 1; // Maybe? - void addDiscoveryManagerListener(IDiscoveryManagerListener listener) = 2; - void removeDiscoveryManagerListener(IDiscoveryManagerListener listener) = 3; - IObjectWrapper getWrappedThis() = 4; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IDiscoveryManagerListener.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IDiscoveryManagerListener.aidl deleted file mode 100644 index 701a5c2..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IDiscoveryManagerListener.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IDiscoveryManagerListener { - IObjectWrapper getWrappedThis() = 0; - void onDeviceAvailabilityChanged(boolean deviceAvailable) = 1; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IReconnectionService.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IReconnectionService.aidl deleted file mode 100644 index 33f1957..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/IReconnectionService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.cast.framework; - -interface IReconnectionService { - -} \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISession.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISession.aidl deleted file mode 100644 index a5580bc..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISession.aidl +++ /dev/null @@ -1,22 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ISession { - IObjectWrapper getWrappedObject() = 0; - String getCategory() = 1; - String getSessionId() = 2; - String getRouteId() = 3; - boolean isConnected() = 4; - boolean isConnecting() = 5; - boolean isDisconnecting() = 6; - boolean isDisconnected() = 7; - boolean isResuming() = 8; - boolean isSuspended() = 9; - void notifySessionStarted(String sessionId) = 10; - void notifyFailedToStartSession(int error) = 11; - void notifySessionEnded(int error) = 12; - void notifySessionResumed(boolean wasSuspended) = 13; - void notifyFailedToResumeSession(int error) = 14; - void notifySessionSuspended(int reason) = 15; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionManager.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionManager.aidl deleted file mode 100644 index caf9561..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionManager.aidl +++ /dev/null @@ -1,19 +0,0 @@ -package com.google.android.gms.cast.framework; - -import android.os.Bundle; - -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.cast.framework.ISessionManagerListener; -import com.google.android.gms.cast.framework.ICastStateListener; - -interface ISessionManager { - IObjectWrapper getWrappedCurrentSession() = 0; - void addSessionManagerListener(ISessionManagerListener listener) = 1; - void removeSessionManagerListener(ISessionManagerListener listener) = 2; - void addCastStateListener(ICastStateListener listener) = 3; - void removeCastStateListener(ICastStateListener listener) = 4; - void endCurrentSession(boolean b, boolean stopCasting) = 5; - IObjectWrapper getWrappedThis() = 6; - int getCastState() = 7; - void startSession(in Bundle options) = 8; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionManagerListener.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionManagerListener.aidl deleted file mode 100644 index 4dc4ae9..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionManagerListener.aidl +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ISessionManagerListener { - IObjectWrapper getWrappedThis() = 0; - void onSessionStarting(IObjectWrapper session) = 1; - void onSessionStarted(IObjectWrapper session, String sessionId) = 2; - void onSessionStartFailed(IObjectWrapper session, int error) = 3; - void onSessionEnding(IObjectWrapper session) = 4; - void onSessionEnded(IObjectWrapper session, int error) = 5; - void onSessionResuming(IObjectWrapper session, String sessionId) = 6; - void onSessionResumed(IObjectWrapper session, boolean wasSuspended) = 7; - void onSessionResumeFailed(IObjectWrapper session, int error) = 8; - void onSessionSuspended(IObjectWrapper session, int reason) = 9; - int getSupportedVersion() = 10; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionProvider.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionProvider.aidl deleted file mode 100644 index 5f99e9d..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionProvider.aidl +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ISessionProvider { - IObjectWrapper getSession(String sessionId) = 0; - boolean isSessionRecoverable() = 1; - String getCategory() = 2; - int getSupportedVersion() = 3; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionProxy.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionProxy.aidl deleted file mode 100644 index 170680a..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/ISessionProxy.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.cast.framework; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ISessionProxy { - IObjectWrapper getWrappedSession() = 0; - void start(in Bundle extras) = 1; - void resume(in Bundle extras) = 2; - void end(boolean paramBoolean) = 3; - long getSessionRemainingTimeMs() = 4; - int getSupportedVersion() = 5; - void onStarting(in Bundle routeInfoExtra) = 6; - void onResuming(in Bundle routeInfoExtra) = 7; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/ICastDynamiteModule.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/ICastDynamiteModule.aidl deleted file mode 100644 index 2085775..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/ICastDynamiteModule.aidl +++ /dev/null @@ -1,24 +0,0 @@ -package com.google.android.gms.cast.framework.internal; - -import com.google.android.gms.cast.framework.CastOptions; -import com.google.android.gms.cast.framework.ICastConnectionController; -import com.google.android.gms.cast.framework.ICastContext; -import com.google.android.gms.cast.framework.ICastSession; -import com.google.android.gms.cast.framework.IReconnectionService; -import com.google.android.gms.cast.framework.ISession; -import com.google.android.gms.cast.framework.ISessionProxy; -import com.google.android.gms.cast.framework.internal.IMediaRouter; -import com.google.android.gms.cast.framework.media.CastMediaOptions; -import com.google.android.gms.cast.framework.media.IMediaNotificationService; -import com.google.android.gms.cast.framework.media.internal.IFetchBitmapTask; -import com.google.android.gms.cast.framework.media.internal.IFetchBitmapTaskProgressPublisher; -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ICastDynamiteModule { - ICastContext newCastContextImpl(in IObjectWrapper context, in CastOptions options, IMediaRouter router, in Map sessionProviders) = 0; - ISession newSessionImpl(String category, String sessionId, ISessionProxy proxy) = 1; - ICastSession newCastSessionImpl(in CastOptions options, in IObjectWrapper session, ICastConnectionController controller) = 2; - IMediaNotificationService newMediaNotificationServiceImpl(in IObjectWrapper service, in IObjectWrapper castContext, in IObjectWrapper resources, in CastMediaOptions options) = 3; - IReconnectionService newReconnectionServiceImpl(in IObjectWrapper service, in IObjectWrapper sessionManager, in IObjectWrapper discoveryManager) = 4; - IFetchBitmapTask newFetchBitmapTaskImpl(in IObjectWrapper asyncTask, IFetchBitmapTaskProgressPublisher progressPublisher, int i1, int i2, boolean b1, long l1, int i3, int i4, int i5) = 5; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/IMediaRouter.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/IMediaRouter.aidl deleted file mode 100644 index 3cfba99..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/IMediaRouter.aidl +++ /dev/null @@ -1,19 +0,0 @@ -package com.google.android.gms.cast.framework.internal; - -import android.os.Bundle; - -import com.google.android.gms.cast.framework.internal.IMediaRouterCallback; - -interface IMediaRouter { - void registerMediaRouterCallbackImpl(in Bundle selector, IMediaRouterCallback callback) = 0; - void addCallback(in Bundle selector, int flags) = 1; - void removeCallback(in Bundle selector) = 2; - boolean isRouteAvailable(in Bundle selector, int flags) = 3; - void selectRouteById(String routeId) = 4; - void selectDefaultRoute() = 5; - boolean isDefaultRouteSelected() = 6; // Maybe? - Bundle getRouteInfoExtrasById(String routeId) = 7; - String getSelectedRouteId() = 8; // Maybe? - int getSupportedVersion() = 9; - void clearCallbacks() = 10; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/IMediaRouterCallback.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/IMediaRouterCallback.aidl deleted file mode 100644 index d28c87c..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/internal/IMediaRouterCallback.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.cast.framework.internal; - -import android.os.Bundle; - -interface IMediaRouterCallback { - void onRouteAdded(String routeId, in Bundle extras) = 0; - void onRouteChanged(String routeId, in Bundle extras) = 1; - void onRouteRemoved(String routeId, in Bundle extras) = 2; - void onRouteSelected(String routeId, in Bundle extras) = 3; - void unknown(String routeId, in Bundle extras) = 4; - void onRouteUnselected(String routeId, in Bundle extras, int reason) = 5; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/CastMediaOptions.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/CastMediaOptions.aidl deleted file mode 100644 index 4186fc4..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/CastMediaOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast.framework.media; - -parcelable CastMediaOptions; \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/IImagePicker.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/IImagePicker.aidl deleted file mode 100644 index 05211a3..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/IImagePicker.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.android.gms.cast.framework.media; - -import com.google.android.gms.common.images.WebImage; -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IImagePicker { - // WebImage onPickImage(MediaMetadata metadata, int int1) = 0; - IObjectWrapper getWrappedClientObject() = 1; - int unknown1() = 2; - // WebImage onPickImage(MediaMetadata metadata, ImageHints imageHints) = 3; -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/IMediaNotificationService.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/IMediaNotificationService.aidl deleted file mode 100644 index 03e4872..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/IMediaNotificationService.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.cast.framework.media; - -interface IMediaNotificationService { - -} \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/INotificationActionsProvider.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/INotificationActionsProvider.aidl deleted file mode 100644 index 325efe2..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/INotificationActionsProvider.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.cast.framework.media; - -interface INotificationActionsProvider { - -} diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/NotificationOptions.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/NotificationOptions.aidl deleted file mode 100644 index b918b7e..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/NotificationOptions.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.cast.framework.media; - -parcelable NotificationOptions; diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/internal/IFetchBitmapTask.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/internal/IFetchBitmapTask.aidl deleted file mode 100644 index c9f2286..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/internal/IFetchBitmapTask.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.cast.framework.media.internal; - -interface IFetchBitmapTask { - -} \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/internal/IFetchBitmapTaskProgressPublisher.aidl b/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/internal/IFetchBitmapTaskProgressPublisher.aidl deleted file mode 100644 index 58b80c0..0000000 --- a/play-services-cast-framework-api/src/main/aidl/com/google/android/gms/cast/framework/media/internal/IFetchBitmapTaskProgressPublisher.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.cast.framework.media.internal; - -interface IFetchBitmapTaskProgressPublisher { - -} \ No newline at end of file diff --git a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/CastOptions.java b/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/CastOptions.java deleted file mode 100644 index adfdb1c..0000000 --- a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/CastOptions.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast.framework; - -import com.google.android.gms.cast.LaunchOptions; -import com.google.android.gms.cast.framework.media.CastMediaOptions; - -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.ArrayList; - -public class CastOptions extends AutoSafeParcelable { - @Field(1) - private final int versionCode = 1; - @Field(2) - private String receiverApplicationId; - @Field(3) - private ArrayList supportedNamespaces; - @Field(4) - private boolean stopReceiverApplicationWhenEndingSession; - @Field(5) - private LaunchOptions launchOptions; - @Field(6) - private boolean resumeSavedSession; - @Field(7) - private CastMediaOptions castMediaOptions; - @Field(8) - private boolean enableReconnectionService; - @Field(9) - private double volumeDeltaBeforeIceCreamSandwich; - - public String getReceiverApplicationId() { - return this.receiverApplicationId; - } - - public LaunchOptions getLaunchOptions() { - return this.launchOptions; - } - - public static Creator CREATOR = new AutoCreator(CastOptions.class); -} diff --git a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/CastState.java b/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/CastState.java deleted file mode 100644 index 85d57be..0000000 --- a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/CastState.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast.framework; - -public final class CastState { - public static final int NO_DEVICES_AVAILABLE = 1; - public static final int NOT_CONNECTED = 2; - public static final int CONNECTING = 3; - public static final int CONNECTED = 4; - - public static String toString(int castState) { - switch (castState) { - case NO_DEVICES_AVAILABLE: - return "NO_DEVICES_AVAILABLE"; - case NOT_CONNECTED: - return "NOT_CONNECTED"; - case CONNECTING: - return "CONNECTING"; - case CONNECTED: - return "CONNECTED"; - default: - return "UNKNOWN"; - } - } -} diff --git a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/media/CastMediaOptions.java b/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/media/CastMediaOptions.java deleted file mode 100644 index 742e979..0000000 --- a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/media/CastMediaOptions.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast.framework.media; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class CastMediaOptions extends AutoSafeParcelable { - - @Field(1) - private final int versionCode = 1; - @Field(2) - public String mediaIntentReceiverClassName; - @Field(3) - public String expandedControllerActivityClassName; - @Field(4) - public IImagePicker imagePicker; - @Field(5) - public NotificationOptions notificationOptions; - @Field(6) - public boolean bool6; - @Field(7) - public boolean bool7; - - public static Creator CREATOR = new AutoCreator(CastMediaOptions.class); -} diff --git a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/media/NotificationOptions.java b/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/media/NotificationOptions.java deleted file mode 100644 index b696014..0000000 --- a/play-services-cast-framework-api/src/main/java/com/google/android/gms/cast/framework/media/NotificationOptions.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast.framework.media; - -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.List; - -public class NotificationOptions extends AutoSafeParcelable { - - @Field(1) - private final int versionCode = 1; - @Field(2) - public List actions; - @Field(3) - public int[] compatActionIndices; - @Field(4) - public long skipStepMs; - @Field(5) - public String targetActivityClassName; - @Field(6) - public int getSmallIconDrawableResId; - @Field(7) - public int getStopLiveStreamDrawableResId; - @Field(8) - public int getPauseDrawableResId; - @Field(9) - public int getPlayDrawableResId; - @Field(10) - public int getSkipNextDrawableResId; - @Field(11) - public int getSkipPrevDrawableResId; - @Field(12) - public int getForwardDrawableResId; - @Field(13) - public int getForward10DrawableResId; - @Field(14) - public int getForward30DrawableResId; - @Field(15) - public int getRewindDrawableResId; - @Field(16) - public int getRewind10DrawableResId; - @Field(17) - public int getRewind30DrawableResId; - @Field(18) - public int getDisconnectDrawableResId; - @Field(19) - public int intvar19; - @Field(20) - public int getCastingToDeviceStringResId; - @Field(21) - public int getStopLiveStreamTitleResId; - @Field(22) - public int intvar22; - @Field(23) - public int intvar23; - @Field(24) - public int intvar24; - @Field(25) - public int intvar25; - @Field(26) - public int intvar26; - @Field(27) - public int intvar27; - @Field(28) - public int intvar28; - @Field(29) - public int intvar29; - @Field(30) - public int intvar30; - @Field(31) - public int intvar31; - @Field(32) - public int intvar32; - @Field(33) - public INotificationActionsProvider notificationActionsProvider; - - public static Creator CREATOR = new AutoCreator(NotificationOptions.class); -} diff --git a/play-services-cast/build.gradle b/play-services-cast/build.gradle deleted file mode 100644 index dbdf42b..0000000 --- a/play-services-cast/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -dependencies { - api project(':play-services-base') - api project(':play-services-cast-api') -} \ No newline at end of file diff --git a/play-services-cast/gradle.properties b/play-services-cast/gradle.properties deleted file mode 100644 index 85daef1..0000000 --- a/play-services-cast/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Cast Library -POM_DESCRIPTION=The Play Services Library module to access the Cast API - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsLib - -POM_SCM_URL=https://github.com/microg/android_external_GmsLib -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-cast/src/main/AndroidManifest.xml b/play-services-cast/src/main/AndroidManifest.xml deleted file mode 100644 index 7e14f39..0000000 --- a/play-services-cast/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/Cast.java b/play-services-cast/src/main/java/com/google/android/gms/cast/Cast.java deleted file mode 100644 index aa5e06a..0000000 --- a/play-services-cast/src/main/java/com/google/android/gms/cast/Cast.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.os.Bundle; - -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.PendingResult; -import com.google.android.gms.common.api.Result; -import com.google.android.gms.common.api.Status; - -import org.microg.gms.cast.CastApiClientBuilder; -import org.microg.gms.cast.CastApiImpl; -import org.microg.gms.common.PublicApi; - -import java.io.IOException; - -@PublicApi -public final class Cast { - - /** - * A constant indicating that the Google Cast device is not the currently active video input. - */ - public static final int ACTIVE_INPUT_STATE_NO = 0; - - /** - * A constant indicating that it is not known (and/or not possible to know) whether the Google Cast device is - * the currently active video input. Active input state can only be reported when the Google Cast device is - * connected to a TV or AVR with CEC support. - */ - public static final int ACTIVE_INPUT_STATE_UNKNOWN = -1; - - /** - * A constant indicating that the Google Cast device is the currently active video input. - */ - public static final int ACTIVE_INPUT_STATE_YES = 1; - - /** - * A boolean extra for the connection hint bundle passed to - * {@link GoogleApiClient.ConnectionCallbacks#onConnected(Bundle)} that indicates that the connection was - * re-established, but the receiver application that was in use at the time of the connection loss is no longer - * running on the receiver. - */ - public static final String EXTRA_APP_NO_LONGER_RUNNING = "com.google.android.gms.cast.EXTRA_APP_NO_LONGER_RUNNING"; - - /** - * The maximum raw message length (in bytes) that is supported by a Cast channel. - */ - public static final int MAX_MESSAGE_LENGTH = 65536; - - /** - * The maximum length (in characters) of a namespace name. - */ - public static final int MAX_NAMESPACE_LENGTH = 128; - - /** - * A constant indicating that the Google Cast device is not currently in standby. - */ - public static final int STANDBY_STATE_NO = 0; - - /** - * A constant indicating that it is not known (and/or not possible to know) whether the Google Cast device is - * currently in standby. Standby state can only be reported when the Google Cast device is connected to a TV or - * AVR with CEC support. - */ - public static final int STANDBY_STATE_UNKNOWN = -1; - - /** - * A constant indicating that the Google Cast device is currently in standby. - */ - public static final int STANDBY_STATE_YES = 1; - - - /** - * Token to pass to {@link GoogleApiClient.Builder#addApi(Api)} to enable the Cast features. - */ - public static final Api API = new Api<>(new CastApiClientBuilder()); - - /** - * An implementation of the CastApi interface. The interface is used to interact with a cast device. - */ - public static final Cast.CastApi CastApi = new CastApiImpl(); - - private Cast() { - } - - public interface ApplicationConnectionResult extends Result { - ApplicationMetadata getApplicationMetadata(); - - String getApplicationStatus(); - - String getSessionId(); - - boolean getWasLaunched(); - } - - public interface CastApi { - int getActiveInputState(GoogleApiClient client); - - ApplicationMetadata getApplicationMetadata(GoogleApiClient client); - - String getApplicationStatus(GoogleApiClient client); - - int getStandbyState(GoogleApiClient client); - - double getVolume(GoogleApiClient client); - - boolean isMute(GoogleApiClient client); - - PendingResult joinApplication(GoogleApiClient client); - - PendingResult joinApplication(GoogleApiClient client, String applicationId, String sessionId); - - PendingResult joinApplication(GoogleApiClient client, String applicationId); - - PendingResult launchApplication(GoogleApiClient client, String applicationId, LaunchOptions launchOptions); - - PendingResult launchApplication(GoogleApiClient client, String applicationId); - - @Deprecated - PendingResult launchApplication(GoogleApiClient client, String applicationId, boolean relaunchIfRunning); - - PendingResult leaveApplication(GoogleApiClient client); - - void removeMessageReceivedCallbacks(GoogleApiClient client, String namespace) throws IOException; - - void requestStatus(GoogleApiClient client) throws IOException; - - PendingResult sendMessage(GoogleApiClient client, String namespace, String message); - - void setMessageReceivedCallbacks(GoogleApiClient client, String namespace, Cast.MessageReceivedCallback callbacks) throws IOException; - - void setMute(GoogleApiClient client, boolean mute) throws IOException; - - void setVolume(GoogleApiClient client, double volume) throws IOException; - - PendingResult stopApplication(GoogleApiClient client); - - PendingResult stopApplication(GoogleApiClient client, String sessionId); - } - - public static class CastOptions implements Api.ApiOptions.HasOptions { - private final CastDevice castDevice; - private final Listener castListener; - private final boolean verboseLoggingEnabled; - - public CastOptions(CastDevice castDevice, Listener castListener, boolean verboseLoggingEnabled) { - this.castDevice = castDevice; - this.castListener = castListener; - this.verboseLoggingEnabled = verboseLoggingEnabled; - } - - @Deprecated - public static Builder builder(CastDevice castDevice, Listener castListener) { - return new Builder(castDevice, castListener); - } - - public static class Builder { - private final CastDevice castDevice; - private final Listener castListener; - private boolean verboseLoggingEnabled; - - public Builder(CastDevice castDevice, Listener castListener) { - this.castDevice = castDevice; - this.castListener = castListener; - } - - public CastOptions build() { - return new CastOptions(castDevice, castListener, verboseLoggingEnabled); - } - - public Builder setVerboseLoggingEnabled(boolean verboseLoggingEnabled) { - this.verboseLoggingEnabled = verboseLoggingEnabled; - return this; - } - } - } - - public static class Listener { - public void onActiveInputStateChanged(int activeInputState) { - - } - - public void onApplicationDisconnected(int statusCode) { - - } - - public void onApplicationMetadataChanged(ApplicationMetadata applicationMetadata) { - - } - - public void onApplicationStatusChanged() { - - } - - public void onStandbyStateChanged(int standbyState) { - - } - - public void onVolumeChanged() { - - } - } - - public interface MessageReceivedCallback { - void onMessageReceived(CastDevice castDevice, String namespace, String message); - } -} diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastPresentation.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastPresentation.java deleted file mode 100644 index cfc5568..0000000 --- a/play-services-cast/src/main/java/com/google/android/gms/cast/CastPresentation.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.annotation.TargetApi; -import android.app.Presentation; -import android.content.Context; -import android.view.Display; - -@TargetApi(17) -public class CastPresentation extends Presentation { - public CastPresentation(Context outerContext, Display display) { - super(outerContext, display); - } - - public CastPresentation(Context outerContext, Display display, int theme) { - super(outerContext, display, theme); - } -} diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplay.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplay.java deleted file mode 100644 index 4f1d59a..0000000 --- a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplay.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.view.Display; - -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.Result; -import com.google.android.gms.common.api.Status; - -import org.microg.gms.cast.CastRemoteDisplayApiClientBuilder; -import org.microg.gms.cast.CastRemoteDisplayApiImpl; -import org.microg.gms.common.PublicApi; - -@PublicApi -public final class CastRemoteDisplay { - /** - * Token to pass to {@link GoogleApiClient.Builder#addApi(Api)} to enable the CastRemoteDisplay features. - */ - public static final Api API = new Api<>(new CastRemoteDisplayApiClientBuilder()); - - /** - * An implementation of the CastRemoteDisplayAPI interface. The interface is used to interact with a cast device. - */ - public static final CastRemoteDisplayApi CastApi = new CastRemoteDisplayApiImpl(); - - private CastRemoteDisplay() { - } - - public static final class CastRemoteDisplayOptions implements Api.ApiOptions.HasOptions { - private final CastDevice castDevice; - private final CastRemoteDisplaySessionCallbacks callbacks; - - private CastRemoteDisplayOptions(CastDevice castDevice, CastRemoteDisplaySessionCallbacks callbacks) { - this.castDevice = castDevice; - this.callbacks = callbacks; - } - - public static final class Builder { - private final CastDevice castDevice; - private final CastRemoteDisplaySessionCallbacks callbacks; - - public Builder(CastDevice castDevice, CastRemoteDisplaySessionCallbacks callbacks) { - this.castDevice = castDevice; - this.callbacks = callbacks; - } - - public CastRemoteDisplayOptions build() { - return new CastRemoteDisplayOptions(castDevice, callbacks); - } - } - } - - public interface CastRemoteDisplaySessionCallbacks { - void onRemoteDisplayEnded(Status status); - } - - public interface CastRemoteDisplaySessionResult extends Result { - Display getPresentationDisplay(); - } -} diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayApi.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayApi.java deleted file mode 100644 index 5c05358..0000000 --- a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayApi.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.PendingResult; - -public interface CastRemoteDisplayApi { - PendingResult startRemoteDisplay(GoogleApiClient apiClient, String applicationId); - - PendingResult stopRemoteDisplay(GoogleApiClient apiClient); -} diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayLocalService.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayLocalService.java deleted file mode 100644 index dbc4108..0000000 --- a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayLocalService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.cast; - -import android.app.Service; -import android.content.Intent; -import android.os.IBinder; - -public class CastRemoteDisplayLocalService extends Service { - @Override - public IBinder onBind(Intent intent) { - return null; - } -} diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastApiClientBuilder.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastApiClientBuilder.java deleted file mode 100644 index 4784780..0000000 --- a/play-services-cast/src/main/java/org/microg/gms/cast/CastApiClientBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.cast; - -import android.content.Context; -import android.os.Looper; - -import com.google.android.gms.cast.Cast; - -import org.microg.gms.common.api.ApiClient; -import org.microg.gms.common.api.ApiClientBuilder; -import org.microg.gms.common.api.ApiClientSettings; -import org.microg.gms.common.api.ConnectionCallbacks; -import org.microg.gms.common.api.OnConnectionFailedListener; - -public class CastApiClientBuilder implements ApiClientBuilder { - @Override - public ApiClient build(Cast.CastOptions options, Context context, Looper looper, ApiClientSettings clientSettings, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener) { - return new CastClientImpl(context, options, callbacks, connectionFailedListener); - } -} diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastApiImpl.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastApiImpl.java deleted file mode 100644 index bb95565..0000000 --- a/play-services-cast/src/main/java/org/microg/gms/cast/CastApiImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.cast; - -import com.google.android.gms.cast.ApplicationMetadata; -import com.google.android.gms.cast.Cast; -import com.google.android.gms.cast.LaunchOptions; -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.PendingResult; -import com.google.android.gms.common.api.Status; - -import java.io.IOException; - -// TODO -public class CastApiImpl implements Cast.CastApi { - @Override - public int getActiveInputState(GoogleApiClient client) { - return 0; - } - - @Override - public ApplicationMetadata getApplicationMetadata(GoogleApiClient client) { - return null; - } - - @Override - public String getApplicationStatus(GoogleApiClient client) { - return null; - } - - @Override - public int getStandbyState(GoogleApiClient client) { - return 0; - } - - @Override - public double getVolume(GoogleApiClient client) { - return 0; - } - - @Override - public boolean isMute(GoogleApiClient client) { - return false; - } - - @Override - public PendingResult joinApplication(GoogleApiClient client) { - return null; - } - - @Override - public PendingResult joinApplication(GoogleApiClient client, String applicationId, String sessionId) { - return null; - } - - @Override - public PendingResult joinApplication(GoogleApiClient client, String applicationId) { - return null; - } - - @Override - public PendingResult launchApplication(GoogleApiClient client, String applicationId, LaunchOptions launchOptions) { - return null; - } - - @Override - public PendingResult launchApplication(GoogleApiClient client, String applicationId) { - return null; - } - - @Override - public PendingResult launchApplication(GoogleApiClient client, String applicationId, boolean relaunchIfRunning) { - return null; - } - - @Override - public PendingResult leaveApplication(GoogleApiClient client) { - return null; - } - - @Override - public void removeMessageReceivedCallbacks(GoogleApiClient client, String namespace) throws IOException { - - } - - @Override - public void requestStatus(GoogleApiClient client) throws IOException { - - } - - @Override - public PendingResult sendMessage(GoogleApiClient client, String namespace, String message) { - return null; - } - - @Override - public void setMessageReceivedCallbacks(GoogleApiClient client, String namespace, Cast.MessageReceivedCallback callbacks) throws IOException { - - } - - @Override - public void setMute(GoogleApiClient client, boolean mute) throws IOException { - - } - - @Override - public void setVolume(GoogleApiClient client, double volume) throws IOException { - - } - - @Override - public PendingResult stopApplication(GoogleApiClient client) { - return null; - } - - @Override - public PendingResult stopApplication(GoogleApiClient client, String sessionId) { - return null; - } -} diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastClientImpl.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastClientImpl.java deleted file mode 100644 index 8b6bd50..0000000 --- a/play-services-cast/src/main/java/org/microg/gms/cast/CastClientImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.cast; - -import android.content.Context; - -import com.google.android.gms.cast.Cast; - -import org.microg.gms.common.DummyApiClient; -import org.microg.gms.common.api.ConnectionCallbacks; -import org.microg.gms.common.api.OnConnectionFailedListener; - -public class CastClientImpl extends DummyApiClient { - public CastClientImpl(Context context, Cast.CastOptions options, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener) { - } -} diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiClientBuilder.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiClientBuilder.java deleted file mode 100644 index b3f5374..0000000 --- a/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiClientBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.cast; - -import android.content.Context; -import android.os.Looper; - -import com.google.android.gms.cast.CastRemoteDisplay; - -import org.microg.gms.common.DummyApiClient; -import org.microg.gms.common.api.ApiClient; -import org.microg.gms.common.api.ApiClientBuilder; -import org.microg.gms.common.api.ApiClientSettings; -import org.microg.gms.common.api.ConnectionCallbacks; -import org.microg.gms.common.api.OnConnectionFailedListener; - -public class CastRemoteDisplayApiClientBuilder implements ApiClientBuilder { - @Override - public ApiClient build(CastRemoteDisplay.CastRemoteDisplayOptions options, Context context, Looper looper, ApiClientSettings clientSettings, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener) { - return new DummyApiClient(); - } -} diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiImpl.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiImpl.java deleted file mode 100644 index 4f47a90..0000000 --- a/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.cast; - -import com.google.android.gms.cast.CastRemoteDisplay; -import com.google.android.gms.cast.CastRemoteDisplayApi; -import com.google.android.gms.common.api.GoogleApiClient; -import com.google.android.gms.common.api.PendingResult; - -public class CastRemoteDisplayApiImpl implements CastRemoteDisplayApi { - @Override - public PendingResult startRemoteDisplay(GoogleApiClient apiClient, String applicationId) { - return null; - } - - @Override - public PendingResult stopRemoteDisplay(GoogleApiClient apiClient) { - return null; - } -} diff --git a/play-services-core-proto/build.gradle b/play-services-core-proto/build.gradle deleted file mode 100644 index facb702..0000000 --- a/play-services-core-proto/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.squareup.wire' -apply plugin: 'kotlin' - -dependencies { - implementation "com.squareup.wire:wire-runtime:3.6.1" -} - -wire { - kotlin { - javaInterop = true - } -} - -sourceSets { - main.java.srcDirs += "$buildDir/generated/source/wire" -} - -compileKotlin { - kotlinOptions.jvmTarget = 1.8 -} - -compileTestKotlin { - kotlinOptions.jvmTarget = 1.8 -} \ No newline at end of file diff --git a/play-services-core-proto/src/main/proto/appcert.proto b/play-services-core-proto/src/main/proto/appcert.proto deleted file mode 100644 index 4ab1e5e..0000000 --- a/play-services-core-proto/src/main/proto/appcert.proto +++ /dev/null @@ -1,32 +0,0 @@ -option java_package = "org.microg.gms.auth.appcert"; -option java_outer_classname = "AppCertProto"; - -message DeviceKeyRequest { - optional uint64 androidId = 2; - optional uint64 sessionId = 3; - message VersionInfo { - optional uint32 sdkVersion = 1; - optional uint32 gmsVersion = 2; - } - optional VersionInfo versionInfo = 4; - optional string token = 5; -} - -message DeviceKey { - optional uint64 keyId = 1; - optional uint64 deviceId = 3; - optional bytes macSecret = 4; - optional bytes keyCert = 5; -} - -message SpatulaHeaderProto { - message PackageInfo { - optional string packageName = 1; - optional string packageCertificateHash = 3; - } - optional PackageInfo packageInfo = 1; - optional bytes hmac = 2; - optional uint64 deviceId = 3; - optional uint64 keyId = 4; - optional bytes keyCert = 5; -} diff --git a/play-services-core-proto/src/main/proto/auth.proto b/play-services-core-proto/src/main/proto/auth.proto deleted file mode 100644 index 8a6997a..0000000 --- a/play-services-core-proto/src/main/proto/auth.proto +++ /dev/null @@ -1,17 +0,0 @@ -option java_package = "org.microg.gms.auth"; - -option java_outer_classname = "AuthProto"; - -message ConsentData { - message AppDetails { - optional string title = 1; - optional string email = 3; - } - optional AppDetails app = 1; - message ScopeDetails { - optional string title = 1; - optional string description = 2; - optional string id = 6; - } - repeated ScopeDetails scopes = 2; -} \ No newline at end of file diff --git a/play-services-core-proto/src/main/proto/checkin.proto b/play-services-core-proto/src/main/proto/checkin.proto deleted file mode 100644 index 2e0b75f..0000000 --- a/play-services-core-proto/src/main/proto/checkin.proto +++ /dev/null @@ -1,270 +0,0 @@ -option java_package = "org.microg.gms.checkin"; - -option java_outer_classname = "CheckinProto"; - -// Sample data, if provided, is fished from a Nexus 7 (2013) / flo running Android 5.0 -message CheckinRequest { - // unused - optional string imei = 1; - - // Gservices["android_id"] or 0 on first-checkin - optional int64 androidId = 2; - - // Gservices["digest"] or "" - optional string digest = 3; - - required Checkin checkin = 4; - message Checkin { - // empty Build on pre-checkin - required Build build = 1; - message Build { - // Build.FINGERPRINT - // eg. google/razor/flo:5.0.1/LRX22C/1602158:user/release-keys - optional string fingerprint = 1; - - // Build.HARDWARE - // eg. flo - optional string hardware = 2; - - // Build.BRAND - // eg. google - optional string brand = 3; - - // Build.getRadioVersion() - optional string radio = 4; - - // Build.BOOTLOADER - // eg. FLO-04.04 - optional string bootloader = 5; - - // GoogleSettingsContract.Partner["client_id"] - // eg. android-google - optional string clientId = 6; - - // Build.TIME / 1000L - // eg. 1416533192 - optional int64 time = 7; - - // PackageInfo.versionCode - // eg. 6188736 - optional int32 packageVersionCode = 8; - - // Build.DEVICE - // eg. flo - optional string device = 9; - - // Build.VERSION.SDK_INT - // eg. 21 - optional int32 sdkVersion = 10; - - // Build.MODEL - // eg. Nexus 7 - optional string model = 11; - - // Build.MANUFACTURER - // eg. asus - optional string manufacturer = 12; - - // Build.PRODUCT - // eg. razor - optional string product = 13; - - // fileExists("/system/recovery-from-boot.p") - // eg. false - optional bool otaInstalled = 14; - } - - // last checkin ms or 0 if first checkin - // eg. 0 - optional int64 lastCheckinMs = 2; - - // eg. ("event_log_start",~,1424612602652) on first checkin - repeated Event event = 3; - message Event { - optional string tag = 1; - optional string value = 2; - optional int64 timeMs = 3; - } - - // unknown, n/a on first checkin - repeated Statistic stat = 4; - message Statistic { - required string tag = 1; - optional int32 count = 2; - optional float sum = 3; - } - - // unused - repeated string requestedGroup = 5; - - // TelephonyManager.getNetworkOperator != null|empty - optional string cellOperator = 6; - - // TelephonyManager.getSimOperator != null|empty - optional string simOperator = 7; - - // "WIFI::" | ("mobile" | "notmobile" | "unknown") + "-" + ("roaming" | "notroaming" | "unknown") - optional string roaming = 8; - - // UserHandle.myUserId - // eg. 0 - optional int32 userNumber = 9; - } - - // unused - optional string desiredBuild = 5; - - // Locale.toString - optional string locale = 6; - - // GoogleSettingsContract.Partner["logging_id2"] (choosen randomly on first checkin) - // eg. 12561488293572742346 - optional int64 loggingId = 7; - - // unused - optional string marketCheckin = 8; - - // NetworkInfo.getExtraInfo, WifiInfo.getMacAddress (12 hex-digits) - // eg. d850e6abcdef - repeated string macAddress = 9; - - // TelephonyManager.getDeviceId (14 hex-digits), not set on tablets - optional string meid = 10; - - // "[]" followed by "", empty string on first checkin - repeated string accountCookie = 11; - - // TimeZone.getId - // eg. GMT - optional string timeZone = 12; - - // security token as given on first checkin, not set on first checkin - optional fixed64 securityToken = 13; - - // use 3 - optional int32 version = 14; - - // SHA-1 of each in /system/etc/security/otacerts.zip or "--IOException--" or "--no-output--" - // eg. dKXTm1QH9QShGQwBM/4rg6/lCNQ= - repeated string otaCert = 15; - - // Build.SERIAL != "unknown" - // eg. 07d90b18 - optional string serial = 16; - - // TelephonyManager.getDeviceId (8 hex-digits), not set on tablets - optional string esn = 17; - - optional DeviceConfig deviceConfiguration = 18; - message DeviceConfig { - // ConfigurationInfo.reqTouchScreen - // eg. 3 - optional int32 touchScreen = 1; - - // ConfigurationInfo.reqKeyboardType - // eg. 1 - optional int32 keyboardType = 2; - - // ConfigurationInfo.reqNavigation - // eg. 1 - optional int32 navigation = 3; - // ConfigurationInfo.screenLayout - // eg. 3 - optional int32 screenLayout = 4; - - // ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD - // eg. 0 - optional bool hasHardKeyboard = 5; - - // ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV - // eg. 0 - optional bool hasFiveWayNavigation = 6; - - // DisplayMetrics.densityDpi - // eg. 320 - optional int32 densityDpi = 7; - - // ConfigurationInfo.reqGlEsVersion - // eg. 196608 - optional int32 glEsVersion = 8; - - // PackageManager.getSystemSharedLibraryNames - // eg. "android.test.runner", "com.android.future.usb.accessory", "com.android.location.provider", - // "com.android.media.remotedisplay", "com.android.mediadrm.signer", "com.google.android.maps", - // "com.google.android.media.effects", "com.google.widevine.software.drm", "javax.obex" - repeated string sharedLibrary = 9; - - // PackageManager.getSystemAvailableFeatures - // eg. android.hardware.[...] - repeated string availableFeature = 10; - - // Build.CPU_ABI and Build.CPU_ABI2 != "unknown" - // eg. "armeabi-v7a", "armeabi" - repeated string nativePlatform = 11; - - // DisplayMetrics.widthPixels - // eg. 1200 - optional int32 widthPixels = 12; - - // DisplayMetrics.heightPixels - // eg. 1824 - optional int32 heightPixels = 13; - - // Context.getAssets.getLocales - // eg. [...], "en-US", [...] - repeated string locale = 14; - - // GLES10.glGetString(GLES10.GL_EXTENSIONS) - // eg. "GL_AMD_compressed_ATC_texture", [...] - repeated string glExtension = 15; - - // unused - optional int32 deviceClass = 16; - // unused - optional int32 maxApkDownloadSizeMb = 17; - } - - // "ethernet" or "wifi" - repeated string macAddressType = 19; - - // unknown, use 0 on pre- and first-checkin, and 1 for later checkins - // also present on pre-checkin - required int32 fragment = 20; - - // unknown - optional string userName = 21; - - // UserManager.getUserSerialNumber - // eg. 0 - optional int32 userSerialNumber = 22; -} - -message CheckinResponse { - optional bool statsOk = 1; - repeated Intent intent = 2; - message Intent { - optional string action = 1; - optional string dataUri = 2; - optional string mimeType = 3; - optional string javaClass = 4; - repeated Extra extra = 5; - message Extra { - optional string name = 6; - optional string value = 7; - } - } - optional int64 timeMs = 3; - optional string digest = 4; - repeated GservicesSetting setting = 5; - message GservicesSetting { - optional bytes name = 1; - optional bytes value = 2; - } - optional bool marketOk = 6; - optional fixed64 androidId = 7; - optional fixed64 securityToken = 8; - optional bool settingsDiff = 9; - repeated string deleteSetting = 10; - optional string versionInfo = 11; - optional string deviceDataVersionInfo = 12; -} diff --git a/play-services-core-proto/src/main/proto/mcs.proto b/play-services-core-proto/src/main/proto/mcs.proto deleted file mode 100644 index 590f713..0000000 --- a/play-services-core-proto/src/main/proto/mcs.proto +++ /dev/null @@ -1,270 +0,0 @@ -// Derived from mcs.proto in chromium source code. Original license text below. - -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// MCS protocol for communication between Chrome client and Mobile Connection -// Server . - -option java_package = "org.microg.gms.gcm.mcs"; - -/* - Common fields/comments: - - stream_id: no longer sent by server, each side keeps a counter - last_stream_id_received: sent only if a packet was received since last time - a last_stream was sent - status: new bitmask including the 'idle' as bit 0. - - */ - -/** - TAG: 0 - */ -message HeartbeatPing { - optional int32 stream_id = 1; - optional int32 last_stream_id_received = 2; - optional int64 status = 3; -} - -/** - TAG: 1 - */ -message HeartbeatAck { - optional int32 stream_id = 1; - optional int32 last_stream_id_received = 2; - optional int64 status = 3; -} - -message ErrorInfo { - required int32 code = 1; - optional string message = 2; - optional string type = 3; - optional Extension extension = 4; -} - -// MobileSettings class. -// "u:f", "u:b", "u:s" - multi user devices reporting foreground, background -// and stopped users. -// hbping: heatbeat ping interval -// rmq2v: include explicit stream IDs - -message Setting { - required string name = 1; - required string value = 2; -} - -message HeartbeatStat { - required string ip = 1; - required bool timeout = 2; - required int32 interval_ms = 3; -} - -message HeartbeatConfig { - optional bool upload_stat = 1; - optional string ip = 2; - optional int32 interval_ms = 3; -} - -/** - TAG: 2 - */ -message LoginRequest { - enum AuthService { - ANDROID_ID = 2; - } - required string id = 1; // Must be present ( proto required ), may be empty - // string. - // mcs.android.com. - required string domain = 2; - // Decimal android ID - required string user = 3; - - required string resource = 4; - - // Secret - required string auth_token = 5; - - // Format is: android-HEX_DEVICE_ID - // The user is the decimal value. - optional string device_id = 6; - - // RMQ1 - no longer used - optional int64 last_rmq_id = 7; - - repeated Setting setting = 8; - optional int32 compress = 9; - repeated string received_persistent_id = 10; - - // Replaced by "rmq2v" setting - optional bool include_stream_ids = 11; - - optional bool adaptive_heartbeat = 12; - optional HeartbeatStat heartbeat_stat = 13; - // Must be true. - optional bool use_rmq2 = 14; - optional int64 account_id = 15; - - // ANDROID_ID = 2 - optional AuthService auth_service = 16; - - optional int32 network_type = 17; - optional int64 status = 18; -} - -/** - * TAG: 3 - */ -message LoginResponse { - required string id = 1; - // Not used. - optional string jid = 2; - // Null if login was ok. - optional ErrorInfo error = 3; - repeated Setting setting = 4; - optional int32 stream_id = 5; - // Should be "1" - optional int32 last_stream_id_received = 6; - optional HeartbeatConfig heartbeat_config = 7; - // used by the client to synchronize with the server timestamp. - optional int64 server_timestamp = 8; -} - -message StreamErrorStanza { - required string type = 1; - optional string text = 2; -} - -/** - * TAG: 4 - */ -message Close { -} - -message Extension { - // 12: SelectiveAck - // 13: StreamAck - required int32 id = 1; - required bytes data = 2; -} - -/** - * TAG: 7 - * IqRequest must contain a single extension. IqResponse may contain 0 or 1 - * extensions. - */ -message IqStanza { - enum IqType { - GET = 0; - SET = 1; - RESULT = 2; - IQ_ERROR = 3; - } - - optional int64 rmq_id = 1; - required IqType type = 2; - required string id = 3; - optional string from = 4; - optional string to = 5; - optional ErrorInfo error = 6; - - // Only field used in the 38+ protocol (besides common last_stream_id_received, status, rmq_id) - optional Extension extension = 7; - - optional string persistent_id = 8; - optional int32 stream_id = 9; - optional int32 last_stream_id_received = 10; - optional int64 account_id = 11; - optional int64 status = 12; -} - -message AppData { - required string key = 1; - required string value = 2; -} - -/** - * TAG: 8 - */ -message DataMessageStanza { - // Not used. - optional int64 rmq_id = 1; - - // This is the message ID, set by client, DMP.9 (message_id) - optional string id = 2; - - // Project ID of the sender, DMP.1 - required string from = 3; - - // Part of DMRequest - also the key in DataMessageProto. - optional string to = 4; - - // Package name. DMP.2 - required string category = 5; - - // The collapsed key, DMP.3 - optional string token = 6; - - // User data + GOOGLE. prefixed special entries, DMP.4 - repeated AppData app_data = 7; - - // Not used. - optional bool from_trusted_server = 8; - - // Part of the ACK protocol, returned in DataMessageResponse on server side. - // It's part of the key of DMP. - optional string persistent_id = 9; - - // In-stream ack. Increments on each message sent - a bit redundant - // Not used in DMP/DMR. - optional int32 stream_id = 10; - optional int32 last_stream_id_received = 11; - - // Not used. - optional string permission = 12; - - // Sent by the device shortly after registration. - optional string reg_id = 13; - - // Not used. - optional string pkg_signature = 14; - // Not used. - optional string client_id = 15; - - // serial number of the target user, DMP.8 - // It is the 'serial number' according to user manager. - optional int64 device_user_id = 16; - - // Time to live, in seconds. - optional int32 ttl = 17; - // Timestamp ( according to client ) when message was sent by app, in seconds - optional int64 sent = 18; - - // How long has the message been queued before the flush, in seconds. - // This is needed to account for the time difference between server and - // client: server should adjust 'sent' based on his 'receive' time. - optional int32 queued = 19; - - optional int64 status = 20; - - optional bytes raw_data = 21; - - optional int32 delay = 22; -} - -/** - Included in IQ with ID 13, sent from client or server after 10 unconfirmed - messages. - */ -message StreamAck { - // No last_streamid_received required. This is included within an IqStanza, - // which includes the last_stream_id_received. -} - -/** - Included in IQ sent after LoginResponse from server with ID 12. -*/ -message SelectiveAck { - repeated string id = 1; -} diff --git a/play-services-core/build.gradle b/play-services-core/build.gradle deleted file mode 100644 index 19dac2e..0000000 --- a/play-services-core/build.gradle +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' - -dependencies { - implementation 'com.squareup.wire:wire-runtime:3.6.1' - implementation 'de.hdodenhof:circleimageview:3.1.0' - implementation "info.armills.chromecast-java-api-v2:api-v2-raw-request:0.10.4-raw-request-1" - implementation 'androidx.webkit:webkit:1.4.0' - - implementation project(':play-services-cronet-core') - implementation project(':play-services-core-proto') - implementation project(':play-services-core:microg-ui-tools') // deprecated - implementation project(':play-services-api') - implementation project(':play-services-cast-api') - implementation project(':play-services-tasks') - - // AndroidX UI - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.mediarouter:mediarouter:1.2.6' - implementation 'androidx.preference:preference-ktx:1.2.0' - - implementation "org.microg.gms:conscrypt-gmscore:2.5.1" - implementation 'androidx.annotation:annotation:1.3.0' - implementation 'androidx.lifecycle:lifecycle-service:2.4.1' - - // Navigation - implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1' - implementation 'androidx.navigation:navigation-ui-ktx:2.4.1' - - implementation 'androidx.lifecycle:lifecycle-service:2.4.1' - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10' - implementation 'com.android.volley:volley:1.2.1' - - api project(':play-services-basement') -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - defaultConfig { - versionName version - versionCode appVersionCode - - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - - ndk { - abiFilters "armeabi-v7a", "arm64-v8a", "x86" - } - - } - - buildFeatures { - dataBinding = true - viewBinding = true - } - - sourceSets { - main { - java.srcDirs += 'src/main/kotlin' - } - } - - lintOptions { - disable 'MissingTranslation', 'BatteryLife', 'ImpliedQuantity', 'MissingQuantity', 'InvalidWakeLockTag', 'Range' - } - - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - packagingOptions { - exclude 'META-INF/ASL2.0' - } -} - -if (file('user.gradle').exists()) { - apply from: 'user.gradle' -} \ No newline at end of file diff --git a/play-services-core/microg-ui-tools/build.gradle b/play-services-core/microg-ui-tools/build.gradle deleted file mode 100644 index cfd28f9..0000000 --- a/play-services-core/microg-ui-tools/build.gradle +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2013-2016 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion "30.0.3" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } - - lintOptions { - // TODO: Remove MissingTranslation once we have stable strings and proper translations. - disable 'MissingTranslation' - } -} - -dependencies { - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.preference:preference:1.2.0' -} - diff --git a/play-services-core/microg-ui-tools/src/main/AndroidManifest.xml b/play-services-core/microg-ui-tools/src/main/AndroidManifest.xml deleted file mode 100644 index 004f299..0000000 --- a/play-services-core/microg-ui-tools/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java deleted file mode 100644 index bb065ac..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.content.pm.PackageManager; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.text.TextUtils; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.ImageView; -import android.widget.ListView; -import android.widget.TextView; - -import androidx.annotation.Nullable; -import androidx.fragment.app.Fragment; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - -public abstract class AbstractAboutFragment extends Fragment { - - protected abstract void collectLibraries(List libraries); - - public static Drawable getIcon(Context context) { - try { - PackageManager pm = context.getPackageManager(); - return pm.getPackageInfo(context.getPackageName(), 0).applicationInfo.loadIcon(pm); - } catch (PackageManager.NameNotFoundException e) { - // Never happens, self package always exists! - throw new RuntimeException(e); - } - } - - public static String getAppName(Context context) { - try { - PackageManager pm = context.getPackageManager(); - CharSequence label = pm.getPackageInfo(context.getPackageName(), 0).applicationInfo.loadLabel(pm); - if (TextUtils.isEmpty(label)) return context.getPackageName(); - return label.toString().trim(); - } catch (PackageManager.NameNotFoundException e) { - // Never happens, self package always exists! - throw new RuntimeException(e); - } - } - - protected String getAppName() { - return getAppName(getContext()); - } - - public static String getLibVersion(String packageName) { - try { - String versionName = (String) Class.forName(packageName + ".BuildConfig").getField("VERSION_NAME").get(null); - if (TextUtils.isEmpty(versionName)) return ""; - return versionName.trim(); - } catch (Exception e) { - return ""; - } - } - - public static String getSelfVersion(Context context) { - return getLibVersion(context.getPackageName()); - } - - protected String getSelfVersion() { - return getSelfVersion(getContext()); - } - - protected String getSummary() { - return null; - } - - @Nullable - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View aboutRoot = inflater.inflate(R.layout.about_root, container, false); - ((ImageView) aboutRoot.findViewById(android.R.id.icon)).setImageDrawable(getIcon(getContext())); - ((TextView) aboutRoot.findViewById(android.R.id.title)).setText(getAppName()); - ((TextView) aboutRoot.findViewById(R.id.about_version)).setText(getString(R.string.about_version_str, getSelfVersion())); - String summary = getSummary(); - if (summary != null) { - ((TextView) aboutRoot.findViewById(android.R.id.summary)).setText(summary); - aboutRoot.findViewById(android.R.id.summary).setVisibility(View.VISIBLE); - } - - List libraries = new ArrayList<>(); - collectLibraries(libraries); - Collections.sort(libraries); - ((ListView) aboutRoot.findViewById(android.R.id.list)).setAdapter(new LibraryAdapter(getContext(), libraries.toArray(new Library[0]))); - - return aboutRoot; - } - - private class LibraryAdapter extends ArrayAdapter { - - public LibraryAdapter(Context context, Library[] libraries) { - super(context, android.R.layout.simple_list_item_2, android.R.id.text1, libraries); - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - View v = super.getView(position, convertView, parent); - ((TextView) v.findViewById(android.R.id.text1)).setText(getString(R.string.about_name_version_str, getItem(position).name, getLibVersion(getItem(position).packageName))); - ((TextView) v.findViewById(android.R.id.text2)).setText(getItem(position).copyright != null ? getItem(position).copyright : getString(R.string.about_default_license)); - return v; - } - } - - protected static class Library implements Comparable { - private final String packageName; - private final String name; - private final String copyright; - - public Library(String packageName, String name, String copyright) { - this.packageName = packageName; - this.name = name; - this.copyright = copyright; - } - - @Override - public String toString() { - return name + ", " + copyright; - } - - @Override - public int compareTo(Library another) { - return name.toLowerCase(Locale.US).compareTo(another.name.toLowerCase(Locale.US)); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java deleted file mode 100644 index 30bf98c..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.microg.tools.ui; - -import android.os.Bundle; -import android.view.ViewGroup; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.fragment.app.Fragment; - -import java.util.ArrayList; -import java.util.List; - -public abstract class AbstractDashboardActivity extends AppCompatActivity { - protected int preferencesResource = 0; - - private final List conditions = new ArrayList<>(); - private ViewGroup conditionContainer; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.dashboard_activity); - conditionContainer = (ViewGroup) findViewById(R.id.condition_container); - - getSupportFragmentManager().beginTransaction() - .replace(R.id.content_wrapper, getFragment()) - .commit(); - } - - @Override - protected void onResume() { - super.onResume(); - forceConditionReevaluation(); - } - - private synchronized void resetConditionViews() { - conditionContainer.removeAllViews(); - for (Condition condition : conditions) { - if (condition.isEvaluated()) { - if (condition.isActive(this)) { - addConditionToView(condition); - } - } else { - evaluateConditionAsync(condition); - } - } - } - - private void evaluateConditionAsync(final Condition condition) { - if (condition.willBeEvaluating()) { - new Thread(() -> { - if (condition.isActive(AbstractDashboardActivity.this)) { - runOnUiThread(() -> { - if (conditions.contains(condition) && condition.isEvaluated()) { - addConditionToView(condition); - } - }); - } - }).start(); - } - } - - protected void forceConditionReevaluation() { - for (Condition condition : conditions) { - condition.resetEvaluated(); - } - resetConditionViews(); - } - - protected void addAllConditions(Condition[] conditions) { - for (Condition condition : conditions) { - addCondition(condition); - } - } - - protected void addCondition(Condition condition) { - conditions.add(condition); - if (conditionContainer == null) return; - if (condition.isEvaluated()) { - addConditionToView(condition); - } else { - evaluateConditionAsync(condition); - } - } - - private synchronized void addConditionToView(Condition condition) { - for (int i = 0; i < conditionContainer.getChildCount(); i++) { - if (conditionContainer.getChildAt(i).getTag() == condition) return; - } - conditionContainer.addView(condition.createView(this, conditionContainer)); - } - - protected void clearConditions() { - conditions.clear(); - resetConditionViews(); - } - - protected Fragment getFragment() { - if (preferencesResource == 0) { - throw new IllegalStateException("Neither preferencesResource given, nor overriden getFragment()"); - } - ResourceSettingsFragment fragment = new ResourceSettingsFragment(); - Bundle b = new Bundle(); - b.putInt(ResourceSettingsFragment.EXTRA_PREFERENCE_RESOURCE, preferencesResource); - fragment.setArguments(b); - return fragment; - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java deleted file mode 100644 index a771a9e..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.microg.tools.ui; - -import android.os.Bundle; -import android.view.MenuItem; -import android.view.ViewGroup; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentTransaction; - -public abstract class AbstractSettingsActivity extends AppCompatActivity { - protected boolean showHomeAsUp = false; - protected int preferencesResource = 0; - private ViewGroup customBarContainer; - protected int customBarLayout = 0; - protected SwitchBar switchBar; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.settings_activity); - if (showHomeAsUp) { - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - } - - switchBar = (SwitchBar) findViewById(R.id.switch_bar); - - customBarContainer = (ViewGroup) findViewById(R.id.custom_bar); - if (customBarLayout != 0) { - customBarContainer.addView(getLayoutInflater().inflate(customBarLayout, customBarContainer, false)); - } - - getSupportFragmentManager().beginTransaction() - .replace(R.id.content_wrapper, getFragment()) - .commit(); - } - - public void setCustomBarLayout(int layout) { - customBarLayout = layout; - if (customBarContainer != null) { - customBarContainer.removeAllViews(); - customBarContainer.addView(getLayoutInflater().inflate(customBarLayout, customBarContainer, false)); - } - } - - public SwitchBar getSwitchBar() { - return switchBar; - } - - public void replaceFragment(Fragment fragment) { - getSupportFragmentManager().beginTransaction() - .addToBackStack("root") - .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) - .replace(R.id.content_wrapper, fragment) - .commit(); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == android.R.id.home) { - finish(); - return true; - } - return super.onOptionsItemSelected(item); - } - - protected Fragment getFragment() { - if (preferencesResource == 0) { - throw new IllegalStateException("Neither preferencesResource given, nor overriden getFragment()"); - } - ResourceSettingsFragment fragment = new ResourceSettingsFragment(); - Bundle b = new Bundle(); - b.putInt(ResourceSettingsFragment.EXTRA_PREFERENCE_RESOURCE, preferencesResource); - fragment.setArguments(b); - return fragment; - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java deleted file mode 100644 index 0f1967a..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import androidx.fragment.app.DialogFragment; -import androidx.preference.Preference; -import androidx.preference.PreferenceFragmentCompat; - -public abstract class AbstractSettingsFragment extends PreferenceFragmentCompat { - private static final String TAG = AbstractSettingsFragment.class.getSimpleName(); - - private static final String DIALOG_FRAGMENT_TAG = "androidx.preference.PreferenceFragment.DIALOG"; - - @Override - public void onDisplayPreferenceDialog(Preference preference) { - if (preference instanceof DialogPreference) { - DialogFragment f = DialogPreference.DialogPreferenceCompatDialogFragment.newInstance(preference.getKey()); - f.setTargetFragment(this, 0); - f.show(getFragmentManager(), DIALOG_FRAGMENT_TAG); - } else { - super.onDisplayPreferenceDialog(preference); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java deleted file mode 100644 index 5adeeb8..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.DrawableRes; -import androidx.annotation.PluralsRes; -import androidx.annotation.StringRes; -import androidx.core.content.res.ResourcesCompat; - -public class Condition { - @DrawableRes - private final int iconRes; - private final Drawable icon; - - @StringRes - private final int titleRes; - @PluralsRes - private final int titlePluralsRes; - private final CharSequence title; - - @StringRes - private final int summaryRes; - @PluralsRes - private final int summaryPluralsRes; - private final CharSequence summary; - - @StringRes - private final int firstActionTextRes; - @PluralsRes - private final int firstActionPluralsRes; - private final CharSequence firstActionText; - private final View.OnClickListener firstActionListener; - - @StringRes - private final int secondActionTextRes; - @PluralsRes - private final int secondActionPluralsRes; - private final CharSequence secondActionText; - private final View.OnClickListener secondActionListener; - - private final Evaluation evaluation; - - private boolean evaluated = false; - private boolean evaluating = false; - private int evaluatedPlurals = -1; - private boolean active; - - Condition(Builder builder) { - icon = builder.icon; - title = builder.title; - summary = builder.summary; - firstActionText = builder.firstActionText; - firstActionListener = builder.firstActionListener; - secondActionText = builder.secondActionText; - secondActionListener = builder.secondActionListener; - summaryRes = builder.summaryRes; - iconRes = builder.iconRes; - firstActionTextRes = builder.firstActionTextRes; - secondActionTextRes = builder.secondActionTextRes; - titleRes = builder.titleRes; - evaluation = builder.evaluation; - titlePluralsRes = builder.titlePluralsRes; - summaryPluralsRes = builder.summaryPluralsRes; - firstActionPluralsRes = builder.firstActionPluralsRes; - secondActionPluralsRes = builder.secondActionPluralsRes; - } - - View createView(final Context context, ViewGroup container) { - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - View view = inflater.inflate(R.layout.condition_card, container, false); - Drawable icon = getIcon(context); - if (icon != null) - ((ImageView) view.findViewById(android.R.id.icon)).setImageDrawable(icon); - ((TextView) view.findViewById(android.R.id.title)).setText(getTitle(context)); - ((TextView) view.findViewById(android.R.id.summary)).setText(getSummary(context)); - Button first = (Button) view.findViewById(R.id.first_action); - first.setText(getFirstActionText(context)); - first.setOnClickListener(getFirstActionListener()); - CharSequence secondActionText = getSecondActionText(context); - if (secondActionText != null) { - Button second = (Button) view.findViewById(R.id.second_action); - second.setText(secondActionText); - second.setOnClickListener(getSecondActionListener()); - second.setVisibility(View.VISIBLE); - } - final View detailGroup = view.findViewById(R.id.detail_group); - final ImageView expandIndicator = (ImageView) view.findViewById(R.id.expand_indicator); - View.OnClickListener expandListener = v -> { - if (detailGroup.getVisibility() == View.VISIBLE) { - expandIndicator.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.ic_expand_more, context.getTheme())); - detailGroup.setVisibility(View.GONE); - } else { - expandIndicator.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.ic_expand_less, context.getTheme())); - detailGroup.setVisibility(View.VISIBLE); - } - }; - view.findViewById(R.id.collapsed_group).setOnClickListener(expandListener); - expandIndicator.setOnClickListener(expandListener); - view.setTag(this); - return view; - } - - public Drawable getIcon(Context context) { - if (iconRes != 0) { - return ResourcesCompat.getDrawable(context.getResources(), iconRes, context.getTheme()); - } - return icon; - } - - public CharSequence getTitle(Context context) { - if (titleRes != 0) { - return context.getString(titleRes); - } - if (titlePluralsRes != 0) { - return context.getResources().getQuantityString(titlePluralsRes, evaluatedPlurals); - } - return title; - } - - public CharSequence getSummary(Context context) { - if (summaryRes != 0) { - return context.getString(summaryRes); - } - if (summaryPluralsRes != 0) { - return context.getResources().getQuantityString(summaryPluralsRes, evaluatedPlurals); - } - return summary; - } - - public View.OnClickListener getFirstActionListener() { - return firstActionListener; - } - - public CharSequence getFirstActionText(Context context) { - if (firstActionTextRes != 0) { - return context.getString(firstActionTextRes); - } - if (firstActionPluralsRes != 0) { - return context.getResources().getQuantityString(firstActionPluralsRes, evaluatedPlurals); - } - return firstActionText; - } - - public View.OnClickListener getSecondActionListener() { - return secondActionListener; - } - - public CharSequence getSecondActionText(Context context) { - if (secondActionTextRes != 0) { - return context.getString(secondActionTextRes); - } - if (secondActionPluralsRes != 0) { - return context.getResources().getQuantityString(secondActionPluralsRes, evaluatedPlurals); - } - return secondActionText; - } - - public synchronized boolean willBeEvaluating() { - if (!evaluating && !evaluated && evaluation != null) { - return evaluating = true; - } else { - return false; - } - } - - public boolean isEvaluated() { - return evaluated || evaluation == null; - } - - public synchronized void evaluate(Context context) { - active = evaluation == null || evaluation.isActive(context); - evaluatedPlurals = evaluation.getPluralsCount(); - evaluated = true; - evaluating = false; - } - - public boolean isActive(Context context) { - if (!evaluated && evaluation != null) evaluate(context); - return active; - } - - public void resetEvaluated() { - this.evaluated = false; - } - - public static abstract class Evaluation { - public abstract boolean isActive(Context context); - - public int getPluralsCount() { - return 1; - } - } - - public static class Builder { - - @DrawableRes - private int iconRes; - private Drawable icon; - @StringRes - private int titleRes; - @PluralsRes - private int titlePluralsRes; - private CharSequence title; - @StringRes - private int summaryRes; - @PluralsRes - private int summaryPluralsRes; - private CharSequence summary; - @StringRes - private int firstActionTextRes; - @PluralsRes - private int firstActionPluralsRes; - private CharSequence firstActionText; - private View.OnClickListener firstActionListener; - @StringRes - private int secondActionTextRes; - @PluralsRes - private int secondActionPluralsRes; - private CharSequence secondActionText; - private View.OnClickListener secondActionListener; - private Evaluation evaluation; - - - public Builder() { - } - - public Builder icon(Drawable val) { - icon = val; - return this; - } - - public Builder icon(@DrawableRes int val) { - iconRes = val; - return this; - } - - public Builder title(CharSequence val) { - title = val; - return this; - } - - public Builder title(@StringRes int val) { - titleRes = val; - return this; - } - - public Builder titlePlurals(@PluralsRes int val) { - titlePluralsRes = val; - return this; - } - - public Builder summary(CharSequence val) { - summary = val; - return this; - } - - public Builder summary(@StringRes int val) { - summaryRes = val; - return this; - } - - public Builder summaryPlurals(@PluralsRes int val) { - summaryPluralsRes = val; - return this; - } - - public Builder firstAction(CharSequence text, View.OnClickListener listener) { - firstActionText = text; - firstActionListener = listener; - return this; - } - - public Builder firstAction(@StringRes int val, View.OnClickListener listener) { - firstActionTextRes = val; - firstActionListener = listener; - return this; - } - - public Builder firstActionPlurals(@PluralsRes int val, View.OnClickListener listener) { - firstActionPluralsRes = val; - firstActionListener = listener; - return this; - } - - public Builder secondAction(CharSequence text, View.OnClickListener listener) { - secondActionText = text; - secondActionListener = listener; - return this; - } - - public Builder secondAction(@StringRes int val, View.OnClickListener listener) { - secondActionTextRes = val; - secondActionListener = listener; - return this; - } - - public Builder secondActionPlurals(@PluralsRes int val, View.OnClickListener listener) { - secondActionPluralsRes = val; - secondActionListener = listener; - return this; - } - - public Builder evaluation(Evaluation evaluation) { - this.evaluation = evaluation; - return this; - } - - public Condition build() { - return new Condition(this); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java deleted file mode 100644 index af07a69..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.util.AttributeSet; -import android.view.View; -import android.view.ViewGroup; -import android.widget.LinearLayout; - -import androidx.fragment.app.DialogFragment; -import androidx.preference.Preference; -import androidx.preference.PreferenceDialogFragmentCompat; -import androidx.preference.PreferenceFragmentCompat; -import androidx.preference.PreferenceViewHolder; - -public class DialogPreference extends androidx.preference.DialogPreference implements PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback { - - private static final String DIALOG_FRAGMENT_TAG = - "android.support.v7.preference.PreferenceFragment.DIALOG"; - - public DialogPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - public DialogPreference(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public DialogPreference(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public DialogPreference(Context context) { - super(context); - } - - protected View onCreateDialogView() { - return null; - } - - /** - * Called when the dialog is dismissed and should be used to save data to - * the {@link SharedPreferences}. - * - * @param positiveResult Whether the positive button was clicked (true), or - * the negative button was clicked or the dialog was canceled (false). - */ - protected void onDialogClosed(boolean positiveResult) { - } - - @Override - public boolean onPreferenceDisplayDialog(PreferenceFragmentCompat caller, Preference pref) { - DialogPreferenceCompatDialogFragment fragment = new DialogPreferenceCompatDialogFragment(); - fragment.setTargetFragment(caller, 0); - fragment.show(caller.getFragmentManager(), DIALOG_FRAGMENT_TAG); - return true; - } - - @Override - public void onBindViewHolder(PreferenceViewHolder view) { - super.onBindViewHolder(view); - - ViewGroup.LayoutParams layoutParams = view.findViewById(R.id.icon_frame).getLayoutParams(); - if (layoutParams instanceof LinearLayout.LayoutParams) { - if (((LinearLayout.LayoutParams) layoutParams).leftMargin < 0) { - ((LinearLayout.LayoutParams) layoutParams).leftMargin = 0; - } - } - } - - public static class DialogPreferenceCompatDialogFragment extends PreferenceDialogFragmentCompat { - - @Override - protected View onCreateDialogView(Context context) { - if (getPreference() instanceof DialogPreference) { - View view = ((DialogPreference) getPreference()).onCreateDialogView(); - if (view != null) return view; - } - return super.onCreateDialogView(context); - } - - @Override - public void onDialogClosed(boolean positiveResult) { - if (getPreference() instanceof DialogPreference) { - ((DialogPreference) getPreference()).onDialogClosed(positiveResult); - } - } - - public static DialogFragment newInstance(String key) { - final DialogPreferenceCompatDialogFragment fragment = new DialogPreferenceCompatDialogFragment(); - final Bundle b = new Bundle(1); - b.putString(ARG_KEY, key); - fragment.setArguments(b); - return fragment; - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java deleted file mode 100644 index 4c6edb8..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.util.AttributeSet; -import android.widget.TextView; - -import androidx.preference.Preference; -import androidx.preference.PreferenceViewHolder; - -public class LongTextPreference extends Preference { - - public LongTextPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - public LongTextPreference(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public LongTextPreference(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public LongTextPreference(Context context) { - super(context); - } - - @Override - public void onBindViewHolder(PreferenceViewHolder holder) { - super.onBindViewHolder(holder); - TextView view = (TextView) holder.findViewById(android.R.id.summary); - if (view != null) { - view.setMaxLines(Integer.MAX_VALUE); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java deleted file mode 100644 index e45d381..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.util.AttributeSet; - -import androidx.core.content.res.TypedArrayUtils; -import androidx.preference.CheckBoxPreference; - -public class RadioButtonPreference extends CheckBoxPreference { - - public RadioButtonPreference(Context context, AttributeSet attrs, int defStyleAttr) { - this(context, attrs, defStyleAttr, 0); - } - - public RadioButtonPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - setWidgetLayoutResource(R.layout.preference_widget_radiobutton); - } - - @SuppressLint("RestrictedApi") - public RadioButtonPreference(Context context, AttributeSet attrs) { - this(context, attrs, TypedArrayUtils.getAttr(context, R.attr.checkBoxPreferenceStyle, - android.R.attr.checkBoxPreferenceStyle)); - } - - public RadioButtonPreference(Context context) { - this(context, null); - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java deleted file mode 100644 index 78abc78..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.os.Bundle; - -import androidx.annotation.Nullable; - -public class ResourceSettingsFragment extends AbstractSettingsFragment { - - public static final String EXTRA_PREFERENCE_RESOURCE = "preferencesResource"; - - protected int preferencesResource; - - @Override - public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) { - Bundle b = getArguments(); - if (b != null) { - preferencesResource = b.getInt(EXTRA_PREFERENCE_RESOURCE, preferencesResource); - } - if (preferencesResource != 0) { - addPreferencesFromResource(preferencesResource); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java deleted file mode 100644 index b404bcb..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * Copyright (C) 2014-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import static android.os.Build.VERSION.SDK_INT; - -import android.content.Context; -import android.os.Build; -import android.os.Parcel; -import android.os.Parcelable; -import android.text.SpannableStringBuilder; -import android.text.TextUtils; -import android.text.style.TextAppearanceSpan; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.CompoundButton; -import android.widget.LinearLayout; -import android.widget.TextView; - -import androidx.appcompat.widget.SwitchCompat; - -import java.util.ArrayList; - -public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedChangeListener, - View.OnClickListener { - - public interface OnSwitchChangeListener { - /** - * Called when the checked state of the Switch has changed. - * - * @param switchView The Switch view whose state has changed. - * @param isChecked The new checked state of switchView. - */ - void onSwitchChanged(SwitchCompat switchView, boolean isChecked); - } - - private final TextAppearanceSpan mSummarySpan; - - private final ToggleSwitch mSwitch; - private final TextView mTextView; - private String mLabel; - private String mSummary; - - private final ArrayList mSwitchChangeListeners = - new ArrayList<>(); - - public SwitchBar(Context context) { - this(context, null); - } - - public SwitchBar(Context context, AttributeSet attrs) { - super(context, attrs); - - LayoutInflater.from(context).inflate(R.layout.switch_bar, this); - - mTextView = (TextView) findViewById(R.id.switch_text); - if (SDK_INT > Build.VERSION_CODES.JELLY_BEAN) { - mTextView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO); - } - mLabel = getResources().getString(R.string.abc_capital_off); - mSummarySpan = new TextAppearanceSpan(context, androidx.appcompat.R.style.TextAppearance_AppCompat_Widget_Switch); - updateText(); - - mSwitch = (ToggleSwitch) findViewById(R.id.switch_widget); - // Prevent onSaveInstanceState() to be called as we are managing the state of the Switch - // on our own - mSwitch.setSaveEnabled(false); - if (SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - mSwitch.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO); - } - - addOnSwitchChangeListener((switchView, isChecked) -> setTextViewLabel(isChecked)); - - setOnClickListener(this); - - // Default is hide - setVisibility(View.GONE); - } - - public void setTextViewLabel(boolean isChecked) { - mLabel = getResources() - .getString(isChecked ? R.string.abc_capital_on : R.string.abc_capital_off); - updateText(); - } - - public void setSummary(String summary) { - mSummary = summary; - updateText(); - } - - private void updateText() { - if (TextUtils.isEmpty(mSummary)) { - mTextView.setText(mLabel); - return; - } - final SpannableStringBuilder ssb = new SpannableStringBuilder(mLabel).append('\n'); - final int start = ssb.length(); - ssb.append(mSummary); - ssb.setSpan(mSummarySpan, start, ssb.length(), 0); - mTextView.setText(ssb); - } - - public void setChecked(boolean checked) { - setTextViewLabel(checked); - mSwitch.setChecked(checked); - } - - public void setCheckedInternal(boolean checked) { - setTextViewLabel(checked); - mSwitch.setCheckedInternal(checked); - } - - public boolean isChecked() { - return mSwitch.isChecked(); - } - - public void setEnabled(boolean enabled) { - super.setEnabled(enabled); - mTextView.setEnabled(enabled); - mSwitch.setEnabled(enabled); - } - - public final ToggleSwitch getSwitch() { - return mSwitch; - } - - public void show() { - if (!isShowing()) { - setVisibility(View.VISIBLE); - mSwitch.setOnCheckedChangeListener(this); - } - } - - public void hide() { - if (isShowing()) { - setVisibility(View.GONE); - mSwitch.setOnCheckedChangeListener(null); - } - } - - public boolean isShowing() { - return (getVisibility() == View.VISIBLE); - } - - @Override - public void onClick(View v) { - final boolean isChecked = !mSwitch.isChecked(); - setChecked(isChecked); - } - - public void propagateChecked(boolean isChecked) { - final int count = mSwitchChangeListeners.size(); - for (int n = 0; n < count; n++) { - mSwitchChangeListeners.get(n).onSwitchChanged(mSwitch, isChecked); - } - } - - @Override - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - propagateChecked(isChecked); - } - - public void addOnSwitchChangeListener(OnSwitchChangeListener listener) { - if (mSwitchChangeListeners.contains(listener)) { - throw new IllegalStateException("Cannot add twice the same OnSwitchChangeListener"); - } - mSwitchChangeListeners.add(listener); - } - - public void removeOnSwitchChangeListener(OnSwitchChangeListener listener) { - if (!mSwitchChangeListeners.contains(listener)) { - throw new IllegalStateException("Cannot remove OnSwitchChangeListener"); - } - mSwitchChangeListeners.remove(listener); - } - - static class SavedState extends BaseSavedState { - boolean checked; - boolean visible; - - SavedState(Parcelable superState) { - super(superState); - } - - /** - * Constructor called from {@link #CREATOR} - */ - private SavedState(Parcel in) { - super(in); - checked = (Boolean) in.readValue(Boolean.class.getClassLoader()); - visible = (Boolean) in.readValue(Boolean.class.getClassLoader()); - } - - @Override - public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); - out.writeValue(checked); - out.writeValue(visible); - } - - @Override - public String toString() { - return "SwitchBar.SavedState{" - + Integer.toHexString(System.identityHashCode(this)) - + " checked=" + checked - + " visible=" + visible + "}"; - } - - public static final Parcelable.Creator CREATOR - = new Parcelable.Creator() { - public SavedState createFromParcel(Parcel in) { - return new SavedState(in); - } - - public SavedState[] newArray(int size) { - return new SavedState[size]; - } - }; - } - - @Override - public Parcelable onSaveInstanceState() { - Parcelable superState = super.onSaveInstanceState(); - - SavedState ss = new SavedState(superState); - ss.checked = mSwitch.isChecked(); - ss.visible = isShowing(); - return ss; - } - - @Override - public void onRestoreInstanceState(Parcelable state) { - SavedState ss = (SavedState) state; - - super.onRestoreInstanceState(ss.getSuperState()); - - mSwitch.setCheckedInternal(ss.checked); - setTextViewLabel(ss.checked); - setVisibility(ss.visible ? View.VISIBLE : View.GONE); - mSwitch.setOnCheckedChangeListener(ss.visible ? this : null); - - requestLayout(); - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java deleted file mode 100644 index b2b33e3..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.os.Bundle; - -import androidx.appcompat.widget.SwitchCompat; - -public abstract class SwitchBarResourceSettingsFragment extends ResourceSettingsFragment implements SwitchBar.OnSwitchChangeListener { - protected SwitchBar switchBar; - private SwitchCompat switchCompat; - private boolean listenerSetup = false; - - @Override - public void onActivityCreated(Bundle savedInstanceState) { - super.onActivityCreated(savedInstanceState); - -// switchBar = activity.getSwitchBar(); -// switchBar.show(); -// switchCompat = switchBar.getSwitch(); - } - - @Override - public void onDestroyView() { - super.onDestroyView(); -// switchBar.hide(); - } - - @Override - public void onResume() { - super.onResume(); - if (!listenerSetup) { -// switchBar.addOnSwitchChangeListener(this); - listenerSetup = true; - } - } - - @Override - public void onPause() { - if (listenerSetup) { -// switchBar.removeOnSwitchChangeListener(this); - listenerSetup = false; - } - super.onPause(); - } - - @Override - public void onSwitchChanged(SwitchCompat switchView, boolean isChecked) { - if (switchView == switchCompat) { - onSwitchBarChanged(isChecked); - } - } - - public abstract void onSwitchBarChanged(boolean isChecked); -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java deleted file mode 100644 index 9624730..0000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * Copyright (C) 2014-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.util.AttributeSet; - -import androidx.appcompat.widget.SwitchCompat; - -@SuppressLint("NewApi") -public class ToggleSwitch extends SwitchCompat { - - private ToggleSwitch.OnBeforeCheckedChangeListener mOnBeforeListener; - - public interface OnBeforeCheckedChangeListener { - boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked); - } - - public ToggleSwitch(Context context) { - super(context); - } - - public ToggleSwitch(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public ToggleSwitch(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public void setOnBeforeCheckedChangeListener(OnBeforeCheckedChangeListener listener) { - mOnBeforeListener = listener; - } - - @Override - public void setChecked(boolean checked) { - if (mOnBeforeListener != null - && mOnBeforeListener.onBeforeCheckedChanged(this, checked)) { - return; - } - super.setChecked(checked); - } - - public void setCheckedInternal(boolean checked) { - super.setChecked(checked); - } -} diff --git a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml deleted file mode 100644 index 62ff063..0000000 --- a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml deleted file mode 100644 index 871f657..0000000 --- a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml b/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml deleted file mode 100644 index 3f7906a..0000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml b/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml deleted file mode 100644 index e563293..0000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml b/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml deleted file mode 100644 index d42bf4a..0000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -