diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..5cd0169 --- /dev/null +++ b/Android.mk @@ -0,0 +1,41 @@ +# 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) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/LICENSE @@ -0,0 +1,177 @@ + + 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 new file mode 100644 index 0000000..4ed90b9 --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,208 @@ +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 new file mode 100644 index 0000000..3f92dfc --- /dev/null +++ b/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,324 @@ +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 new file mode 100644 index 0000000..0e259d4 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +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 28ebdc2..b275135 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ -# microg-gms +# microG Services -MicroG Framework \ No newline at end of file +[![Build status](https://github.com/microg/GmsCore/actions/workflows/build.yml/badge.svg)](https://github.com/microg/GmsCore/actions/workflows/build.yml) + +Translation status + + +microG Services is a FLOSS (Free/Libre Open Source Software) framework to allow applications designed for Google Play Services to run on systems, where Play Services is not available. + +### Please refer to the [wiki](https://github.com/microg/GmsCore/wiki) for downloads and instructions + +## Translations + +If you'd like to help translate microG, take a look at [TRANSLATION](TRANSLATION.md). + + +License +------- + Copyright 2013-2025 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. diff --git a/TRANSLATION.md b/TRANSLATION.md new file mode 100644 index 0000000..5238721 --- /dev/null +++ b/TRANSLATION.md @@ -0,0 +1,11 @@ +# Translating microG +microG [can be translated using Weblate](https://hosted.weblate.org/projects/microg/#languages). Thanks Weblate for free libre hosting! + +Preferably do not use pull requests to submit translations, as merge conflicts can happen easily. If you already made one or did it manually, you can try [importing](https://docs.weblate.org/en/latest/user/files.html#uploading-translations) the files manually into Weblate. + +> [!TIP] +> At the moment, the [microG-UI-tools](play-services-core/microg-ui-tools) component is not available for translation using Weblate. You may want to open a pull request for this. This component stores strings for the "Self-Check" menu and a few other things. + +If your language does not seem to be available for translation, you may have to add it first. If you're not logged in, you'll need to create an account and configure your known languages, once that's set up, you should be able to get working. + +Thanks for your help maintaining accessibility for other users worldwide! We appreciate it. diff --git a/artwork/ic_gamepad.svg b/artwork/ic_gamepad.svg new file mode 100644 index 0000000..9743c3c --- /dev/null +++ b/artwork/ic_gamepad.svg @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/ic_microg_settings.svg b/artwork/ic_microg_settings.svg new file mode 100644 index 0000000..bbb6cf9 --- /dev/null +++ b/artwork/ic_microg_settings.svg @@ -0,0 +1,275 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/ic_recaptcha.svg b/artwork/ic_recaptcha.svg new file mode 100644 index 0000000..6c80728 --- /dev/null +++ b/artwork/ic_recaptcha.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/styles/README.md b/artwork/styles/README.md new file mode 100644 index 0000000..9dcbe1e --- /dev/null +++ b/artwork/styles/README.md @@ -0,0 +1,73 @@ +## The files + +* `style-microg-normal-openmaptiles.json` is a pure OpenMapTiles schema version of microG's custom style. The sources are set to Stadia but could be modified to be used with another schema-compliant vendor, e.g. MapTiler. +* `style-microg-normal-stadia.json` is a variant with Stadia custom layers. +* `style-microg-normal-mapbox.json` is a historic, unmaintained variant for use with Mapbox. +* `style-microg-satellite-*.json` is the same, but with a satellite layer (the stadia variant is almost pure openmaptiles, but openmaptiles does not specify a satellite layer). +* `style-stadia-outdoors.json` is identical to Stadia's Outdoors style, but with added microG metadata. + +* `sprite_sources` files can be generated to a single sprite file as found in the app's assets using `spreet` (see below). +* PBF files for fonts can be generated using `build_pbf_glyphs` from the `fonts` folder. + +## Resources + +### For creating styles + +* Tool: https://maputnik.github.io/ +* Style spec: https://maplibre.org/maplibre-style-spec/ + * https://maplibre.org/maplibre-style-spec/expressions/ +* Style schema: **https://openmaptiles.org/schema/** +* Schema tileset explorer (requires maptiler login): https://cloud.maptiler.com/tiles/v3-openmaptiles/ + +#### Vendor-specific +* Mapbox + * https://docs.mapbox.com/data/tilesets/reference/mapbox-streets-v8/ +* Stadia + * https://docs.stadiamaps.com/custom-styles/ + * https://docs.stadiamaps.com/tilesets/ + +### For converting assets + +* https://github.com/flother/spreet +* https://github.com/stadiamaps/sdf_font_tools/tree/main/build_pbf_glyphs + + +Commands: + +``` +$ cp style-microg-{satellite,normal}-{mapbox,stadia}.json style-stadia-outdoors.json style-mapbox-outdoors-v12.json ../../play-services-maps-core-mapbox/src/main/assets/ +$ spreet sprite_sources/ ../../play-services-maps-core-mapbox/src/main/assets/sprites +$ spreet --retina sprite_sources/ ../../play-services-maps-core-mapbox/src/main/assets/sprites@2x +$ build_pbf_glyphs --overwrite -c fonts/combinations.json fonts/ ../../play-services-maps-core-mapbox/src/main/assets +$ rm -r ../../play-services-maps-core-mapbox/src/main/assets/OpenSans\ Regular # remove temporary files +``` + +* We combine Open Sans Regular with Roboto Regular so that no glyphs are missing. +* A symbolic link in the assets folder points from the font stack specification "Open Sans Regular,Arial Unicode MS Regular" to "Roboto Regular". It is unclear why MapLibre sometimes tries to access this font and fails rendering entire tiles if it is not present. + +The assets are referenced using `asset://` in the style. For using Maputnik, it may be convenient to set the glyphs and sprites source to these Mapbox-hosted sources: + +``` + "sprite": "mapbox://sprites/microg/cjui4020201oo1fmca7yuwbor/8fkcj5fgn4mftlzuak3guz1f9", + "glyphs": "mapbox://fonts/microg/{fontstack}/{range}.pbf", +``` + +## Legal + +* normal and satellite microG styles based on Mapbox Basic, part of the Mapbox Open Styles, licensed under + * Style code: BSD license + * Style virtual features / design: CC BY 3.0 + * Reference: https://github.com/mapbox/mapbox-gl-styles/blob/master/LICENSE.md +* derivation created by larma +* derivation created by /e/ foundation +* makes use of snippets from [Stadia's variant of OSM Bright](https://docs.stadiamaps.com/map-styles/osm-bright/), also a derivation of Mapbox Open Styles + * Style code: BSD 3-Clause License + * Style design: CC-BY 4.0 + * Reference: https://stadiamaps.com/attribution/ +* fonts: Roboto family, licensed Apache 2.0, https://fonts.google.com/specimen/Roboto/about + +* outdoor style based on https://docs.stadiamaps.com/map-styles/outdoors/#__tabbed_1_2 + * Style code: BSD 3-Clause License + * Style design: CC-BY 4.0 + * Reference: https://stadiamaps.com + diff --git a/artwork/styles/fonts/OpenSans Regular.ttf b/artwork/styles/fonts/OpenSans Regular.ttf new file mode 100644 index 0000000..29e9e60 Binary files /dev/null and b/artwork/styles/fonts/OpenSans Regular.ttf differ diff --git a/artwork/styles/fonts/Roboto Bold.ttf b/artwork/styles/fonts/Roboto Bold.ttf new file mode 100644 index 0000000..43da14d Binary files /dev/null and b/artwork/styles/fonts/Roboto Bold.ttf differ diff --git a/artwork/styles/fonts/Roboto Medium.ttf b/artwork/styles/fonts/Roboto Medium.ttf new file mode 100644 index 0000000..ac0f908 Binary files /dev/null and b/artwork/styles/fonts/Roboto Medium.ttf differ diff --git a/artwork/styles/fonts/Roboto Regular.ttf b/artwork/styles/fonts/Roboto Regular.ttf new file mode 100644 index 0000000..ddf4bfa Binary files /dev/null and b/artwork/styles/fonts/Roboto Regular.ttf differ diff --git a/artwork/styles/fonts/combinations.json b/artwork/styles/fonts/combinations.json new file mode 100644 index 0000000..f2375cf --- /dev/null +++ b/artwork/styles/fonts/combinations.json @@ -0,0 +1 @@ +{"Roboto Regular": ["Roboto Regular", "OpenSans Regular"]} diff --git a/artwork/styles/sprite_sources/capital.svg b/artwork/styles/sprite_sources/capital.svg new file mode 100644 index 0000000..5a02743 --- /dev/null +++ b/artwork/styles/sprite_sources/capital.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/city.svg b/artwork/styles/sprite_sources/city.svg new file mode 100644 index 0000000..5b2d7b9 --- /dev/null +++ b/artwork/styles/sprite_sources/city.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic.svg b/artwork/styles/sprite_sources/poi_generic.svg new file mode 100644 index 0000000..cc152d7 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic_blue.svg b/artwork/styles/sprite_sources/poi_generic_blue.svg new file mode 100644 index 0000000..af273c4 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic_blue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic_green.svg b/artwork/styles/sprite_sources/poi_generic_green.svg new file mode 100644 index 0000000..3513b38 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic_green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic_orange.svg b/artwork/styles/sprite_sources/poi_generic_orange.svg new file mode 100644 index 0000000..297cc03 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic_orange.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic_purple.svg b/artwork/styles/sprite_sources/poi_generic_purple.svg new file mode 100644 index 0000000..7b2e944 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic_purple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic_red.svg b/artwork/styles/sprite_sources/poi_generic_red.svg new file mode 100644 index 0000000..cc2c315 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic_red.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_generic_teal.svg b/artwork/styles/sprite_sources/poi_generic_teal.svg new file mode 100644 index 0000000..43a64e2 --- /dev/null +++ b/artwork/styles/sprite_sources/poi_generic_teal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_grocery.svg b/artwork/styles/sprite_sources/poi_grocery.svg new file mode 100644 index 0000000..5f30dea --- /dev/null +++ b/artwork/styles/sprite_sources/poi_grocery.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_lodging.svg b/artwork/styles/sprite_sources/poi_lodging.svg new file mode 100644 index 0000000..fb6ff1e --- /dev/null +++ b/artwork/styles/sprite_sources/poi_lodging.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_museum.svg b/artwork/styles/sprite_sources/poi_museum.svg new file mode 100644 index 0000000..906343e --- /dev/null +++ b/artwork/styles/sprite_sources/poi_museum.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_res.svg b/artwork/styles/sprite_sources/poi_res.svg new file mode 100644 index 0000000..877041a --- /dev/null +++ b/artwork/styles/sprite_sources/poi_res.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_restaurant.svg b/artwork/styles/sprite_sources/poi_restaurant.svg new file mode 100644 index 0000000..877041a --- /dev/null +++ b/artwork/styles/sprite_sources/poi_restaurant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/poi_theatre.svg b/artwork/styles/sprite_sources/poi_theatre.svg new file mode 100644 index 0000000..89df60b --- /dev/null +++ b/artwork/styles/sprite_sources/poi_theatre.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_de-motorway_2.svg b/artwork/styles/sprite_sources/shield_de-motorway_2.svg new file mode 100644 index 0000000..f746743 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_de-motorway_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_de-motorway_3.svg b/artwork/styles/sprite_sources/shield_de-motorway_3.svg new file mode 100644 index 0000000..9617161 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_de-motorway_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-blue_2.svg b/artwork/styles/sprite_sources/shield_rectangle-blue_2.svg new file mode 100644 index 0000000..035f372 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-blue_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-blue_3.svg b/artwork/styles/sprite_sources/shield_rectangle-blue_3.svg new file mode 100644 index 0000000..e7499b9 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-blue_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-blue_4.svg b/artwork/styles/sprite_sources/shield_rectangle-blue_4.svg new file mode 100644 index 0000000..1fe0ea2 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-blue_4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-blue_5.svg b/artwork/styles/sprite_sources/shield_rectangle-blue_5.svg new file mode 100644 index 0000000..9d813a9 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-blue_5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-blue_6.svg b/artwork/styles/sprite_sources/shield_rectangle-blue_6.svg new file mode 100644 index 0000000..5ca3733 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-blue_6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-green_2.svg b/artwork/styles/sprite_sources/shield_rectangle-green_2.svg new file mode 100644 index 0000000..4fb48ad --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-green_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-green_3.svg b/artwork/styles/sprite_sources/shield_rectangle-green_3.svg new file mode 100644 index 0000000..172b314 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-green_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-green_4.svg b/artwork/styles/sprite_sources/shield_rectangle-green_4.svg new file mode 100644 index 0000000..bedbdf1 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-green_4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-red_2.svg b/artwork/styles/sprite_sources/shield_rectangle-red_2.svg new file mode 100644 index 0000000..ece73c6 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-red_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-red_3.svg b/artwork/styles/sprite_sources/shield_rectangle-red_3.svg new file mode 100644 index 0000000..9c93afd --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-red_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-white_2.svg b/artwork/styles/sprite_sources/shield_rectangle-white_2.svg new file mode 100644 index 0000000..c4cdc1f --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-white_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-white_3.svg b/artwork/styles/sprite_sources/shield_rectangle-white_3.svg new file mode 100644 index 0000000..69aa539 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-white_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-white_4.svg b/artwork/styles/sprite_sources/shield_rectangle-white_4.svg new file mode 100644 index 0000000..2c85468 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-white_4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-white_5.svg b/artwork/styles/sprite_sources/shield_rectangle-white_5.svg new file mode 100644 index 0000000..c9e1658 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-white_5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-white_6.svg b/artwork/styles/sprite_sources/shield_rectangle-white_6.svg new file mode 100644 index 0000000..b61184c --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-white_6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-yellow_2.svg b/artwork/styles/sprite_sources/shield_rectangle-yellow_2.svg new file mode 100644 index 0000000..4a6d5bd --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-yellow_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_rectangle-yellow_3.svg b/artwork/styles/sprite_sources/shield_rectangle-yellow_3.svg new file mode 100644 index 0000000..9beb86f --- /dev/null +++ b/artwork/styles/sprite_sources/shield_rectangle-yellow_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_us-interstate_2.svg b/artwork/styles/sprite_sources/shield_us-interstate_2.svg new file mode 100644 index 0000000..31aed1f --- /dev/null +++ b/artwork/styles/sprite_sources/shield_us-interstate_2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_us-interstate_3.svg b/artwork/styles/sprite_sources/shield_us-interstate_3.svg new file mode 100644 index 0000000..54de117 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_us-interstate_3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/sprite_sources/shield_us-interstate_4.svg b/artwork/styles/sprite_sources/shield_us-interstate_4.svg new file mode 100644 index 0000000..22bdfd9 --- /dev/null +++ b/artwork/styles/sprite_sources/shield_us-interstate_4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/artwork/styles/style-mapbox-outdoors-v12.json b/artwork/styles/style-mapbox-outdoors-v12.json new file mode 100644 index 0000000..21c4d40 --- /dev/null +++ b/artwork/styles/style-mapbox-outdoors-v12.json @@ -0,0 +1,13845 @@ +{ + "name": "Mapbox Outdoors", + "sprite": "mapbox://sprites/mapbox/outdoors-v12", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "center": [ + 9.1, + 42.2 + ], + "zoom": 7.5, + "fog": { + "range": [ + 1, + 20 + ], + "color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 4, + "hsl(200, 100%, 100%)", + 6, + "hsl(200, 50%, 90%)" + ], + "high-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 4, + "hsl(200, 100%, 60%)", + 6, + "hsl(310, 60%, 80%)" + ], + "space-color": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 4, + "hsl(205, 10%, 10%)", + 6, + "hsl(205, 60%, 50%)" + ], + "horizon-blend": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 4, + 0.01, + 6, + 0.1 + ], + "star-intensity": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 4, + 0.1, + 6, + 0 + ] + }, + "projection": { + "name": "globe" + }, + "visibility": "public", + "version": 8, + "layers": [ + { + "id": "land", + "type": "background", + "layout": {}, + "minzoom": 0, + "paint": { + "background-color": "hsl(60, 20%, 85%)" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, land", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "landcover", + "type": "fill", + "source": "composite", + "source-layer": "landcover", + "minzoom": 0, + "maxzoom": 12, + "layout": {}, + "paint": { + "fill-color": [ + "match", + [ + "get", + "class" + ], + "wood", + "hsla(103, 50%, 60%, 0.8)", + "scrub", + "hsla(98, 47%, 68%, 0.6)", + "crop", + "hsla(68, 55%, 70%, 0.6)", + "grass", + "hsla(98, 50%, 74%, 0.6)", + "snow", + "hsl(205, 45%, 95%)", + "hsl(98, 48%, 67%)" + ], + "fill-opacity": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 8, + 0.8, + 12, + 0 + ], + "fill-antialias": false + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, land", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "national-park", + "type": "fill", + "source": "composite", + "source-layer": "landuse_overlay", + "minzoom": 5, + "filter": [ + "==", + [ + "get", + "class" + ], + "national_park" + ], + "layout": {}, + "paint": { + "fill-color": "hsl(98, 38%, 68%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 0, + 6, + 0.6, + 12, + 0.2 + ] + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, land", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "national-park_tint-band", + "type": "line", + "source": "composite", + "source-layer": "landuse_overlay", + "minzoom": 9, + "filter": [ + "==", + [ + "get", + "class" + ], + "national_park" + ], + "layout": {}, + "paint": { + "line-color": "hsl(98, 38%, 68%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 9, + 1, + 14, + 8 + ], + "line-blur": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 9, + 1, + 14, + 8 + ] + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, land", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "landuse", + "type": "fill", + "source": "composite", + "source-layer": "landuse", + "minzoom": 5, + "filter": [ + "all", + [ + ">=", + [ + "to-number", + [ + "get", + "sizerank" + ] + ], + 0 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "agriculture", + "wood", + "grass", + "scrub", + "glacier", + "pitch", + "sand" + ], + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + "residential", + [ + "step", + [ + "zoom" + ], + true, + 10, + false + ], + [ + "park", + "airport" + ], + [ + "step", + [ + "zoom" + ], + false, + 8, + [ + "case", + [ + "==", + [ + "get", + "sizerank" + ], + 1 + ], + true, + false + ], + 10, + true + ], + [ + "facility", + "industrial" + ], + [ + "step", + [ + "zoom" + ], + false, + 12, + true + ], + "rock", + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + "cemetery", + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + "school", + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + "hospital", + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + "commercial_area", + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + false + ], + [ + "<=", + [ + "-", + [ + "to-number", + [ + "get", + "sizerank" + ] + ], + [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0, + 18, + 14 + ] + ], + 14 + ] + ], + "layout": {}, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + [ + "match", + [ + "get", + "class" + ], + "wood", + "hsla(103, 50%, 60%, 0.8)", + "scrub", + "hsla(98, 47%, 68%, 0.6)", + "agriculture", + "hsla(98, 50%, 74%, 0.6)", + "park", + [ + "match", + [ + "get", + "type" + ], + [ + "garden", + "playground", + "zoo" + ], + "hsl(98, 38%, 68%)", + "hsl(98, 55%, 70%)" + ], + "grass", + "hsla(98, 50%, 74%, 0.6)", + "airport", + "hsl(230, 40%, 82%)", + "cemetery", + "hsl(98, 45%, 75%)", + "glacier", + "hsl(205, 45%, 95%)", + "hospital", + "hsl(20, 45%, 82%)", + "pitch", + "hsl(88, 65%, 75%)", + "sand", + "hsl(69, 60%, 72%)", + "rock", + "hsl(60, 0%, 85%)", + "school", + "hsl(40, 45%, 78%)", + "commercial_area", + "hsl(55, 45%, 85%)", + "residential", + "hsl(60, 7%, 87%)", + [ + "facility", + "industrial" + ], + "hsl(230, 20%, 85%)", + "hsl(60, 22%, 72%)" + ], + 16, + [ + "match", + [ + "get", + "class" + ], + "wood", + "hsla(103, 50%, 60%, 0.8)", + "scrub", + "hsla(98, 47%, 68%, 0.6)", + "agriculture", + "hsla(98, 50%, 74%, 0.6)", + "park", + [ + "match", + [ + "get", + "type" + ], + [ + "garden", + "playground", + "zoo" + ], + "hsl(98, 38%, 68%)", + "hsl(98, 55%, 70%)" + ], + "grass", + "hsla(98, 50%, 74%, 0.6)", + "airport", + "hsl(230, 40%, 82%)", + "cemetery", + "hsl(98, 45%, 75%)", + "glacier", + "hsl(205, 45%, 95%)", + "hospital", + "hsl(20, 45%, 82%)", + "pitch", + "hsl(88, 65%, 75%)", + "sand", + "hsl(69, 60%, 72%)", + "rock", + "hsla(60, 0%, 85%, 0.5)", + "school", + "hsl(40, 45%, 78%)", + "commercial_area", + "hsla(55, 45%, 85%, 0.5)", + [ + "facility", + "industrial" + ], + "hsl(230, 20%, 85%)", + "hsl(60, 22%, 72%)" + ] + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + [ + "match", + [ + "get", + "class" + ], + "residential", + 0.8, + 0.2 + ], + 10, + [ + "match", + [ + "get", + "class" + ], + "residential", + 0, + 1 + ] + ], + "fill-antialias": false + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, land", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "pitch-outline", + "type": "line", + "source": "composite", + "source-layer": "landuse", + "minzoom": 15, + "filter": [ + "==", + [ + "get", + "class" + ], + "pitch" + ], + "layout": {}, + "paint": { + "line-color": "hsl(88, 60%, 65%)" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, land", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "waterway-shadow", + "type": "line", + "source": "composite", + "source-layer": "waterway", + "minzoom": 10, + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 11, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 11, + "round" + ] + }, + "paint": { + "line-color": "hsl(224, 79%, 69%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.3 + ], + [ + "zoom" + ], + 9, + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river" + ], + 0.1, + 0 + ], + 20, + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river" + ], + 8, + 3 + ] + ], + "line-translate": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 7, + [ + "literal", + [ + 0, + 0 + ] + ], + 16, + [ + "literal", + [ + -1, + -1 + ] + ] + ], + "line-translate-anchor": "viewport", + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 0, + 8.5, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "water-shadow", + "type": "fill", + "source": "composite", + "source-layer": "water", + "minzoom": 10, + "layout": {}, + "paint": { + "fill-color": "hsl(224, 79%, 69%)", + "fill-translate": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 7, + [ + "literal", + [ + 0, + 0 + ] + ], + 16, + [ + "literal", + [ + -1, + -1 + ] + ] + ], + "fill-translate-anchor": "viewport" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "waterway", + "type": "line", + "source": "composite", + "source-layer": "waterway", + "minzoom": 8, + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 11, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 11, + "round" + ] + }, + "paint": { + "line-color": "hsl(205, 75%, 70%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.3 + ], + [ + "zoom" + ], + 9, + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river" + ], + 0.1, + 0 + ], + 20, + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river" + ], + 8, + 3 + ] + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 0, + 8.5, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "water", + "type": "fill", + "source": "composite", + "source-layer": "water", + "minzoom": 0, + "layout": {}, + "paint": { + "fill-color": "hsl(205, 75%, 70%)" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "water-depth", + "type": "fill", + "source": "composite", + "source-layer": "depth", + "minzoom": 0, + "maxzoom": 8, + "layout": {}, + "paint": { + "fill-antialias": false, + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + [ + "interpolate", + [ + "linear" + ], + [ + "get", + "min_depth" + ], + 0, + "hsla(205, 75%, 70%, 0.35)", + 200, + "hsla(205, 75%, 63%, 0.35)", + 7000, + "hsla(205, 75%, 56%, 0.35)" + ], + 8, + [ + "interpolate", + [ + "linear" + ], + [ + "get", + "min_depth" + ], + 0, + "hsla(205, 75%, 70%, 0)", + 200, + "hsla(205, 75%, 63%, 0)", + 7000, + "hsla(205, 75%, 53%, 0)" + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "wetland", + "type": "fill", + "source": "composite", + "source-layer": "landuse_overlay", + "minzoom": 5, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "wetland", + "wetland_noveg" + ], + true, + false + ], + "paint": { + "fill-color": "hsl(194, 38%, 74%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 0.25, + 10.5, + 0.15 + ] + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "wetland-pattern", + "type": "fill", + "source": "composite", + "source-layer": "landuse_overlay", + "minzoom": 5, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "wetland", + "wetland_noveg" + ], + true, + false + ], + "paint": { + "fill-color": "hsl(194, 38%, 74%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 0, + 10.5, + 1 + ], + "fill-pattern": "wetland", + "fill-translate-anchor": "viewport" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, water", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "hillshade", + "type": "fill", + "source": "composite", + "source-layer": "hillshade", + "filter": [ + "all", + [ + "step", + [ + "zoom" + ], + [ + "==", + [ + "get", + "class" + ], + "shadow" + ], + 11, + true + ], + [ + "match", + [ + "get", + "level" + ], + 89, + true, + 78, + [ + "step", + [ + "zoom" + ], + false, + 5, + true + ], + 67, + [ + "step", + [ + "zoom" + ], + false, + 9, + true + ], + 56, + [ + "step", + [ + "zoom" + ], + false, + 6, + true + ], + 94, + [ + "step", + [ + "zoom" + ], + false, + 11, + true + ], + 90, + [ + "step", + [ + "zoom" + ], + false, + 12, + true + ], + false + ] + ], + "minzoom": 0, + "maxzoom": 16, + "layout": {}, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + "shadow", + "hsla(66, 38%, 17%, 0.08)", + "hsla(60, 20%, 95%, 0.14)" + ], + 16, + [ + "match", + [ + "get", + "class" + ], + "shadow", + "hsla(66, 38%, 17%, 0)", + "hsla(60, 20%, 95%, 0)" + ] + ], + "fill-antialias": false + }, + "metadata": { + "mapbox:featureComponent": "terrain", + "mapbox:group": "Terrain, land", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "contour-line", + "type": "line", + "source": "composite", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!=", + [ + "get", + "index" + ], + -1 + ], + "layout": {}, + "paint": { + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + [ + "match", + [ + "get", + "index" + ], + [ + 1, + 2 + ], + 0.15, + 0.3 + ], + 13, + [ + "match", + [ + "get", + "index" + ], + [ + 1, + 2 + ], + 0.3, + 0.5 + ] + ], + "line-color": "hsl(60, 10%, 35%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + [ + "match", + [ + "get", + "index" + ], + [ + 1, + 2 + ], + 0.5, + 0.6 + ], + 16, + [ + "match", + [ + "get", + "index" + ], + [ + 1, + 2 + ], + 0.8, + 1.2 + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "terrain", + "mapbox:group": "Terrain, land", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "land-structure-polygon", + "type": "fill", + "source": "composite", + "source-layer": "structure", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "land" + ], + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ] + ], + "layout": {}, + "paint": { + "fill-color": "hsl(60, 20%, 85%)" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, built", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "land-structure-line", + "type": "line", + "source": "composite", + "source-layer": "structure", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "land" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": "square" + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.99 + ], + [ + "zoom" + ], + 14, + 0.75, + 20, + 40 + ], + "line-color": "hsl(60, 20%, 85%)" + }, + "metadata": { + "mapbox:featureComponent": "land-and-water", + "mapbox:group": "Land & water, built", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "aeroway-polygon", + "type": "fill", + "source": "composite", + "source-layer": "aeroway", + "minzoom": 11, + "filter": [ + "all", + [ + "match", + [ + "get", + "type" + ], + [ + "runway", + "taxiway", + "helipad" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ] + ], + "paint": { + "fill-color": "hsl(230, 36%, 74%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 0, + 11, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, built", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "aeroway-line", + "type": "line", + "source": "composite", + "source-layer": "aeroway", + "minzoom": 9, + "filter": [ + "==", + [ + "geometry-type" + ], + "LineString" + ], + "paint": { + "line-color": "hsl(230, 36%, 74%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 9, + [ + "match", + [ + "get", + "type" + ], + "runway", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "type" + ], + "runway", + 80, + 20 + ] + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 0, + 11, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, built", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "building", + "type": "fill", + "source": "composite", + "source-layer": "building", + "minzoom": 15, + "filter": [ + "all", + [ + "!=", + [ + "get", + "type" + ], + "building:part" + ], + [ + "==", + [ + "get", + "underground" + ], + "false" + ] + ], + "layout": {}, + "paint": { + "fill-color": "hsl(50, 15%, 75%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 1 + ], + "fill-outline-color": "hsl(60, 10%, 65%)" + }, + "metadata": { + "mapbox:featureComponent": "buildings", + "mapbox:group": "Buildings, built", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "building-underground", + "type": "fill", + "source": "composite", + "source-layer": "building", + "minzoom": 15, + "filter": [ + "all", + [ + "==", + [ + "get", + "underground" + ], + "true" + ], + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ] + ], + "layout": {}, + "paint": { + "fill-color": "hsl(260, 60%, 85%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 0.5 + ] + }, + "metadata": { + "mapbox:featureComponent": "buildings", + "mapbox:group": "Buildings, built", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-minor-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "track" + ], + true, + "service", + [ + "step", + [ + "zoom" + ], + false, + 14, + true + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 3%, 57%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 18, + 10, + 22, + 100 + ], + "line-dasharray": [ + 3, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-street-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 3%, 57%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ], + "line-dasharray": [ + 3, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-minor-link-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "secondary_link", + "tertiary_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.4, + 18, + 18, + 22, + 180 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 11, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-secondary-tertiary-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 11, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 3%, 57%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0, + 18, + 26, + 22, + 260 + ], + "line-dasharray": [ + 3, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-primary-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 10, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 3%, 57%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 28, + 22, + 280 + ], + "line-dasharray": [ + 3, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-major-link-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ], + "line-dasharray": [ + 3, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-motorway-trunk-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ], + "line-dasharray": [ + 3, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels-case", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-path-trail", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "hiking", + "mountain_bike", + "trail" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(60, 32%, 90%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 5, + 0.5 + ] + ], + 15, + [ + "literal", + [ + 4, + 0.5 + ] + ], + 16, + [ + "literal", + [ + 4, + 0.45 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "tunnel-path-cycleway-piste", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "cycleway", + "piste" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(60, 32%, 90%)", + "line-dasharray": [ + 10, + 0 + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-path", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(60, 32%, 90%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 1, + 0.5 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-steps", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], + "line-color": "hsl(60, 32%, 90%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 0.3, + 0.3 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-pedestrian", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-construction", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "construction" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 20, + 22, + 200 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", + [ + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", + [ + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", + [ + 0.15, + 0.15 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-minor", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "track" + ], + true, + "service", + [ + "step", + [ + "zoom" + ], + false, + 14, + true + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 18, + 10, + 22, + 100 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(60, 22%, 80%)", + "hsl(0, 0%, 95%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-minor-link", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "secondary_link", + "tertiary_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 13, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 13, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.4, + 18, + 18, + 22, + 180 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-major-link", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(15, 100%, 85%)", + "hsl(35, 78%, 85%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-street", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(60, 22%, 80%)", + "hsl(0, 0%, 95%)" + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-street-low", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "maxzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-secondary-tertiary", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0, + 18, + 26, + 22, + 260 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-primary", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 28, + 22, + 280 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-motorway-trunk", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(15, 100%, 85%)", + "hsl(35, 78%, 85%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "tunnel-oneway-arrow-blue", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "street", + "street_limited", + "tertiary" + ], + true, + false + ], + 16, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "primary_link", + "secondary_link", + "tertiary_link", + "service", + "track" + ], + true, + false + ] + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-small", + 18, + "oneway-large" + ], + "symbol-spacing": 200, + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "tunnel-oneway-arrow-white", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "motorway_link", + "trunk", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-white-small", + 18, + "oneway-white-large" + ], + "symbol-spacing": 200, + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, tunnels", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "cliff", + "type": "line", + "source": "composite", + "source-layer": "structure", + "minzoom": 15, + "filter": [ + "==", + [ + "get", + "class" + ], + "cliff" + ], + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 15.25, + 1 + ], + "line-width": 10, + "line-pattern": "cliff" + }, + "metadata": { + "mapbox:featureComponent": "terrain", + "mapbox:group": "Terrain, surface", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "ferry", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 8, + "filter": [ + "==", + [ + "get", + "type" + ], + "ferry" + ], + "paint": { + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(214, 68%, 63%)", + 17, + "hsl(239, 68%, 63%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 13, + [ + "literal", + [ + 12, + 4 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, ferries", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "ferry-auto", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 8, + "filter": [ + "==", + [ + "get", + "type" + ], + "ferry_auto" + ], + "paint": { + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(214, 68%, 63%)", + 17, + "hsl(239, 68%, 63%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, ferries", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-pedestrian-polygon-fill", + "type": "fill", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path", + "pedestrian" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "case", + [ + "has", + "layer" + ], + [ + ">=", + [ + "get", + "layer" + ], + 0 + ], + true + ], + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ] + ], + "paint": { + "fill-color": "hsl(60, 20%, 85%)" + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-pedestrian-polygon-pattern", + "type": "fill", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path", + "pedestrian" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "case", + [ + "has", + "layer" + ], + [ + ">=", + [ + "get", + "layer" + ], + 0 + ], + true + ], + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ] + ], + "paint": { + "fill-pattern": "pedestrian-polygon", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 0, + 17, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-path-bg", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "step", + [ + "zoom" + ], + [ + "!", + [ + "match", + [ + "get", + "type" + ], + [ + "steps", + "sidewalk", + "crossing" + ], + true, + false + ] + ], + 16, + [ + "!=", + [ + "get", + "type" + ], + "steps" + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 18, + 7 + ], + "line-color": [ + "match", + [ + "get", + "type" + ], + "piste", + "hsl(215, 80%, 48%)", + [ + "mountain_bike", + "hiking", + "trail", + "cycleway", + "footway", + "path", + "bridleway" + ], + "hsl(35, 80%, 48%)", + "hsl(60, 1%, 64%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-steps-bg", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": "round" + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 17, + 4.6, + 18, + 7 + ], + "line-color": "hsl(35, 80%, 48%)", + "line-opacity": 0.75 + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-pedestrian-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "case", + [ + "has", + "layer" + ], + [ + ">=", + [ + "get", + "layer" + ], + 0 + ], + true + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 14.5 + ], + "line-color": "hsl(60, 10%, 70%)" + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-path-trail", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "hiking", + "mountain_bike", + "trail" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 5, + 0.5 + ] + ], + 15, + [ + "literal", + [ + 4, + 0.5 + ] + ], + 16, + [ + "literal", + [ + 4, + 0.45 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-path-cycleway-piste", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "cycleway", + "piste" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + 10, + 0 + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-path", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "step", + [ + "zoom" + ], + [ + "!", + [ + "match", + [ + "get", + "type" + ], + [ + "steps", + "sidewalk", + "crossing" + ], + true, + false + ] + ], + 16, + [ + "!=", + [ + "get", + "type" + ], + "steps" + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 13, + 0.5, + 14, + 1, + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 4, + 0.3 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 0.3 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 1, + 0.25 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-steps", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": "round" + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 0.3, + 0.3 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-pedestrian", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "case", + [ + "has", + "layer" + ], + [ + ">=", + [ + "get", + "layer" + ], + 0 + ], + true + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "golf-hole-line", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "==", + [ + "get", + "class" + ], + "golf" + ], + "paint": { + "line-color": "hsl(98, 26%, 56%)" + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., surface", + "microg:gms-type-feature": "poi.attraction", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-polygon", + "type": "fill", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk", + "trunk_link", + "street", + "street_limited", + "track", + "service" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ] + ], + "paint": { + "fill-color": "hsl(0, 0%, 95%)", + "fill-outline-color": "hsl(60, 10%, 70%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "turning-feature-outline", + "type": "circle", + "source": "composite", + "source-layer": "road", + "minzoom": 15, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "turning_circle", + "turning_loop" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ] + ], + "paint": { + "circle-radius": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 4.5, + 16, + 8, + 18, + 20, + 22, + 200 + ], + "circle-color": "hsl(0, 0%, 95%)", + "circle-stroke-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0.8, + 16, + 1.2, + 18, + 2 + ], + "circle-stroke-color": "hsl(60, 10%, 70%)", + "circle-pitch-alignment": "map" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-minor-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "track" + ], + true, + "service", + [ + "step", + [ + "zoom" + ], + false, + 14, + true + ], + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "track", + "hsl(35, 80%, 48%)", + "hsl(60, 10%, 70%)" + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 18, + 10, + 22, + 100 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-street-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-minor-link-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "secondary_link", + "tertiary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.4, + 18, + 18, + 22, + 180 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 11, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-secondary-tertiary-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 11, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0, + 18, + 26, + 22, + 260 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-primary-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 10, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 28, + 22, + 280 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-major-link-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 11, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "road-motorway-trunk-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 3, + "filter": [ + "all", + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + 5, + [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ] + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 3.5, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "turning-feature", + "type": "circle", + "source": "composite", + "source-layer": "road", + "minzoom": 15, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "turning_circle", + "turning_loop" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ] + ], + "paint": { + "circle-radius": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 4.5, + 16, + 8, + 18, + 20, + 22, + 200 + ], + "circle-color": "hsl(0, 0%, 95%)", + "circle-pitch-alignment": "map" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-construction", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "construction" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 20, + 22, + 200 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", + [ + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", + [ + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", + [ + 0.15, + 0.15 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-minor", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "track" + ], + true, + "service", + [ + "step", + [ + "zoom" + ], + false, + 14, + true + ], + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 18, + 10, + 22, + 100 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-minor-link", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "secondary_link", + "tertiary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 13, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 13, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.4, + 18, + 18, + 22, + 180 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-major-link", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 13, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 13, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(15, 100%, 75%)", + "hsl(35, 89%, 75%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-street", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(60, 22%, 80%)", + "hsl(0, 0%, 95%)" + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-street-low", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 11, + "maxzoom": 14, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-secondary-tertiary", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 9, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0, + 18, + 26, + 22, + 260 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-primary", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 6, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 28, + 22, + 280 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-motorway-trunk", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 3, + "filter": [ + "all", + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + 5, + [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ] + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 13, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 13, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ], + "line-color": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(15, 88%, 69%)", + "trunk", + "hsl(35, 81%, 59%)", + "hsl(60, 18%, 85%)" + ], + 9, + [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(15, 100%, 75%)", + "hsl(35, 89%, 75%)" + ] + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 3.5, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-rail", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ] + ], + "paint": { + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(75, 25%, 68%)", + 16, + "hsl(60, 0%, 56%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, surface", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "road-rail-tracks", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ] + ], + "paint": { + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(75, 25%, 68%)", + 16, + "hsl(60, 0%, 56%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 4, + 20, + 8 + ], + "line-dasharray": [ + 0.1, + 15 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13.75, + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, surface", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "level-crossing", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "==", + [ + "get", + "class" + ], + "level_crossing" + ], + "layout": { + "icon-image": "level-crossing", + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface-icons", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "road-oneway-arrow-blue", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "oneway" + ], + "true" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + true, + false + ], + 16, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "primary_link", + "secondary_link", + "tertiary_link", + "service", + "track" + ], + true, + false + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-small", + 18, + "oneway-large" + ], + "symbol-spacing": 200, + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface-icons", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "road-oneway-arrow-white", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "oneway" + ], + "true" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-white-small", + 18, + "oneway-white-large" + ], + "symbol-spacing": 200, + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface-icons", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "crosswalks", + "type": "symbol", + "source": "composite", + "source-layer": "structure", + "minzoom": 17, + "filter": [ + "all", + [ + "==", + [ + "get", + "type" + ], + "crosswalk" + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ] + ], + "layout": { + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 0.1, + 18, + 0.2, + 19, + 0.5, + 22, + 1.5 + ], + "icon-image": [ + "step", + [ + "zoom" + ], + "crosswalk-small", + 18, + "crosswalk-large" + ], + "icon-rotate": [ + "get", + "direction" + ], + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, surface-icons", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "gate-fence-hedge", + "type": "line", + "source": "composite", + "source-layer": "structure", + "minzoom": 16, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "gate", + "fence", + "hedge" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": [ + "match", + [ + "get", + "class" + ], + "hedge", + "hsl(98, 32%, 56%)", + "hsl(60, 25%, 63%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 1, + 20, + 3 + ], + "line-opacity": [ + "match", + [ + "get", + "class" + ], + "gate", + 0.5, + 1 + ], + "line-dasharray": [ + 1, + 2, + 5, + 2, + 1, + 2 + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-path-bg", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "step", + [ + "zoom" + ], + [ + "!", + [ + "match", + [ + "get", + "type" + ], + [ + "steps", + "sidewalk", + "crossing" + ], + true, + false + ] + ], + 16, + [ + "!=", + [ + "get", + "type" + ], + "steps" + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 18, + 7 + ], + "line-color": [ + "match", + [ + "get", + "type" + ], + "piste", + "hsl(215, 80%, 48%)", + [ + "mountain_bike", + "hiking", + "trail", + "cycleway", + "footway", + "path", + "bridleway" + ], + "hsl(35, 80%, 48%)", + "hsl(60, 1%, 64%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-steps-bg", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 17, + 4.6, + 18, + 7 + ], + "line-color": "hsl(35, 80%, 48%)", + "line-opacity": 0.75 + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-pedestrian-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 14.5 + ], + "line-color": "hsl(60, 10%, 70%)" + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-path-trail", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "hiking", + "mountain_bike", + "trail" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 5, + 0.5 + ] + ], + 15, + [ + "literal", + [ + 4, + 0.5 + ] + ], + 16, + [ + "literal", + [ + 4, + 0.45 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-path-cycleway-piste", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "cycleway", + "piste" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + 10, + 0 + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-path", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 4, + 0.3 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 0.3 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 1, + 0.25 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-steps", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 0.3, + 0.3 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-pedestrian", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], + "line-color": "hsl(0, 0%, 95%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "gate-label", + "type": "symbol", + "source": "composite", + "source-layer": "structure", + "minzoom": 16, + "filter": [ + "==", + [ + "get", + "class" + ], + "gate" + ], + "layout": { + "icon-image": [ + "match", + [ + "get", + "type" + ], + "gate", + "gate", + "lift_gate", + "lift-gate", + "" + ] + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., barriers-bridges", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "bridge-minor-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "track" + ], + true, + "service", + [ + "step", + [ + "zoom" + ], + false, + 14, + true + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "track", + "hsl(35, 80%, 48%)", + "hsl(60, 10%, 70%)" + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 18, + 10, + 22, + 100 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-street-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "track", + "hsl(35, 80%, 48%)", + "hsl(60, 10%, 70%)" + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-minor-link-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "secondary_link", + "tertiary_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.4, + 18, + 18, + 22, + 180 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 11, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-secondary-tertiary-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 11, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0, + 18, + 26, + 22, + 260 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 10, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-primary-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 10, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 28, + 22, + 280 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 10, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-major-link-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-motorway-trunk-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-construction", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "construction" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 20, + 22, + 200 + ], + "line-color": "hsl(60, 10%, 70%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", + [ + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", + [ + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", + [ + 0.15, + 0.15 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-minor", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "track" + ], + true, + "service", + [ + "step", + [ + "zoom" + ], + false, + 14, + true + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 18, + 10, + 22, + 100 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-minor-link", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "secondary_link", + "tertiary_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.4, + 18, + 18, + 22, + 180 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-major-link", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 13, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(15, 100%, 75%)", + "hsl(35, 89%, 75%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-street", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(60, 22%, 80%)", + "hsl(0, 0%, 95%)" + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-street-low", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "maxzoom": 14, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ], + "line-join": [ + "step", + [ + "zoom" + ], + "miter", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 18, + 20, + 22, + 200 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-secondary-tertiary", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0, + 18, + 26, + 22, + 260 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-primary", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 28, + 22, + 280 + ], + "line-color": "hsl(0, 0%, 95%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-motorway-trunk", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(15, 100%, 75%)", + "hsl(35, 89%, 75%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-major-link-2-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + ">=", + [ + "get", + "layer" + ], + 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.8, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-motorway-trunk-2-case", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + ">=", + [ + "get", + "layer" + ], + 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 22, + 2 + ], + "line-color": "hsl(60, 10%, 82%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "bridge-major-link-2", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + ">=", + [ + "get", + "layer" + ], + 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 13, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.8, + 18, + 20, + 22, + 200 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(15, 100%, 75%)", + "hsl(35, 89%, 75%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-motorway-trunk-2", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + ">=", + [ + "get", + "layer" + ], + 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 14, + "round" + ] + }, + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 3, + 0.8, + 18, + 30, + 22, + 300 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(15, 100%, 75%)", + "hsl(35, 89%, 75%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-oneway-arrow-blue", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + true, + false + ], + 16, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "primary_link", + "secondary_link", + "tertiary_link", + "service", + "track" + ], + true, + false + ] + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-small", + 18, + "oneway-large" + ], + "symbol-spacing": 200, + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "bridge-oneway-arrow-white", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": "oneway-white-small", + "symbol-spacing": 200, + "icon-rotation-alignment": "map", + "icon-allow-overlap": true, + "icon-ignore-placement": true + }, + "paint": {}, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, bridges", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "bridge-rail", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false + ] + ], + "paint": { + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(75, 25%, 68%)", + 16, + "hsl(60, 0%, 56%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, bridges", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "bridge-rail-tracks", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false + ] + ], + "paint": { + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(75, 25%, 68%)", + 16, + "hsl(60, 0%, 56%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 4, + 20, + 8 + ], + "line-dasharray": [ + 0.1, + 15 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13.75, + 0, + 14, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, bridges", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "aerialway", + "type": "line", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "==", + [ + "get", + "class" + ], + "aerialway" + ], + "paint": { + "line-color": "hsl(230, 50%, 60%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 1, + 20, + 2 + ], + "line-dasharray": [ + 4, + 1 + ] + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, elevated", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "admin-1-boundary-bg", + "type": "line", + "source": "composite", + "source-layer": "admin", + "minzoom": 7, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 1 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "paint": { + "line-color": "hsl(350, 90%, 88%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 3, + 12, + 6 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0, + 8, + 0.5 + ], + "line-dasharray": [ + 1, + 0 + ], + "line-blur": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 12, + 3 + ] + }, + "metadata": { + "mapbox:featureComponent": "admin-boundaries", + "mapbox:group": "Administrative boundaries, admin", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "admin-0-boundary-bg", + "type": "line", + "source": "composite", + "source-layer": "admin", + "minzoom": 1, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 0 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "paint": { + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 4, + 12, + 8 + ], + "line-color": "hsl(350, 90%, 88%)", + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 4, + 0.5 + ], + "line-blur": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 12, + 2 + ] + }, + "metadata": { + "mapbox:featureComponent": "admin-boundaries", + "mapbox:group": "Administrative boundaries, admin", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "admin-1-boundary", + "type": "line", + "source": "composite", + "source-layer": "admin", + "minzoom": 2, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 1 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 2, + 0 + ] + ], + 7, + [ + "literal", + [ + 2, + 2, + 6, + 2 + ] + ] + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.3, + 12, + 1.5 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + 0, + 3, + 1 + ], + "line-color": "hsl(350, 30%, 55%)" + }, + "metadata": { + "mapbox:featureComponent": "admin-boundaries", + "mapbox:group": "Administrative boundaries, admin", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "admin-0-boundary", + "type": "line", + "source": "composite", + "source-layer": "admin", + "minzoom": 1, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 0 + ], + [ + "==", + [ + "get", + "disputed" + ], + "false" + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(350, 30%, 50%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.5, + 12, + 2 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 2, + 0 + ] + ], + 7, + [ + "literal", + [ + 2, + 2, + 6, + 2 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "admin-boundaries", + "mapbox:group": "Administrative boundaries, admin", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "admin-0-boundary-disputed", + "type": "line", + "source": "composite", + "source-layer": "admin", + "minzoom": 1, + "filter": [ + "all", + [ + "==", + [ + "get", + "disputed" + ], + "true" + ], + [ + "==", + [ + "get", + "admin_level" + ], + 0 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "paint": { + "line-color": "hsl(350, 30%, 50%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.5, + 12, + 2 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 3, + 2, + 5 + ] + ], + 7, + [ + "literal", + [ + 2, + 1.5 + ] + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "admin-boundaries", + "mapbox:group": "Administrative boundaries, admin", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "contour-label", + "type": "symbol", + "source": "composite", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "any", + [ + "==", + [ + "get", + "index" + ], + 10 + ], + [ + "==", + [ + "get", + "index" + ], + 5 + ] + ], + "layout": { + "text-field": [ + "concat", + [ + "get", + "ele" + ], + " m" + ], + "symbol-placement": "line", + "text-pitch-alignment": "viewport", + "text-max-angle": 25, + "text-padding": 5, + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 9.5, + 20, + 12 + ] + }, + "paint": { + "text-color": "hsl(60, 10%, 35%)", + "text-halo-width": 1, + "text-halo-color": "hsl(60, 10%, 85%)" + }, + "metadata": { + "mapbox:featureComponent": "terrain", + "mapbox:group": "Terrain, terrain-labels", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "building-entrance", + "type": "symbol", + "source": "composite", + "source-layer": "structure", + "minzoom": 18, + "filter": [ + "==", + [ + "get", + "class" + ], + "entrance" + ], + "layout": { + "icon-image": "marker", + "text-field": [ + "get", + "ref" + ], + "text-size": 10, + "text-offset": [ + 0, + -0.5 + ], + "text-font": [ + "DIN Pro Italic", + "Arial Unicode MS Regular" + ] + }, + "paint": { + "text-color": "hsl(60, 8%, 38%)", + "text-halo-color": "hsl(60, 13%, 77%)", + "text-halo-width": 1, + "icon-opacity": 0.4 + }, + "metadata": { + "mapbox:featureComponent": "buildings", + "mapbox:group": "Buildings, building-labels", + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "building-number-label", + "type": "symbol", + "source": "composite", + "source-layer": "housenum_label", + "minzoom": 17, + "layout": { + "text-field": [ + "get", + "house_num" + ], + "text-font": [ + "DIN Pro Italic", + "Arial Unicode MS Regular" + ], + "text-padding": 4, + "text-max-width": 7, + "text-size": 10 + }, + "paint": { + "text-color": "hsl(60, 8%, 38%)", + "text-halo-color": "hsl(60, 13%, 77%)", + "text-halo-width": 1 + }, + "metadata": { + "mapbox:featureComponent": "buildings", + "mapbox:group": "Buildings, building-labels", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "block-number-label", + "type": "symbol", + "source": "composite", + "source-layer": "place_label", + "minzoom": 16, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "settlement_subdivision" + ], + [ + "==", + [ + "get", + "type" + ], + "block" + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "text-font": [ + "DIN Pro Italic", + "Arial Unicode MS Regular" + ], + "text-max-width": 7, + "text-size": 11 + }, + "paint": { + "text-color": "hsl(60, 18%, 44%)", + "text-halo-color": "hsl(60, 17%, 84%)", + "text-halo-width": 0.5, + "text-halo-blur": 0.5 + }, + "metadata": { + "mapbox:featureComponent": "buildings", + "mapbox:group": "Buildings, building-labels", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "road-label", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 10, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + 12, + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "track" + ], + true, + false + ], + 15, + [ + "match", + [ + "get", + "class" + ], + [ + "path", + "pedestrian", + "golf", + "ferry", + "aerialway" + ], + false, + true + ] + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + 10, + [ + "motorway_link", + "trunk_link", + "primary_link", + "secondary_link", + "tertiary_link", + "street", + "street_limited", + "track" + ], + 9, + 6.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + 16, + [ + "motorway_link", + "trunk_link", + "primary_link", + "secondary_link", + "tertiary_link", + "street", + "street_limited", + "track" + ], + 14, + 13 + ] + ], + "text-max-angle": 30, + "text-font": [ + "DIN Pro Regular", + "Arial Unicode MS Regular" + ], + "symbol-placement": "line", + "text-padding": 1, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": 0.01 + }, + "paint": { + "text-color": "hsl(0,0%, 0%)", + "text-halo-color": [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + "hsla(60, 25%, 100%, 0.75)", + "hsl(60, 25%, 100%)" + ], + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, road-labels", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "road-intersection", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 15, + "filter": [ + "all", + [ + "==", + [ + "get", + "class" + ], + "intersection" + ], + [ + "has", + "name" + ] + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "icon-image": "intersection", + "icon-text-fit": "both", + "icon-text-fit-padding": [ + 1, + 2, + 1, + 2 + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 15, + 9, + 18, + 12 + ], + "text-font": [ + "DIN Pro Bold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "hsl(230, 36%, 64%)" + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, road-labels", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "road-number-shield", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 6, + "filter": [ + "all", + [ + "has", + "reflen" + ], + [ + "<=", + [ + "get", + "reflen" + ], + 6 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian", + "service" + ], + false, + true + ], + [ + "step", + [ + "zoom" + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ], + 11, + [ + ">", + [ + "get", + "len" + ], + 5000 + ], + 12, + [ + ">", + [ + "get", + "len" + ], + 2500 + ], + 13, + [ + ">", + [ + "get", + "len" + ], + 1000 + ], + 14, + true + ] + ], + "layout": { + "text-size": 9, + "icon-image": [ + "case", + [ + "has", + "shield_beta" + ], + [ + "coalesce", + [ + "image", + [ + "concat", + [ + "get", + "shield_beta" + ], + "-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ] + ], + [ + "image", + [ + "concat", + "default-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ] + ] + ], + [ + "concat", + [ + "get", + "shield" + ], + "-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ] + ], + "icon-rotation-alignment": "viewport", + "text-max-angle": 38, + "symbol-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 400, + 14, + 600 + ], + "text-font": [ + "DIN Pro Bold", + "Arial Unicode MS Bold" + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" + ], + "text-rotation-alignment": "viewport", + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05 + }, + "paint": { + "text-color": [ + "case", + [ + "all", + [ + "has", + "shield_text_color_beta" + ], + [ + "to-boolean", + [ + "coalesce", + [ + "image", + [ + "concat", + [ + "get", + "shield_beta" + ], + "-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ] + ], + "" + ] + ] + ], + [ + "match", + [ + "get", + "shield_text_color_beta" + ], + "white", + "hsl(0, 0%, 100%)", + "yellow", + "hsl(50, 63%, 70%)", + "orange", + "hsl(25, 63%, 75%)", + "blue", + "hsl(230, 36%, 44%)", + "red", + "hsl(0, 54%, 59%)", + "green", + "hsl(140, 46%, 37%)", + "hsl(230, 11%, 13%)" + ], + [ + "match", + [ + "get", + "shield_text_color" + ], + "white", + "hsl(0, 0%, 100%)", + "yellow", + "hsl(50, 63%, 70%)", + "orange", + "hsl(25, 63%, 75%)", + "blue", + "hsl(230, 36%, 44%)", + "red", + "hsl(0, 54%, 59%)", + "green", + "hsl(140, 46%, 37%)", + "hsl(230, 11%, 13%)" + ] + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, road-labels", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "road-exit-shield", + "type": "symbol", + "source": "composite", + "source-layer": "motorway_junction", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "reflen" + ], + [ + "<=", + [ + "get", + "reflen" + ], + 9 + ] + ], + "layout": { + "text-field": [ + "get", + "ref" + ], + "text-size": 9, + "icon-image": [ + "concat", + "motorway-exit-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ], + "text-font": [ + "DIN Pro Bold", + "Arial Unicode MS Bold" + ] + }, + "paint": { + "text-color": "hsl(0, 0%, 100%)", + "text-translate": [ + 0, + 0 + ] + }, + "metadata": { + "mapbox:featureComponent": "road-network", + "mapbox:group": "Road network, road-labels", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + } + }, + { + "id": "path-pedestrian-label", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 12, + "filter": [ + "all", + [ + "case", + [ + "has", + "layer" + ], + [ + ">=", + [ + "get", + "layer" + ], + 0 + ], + true + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian" + ], + true, + false + ], + 15, + [ + "match", + [ + "get", + "class" + ], + [ + "path", + "pedestrian" + ], + true, + false + ] + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "class" + ], + "pedestrian", + 9, + 6.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + "pedestrian", + 14, + 13 + ] + ], + "text-max-angle": 30, + "text-font": [ + "DIN Pro Regular", + "Arial Unicode MS Regular" + ], + "symbol-placement": "line", + "text-padding": 1, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": 0.01 + }, + "paint": { + "text-color": "hsl(0,0%, 0%)", + "text-halo-color": "hsl(60, 25%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., walking-cycling-labels", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "golf-hole-label", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "==", + [ + "get", + "class" + ], + "golf" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-size": 12 + }, + "paint": { + "text-halo-color": "hsl(98, 60%, 55%)", + "text-halo-width": 0.5, + "text-halo-blur": 0.5, + "text-color": "hsl(100, 80%, 18%)" + }, + "metadata": { + "mapbox:featureComponent": "walking-cycling", + "mapbox:group": "Walking, cycling, etc., walking-cycling-labels", + "microg:gms-type-feature": "poi.attraction", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "ferry-aerialway-label", + "type": "symbol", + "source": "composite", + "source-layer": "road", + "minzoom": 15, + "filter": [ + "match", + [ + "get", + "class" + ], + "aerialway", + true, + "ferry", + true, + false + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 6.5, + 18, + 13 + ], + "text-max-angle": 30, + "text-font": [ + "DIN Pro Regular", + "Arial Unicode MS Regular" + ], + "symbol-placement": "line", + "text-padding": 1, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": 0.01 + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "class" + ], + "ferry", + "hsl(205, 43%, 100%)", + "hsl(230, 50%, 60%)" + ], + "text-halo-color": [ + "match", + [ + "get", + "class" + ], + "ferry", + "hsl(205, 75%, 70%)", + "hsl(60, 20%, 100%)" + ], + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, ferry-aerialway-labels", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "waterway-label", + "type": "symbol", + "source": "composite", + "source-layer": "natural_label", + "minzoom": 13, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river", + "stream", + "disputed_canal", + "disputed_river", + "disputed_stream" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "text-font": [ + "DIN Pro Italic", + "Arial Unicode MS Regular" + ], + "text-max-angle": 30, + "symbol-spacing": [ + "interpolate", + [ + "linear", + 1 + ], + [ + "zoom" + ], + 15, + 250, + 17, + 400 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 12, + 18, + 18 + ], + "symbol-placement": "line", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": "hsl(205, 43%, 90%)", + "text-halo-color": "hsla(60, 17%, 84%, 0.5)" + }, + "metadata": { + "mapbox:featureComponent": "natural-features", + "mapbox:group": "Natural features, natural-labels", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "natural-line-label", + "type": "symbol", + "metadata": { + "mapbox:featureComponent": "natural-features", + "mapbox:group": "Natural features, natural-labels", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "natural_label", + "minzoom": 4, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "glacier", + "landform", + "disputed_glacier", + "disputed_landform" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 4 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 5, + 12 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 13, + 12 + ] + ], + "text-max-angle": 30, + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "symbol-placement": "line-center", + "text-pitch-alignment": "viewport" + }, + "paint": { + "text-halo-width": 0.5, + "text-halo-color": "hsl(60, 17%, 84%)", + "text-halo-blur": 0.5, + "text-color": "hsl(340, 10%, 38%)" + } + }, + { + "id": "natural-point-label", + "type": "symbol", + "source": "composite", + "source-layer": "natural_label", + "minzoom": 4, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "dock", + "glacier", + "landform", + "water_feature", + "wetland", + "disputed_dock", + "disputed_glacier", + "disputed_landform", + "disputed_water_feature", + "disputed_wetland" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 4 + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ] + ], + "layout": { + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 5, + 12 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 13, + 12 + ] + ], + "icon-image": [ + "get", + "maki" + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 5, + [ + "literal", + [ + 0, + 0.8 + ] + ] + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 13, + [ + "literal", + [ + 0, + 0.8 + ] + ] + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 5, + "top" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 13, + "top" + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 5, + 1 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 13, + 1 + ] + ], + "text-halo-color": "hsl(60, 20%, 100%)", + "text-halo-width": 0.5, + "text-halo-blur": 0.5, + "text-color": "hsl(340, 10%, 38%)" + }, + "metadata": { + "mapbox:featureComponent": "natural-features", + "mapbox:group": "Natural features, natural-labels", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "water-line-label", + "type": "symbol", + "metadata": { + "mapbox:featureComponent": "natural-features", + "mapbox:group": "Natural features, natural-labels", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "natural_label", + "minzoom": 1, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "reservoir", + "sea", + "water", + "disputed_bay", + "disputed_ocean", + "disputed_reservoir", + "disputed_sea", + "disputed_water" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "*", + [ + "-", + 16, + [ + "sqrt", + [ + "get", + "sizerank" + ] + ] + ], + 1 + ], + 22, + [ + "*", + [ + "-", + 22, + [ + "sqrt", + [ + "get", + "sizerank" + ] + ] + ], + 1 + ] + ], + "text-max-angle": 30, + "text-letter-spacing": [ + "match", + [ + "get", + "class" + ], + "ocean", + 0.25, + [ + "sea", + "bay" + ], + 0.15, + 0 + ], + "text-font": [ + "DIN Pro Italic", + "Arial Unicode MS Regular" + ], + "symbol-placement": "line-center", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "sea" + ], + "hsl(205, 71%, 90%)", + "hsl(205, 43%, 90%)" + ], + "text-halo-color": "hsla(60, 17%, 84%, 0.5)" + } + }, + { + "id": "water-point-label", + "type": "symbol", + "source": "composite", + "source-layer": "natural_label", + "minzoom": 1, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "reservoir", + "sea", + "water", + "disputed_bay", + "disputed_ocean", + "disputed_reservoir", + "disputed_sea", + "disputed_water" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ] + ], + "layout": { + "text-line-height": 1.3, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "*", + [ + "-", + 16, + [ + "sqrt", + [ + "get", + "sizerank" + ] + ] + ], + 1 + ], + 22, + [ + "*", + [ + "-", + 22, + [ + "sqrt", + [ + "get", + "sizerank" + ] + ] + ], + 1 + ] + ], + "text-font": [ + "DIN Pro Italic", + "Arial Unicode MS Regular" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "match", + [ + "get", + "class" + ], + "ocean", + 0.25, + [ + "bay", + "sea" + ], + 0.15, + 0.01 + ], + "text-max-width": [ + "match", + [ + "get", + "class" + ], + "ocean", + 4, + "sea", + 5, + [ + "bay", + "water" + ], + 7, + 10 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "sea" + ], + "hsl(205, 71%, 90%)", + "hsl(205, 43%, 90%)" + ], + "text-halo-color": "hsla(60, 17%, 84%, 0.5)" + }, + "metadata": { + "mapbox:featureComponent": "natural-features", + "mapbox:group": "Natural features, natural-labels", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "poi-label", + "type": "symbol", + "source": "composite", + "source-layer": "poi_label", + "minzoom": 6, + "filter": [ + "<=", + [ + "get", + "filterrank" + ], + [ + "+", + [ + "step", + [ + "zoom" + ], + 0, + 16, + 1, + 17, + 2 + ], + [ + "match", + [ + "get", + "class" + ], + "food_and_drink_stores", + 3, + "historic", + 3, + "landmark", + 3, + "medical", + 3, + "motorist", + 3, + "park_like", + 4, + "sport_and_leisure", + 4, + "visitor_amenities", + 4, + 2 + ] + ] + ], + "layout": { + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 5, + 12 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 13, + 12 + ] + ], + "icon-image": [ + "case", + [ + "has", + "maki_beta" + ], + [ + "coalesce", + [ + "image", + [ + "get", + "maki_beta" + ] + ], + [ + "image", + [ + "get", + "maki" + ] + ] + ], + [ + "image", + [ + "get", + "maki" + ] + ] + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 5, + [ + "literal", + [ + 0, + 0.8 + ] + ] + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 13, + [ + "literal", + [ + 0, + 0.8 + ] + ] + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 5, + "top" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 13, + "top" + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 5, + 1 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 13, + 1 + ] + ], + "text-halo-color": "hsl(60, 20%, 100%)", + "text-halo-width": 0.5, + "text-halo-blur": 0.5, + "text-color": [ + "match", + [ + "get", + "class" + ], + "food_and_drink", + "hsl(35, 80%, 38%)", + "park_like", + "hsl(100, 80%, 18%)", + "education", + "hsl(30, 60%, 28%)", + "medical", + "hsl(10, 60%, 43%)", + "sport_and_leisure", + "hsl(210, 60%, 38%)", + "hsl(340, 10%, 38%)" + ] + }, + "metadata": { + "mapbox:featureComponent": "point-of-interest-labels", + "mapbox:group": "Point of interest labels, poi-labels", + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "transit-label", + "type": "symbol", + "source": "composite", + "source-layer": "transit_stop_label", + "minzoom": 12, + "filter": [ + "step", + [ + "zoom" + ], + [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + 4 + ], + [ + "match", + [ + "get", + "mode" + ], + "rail", + true, + "metro_rail", + true, + false + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] + ], + 14, + [ + "all", + [ + "match", + [ + "get", + "mode" + ], + "rail", + true, + "metro_rail", + true, + false + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] + ], + 15, + [ + "all", + [ + "match", + [ + "get", + "mode" + ], + "rail", + true, + "metro_rail", + true, + "ferry", + true, + "light_rail", + true, + false + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] + ], + 16, + [ + "all", + [ + "match", + [ + "get", + "mode" + ], + "bus", + false, + true + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] + ], + 17, + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ], + 19, + true + ], + "layout": { + "text-size": 12, + "icon-image": [ + "get", + "network" + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-justify": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + "left", + "center" + ], + "text-offset": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + [ + "literal", + [ + 1, + 0 + ] + ], + [ + "literal", + [ + 0, + 0.8 + ] + ] + ], + "text-anchor": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + "left", + "top" + ], + "text-field": [ + "step", + [ + "zoom" + ], + "", + 13, + [ + "match", + [ + "get", + "mode" + ], + [ + "rail", + "metro_rail" + ], + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "" + ], + 14, + [ + "match", + [ + "get", + "mode" + ], + [ + "bus", + "bicycle" + ], + "", + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], + 18, + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], + "text-letter-spacing": 0.01, + "text-max-width": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + 15, + 9 + ] + }, + "paint": { + "text-halo-color": "hsl(60, 20%, 100%)", + "text-color": [ + "match", + [ + "get", + "network" + ], + "tokyo-metro", + "hsl(180, 30%, 30%)", + "mexico-city-metro", + "hsl(25, 63%, 63%)", + [ + "barcelona-metro", + "delhi-metro", + "hong-kong-mtr", + "milan-metro", + "osaka-subway" + ], + "hsl(0, 57%, 47%)", + [ + "boston-t", + "washington-metro" + ], + "hsl(230, 11%, 20%)", + [ + "chongqing-rail-transit", + "kiev-metro", + "singapore-mrt", + "taipei-metro" + ], + "hsl(140, 56%, 25%)", + "hsl(230, 50%, 60%)" + ], + "text-halo-blur": 0.5, + "text-halo-width": 0.5 + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, transit-labels", + "microg:gms-type-feature": "transit.station.bus", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "airport-label", + "type": "symbol", + "source": "composite", + "source-layer": "airport_label", + "minzoom": 8, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "military", + "civil", + "disputed_military", + "disputed_civil" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + "layout": { + "text-line-height": 1.1, + "text-size": [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 12 + ], + "icon-image": [ + "get", + "maki" + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-offset": [ + 0, + 0.8 + ], + "text-rotation-alignment": "viewport", + "text-anchor": "top", + "text-field": [ + "step", + [ + "get", + "sizerank" + ], + [ + "case", + [ + "has", + "ref" + ], + [ + "concat", + [ + "get", + "ref" + ], + " -\n", + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], + 15, + [ + "get", + "ref" + ] + ], + "text-letter-spacing": 0.01, + "text-max-width": 9 + }, + "paint": { + "text-color": "hsl(230, 40%, 55%)", + "text-halo-color": "hsl(60, 20%, 100%)", + "text-halo-width": 1 + }, + "metadata": { + "mapbox:featureComponent": "transit", + "mapbox:group": "Transit, transit-labels", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "settlement-subdivision-label", + "type": "symbol", + "source": "composite", + "source-layer": "place_label", + "minzoom": 10, + "maxzoom": 15, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "settlement_subdivision", + "disputed_settlement_subdivision" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 3 + ] + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-transform": "uppercase", + "text-font": [ + "DIN Pro Regular", + "Arial Unicode MS Regular" + ], + "text-letter-spacing": [ + "match", + [ + "get", + "type" + ], + "suburb", + 0.15, + 0.05 + ], + "text-max-width": 7, + "text-padding": 3, + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.5, + 0, + 1, + 1 + ], + [ + "zoom" + ], + 11, + [ + "match", + [ + "get", + "type" + ], + "suburb", + 11, + 10.5 + ], + 15, + [ + "match", + [ + "get", + "type" + ], + "suburb", + 15, + 14 + ] + ] + }, + "paint": { + "text-halo-color": "hsla(60, 25%, 100%, 0.75)", + "text-halo-width": 1, + "text-color": "hsl(230, 29%, 36%)", + "text-halo-blur": 0.5 + }, + "metadata": { + "mapbox:featureComponent": "place-labels", + "mapbox:group": "Place labels, place-labels", + "microg:gms-type-feature": "administrative.neighborhood", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "settlement-minor-label", + "type": "symbol", + "source": "composite", + "source-layer": "place_label", + "minzoom": 2, + "maxzoom": 13, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + 3 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "disputed_settlement" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "step", + [ + "zoom" + ], + [ + ">", + [ + "get", + "symbolrank" + ], + 6 + ], + 4, + [ + ">=", + [ + "get", + "symbolrank" + ], + 7 + ], + 6, + [ + ">=", + [ + "get", + "symbolrank" + ], + 8 + ], + 7, + [ + ">=", + [ + "get", + "symbolrank" + ], + 10 + ], + 10, + [ + ">=", + [ + "get", + "symbolrank" + ], + 11 + ], + 11, + [ + ">=", + [ + "get", + "symbolrank" + ], + 13 + ], + 12, + [ + ">=", + [ + "get", + "symbolrank" + ], + 15 + ] + ] + ], + "layout": { + "symbol-sort-key": [ + "get", + "symbolrank" + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "case", + [ + "==", + [ + "get", + "capital" + ], + 2 + ], + "border-dot-13", + [ + "step", + [ + "get", + "symbolrank" + ], + "dot-11", + 9, + "dot-10", + 11, + "dot-9" + ] + ], + 8, + "" + ], + "text-font": [ + "DIN Pro Regular", + "Arial Unicode MS Regular" + ], + "text-radial-offset": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + 2, + 0.6, + 0.55 + ], + 8, + 0 + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "get", + "text_anchor" + ], + 8, + "center" + ], + "text-justify": "auto", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-max-width": 7, + "text-line-height": 1.1, + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.9, + 1 + ], + [ + "zoom" + ], + 3, + [ + "step", + [ + "get", + "symbolrank" + ], + 11, + 9, + 10 + ], + 6, + [ + "step", + [ + "get", + "symbolrank" + ], + 14, + 9, + 12, + 12, + 10 + ], + 8, + [ + "step", + [ + "get", + "symbolrank" + ], + 16, + 9, + 14, + 12, + 12, + 15, + 10 + ], + 13, + [ + "step", + [ + "get", + "symbolrank" + ], + 22, + 9, + 20, + 12, + 16, + 15, + 14 + ] + ] + }, + "paint": { + "text-color": "hsl(230, 29%, 0%)", + "text-halo-color": "hsl(60, 25%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "metadata": { + "mapbox:featureComponent": "place-labels", + "mapbox:group": "Place labels, place-labels", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "settlement-major-label", + "type": "symbol", + "source": "composite", + "source-layer": "place_label", + "minzoom": 2, + "maxzoom": 15, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + 3 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "disputed_settlement" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + [ + "step", + [ + "zoom" + ], + false, + 2, + [ + "<=", + [ + "get", + "symbolrank" + ], + 6 + ], + 4, + [ + "<", + [ + "get", + "symbolrank" + ], + 7 + ], + 6, + [ + "<", + [ + "get", + "symbolrank" + ], + 8 + ], + 7, + [ + "<", + [ + "get", + "symbolrank" + ], + 10 + ], + 10, + [ + "<", + [ + "get", + "symbolrank" + ], + 11 + ], + 11, + [ + "<", + [ + "get", + "symbolrank" + ], + 13 + ], + 12, + [ + "<", + [ + "get", + "symbolrank" + ], + 15 + ], + 13, + [ + ">=", + [ + "get", + "symbolrank" + ], + 11 + ], + 14, + [ + ">=", + [ + "get", + "symbolrank" + ], + 15 + ] + ] + ], + "layout": { + "symbol-sort-key": [ + "get", + "symbolrank" + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "case", + [ + "==", + [ + "get", + "capital" + ], + 2 + ], + "border-dot-13", + [ + "step", + [ + "get", + "symbolrank" + ], + "dot-11", + 9, + "dot-10", + 11, + "dot-9" + ] + ], + 8, + "" + ], + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-radial-offset": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + 2, + 0.6, + 0.55 + ], + 8, + 0 + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "get", + "text_anchor" + ], + 8, + "center" + ], + "text-justify": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "text_anchor" + ], + [ + "left", + "bottom-left", + "top-left" + ], + "left", + [ + "right", + "bottom-right", + "top-right" + ], + "right", + "center" + ], + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-max-width": 7, + "text-line-height": 1.1, + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.9, + 1 + ], + [ + "zoom" + ], + 3, + [ + "step", + [ + "get", + "symbolrank" + ], + 13, + 6, + 11 + ], + 6, + [ + "step", + [ + "get", + "symbolrank" + ], + 18, + 6, + 16, + 7, + 14 + ], + 8, + [ + "step", + [ + "get", + "symbolrank" + ], + 20, + 9, + 16, + 10, + 14 + ], + 15, + [ + "step", + [ + "get", + "symbolrank" + ], + 24, + 9, + 20, + 12, + 16, + 15, + 14 + ] + ] + }, + "paint": { + "text-color": "hsl(230, 29%, 0%)", + "text-halo-color": "hsl(60, 25%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "metadata": { + "mapbox:featureComponent": "place-labels", + "mapbox:group": "Place labels, place-labels", + "microg:gms-type-feature": "administrative.land_parcel", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "state-label", + "type": "symbol", + "source": "composite", + "source-layer": "place_label", + "minzoom": 3, + "maxzoom": 9, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "state", + "disputed_state" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + "layout": { + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.85, + 0.7, + 0.65, + 1 + ], + [ + "zoom" + ], + 4, + [ + "step", + [ + "get", + "symbolrank" + ], + 9, + 6, + 8, + 7, + 7 + ], + 9, + [ + "step", + [ + "get", + "symbolrank" + ], + 21, + 6, + 16, + 7, + 14 + ] + ], + "text-transform": "uppercase", + "text-font": [ + "DIN Pro Bold", + "Arial Unicode MS Bold" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": 0.15, + "text-max-width": 6 + }, + "paint": { + "text-color": "hsl(230, 29%, 0%)", + "text-halo-color": "hsl(60, 25%, 100%)", + "text-halo-width": 1, + "text-opacity": 0.5 + }, + "metadata": { + "mapbox:featureComponent": "place-labels", + "mapbox:group": "Place labels, place-labels", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "country-label", + "type": "symbol", + "source": "composite", + "source-layer": "place_label", + "minzoom": 1, + "maxzoom": 10, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "country", + "disputed_country" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ], + false + ], + "layout": { + "icon-image": "", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-line-height": 1.1, + "text-max-width": 6, + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-radial-offset": [ + "step", + [ + "zoom" + ], + 0.6, + 8, + 0 + ], + "text-justify": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "text_anchor" + ], + [ + "left", + "bottom-left", + "top-left" + ], + "left", + [ + "right", + "bottom-right", + "top-right" + ], + "right", + "center" + ], + 7, + "auto" + ], + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.7, + 1 + ], + [ + "zoom" + ], + 1, + [ + "step", + [ + "get", + "symbolrank" + ], + 11, + 4, + 9, + 5, + 8 + ], + 9, + [ + "step", + [ + "get", + "symbolrank" + ], + 22, + 4, + 19, + 5, + 17 + ] + ] + }, + "paint": { + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "case", + [ + "has", + "text_anchor" + ], + 1, + 0 + ], + 7, + 0 + ], + "text-color": "hsl(230, 29%, 0%)", + "text-halo-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + "hsla(60, 25%, 100%, 0.75)", + 3, + "hsl(60, 25%, 100%)" + ], + "text-halo-width": 1.25 + }, + "metadata": { + "mapbox:featureComponent": "place-labels", + "mapbox:group": "Place labels, place-labels", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "continent-label", + "type": "symbol", + "source": "composite", + "source-layer": "natural_label", + "minzoom": 0.75, + "maxzoom": 3, + "filter": [ + "==", + [ + "get", + "class" + ], + "continent" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-line-height": 1.1, + "text-max-width": 6, + "text-font": [ + "DIN Pro Medium", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "exponential", + 0.5 + ], + [ + "zoom" + ], + 0, + 10, + 2.5, + 15 + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.05 + }, + "paint": { + "text-color": "hsl(230, 29%, 0%)", + "text-halo-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + "hsla(60, 25%, 100%, 0.75)", + 3, + "hsl(60, 25%, 100%)" + ], + "text-halo-width": 1.5, + "text-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + 0.8, + 1.5, + 0.5, + 2.5, + 0 + ] + }, + "metadata": { + "mapbox:featureComponent": "place-labels", + "mapbox:group": "Place labels, place-labels", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + } + } + ], + "sources": { + "composite": { + "url": "mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2", + "type": "vector" + } + }, + "created": "1970-01-01T00:00:00.000Z", + "modified": "1970-01-01T00:00:00.000Z", + "owner": "mapbox", + "id": "outdoors-v12", + "draft": false +} diff --git a/artwork/styles/style-microg-normal-mapbox.json b/artwork/styles/style-microg-normal-mapbox.json new file mode 100644 index 0000000..295ffad --- /dev/null +++ b/artwork/styles/style-microg-normal-mapbox.json @@ -0,0 +1,4392 @@ +{ + "version": 8, + "name": "Mountain View Full", + "metadata": { + "mapbox:origin": "basic-template", + "mapbox:autocomposite": true, + "mapbox:type": "template", + "mapbox:sdk-support": { + "js": "0.50.0", + "android": "6.7.0", + "ios": "4.6.0" + }, + "mapbox:trackposition": false, + "mapbox:groups": { + "f51b507d2a17e572c70a5db74b0fec7e": { + "name": "Base", + "collapsed": false + }, + "3f48b8dc54ff2e6544b9ef9cedbf2990": { + "name": "Streets", + "collapsed": true + }, + "29bb589e8d1b9b402583363648b70302": { + "name": "Buildings", + "collapsed": true + }, + "3c26e9cbc75335c6f0ba8de5439cf1fa": { + "name": "Country borders", + "collapsed": true + }, + "7b44201d7f1682d99f7140188aff23ce": { + "name": "Labels", + "collapsed": true + }, + "24306bdccbff03e2ee08d5d1a4ca7312": { + "name": "Street name", + "collapsed": true + }, + "124a9d7a8e5226775d947c592110dfad": { + "name": "POI", + "collapsed": true + } + }, + "mapbox:uiParadigm": "layers" + }, + "center": [ + 12.819420849458652, + 50.03325860617235 + ], + "zoom": 3.315829104862067, + "bearing": 0, + "pitch": 1.5, + "light": { + "intensity": 0.5, + "color": "hsl(0, 0%, 100%)", + "anchor": "viewport" + }, + "sources": { + "composite": { + "url": "mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2", + "type": "vector" + } + }, + "sprite": "mapbox://sprites/microg/cjui4020201oo1fmca7yuwbor/8fkcj5fgn4mftlzuak3guz1f9", + "glyphs": "mapbox://fonts/microg/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "layout": {}, + "paint": { + "background-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 4, + "hsl(43, 30%, 91%)", + 5, + "hsl(0, 0%, 96%)", + 8, + "hsl(0, 0%, 96%)", + 9, + "#efeee8", + 16, + "hsl(0, 0%, 95%)", + 18, + "#f8f9fb" + ] + }, + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "grass", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "grass" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 30%, 90%)", + 11, + "hsl(107, 30%, 94%)", + 12.5, + "hsl(107, 30%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "forrest", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "wood", + "scrub" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 42%, 86%)", + 11, + "hsl(107, 47%, 94%)", + 12.5, + "hsl(107, 47%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "national_park", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landuse_overlay", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "national_park" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": "hsl(106, 58%, 85%)" + } + }, + { + "id": "snow", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "snow" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": "#f9fafc" + } + }, + { + "id": "hillshade", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "hillshade", + "layout": {}, + "paint": { + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 0.03, + 13, + 0 + ] + } + }, + { + "id": "park", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "park", + "scrub" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": "#c1ecaf" + } + }, + { + "id": "pitch", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "pitch" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": "#c8efbb" + } + }, + { + "id": "landuse", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "airport", + "school", + "hospital" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": "hsl(202, 26%, 94%)" + } + }, + { + "id": "river", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "water", + "layout": {}, + "paint": { + "fill-color": "hsl(206, 100%, 83%)" + } + }, + { + "id": "path", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ], + [ + "match", + [ + "get", + "type" + ], + [ + "platform", + "steps" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 34%, 66%)", + "line-dasharray": [ + 4, + 2 + ] + } + }, + { + "id": "steps", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ], + [ + "match", + [ + "get", + "type" + ], + [ + "steps" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 5%, 66%)", + "line-dasharray": [ + 1, + 1 + ], + "line-gap-width": 1 + } + }, + { + "id": "platform", + "type": "fill", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.rail", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "type" + ], + [ + "platform" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(2, 20%, 92%)", + 16, + "hsl(2, 95%, 92%)" + ], + "fill-outline-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(1, 10%, 76%)", + 16, + "hsl(1, 74%, 76%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0, + 16, + 1 + ] + } + }, + { + "id": "primary_tunnel_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0, + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "#cbcccd" + } + }, + { + "id": "primary_tunnel", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "hsl(0, 0%, 89%)" + } + }, + { + "id": "aeroway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "aeroway", + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)" + } + }, + { + "id": "service_road", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "service" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)" + } + }, + { + "id": "pedestrian_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "has", + "name" + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-color": "#e3e3e3", + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 1 + ] + } + }, + { + "id": "street_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "street" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ], + "line-color": "#e3e3e3" + } + }, + { + "id": "secondary_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "secondary_link", + "tertiary_link", + "tertiary", + "trunk_link", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ], + "line-color": "#e3e3e3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 1, + 20, + 2 + ] + } + }, + { + "id": "primary_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-color": "#ecd283" + } + }, + { + "id": "motorway_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ], + "line-color": "#ecd283", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15, + 2 + ] + } + }, + { + "id": "railway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail", + "service_rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(220, 4%, 85%)" + } + }, + { + "id": "pedestrian", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "platform" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 1 + ] + } + }, + { + "id": "street", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "street" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ] + } + }, + { + "id": "secondary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "secondary_link", + "trunk_link", + "tertiary", + "tertiary_link", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ] + } + }, + { + "id": "primary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ] + } + }, + { + "id": "motorway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffeba3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ] + } + }, + { + "id": "primary_bridge_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "bridge" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-color": "hsl(45, 73%, 72%)" + } + }, + { + "id": "primary_bridge", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "bridge" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ] + } + }, + { + "id": "building", + "type": "fill", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "building", + "filter": [ + "match", + [ + "get", + "type" + ], + [ + "roof" + ], + false, + true + ], + "layout": {}, + "paint": { + "fill-color": [ + "match", + [ + "get", + "type" + ], + [ + "store", + "retail", + "church", + "kiosk", + "civic", + "hotel", + "supermarket", + "pub", + "dormitory" + ], + "hsl(33, 100%, 96%)", + "#ededed" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 17, + 1 + ] + } + }, + { + "id": "building_border", + "type": "line", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "building", + "filter": [ + "match", + [ + "get", + "type" + ], + [ + "roof" + ], + false, + true + ], + "layout": {}, + "paint": { + "line-color": [ + "match", + [ + "get", + "type" + ], + [ + "store", + "retail", + "church", + "kiosk", + "civic", + "commercial", + "hotel", + "supermarket", + "pub" + ], + "#f8e1c7", + "#dcdcdc" + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 17, + 1 + ] + } + }, + { + "id": "building_3d", + "type": "fill-extrusion", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "building", + "filter": [ + "match", + [ + "get", + "extrude" + ], + [ + "true" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-extrusion-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + [ + "get", + "height" + ] + ], + "fill-extrusion-opacity": 0.3, + "fill-extrusion-color": "hsl(0, 0%, 93%)" + } + }, + { + "id": "admin_0", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "admin", + "filter": [ + "all", + [ + "match", + [ + "get", + "maritime" + ], + [ + "false" + ], + true, + false + ], + [ + "match", + [ + "get", + "admin_level" + ], + [ + 0 + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + true + ], + "hsl(0, 24%, 48%)", + "#787a7b" + ] + } + }, + { + "id": "admin_1", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "admin", + "filter": [ + "all", + [ + "match", + [ + "get", + "maritime" + ], + [ + "false" + ], + true, + false + ], + [ + "match", + [ + "get", + "admin_level" + ], + [ + 1 + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + true + ], + "hsl(0, 24%, 48%)", + "#787a7b" + ], + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "river_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "natural_label", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "river" + ], + true, + false + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "symbol-placement": "line", + "symbol-spacing": 500, + "text-font": [ + "Roboto Regular" + ] + }, + "paint": { + "text-color": "#5083c1", + "text-halo-color": "#5083c1", + "text-halo-blur": 1 + } + }, + { + "id": "city_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-optional": true, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "left", + "text-offset": [ + 0.5, + 0.1 + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": "left", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "symbolrank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "right", + "text-offset": [ + -0.5, + 0.1 + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": "right", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "symbolrank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + 0, + 0.4 + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": "top", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "symbolrank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + 8, + "" + ], + "text-transform": [ + "step", + [ + "get", + "symbolrank" + ], + "none", + 15, + "uppercase" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0, + -0.2 + ] + ], + 8, + [ + "literal", + [ + 0, + 0 + ] + ] + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + "bottom", + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "get", + "symbolrank" + ], + 0, + 0, + 8, + 0, + 12, + 0.1, + 16, + 0.2 + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "symbolrank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "park_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-size": 14 + }, + "paint": { + "text-color": "#297925", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "road-number-shield", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "ref" + ], + [ + "<=", + [ + "get", + "reflen" + ], + 6 + ] + ], + "layout": { + "text-size": 9, + "icon-image": [ + "case", + [ + "match", + [ + "get", + "shield" + ], + [ + "de-motorway", + "rectangle-green", + "rectangle-yellow", + "rectangle-white", + "rectangle-blue", + "rectangle-red", + "us-interstate" + ], + true, + false + ], + [ + "concat", + "shield_", + [ + "get", + "shield" + ], + "_", + [ + "get", + "reflen" + ] + ], + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + true, + false + ], + [ + "concat", + "shield_rectangle-blue_", + [ + "get", + "reflen" + ] + ], + [ + "concat", + "shield_rectangle-white_", + [ + "get", + "reflen" + ] + ] + ], + "icon-rotation-alignment": "viewport", + "text-font": [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + [ + "literal", + [ + "Roboto Bold" + ] + ], + [ + "black" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + [ + "literal", + [ + "Roboto Bold" + ] + ] + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" + ], + "text-offset": [ + 0, + 0.1 + ], + "text-rotation-alignment": "viewport", + "icon-size": 0.75, + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05 + }, + "paint": { + "text-color": [ + "case", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + true, + false + ], + "#ffffff", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "black" + ], + true, + false + ], + "hsl(0, 0%, 7%)", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "yellow" + ], + true, + false + ], + "hsl(50, 100%, 70%)", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "orange" + ], + true, + false + ], + "hsl(25, 100%, 75%)", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "blue" + ], + true, + false + ], + "hsl(230, 48%, 34%)", + "#ffffff" + ] + } + }, + { + "id": "country_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "country" + ], + true, + false + ], + "layout": { + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 1, + 0, + 3, + 0.15 + ], + "text-font": [ + "Roboto Medium" + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 1, + 12, + 7, + [ + "/", + 100, + [ + "get", + "symbolrank" + ] + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": "hsl(0, 0%, 10%)", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1, + "text-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + 1, + 7, + 0 + ] + } + }, + { + "id": "pedestrian_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "match", + [ + "get", + "type" + ], + [ + "platform" + ], + false, + true + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 17, + 10, + 22, + 14 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "#575757", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "street_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 6, + 16, + 10 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "#575757", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "secondary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "secondary_link", + "tertiary_link", + "tertiary", + "trunk_link", + "trunk" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 8, + 16, + 13 + ], + "symbol-spacing": 300, + "text-padding": 25 + }, + "paint": { + "text-color": "hsl(196, 0%, 34%)", + "text-halo-width": 1, + "text-halo-color": "#ffffff", + "text-halo-blur": 1 + } + }, + { + "id": "primary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "primary_link" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 10, + 18, + 14 + ], + "symbol-spacing": 800, + "text-padding": 50 + }, + "paint": { + "text-color": "#6e481d", + "text-halo-width": 1, + "text-halo-color": "#ffffff", + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3.5 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-optional": true, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + 0.5 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "top", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "#c77d57", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 48%)", + [ + "bank", + "parking", + "parking-garage" + ], + "#737b9b", + [ + "hospital", + "doctor" + ], + "#a47172", + "#67747b" + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_above", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3.5 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-optional": true, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + -2 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "bottom", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "#c77d57", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 48%)", + [ + "bank", + "parking", + "parking-garage" + ], + "#737b9b", + [ + "hospital", + "doctor" + ], + "#a47172", + "#67747b" + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3.5 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "right", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + -1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + -1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "right", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "#c77d57", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 48%)", + [ + "bank", + "parking", + "parking-garage" + ], + "#737b9b", + [ + "hospital", + "doctor" + ], + "#a47172", + "#67747b" + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 3.5 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "left", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + 1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + 1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "left", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "#c77d57", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 48%)", + [ + "bank", + "parking", + "parking-garage" + ], + "#737b9b", + [ + "hospital", + "doctor" + ], + "#a47172", + "#67747b" + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + } + ], + "created": "2019-04-15T08:41:40.148Z", + "modified": "2020-09-05T19:42:03.856Z", + "id": "cjui4020201oo1fmca7yuwbor", + "owner": "microg", + "visibility": "public", + "protected": false, + "draft": false +} diff --git a/artwork/styles/style-microg-normal-openmaptiles.json b/artwork/styles/style-microg-normal-openmaptiles.json new file mode 100644 index 0000000..8c08fd4 --- /dev/null +++ b/artwork/styles/style-microg-normal-openmaptiles.json @@ -0,0 +1,4565 @@ +{ + "version": 8, + "name": "Mountain View Full", + "metadata": { + "mapbox:origin": "basic-template", + "mapbox:autocomposite": true, + "mapbox:type": "template", + "mapbox:sdk-support": { + "js": "0.50.0", + "android": "6.7.0", + "ios": "4.6.0" + }, + "mapbox:trackposition": false, + "mapbox:groups": { + "f51b507d2a17e572c70a5db74b0fec7e": { + "name": "Base", + "collapsed": false + }, + "3f48b8dc54ff2e6544b9ef9cedbf2990": { + "name": "Streets", + "collapsed": true + }, + "29bb589e8d1b9b402583363648b70302": { + "name": "Buildings", + "collapsed": true + }, + "3c26e9cbc75335c6f0ba8de5439cf1fa": { + "name": "Country borders", + "collapsed": true + }, + "7b44201d7f1682d99f7140188aff23ce": { + "name": "Labels", + "collapsed": true + }, + "24306bdccbff03e2ee08d5d1a4ca7312": { + "name": "Street name", + "collapsed": true + }, + "124a9d7a8e5226775d947c592110dfad": { + "name": "POI", + "collapsed": true + } + }, + "mapbox:uiParadigm": "layers", + "maputnik:renderer": "mbgljs" + }, + "center": [ + 12.819420849458652, + 50.03325860617235 + ], + "zoom": 3.315829104862067, + "bearing": 0, + "pitch": 1.5, + "light": { + "intensity": 0.5, + "color": "hsl(0, 0%, 100%)", + "anchor": "viewport" + }, + "sources": { + "openmaptiles": { + "type": "vector", + "url": "https://tiles.stadiamaps.com/data/openmaptiles.json" + } + }, + "sprite": "asset://sprites", + "glyphs": "asset://{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "layout": { + "visibility": "visible" + }, + "paint": { + "background-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 4, + "hsl(43, 30%, 91%)", + 5, + "hsl(0, 0%, 96%)", + 8, + "hsl(0, 0%, 96%)", + 9, + "#efeee8", + 16, + "hsl(0, 0%, 95%)", + 18, + "#f8f9fb" + ] + } + }, + { + "id": "grass", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "grass" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 30%, 90%)", + 11, + "hsl(107, 30%, 94%)", + 12.5, + "hsl(107, 30%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "forrest", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": [ + "==", + [ + "get", + "class" + ], + "wood" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 42%, 86%)", + 11, + "hsl(107, 47%, 94%)", + 12.5, + "hsl(107, 47%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "national_park", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "park", + "filter": [ + "all" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(106, 58%, 85%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 11.5, + 0 + ] + } + }, + { + "id": "snow", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "minzoom": 6, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "ice" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#f9fafc" + } + }, + { + "id": "park", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "subclass" + ], + [ + "scrub", + "park" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#c1ecaf" + } + }, + { + "id": "pitch", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "pitch" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#c8efbb" + } + }, + { + "id": "landuse", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "school", + "hospital" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(202, 26%, 94%)" + } + }, + { + "id": "airport", + "type": "fill", + "source": "openmaptiles", + "source-layer": "aeroway", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(202, 26%, 94%)" + }, + "metadata": { + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "path", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill", + "maputnik:comment": "unpaved paths" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 14, + "maxzoom": 24, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 34%, 66%)", + "line-dasharray": [ + 4, + 2 + ] + } + }, + { + "id": "waterway-other", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "!in", + "class", + "canal", + "river", + "stream" + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "hsl(206, 100%, 83%)", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 2 + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "waterway-stream-canal", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "in", + "class", + "canal", + "stream" + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "hsl(206, 100%, 83%)", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 6 + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "waterway-river", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "==", + "class", + "river" + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "hsl(206, 100%, 83%)", + "line-width": { + "base": 1.2, + "stops": [ + [ + 10, + 0.8 + ], + [ + 20, + 6 + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "water-offset", + "type": "fill", + "source": "openmaptiles", + "source-layer": "water", + "minzoom": 6, + "maxzoom": 8, + "filter": [ + "==", + "$type", + "Polygon" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(206, 100%, 83%)", + "fill-opacity": 1, + "fill-translate": { + "base": 1, + "stops": [ + [ + 6, + [ + 2, + 0 + ] + ], + [ + 8, + [ + 0, + 0 + ] + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "water", + "type": "fill", + "source": "openmaptiles", + "source-layer": "water", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(206, 100%, 83%)" + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "steps", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "subclass" + ], + [ + "steps" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 5%, 66%)", + "line-dasharray": [ + 1, + 1 + ], + "line-gap-width": 1 + } + }, + { + "id": "platform", + "type": "fill", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.rail", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "platform" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(2, 20%, 92%)", + 16, + "hsl(2, 95%, 92%)" + ], + "fill-outline-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(1, 10%, 76%)", + 16, + "hsl(1, 74%, 76%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0, + 16, + 1 + ] + } + }, + { + "id": "primary_tunnel_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brun" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0, + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "#cbcccd" + } + }, + { + "id": "primary_tunnel", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "hsl(0, 0%, 89%)" + } + }, + { + "id": "aeroway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)" + } + }, + { + "id": "service_road", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "service" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)" + } + }, + { + "id": "pedestrian_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-color": "#e3e3e3", + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 1 + ] + } + }, + { + "id": "street_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ], + "line-color": "#e3e3e3" + } + }, + { + "id": "secondary_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "ok" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ], + "line-color": "#e3e3e3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 1, + 20, + 2 + ] + } + }, + { + "id": "primary_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-color": "#ecd283" + } + }, + { + "id": "motorway_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ], + "line-color": "#ecd283", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15, + 2 + ] + } + }, + { + "id": "railway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(220, 4%, 85%)" + } + }, + { + "id": "pedestrian", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 1 + ] + } + }, + { + "id": "street", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ] + } + }, + { + "id": "secondary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ] + } + }, + { + "id": "primary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ] + } + }, + { + "id": "motorway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffeba3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ] + } + }, + { + "id": "primary_bridge_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "bridge" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-color": "hsl(45, 73%, 72%)" + } + }, + { + "id": "primary_bridge", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "bridge" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ] + } + }, + { + "id": "building", + "type": "fill", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "building", + "filter": [ + "all" + ], + "layout": {}, + "paint": { + "fill-color": "#ededed", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 17, + 1 + ] + } + }, + { + "id": "building_border", + "type": "line", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "#f8e1c7 for store, retail, church, kiosk, civic, commercial, hotel, supermarket, pub could not be ported (no appropriate metadata in `building` style spec)" + }, + "source": "openmaptiles", + "source-layer": "building", + "filter": [ + "all" + ], + "layout": {}, + "paint": { + "line-color": [ + "match", + [ + "get", + "type" + ], + [ + "store", + "retail", + "church", + "kiosk", + "civic", + "commercial", + "hotel", + "supermarket", + "pub" + ], + "#f8e1c7", + "#dcdcdc" + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 17, + 1 + ] + } + }, + { + "id": "building_3d", + "type": "fill-extrusion", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "building", + "filter": [ + "!=", + [ + "get", + "hide_3d" + ], + true + ], + "layout": {}, + "paint": { + "fill-extrusion-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + [ + "get", + "render_height" + ] + ], + "fill-extrusion-opacity": 0.3, + "fill-extrusion-color": "hsl(0, 0%, 93%)" + } + }, + { + "id": "admin_0", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "maritime=false filter could not be ported due to missing attributes in `boundary` layer" + }, + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [ + "match", + [ + "get", + "admin_level" + ], + [ + 2 + ], + true, + false + ], + [ + "!=", + [ + "get", + "maritime" + ], + 1 + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + 1 + ], + "hsl(0, 24%, 48%)", + "#787a7b" + ] + } + }, + { + "id": "admin_1", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [ + "match", + [ + "get", + "admin_level" + ], + [ + 3, + 4 + ], + true, + false + ], + [ + "!=", + [ + "get", + "maritime" + ], + 1 + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + 1 + ], + "hsl(0, 24%, 48%)", + "#787a7b" + ], + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "river_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 13, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "river" + ], + true, + false + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "symbol-placement": "line", + "symbol-spacing": 500, + "text-font": [ + "Roboto Regular" + ] + }, + "paint": { + "text-color": "#5083c1", + "text-halo-color": "#5083c1", + "text-halo-blur": 1 + } + }, + { + "id": "city_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-optional": false, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "left", + "text-offset": [ + 0.5, + 0.1 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "left", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "right", + "text-offset": [ + -0.5, + 0.1 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "right", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + 0, + 0.4 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "top", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + 8, + "" + ], + "text-transform": [ + "step", + [ + "get", + "rank" + ], + "none", + 15, + "uppercase" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0, + -0.2 + ] + ], + 8, + [ + "literal", + [ + 0, + 0 + ] + ] + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + "bottom", + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "get", + "rank" + ], + 0, + 0, + 8, + 0, + 12, + 0.1, + 16, + 0.2 + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "park_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 17, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-size": 14 + }, + "paint": { + "text-color": "#297925", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "road-number-shield", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "ref" + ], + [ + "<=", + [ + "get", + "ref_length" + ], + 6 + ] + ], + "layout": { + "text-size": 9, + "icon-image": [ + "case", + [ + "match", + [ + "get", + "network" + ], + [ + "us-interstate" + ], + true, + false + ], + [ + "concat", + "shield_", + [ + "get", + "network" + ], + "_", + [ + "get", + "ref_length" + ] + ], + [ + "concat", + "shield_rectangle-white_", + [ + "get", + "ref_length" + ] + ] + ], + "icon-rotation-alignment": "viewport", + "text-font": [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + [ + "literal", + [ + "Roboto Bold" + ] + ], + [ + "black" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + [ + "literal", + [ + "Roboto Bold" + ] + ] + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" + ], + "text-offset": [ + 0, + 0.1 + ], + "text-rotation-alignment": "viewport", + "icon-size": 0.75, + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05, + "visibility": "visible", + "icon-padding": 10 + }, + "paint": { + "text-color": [ + "case", + [ + "match", + [ + "get", + "network" + ], + [ + "us-interstate" + ], + true, + false + ], + "#ffffff", + "#000000" + ] + } + }, + { + "id": "country_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "country" + ], + true, + false + ], + "layout": { + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 1, + 0, + 3, + 0.15 + ], + "text-font": [ + "Roboto Medium" + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 1, + 12, + 7, + [ + "/", + 30, + [ + "get", + "rank" + ] + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": "hsl(0, 0%, 10%)", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1, + "text-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + 1, + 7, + 0 + ] + } + }, + { + "id": "pedestrian_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 16, + "filter": [ + "any", + [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + [ + "match", + [ + "get", + "subclass" + ], + "platform", + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 17, + 10, + 22, + 14 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "#575757", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "street_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 6, + 16, + 10 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "#575757", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "secondary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 8, + 16, + 13 + ], + "symbol-spacing": 300, + "text-padding": 25 + }, + "paint": { + "text-color": "hsl(196, 0%, 34%)", + "text-halo-width": 1, + "text-halo-color": "#ffffff", + "text-halo-blur": 1 + } + }, + { + "id": "primary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 10, + 18, + 14 + ], + "symbol-spacing": 800, + "text-padding": 50 + }, + "paint": { + "text-color": "#6e481d", + "text-halo-width": 1, + "text-halo-color": "#ffffff", + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-optional": false, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + 0.5 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "top", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_above", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-optional": false, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + -2 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "bottom", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "right", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + -1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + -1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "right", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "left", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + 1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + 1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "left", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + } + ], + "created": "2019-04-15T08:41:40.148Z", + "modified": "2020-09-05T19:42:03.856Z", + "id": "cjui4020201oo1fmca7yuwbor", + "owner": "microg", + "visibility": "public", + "protected": false, + "draft": false +} diff --git a/artwork/styles/style-microg-normal-stadia.json b/artwork/styles/style-microg-normal-stadia.json new file mode 100644 index 0000000..a540426 --- /dev/null +++ b/artwork/styles/style-microg-normal-stadia.json @@ -0,0 +1,4735 @@ +{ + "version": 8, + "name": "Mountain View Full", + "metadata": { + "mapbox:origin": "basic-template", + "mapbox:autocomposite": true, + "mapbox:type": "template", + "mapbox:sdk-support": { + "js": "0.50.0", + "android": "6.7.0", + "ios": "4.6.0" + }, + "mapbox:trackposition": false, + "mapbox:groups": { + "f51b507d2a17e572c70a5db74b0fec7e": { + "name": "Base", + "collapsed": false + }, + "3f48b8dc54ff2e6544b9ef9cedbf2990": { + "name": "Streets", + "collapsed": true + }, + "29bb589e8d1b9b402583363648b70302": { + "name": "Buildings", + "collapsed": true + }, + "3c26e9cbc75335c6f0ba8de5439cf1fa": { + "name": "Country borders", + "collapsed": true + }, + "7b44201d7f1682d99f7140188aff23ce": { + "name": "Labels", + "collapsed": true + }, + "24306bdccbff03e2ee08d5d1a4ca7312": { + "name": "Street name", + "collapsed": true + }, + "124a9d7a8e5226775d947c592110dfad": { + "name": "POI", + "collapsed": true + } + }, + "mapbox:uiParadigm": "layers", + "maputnik:renderer": "mbgljs" + }, + "center": [ + 12.819420849458652, + 50.03325860617235 + ], + "zoom": 3.315829104862067, + "bearing": 0, + "pitch": 1.5, + "light": { + "intensity": 0.5, + "color": "hsl(0, 0%, 100%)", + "anchor": "viewport" + }, + "sources": { + "openmaptiles": { + "type": "vector", + "url": "https://tiles.stadiamaps.com/data/openmaptiles.json" + }, + "terrain": { + "type": "raster-dem", + "tiles": [ + "https://tiles.stadiamaps.com/data/terrarium/{z}/{x}/{y}.png" + ], + "minzoom": 0, + "maxzoom": 12, + "tileSize": 256, + "encoding": "terrarium" + }, + "global": { + "type": "vector", + "tiles": [ + "https://tiles.stadiamaps.com/data/global_landcover_v1/{z}/{x}/{y}.pbf" + ], + "minzoom": 0, + "maxzoom": 6 + } + }, + "sprite": "asset://sprites", + "glyphs": "asset://{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "layout": { + "visibility": "visible" + }, + "paint": { + "background-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 4, + "hsl(43, 30%, 91%)", + 5, + "hsl(0, 0%, 96%)", + 8, + "hsl(0, 0%, 96%)", + 9, + "#efeee8", + 16, + "hsl(0, 0%, 95%)", + 18, + "#f8f9fb" + ] + } + }, + { + "id": "global_grass", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill", + "maputnik:comment": "Stadia specific" + }, + "source": "global", + "source-layer": "global_landcover", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "grass" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 30%, 90%)", + 11, + "hsl(107, 30%, 94%)", + 12.5, + "hsl(107, 30%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "grass", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "grass" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 30%, 90%)", + 11, + "hsl(107, 30%, 94%)", + 12.5, + "hsl(107, 30%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "global_forest", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill", + "maputnik:comment": "Stadia specific" + }, + "source": "global", + "source-layer": "global_landcover", + "filter": [ + "==", + [ + "get", + "class" + ], + "wood" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 42%, 86%)", + 11, + "hsl(107, 47%, 94%)", + 12.5, + "hsl(107, 47%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "forrest", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": [ + "==", + [ + "get", + "class" + ], + "wood" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + "hsl(124, 42%, 86%)", + 11, + "hsl(107, 47%, 94%)", + 12.5, + "hsl(107, 47%, 94%)", + 13.5, + "hsl(45, 12%, 93%)" + ] + } + }, + { + "id": "national_park", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "park", + "filter": [ + "all" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(106, 58%, 85%)", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 11.5, + 0 + ] + } + }, + { + "id": "global_snow", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "global", + "source-layer": "global_landcover", + "minzoom": 0, + "maxzoom": 6, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "ice" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#f9fafc" + } + }, + { + "id": "snow", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "minzoom": 6, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "ice" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#f9fafc" + } + }, + { + "id": "hillshade", + "type": "hillshade", + "source": "terrain", + "maxzoom": 12, + "layout": { + "visibility": "visible" + }, + "paint": { + "hillshade-illumination-anchor": "viewport", + "hillshade-exaggeration": 0.1 + }, + "metadata": { + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "park", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": [ + "match", + [ + "get", + "subclass" + ], + [ + "scrub", + "park" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#c1ecaf" + } + }, + { + "id": "pitch", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.natural.terrain", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "pitch" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#c8efbb" + } + }, + { + "id": "landuse", + "type": "fill", + "metadata": { + "mapbox:group": "f51b507d2a17e572c70a5db74b0fec7e", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "school", + "hospital" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(202, 26%, 94%)" + } + }, + { + "id": "airport", + "type": "fill", + "source": "openmaptiles", + "source-layer": "aeroway", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(202, 26%, 94%)" + }, + "metadata": { + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "path", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill", + "maputnik:comment": "unpaved paths" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 14, + "maxzoom": 24, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 34%, 66%)", + "line-dasharray": [ + 4, + 2 + ] + } + }, + { + "id": "waterway-other", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "!in", + "class", + "canal", + "river", + "stream" + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "hsl(206, 100%, 83%)", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 2 + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "waterway-stream-canal", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "in", + "class", + "canal", + "stream" + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "hsl(206, 100%, 83%)", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 6 + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "waterway-river", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "==", + "class", + "river" + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "hsl(206, 100%, 83%)", + "line-width": { + "base": 1.2, + "stops": [ + [ + 10, + 0.8 + ], + [ + 20, + 6 + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "water-offset", + "type": "fill", + "source": "openmaptiles", + "source-layer": "water", + "minzoom": 6, + "maxzoom": 8, + "filter": [ + "==", + "$type", + "Polygon" + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(206, 100%, 83%)", + "fill-opacity": 1, + "fill-translate": { + "base": 1, + "stops": [ + [ + 6, + [ + 2, + 0 + ] + ], + [ + 8, + [ + 0, + 0 + ] + ] + ] + } + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "water", + "type": "fill", + "source": "openmaptiles", + "source-layer": "water", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(206, 100%, 83%)" + }, + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "steps", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "subclass" + ], + [ + "steps" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 5%, 66%)", + "line-dasharray": [ + 1, + 1 + ], + "line-gap-width": 1 + } + }, + { + "id": "platform", + "type": "fill", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.rail", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "platform" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(2, 20%, 92%)", + 16, + "hsl(2, 95%, 92%)" + ], + "fill-outline-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(1, 10%, 76%)", + 16, + "hsl(1, 74%, 76%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0, + 16, + 1 + ] + } + }, + { + "id": "primary_tunnel_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brun" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0, + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "#cbcccd" + } + }, + { + "id": "primary_tunnel", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "hsl(0, 0%, 89%)" + } + }, + { + "id": "aeroway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)" + } + }, + { + "id": "service_road", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "service" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)" + } + }, + { + "id": "pedestrian_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-color": "#e3e3e3", + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 1 + ] + } + }, + { + "id": "street_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ], + "line-color": "#e3e3e3" + } + }, + { + "id": "secondary_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "ok" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ], + "line-color": "#e3e3e3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 1, + 20, + 2 + ] + } + }, + { + "id": "primary_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-color": "#ecd283" + } + }, + { + "id": "motorway_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ], + "line-color": "#ecd283", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15, + 2 + ] + } + }, + { + "id": "railway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "any", + [ + "match", + [ + "get", + "class" + ], + [ + "rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "subclass" + ], + [ + "light_rail", + "tram" + ], + true, + false + ] + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(220, 4%, 85%)" + } + }, + { + "id": "pedestrian", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 1 + ] + } + }, + { + "id": "street", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ] + } + }, + { + "id": "secondary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ] + } + }, + { + "id": "primary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ] + } + }, + { + "id": "motorway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffeba3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ] + } + }, + { + "id": "primary_bridge_border", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "bridge" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-gap-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-color": "hsl(45, 73%, 72%)" + } + }, + { + "id": "primary_bridge", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "bridge" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ] + } + }, + { + "id": "building", + "type": "fill", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "building", + "filter": [ + "all" + ], + "layout": {}, + "paint": { + "fill-color": "#ededed", + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 17, + 1 + ] + } + }, + { + "id": "building_border", + "type": "line", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "#f8e1c7 for store, retail, church, kiosk, civic, commercial, hotel, supermarket, pub could not be ported (no appropriate metadata in `building` style spec)" + }, + "source": "openmaptiles", + "source-layer": "building", + "filter": [ + "all" + ], + "layout": {}, + "paint": { + "line-color": [ + "match", + [ + "get", + "type" + ], + [ + "store", + "retail", + "church", + "kiosk", + "civic", + "commercial", + "hotel", + "supermarket", + "pub" + ], + "#f8e1c7", + "#dcdcdc" + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 17, + 1 + ] + } + }, + { + "id": "building_3d", + "type": "fill-extrusion", + "metadata": { + "mapbox:group": "29bb589e8d1b9b402583363648b70302", + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "building", + "filter": [ + "!=", + [ + "get", + "hide_3d" + ], + true + ], + "layout": {}, + "paint": { + "fill-extrusion-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + [ + "get", + "render_height" + ] + ], + "fill-extrusion-opacity": 0.3, + "fill-extrusion-color": "hsl(0, 0%, 93%)" + } + }, + { + "id": "admin_0", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "maritime=false filter could not be ported due to missing attributes in `boundary` layer" + }, + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [ + "match", + [ + "get", + "admin_level" + ], + [ + 2 + ], + true, + false + ], + [ + "!=", + [ + "get", + "maritime" + ], + 1 + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + 1 + ], + "hsl(0, 24%, 48%)", + "#787a7b" + ] + } + }, + { + "id": "admin_1", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [ + "match", + [ + "get", + "admin_level" + ], + [ + 3, + 4 + ], + true, + false + ], + [ + "!=", + [ + "get", + "maritime" + ], + 1 + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + 1 + ], + "hsl(0, 24%, 48%)", + "#787a7b" + ], + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "river_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 13, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "river" + ], + true, + false + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "symbol-placement": "line", + "symbol-spacing": 500, + "text-font": [ + "Roboto Regular" + ] + }, + "paint": { + "text-color": "#5083c1", + "text-halo-color": "#5083c1", + "text-halo-blur": 1 + } + }, + { + "id": "city_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-optional": false, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "left", + "text-offset": [ + 0.5, + 0.1 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "left", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "right", + "text-offset": [ + -0.5, + 0.1 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "right", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + 0, + 0.4 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "top", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + 8, + "" + ], + "text-transform": [ + "step", + [ + "get", + "rank" + ], + "none", + 15, + "uppercase" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0, + -0.2 + ] + ], + 8, + [ + "literal", + [ + 0, + 0 + ] + ] + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + "bottom", + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "get", + "rank" + ], + 0, + 0, + 8, + 0, + 12, + 0.1, + 16, + 0.2 + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "get", + "rank" + ], + 25 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 100%)", + "icon-opacity": 0.8 + } + }, + { + "id": "park_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 17, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-size": 14 + }, + "paint": { + "text-color": "#297925", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "road-number-shield", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "ref" + ], + [ + "<=", + [ + "get", + "ref_length" + ], + 6 + ] + ], + "layout": { + "text-size": 9, + "icon-image": [ + "case", + [ + "match", + [ + "get", + "network" + ], + [ + "us-interstate" + ], + true, + false + ], + [ + "concat", + "shield_", + [ + "get", + "network" + ], + "_", + [ + "get", + "ref_length" + ] + ], + [ + "concat", + "shield_rectangle-white_", + [ + "get", + "ref_length" + ] + ] + ], + "icon-rotation-alignment": "viewport", + "text-font": [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + [ + "literal", + [ + "Roboto Bold" + ] + ], + [ + "black" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + [ + "literal", + [ + "Roboto Bold" + ] + ] + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" + ], + "text-offset": [ + 0, + 0.1 + ], + "text-rotation-alignment": "viewport", + "icon-size": 0.75, + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05, + "visibility": "visible", + "icon-padding": 10 + }, + "paint": { + "text-color": [ + "case", + [ + "match", + [ + "get", + "network" + ], + [ + "us-interstate" + ], + true, + false + ], + "#ffffff", + "#000000" + ] + } + }, + { + "id": "country_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "country" + ], + true, + false + ], + "layout": { + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 1, + 0, + 3, + 0.15 + ], + "text-font": [ + "Roboto Medium" + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 1, + 12, + 7, + [ + "/", + 30, + [ + "get", + "rank" + ] + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": "hsl(0, 0%, 10%)", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1, + "text-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + 1, + 7, + 0 + ] + } + }, + { + "id": "pedestrian_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 16, + "filter": [ + "any", + [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + [ + "match", + [ + "get", + "subclass" + ], + "platform", + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 17, + 10, + 22, + 14 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "#575757", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "street_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 6, + 16, + 10 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "#575757", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "secondary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 8, + 16, + 13 + ], + "symbol-spacing": 300, + "text-padding": 25 + }, + "paint": { + "text-color": "hsl(196, 0%, 34%)", + "text-halo-width": 1, + "text-halo-color": "#ffffff", + "text-halo-blur": 1 + } + }, + { + "id": "primary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 10, + 18, + 14 + ], + "symbol-spacing": 800, + "text-padding": 50 + }, + "paint": { + "text-color": "#6e481d", + "text-halo-width": 1, + "text-halo-color": "#ffffff", + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-optional": false, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + 0.5 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "top", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_above", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-optional": false, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + -2 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "bottom", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "right", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + -1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + -1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "right", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "left", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + 1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + 1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "left", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 31%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "#737b9b", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "#c77d57", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 44%)", + [ + "hospital", + "doctors" + ], + "#a47172", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 48%)", + "#67747b" + ] + ], + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + } + ], + "created": "2019-04-15T08:41:40.148Z", + "modified": "2020-09-05T19:42:03.856Z", + "id": "cjui4020201oo1fmca7yuwbor", + "owner": "microg", + "visibility": "public", + "protected": false, + "draft": false +} diff --git a/artwork/styles/style-microg-satellite-mapbox.json b/artwork/styles/style-microg-satellite-mapbox.json new file mode 100644 index 0000000..accb627 --- /dev/null +++ b/artwork/styles/style-microg-satellite-mapbox.json @@ -0,0 +1,3489 @@ +{ + "version": 8, + "name": "Mountain View Satellite", + "metadata": { + "mapbox:origin": "basic-template", + "mapbox:autocomposite": true, + "mapbox:type": "template", + "mapbox:sdk-support": { + "js": "0.50.0", + "android": "6.7.0", + "ios": "4.6.0" + }, + "mapbox:trackposition": false, + "mapbox:groups": { + "f51b507d2a17e572c70a5db74b0fec7e": { + "name": "Base", + "collapsed": true + }, + "3f48b8dc54ff2e6544b9ef9cedbf2990": { + "name": "Streets", + "collapsed": false + }, + "29bb589e8d1b9b402583363648b70302": { + "name": "Buildings", + "collapsed": true + }, + "3c26e9cbc75335c6f0ba8de5439cf1fa": { + "name": "Country borders", + "collapsed": true + }, + "7b44201d7f1682d99f7140188aff23ce": { + "name": "Labels", + "collapsed": true + }, + "24306bdccbff03e2ee08d5d1a4ca7312": { + "name": "Street name", + "collapsed": false + }, + "124a9d7a8e5226775d947c592110dfad": { + "name": "POI", + "collapsed": true + } + }, + "mapbox:uiParadigm": "layers" + }, + "center": [ + 12.819420849458652, + 50.03325860617235 + ], + "zoom": 3.315829104862067, + "bearing": 0, + "pitch": 1.5, + "light": { + "intensity": 0.5, + "color": "hsl(0, 0%, 0%)" + }, + "sources": { + "mapbox://mapbox.satellite": { + "url": "mapbox://mapbox.satellite", + "type": "raster", + "tileSize": 256 + }, + "composite": { + "url": "mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2", + "type": "vector" + } + }, + "sprite": "mapbox://sprites/microg/cjxgloted25ap1ct4uex7m6hi/8fkcj5fgn4mftlzuak3guz1f9", + "glyphs": "mapbox://fonts/microg/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "raster", + "source": "mapbox://mapbox.satellite", + "layout": {}, + "paint": {}, + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "path", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ], + [ + "match", + [ + "get", + "type" + ], + [ + "platform", + "steps" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 34%, 66%)", + "line-dasharray": [ + 4, + 2 + ], + "line-opacity": 0.3 + } + }, + { + "id": "steps", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ], + [ + "match", + [ + "get", + "type" + ], + [ + "steps" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 5%, 66%)", + "line-dasharray": [ + 1, + 1 + ], + "line-gap-width": 1, + "line-opacity": 0.3 + } + }, + { + "id": "platform", + "type": "fill", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.rail", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "type" + ], + [ + "platform" + ], + true, + false + ], + "layout": {}, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(2, 20%, 92%)", + 16, + "hsl(2, 95%, 92%)" + ], + "fill-outline-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(1, 10%, 76%)", + 16, + "hsl(1, 74%, 76%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0, + 16, + 0.3 + ] + } + }, + { + "id": "primary_tunnel", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "hsl(0, 0%, 89%)", + "line-opacity": 0.3 + } + }, + { + "id": "aeroway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "aeroway", + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)", + "line-opacity": 0.3 + } + }, + { + "id": "service_road", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "service" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)", + "line-opacity": 0.3 + } + }, + { + "id": "railway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail", + "service_rail" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(220, 4%, 85%)", + "line-opacity": 0.3 + } + }, + { + "id": "pedestrian", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "platform" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(0, 0%, 100%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 0.3 + ] + } + }, + { + "id": "street", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "street" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(0, 0%, 100%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ], + "line-opacity": 0.3 + } + }, + { + "id": "secondary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "secondary_link", + "trunk_link", + "tertiary", + "tertiary_link", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(0, 0%, 100%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ], + "line-opacity": 0.3 + } + }, + { + "id": "primary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary_link", + "primary", + "motorway_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-opacity": 0.3 + } + }, + { + "id": "motorway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(47, 100%, 82%)", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ], + "line-opacity": 0.3 + } + }, + { + "id": "admin_0", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "admin", + "filter": [ + "all", + [ + "match", + [ + "get", + "maritime" + ], + [ + "false" + ], + true, + false + ], + [ + "match", + [ + "get", + "admin_level" + ], + [ + 0 + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + true + ], + "hsl(0, 24%, 85%)", + "hsl(200, 1%, 85%)" + ] + } + }, + { + "id": "admin_1", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "composite", + "source-layer": "admin", + "filter": [ + "all", + [ + "match", + [ + "get", + "maritime" + ], + [ + "false" + ], + true, + false + ], + [ + "match", + [ + "get", + "admin_level" + ], + [ + 1 + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + true + ], + "hsl(0, 24%, 85%)", + "hsl(200, 1%, 85%)" + ], + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "river_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "natural_label", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "river" + ], + true, + false + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "symbol-placement": "line", + "symbol-spacing": 500, + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ] + }, + "paint": { + "text-color": "#5083c1", + "text-halo-color": "#5083c1", + "text-halo-blur": 1 + } + }, + { + "id": "city_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-optional": true, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium", + "Arial Unicode MS Regular" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular", + "Arial Unicode MS Regular" + ] + ] + ], + "text-justify": "left", + "text-offset": [ + 0.5, + 0.1 + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": "left", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "-", + 100, + [ + "get", + "symbolrank" + ] + ], + 5 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "icon-opacity": 0.8, + "text-halo-color": "hsl(0, 1%, 0%)" + } + }, + { + "id": "city_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium", + "Arial Unicode MS Regular" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular", + "Arial Unicode MS Regular" + ] + ] + ], + "text-justify": "right", + "text-offset": [ + -0.5, + 0.1 + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": "right", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "-", + 100, + [ + "get", + "symbolrank" + ] + ], + 5 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "icon-opacity": 0.8, + "text-halo-color": "hsl(0, 1%, 0%)" + } + }, + { + "id": "city_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium", + "Arial Unicode MS Regular" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular", + "Arial Unicode MS Regular" + ] + ] + ], + "text-offset": [ + 0, + 0.4 + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": "top", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "-", + 100, + [ + "get", + "symbolrank" + ] + ], + 5 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "icon-opacity": 0.8, + "text-halo-color": "hsl(0, 1%, 0%)" + } + }, + { + "id": "city_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "settlement", + "settlement_subdivision" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "symbolrank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "symbolrank" + ], + 4 + ] + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + [ + 0, + 2 + ], + "capital", + "city" + ], + 8, + "" + ], + "text-transform": [ + "step", + [ + "get", + "symbolrank" + ], + "none", + 15, + "uppercase" + ], + "text-font": [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "Roboto Medium", + "Arial Unicode MS Regular" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular", + "Arial Unicode MS Regular" + ] + ] + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0, + -0.2 + ] + ], + 8, + [ + "literal", + [ + 0, + 0 + ] + ] + ], + "icon-size": [ + "/", + 5, + [ + "get", + "symbolrank" + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + "bottom", + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "get", + "symbolrank" + ], + 0, + 0, + 8, + 0, + 12, + 0.1, + 16, + 0.2 + ] + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "*", + [ + "get", + "symbolrank" + ], + 2 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "+", + [ + "-", + 100, + [ + "get", + "symbolrank" + ] + ], + 5 + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "icon-opacity": 0.8, + "text-halo-color": "hsl(0, 1%, 0%)" + } + }, + { + "id": "park_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-size": 14 + }, + "paint": { + "text-color": "#297925", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "road-number-shield", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.icon" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "ref" + ], + [ + "<=", + [ + "get", + "reflen" + ], + 6 + ] + ], + "layout": { + "text-size": 9, + "icon-image": [ + "case", + [ + "match", + [ + "get", + "shield" + ], + [ + "de-motorway", + "rectangle-green", + "rectangle-yellow", + "rectangle-white", + "rectangle-blue", + "rectangle-red", + "us-interstate" + ], + true, + false + ], + [ + "concat", + "shield_", + [ + "get", + "shield" + ], + "_", + [ + "get", + "reflen" + ] + ], + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + true, + false + ], + [ + "concat", + "shield_rectangle-blue_", + [ + "get", + "reflen" + ] + ], + [ + "concat", + "shield_rectangle-white_", + [ + "get", + "reflen" + ] + ] + ], + "icon-rotation-alignment": "viewport", + "text-font": [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + [ + "literal", + [ + "DIN Offc Pro Bold", + "Arial Unicode MS Regular" + ] + ], + [ + "black" + ], + [ + "literal", + [ + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" + ] + ], + [ + "literal", + [ + "DIN Offc Pro Bold", + "Arial Unicode MS Regular" + ] + ] + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" + ], + "text-rotation-alignment": "viewport", + "icon-size": 0.75, + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05 + }, + "paint": { + "text-color": [ + "case", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + true, + false + ], + "#ffffff", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "black" + ], + true, + false + ], + "hsl(0, 0%, 7%)", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "yellow" + ], + true, + false + ], + "hsl(50, 100%, 70%)", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "orange" + ], + true, + false + ], + "hsl(25, 100%, 75%)", + [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "blue" + ], + true, + false + ], + "hsl(230, 48%, 34%)", + "#ffffff" + ] + } + }, + { + "id": "country_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "place_label", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "country" + ], + true, + false + ], + "layout": { + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 1, + 0, + 3, + 0.15 + ], + "text-font": [ + "Roboto Medium", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 1, + 12, + 7, + [ + "/", + 100, + [ + "get", + "symbolrank" + ] + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + 1, + 7, + 0 + ], + "text-color": "hsl(0, 0%, 90%)", + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 1%, 0%)" + } + }, + { + "id": "pedestrian_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "minzoom": 16, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "match", + [ + "get", + "type" + ], + [ + "platform" + ], + false, + true + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 17, + 10, + 22, + 14 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "hsl(0, 0%, 86%)", + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "street_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 6, + 16, + 10 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "hsl(0, 0%, 86%)", + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "secondary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "secondary_link", + "tertiary_link", + "tertiary", + "trunk_link", + "trunk" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 8, + 16, + 13 + ], + "symbol-spacing": 300, + "text-padding": 25 + }, + "paint": { + "text-color": "hsl(196, 0%, 86%)", + "text-halo-width": 1, + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-blur": 1 + } + }, + { + "id": "primary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "road", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "primary_link" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 10, + 18, + 14 + ], + "symbol-spacing": 800, + "text-padding": 50 + }, + "paint": { + "text-color": "hsl(32, 58%, 93%)", + "text-halo-width": 1, + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-optional": true, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-offset": [ + 0, + 0.5 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "top", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "hsl(20, 50%, 65%)", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 65%)", + [ + "bank", + "parking", + "parking-garage" + ], + "hsl(228, 17%, 65%)", + [ + "hospital", + "doctor" + ], + "hsl(359, 22%, 65%)", + "hsl(201, 9%, 80%)" + ], + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_above", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-optional": true, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-offset": [ + 0, + -2 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "bottom", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "hsl(20, 50%, 65%)", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 65%)", + [ + "bank", + "parking", + "parking-garage" + ], + "hsl(228, 17%, 65%)", + [ + "hospital", + "doctor" + ], + "hsl(359, 22%, 65%)", + "hsl(201, 9%, 80%)" + ], + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-justify": "right", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + -1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + -1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "right", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "hsl(20, 50%, 65%)", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 65%)", + [ + "bank", + "parking", + "parking-garage" + ], + "hsl(228, 17%, 65%)", + [ + "hospital", + "doctor" + ], + "hsl(359, 22%, 65%)", + "hsl(201, 9%, 80%)" + ], + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + }, + "source": "composite", + "source-layer": "poi_label", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + [ + "/", + [ + "zoom" + ], + 4 + ] + ], + [ + "!", + [ + "all", + [ + "match", + [ + "get", + "maki" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "sizerank" + ], + 10 + ] + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "lodging", + "theatre", + "grocery", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "maki" + ] + ], + [ + "fitness-centre", + "golf", + "campsite", + "bowling-alley", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "stadium", + "dog-park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "parking", + "parking-garage" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "alcohol-shop", + "shop", + "shoe", + "convenience", + "clothing-store", + "jewelry-store" + ], + "poi_generic_blue", + [ + "casino", + "castle", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctor" + ], + "poi_generic_red", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant-noodle", + "fast-food", + "ice-cream" + ], + "poi_restaurant", + "poi_generic" + ], + "text-font": [ + "Roboto Regular", + "Arial Unicode MS Regular" + ], + "text-justify": "left", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + 1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + 1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "left", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "maki" + ], + [ + "museum", + "casino", + "castle", + "theatre", + "art-gallery", + "attraction", + "cinema", + "music", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "lodging" + ], + "#df7db1", + [ + "fitness-centre", + "golf", + "campsite", + "park", + "garden", + "farm", + "picnic-site", + "zoo", + "dog-park", + "stadium", + "bowling-alley", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "restaurant-pizza", + "restaurant-seafood", + "restaurant", + "restaurant-noodle", + "bar", + "cafe", + "fast-food", + "bakery", + "ice-cream" + ], + "hsl(20, 50%, 65%)", + [ + "shop", + "shoe", + "alcohol-shop", + "convenience", + "grocery", + "clothing-store", + "jewelry-store" + ], + "hsl(213, 40%, 65%)", + [ + "bank", + "parking", + "parking-garage" + ], + "hsl(228, 17%, 65%)", + [ + "hospital", + "doctor" + ], + "hsl(359, 22%, 65%)", + "hsl(201, 9%, 80%)" + ], + "text-halo-color": "hsl(0, 1%, 0%)", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + } + ], + "created": "2019-06-28T21:20:23.628Z", + "modified": "2020-09-05T20:08:11.990Z", + "id": "cjxgloted25ap1ct4uex7m6hi", + "owner": "microg", + "visibility": "public", + "protected": false, + "draft": false +} diff --git a/artwork/styles/style-microg-satellite-stadia.json b/artwork/styles/style-microg-satellite-stadia.json new file mode 100644 index 0000000..ed9cc17 --- /dev/null +++ b/artwork/styles/style-microg-satellite-stadia.json @@ -0,0 +1,3632 @@ +{ + "version": 8, + "name": "Mountain View Full", + "metadata": { + "mapbox:origin": "basic-template", + "mapbox:autocomposite": true, + "mapbox:type": "template", + "mapbox:sdk-support": { + "js": "0.50.0", + "android": "6.7.0", + "ios": "4.6.0" + }, + "mapbox:trackposition": false, + "mapbox:groups": { + "f51b507d2a17e572c70a5db74b0fec7e": { + "name": "Base", + "collapsed": false + }, + "3f48b8dc54ff2e6544b9ef9cedbf2990": { + "name": "Streets", + "collapsed": true + }, + "29bb589e8d1b9b402583363648b70302": { + "name": "Buildings", + "collapsed": true + }, + "3c26e9cbc75335c6f0ba8de5439cf1fa": { + "name": "Country borders", + "collapsed": true + }, + "7b44201d7f1682d99f7140188aff23ce": { + "name": "Labels", + "collapsed": true + }, + "24306bdccbff03e2ee08d5d1a4ca7312": { + "name": "Street name", + "collapsed": true + }, + "124a9d7a8e5226775d947c592110dfad": { + "name": "POI", + "collapsed": true + } + }, + "mapbox:uiParadigm": "layers", + "maputnik:renderer": "mbgljs" + }, + "center": [ + 12.819420849458652, + 50.03325860617235 + ], + "zoom": 3.315829104862067, + "bearing": 0, + "pitch": 1.5, + "light": { + "intensity": 0.5, + "color": "hsl(0, 0%, 100%)", + "anchor": "viewport" + }, + "sources": { + "openmaptiles": { + "type": "vector", + "url": "https://tiles.stadiamaps.com/data/openmaptiles.json" + }, + "satellite": { + "attribution": "© CNES, Distribution Airbus DS, © Airbus DS, © PlanetObserver (Contains Copernicus Data)", + "type": "raster", + "tiles": [ + "https://tiles.stadiamaps.com/data/satellite/{z}/{x}/{y}.jpg" + ], + "minzoom": 0, + "maxzoom": 24 + } + }, + "sprite": "asset://sprites", + "glyphs": "asset://{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "layout": { + "visibility": "visible" + }, + "paint": { + "background-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 4, + "hsl(43, 30%, 91%)", + 5, + "hsl(0, 0%, 96%)", + 8, + "hsl(0, 0%, 96%)", + 9, + "#efeee8", + 16, + "hsl(0, 0%, 95%)", + 18, + "#f8f9fb" + ] + } + }, + { + "id": "satellite", + "type": "raster", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + }, + "source": "satellite" + }, + { + "id": "path", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill", + "maputnik:comment": "unpaved paths" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 14, + "maxzoom": 24, + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "path" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 34%, 66%)", + "line-dasharray": [ + 4, + 2 + ], + "line-opacity": 0.3 + } + }, + { + "id": "steps", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "subclass" + ], + [ + "steps" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsl(118, 5%, 66%)", + "line-dasharray": [ + 1, + 1 + ], + "line-gap-width": 1, + "line-opacity": 0.3 + } + }, + { + "id": "platform", + "type": "fill", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.rail", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "platform" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(2, 20%, 92%)", + 16, + "hsl(2, 95%, 92%)" + ], + "fill-outline-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(1, 10%, 76%)", + 16, + "hsl(1, 74%, 76%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0, + 16, + 0.3 + ] + } + }, + { + "id": "primary_tunnel", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + true, + false + ] + ], + "layout": {}, + "paint": { + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 4, + 14, + 6, + 16, + 10, + 22, + 64 + ], + "line-color": "hsl(0, 0%, 89%)", + "line-opacity": 0.3 + } + }, + { + "id": "aeroway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)", + "line-opacity": 0.3 + } + }, + { + "id": "service_road", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "service" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "hsla(0, 0%, 0%, 0.1)", + "line-opacity": 0.3 + } + }, + { + "id": "railway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "any", + [ + "match", + [ + "get", + "class" + ], + [ + "rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "subclass" + ], + [ + "light_rail", + "tram" + ], + true, + false + ] + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": {}, + "paint": { + "line-color": "hsl(220, 4%, 85%)", + "line-opacity": 0.3 + } + }, + { + "id": "pedestrian", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 1, + 16, + 4, + 22, + 32 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12.5, + 0, + 13.5, + 0.3 + ] + } + }, + { + "id": "street", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1, + 16, + 6, + 22, + 40 + ], + "line-opacity": 0.3 + } + }, + { + "id": "secondary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1, + 17, + 10, + 22, + 48 + ], + "line-opacity": 0.3 + } + }, + { + "id": "primary", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ], + [ + "match", + [ + "get", + "brunnel" + ], + [ + "tunnel" + ], + false, + true + ] + ], + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": [ + "step", + [ + "zoom" + ], + "hsl(50, 100%, 75%)", + 7, + "hsl(50, 100%, 85%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 1, + 16, + 8, + 22, + 64 + ], + "line-opacity": 0.3 + } + }, + { + "id": "motorway", + "type": "line", + "metadata": { + "mapbox:group": "3f48b8dc54ff2e6544b9ef9cedbf2990", + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "motorway" + ], + true, + false + ], + "layout": {}, + "paint": { + "line-color": "#ffeba3", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 15.5, + 8, + 22, + 78 + ], + "line-opacity": 0.3 + } + }, + { + "id": "admin_0", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke", + "maputnik:comment": "maritime=false filter could not be ported due to missing attributes in `boundary` layer" + }, + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [ + "match", + [ + "get", + "admin_level" + ], + [ + 2 + ], + true, + false + ], + [ + "!=", + [ + "get", + "maritime" + ], + 1 + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + 1 + ], + "hsl(0, 24%, 48%)", + "hsl(200, 0%, 80%)" + ] + } + }, + { + "id": "admin_1", + "type": "line", + "metadata": { + "mapbox:group": "3c26e9cbc75335c6f0ba8de5439cf1fa", + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + }, + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [ + "match", + [ + "get", + "admin_level" + ], + [ + 3, + 4 + ], + true, + false + ], + [ + "!=", + [ + "get", + "maritime" + ], + 1 + ] + ], + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": [ + "case", + [ + "==", + [ + "get", + "disputed" + ], + 1 + ], + "hsl(0, 24%, 48%)", + "hsl(200, 0%, 80%)" + ], + "line-dasharray": [ + 1, + 1 + ] + } + }, + { + "id": "river_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 13, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "river" + ], + true, + false + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "symbol-placement": "line", + "symbol-spacing": 500, + "text-font": [ + "Roboto Regular" + ] + }, + "paint": { + "text-color": "#5083c1", + "text-halo-color": "#5083c1", + "text-halo-blur": 1 + } + }, + { + "id": "city_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-optional": false, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "left", + "text-offset": [ + 0.5, + 0.1 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "left", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "get", + "rank" + ], + 25 + ] + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 0%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-justify": "right", + "text-offset": [ + -0.5, + 0.1 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "right", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "get", + "rank" + ], + 25 + ] + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 1%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 8, + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "/", + [ + "zoom" + ], + 3 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + 0, + 0.4 + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": "top", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "get", + "rank" + ], + 25 + ] + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 0%)", + "icon-opacity": 0.8 + } + }, + { + "id": "city_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + [ + "<=", + [ + "get", + "rank" + ], + [ + "*", + [ + "zoom" + ], + 1.5 + ] + ], + [ + "match", + [ + "get", + "class" + ], + [ + "city", + "town", + "village", + "hamlet", + "suburb", + "quarter", + "neighbourhood" + ], + true, + false + ] + ], + "layout": { + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "-", + 14, + [ + "max", + 0, + [ + "-", + [ + "get", + "rank" + ], + 8 + ] + ] + ], + 22, + [ + "-", + 20, + [ + "/", + [ + "get", + "rank" + ], + 4 + ] + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + [ + 2 + ], + "capital", + "city" + ], + 8, + "" + ], + "text-transform": [ + "step", + [ + "get", + "rank" + ], + "none", + 15, + "uppercase" + ], + "text-font": [ + "step", + [ + "get", + "rank" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + 10, + [ + "literal", + [ + "Roboto Regular" + ] + ] + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0, + -0.2 + ] + ], + 8, + [ + "literal", + [ + 0, + 0 + ] + ] + ], + "icon-size": [ + "/", + 6, + [ + "+", + [ + "get", + "rank" + ], + 7 + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + "bottom", + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "get", + "rank" + ], + 0, + 0, + 8, + 0, + 12, + 0.1, + 16, + 0.2 + ], + "visibility": "visible" + }, + "paint": { + "text-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "*", + [ + "get", + "rank" + ], + 2 + ], + 5 + ] + ], + "%)" + ], + 22, + [ + "concat", + "hsl(213, 11%, ", + [ + "-", + 100, + [ + "+", + [ + "get", + "rank" + ], + 25 + ] + ], + "%)" + ] + ], + "text-halo-width": 1, + "text-halo-blur": 1, + "text-halo-color": "hsl(0, 0%, 0%)", + "icon-opacity": 0.8 + } + }, + { + "id": "park_name", + "type": "symbol", + "metadata": { + "mapbox:group": "7b44201d7f1682d99f7140188aff23ce", + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 17, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + "layout": { + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-size": 14 + }, + "paint": { + "text-color": "#297925", + "text-halo-color": "hsl(0, 0%, 100%)", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "road-number-shield", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road", + "microg:gms-type-element": "labels.icon" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "ref" + ], + [ + "<=", + [ + "get", + "ref_length" + ], + 6 + ] + ], + "layout": { + "text-size": 9, + "icon-image": [ + "case", + [ + "match", + [ + "get", + "network" + ], + [ + "us-interstate" + ], + true, + false + ], + [ + "concat", + "shield_", + [ + "get", + "network" + ], + "_", + [ + "get", + "ref_length" + ] + ], + [ + "concat", + "shield_rectangle-white_", + [ + "get", + "ref_length" + ] + ] + ], + "icon-rotation-alignment": "viewport", + "text-font": [ + "match", + [ + "get", + "shield_text_color" + ], + [ + "white" + ], + [ + "literal", + [ + "Roboto Bold" + ] + ], + [ + "black" + ], + [ + "literal", + [ + "Roboto Medium" + ] + ], + [ + "literal", + [ + "Roboto Bold" + ] + ] + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" + ], + "text-offset": [ + 0, + 0.1 + ], + "text-rotation-alignment": "viewport", + "icon-size": 0.75, + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05, + "visibility": "visible", + "icon-padding": 10 + }, + "paint": { + "text-color": [ + "case", + [ + "match", + [ + "get", + "network" + ], + [ + "us-interstate" + ], + true, + false + ], + "#ffffff", + "#000000" + ] + } + }, + { + "id": "country_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "country" + ], + true, + false + ], + "layout": { + "text-letter-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 1, + 0, + 3, + 0.15 + ], + "text-font": [ + "Roboto Medium" + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 1, + 12, + 7, + [ + "/", + 30, + [ + "get", + "rank" + ] + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "visibility": "visible" + }, + "paint": { + "text-color": "hsl(0, 0%, 90%)", + "text-halo-color": "hsl(0, 0%, 0%)", + "text-halo-width": 1, + "text-halo-blur": 1, + "text-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + 1, + 7, + 0 + ] + } + }, + { + "id": "pedestrian_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 16, + "filter": [ + "any", + [ + "all", + [ + "match", + [ + "get", + "subclass" + ], + [ + "pedestrian" + ], + true, + false + ], + [ + "==", + [ + "get", + "surface" + ], + "paved" + ] + ], + [ + "match", + [ + "get", + "subclass" + ], + "platform", + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 17, + 10, + 22, + 14 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "hsl(0, 0%, 86%)", + "text-halo-color": "#000000", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "street_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "minor" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 6, + 16, + 10 + ], + "text-padding": 5 + }, + "paint": { + "text-color": "hsl(0, 0%, 86%)", + "text-halo-color": "#000000", + "text-halo-width": 1, + "text-halo-blur": 1 + } + }, + { + "id": "secondary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary", + "trunk" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 8, + 16, + 13 + ], + "symbol-spacing": 300, + "text-padding": 25 + }, + "paint": { + "text-color": "hsl(0, 0%, 86%)", + "text-halo-width": 1, + "text-halo-color": "#000000", + "text-halo-blur": 1 + } + }, + { + "id": "primary_name", + "type": "symbol", + "metadata": { + "mapbox:group": "24306bdccbff03e2ee08d5d1a4ca7312", + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.text" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary" + ], + true, + false + ] + ], + "layout": { + "text-field": [ + "get", + "name" + ], + "symbol-placement": "line", + "text-font": [ + "Roboto Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 10, + 18, + 14 + ], + "symbol-spacing": 800, + "text-padding": 50 + }, + "paint": { + "text-color": "hsl(32, 58%, 93%)", + "text-halo-width": 1, + "text-halo-color": "#000000", + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_below", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-optional": false, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + 0.5 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "top", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "hsl(228, 17%, 65%)", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "hsl(20, 50%, 65%)", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "hospital", + "doctors" + ], + "hsl(359, 22%, 65%)", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 65%)", + "hsl(201, 9%, 80%)" + ] + ], + "text-halo-color": "#000000", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_above", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-optional": false, + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-offset": [ + 0, + -2 + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "bottom", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "hsl(228, 17%, 65%)", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "hsl(20, 50%, 65%)", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "hospital", + "doctors" + ], + "hsl(359, 22%, 65%)", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 65%)", + "hsl(201, 9%, 80%)" + ] + ], + "text-halo-color": "#000000", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_left", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "right", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + -1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + -1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "right", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "hsl(228, 17%, 65%)", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "hsl(20, 50%, 65%)", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "hospital", + "doctors" + ], + "hsl(359, 22%, 65%)", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 65%)", + "hsl(201, 9%, 80%)" + ] + ], + "text-halo-color": "#000000", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + }, + { + "id": "poi_label_right", + "type": "symbol", + "metadata": { + "mapbox:group": "124a9d7a8e5226775d947c592110dfad", + "microg:gms-type-element": "labels.text", + "microg:gms-type-feature": "poi" + }, + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + [ + "has", + "name" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "bus", + "railway" + ], + false, + true + ], + [ + "any", + [ + "!=", + [ + "match", + [ + "get", + "class" + ], + [ + "park", + "cemetery" + ], + true, + false + ], + [ + "<=", + [ + "get", + "rank" + ], + 250 + ] + ], + [ + ">=", + [ + "zoom" + ], + 16 + ] + ] + ], + "layout": { + "text-line-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 15, + 1.2 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 13, + 15, + 14 + ], + "icon-offset": [ + 0, + -36 + ], + "icon-image": [ + "match", + [ + "get", + "subclass" + ], + [ + "museum", + "theatre", + "restaurant" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "poi_generic_green", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "poi_generic_purple", + [ + "bar", + "cafe", + "bakery" + ], + "poi_generic_orange", + [ + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "poi_generic_teal", + [ + "hospital", + "doctors" + ], + "poi_generic_red", + [ + "fast_food", + "ice_cream" + ], + "poi_restaurant", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging", + "grocery" + ], + [ + "concat", + "poi_", + [ + "get", + "class" + ] + ], + [ + "clothing_store", + "shop" + ], + "poi_generic_blue", + "poi_generic" + ] + ], + "text-font": [ + "Roboto Regular" + ], + "text-justify": "left", + "text-offset": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "literal", + [ + 1.1, + -0.7 + ] + ], + 15, + [ + "literal", + [ + 1.1, + -0.9 + ] + ] + ], + "icon-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 0.25, + 15, + 0.32 + ], + "text-anchor": "left", + "text-field": [ + "to-string", + [ + "get", + "name" + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 30, + 17, + 5 + ] + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "subclass" + ], + [ + "fitness_centre", + "golf_course", + "camp_site", + "bowling_alley", + "park", + "garden", + "farm", + "picnic_site", + "zoo", + "stadium", + "dog_park", + "pitch", + "cemetery" + ], + "hsl(117, 53%, 65%)", + [ + "bank", + "atm", + "parking", + "toilets", + "garages" + ], + "hsl(228, 17%, 65%)", + [ + "bar", + "cafe", + "bakery", + "fast_food", + "restaurant", + "ice_cream" + ], + "hsl(20, 50%, 65%)", + [ + "museum", + "theatre", + "casino", + "castle", + "gallery", + "attraction", + "cinema", + "music_venue", + "monument" + ], + "hsl(186, 78%, 65%)", + [ + "hospital", + "doctors" + ], + "hsl(359, 22%, 65%)", + [ + "match", + [ + "get", + "class" + ], + [ + "lodging" + ], + "#df7db1", + [ + "grocery", + "clothing_store", + "shop" + ], + "hsl(213, 40%, 65%)", + "hsl(201, 9%, 80%)" + ] + ], + "text-halo-color": "#000000", + "text-halo-width": 1, + "icon-translate": [ + 0, + 0 + ], + "text-translate": [ + 0, + 0 + ], + "text-halo-blur": 1 + } + } + ], + "created": "2019-04-15T08:41:40.148Z", + "modified": "2020-09-05T19:42:03.856Z", + "id": "cjui4020201oo1fmca7yuwbor", + "owner": "microg", + "visibility": "public", + "protected": false, + "draft": false +} diff --git a/artwork/styles/style-stadia-outdoors.json b/artwork/styles/style-stadia-outdoors.json new file mode 100644 index 0000000..9fe7498 --- /dev/null +++ b/artwork/styles/style-stadia-outdoors.json @@ -0,0 +1,5912 @@ +{ + "bearing": 0, + "center": [ + 8.542, + 47.372 + ], + "glyphs": "https://tiles.stadiamaps.com/fonts/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "paint": { + "background-color": "#f9f3ea" + }, + "type": "background", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "subclass", + "glacier" + ], + "id": "landcover-glacier", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#fff", + "fill-opacity": { + "base": 1, + "stops": [ + [ + 0, + 0.9 + ], + [ + 10, + 0.3 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "$type", + "Polygon" + ], + "id": "park", + "paint": { + "fill-color": "#d8e8c8", + "fill-opacity": { + "base": 1.8, + "stops": [ + [ + 6, + 0.5 + ], + [ + 12, + 0.2 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "park", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "cemetery" + ], + "id": "landuse-cemetery", + "paint": { + "fill-color": "#e0e4dd" + }, + "source": "openmaptiles", + "source-layer": "landuse", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "railway" + ], + "id": "landuse-railway", + "paint": { + "fill-color": "hsla(30, 19%, 90%, 0.4)" + }, + "source": "openmaptiles", + "source-layer": "landuse", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "in", + "class", + "public_park", + "national_park", + "nature_reserve" + ], + "id": "landcover-grass-park", + "paint": { + "fill-antialias": { + "base": 1, + "stops": [ + [ + 0, + false + ], + [ + 9, + true + ] + ] + }, + "fill-color": "#d5e8c2", + "fill-outline-color": "hsla(0, 0%, 0%, 0.1)" + }, + "source": "openmaptiles", + "source-layer": "park", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "rock" + ] + ], + "id": "landcover-rock", + "paint": { + "fill-color": "hsla(0, 0%, 85%, 1)", + "fill-opacity": 1, + "fill-outline-color": "hsla(0, 0%, 0%, 0.1)" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "sand" + ] + ], + "id": "landcover-sand", + "paint": { + "fill-color": "hsla(44, 70%, 87%, 1)", + "fill-opacity": 1, + "fill-outline-color": "hsla(0, 0%, 0%, 0.1)" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "wetland" + ], + "id": "landcover-wetland", + "paint": { + "fill-antialias": { + "base": 1, + "stops": [ + [ + 0, + false + ], + [ + 9, + true + ] + ] + }, + "fill-color": "#3D85C6", + "fill-opacity": 0.075, + "fill-outline-color": "hsla(0, 0%, 0%, 0.03)" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "wood" + ], + "id": "landcover-wood", + "paint": { + "fill-antialias": { + "base": 1, + "stops": [ + [ + 0, + false + ], + [ + 9, + true + ] + ] + }, + "fill-color": "#90d86c", + "fill-opacity": 0.15, + "fill-outline-color": "hsla(0, 0%, 0%, 0.2)" + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "grass" + ], + "id": "landcover-grass", + "paint": { + "fill-color": "#d8e8c8", + "fill-opacity": 1 + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "!in", + "class", + "canal", + "river", + "stream" + ], + "id": "waterway-other", + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 2 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "waterway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "in", + "class", + "canal", + "stream" + ], + "id": "waterway-stream-canal", + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 6 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "waterway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "river" + ], + "id": "waterway-river", + "layout": { + "line-cap": "round" + }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 10, + 0.8 + ], + [ + 20, + 6 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "waterway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "in", + "admin_level", + 4 + ], + [ + "!=", + "maritime", + 1 + ] + ], + "id": "boundary-land-level-4", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#9e9cab", + "line-dasharray": [ + 4, + 2, + 2, + 2 + ], + "line-opacity": 0.5, + "line-width": { + "base": 1.4, + "stops": [ + [ + 4, + 0.4 + ], + [ + 5, + 0.8 + ], + [ + 12, + 2.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "boundary", + "type": "line", + "metadata": { + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "admin_level", + 2 + ], + [ + "!=", + "maritime", + 1 + ], + [ + "!=", + "disputed", + 1 + ] + ], + "id": "boundary-land-level-2", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-color": "hsl(248, 7%, 66%)", + "line-width": { + "base": 1, + "stops": [ + [ + 0, + 0.6 + ], + [ + 4, + 1.4 + ], + [ + 5, + 2 + ], + [ + 12, + 4 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "boundary", + "type": "line", + "metadata": { + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "!=", + "maritime", + 1 + ], + [ + "==", + "disputed", + 1 + ] + ], + "id": "boundary-land-disputed", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-color": "hsl(248, 7%, 70%)", + "line-dasharray": [ + 1, + 3 + ], + "line-width": { + "base": 1, + "stops": [ + [ + 0, + 0.6 + ], + [ + 4, + 1.4 + ], + [ + 5, + 2 + ], + [ + 12, + 4 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "boundary", + "type": "line", + "metadata": { + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "==", + "$type", + "Polygon" + ], + "id": "water-offset", + "layout": { + "visibility": "visible" + }, + "maxzoom": 8, + "minzoom": 6, + "paint": { + "fill-color": "#a0c8f0", + "fill-opacity": 1, + "fill-translate": { + "base": 1, + "stops": [ + [ + 6, + [ + 2, + 0 + ] + ], + [ + 8, + [ + 0, + 0 + ] + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "water", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "water", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "hsl(210, 60%, 80%)" + }, + "source": "openmaptiles", + "source-layer": "water", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "$type", + "Polygon" + ], + "id": "park-outline", + "layout": {}, + "minzoom": 6, + "paint": { + "line-color": { + "base": 1, + "stops": [ + [ + 6, + "hsla(96, 40%, 49%, 0.36)" + ], + [ + 8, + "hsla(96, 40%, 49%, 0.66)" + ] + ] + }, + "line-dasharray": [ + 3, + 3 + ] + }, + "source": "openmaptiles", + "source-layer": "park", + "type": "line", + "metadata": { + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "==", + "subclass", + "ice_shelf" + ], + "id": "landcover-ice-shelf", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#fff", + "fill-opacity": { + "base": 1, + "stops": [ + [ + 0, + 0.9 + ], + [ + 10, + 0.3 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "landcover", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "id": "building", + "paint": { + "fill-antialias": true, + "fill-color": { + "base": 1, + "stops": [ + [ + 15.5, + "#f2eae2" + ], + [ + 16, + "#dfdbd7" + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "building", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "id": "building-top", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "#f2eae2", + "fill-opacity": { + "base": 1, + "stops": [ + [ + 13, + 0 + ], + [ + 16, + 1 + ] + ] + }, + "fill-outline-color": "#dfdbd7", + "fill-translate": { + "base": 1, + "stops": [ + [ + 14, + [ + 0, + 0 + ] + ], + [ + 16, + [ + -2, + -2 + ] + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "building", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "service", + "track" + ] + ], + "id": "tunnel-service-track-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#cfcdca", + "line-dasharray": [ + 0.5, + 0.25 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1 + ], + [ + 16, + 4 + ], + [ + 20, + 11 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "minor" + ] + ], + "id": "tunnel-minor-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#cfcdca", + "line-opacity": { + "stops": [ + [ + 12, + 0 + ], + [ + 12.5, + 1 + ] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 0.5 + ], + [ + 13, + 1 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id": "tunnel-secondary-tertiary-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 8, + 1.5 + ], + [ + 20, + 17 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "primary", + "trunk" + ] + ], + "id": "tunnel-trunk-primary-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id": "tunnel-motorway-casing", + "layout": { + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-dasharray": [ + 0.5, + 0.25 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "path", + "footway" + ] + ] + ], + "id": "tunnel-path", + "paint": { + "line-color": "#cba", + "line-dasharray": [ + 1.5, + 0.75 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1.2 + ], + [ + 20, + 4 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "service", + "track" + ] + ], + "id": "tunnel-service-track", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15.5, + 0 + ], + [ + 16, + 2 + ], + [ + 20, + 7.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id": "tunnel-minor", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#fff", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 13.5, + 0 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id": "tunnel-secondary-tertiary", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "primary", + "trunk" + ] + ], + "id": "tunnel-trunk-primary", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id": "tunnel-motorway", + "layout": { + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#ffdaa6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "rail" + ] + ], + "id": "tunnel-railway", + "paint": { + "line-color": "#bbb", + "line-dasharray": [ + 2, + 2 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 15, + 0.75 + ], + [ + 20, + 2 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "in", + "class", + "ferry" + ] + ], + "id": "ferry", + "layout": { + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(108, 159, 182, 1)", + "line-dasharray": [ + 2, + 2 + ], + "line-width": 1.1 + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "in", + "class", + "taxiway" + ] + ], + "id": "aeroway-taxiway-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 12, + "paint": { + "line-color": "rgba(153, 153, 153, 1)", + "line-opacity": 1, + "line-width": { + "base": 1.5, + "stops": [ + [ + 11, + 2 + ], + [ + 17, + 12 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "in", + "class", + "runway" + ] + ], + "id": "aeroway-runway-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 12, + "paint": { + "line-color": "rgba(153, 153, 153, 1)", + "line-opacity": 1, + "line-width": { + "base": 1.5, + "stops": [ + [ + 11, + 5 + ], + [ + 17, + 55 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "class", + "runway", + "taxiway" + ] + ], + "id": "aeroway-area", + "layout": { + "visibility": "visible" + }, + "minzoom": 4, + "paint": { + "fill-color": "rgba(255, 255, 255, 1)", + "fill-opacity": { + "base": 1, + "stops": [ + [ + 13, + 0 + ], + [ + 14, + 1 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "in", + "class", + "taxiway" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id": "aeroway-taxiway", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 4, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0 + ], + [ + 12, + 1 + ] + ] + }, + "line-width": { + "base": 1.5, + "stops": [ + [ + 11, + 1 + ], + [ + 17, + 10 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "in", + "class", + "runway" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id": "aeroway-runway", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 4, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0 + ], + [ + 12, + 1 + ] + ] + }, + "line-width": { + "base": 1.5, + "stops": [ + [ + 11, + 4 + ], + [ + 17, + 50 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "aeroway", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "$type", + "Polygon" + ], + "id": "highway-area", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-antialias": false, + "fill-color": "hsla(0, 0%, 89%, 0.56)", + "fill-opacity": 0.9, + "fill-outline-color": "#cfcdca" + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "fill", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "==", + "class", + "motorway_link" + ] + ], + "id": "highway-motorway-link-casing", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "minzoom": 12, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "id": "highway-link-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 13, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!=", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "minor", + "service", + "track" + ] + ] + ], + "id": "highway-minor-casing", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-color": "#cfcdca", + "line-opacity": { + "stops": [ + [ + 12, + 0 + ], + [ + 12.5, + 1 + ] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 0.5 + ], + [ + 13, + 1 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id": "highway-secondary-tertiary-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 6, + 1.5 + ], + [ + 20, + 17 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "primary" + ] + ], + "id": "highway-primary-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 5, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.5 + ], + [ + 8, + 0.6 + ], + [ + 9, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "trunk" + ] + ], + "id": "highway-trunk-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 5, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [ + 5, + 0 + ], + [ + 6, + 1 + ] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id": "highway-motorway-casing", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 4, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [ + 4, + 0 + ], + [ + 5, + 1 + ] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [ + 4, + 0 + ], + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "path", + "footway" + ] + ] + ], + "id": "highway-path", + "paint": { + "line-color": "#cba", + "line-dasharray": { + "stops": [ + [ + 13, + [ + 1, + 0.5 + ] + ], + [ + 14, + [ + 2, + 1 + ] + ], + [ + 20, + [ + 3, + 1 + ] + ] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [ + 13, + 1 + ], + [ + 14, + 2 + ], + [ + 20, + 4 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "==", + "class", + "motorway_link" + ] + ], + "id": "highway-motorway-link", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "minzoom": 12, + "paint": { + "line-color": "#e5b87e", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "id": "highway-link", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 13, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "in", + "class", + "downhill", + "nordic" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id": "ski-slopes-line", + "minzoom": 11, + "paint": { + "line-blur": 0.5, + "line-color": "rgba(75, 122, 195, 1)", + "line-dasharray": [ + 3, + 2 + ], + "line-width": { + "stops": [ + [ + 10, + 1 + ], + [ + 13, + 1.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "piste", + "type": "line", + "metadata": { + "microg:gms-type-feature": "poi.sports_complex", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!=", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "minor", + "service", + "track" + ] + ] + ], + "id": "highway-minor", + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "paint": { + "line-color": "#fff", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 13.5, + 0 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id": "highway-secondary-tertiary", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 8, + 0.5 + ], + [ + 20, + 13 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "primary" + ] + ] + ], + "id": "highway-primary", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.1 + ], + [ + 9, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "in", + "class", + "trunk" + ] + ] + ], + "id": "highway-trunk", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "==", + "class", + "motorway" + ] + ] + ], + "id": "highway-motorway", + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "minzoom": 5, + "paint": { + "line-color": "#e5b87e", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "class", + "transit" + ], + [ + "!in", + "brunnel", + "tunnel" + ] + ] + ], + "id": "railway-transit", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.77)", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 20, + 1 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "class", + "transit" + ], + [ + "!in", + "brunnel", + "tunnel" + ] + ] + ], + "id": "railway-transit-hatching", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.68)", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 2 + ], + [ + 20, + 6 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "class", + "rail" + ], + [ + "has", + "service" + ] + ] + ], + "id": "railway-service", + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.77)", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 20, + 1 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "class", + "rail" + ], + [ + "has", + "service" + ] + ] + ], + "id": "railway-service-hatching", + "layout": { + "visibility": "visible" + }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.68)", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 2 + ], + [ + 20, + 6 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!has", + "service" + ], + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "==", + "class", + "rail" + ] + ] + ], + "id": "railway", + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 15, + 0.75 + ], + [ + 20, + 2 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "!has", + "service" + ], + [ + "!in", + "brunnel", + "bridge", + "tunnel" + ], + [ + "==", + "class", + "rail" + ] + ] + ], + "id": "railway-hatching", + "paint": { + "line-color": "#bbb", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 3 + ], + [ + 20, + 8 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "motorway_link" + ] + ], + "id": "bridge-motorway-link-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "id": "bridge-link-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id": "bridge-secondary-tertiary-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [ + 8, + 1.5 + ], + [ + 20, + 28 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary", + "trunk" + ] + ], + "id": "bridge-trunk-primary-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "hsl(28, 76%, 67%)", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 26 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id": "bridge-motorway-casing", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "path", + "footway" + ] + ] + ], + "id": "bridge-path-casing", + "paint": { + "line-color": "#f8f4f0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1.2 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.stroke" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "path", + "footway" + ] + ] + ], + "id": "bridge-path", + "paint": { + "line-color": "#cba", + "line-dasharray": [ + 1.5, + 0.75 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1.2 + ], + [ + 20, + 4 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "motorway_link" + ] + ], + "id": "bridge-motorway-link", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e5b87e", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "id": "bridge-link", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id": "bridge-secondary-tertiary", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 20 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary", + "trunk" + ] + ], + "id": "bridge-trunk-primary", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e5d7a0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id": "bridge-motorway", + "layout": { + "line-join": "round" + }, + "paint": { + "line-color": "#e5b87e", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "road.arterial", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "rail" + ] + ], + "id": "bridge-railway", + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 15, + 0.75 + ], + [ + 20, + 2 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "rail" + ] + ], + "id": "bridge-railway-hatching", + "paint": { + "line-color": "#bbb", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 3 + ], + [ + 20, + 8 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "landscape.man_made", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "cable_car" + ], + "id": "cablecar", + "layout": { + "line-cap": "round", + "visibility": "visible" + }, + "minzoom": 11, + "paint": { + "line-color": "hsl(0, 0%, 70%)", + "line-width": { + "base": 1, + "stops": [ + [ + 11, + 1 + ], + [ + 19, + 2.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "==", + "class", + "cable_car" + ], + "id": "cablecar-dash", + "layout": { + "line-cap": "round", + "visibility": "visible" + }, + "minzoom": 11, + "paint": { + "line-color": "hsl(0, 0%, 70%)", + "line-dasharray": [ + 2, + 3 + ], + "line-width": { + "base": 1, + "stops": [ + [ + 11, + 3 + ], + [ + 19, + 5.5 + ] + ] + } + }, + "source": "openmaptiles", + "source-layer": "transportation", + "type": "line", + "metadata": { + "microg:gms-type-feature": "transit.line", + "microg:gms-type-element": "geometry.fill" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "has", + "name" + ], + [ + "!=", + "name", + "" + ] + ], + "id": "waterway-name", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 350, + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + " ", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Italic" + ], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-pitch-alignment": "viewport", + "text-rotation-alignment": "map", + "text-size": 14 + }, + "minzoom": 13, + "paint": { + "text-color": "#115AA7" + }, + "source": "openmaptiles", + "source-layer": "waterway", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "!in", + "class", + "ocean" + ] + ], + "id": "water-name-other", + "layout": { + "symbol-placement": "point", + "symbol-spacing": 150, + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Italic" + ], + "text-letter-spacing": 0.2, + "text-line-height": 1.55, + "text-max-width": 5, + "text-size": { + "stops": [ + [ + 0, + 10 + ], + [ + 6, + 14 + ] + ] + }, + "visibility": "visible" + }, + "minzoom": 1, + "paint": { + "text-color": "#115AA7" + }, + "source": "openmaptiles", + "source-layer": "water_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "ocean" + ] + ], + "id": "water-name-ocean", + "layout": { + "symbol-avoid-edges": true, + "symbol-placement": "point", + "symbol-spacing": 350, + "text-field": "{name:latin}", + "text-font": [ + "Stadia Italic" + ], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-size": 14 + }, + "paint": { + "text-color": "#115AA7" + }, + "source": "openmaptiles", + "source-layer": "water_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + ">=", + "rank", + 25 + ] + ], + "id": "poi-level-3", + "layout": { + "icon-image": "{class}_11", + "symbol-avoid-edges": true, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Semibold" + ], + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-padding": 2, + "text-size": 12 + }, + "minzoom": 16, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "poi", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "<=", + "rank", + 24 + ], + [ + ">=", + "rank", + 15 + ] + ], + "id": "poi-level-2", + "layout": { + "icon-image": "{class}_11", + "symbol-avoid-edges": true, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Semibold" + ], + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-padding": 2, + "text-size": 12 + }, + "minzoom": 15, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "poi", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "<=", + "rank", + 14 + ], + [ + "has", + "name" + ], + [ + "!=", + "name", + "" + ] + ], + "id": "poi-level-1", + "layout": { + "icon-image": "{class}_11", + "symbol-avoid-edges": true, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Semibold" + ], + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-padding": 2, + "text-size": 12 + }, + "minzoom": 14, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "poi", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "poi", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "has", + "name" + ], + [ + "!=", + "name", + "" + ], + [ + "==", + "class", + "railway" + ], + [ + "==", + "subclass", + "station" + ] + ], + "id": "poi-railway", + "layout": { + "icon-allow-overlap": false, + "icon-ignore-placement": false, + "icon-image": "{class}_11", + "icon-optional": false, + "symbol-avoid-edges": true, + "text-allow-overlap": false, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-ignore-placement": false, + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-optional": true, + "text-padding": 2, + "text-size": 12 + }, + "minzoom": 13, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "poi", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "transit.station", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "in", + "class", + "path", + "footway" + ], + "id": "highway-name-path", + "layout": { + "symbol-placement": "line", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + " ", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-pitch-alignment": "viewport", + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [ + 13, + 12 + ], + [ + 14, + 13 + ] + ] + } + }, + "minzoom": 15.5, + "paint": { + "text-color": "hsl(30, 23%, 62%)", + "text-halo-color": "#f8f4f0", + "text-halo-width": 0.5 + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + } + }, + { + "id": "ski-slopes-label", + "layout": { + "icon-pitch-alignment": "auto", + "symbol-placement": "line-center", + "text-anchor": "bottom", + "text-field": "{name}", + "text-font": [ + "Stadia Regular" + ], + "text-keep-upright": true, + "text-size": 12 + }, + "minzoom": 13, + "paint": { + "text-color": "rgba(75, 122, 195, 1)", + "text-halo-blur": 0.5, + "text-halo-color": "rgba(255, 255, 255, 1)", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "piste", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "poi.sports_complex", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "minor", + "service", + "track" + ] + ], + "id": "highway-name-minor", + "layout": { + "symbol-placement": "line", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + " ", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-pitch-alignment": "viewport", + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [ + 13, + 12 + ], + [ + 14, + 13 + ] + ] + } + }, + "minzoom": 15, + "paint": { + "text-color": "#765", + "text-halo-blur": 0.5, + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "road.local", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ], + "id": "highway-name-major", + "layout": { + "symbol-placement": "line", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + " ", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-pitch-alignment": "viewport", + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [ + 13, + 12 + ], + [ + 14, + 13 + ] + ] + } + }, + "minzoom": 12.2, + "paint": { + "text-color": "#765", + "text-halo-blur": 0.5, + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "<=", + "ref_length", + 6 + ], + [ + "==", + "$type", + "LineString" + ], + [ + "!in", + "network", + "us-interstate", + "us-highway", + "us-state" + ] + ], + "id": "highway-shield-other", + "layout": { + "icon-image": "road_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-avoid-edges": true, + "symbol-placement": { + "base": 1, + "stops": [ + [ + 10, + "point" + ], + [ + 11, + "line" + ] + ] + }, + "text-field": "{ref}", + "text-font": [ + "Stadia Semibold" + ], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "minzoom": 8, + "paint": {}, + "source": "openmaptiles", + "source-layer": "transportation_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.icon" + } + }, + { + "filter": [ + "all", + [ + "<=", + "ref_length", + 6 + ], + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "network", + "us-interstate" + ] + ], + "id": "highway-shield-us-interstate", + "layout": { + "icon-image": "{network}_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-avoid-edges": true, + "symbol-placement": { + "base": 1, + "stops": [ + [ + 7, + "point" + ], + [ + 7, + "line" + ], + [ + 8, + "line" + ] + ] + }, + "text-field": "{ref}", + "text-font": [ + "Stadia Semibold" + ], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "minzoom": 7, + "paint": { + "text-color": "rgba(0, 0, 0, 1)" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.icon" + } + }, + { + "filter": [ + "all", + [ + "<=", + "ref_length", + 6 + ], + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "network", + "us-highway", + "us-state" + ] + ], + "id": "highway-shield-us-other", + "layout": { + "icon-image": "{network}_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-avoid-edges": true, + "symbol-placement": { + "base": 1, + "stops": [ + [ + 10, + "point" + ], + [ + 11, + "line" + ] + ] + }, + "text-field": "{ref}", + "text-font": [ + "Stadia Semibold" + ], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "minzoom": 9, + "paint": { + "text-color": "rgba(0, 0, 0, 1)" + }, + "source": "openmaptiles", + "source-layer": "transportation_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "road.highway", + "microg:gms-type-element": "labels.icon" + } + }, + { + "filter": [ + "all", + [ + "has", + "iata" + ] + ], + "id": "airport-label-major", + "layout": { + "icon-image": "airport_11", + "icon-size": 1, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-optional": true, + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "minzoom": 10, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "aerodrome_label", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "transit.station.airport", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "!in", + "class", + "city", + "town", + "village", + "country", + "continent" + ], + "id": "place-other", + "layout": { + "symbol-avoid-edges": true, + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Semibold" + ], + "text-letter-spacing": 0.1, + "text-line-height": 1.55, + "text-max-width": 9, + "text-size": { + "base": 1.2, + "stops": [ + [ + 12, + 10 + ], + [ + 15, + 14 + ] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "minzoom": 12, + "paint": { + "text-color": "#633", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.neighborhood", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "==", + "class", + "village" + ], + "id": "place-village", + "layout": { + "symbol-avoid-edges": true, + "symbol-spacing": 350, + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-line-height": 1.55, + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [ + 10, + 12 + ], + [ + 15, + 22 + ] + ] + }, + "visibility": "visible" + }, + "minzoom": 11, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.neighborhood", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "<=", + "rank", + 2 + ], + [ + "has", + "name" + ], + [ + "!=", + "name", + "" + ] + ], + "id": "mountain-peaks", + "layout": { + "icon-image": "mountain_11", + "symbol-avoid-edges": true, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ], + "\n", + [ + "to-string", + [ + "get", + "ele" + ] + ], + " m" + ], + "text-font": [ + "Stadia Regular" + ], + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-padding": 2, + "text-size": 12 + }, + "minzoom": 9, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "mountain_peak", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + ">=", + "ele", + 2500 + ], + [ + "has", + "name" + ], + [ + "!=", + "name", + "" + ], + [ + "<=", + "rank", + 1 + ] + ], + "id": "mountain-peaks-important", + "layout": { + "icon-image": "mountain_11", + "symbol-avoid-edges": true, + "text-anchor": "top", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ], + "\n", + [ + "to-string", + [ + "get", + "ele" + ] + ], + " m" + ], + "text-font": [ + "Stadia Semibold" + ], + "text-line-height": 1.55, + "text-max-width": 9, + "text-offset": [ + 0, + 0.6 + ], + "text-padding": 2, + "text-size": 12 + }, + "maxzoom": 9, + "minzoom": 7, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "mountain_peak", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "landscape.natural.landcover", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "==", + "class", + "town" + ], + "id": "place-town", + "layout": { + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Regular" + ], + "text-line-height": 1.55, + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [ + 10, + 14 + ], + [ + 15, + 22 + ] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "nature_reserve", + "protected_area" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ], + [ + "==", + [ + "get", + "rank" + ], + 1 + ], + [ + "!", + [ + "any", + [ + "in", + "Open Access Land", + [ + "get", + "name" + ] + ], + [ + "in", + "State Game Land", + [ + "get", + "name" + ] + ] + ] + ] + ], + "id": "park-reserve", + "layout": { + "symbol-avoid-edges": true, + "symbol-placement": "point", + "text-anchor": "center", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Italic" + ], + "text-justify": "center", + "text-line-height": 1.55, + "text-max-width": 10, + "text-padding": 2, + "text-size": { + "base": 1.2, + "stops": [ + [ + 8, + 12 + ], + [ + 13, + 14 + ] + ] + }, + "visibility": "visible" + }, + "minzoom": 8, + "paint": { + "text-color": "rgba(102, 51, 1, 1)", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "park", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "national_park" + ], + [ + "==", + "$type", + "Point" + ], + [ + "==", + "rank", + 1 + ] + ], + "id": "park-national", + "layout": { + "symbol-avoid-edges": true, + "symbol-placement": "point", + "text-anchor": "center", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Italic" + ], + "text-justify": "center", + "text-line-height": 1.55, + "text-max-width": 10, + "text-padding": 2, + "text-size": { + "base": 1.2, + "stops": [ + [ + 6, + 12 + ], + [ + 8, + 14 + ], + [ + 12, + 16 + ] + ] + }, + "visibility": "visible" + }, + "minzoom": 6, + "paint": { + "text-color": "rgba(102, 51, 1, 1)", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1 + }, + "source": "openmaptiles", + "source-layer": "park", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "poi.park", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "==", + "$type", + "LineString" + ], + "id": "water-name-lakeline", + "layout": { + "symbol-placement": "line", + "symbol-spacing": 250, + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + " ", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Italic" + ], + "text-letter-spacing": 0.2, + "text-line-height": 1.55, + "text-max-width": 5, + "text-pitch-alignment": "viewport", + "text-rotation-alignment": "map", + "text-size": { + "base": 1.2, + "stops": [ + [ + 0, + 10 + ], + [ + 14, + 14 + ] + ] + } + }, + "paint": { + "text-color": "#115AA7" + }, + "source": "openmaptiles", + "source-layer": "water_name", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "water", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "!=", + "capital", + 2 + ], + [ + "==", + "class", + "city" + ] + ], + "id": "place-city", + "layout": { + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Semibold" + ], + "text-line-height": 1.55, + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [ + 7, + 14 + ], + [ + 11, + 24 + ] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "capital", + 2 + ], + [ + "==", + "class", + "city" + ] + ], + "id": "place-city-capital", + "layout": { + "icon-image": "star_11", + "icon-size": 0.8, + "text-anchor": "left", + "text-field": [ + "concat", + [ + "get", + "name:latin" + ], + [ + "case", + [ + "all", + [ + "has", + "name:nonlatin" + ], + [ + "is-supported-script", + [ + "get", + "name:nonlatin" + ] + ] + ], + [ + "concat", + "\n", + [ + "get", + "name:nonlatin" + ] + ], + "" + ] + ], + "text-font": [ + "Stadia Semibold" + ], + "text-line-height": 1.55, + "text-max-width": 8, + "text-offset": [ + 0.4, + 0 + ], + "text-size": { + "base": 1.2, + "stops": [ + [ + 7, + 14 + ], + [ + 11, + 24 + ] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.locality", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "country" + ], + [ + ">=", + "rank", + 3 + ], + [ + "!has", + "iso_a2" + ] + ], + "id": "place-country-other", + "layout": { + "symbol-avoid-edges": true, + "text-field": "{name:latin}", + "text-font": [ + "Stadia Italic" + ], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 7, + 17 + ] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "minzoom": 1, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "country" + ], + [ + ">=", + "rank", + 3 + ], + [ + "has", + "iso_a2" + ] + ], + "id": "place-country-3", + "layout": { + "text-field": "{name:latin}", + "text-font": [ + "Stadia Bold" + ], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 7, + 17 + ] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "minzoom": 1, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "country" + ], + [ + "==", + "rank", + 2 + ], + [ + "has", + "iso_a2" + ] + ], + "id": "place-country-2", + "layout": { + "text-field": "{name:latin}", + "text-font": [ + "Stadia Bold" + ], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [ + 2, + 11 + ], + [ + 5, + 17 + ] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "minzoom": 1, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.province", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "all", + [ + "==", + "class", + "country" + ], + [ + "==", + "rank", + 1 + ], + [ + "has", + "iso_a2" + ] + ], + "id": "place-country-1", + "layout": { + "text-field": "{name:latin}", + "text-font": [ + "Stadia Bold" + ], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [ + 1, + 11 + ], + [ + 4, + 17 + ] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "minzoom": 1, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.country", + "microg:gms-type-element": "labels.text" + } + }, + { + "filter": [ + "==", + "class", + "continent" + ], + "id": "place-continent", + "layout": { + "text-field": "{name:latin}", + "text-font": [ + "Stadia Bold" + ], + "text-max-width": 6.25, + "text-size": 14, + "text-transform": "uppercase", + "visibility": "visible" + }, + "maxzoom": 1, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + }, + "source": "openmaptiles", + "source-layer": "place", + "type": "symbol", + "metadata": { + "microg:gms-type-feature": "administrative.land_parcel", + "microg:gms-type-element": "labels.text" + } + } + ], + "metadata": { + "mapbox:autocomposite": false, + "openmaptiles:version": "3.x" + }, + "name": "Outdoors", + "pitch": 0, + "sources": { + "openmaptiles": { + "type": "vector", + "url": "https://tiles.stadiamaps.com/data/openmaptiles.json" + } + }, + "sprite": "https://tiles.stadiamaps.com/styles/outdoors/sprite", + "version": 8, + "zoom": 11.6 +} diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ae1cd09 --- /dev/null +++ b/build.gradle @@ -0,0 +1,125 @@ +/* + * SPDX-FileCopyrightText: 2013 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +buildscript { + ext.cronetVersion = '102.5005.125' + ext.wearableVersion = '0.1.1' + + ext.kotlinVersion = '1.9.22' + ext.coroutineVersion = '1.7.3' + + ext.annotationVersion = '1.7.1' + ext.appcompatVersion = '1.6.1' + ext.biometricVersion = '1.1.0' + ext.coreVersion = '1.12.0' + ext.fragmentVersion = '1.6.2' + ext.lifecycleVersion = '2.7.0' + ext.loaderVersion = '1.1.0' + ext.materialVersion = '1.11.0' + ext.mediarouterVersion = '1.6.0' + ext.multidexVersion = '2.0.1' + ext.navigationVersion = '2.7.7' + ext.preferenceVersion = '1.2.0' + ext.recyclerviewVersion = '1.3.2' + ext.webkitVersion = '1.10.0' + + ext.slf4jVersion = '1.7.36' + ext.volleyVersion = '1.2.1' + ext.okHttpVersion = '4.12.0' + ext.ktorVersion = '2.3.12' + ext.wireVersion = '4.9.9' + ext.tinkVersion = '1.13.0' + + ext.androidBuildGradleVersion = '8.2.2' + + ext.androidBuildVersionTools = '34.0.0' + + ext.androidMinSdk = 19 + ext.androidTargetSdk = 29 + ext.androidCompileSdk = 35 + + ext.localProperties = new Properties() + + try { + var stream = rootProject.file('local.properties').newDataInputStream() + ext.localProperties.load(stream) + stream.close() + } catch (ignored) { + // Ignore + } + + ext.hasModule = (String name, boolean enabledByDefault) -> { + return ext.localProperties.getProperty("modules." + name, enabledByDefault.toString()).toBoolean() + } + + repositories { + mavenCentral() + google() + } + + dependencies { + classpath "com.android.tools.build:gradle:$androidBuildGradleVersion" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" + classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion" + } +} + +def execResult(... args) { + providers.exec { commandLine args }.standardOutput.asText.get() +} + +def ignoreGit = providers.environmentVariable('GRADLE_MICROG_VERSION_WITHOUT_GIT').getOrElse('0') == '1' +def gmsVersion = "25.09.32" +def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', '')) +def vendingVersion = "40.2.26" +def vendingVersionCode = Integer.parseInt(vendingVersion.replaceAll('\\.', '')) +def gitVersionBase = !ignoreGit ? execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) : "v0.0.0.$gmsVersionCode" +def gitCommitCount = !ignoreGit ? Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) : 0 +def gitCommitId = !ignoreGit ? execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] : '0000000' +def gitDirty = false +if (!ignoreGit) { + execResult('git', 'status', '--porcelain').lines().each { stat -> + def status = stat.substring(0,2) + def file = stat.substring(3) + if (status == '??') { + if (subprojects.any { p -> file.startsWith(p.name + '/') }) { + logger.lifecycle('Dirty file: {} (untracked)', file) + gitDirty = true + } else { + logger.info('New file outside module: {} (ignored for dirty check)', file) + } + } else { + logger.lifecycle('Dirty file: {} (changed)', file) + gitDirty = true + } + } +} +def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.')) +def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1)) +def ourGmsVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0) +def ourGmsVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "") +def ourVendingVersionCode = 80000000 + vendingVersionCode * 100 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0) +def ourVendingVersionName = "$ourVersionBase.$vendingVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "") +logger.lifecycle('Starting build for GMS version {} ({})...', ourGmsVersionName, ourGmsVersionCode) + +allprojects { + apply plugin: 'idea' + + group = 'org.microg.gms' + version = ourGmsVersionName + ext.vendingAppVersionName = ourVendingVersionName + ext.vendingAppVersionCode = ourVendingVersionCode + ext.appVersionCode = ourGmsVersionCode + ext.isReleaseVersion = false +} + +subprojects { + repositories { + mavenCentral() + google() + if (hasModule("hms", false)) maven {url 'https://developer.huawei.com/repo/'} + } +} + diff --git a/fake-signature/build.gradle b/fake-signature/build.gradle new file mode 100644 index 0000000..e0aaecb --- /dev/null +++ b/fake-signature/build.gradle @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' + +android { + namespace 'org.microg.signature.fake' + compileSdk androidCompileSdk + + defaultConfig { + minSdk androidMinSdk + targetSdk androidTargetSdk + } + + flavorDimensions = ['target'] + productFlavors { + "default" { + dimension 'target' + } + "huawei" { + dimension 'target' + } + } + + buildFeatures { + aidl = true + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { +} \ No newline at end of file diff --git a/fake-signature/src/huawei/AndroidManifest.xml b/fake-signature/src/huawei/AndroidManifest.xml new file mode 100644 index 0000000..9fa87a0 --- /dev/null +++ b/fake-signature/src/huawei/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fake-signature/src/huawei/aidl/com/huawei/signature/diff/ISignatureService.aidl b/fake-signature/src/huawei/aidl/com/huawei/signature/diff/ISignatureService.aidl new file mode 100644 index 0000000..e3cf04e --- /dev/null +++ b/fake-signature/src/huawei/aidl/com/huawei/signature/diff/ISignatureService.aidl @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.huawei.signature.diff; + +/** + * Interface for Huawei Differentiated Signature Capability + * See https://forums.developer.huawei.com/forumPortal/en/topic/0202128603315033024 + */ +interface ISignatureService { + String[] querySignature(String packageName, boolean suggested); +} \ No newline at end of file diff --git a/fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java b/fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java new file mode 100644 index 0000000..f7e2d26 --- /dev/null +++ b/fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java @@ -0,0 +1,75 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.huawei.signature.diff; + +import android.content.ContentValues; +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; +import android.util.Log; +import org.microg.signature.fake.R; + +public class AppListDatabaseOpenHelper extends SQLiteOpenHelper { + private static final String TAG = AppListDatabaseOpenHelper.class.getSimpleName(); + private static final String DATABASE_NAME = "app_list.db"; + public static final String TABLE_APPLIST = "applist"; + public static final String COLUMN_NAME = "name"; + public static final String COLUMN_FAKE = "fake"; + private static final int DATABASE_VERSION = 3; + private static final String DROP_APP_LIST_TABLE = "DROP TABLE IF EXISTS " + TABLE_APPLIST; + private static final String CREATE_APP_LIST_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_APPLIST + "(" + + COLUMN_NAME + " VARCHAR(255) PRIMARY KEY, " + + COLUMN_FAKE + " INTEGER CHECK(" + COLUMN_FAKE + " >= 0 and " + COLUMN_FAKE + " <= 1)" + + ")"; + private final Context context; + + public AppListDatabaseOpenHelper(Context context) { + super(context, DATABASE_NAME, null, DATABASE_VERSION); + this.context = context; + } + + @Override + public void onCreate(SQLiteDatabase db) { + Log.d(TAG, "onCreate"); + db.execSQL(DROP_APP_LIST_TABLE); + db.execSQL(CREATE_APP_LIST_TABLE); + initData(db); + } + + @Override + public void onOpen(SQLiteDatabase db) { + super.onOpen(db); + if (!db.isReadOnly()) { + initData(db); + } + } + + private void initData(SQLiteDatabase db) { + String[] wantFakeApps = context.getResources().getStringArray(R.array.signature_want_fake); + String[] neverFakeApps = context.getResources().getStringArray(R.array.signature_never_fake); + if (wantFakeApps.length == 0 && neverFakeApps.length == 0) { + return; + } + for (String app : wantFakeApps) { + db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, true), SQLiteDatabase.CONFLICT_REPLACE); + } + for (String app : neverFakeApps) { + db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, false), SQLiteDatabase.CONFLICT_REPLACE); + } + } + + private ContentValues generateValues(String packageName, boolean fake) { + ContentValues contentValues = new ContentValues(); + contentValues.put(COLUMN_NAME, packageName); + contentValues.put(COLUMN_FAKE, fake ? 1 : 0); + return contentValues; + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + onCreate(db); + } +} \ No newline at end of file diff --git a/fake-signature/src/huawei/java/com/huawei/signature/diff/InitProvider.java b/fake-signature/src/huawei/java/com/huawei/signature/diff/InitProvider.java new file mode 100644 index 0000000..8d420a9 --- /dev/null +++ b/fake-signature/src/huawei/java/com/huawei/signature/diff/InitProvider.java @@ -0,0 +1,72 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.huawei.signature.diff; + +import android.app.ActivityManager; +import android.content.ContentProvider; +import android.content.ContentValues; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.net.Uri; +import android.util.Log; +import java.util.List; + +public class InitProvider extends ContentProvider { + private static final String TAG = "InitProvider"; + + @Override + public boolean onCreate() { + Log.d(TAG, "onCreate"); + if (!isServiceRunning(getContext(), getContext().getPackageName(), SignatureService.class.getName())) { + Intent intent = new Intent(getContext(), SignatureService.class); + try { + getContext().startService(intent); + } catch (Exception ignored) { + } + } + return false; + } + + private boolean isServiceRunning(Context context, String packageName, String serviceName) { + ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); + List serviceInfoList = manager.getRunningServices(Integer.MAX_VALUE); + if (serviceInfoList == null) { + return false; + } + for (ActivityManager.RunningServiceInfo info : serviceInfoList) { + if (info.service.getPackageName().equals(packageName) && info.service.getClassName().equals(serviceName)) { + return true; + } + } + return false; + } + + @Override + public int delete(Uri uri, String selection, String[] selectionArgs) { + return 0; + } + + @Override + public String getType(Uri uri) { + return null; + } + + @Override + public Uri insert(Uri uri, ContentValues values) { + return null; + } + + @Override + public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { + return null; + } + + @Override + public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { + return 0; + } +} \ No newline at end of file diff --git a/fake-signature/src/huawei/java/com/huawei/signature/diff/InitReceiver.java b/fake-signature/src/huawei/java/com/huawei/signature/diff/InitReceiver.java new file mode 100644 index 0000000..657cba2 --- /dev/null +++ b/fake-signature/src/huawei/java/com/huawei/signature/diff/InitReceiver.java @@ -0,0 +1,29 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.huawei.signature.diff; + +import android.annotation.SuppressLint; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.util.Log; + +/** + * This is to make sure the process is initialized at boot. + */ +public class InitReceiver extends BroadcastReceiver { + private static final String TAG = "InitReceiver"; + + @SuppressLint("UnsafeProtectedBroadcastReceiver") + @Override + public void onReceive(Context context, Intent intent) { + Log.d(TAG, "onReceive"); + try { + context.startService(new Intent(context, SignatureService.class)); + } catch (Exception ignored) { + } + } +} diff --git a/fake-signature/src/huawei/java/com/huawei/signature/diff/SignatureService.java b/fake-signature/src/huawei/java/com/huawei/signature/diff/SignatureService.java new file mode 100644 index 0000000..ca6d654 --- /dev/null +++ b/fake-signature/src/huawei/java/com/huawei/signature/diff/SignatureService.java @@ -0,0 +1,106 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.huawei.signature.diff; + +import static com.huawei.signature.diff.AppListDatabaseOpenHelper.COLUMN_NAME; +import static com.huawei.signature.diff.AppListDatabaseOpenHelper.TABLE_APPLIST; + +import android.app.Service; +import android.content.Intent; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.os.Binder; +import android.os.IBinder; +import android.os.Parcel; +import android.os.RemoteException; +import android.util.Log; +import org.microg.signature.fake.R; + +import java.io.FileDescriptor; +import java.io.PrintWriter; +import java.util.Date; + +public class SignatureService extends Service { + private static final String TAG = "SignatureService"; + private SQLiteDatabase database; + private AppListDatabaseOpenHelper openHelper; + private long start; + + @Override + public void onCreate() { + super.onCreate(); + this.openHelper = new AppListDatabaseOpenHelper(this); + this.database = openHelper.getWritableDatabase(); + this.start = System.currentTimeMillis(); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + Log.i(TAG, "onStartCommand"); + return START_STICKY; + } + + + @Override + public IBinder onBind(Intent intent) { + return binder; + } + + @Override + public void onDestroy() { + this.openHelper.close(); + super.onDestroy(); + } + + @Override + protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) { + writer.println("Started: " + new Date(start)); + } + + private final ISignatureService.Stub binder = new ISignatureService.Stub() { + + @Override + public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { + if (Binder.getCallingUid() > 10000) { + Log.w(TAG, "Illegal access from app"); + reply.writeException(new UnsupportedOperationException("Illegal")); + return true; + } + return super.onTransact(code, data, reply, flags); + } + + @Override + public String[] querySignature(String packageName, boolean suggested) throws RemoteException { + try (Cursor cursor = database.query(TABLE_APPLIST, null, COLUMN_NAME + "=?", + new String[]{packageName}, null, null, null)) { + switch (cursor.getCount()) { + case 0: + return getResult(suggested); + case 1: + if (cursor.moveToFirst()) { + int shouldFake = cursor.getInt(1); + return getResult(shouldFake == 1); + } + break; + default: + throw new IllegalArgumentException("result size: " + cursor.getCount()); + } + + } catch (Exception e) { + Log.w(TAG, e); + } + return getResult(false); + } + + private String[] getResult(boolean useFakeSignature) { + if (useFakeSignature) { + return new String[]{getString(R.string.fake_signature),}; + } else { + return new String[]{getString(R.string.real_signature),}; + } + } + }; +} \ No newline at end of file diff --git a/fake-signature/src/main/AndroidManifest.xml b/fake-signature/src/main/AndroidManifest.xml new file mode 100644 index 0000000..1b3ae15 --- /dev/null +++ b/fake-signature/src/main/AndroidManifest.xml @@ -0,0 +1,1159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fake-signature/src/main/res/values/arrays.xml b/fake-signature/src/main/res/values/arrays.xml new file mode 100644 index 0000000..4f3118d --- /dev/null +++ b/fake-signature/src/main/res/values/arrays.xml @@ -0,0 +1,39 @@ + + + + + com.google.android.gms + com.android.vending + com.spotify.music + com.getir + com.pozitron.iscep + com.widgetable.theme.android + pro.huobi + com.tarparos.phigaea + com.artem.scotepio + com.sabah.deprembs + com.boynergrup.hopi + com.belbim.istanbulkart + com.a101.plus + com.widgetable.theme.android + net.wargaming.wot.blitz + com.litatom.app + com.ataexpress.tiklagelsin + tr.com.petrolofisi + com.mobisoft.beymen + com.unilever.algida + com.mobisoft.morhipo + com.zzkko + com.didilabs.kaavefali + com.airbnb.android + com.mobillium.papara + co.com.fincaraiz.app + com.frisby.frisby + + + com.truecaller + + \ No newline at end of file diff --git a/fake-signature/src/main/res/values/signature.xml b/fake-signature/src/main/res/values/signature.xml new file mode 100644 index 0000000..282e0dc --- /dev/null +++ b/fake-signature/src/main/res/values/signature.xml @@ -0,0 +1,14 @@ + + + + + + 308204433082032ba003020102020900c2e08746644a308d300d06092a864886f70d01010405003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3038303832313233313333345a170d3336303130373233313333345a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820120300d06092a864886f70d01010105000382010d00308201080282010100ab562e00d83ba208ae0a966f124e29da11f2ab56d08f58e2cca91303e9b754d372f640a71b1dcb130967624e4656a7776a92193db2e5bfb724a91e77188b0e6a47a43b33d9609b77183145ccdf7b2e586674c9e1565b1f4c6a5955bff251a63dabf9c55c27222252e875e4f8154a645f897168c0b1bfc612eabf785769bb34aa7984dc7e2ea2764cae8307d8c17154d7ee5f64a51a44a602c249054157dc02cd5f5c0e55fbef8519fbe327f0b1511692c5a06f19d18385f5c4dbc2d6b93f68cc2979c70e18ab93866b3bd5db8999552a0e3b4c99df58fb918bedc182ba35e003c1b4b10dd244a8ee24fffd333872ab5221985edab0fc0d0b145b6aa192858e79020103a381d93081d6301d0603551d0e04160414c77d8cc2211756259a7fd382df6be398e4d786a53081a60603551d2304819e30819b8014c77d8cc2211756259a7fd382df6be398e4d786a5a178a4763074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964820900c2e08746644a308d300c0603551d13040530030101ff300d06092a864886f70d010104050003820101006dd252ceef85302c360aaace939bcff2cca904bb5d7a1661f8ae46b2994204d0ff4a68c7ed1a531ec4595a623ce60763b167297a7ae35712c407f208f0cb109429124d7b106219c084ca3eb3f9ad5fb871ef92269a8be28bf16d44c8d9a08e6cb2f005bb3fe2cb96447e868e731076ad45b33f6009ea19c161e62641aa99271dfd5228c5c587875ddb7f452758d661f6cc0cccb7352e424cc4365c523532f7325137593c4ae341f4db41edda0d0b1071a7c440f0fe9ea01cb627ca674369d084bd2fd911ff06cdbf2cfa10dc0f893ae35762919048c7efc64c7144178342f70581c9de573af55b390dd7fdb9418631895d5f759f30112687ff621410c069308a + + + 308202ed308201d5a003020102020426ffa009300d06092a864886f70d01010b05003027310b300906035504061302444531183016060355040a130f4e4f47415050532050726f6a656374301e170d3132313030363132303533325a170d3337303933303132303533325a3027310b300906035504061302444531183016060355040a130f4e4f47415050532050726f6a65637430820122300d06092a864886f70d01010105000382010f003082010a02820101009a8d2a5336b0eaaad89ce447828c7753b157459b79e3215dc962ca48f58c2cd7650df67d2dd7bda0880c682791f32b35c504e43e77b43c3e4e541f86e35a8293a54fb46e6b16af54d3a4eda458f1a7c8bc1b7479861ca7043337180e40079d9cdccb7e051ada9b6c88c9ec635541e2ebf0842521c3024c826f6fd6db6fd117c74e859d5af4db04448965ab5469b71ce719939a06ef30580f50febf96c474a7d265bb63f86a822ff7b643de6b76e966a18553c2858416cf3309dd24278374bdd82b4404ef6f7f122cec93859351fc6e5ea947e3ceb9d67374fe970e593e5cd05c905e1d24f5a5484f4aadef766e498adf64f7cf04bddd602ae8137b6eea40722d0203010001a321301f301d0603551d0e04160414110b7aa9ebc840b20399f69a431f4dba6ac42a64300d06092a864886f70d01010b0500038201010007c32ad893349cf86952fb5a49cfdc9b13f5e3c800aece77b2e7e0e9c83e34052f140f357ec7e6f4b432dc1ed542218a14835acd2df2deea7efd3fd5e8f1c34e1fb39ec6a427c6e6f4178b609b369040ac1f8844b789f3694dc640de06e44b247afed11637173f36f5886170fafd74954049858c6096308fc93c1bc4dd5685fa7a1f982a422f2a3b36baa8c9500474cf2af91c39cbec1bc898d10194d368aa5e91f1137ec115087c31962d8f76cd120d28c249cf76f4c70f5baa08c70a7234ce4123be080cee789477401965cfe537b924ef36747e8caca62dfefdd1a6288dcb1c4fd2aaa6131a7ad254e9742022cfd597d2ca5c660ce9e41ff537e5a4041e37 + + \ No newline at end of file diff --git a/firebase-auth/build.gradle b/firebase-auth/build.gradle new file mode 100644 index 0000000..d44f986 --- /dev/null +++ b/firebase-auth/build.gradle @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' + +android { + namespace 'com.google.firebase.auth' + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } +} + +dependencies { + api project(':play-services-basement') + + annotationProcessor project(':safe-parcel-processor') +} diff --git a/firebase-auth/core/build.gradle b/firebase-auth/core/build.gradle new file mode 100644 index 0000000..974e386 --- /dev/null +++ b/firebase-auth/core/build.gradle @@ -0,0 +1,50 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +dependencies { + api project(':firebase-auth') + + implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion" + implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion" + + implementation "androidx.appcompat:appcompat:$appcompatVersion" + + implementation project(':play-services-base-core') + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion" + + implementation "com.android.volley:volley:$volleyVersion" +} + +android { + namespace "org.microg.gms.firebase.auth.core" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } +} diff --git a/firebase-auth/core/src/main/AndroidManifest.xml b/firebase-auth/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..89a122f --- /dev/null +++ b/firebase-auth/core/src/main/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + diff --git a/firebase-auth/core/src/main/assets/recaptcha.html b/firebase-auth/core/src/main/assets/recaptcha.html new file mode 100644 index 0000000..3da22b3 --- /dev/null +++ b/firebase-auth/core/src/main/assets/recaptcha.html @@ -0,0 +1,54 @@ + + + + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt new file mode 100644 index 0000000..afcb0d4 --- /dev/null +++ b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt @@ -0,0 +1,663 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.firebase.auth + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.os.Build.VERSION.SDK_INT +import android.os.Handler +import android.os.Parcel +import android.provider.Telephony +import android.telephony.SmsMessage +import android.util.Log +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.lifecycleScope +import com.google.android.gms.common.api.CommonStatusCodes +import com.google.android.gms.common.api.Status +import com.google.android.gms.common.internal.GetServiceRequest +import com.google.android.gms.common.internal.IGmsCallbacks +import com.google.firebase.auth.ActionCodeSettings +import com.google.firebase.auth.EmailAuthCredential +import com.google.firebase.auth.PhoneAuthCredential +import com.google.firebase.auth.UserProfileChangeRequest +import com.google.firebase.auth.api.internal.* +import org.json.JSONArray +import org.json.JSONObject +import org.microg.gms.BaseService +import org.microg.gms.common.GmsService +import org.microg.gms.common.PackageUtils +import org.microg.gms.utils.digest +import org.microg.gms.utils.getCertificates + +private const val TAG = "GmsFirebaseAuth" + +fun JSONObject.getStringOrNull(key: String) = if (has(key)) getString(key) else null +fun JSONObject.getJSONArrayOrNull(key: String) = if (has(key)) getJSONArray(key) else null +fun JSONArray?.orEmpty() = this ?: JSONArray() +fun JSONObject.getJSONArrayLength(key: String) = getJSONArrayOrNull(key).orEmpty().length() + +private val ActionCodeSettings.requestTypeAsString: String + get() = when (requestType) { + 1 -> "PASSWORD_RESET" + 2 -> "OLD_EMAIL_AGREE" + 3 -> "NEW_EMAIL_ACCEPT" + 4 -> "VERIFY_EMAIL" + 5 -> "RECOVER_EMAIL" + 6 -> "EMAIL_SIGNIN" + 7 -> "VERIFY_AND_CHANGE_EMAIL" + 8 -> "REVERT_SECOND_FACTOR_ADDITION" + else -> "OOB_REQ_TYPE_UNSPECIFIED" + } + +private val UserProfileChangeRequest.deleteAttributeList: List + get() { + val list = arrayListOf() + if (shouldRemoveDisplayName) list.add("DISPLAY_NAME") + if (shouldRemovePhotoUri) list.add("PHOTO_URL") + return list + } + +private fun Intent.getSmsMessages(): Array { + return if (SDK_INT >= 19) { + Telephony.Sms.Intents.getMessagesFromIntent(this) + } else { + (getSerializableExtra("pdus") as? Array)?.map { SmsMessage.createFromPdu(it) }.orEmpty().toTypedArray() + } +} + +class FirebaseAuthService : BaseService(TAG, GmsService.FIREBASE_AUTH) { + override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService?) { + PackageUtils.getAndCheckCallingPackage(this, request.packageName) + val apiKey = request.extras?.getString(Constants.EXTRA_API_KEY) + val libraryVersion = request.extras?.getString(Constants.EXTRA_LIBRARY_VERSION) + if (apiKey == null) { + callback.onPostInitComplete(CommonStatusCodes.DEVELOPER_ERROR, null, null) + } else { + callback.onPostInitComplete(0, FirebaseAuthServiceImpl(this, lifecycle, request.packageName, libraryVersion, apiKey).asBinder(), null) + } + } +} + +class FirebaseAuthServiceImpl(private val context: Context, override val lifecycle: Lifecycle, private val packageName: String, private val libraryVersion: String?, private val apiKey: String) : IFirebaseAuthService.Stub(), LifecycleOwner { + private val client by lazy { IdentityToolkitClient(context, apiKey, packageName, context.packageManager.getCertificates(packageName).firstOrNull()?.digest("SHA1")) } + private var authorizedDomain: String? = null + + private suspend fun getAuthorizedDomain(): String { + authorizedDomain?.let { return it } + val authorizedDomain = try { + client.getProjectConfig().getJSONArray("authorizedDomains").getString(0) + } catch (e: Exception) { + Log.w(TAG, e) + "localhost" + } + this.authorizedDomain = authorizedDomain + return authorizedDomain + } + + private suspend fun refreshTokenResponse(cachedState: String): GetTokenResponse { + var tokenResponse = GetTokenResponse.parseJson(cachedState) + if (System.currentTimeMillis() + 300000L < tokenResponse.issuedAt + tokenResponse.expiresIn * 1000) { + return tokenResponse + } + return client.getTokenByRefreshToken(tokenResponse.refreshToken).toGetTokenResponse() + } + + private fun JSONObject.toGetTokenResponse() = GetTokenResponse().apply { + refreshToken = getStringOrNull("refresh_token") + accessToken = getStringOrNull("access_token") + expiresIn = getStringOrNull("expires_in")?.toLong() + tokenType = getStringOrNull("token_type") + } + + private fun JSONObject.toGetAccountInfoUser(): GetAccountInfoUser = GetAccountInfoUser().apply { + localId = getStringOrNull("localId") + email = getStringOrNull("email") + isEmailVerified = optBoolean("emailVerified") + displayName = getStringOrNull("displayName") + photoUrl = getStringOrNull("photoUrl") + for (i in 0 until getJSONArrayLength("providerUserInfo")) { + getJSONArray("providerUserInfo").getJSONObject(i).run { + providerInfoList.providerUserInfos.add(ProviderUserInfo().apply { + federatedId = getStringOrNull("federatedId") + displayName = getStringOrNull("displayName") + photoUrl = getStringOrNull("photoUrl") + providerId = getStringOrNull("providerId") + phoneNumber = getStringOrNull("phoneNumber") + email = getStringOrNull("email") + rawUserInfo = this@run.toString() + }) + } + } + password = getStringOrNull("rawPassword") + phoneNumber = getStringOrNull("phoneNumber") + creationTimestamp = getStringOrNull("createdAt")?.toLong() ?: 0L + lastSignInTimestamp = getStringOrNull("lastLoginAt")?.toLong() ?: 0L + } + + private fun JSONObject.toCreateAuthUriResponse(): CreateAuthUriResponse = CreateAuthUriResponse().apply { + authUri = getStringOrNull("authUri") + isRegistered = optBoolean("registered") + providerId = getStringOrNull("providerId") + isForExistingProvider = optBoolean("forExistingProvider") + for (i in 0 until getJSONArrayLength("allProviders")) { + stringList.values.add(getJSONArray("allProviders").getString(i)) + } + for (i in 0 until getJSONArrayLength("signinMethods")) { + signInMethods.add(getJSONArray("signinMethods").getString(i)) + } + } + + override fun applyActionCode(request: ApplyActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: applyActionCode") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun applyActionCodeCompat(code: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: applyActionCodeCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun changeEmail(request: ChangeEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: changeEmail") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun changeEmailCompat(cachedState: String?, email: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: changeEmailCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun changePassword(request: ChangePasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: changePassword") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun changePasswordCompat(cachedState: String?, password: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: changePasswordCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun checkActionCode(request: CheckActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: checkActionCode") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun checkActionCodeCompat(code: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: checkActionCodeCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun confirmPasswordReset(request: ConfirmPasswordResetAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: confirmPasswordReset") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun confirmPasswordResetCompat(code: String?, newPassword: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: confirmPasswordResetCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun createUserWithEmailAndPassword(request: CreateUserWithEmailAndPasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "createUserWithEmailAndPassword") + try { + val tokenResult = client.signupNewUser(email = request.email, password = request.password, tenantId = request.tenantId) + val idToken = tokenResult.getString("idToken") + val refreshToken = tokenResult.getString("refreshToken") + val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() + val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = true } + Log.d(TAG, "callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun createUserWithEmailAndPasswordCompat(email: String?, password: String?, callbacks: IFirebaseAuthCallbacks) { + createUserWithEmailAndPassword(CreateUserWithEmailAndPasswordAidlRequest().apply { this.email = email; this.password = password }, callbacks) + } + + override fun delete(request: DeleteAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: delete") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun deleteCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: deleteCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun finalizeMfaEnrollment(request: FinalizeMfaEnrollmentAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: finalizeMfaEnrollment") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun finalizeMfaSignIn(request: FinalizeMfaSignInAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: finalizeMfaSignIn") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun getAccessToken(request: GetAccessTokenAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "getAccessToken") + try { + callbacks.onGetTokenResponse(client.getTokenByRefreshToken(request.refreshToken).toGetTokenResponse()) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun getAccessTokenCompat(refreshToken: String?, callbacks: IFirebaseAuthCallbacks) { + getAccessToken(GetAccessTokenAidlRequest().apply { this.refreshToken = refreshToken }, callbacks) + } + + override fun getProvidersForEmail(request: GetProvidersForEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "getProvidersForEmail") + try { + callbacks.onCreateAuthUriResponse(client.createAuthUri(identifier = request.email, tenantId = request.tenantId).toCreateAuthUriResponse()) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun getProvidersForEmailCompat(email: String?, callbacks: IFirebaseAuthCallbacks) { + getProvidersForEmail(GetProvidersForEmailAidlRequest().apply { this.email = email }, callbacks) + } + + override fun linkEmailAuthCredential(request: LinkEmailAuthCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "linkEmailAuthCredential") + try { + val getTokenResponse = refreshTokenResponse(request.cachedState) + val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() + val setAccountInfo = client.setAccountInfo(idToken = getTokenResponse.accessToken, localId = accountInfoResult.localId, email = request.email, password = request.password).toGetAccountInfoUser() + accountInfoResult.email = setAccountInfo.email + accountInfoResult.isEmailVerified = setAccountInfo.isEmailVerified + accountInfoResult.providerInfoList = setAccountInfo.providerInfoList + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun linkEmailAuthCredentialCompat(email: String?, password: String?, cachedState: String?, callbacks: IFirebaseAuthCallbacks) { + linkEmailAuthCredential(LinkEmailAuthCredentialAidlRequest().apply { this.email = email; this.password = password; this.cachedState = cachedState }, callbacks) + } + + override fun linkFederatedCredential(request: LinkFederatedCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: linkFederatedCredential") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun linkFederatedCredentialCompat(cachedState: String?, verifyAssertionRequest: VerifyAssertionRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: linkFederatedCredentialCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun linkPhoneAuthCredential(request: LinkPhoneAuthCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: linkPhoneAuthCredential") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun linkPhoneAuthCredentialCompat(cachedState: String?, credential: PhoneAuthCredential?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: linkPhoneAuthCredentialCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun reload(request: ReloadAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + try { + Log.d(TAG, "reload") + val getTokenResponse = refreshTokenResponse(request.cachedState) + val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() + Log.d(TAG, "callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun reloadCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) { + reload(ReloadAidlRequest().apply { this.cachedState = cachedState }, callbacks) + } + + override fun sendEmailVerification(request: SendEmailVerificationWithSettingsAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + try { + Log.d(TAG, "sendEmailVerification") + client.getOobConfirmationCode( + requestType = "VERIFY_EMAIL", + idToken = request.token, + iOSBundleId = request.settings?.iOSBundle, + iOSAppStoreId = request.settings?.iOSAppStoreId, + continueUrl = request.settings?.url, + androidInstallApp = request.settings?.androidInstallApp, + androidMinimumVersion = request.settings?.androidMinimumVersion, + androidPackageName = request.settings?.androidPackageName, + canHandleCodeInApp = request.settings?.handleCodeInApp + ) + callbacks.onEmailVerificationResponse() + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun sendEmailVerificationCompat(token: String?, actionCodeSettings: ActionCodeSettings?, callbacks: IFirebaseAuthCallbacks) { + sendEmailVerification(SendEmailVerificationWithSettingsAidlRequest().apply { this.token = token; this.settings = actionCodeSettings }, callbacks) + } + + override fun sendVerificationCode(request: SendVerificationCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + try { + Log.d(TAG, "sendVerificationCode") + val reCaptchaToken = when { + request.request.recaptchaToken != null -> request.request.recaptchaToken + ReCaptchaOverlayService.isSupported(context) -> ReCaptchaOverlayService.awaitToken(context, apiKey, getAuthorizedDomain()) + ReCaptchaActivity.isSupported(context) -> ReCaptchaActivity.awaitToken(context, apiKey, getAuthorizedDomain()) + else -> throw RuntimeException("No recaptcha token available") + } + var sessionInfo: String? = null + var registered = true + val receiver = object : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent) { + var smsCode: String? = null + for (message in intent.getSmsMessages()) { + smsCode = Regex("\\b([0-9]{6})\\b").find(message.messageBody)?.groups?.get(1)?.value + ?: continue + Log.d(TAG, "Received SMS verification code: $smsCode") + break + } + if (smsCode == null) return + registered = false + context.unregisterReceiver(this) + try { + callbacks.onVerificationCompletedResponse(PhoneAuthCredential().apply { + this.phoneNumber = request.request.phoneNumber + this.sessionInfo = sessionInfo + this.smsCode = smsCode + }) + Log.d(TAG, "callback: onVerificationCompletedResponse") + } catch (e: Exception) { + Log.w(TAG, e) + } + } + } + context.registerReceiver(receiver, IntentFilter("android.provider.Telephony.SMS_RECEIVED")) + var timeout = request.request.timeoutInSeconds * 1000L + if (timeout <= 0L) timeout = 120000L + Handler().postDelayed({ + if (registered) { + Log.d(TAG, "Waited ${timeout}ms for verification code SMS, timeout.") + context.unregisterReceiver(receiver) + callbacks.onVerificationAutoTimeOut(sessionInfo) + Log.d(TAG, "callback: onVerificationAutoTimeOut") + } + }, timeout) + sessionInfo = client.sendVerificationCode(phoneNumber = request.request.phoneNumber, reCaptchaToken = reCaptchaToken).getString("sessionInfo") + callbacks.onSendVerificationCodeResponse(sessionInfo) + Log.d(TAG, "callback: onSendVerificationCodeResponse") + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun sendVerificationCodeCompat(request: SendVerificationCodeRequest, callbacks: IFirebaseAuthCallbacks) { + sendVerificationCode(SendVerificationCodeAidlRequest().apply { this.request = request }, callbacks) + } + + override fun sendGetOobConfirmationCodeEmail(request: SendGetOobConfirmationCodeEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + try { + Log.d(TAG, "sendGetOobConfirmationCodeEmail") + client.getOobConfirmationCode( + requestType = request.settings?.requestTypeAsString ?: "OOB_REQ_TYPE_UNSPECIFIED", + email = request.email, + iOSBundleId = request.settings?.iOSBundle, + iOSAppStoreId = request.settings?.iOSAppStoreId, + continueUrl = request.settings?.url, + androidInstallApp = request.settings?.androidInstallApp, + androidMinimumVersion = request.settings?.androidMinimumVersion, + androidPackageName = request.settings?.androidPackageName, + canHandleCodeInApp = request.settings?.handleCodeInApp + ) + Log.d(TAG, "callback: onResetPasswordResponse") + callbacks.onResetPasswordResponse(null) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun sendGetOobConfirmationCodeEmailCompat(email: String?, actionCodeSettings: ActionCodeSettings?, callbacks: IFirebaseAuthCallbacks) { + sendGetOobConfirmationCodeEmail(SendGetOobConfirmationCodeEmailAidlRequest().apply { this.email = email; this.settings = actionCodeSettings }, callbacks) + } + + override fun setFirebaseUiVersion(request: SetFirebaseUiVersionAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: setFirebaseUiVersion") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun setFirebaseUIVersionCompat(firebaseUiVersion: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: setFirebaseUIVersionCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun signInAnonymously(request: SignInAnonymouslyAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "signInAnonymously") + try { + val tokenResult = client.signupNewUser(tenantId = request.tenantId) + val idToken = tokenResult.getString("idToken") + val refreshToken = tokenResult.getString("refreshToken") + val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() + val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = true } + Log.d(TAG, "callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun signInAnonymouslyCompat(callbacks: IFirebaseAuthCallbacks) { + signInAnonymously(SignInAnonymouslyAidlRequest(), callbacks) + } + + override fun signInWithCredential(request: SignInWithCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "signInWithCredential request: ${request.request}") + try { + val tokenResult = client.verifyAssertion(request.request.requestUri, request.request.postBody, request.request.returnSecureToken, request.request.returnIdpCredential) + Log.d(TAG, "signInWithCredential callback: $tokenResult ") + val idToken = tokenResult.getString("idToken") + val refreshToken = tokenResult.getString("refreshToken") + val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() + val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() + Log.d(TAG, "signInWithCredential callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "signInWithCredential callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun signInWithCredentialCompat(verifyAssertionRequest: VerifyAssertionRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "signInWithCredentialCompat verifyAssertionRequest: $verifyAssertionRequest") + signInWithCredential(SignInWithCredentialAidlRequest(verifyAssertionRequest), callbacks) + } + + override fun signInWithCustomToken(request: SignInWithCustomTokenAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "signInWithCustomToken") + try { + val tokenResult = client.verifyCustomToken(token = request.token) + val idToken = tokenResult.getString("idToken") + val refreshToken = tokenResult.getString("refreshToken") + val isNewUser = tokenResult.optBoolean("isNewUser") + val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() + val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = isNewUser } + Log.d(TAG, "callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun signInWithCustomTokenCompat(token: String, callbacks: IFirebaseAuthCallbacks) { + signInWithCustomToken(SignInWithCustomTokenAidlRequest().apply { this.token = token }, callbacks) + } + + override fun signInWithEmailAndPassword(request: SignInWithEmailAndPasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "signInWithEmailAndPassword") + try { + val tokenResult = client.verifyPassword(email = request.email, password = request.password, tenantId = request.tenantId) + val idToken = tokenResult.getString("idToken") + val refreshToken = tokenResult.getString("refreshToken") + val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() + val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() + Log.d(TAG, "callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun signInWithEmailAndPasswordCompat(email: String?, password: String?, callbacks: IFirebaseAuthCallbacks) { + signInWithEmailAndPassword(SignInWithEmailAndPasswordAidlRequest().apply { this.email = email; this.password = password }, callbacks) + } + + override fun signInWithEmailLink(request: SignInWithEmailLinkAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: signInWithEmailLink") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun signInWithEmailLinkCompat(credential: EmailAuthCredential?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: signInWithEmailLinkCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun signInWithPhoneNumber(request: SignInWithPhoneNumberAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "signInWithPhoneNumber") + try { + val tokenResult = client.verifyPhoneNumber( + phoneNumber = request.credential.phoneNumber, + temporaryProof = request.credential.temporaryProof, + sessionInfo = request.credential.sessionInfo, + code = request.credential.smsCode + ) + val idToken = tokenResult.getString("idToken") + val refreshToken = tokenResult.getString("refreshToken") + val isNewUser = tokenResult.optBoolean("isNewUser") + val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() + val accountInfoResult = client.getAccountInfo(idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = isNewUser } + Log.d(TAG, "callback: onGetTokenResponseAndUser") + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun signInWithPhoneNumberCompat(credential: PhoneAuthCredential?, callbacks: IFirebaseAuthCallbacks) { + signInWithPhoneNumber(SignInWithPhoneNumberAidlRequest().apply { this.credential = credential }, callbacks) + } + + override fun startMfaEnrollmentWithPhoneNumber(request: StartMfaPhoneNumberEnrollmentAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: startMfaEnrollmentWithPhoneNumber") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun startMfaSignInWithPhoneNumber(request: StartMfaPhoneNumberSignInAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: startMfaSignInWithPhoneNumber") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun unenrollMfa(request: UnenrollMfaAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: unenrollMfa") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun unlinkEmailCredential(request: UnlinkEmailCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: unlinkEmailCredential") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun unlinkEmailCredentialCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: unlinkEmailCredentialCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun unlinkFederatedCredential(request: UnlinkFederatedCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: unlinkFederatedCredential") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun unlinkFederatedCredentialCompat(provider: String?, cachedState: String?, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: unlinkFederatedCredentialCompat") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + override fun updateProfile(request: UpdateProfileAidlRequest, callbacks: IFirebaseAuthCallbacks) { + lifecycleScope.launchWhenStarted { + Log.d(TAG, "updateProfile") + try { + val getTokenResponse = refreshTokenResponse(request.cachedState) + val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() + val setAccountInfo = client.setAccountInfo(idToken = getTokenResponse.accessToken, localId = accountInfoResult.localId, displayName = request.request.displayName, photoUrl = request.request.photoUrl, deleteAttribute = request.request.deleteAttributeList).toGetAccountInfoUser() + accountInfoResult.photoUrl = setAccountInfo.photoUrl + accountInfoResult.displayName = setAccountInfo.displayName + callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) + } catch (e: Exception) { + Log.w(TAG, "callback: onFailure", e) + callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) + } + } + } + + override fun updateProfileCompat(cachedState: String?, userProfileChangeRequest: UserProfileChangeRequest, callbacks: IFirebaseAuthCallbacks) { + updateProfile(UpdateProfileAidlRequest().apply { this.cachedState = cachedState; this.request = userProfileChangeRequest}, callbacks) + } + + override fun verifyBeforeUpdateEmail(request: VerifyBeforeUpdateEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { + Log.d(TAG, "Not yet implemented: verifyBeforeUpdateEmail") + callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) + } + + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean { + if (super.onTransact(code, data, reply, flags)) return true + Log.d(TAG, "onTransact: $code, $data, $flags") + return false + } +} diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt new file mode 100644 index 0000000..072d4d9 --- /dev/null +++ b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt @@ -0,0 +1,155 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.firebase.auth + +import android.content.Context +import android.util.Log +import com.android.volley.NetworkResponse +import com.android.volley.ParseError +import com.android.volley.Request.Method.GET +import com.android.volley.Request.Method.POST +import com.android.volley.Response +import com.android.volley.VolleyError +import com.android.volley.toolbox.HttpHeaderParser +import com.android.volley.toolbox.JsonObjectRequest +import com.android.volley.toolbox.JsonRequest +import com.android.volley.toolbox.Volley +import org.json.JSONArray +import org.json.JSONException +import org.json.JSONObject +import org.microg.gms.utils.singleInstanceOf +import org.microg.gms.utils.toHexString +import java.io.UnsupportedEncodingException +import java.lang.RuntimeException +import java.nio.charset.Charset +import kotlin.coroutines.resume +import kotlin.coroutines.resumeWithException +import kotlin.coroutines.suspendCoroutine + +private const val TAG = "GmsFirebaseAuthClient" + +class IdentityToolkitClient(context: Context, private val apiKey: String, private val packageName: String? = null, private val certSha1Hash: ByteArray? = null) { + private val queue = singleInstanceOf { Volley.newRequestQueue(context.applicationContext) } + + private fun buildRelyingPartyUrl(method: String) = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/$method?key=$apiKey" + private fun buildStsUrl(method: String) = "https://securetoken.googleapis.com/v1/$method?key=$apiKey" + + private fun getRequestHeaders(): Map = hashMapOf().apply { + if (packageName != null) put("X-Android-Package", packageName) + if (certSha1Hash != null) put("X-Android-Cert", certSha1Hash.toHexString().uppercase()) + } + + private suspend fun request(method: String, data: JSONObject): JSONObject = suspendCoroutine { continuation -> + queue.add(object : JsonObjectRequest(POST, buildRelyingPartyUrl(method), data, { + continuation.resume(it) + }, { + Log.d(TAG, "Error: ${it.networkResponse?.data?.decodeToString() ?: it.message}") + continuation.resumeWithException(RuntimeException(it)) + }) { + override fun getHeaders(): Map = getRequestHeaders() + }) + } + + suspend fun createAuthUri(identifier: String? = null, tenantId: String? = null, continueUri: String? = "http://localhost"): JSONObject = + request("createAuthUri", JSONObject() + .put("identifier", identifier) + .put("tenantId", tenantId) + .put("continueUri", continueUri)) + + suspend fun getAccountInfo(idToken: String? = null): JSONObject = + request("getAccountInfo", JSONObject() + .put("idToken", idToken)) + + suspend fun getProjectConfig(): JSONObject = suspendCoroutine { continuation -> + queue.add(JsonObjectRequest(GET, buildRelyingPartyUrl("getProjectConfig"), null, { continuation.resume(it) }, { continuation.resumeWithException(RuntimeException(it)) })) + } + + suspend fun getOobConfirmationCode(requestType: String, email: String? = null, newEmail: String? = null, continueUrl: String? = null, idToken: String? = null, iOSBundleId: String? = null, iOSAppStoreId: String? = null, androidMinimumVersion: String? = null, androidInstallApp: Boolean? = null, androidPackageName: String? = null, canHandleCodeInApp: Boolean? = null): JSONObject = + request("getOobConfirmationCode", JSONObject() + .put("kind", "identitytoolkit#relyingparty") + .put("requestType", requestType) + .put("email", email) + .put("newEmail", newEmail) + .put("continueUrl", continueUrl) + .put("idToken", idToken) + .put("iOSBundleId", iOSBundleId) + .put("iOSAppStoreId", iOSAppStoreId) + .put("androidMinimumVersion", androidMinimumVersion) + .put("androidInstallApp", androidInstallApp) + .put("androidPackageName", androidPackageName) + .put("canHandleCodeInApp", canHandleCodeInApp)) + + + suspend fun sendVerificationCode(phoneNumber: String? = null, reCaptchaToken: String? = null): JSONObject = + request("sendVerificationCode", JSONObject() + .put("phoneNumber", phoneNumber) + .put("recaptchaToken", reCaptchaToken)) + + suspend fun setAccountInfo(idToken: String? = null, localId: String? = null, email: String? = null, password: String? = null, displayName: String? = null, photoUrl: String? = null, deleteAttribute: List = emptyList()): JSONObject = + request("setAccountInfo", JSONObject() + .put("idToken", idToken) + .put("localId", localId) + .put("email", email) + .put("password", password) + .put("displayName", displayName) + .put("photoUrl", photoUrl) + .put("deleteAttribute", JSONArray().apply { deleteAttribute.map { put(it) } })) + + suspend fun signupNewUser(email: String? = null, password: String? = null, tenantId: String? = null): JSONObject = + request("signupNewUser", JSONObject() + .put("email", email) + .put("password", password) + .put("tenantId", tenantId)) + + suspend fun verifyCustomToken(token: String? = null, returnSecureToken: Boolean = true): JSONObject = + request("verifyCustomToken", JSONObject() + .put("token", token) + .put("returnSecureToken", returnSecureToken)) + + suspend fun verifyAssertion(requestUri: String? = null, postBody: String? = null, returnSecureToken: Boolean = true, returnIdpCredential: Boolean = true): JSONObject = + request("verifyAssertion", JSONObject() + .put("requestUri", requestUri) + .put("postBody", postBody) + .put("returnSecureToken", returnSecureToken) + .put("returnIdpCredential", returnIdpCredential)) + + suspend fun verifyPassword(email: String? = null, password: String? = null, tenantId: String? = null, returnSecureToken: Boolean = true): JSONObject = + request("verifyPassword", JSONObject() + .put("email", email) + .put("password", password) + .put("tenantId", tenantId) + .put("returnSecureToken", returnSecureToken)) + + suspend fun verifyPhoneNumber(phoneNumber: String? = null, sessionInfo: String? = null, code: String? = null, idToken: String? = null, verificationProof: String? = null, temporaryProof: String? = null): JSONObject = + request("verifyPhoneNumber", JSONObject() + .put("verificationProof", verificationProof) + .put("code", code) + .put("idToken", idToken) + .put("temporaryProof", temporaryProof) + .put("phoneNumber", phoneNumber) + .put("sessionInfo", sessionInfo)) + + suspend fun getTokenByRefreshToken(refreshToken: String): JSONObject = suspendCoroutine { continuation -> + queue.add(object : JsonRequest(POST, buildStsUrl("token"), "grant_type=refresh_token&refresh_token=$refreshToken", { continuation.resume(it) }, { continuation.resumeWithException(RuntimeException(it)) }) { + override fun parseNetworkResponse(response: NetworkResponse): Response { + return try { + val jsonString = String(response.data, Charset.forName(HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET))) + Response.success(JSONObject(jsonString), null) + } catch (e: UnsupportedEncodingException) { + Response.error(ParseError(e)) + } catch (je: JSONException) { + Response.error(ParseError(je)) + } + } + + override fun getBodyContentType(): String { + return "application/x-www-form-urlencoded" + } + + override fun getHeaders(): Map = getRequestHeaders() + }) + } +} \ No newline at end of file diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaActivity.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaActivity.kt new file mode 100644 index 0000000..4311eb3 --- /dev/null +++ b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaActivity.kt @@ -0,0 +1,104 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.firebase.auth + +import android.annotation.SuppressLint +import android.app.Activity +import android.content.Context +import android.content.Intent +import android.content.Intent.* +import android.os.Bundle +import android.os.ResultReceiver +import android.util.Log +import android.webkit.JavascriptInterface +import android.webkit.WebSettings +import android.webkit.WebView +import androidx.appcompat.app.AppCompatActivity +import org.microg.gms.firebase.auth.core.R +import org.microg.gms.profile.Build +import org.microg.gms.profile.ProfileManager +import kotlin.coroutines.resume +import kotlin.coroutines.resumeWithException +import kotlin.coroutines.suspendCoroutine + +private const val TAG = "GmsFirebaseAuthCaptcha" + +class ReCaptchaActivity : AppCompatActivity() { + private val receiver: ResultReceiver? + get() = intent.getParcelableExtra(EXTRA_RESULT_RECEIVER) + private val hostname: String + get() = intent.getStringExtra(EXTRA_HOSTNAME) ?: "localhost:5000" + private var finished = false + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + openWebsite() + } + + @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") + private fun openWebsite() { + val apiKey = intent.getStringExtra(EXTRA_API_KEY) ?: return finishResult(Activity.RESULT_CANCELED) + setContentView(R.layout.activity_recaptcha) + val view = findViewById(R.id.web) + val settings = view.settings + settings.javaScriptEnabled = true + settings.useWideViewPort = false + settings.setSupportZoom(false) + settings.displayZoomControls = false + settings.cacheMode = WebSettings.LOAD_NO_CACHE + ProfileManager.ensureInitialized(this) + settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString) + view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback") + val captcha = assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey) + view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/") + } + + fun finishResult(resultCode: Int, token: String? = null) { + finished = true + setResult(resultCode, token?.let { Intent().apply { putExtra(EXTRA_TOKEN, it) } }) + receiver?.send(resultCode, token?.let { Bundle().apply { putString(EXTRA_TOKEN, it) } }) + finish() + } + + override fun onDestroy() { + super.onDestroy() + if (!finished) receiver?.send(Activity.RESULT_CANCELED, null) + } + + companion object { + class ReCaptchaCallback(val activity: ReCaptchaActivity) { + @JavascriptInterface + fun onReCaptchaToken(token: String) { + Log.d(TAG, "onReCaptchaToken: $token") + activity.finishResult(Activity.RESULT_OK, token) + } + } + + fun isSupported(context: Context): Boolean = true + + suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine { continuation -> + val intent = Intent(context, ReCaptchaActivity::class.java) + val resultReceiver = object : ResultReceiver(null) { + override fun onReceiveResult(resultCode: Int, resultData: Bundle?) { + try { + if (resultCode == Activity.RESULT_OK) { + continuation.resume(resultData?.getString(EXTRA_TOKEN)!!) + } + } catch (e: Exception) { + continuation.resumeWithException(e) + } + } + } + intent.putExtra(EXTRA_API_KEY, apiKey) + intent.putExtra(EXTRA_RESULT_RECEIVER, resultReceiver) + intent.putExtra(EXTRA_HOSTNAME, hostname) + intent.addFlags(FLAG_ACTIVITY_NEW_TASK) + intent.addFlags(FLAG_ACTIVITY_REORDER_TO_FRONT) + intent.addFlags(FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) + context.startActivity(intent) + } + } +} diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaOverlayService.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaOverlayService.kt new file mode 100644 index 0000000..b04ac1c --- /dev/null +++ b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaOverlayService.kt @@ -0,0 +1,173 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.firebase.auth + +import android.annotation.SuppressLint +import android.app.Activity +import android.app.Service +import android.content.ComponentName +import android.content.Context +import android.content.Intent +import android.content.ServiceConnection +import android.graphics.PixelFormat +import android.os.Bundle +import android.os.IBinder +import android.os.ResultReceiver +import android.provider.Settings +import android.util.DisplayMetrics +import android.util.Log +import android.view.* +import android.webkit.JavascriptInterface +import android.webkit.WebSettings +import android.webkit.WebView +import android.widget.FrameLayout +import org.microg.gms.firebase.auth.core.R +import org.microg.gms.profile.Build +import org.microg.gms.profile.ProfileManager +import kotlin.coroutines.resume +import kotlin.coroutines.resumeWithException +import kotlin.coroutines.suspendCoroutine + +private const val TAG = "GmsFirebaseAuthCaptcha" + +class ReCaptchaOverlayService : Service() { + + private var receiver: ResultReceiver? = null + private var hostname: String? = null + private var apiKey: String? = null + + private var finished = false + private var container: View? = null + private var windowManager: WindowManager? = null + + override fun onBind(intent: Intent): IBinder? { + init(intent) + return null + } + + override fun onUnbind(intent: Intent?): Boolean { + finishResult(Activity.RESULT_CANCELED) + return super.onUnbind(intent) + } + + private fun init(intent: Intent) { + apiKey = intent.getStringExtra(EXTRA_API_KEY) ?: return finishResult(Activity.RESULT_CANCELED) + receiver = intent.getParcelableExtra(EXTRA_RESULT_RECEIVER) + hostname = intent.getStringExtra(EXTRA_HOSTNAME) ?: "localhost:5000" + windowManager = getSystemService(Context.WINDOW_SERVICE) as WindowManager + show() + } + + @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") + private fun show() { + val layoutParamsType = if (android.os.Build.VERSION.SDK_INT >= 26) { + WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY + } else { + WindowManager.LayoutParams.TYPE_SYSTEM_ALERT + } + + val params = WindowManager.LayoutParams( + WindowManager.LayoutParams.MATCH_PARENT, + WindowManager.LayoutParams.WRAP_CONTENT, + layoutParamsType, + 0, + PixelFormat.TRANSLUCENT) + + params.gravity = Gravity.CENTER or Gravity.START + params.x = 0 + params.y = 0 + + val interceptorLayout: FrameLayout = object : FrameLayout(this) { + override fun dispatchKeyEvent(event: KeyEvent): Boolean { + if (event.action == KeyEvent.ACTION_DOWN) { + if (event.keyCode == KeyEvent.KEYCODE_BACK || event.keyCode == KeyEvent.KEYCODE_HOME) { + finishResult(Activity.RESULT_CANCELED) + return true + } + } + return super.dispatchKeyEvent(event) + } + } + + val inflater = getSystemService(Context.LAYOUT_INFLATER_SERVICE) as? LayoutInflater? + if (inflater != null) { + val container = inflater.inflate(R.layout.activity_recaptcha, interceptorLayout) + this.container = container + container.setBackgroundResource(androidx.appcompat.R.drawable.abc_dialog_material_background) + val pad = (5.0 * (resources.displayMetrics.densityDpi.toFloat() / DisplayMetrics.DENSITY_DEFAULT)).toInt() + container.setOnTouchListener { v, _ -> + v.performClick() + finishResult(Activity.RESULT_CANCELED) + return@setOnTouchListener true + } + val view = container.findViewById(R.id.web) + view.setPadding(pad, pad, pad, pad) + val settings = view.settings + settings.javaScriptEnabled = true + settings.useWideViewPort = false + settings.setSupportZoom(false) + settings.displayZoomControls = false + settings.cacheMode = WebSettings.LOAD_NO_CACHE + ProfileManager.ensureInitialized(this) + settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString) + view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback") + val captcha = assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey!!) + view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/") + windowManager?.addView(container, params) + } + } + + fun finishResult(resultCode: Int, token: String? = null) { + if (!finished) { + finished = true + receiver?.send(resultCode, token?.let { Bundle().apply { putString(EXTRA_TOKEN, it) } }) + } + container?.let { windowManager?.removeView(it) } + } + + companion object { + + private val recaptchaServiceConnection = object : ServiceConnection { + override fun onServiceConnected(name: ComponentName?, service: IBinder?) { + Log.d(TAG, "onReCaptchaToken: onServiceConnected: $name") + } + + override fun onServiceDisconnected(name: ComponentName?) { + Log.d(TAG, "onReCaptchaToken: onServiceDisconnected: $name") + } + } + + class ReCaptchaCallback(private val overlay: ReCaptchaOverlayService) { + @JavascriptInterface + fun onReCaptchaToken(token: String) { + Log.d(TAG, "onReCaptchaToken: $token") + overlay.finishResult(Activity.RESULT_OK, token) + } + } + + fun isSupported(context: Context): Boolean = android.os.Build.VERSION.SDK_INT < 23 || Settings.canDrawOverlays(context) + + suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine { continuation -> + val intent = Intent(context, ReCaptchaOverlayService::class.java) + val resultReceiver = object : ResultReceiver(null) { + override fun onReceiveResult(resultCode: Int, resultData: Bundle?) { + context.unbindService(recaptchaServiceConnection) + try { + if (resultCode == Activity.RESULT_OK) { + continuation.resume(resultData?.getString(EXTRA_TOKEN)!!) + } + } catch (e: Exception) { + continuation.resumeWithException(e) + } + } + } + intent.putExtra(EXTRA_API_KEY, apiKey) + intent.putExtra(EXTRA_RESULT_RECEIVER, resultReceiver) + intent.putExtra(EXTRA_HOSTNAME, hostname) + context.bindService(intent, recaptchaServiceConnection, BIND_AUTO_CREATE) + } + } +} diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/extensions.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/extensions.kt new file mode 100644 index 0000000..66fd1b1 --- /dev/null +++ b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/extensions.kt @@ -0,0 +1,11 @@ +/** + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.firebase.auth + +const val EXTRA_TOKEN = "token" +const val EXTRA_API_KEY = "api_key" +const val EXTRA_HOSTNAME = "hostname" +const val EXTRA_RESULT_RECEIVER = "receiver" \ No newline at end of file diff --git a/firebase-auth/core/src/main/res/layout/activity_recaptcha.xml b/firebase-auth/core/src/main/res/layout/activity_recaptcha.xml new file mode 100644 index 0000000..36ea80b --- /dev/null +++ b/firebase-auth/core/src/main/res/layout/activity_recaptcha.xml @@ -0,0 +1,19 @@ + + + + + + + diff --git a/firebase-auth/src/main/AndroidManifest.xml b/firebase-auth/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c256eb4 --- /dev/null +++ b/firebase-auth/src/main/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/ActionCodeSettings.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/ActionCodeSettings.aidl new file mode 100644 index 0000000..adedd19 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/ActionCodeSettings.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth; + +parcelable ActionCodeSettings; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/EmailAuthCredential.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/EmailAuthCredential.aidl new file mode 100644 index 0000000..20cabbd --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/EmailAuthCredential.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth; + +parcelable EmailAuthCredential; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/PhoneAuthCredential.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/PhoneAuthCredential.aidl new file mode 100644 index 0000000..b3d6abb --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/PhoneAuthCredential.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth; + +parcelable PhoneAuthCredential; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/UserProfileChangeRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/UserProfileChangeRequest.aidl new file mode 100644 index 0000000..123af80 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/UserProfileChangeRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth; + +parcelable UserProfileChangeRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ApplyActionCodeAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ApplyActionCodeAidlRequest.aidl new file mode 100644 index 0000000..9e0520b --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ApplyActionCodeAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable ApplyActionCodeAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ChangeEmailAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ChangeEmailAidlRequest.aidl new file mode 100644 index 0000000..e95043a --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ChangeEmailAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable ChangeEmailAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ChangePasswordAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ChangePasswordAidlRequest.aidl new file mode 100644 index 0000000..55457b4 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ChangePasswordAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable ChangePasswordAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CheckActionCodeAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CheckActionCodeAidlRequest.aidl new file mode 100644 index 0000000..6d4afa8 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CheckActionCodeAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable CheckActionCodeAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ConfirmPasswordResetAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ConfirmPasswordResetAidlRequest.aidl new file mode 100644 index 0000000..12f79de --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ConfirmPasswordResetAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable ConfirmPasswordResetAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CreateAuthUriResponse.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CreateAuthUriResponse.aidl new file mode 100644 index 0000000..fae4215 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CreateAuthUriResponse.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable CreateAuthUriResponse; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CreateUserWithEmailAndPasswordAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CreateUserWithEmailAndPasswordAidlRequest.aidl new file mode 100644 index 0000000..9191617 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/CreateUserWithEmailAndPasswordAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable CreateUserWithEmailAndPasswordAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/DeleteAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/DeleteAidlRequest.aidl new file mode 100644 index 0000000..d45bda0 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/DeleteAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable DeleteAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/FinalizeMfaEnrollmentAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/FinalizeMfaEnrollmentAidlRequest.aidl new file mode 100644 index 0000000..50bfa3b --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/FinalizeMfaEnrollmentAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable FinalizeMfaEnrollmentAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/FinalizeMfaSignInAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/FinalizeMfaSignInAidlRequest.aidl new file mode 100644 index 0000000..2453bd6 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/FinalizeMfaSignInAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable FinalizeMfaSignInAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetAccessTokenAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetAccessTokenAidlRequest.aidl new file mode 100644 index 0000000..cc44192 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetAccessTokenAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable GetAccessTokenAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetAccountInfoUser.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetAccountInfoUser.aidl new file mode 100644 index 0000000..50c3316 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetAccountInfoUser.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable GetAccountInfoUser; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetProvidersForEmailAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetProvidersForEmailAidlRequest.aidl new file mode 100644 index 0000000..0760f59 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetProvidersForEmailAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable GetProvidersForEmailAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetTokenResponse.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetTokenResponse.aidl new file mode 100644 index 0000000..b6838f6 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/GetTokenResponse.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable GetTokenResponse; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/IFirebaseAuthCallbacks.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/IFirebaseAuthCallbacks.aidl new file mode 100644 index 0000000..cd2ea94 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/IFirebaseAuthCallbacks.aidl @@ -0,0 +1,22 @@ +package com.google.firebase.auth.api.internal; + +import com.google.android.gms.common.api.Status; +import com.google.firebase.auth.PhoneAuthCredential; +import com.google.firebase.auth.api.internal.CreateAuthUriResponse; +import com.google.firebase.auth.api.internal.GetAccountInfoUser; +import com.google.firebase.auth.api.internal.GetTokenResponse; +import com.google.firebase.auth.api.internal.ResetPasswordResponse; + +interface IFirebaseAuthCallbacks { + oneway void onGetTokenResponse(in GetTokenResponse response) = 0; + oneway void onGetTokenResponseAndUser(in GetTokenResponse response, in GetAccountInfoUser user) = 1; + oneway void onCreateAuthUriResponse(in CreateAuthUriResponse response) = 2; + oneway void onResetPasswordResponse(in ResetPasswordResponse response) = 3; + oneway void onFailure(in Status status) = 4; + oneway void onDeleteAccountResponse() = 5; + oneway void onEmailVerificationResponse() = 6; + //oneway void onSetAccountInfo(String s) = 7 + oneway void onSendVerificationCodeResponse(String sessionInfo) = 8; + oneway void onVerificationCompletedResponse(in PhoneAuthCredential credential) = 9; + oneway void onVerificationAutoTimeOut(String sessionInfo) = 10; +} diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/IFirebaseAuthService.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/IFirebaseAuthService.aidl new file mode 100644 index 0000000..0714492 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/IFirebaseAuthService.aidl @@ -0,0 +1,108 @@ +package com.google.firebase.auth.api.internal; + +import com.google.firebase.auth.api.internal.ApplyActionCodeAidlRequest; +import com.google.firebase.auth.api.internal.ChangeEmailAidlRequest; +import com.google.firebase.auth.api.internal.ChangePasswordAidlRequest; +import com.google.firebase.auth.api.internal.CheckActionCodeAidlRequest; +import com.google.firebase.auth.api.internal.ConfirmPasswordResetAidlRequest; +import com.google.firebase.auth.api.internal.CreateUserWithEmailAndPasswordAidlRequest; +import com.google.firebase.auth.api.internal.DeleteAidlRequest; +import com.google.firebase.auth.api.internal.FinalizeMfaEnrollmentAidlRequest; +import com.google.firebase.auth.api.internal.FinalizeMfaSignInAidlRequest; +import com.google.firebase.auth.api.internal.GetAccessTokenAidlRequest; +import com.google.firebase.auth.api.internal.GetProvidersForEmailAidlRequest; +import com.google.firebase.auth.api.internal.IFirebaseAuthCallbacks; +import com.google.firebase.auth.api.internal.LinkEmailAuthCredentialAidlRequest; +import com.google.firebase.auth.api.internal.LinkFederatedCredentialAidlRequest; +import com.google.firebase.auth.api.internal.LinkPhoneAuthCredentialAidlRequest; +import com.google.firebase.auth.api.internal.ReloadAidlRequest; +import com.google.firebase.auth.api.internal.SendEmailVerificationWithSettingsAidlRequest; +import com.google.firebase.auth.api.internal.SendGetOobConfirmationCodeEmailAidlRequest; +import com.google.firebase.auth.api.internal.SendVerificationCodeAidlRequest; +import com.google.firebase.auth.api.internal.SendVerificationCodeRequest; +import com.google.firebase.auth.api.internal.SetFirebaseUiVersionAidlRequest; +import com.google.firebase.auth.api.internal.SignInAnonymouslyAidlRequest; +import com.google.firebase.auth.api.internal.SignInWithCredentialAidlRequest; +import com.google.firebase.auth.api.internal.SignInWithCustomTokenAidlRequest; +import com.google.firebase.auth.api.internal.SignInWithEmailAndPasswordAidlRequest; +import com.google.firebase.auth.api.internal.SignInWithEmailLinkAidlRequest; +import com.google.firebase.auth.api.internal.SignInWithPhoneNumberAidlRequest; +import com.google.firebase.auth.api.internal.StartMfaPhoneNumberEnrollmentAidlRequest; +import com.google.firebase.auth.api.internal.StartMfaPhoneNumberSignInAidlRequest; +import com.google.firebase.auth.api.internal.UnenrollMfaAidlRequest; +import com.google.firebase.auth.api.internal.UnlinkEmailCredentialAidlRequest; +import com.google.firebase.auth.api.internal.UnlinkFederatedCredentialAidlRequest; +import com.google.firebase.auth.api.internal.UpdateProfileAidlRequest; +import com.google.firebase.auth.api.internal.VerifyAssertionRequest; +import com.google.firebase.auth.api.internal.VerifyBeforeUpdateEmailAidlRequest; +import com.google.firebase.auth.ActionCodeSettings; +import com.google.firebase.auth.EmailAuthCredential; +import com.google.firebase.auth.PhoneAuthCredential; +import com.google.firebase.auth.UserProfileChangeRequest; + +interface IFirebaseAuthService { + void getAccessTokenCompat(String refreshToken, IFirebaseAuthCallbacks callbacks) = 0; + void signInWithCustomTokenCompat(String token, IFirebaseAuthCallbacks callbacks) = 1; + void signInWithCredentialCompat(in VerifyAssertionRequest verifyAssertionRequest, IFirebaseAuthCallbacks callbacks) = 2; + void updateProfileCompat(String cachedState, in UserProfileChangeRequest userProfileChangeRequest, IFirebaseAuthCallbacks callbacks) = 3; + void changeEmailCompat(String cachedState, String email, IFirebaseAuthCallbacks callbacks) = 4; + void changePasswordCompat(String cachedState, String password, IFirebaseAuthCallbacks callbacks) = 5; + void createUserWithEmailAndPasswordCompat(String email, String password, IFirebaseAuthCallbacks callbacks) = 6; + void signInWithEmailAndPasswordCompat(String email, String password, IFirebaseAuthCallbacks callbacks) = 7; + void getProvidersForEmailCompat(String email, IFirebaseAuthCallbacks callbacks) = 8; + + void linkEmailAuthCredentialCompat(String email, String password, String cachedState, IFirebaseAuthCallbacks callbacks) = 10; + void linkFederatedCredentialCompat(String cachedState, in VerifyAssertionRequest verifyAssertionRequest, IFirebaseAuthCallbacks callbacks) = 11; + void unlinkEmailCredentialCompat(String cachedState, IFirebaseAuthCallbacks callbacks) = 12; + void unlinkFederatedCredentialCompat(String provider, String cachedState, IFirebaseAuthCallbacks callbacks) = 13; + void reloadCompat(String cachedState, IFirebaseAuthCallbacks callbacks) = 14; + void signInAnonymouslyCompat(IFirebaseAuthCallbacks callbacks) = 15; + void deleteCompat(String cachedState, IFirebaseAuthCallbacks callbacks) = 16; + void checkActionCodeCompat(String code, IFirebaseAuthCallbacks callbacks) = 18; + void applyActionCodeCompat(String code, IFirebaseAuthCallbacks callbacks) = 19; + void confirmPasswordResetCompat(String code, String newPassword, IFirebaseAuthCallbacks callbacks) = 20; + void sendVerificationCodeCompat(in SendVerificationCodeRequest request, IFirebaseAuthCallbacks callbacks) = 21; + void signInWithPhoneNumberCompat(in PhoneAuthCredential credential, IFirebaseAuthCallbacks callbacks) = 22; + void linkPhoneAuthCredentialCompat(String cachedState, in PhoneAuthCredential credential, IFirebaseAuthCallbacks callbacks) = 23; + + void sendEmailVerificationCompat(String token, in ActionCodeSettings actionCodeSettings, IFirebaseAuthCallbacks callbacks) = 25; + void setFirebaseUIVersionCompat(String firebaseUiVersion, IFirebaseAuthCallbacks callbacks) = 26; + void sendGetOobConfirmationCodeEmailCompat(String email, in ActionCodeSettings actionCodeSettings, IFirebaseAuthCallbacks callbacks) = 27; + void signInWithEmailLinkCompat(in EmailAuthCredential credential, IFirebaseAuthCallbacks callbacks) = 28; + + void getAccessToken(in GetAccessTokenAidlRequest request, IFirebaseAuthCallbacks callbacks) = 100; + void signInWithCustomToken(in SignInWithCustomTokenAidlRequest request, IFirebaseAuthCallbacks callbacks) = 101; + void signInWithCredential(in SignInWithCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 102; + void updateProfile(in UpdateProfileAidlRequest request, IFirebaseAuthCallbacks callbacks) = 103; + void changeEmail(in ChangeEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 104; + void changePassword(in ChangePasswordAidlRequest request, IFirebaseAuthCallbacks callbacks) = 105; + void createUserWithEmailAndPassword(in CreateUserWithEmailAndPasswordAidlRequest request, IFirebaseAuthCallbacks callbacks) = 106; + void signInWithEmailAndPassword(in SignInWithEmailAndPasswordAidlRequest request, IFirebaseAuthCallbacks callbacks) = 107; + void getProvidersForEmail(in GetProvidersForEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 108; + + void linkEmailAuthCredential(in LinkEmailAuthCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 110; + void linkFederatedCredential(in LinkFederatedCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 111; + void unlinkEmailCredential(in UnlinkEmailCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 112; + void unlinkFederatedCredential(in UnlinkFederatedCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 113; + void reload(in ReloadAidlRequest request, IFirebaseAuthCallbacks callbacks) = 114; + void signInAnonymously(in SignInAnonymouslyAidlRequest request, IFirebaseAuthCallbacks callbacks) = 115; + void delete(in DeleteAidlRequest request, IFirebaseAuthCallbacks callbacks) = 116; + void checkActionCode(in CheckActionCodeAidlRequest request, IFirebaseAuthCallbacks callbacks) = 118; + void applyActionCode(in ApplyActionCodeAidlRequest request, IFirebaseAuthCallbacks callbacks) = 119; + void confirmPasswordReset(in ConfirmPasswordResetAidlRequest request, IFirebaseAuthCallbacks callbacks) = 120; + void sendVerificationCode(in SendVerificationCodeAidlRequest request, IFirebaseAuthCallbacks callbacks) = 121; + void signInWithPhoneNumber(in SignInWithPhoneNumberAidlRequest request, IFirebaseAuthCallbacks callbacks) = 122; + void linkPhoneAuthCredential(in LinkPhoneAuthCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 123; + + void sendEmailVerification(in SendEmailVerificationWithSettingsAidlRequest request, IFirebaseAuthCallbacks callbacks) = 125; + void setFirebaseUiVersion(in SetFirebaseUiVersionAidlRequest request, IFirebaseAuthCallbacks callbacks) = 126; + void sendGetOobConfirmationCodeEmail(in SendGetOobConfirmationCodeEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 127; + void signInWithEmailLink(in SignInWithEmailLinkAidlRequest request, IFirebaseAuthCallbacks callbacks) = 128; + + void startMfaEnrollmentWithPhoneNumber(in StartMfaPhoneNumberEnrollmentAidlRequest request, IFirebaseAuthCallbacks callbacks) = 129; + void unenrollMfa(in UnenrollMfaAidlRequest request, IFirebaseAuthCallbacks callbacks) = 130; + void finalizeMfaEnrollment(in FinalizeMfaEnrollmentAidlRequest request, IFirebaseAuthCallbacks callbacks) = 131; + void startMfaSignInWithPhoneNumber(in StartMfaPhoneNumberSignInAidlRequest request, IFirebaseAuthCallbacks callbacks) = 132; + void finalizeMfaSignIn(in FinalizeMfaSignInAidlRequest request, IFirebaseAuthCallbacks callbacks) = 133; + void verifyBeforeUpdateEmail(in VerifyBeforeUpdateEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 134; +} diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkEmailAuthCredentialAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkEmailAuthCredentialAidlRequest.aidl new file mode 100644 index 0000000..bee0011 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkEmailAuthCredentialAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable LinkEmailAuthCredentialAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkFederatedCredentialAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkFederatedCredentialAidlRequest.aidl new file mode 100644 index 0000000..3894901 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkFederatedCredentialAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable LinkFederatedCredentialAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkPhoneAuthCredentialAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkPhoneAuthCredentialAidlRequest.aidl new file mode 100644 index 0000000..62caaf6 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/LinkPhoneAuthCredentialAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable LinkPhoneAuthCredentialAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ReloadAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ReloadAidlRequest.aidl new file mode 100644 index 0000000..5057e2e --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ReloadAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable ReloadAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ResetPasswordResponse.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ResetPasswordResponse.aidl new file mode 100644 index 0000000..572587f --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/ResetPasswordResponse.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable ResetPasswordResponse; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendEmailVerificationWithSettingsAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendEmailVerificationWithSettingsAidlRequest.aidl new file mode 100644 index 0000000..6db47c5 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendEmailVerificationWithSettingsAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SendEmailVerificationWithSettingsAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendGetOobConfirmationCodeEmailAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendGetOobConfirmationCodeEmailAidlRequest.aidl new file mode 100644 index 0000000..5e1e519 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendGetOobConfirmationCodeEmailAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SendGetOobConfirmationCodeEmailAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendVerificationCodeAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendVerificationCodeAidlRequest.aidl new file mode 100644 index 0000000..21b4971 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendVerificationCodeAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SendVerificationCodeAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendVerificationCodeRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendVerificationCodeRequest.aidl new file mode 100644 index 0000000..3f797f5 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SendVerificationCodeRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SendVerificationCodeRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SetFirebaseUiVersionAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SetFirebaseUiVersionAidlRequest.aidl new file mode 100644 index 0000000..39ff41a --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SetFirebaseUiVersionAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SetFirebaseUiVersionAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInAnonymouslyAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInAnonymouslyAidlRequest.aidl new file mode 100644 index 0000000..2b4c21f --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInAnonymouslyAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SignInAnonymouslyAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithCredentialAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithCredentialAidlRequest.aidl new file mode 100644 index 0000000..acda7af --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithCredentialAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SignInWithCredentialAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithCustomTokenAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithCustomTokenAidlRequest.aidl new file mode 100644 index 0000000..047489e --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithCustomTokenAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SignInWithCustomTokenAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithEmailAndPasswordAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithEmailAndPasswordAidlRequest.aidl new file mode 100644 index 0000000..77a277d --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithEmailAndPasswordAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SignInWithEmailAndPasswordAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithEmailLinkAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithEmailLinkAidlRequest.aidl new file mode 100644 index 0000000..1bb2d32 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithEmailLinkAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SignInWithEmailLinkAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithPhoneNumberAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithPhoneNumberAidlRequest.aidl new file mode 100644 index 0000000..270d342 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/SignInWithPhoneNumberAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable SignInWithPhoneNumberAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StartMfaPhoneNumberEnrollmentAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StartMfaPhoneNumberEnrollmentAidlRequest.aidl new file mode 100644 index 0000000..630a4c9 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StartMfaPhoneNumberEnrollmentAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable StartMfaPhoneNumberEnrollmentAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StartMfaPhoneNumberSignInAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StartMfaPhoneNumberSignInAidlRequest.aidl new file mode 100644 index 0000000..65c8063 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StartMfaPhoneNumberSignInAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable StartMfaPhoneNumberSignInAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StringList.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StringList.aidl new file mode 100644 index 0000000..6244601 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/StringList.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable StringList; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnenrollMfaAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnenrollMfaAidlRequest.aidl new file mode 100644 index 0000000..5ce470b --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnenrollMfaAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable UnenrollMfaAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnlinkEmailCredentialAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnlinkEmailCredentialAidlRequest.aidl new file mode 100644 index 0000000..735a319 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnlinkEmailCredentialAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable UnlinkEmailCredentialAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnlinkFederatedCredentialAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnlinkFederatedCredentialAidlRequest.aidl new file mode 100644 index 0000000..eb47391 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UnlinkFederatedCredentialAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable UnlinkFederatedCredentialAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UpdateProfileAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UpdateProfileAidlRequest.aidl new file mode 100644 index 0000000..db6603c --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/UpdateProfileAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable UpdateProfileAidlRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/VerifyAssertionRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/VerifyAssertionRequest.aidl new file mode 100644 index 0000000..7f4787f --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/VerifyAssertionRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable VerifyAssertionRequest; diff --git a/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/VerifyBeforeUpdateEmailAidlRequest.aidl b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/VerifyBeforeUpdateEmailAidlRequest.aidl new file mode 100644 index 0000000..7929892 --- /dev/null +++ b/firebase-auth/src/main/aidl/com/google/firebase/auth/api/internal/VerifyBeforeUpdateEmailAidlRequest.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.auth.api.internal; + +parcelable VerifyBeforeUpdateEmailAidlRequest; diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/ActionCodeSettings.java b/firebase-auth/src/main/java/com/google/firebase/auth/ActionCodeSettings.java new file mode 100644 index 0000000..df07dd6 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/ActionCodeSettings.java @@ -0,0 +1,182 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import org.microg.gms.common.PublicApi; +import org.microg.safeparcel.AutoSafeParcelable; + +/** + * Structure that contains the required continue/state URL with optional Android and iOS bundle identifiers. + * The stateUrl used to initialize this class is the link/deep link/fallback url used while constructing the Firebase dynamic link. + */ +@PublicApi +public class ActionCodeSettings extends AutoSafeParcelable { + @Field(1) + @PublicApi(exclude = true) + public String url; + @Field(2) + @PublicApi(exclude = true) + public String iOSBundle; + @Field(3) + @PublicApi(exclude = true) + public String iOSAppStoreId; + @Field(4) + @PublicApi(exclude = true) + public String androidPackageName; + @Field(5) + @PublicApi(exclude = true) + public boolean androidInstallApp; + @Field(6) + @PublicApi(exclude = true) + public String androidMinimumVersion; + @Field(7) + @PublicApi(exclude = true) + public boolean handleCodeInApp; + @Field(8) + @PublicApi(exclude = true) + public String localeHeader; + @Field(9) + @PublicApi(exclude = true) + public int requestType; + @Field(10) + @PublicApi(exclude = true) + public String dynamicLinkDomain; + + private ActionCodeSettings() { + } + + /** + * @return whether the oob code should be handled by the app. See {@link Builder#setHandleCodeInApp(boolean)} + */ + public boolean canHandleCodeInApp() { + return handleCodeInApp; + } + + /** + * @return the preference for whether to attempt to install the app if it is not present. See {@link Builder#setAndroidPackageName(String, boolean, String)} + */ + public boolean getAndroidInstallApp() { + return androidInstallApp; + } + + /** + * @return the minimum Android app version. See {@link Builder#setAndroidPackageName(String, boolean, String)} + */ + public String getAndroidMinimumVersion() { + return androidMinimumVersion; + } + + /** + * @return the Android Package Name. See {@link Builder#setAndroidPackageName(String, boolean, String)} + */ + public String getAndroidPackageName() { + return androidPackageName; + } + + /** + * @return the iOS Bundle. See {@link Builder#setIOSBundleId(String)} + */ + public String getIOSBundle() { + return iOSBundle; + } + + /** + * @return the URL. See {@link Builder#setUrl(String)} + */ + public String getUrl() { + return url; + } + + /** + * @return a new instance of {@link ActionCodeSettings.Builder}. + */ + public static Builder newBuilder() { + return new Builder(); + } + + /** + * A Builder class for {@link ActionCodeSettings}. Get an instance of this Builder using {@link #newBuilder()}. + */ + public static class Builder { + private String url; + private String iOSBundleId; + private String androidPackageName; + private boolean androidInstallApp; + private String androidMinimumVersion; + private boolean canHandleCodeInApp; + private String dynamicLinkDomain; + + public ActionCodeSettings build() { + ActionCodeSettings settings = new ActionCodeSettings(); + settings.url = url; + settings.iOSBundle = iOSBundleId; + settings.androidPackageName = androidPackageName; + settings.androidInstallApp = androidInstallApp; + settings.handleCodeInApp = canHandleCodeInApp; + settings.dynamicLinkDomain = dynamicLinkDomain; + return settings; + } + + /** + * Sets the Android package name and returns the current builder instance. + * If {@code installIfNotAvailable} is set to true and the link is opened on an android device, it will try to install the app if not already available. + * Otherwise the web URL is used. + *

+ * A minimum version string is also available. If the installed app is an older version, the user is taken to the Play Store to upgrade the app. + */ + public Builder setAndroidPackageName(String androidPackageName, boolean installIfNotAvailable, String minimumVersion) { + this.androidPackageName = androidPackageName; + this.androidInstallApp = installIfNotAvailable; + this.androidMinimumVersion = minimumVersion; + return this; + } + + /** + * Sets the optional FDL domain, overriding the default FDL domain that would be used. + * Must be one of the 5 domains configured in the Firebase console. + */ + public Builder setDynamicLinkDomain(String dynamicLinkDomain) { + this.dynamicLinkDomain = dynamicLinkDomain; + return this; + } + + /** + * The default is false. When set to true, the action code link will be sent as a universal link and will be open by the app if installed. + * In the false case, the code will be sent to the web widget first and then on continue will redirect to the app if installed. + */ + public Builder setHandleCodeInApp(boolean status) { + this.canHandleCodeInApp = status; + return this; + } + + /** + * To be used if the email link that is sent might be opened on an iOS device. + *

+ * Sets the iOS bundle Id and returns the current {@link ActionCodeSettings.Builder} instance. + */ + public Builder setIOSBundleId(String iOSBundleId) { + this.iOSBundleId = iOSBundleId; + return this; + } + + /** + * Sets the URL, which has different meanings in different contexts. For email actions, this is the state/continue URL. + * When the app is not installed, this is the web continue URL with any developer provided state appended (the continueURL query parameter). + * When the app is installed, this is contained in the Firebase dynamic link payload. + * In the case where the code is sent directly to the app and the app is installed, this is the continueURL query parameter in the dynamic link payload. + * Otherwise, when the code is handled by the widget itself, it is the payload itself. + */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + public static final Creator CREATOR = new AutoCreator<>(ActionCodeSettings.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/AuthCredential.java b/firebase-auth/src/main/java/com/google/firebase/auth/AuthCredential.java new file mode 100644 index 0000000..bf3b7e6 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/AuthCredential.java @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import org.microg.gms.common.PublicApi; +import org.microg.safeparcel.AutoSafeParcelable; + +/** + * Represents a credential that the Firebase Authentication server can use to authenticate a user. + */ +@PublicApi +public abstract class AuthCredential extends AutoSafeParcelable { + /** + * Returns the unique string identifier for the provider type with which the credential is associated. + */ + public abstract String getProvider(); + + /** + * Returns the unique string identifier for the sign in method with which the credential is associated. Should match that returned by {@link FirebaseAuth#fetchSignInMethodsForEmail(String)} after this user has signed in with this type of credential. + */ + public abstract String getSignInMethod(); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/DefaultOAuthCredential.java b/firebase-auth/src/main/java/com/google/firebase/auth/DefaultOAuthCredential.java new file mode 100644 index 0000000..f224434 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/DefaultOAuthCredential.java @@ -0,0 +1,66 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import com.google.firebase.auth.api.internal.VerifyAssertionRequest; + +import org.microg.gms.common.PublicApi; + +@PublicApi +public class DefaultOAuthCredential extends OAuthCredential { + @Field(1) + @PublicApi(exclude = true) + public String provider; + @Field(2) + @PublicApi(exclude = true) + public String idToken; + @Field(3) + @PublicApi(exclude = true) + public String accessToken; + @Field(4) + @PublicApi(exclude = true) + public VerifyAssertionRequest webSignInToken; + @Field(5) + @PublicApi(exclude = true) + public String pendingToken; + @Field(6) + @PublicApi(exclude = true) + public String secret; + @Field(7) + @PublicApi(exclude = true) + public String rawNonce; + + + @Override + public String getAccessToken() { + return accessToken; + } + + @Override + public String getIdToken() { + return idToken; + } + + @Override + public String getSecret() { + return secret; + } + + @Override + public String getProvider() { + return provider; + } + + @Override + public String getSignInMethod() { + return provider; + } + + public static final Creator CREATOR = new AutoCreator<>(DefaultOAuthCredential.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/EmailAuthCredential.java b/firebase-auth/src/main/java/com/google/firebase/auth/EmailAuthCredential.java new file mode 100644 index 0000000..d6adfd2 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/EmailAuthCredential.java @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import org.microg.gms.common.PublicApi; + +/** + * Wraps an email and password tuple for authentication purposes. + */ +@PublicApi +public class EmailAuthCredential extends AuthCredential { + @Field(1) + @PublicApi(exclude = true) + public String email; + @Field(2) + @PublicApi(exclude = true) + public String password; + @Field(3) + @PublicApi(exclude = true) + public String signInLink; + @Field(4) + @PublicApi(exclude = true) + public String cachedState; + @Field(5) + @PublicApi(exclude = true) + public boolean isForLinking; + + /** + * Returns the unique string identifier for the provider type with which the credential is associated. + */ + @Override + public String getProvider() { + return "password"; + } + + /** + * Returns either {@link EmailAuthProvider#EMAIL_LINK_SIGN_IN_METHOD} for a credential generated with {@link EmailAuthProvider#getCredentialWithLink(String, String)} or {@link EmailAuthProvider#EMAIL_PASSWORD_SIGN_IN_METHOD} for a credential generated with {@link EmailAuthProvider#getCredential(String, String)}. + */ + @Override + public String getSignInMethod() { + if (password != null && !password.isEmpty()) { + return "password"; + } + return "emailLink"; + } + + public static final Creator CREATOR = new AutoCreator<>(EmailAuthCredential.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/OAuthCredential.java b/firebase-auth/src/main/java/com/google/firebase/auth/OAuthCredential.java new file mode 100644 index 0000000..772a456 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/OAuthCredential.java @@ -0,0 +1,32 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import org.microg.gms.common.PublicApi; + +/** + * Holds credentials generated by a sign-in with a credential to an IDP that uses OAuth + */ +@PublicApi +public abstract class OAuthCredential extends AuthCredential { + /** + * Returns the OAuth access token associated with this credential. + */ + public abstract String getAccessToken(); + + /** + * Returns the OAuth ID token associated with this credential. + */ + public abstract String getIdToken(); + + /** + * Returns the OAuth secret associated with this credential. This will be null for OAuth 2.0 providers. + */ + public abstract String getSecret(); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/PhoneAuthCredential.java b/firebase-auth/src/main/java/com/google/firebase/auth/PhoneAuthCredential.java new file mode 100644 index 0000000..1798a30 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/PhoneAuthCredential.java @@ -0,0 +1,64 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import org.microg.gms.common.PublicApi; + +/** + * Wraps phone number and verification information for authentication purposes. + */ +@PublicApi +public class PhoneAuthCredential extends AuthCredential { + @Field(1) + @PublicApi(exclude = true) + public String sessionInfo; + @Field(2) + @PublicApi(exclude = true) + public String smsCode; + @Field(3) + @PublicApi(exclude = true) + public boolean hasVerificationCode; + @Field(4) + @PublicApi(exclude = true) + public String phoneNumber; + @Field(5) + @PublicApi(exclude = true) + public boolean autoCreate; + @Field(6) + @PublicApi(exclude = true) + public String temporaryProof; + @Field(7) + @PublicApi(exclude = true) + public String mfaEnrollmentId; + + /** + * Returns the unique string identifier for the provider type with which the credential is associated. + */ + @Override + public String getProvider() { + return "phone"; + } + + /** + * Returns the unique string identifier for the sign in method with which the credential is associated. Should match that returned by {@link FirebaseAuth#fetchSignInMethodsForEmail(String)} after this user has signed in with this type of credential. + */ + @Override + public String getSignInMethod() { + return "phone"; + } + + /** + * Gets the auto-retrieved SMS verification code if applicable. When SMS verification is used, you will be called back first via onCodeSent(String, PhoneAuthProvider.ForceResendingToken), and later onVerificationCompleted(PhoneAuthCredential) with a {@link PhoneAuthCredential} containing a non-null SMS code if auto-retrieval succeeded. If Firebase used another approach to verify the phone number and triggers a callback via onVerificationCompleted(PhoneAuthCredential), then SMS code can be null. + */ + public String getSmsCode() { + return smsCode; + } + + public static final Creator CREATOR = new AutoCreator<>(PhoneAuthCredential.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/UserProfileChangeRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/UserProfileChangeRequest.java new file mode 100644 index 0000000..a86c21d --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/UserProfileChangeRequest.java @@ -0,0 +1,88 @@ +/* + * SPDX-FileCopyrightText: 2020, 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.firebase.auth; + +import android.net.Uri; + +import org.microg.gms.common.PublicApi; +import org.microg.safeparcel.AutoSafeParcelable; + +/** + * Request used to update user profile information. + */ +@PublicApi +public class UserProfileChangeRequest extends AutoSafeParcelable { + @Field(1) + @PublicApi(exclude = true) + public String displayName; + @Field(2) + @PublicApi(exclude = true) + public String photoUrl; + @Field(3) + @PublicApi(exclude = true) + public boolean shouldRemoveDisplayName; + @Field(4) + @PublicApi(exclude = true) + public boolean shouldRemovePhotoUri; + + private UserProfileChangeRequest() { + } + + public String getDisplayName() { + return displayName; + } + + public Uri getPhotoUri() { + return Uri.parse(photoUrl); + } + + /** + * The request builder. + */ + public static class Builder { + private String displayName; + private Uri photoUri; + private boolean shouldRemoveDisplayName; + private boolean shouldRemovePhotoUri; + + /** + * Sets the updated display name. + * @return the {@link UserProfileChangeRequest.Builder} for chaining + */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + shouldRemoveDisplayName = displayName == null; + return this; + } + + /** + * Sets the updated photo {@link Uri}. + * @return the {@link UserProfileChangeRequest.Builder} for chaining + */ + public Builder setPhotoUri(Uri photoUri) { + this.photoUri = photoUri; + shouldRemovePhotoUri = photoUri == null; + return this; + } + + /** + * Returns a {@link UserProfileChangeRequest} instance + */ + public UserProfileChangeRequest build() { + UserProfileChangeRequest request = new UserProfileChangeRequest(); + request.displayName = displayName; + request.photoUrl = photoUri.toString(); + request.shouldRemoveDisplayName = shouldRemoveDisplayName; + request.shouldRemovePhotoUri = shouldRemovePhotoUri; + return request; + } + } + + public static final Creator CREATOR = new AutoCreator<>(UserProfileChangeRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ApplyActionCodeAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ApplyActionCodeAidlRequest.java new file mode 100644 index 0000000..d68ed77 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ApplyActionCodeAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ApplyActionCodeAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(ApplyActionCodeAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ChangeEmailAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ChangeEmailAidlRequest.java new file mode 100644 index 0000000..70b4e10 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ChangeEmailAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ChangeEmailAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(ChangeEmailAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ChangePasswordAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ChangePasswordAidlRequest.java new file mode 100644 index 0000000..70823da --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ChangePasswordAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ChangePasswordAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(ChangePasswordAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CheckActionCodeAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CheckActionCodeAidlRequest.java new file mode 100644 index 0000000..57f3f94 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CheckActionCodeAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class CheckActionCodeAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(CheckActionCodeAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ConfirmPasswordResetAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ConfirmPasswordResetAidlRequest.java new file mode 100644 index 0000000..f9505ed --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ConfirmPasswordResetAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ConfirmPasswordResetAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(ConfirmPasswordResetAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CreateAuthUriResponse.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CreateAuthUriResponse.java new file mode 100644 index 0000000..e32735a --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CreateAuthUriResponse.java @@ -0,0 +1,27 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.List; + +public class CreateAuthUriResponse extends AutoSafeParcelable { + @Field(2) + public String authUri; + @Field(3) + public boolean isRegistered; + @Field(4) + public String providerId; + @Field(5) + public boolean isForExistingProvider; + @Field(6) + public StringList stringList = new StringList(); + @Field(7) + public List signInMethods = new ArrayList<>(); + public static final Creator CREATOR = new AutoCreator<>(CreateAuthUriResponse.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CreateUserWithEmailAndPasswordAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CreateUserWithEmailAndPasswordAidlRequest.java new file mode 100644 index 0000000..a1eb8b9 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/CreateUserWithEmailAndPasswordAidlRequest.java @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class CreateUserWithEmailAndPasswordAidlRequest extends AutoSafeParcelable { + @Field(1) + public String email; + @Field(2) + public String password; + @Field(3) + public String tenantId; + + public static final Creator CREATOR = new AutoCreator<>(CreateUserWithEmailAndPasswordAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/DeleteAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/DeleteAidlRequest.java new file mode 100644 index 0000000..3d815a6 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/DeleteAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class DeleteAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(DeleteAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/FinalizeMfaEnrollmentAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/FinalizeMfaEnrollmentAidlRequest.java new file mode 100644 index 0000000..d76ac82 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/FinalizeMfaEnrollmentAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class FinalizeMfaEnrollmentAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(FinalizeMfaEnrollmentAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/FinalizeMfaSignInAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/FinalizeMfaSignInAidlRequest.java new file mode 100644 index 0000000..f578a74 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/FinalizeMfaSignInAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class FinalizeMfaSignInAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(FinalizeMfaSignInAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetAccessTokenAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetAccessTokenAidlRequest.java new file mode 100644 index 0000000..6b7d9e9 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetAccessTokenAidlRequest.java @@ -0,0 +1,15 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class GetAccessTokenAidlRequest extends AutoSafeParcelable { + @Field(1) + public String refreshToken; + + public static final Creator CREATOR = new AutoCreator<>(GetAccessTokenAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetAccountInfoUser.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetAccountInfoUser.java new file mode 100644 index 0000000..6113649 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetAccountInfoUser.java @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import com.google.firebase.auth.DefaultOAuthCredential; + +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.List; + +public class GetAccountInfoUser extends AutoSafeParcelable { + @Field(2) + public String localId; + @Field(3) + public String email; + @Field(4) + public boolean isEmailVerified; + @Field(5) + public String displayName; + @Field(6) + public String photoUrl; + @Field(7) + public ProviderUserInfoList providerInfoList = new ProviderUserInfoList(); + @Field(8) + public String password; + @Field(9) + public String phoneNumber; + @Field(10) + public long creationTimestamp; + @Field(11) + public long lastSignInTimestamp; + @Field(12) + public boolean isNewUser; + @Field(13) + public DefaultOAuthCredential defaultOAuthCredential; + @Field(14) + public List mfaInfoList; + + public static final Creator CREATOR = new AutoCreator<>(GetAccountInfoUser.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetProvidersForEmailAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetProvidersForEmailAidlRequest.java new file mode 100644 index 0000000..393bf11 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetProvidersForEmailAidlRequest.java @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class GetProvidersForEmailAidlRequest extends AutoSafeParcelable { + @Field(1) + public String email; + @Field(2) + public String tenantId; + public static final Creator CREATOR = new AutoCreator<>(GetProvidersForEmailAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetTokenResponse.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetTokenResponse.java new file mode 100644 index 0000000..66e786f --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/GetTokenResponse.java @@ -0,0 +1,44 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.json.JSONException; +import org.json.JSONObject; +import org.microg.safeparcel.AutoSafeParcelable; + +public class GetTokenResponse extends AutoSafeParcelable { + @Field(2) + public String refreshToken; + @Field(3) + public String accessToken; + @Field(4) + public Long expiresIn; + @Field(5) + public String tokenType; + @Field(6) + public Long issuedAt; + + public GetTokenResponse() { + issuedAt = System.currentTimeMillis(); + } + + public static GetTokenResponse parseJson(String json) { + try { + JSONObject object = new JSONObject(json); + GetTokenResponse response = new GetTokenResponse(); + response.refreshToken = object.optString("refresh_token", null); + response.accessToken = object.optString("access_token", null); + response.tokenType = object.optString("token_type", null); + response.expiresIn = object.optLong("expires_in"); + response.issuedAt = object.optLong("issued_at"); + return response; + } catch (JSONException e) { + throw new RuntimeException(e); + } + } + + public static final Creator CREATOR = new AutoCreator<>(GetTokenResponse.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkEmailAuthCredentialAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkEmailAuthCredentialAidlRequest.java new file mode 100644 index 0000000..f80f2ce --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkEmailAuthCredentialAidlRequest.java @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LinkEmailAuthCredentialAidlRequest extends AutoSafeParcelable { + @Field(1) + public String email; + @Field(2) + public String password; + @Field(3) + public String cachedState; + public static final Creator CREATOR = new AutoCreator<>(LinkEmailAuthCredentialAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkFederatedCredentialAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkFederatedCredentialAidlRequest.java new file mode 100644 index 0000000..6fd8122 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkFederatedCredentialAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LinkFederatedCredentialAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(LinkFederatedCredentialAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkPhoneAuthCredentialAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkPhoneAuthCredentialAidlRequest.java new file mode 100644 index 0000000..afc653b --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/LinkPhoneAuthCredentialAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LinkPhoneAuthCredentialAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(LinkPhoneAuthCredentialAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/MfaInfo.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/MfaInfo.java new file mode 100644 index 0000000..1e2ddaf --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/MfaInfo.java @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class MfaInfo extends AutoSafeParcelable { + + + public static final Creator CREATOR = new AutoCreator<>(MfaInfo.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ProviderUserInfo.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ProviderUserInfo.java new file mode 100644 index 0000000..1f7a19b --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ProviderUserInfo.java @@ -0,0 +1,27 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ProviderUserInfo extends AutoSafeParcelable { + @Field(2) + public String federatedId; + @Field(3) + public String displayName; + @Field(4) + public String photoUrl; + @Field(5) + public String providerId; + @Field(6) + public String rawUserInfo; + @Field(7) + public String phoneNumber; + @Field(8) + public String email; + + public static final Creator CREATOR = new AutoCreator<>(ProviderUserInfo.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ProviderUserInfoList.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ProviderUserInfoList.java new file mode 100644 index 0000000..ff99d31 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ProviderUserInfoList.java @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.List; + +public class ProviderUserInfoList extends AutoSafeParcelable { + @Field(2) + public List providerUserInfos = new ArrayList<>(); + + + public static final Creator CREATOR = new AutoCreator<>(ProviderUserInfoList.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ReloadAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ReloadAidlRequest.java new file mode 100644 index 0000000..de609f7 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ReloadAidlRequest.java @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ReloadAidlRequest extends AutoSafeParcelable { + @Field(1) + public String cachedState; + public static final Creator CREATOR = new AutoCreator<>(ReloadAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ResetPasswordResponse.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ResetPasswordResponse.java new file mode 100644 index 0000000..06af063 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/ResetPasswordResponse.java @@ -0,0 +1,20 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ResetPasswordResponse extends AutoSafeParcelable { + @Field(2) + public String email; + @Field(3) + public String newEmail; + @Field(4) + public String requestType; + @Field(5) + public MfaInfo mfaInfo; + public static final Creator CREATOR = new AutoCreator<>(ResetPasswordResponse.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendEmailVerificationWithSettingsAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendEmailVerificationWithSettingsAidlRequest.java new file mode 100644 index 0000000..9bda971 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendEmailVerificationWithSettingsAidlRequest.java @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import com.google.firebase.auth.ActionCodeSettings; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SendEmailVerificationWithSettingsAidlRequest extends AutoSafeParcelable { + @Field(1) + public String token; + @Field(2) + public ActionCodeSettings settings; + public static final Creator CREATOR = new AutoCreator<>(SendEmailVerificationWithSettingsAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendGetOobConfirmationCodeEmailAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendGetOobConfirmationCodeEmailAidlRequest.java new file mode 100644 index 0000000..04dd49c --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendGetOobConfirmationCodeEmailAidlRequest.java @@ -0,0 +1,20 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import com.google.firebase.auth.ActionCodeSettings; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SendGetOobConfirmationCodeEmailAidlRequest extends AutoSafeParcelable { + @Field(1) + public String email; + @Field(2) + public ActionCodeSettings settings; + @Field(3) + public String tenantId; + public static final Creator CREATOR = new AutoCreator<>(SendGetOobConfirmationCodeEmailAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendVerificationCodeAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendVerificationCodeAidlRequest.java new file mode 100644 index 0000000..9b3eccd --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendVerificationCodeAidlRequest.java @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SendVerificationCodeAidlRequest extends AutoSafeParcelable { + @Field(1) + public SendVerificationCodeRequest request; + public static final Creator CREATOR = new AutoCreator<>(SendVerificationCodeAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendVerificationCodeRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendVerificationCodeRequest.java new file mode 100644 index 0000000..971d6fa --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SendVerificationCodeRequest.java @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SendVerificationCodeRequest extends AutoSafeParcelable { + @Field(1) + public String phoneNumber; + @Field(2) + public Long timeoutInSeconds; + @Field(3) + public boolean forceNewSmsVerificationSession; + @Field(4) + public String languageHeader; + @Field(5) + public String tenantId; + @Field(6) + public String recaptchaToken; + + public static final Creator CREATOR = new AutoCreator<>(SendVerificationCodeRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SetFirebaseUiVersionAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SetFirebaseUiVersionAidlRequest.java new file mode 100644 index 0000000..964382e --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SetFirebaseUiVersionAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SetFirebaseUiVersionAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(SetFirebaseUiVersionAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInAnonymouslyAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInAnonymouslyAidlRequest.java new file mode 100644 index 0000000..2549412 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInAnonymouslyAidlRequest.java @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SignInAnonymouslyAidlRequest extends AutoSafeParcelable { + @Field(1) + public String tenantId; + public static final Creator CREATOR = new AutoCreator<>(SignInAnonymouslyAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithCredentialAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithCredentialAidlRequest.java new file mode 100644 index 0000000..8e45a2d --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithCredentialAidlRequest.java @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class SignInWithCredentialAidlRequest extends AbstractSafeParcelable { + + @Field(1) + public VerifyAssertionRequest request; + + public SignInWithCredentialAidlRequest(VerifyAssertionRequest request) { + this.request = request; + } + + public SignInWithCredentialAidlRequest() { + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SignInWithCredentialAidlRequest.class); + +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithCustomTokenAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithCustomTokenAidlRequest.java new file mode 100644 index 0000000..0f7f107 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithCustomTokenAidlRequest.java @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SignInWithCustomTokenAidlRequest extends AutoSafeParcelable { + @Field(1) + public String token; + @Field(2) + public String tenantId; + + public static final Creator CREATOR = new AutoCreator<>(SignInWithCustomTokenAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithEmailAndPasswordAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithEmailAndPasswordAidlRequest.java new file mode 100644 index 0000000..c8aa04d --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithEmailAndPasswordAidlRequest.java @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SignInWithEmailAndPasswordAidlRequest extends AutoSafeParcelable { + @Field(1) + public String email; + @Field(2) + public String password; + @Field(3) + public String tenantId; + public static final Creator CREATOR = new AutoCreator<>(SignInWithEmailAndPasswordAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithEmailLinkAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithEmailLinkAidlRequest.java new file mode 100644 index 0000000..71028fa --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithEmailLinkAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SignInWithEmailLinkAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(SignInWithEmailLinkAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithPhoneNumberAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithPhoneNumberAidlRequest.java new file mode 100644 index 0000000..d076cf3 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/SignInWithPhoneNumberAidlRequest.java @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import com.google.firebase.auth.PhoneAuthCredential; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SignInWithPhoneNumberAidlRequest extends AutoSafeParcelable { + @Field(1) + public PhoneAuthCredential credential; + @Field(2) + public String tenantId; + + public static final Creator CREATOR = new AutoCreator<>(SignInWithPhoneNumberAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StartMfaPhoneNumberEnrollmentAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StartMfaPhoneNumberEnrollmentAidlRequest.java new file mode 100644 index 0000000..b4a93b6 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StartMfaPhoneNumberEnrollmentAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class StartMfaPhoneNumberEnrollmentAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(StartMfaPhoneNumberEnrollmentAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StartMfaPhoneNumberSignInAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StartMfaPhoneNumberSignInAidlRequest.java new file mode 100644 index 0000000..151d4e6 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StartMfaPhoneNumberSignInAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class StartMfaPhoneNumberSignInAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(StartMfaPhoneNumberSignInAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StringList.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StringList.java new file mode 100644 index 0000000..8c72245 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/StringList.java @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.List; + +public class StringList extends AutoSafeParcelable { + @Field(1) + public int versionCode = 1; + @Field(2) + public List values = new ArrayList<>(); + public static final Creator CREATOR = new AutoCreator<>(StringList.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnenrollMfaAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnenrollMfaAidlRequest.java new file mode 100644 index 0000000..49c4b0f --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnenrollMfaAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class UnenrollMfaAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(UnenrollMfaAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnlinkEmailCredentialAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnlinkEmailCredentialAidlRequest.java new file mode 100644 index 0000000..55770dd --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnlinkEmailCredentialAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class UnlinkEmailCredentialAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(UnlinkEmailCredentialAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnlinkFederatedCredentialAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnlinkFederatedCredentialAidlRequest.java new file mode 100644 index 0000000..1533997 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UnlinkFederatedCredentialAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class UnlinkFederatedCredentialAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(UnlinkFederatedCredentialAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UpdateProfileAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UpdateProfileAidlRequest.java new file mode 100644 index 0000000..25d4020 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/UpdateProfileAidlRequest.java @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import com.google.firebase.auth.UserProfileChangeRequest; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class UpdateProfileAidlRequest extends AutoSafeParcelable { + @Field(1) + public UserProfileChangeRequest request; + @Field(2) + public String cachedState; + public static final Creator CREATOR = new AutoCreator<>(UpdateProfileAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/VerifyAssertionRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/VerifyAssertionRequest.java new file mode 100644 index 0000000..0a0b130 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/VerifyAssertionRequest.java @@ -0,0 +1,59 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class VerifyAssertionRequest extends AbstractSafeParcelable { + + @Field(2) + public String requestUri; + @Field(3) + public String accessToken; + @Field(4) + public String idToken; + @Field(5) + public String instanceId; + @Field(6) + public String providerId; + @Field(7) + public String pendingIdToken; + @Field(8) + public String postBody; + @Field(9) + public String localId; + @Field(10) + public boolean returnIdpCredential; + @Field(11) + public boolean returnSecureToken; + @Field(12) + public String delegatedProjectNumber; + @Field(13) + public String sessionId; + @Field(14) + public String queryParameter; + @Field(15) + public String tenantId; + @Field(16) + public boolean returnRefreshToken; + @Field(17) + public String tenantProjectNumber; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(VerifyAssertionRequest.class); + +} diff --git a/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/VerifyBeforeUpdateEmailAidlRequest.java b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/VerifyBeforeUpdateEmailAidlRequest.java new file mode 100644 index 0000000..d6d5c12 --- /dev/null +++ b/firebase-auth/src/main/java/com/google/firebase/auth/api/internal/VerifyBeforeUpdateEmailAidlRequest.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.auth.api.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class VerifyBeforeUpdateEmailAidlRequest extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(VerifyBeforeUpdateEmailAidlRequest.class); +} diff --git a/firebase-auth/src/main/java/org/microg/gms/firebase/auth/Constants.java b/firebase-auth/src/main/java/org/microg/gms/firebase/auth/Constants.java new file mode 100644 index 0000000..0f83c9f --- /dev/null +++ b/firebase-auth/src/main/java/org/microg/gms/firebase/auth/Constants.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.firebase.auth; + +public class Constants { + public static final String EXTRA_API_KEY = "com.google.firebase.auth.API_KEY"; + public static final String EXTRA_LIBRARY_VERSION = "com.google.firebase.auth.LIBRARY_VERSION"; +} diff --git a/firebase-dynamic-links/build.gradle b/firebase-dynamic-links/build.gradle new file mode 100644 index 0000000..7e10a72 --- /dev/null +++ b/firebase-dynamic-links/build.gradle @@ -0,0 +1,51 @@ +/* + * SPDX-FileCopyrightText: 2019 e Foundation + * SPDX-FileCopyrightText: 2020 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +android { + namespace "com.google.firebase.dynamiclinks" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } +} + +dependencies { + // Dependencies from firebase-dynamic-links:21.2.0 + api 'androidx.annotation:annotation:1.2.0' + api project(':play-services-base') + api project(':play-services-basement') + api project(':play-services-tasks') +// api project(':firebase-auth-interop') +// api project(':firebase-measurement-connector') +// api project(':firebase-common') +// api project(':firebase-common-ktx') +// api project(':firebase-components') + api 'org.jetbrains.kotlin:kotlin-stdlib:1.7.10' + annotationProcessor project(':safe-parcel-processor') +} + +apply from: '../gradle/publish-android.gradle' + +description = 'microG API for firebase-dynamic-links' + diff --git a/firebase-dynamic-links/src/main/AndroidManifest.xml b/firebase-dynamic-links/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b6845e5 --- /dev/null +++ b/firebase-dynamic-links/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + diff --git a/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl new file mode 100644 index 0000000..978e72c --- /dev/null +++ b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +parcelable DynamicLinkData; diff --git a/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl new file mode 100644 index 0000000..d13b9f2 --- /dev/null +++ b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +import com.google.android.gms.common.api.Status; +import com.google.firebase.dynamiclinks.internal.DynamicLinkData; +import com.google.firebase.dynamiclinks.internal.ShortDynamicLinkImpl; + +interface IDynamicLinksCallbacks { + void onStatusDynamicLinkData(in Status status, in DynamicLinkData dldata) = 0; + void onStatusShortDynamicLink(in Status status, in ShortDynamicLinkImpl sdlink) = 1; +} diff --git a/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl new file mode 100644 index 0000000..b5d4e52 --- /dev/null +++ b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +import com.google.firebase.dynamiclinks.internal.IDynamicLinksCallbacks; +import android.os.Bundle; + +interface IDynamicLinksService { + void getDynamicLink(IDynamicLinksCallbacks callback, String link) = 0; + void createShortDynamicLink(IDynamicLinksCallbacks callback, in Bundle extras) = 1; +} diff --git a/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLinkImpl.aidl b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLinkImpl.aidl new file mode 100644 index 0000000..cfca953 --- /dev/null +++ b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLinkImpl.aidl @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +parcelable ShortDynamicLinkImpl; diff --git a/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/WarningImpl.aidl b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/WarningImpl.aidl new file mode 100644 index 0000000..fbdb3f8 --- /dev/null +++ b/firebase-dynamic-links/src/main/aidl/com/google/firebase/dynamiclinks/internal/WarningImpl.aidl @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +parcelable WarningImpl; diff --git a/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/ShortDynamicLink.java b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/ShortDynamicLink.java new file mode 100644 index 0000000..f613347 --- /dev/null +++ b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/ShortDynamicLink.java @@ -0,0 +1,72 @@ +/* + * 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.firebase.dynamiclinks; + +import android.net.Uri; + +import org.microg.gms.common.PublicApi; + +import java.util.List; + +/** + * Response from {@link DynamicLink.Builder#buildShortDynamicLink()} that returns the shortened Dynamic Link, link flow chart, and warnings from the requested Dynamic Link. + */ +@PublicApi +public interface ShortDynamicLink { + /** + * Gets the preview link to show the link flow chart. + */ + Uri getPreviewLink(); + + /** + * Gets the short Dynamic Link value. + */ + Uri getShortLink(); + + /** + * Gets information about potential warnings on link creation. + */ + List getWarnings(); + + /** + * Path generation option for short Dynamic Link length + */ + @interface Suffix { + /** + * Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated + * 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic + * Links from being crawled, which can potentially expose sensitive information. + */ + int UNGUESSABLE = 1; + /** + * Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 + * characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were + * guessed. + */ + int SHORT = 2; + } + + /** + * Information about potential warnings on short Dynamic Link creation. + */ + interface Warning { + /** + * Gets the warning code. + * + * @deprecated See {@link #getMessage()} for more information on this warning and how to correct it. + */ + @Deprecated + String getCode(); + + /** + * Gets the warning message to help developers improve their requests. + */ + String getMessage(); + } +} diff --git a/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java new file mode 100644 index 0000000..a2b0e42 --- /dev/null +++ b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java @@ -0,0 +1,69 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +import android.os.Parcel; +import androidx.annotation.NonNull; +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import android.os.Bundle; +import android.net.Uri; +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class DynamicLinkData extends AbstractSafeParcelable { + @Field(1) + public final String dynamicLink; + + @Field(2) + public final String deepLink; + + @Field(3) + public final int minVersion; + + @Field(4) + public final long clickTimestamp; + + @Field(5) + public final Bundle extensionBundle; + + @Field(6) + public final Uri redirectUrl; + + @Constructor + public DynamicLinkData(@Param(1) String dynamicLink, @Param(2) String deepLink, @Param(3) int minVersion, @Param(4) long clickTimestamp, @Param(5) Bundle extensionBundle, @Param(6) Uri redirectUrl) { + this.dynamicLink = dynamicLink; + this.deepLink = deepLink; + this.minVersion = minVersion; + this.clickTimestamp = clickTimestamp; + this.extensionBundle = extensionBundle; + this.redirectUrl = redirectUrl; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("DynamicLinkData") + .field("dynamicLink", dynamicLink) + .field("deepLink", deepLink) + .field("minVersion", minVersion) + .field("clickTimestamp", clickTimestamp) + .field("extensionBundle", extensionBundle) + .field("redirectUrl", redirectUrl) + .end(); + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(DynamicLinkData.class); +} diff --git a/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLinkImpl.java b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLinkImpl.java new file mode 100644 index 0000000..350b34d --- /dev/null +++ b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLinkImpl.java @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2019, e Foundation + * SPDX-FileCopyrightText: 2021, Google LLC + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +import android.net.Uri; + +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.List; + + +public class ShortDynamicLinkImpl extends AutoSafeParcelable { + @Field(1) + public final Uri shortLink; + + @Field(2) + public final Uri previewLink; + + @Field(3) + public final List warnings; + + + public ShortDynamicLinkImpl() { + shortLink = Uri.EMPTY; + previewLink = Uri.EMPTY; + + warnings = new ArrayList<>(); + } + + public ShortDynamicLinkImpl(Uri shortLink, Uri previewLink, List warnings) { + this.shortLink = shortLink; + this.previewLink = previewLink; + this.warnings = warnings; + } + + public static final Creator CREATOR = new AutoCreator(ShortDynamicLinkImpl.class); +} diff --git a/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/WarningImpl.java b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/WarningImpl.java new file mode 100644 index 0000000..ae8e9e1 --- /dev/null +++ b/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/WarningImpl.java @@ -0,0 +1,40 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.firebase.dynamiclinks.internal; + +import com.google.firebase.dynamiclinks.ShortDynamicLink; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class WarningImpl extends AutoSafeParcelable implements ShortDynamicLink.Warning { + @Field(1) + @Deprecated + private int code = 1; + + @Field(2) + private final String message; + + private WarningImpl() { + this.message = null; + } + + public WarningImpl(String message) { + this.message = message; + } + + @Override + public String getCode() { + return null; + } + + @Override + public String getMessage() { + return message; + } + + public static final Creator CREATOR = new AutoCreator(WarningImpl.class); +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..1c50760 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +android.useAndroidX=true +org.gradle.configuration-cache=true +org.gradle.caching=true +org.gradle.jvmargs=-Xmx4096m -XX:+UseParallelGC --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED diff --git a/gradle/publish-android.gradle b/gradle/publish-android.gradle new file mode 100644 index 0000000..46c6e63 --- /dev/null +++ b/gradle/publish-android.gradle @@ -0,0 +1,64 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +android { + publishing { + singleVariant("release") { + withSourcesJar() + withJavadocJar() + } + } +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + pom { + name = project.name + description = project.description + url = 'https://github.com/microg/GmsCore' + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id = 'microg' + name = 'microG Team' + } + } + scm { + url = 'https://github.com/microg/GmsCore' + connection = 'scm:git:https://github.com/microg/GmsCore.git' + developerConnection = 'scm:git:ssh://github.com/microg/GmsCore.git' + } + } + + from components.release + } + } + if (project.hasProperty('sonatype.username')) { + repositories { + maven { + name = 'sonatype' + url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' + credentials { + username project.getProperty('sonatype.username') + password project.getProperty('sonatype.password') + } + } + } + } + } + if (project.hasProperty('signing.keyId')) { + signing { + sign publishing.publications + } + } + tasks.getByPath("sourceReleaseJar").duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} diff --git a/gradle/publish-java.gradle b/gradle/publish-java.gradle new file mode 100644 index 0000000..95d9ad9 --- /dev/null +++ b/gradle/publish-java.gradle @@ -0,0 +1,76 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +task javaSourcesJar(type: Jar) { + archiveClassifier.set("sources") + from sourceSets.main.allJava +} + +javadoc { + classpath = configurations.compileClasspath + source = sourceSets.main.allJava +} + +task javaJavadocsJar(type: Jar) { + archiveClassifier.set("javadoc") + from javadoc +} + +artifacts { + archives javaSourcesJar + archives javaJavadocsJar +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + pom { + name = project.name + description = project.description + url = 'https://github.com/microg/GmsCore' + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id = 'microg' + name = 'microG Team' + } + } + scm { + url = 'https://github.com/microg/GmsCore' + connection = 'scm:git:https://github.com/microg/GmsCore.git' + developerConnection = 'scm:git:ssh://github.com/microg/GmsCore.git' + } + } + + from components.java + artifact javaSourcesJar + artifact javaJavadocsJar + } + } + if (project.hasProperty('sonatype.username')) { + repositories { + maven { + name = 'sonatype' + url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' + credentials { + username project.getProperty('sonatype.username') + password project.getProperty('sonatype.password') + } + } + } + } + } + if (project.hasProperty('signing.keyId')) { + signing { + sign publishing.publications + } + } +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..a4b76b9 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..00277a3 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2015, microG Project Team +# SPDX-License-Identifier: CC0-1.0 + +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..f5feea6 --- /dev/null +++ b/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# 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/HEAD/platforms/jvm/plugins-application/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 + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + 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 + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# 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" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..9b42019 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@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 +@rem SPDX-License-Identifier: Apache-2.0 +@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=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +: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 %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/play-services-ads-base/build.gradle b/play-services-ads-base/build.gradle new file mode 100644 index 0000000..bb5ae3d --- /dev/null +++ b/play-services-ads-base/build.gradle @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +android { + namespace "com.google.android.gms.ads_base" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +apply from: '../gradle/publish-android.gradle' + +description = 'microG implementation of play-services-ads-base' + +dependencies { + api project(':play-services-basement') +} diff --git a/play-services-ads-base/src/main/AndroidManifest.xml b/play-services-ads-base/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7f3bbf2 --- /dev/null +++ b/play-services-ads-base/src/main/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/play-services-ads-identifier/build.gradle b/play-services-ads-identifier/build.gradle new file mode 100644 index 0000000..9c5a4d8 --- /dev/null +++ b/play-services-ads-identifier/build.gradle @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +android { + namespace "com.google.android.gms.ads.identifier" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +apply from: '../gradle/publish-android.gradle' + +description = 'microG implementation of play-services-ads-identifier' + +dependencies { + api project(':play-services-basement') +} diff --git a/play-services-ads-identifier/core/build.gradle b/play-services-ads-identifier/core/build.gradle new file mode 100644 index 0000000..5b63bd5 --- /dev/null +++ b/play-services-ads-identifier/core/build.gradle @@ -0,0 +1,42 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +dependencies { + api project(':play-services-ads-identifier') + implementation project(':play-services-base-core') +} + +android { + namespace "org.microg.gms.ads.identifier" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } + + lintOptions { + disable 'MissingTranslation', 'GetLocales' + } +} diff --git a/play-services-ads-identifier/core/src/main/AndroidManifest.xml b/play-services-ads-identifier/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b97bc37 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt b/play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt new file mode 100644 index 0000000..0c4f96d --- /dev/null +++ b/play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt @@ -0,0 +1,139 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package org.microg.gms.ads.identifier + +import android.app.Service +import android.content.Context +import android.content.Intent +import android.content.pm.PackageManager +import android.os.Binder +import android.os.Bundle +import android.os.IBinder +import android.util.Log +import androidx.core.os.bundleOf +import com.google.android.gms.ads.identifier.internal.IAdvertisingIdService +import org.microg.gms.common.GooglePackagePermission +import org.microg.gms.common.PackageUtils +import java.util.UUID + +const val TAG = "AdvertisingId" +const val EMPTY_AD_ID = "00000000-0000-0000-0000-000000000000" + +class AdvertisingIdService : Service() { + override fun onBind(intent: Intent): IBinder? { + return AdvertisingIdServiceImpl(this).asBinder() + } +} + +class MemoryAdvertisingIdConfiguration(context: Context) : AdvertisingIdConfiguration(context) { + override val adTrackingLimitedPerApp: MutableMap = hashMapOf() + override var adTrackingLimitedGlobally: Boolean = true + override var debugLogging: Boolean = false + override var adId: String = EMPTY_AD_ID + override var debugAdId: String = EMPTY_AD_ID + + init { + resetAdvertisingId() + } +} + +abstract class AdvertisingIdConfiguration(private val context: Context) { + abstract val adTrackingLimitedPerApp: MutableMap + abstract var adTrackingLimitedGlobally: Boolean + abstract var debugLogging: Boolean + abstract var adId: String + abstract var debugAdId: String + + fun isAdTrackingLimitedForApp(uid: Int): Boolean { + if (adTrackingLimitedGlobally) return true + return adTrackingLimitedPerApp[uid] ?: false + } + + fun resetAdvertisingId(): String { + adId = UUID.randomUUID().toString() + debugAdId = UUID.randomUUID().toString().dropLast(12) + "10ca1ad1abe1" + return if (debugLogging) debugAdId else adId + } + + fun getAdvertisingIdForApp(uid: Int): String { + if (isAdTrackingLimitedForApp(uid)) return EMPTY_AD_ID + try { + val packageNames = context.packageManager.getPackagesForUid(uid) ?: return EMPTY_AD_ID + for (packageName in packageNames) { + val applicationInfo = context.packageManager.getApplicationInfo(packageName, 0) + if (applicationInfo.targetSdkVersion > 33) { + if (context.packageManager.checkPermission("com.google.android.gms.permission.AD_ID", packageName) == PackageManager.PERMISSION_DENIED) { + throw SecurityException("Permission not granted") + } + } + } + } catch (e: Exception) { + Log.w(TAG, "Permission check failed", e) + return EMPTY_AD_ID + } + val adId = if (debugLogging) debugAdId else adId + return adId.ifEmpty { resetAdvertisingId() } + } +} + +class AdvertisingIdServiceImpl(private val context: Context) : IAdvertisingIdService.Stub() { + private val configuration = MemoryAdvertisingIdConfiguration(context) + + override fun getAdvertisingId(): String { + return configuration.getAdvertisingIdForApp(Binder.getCallingUid()) + } + + override fun isAdTrackingLimited(ignored: Boolean): Boolean { + return configuration.isAdTrackingLimitedForApp(Binder.getCallingUid()) + } + + override fun resetAdvertisingId(packageName: String): String { + PackageUtils.checkPackageUid(context, packageName, getCallingUid()) + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + return configuration.resetAdvertisingId() + } + + override fun setAdTrackingLimitedGlobally(packageName: String, limited: Boolean) { + PackageUtils.checkPackageUid(context, packageName, getCallingUid()) + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + configuration.adTrackingLimitedGlobally = limited + } + + override fun setDebugLoggingEnabled(packageName: String, enabled: Boolean): String { + PackageUtils.checkPackageUid(context, packageName, getCallingUid()) + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + configuration.debugLogging = enabled + return advertisingId + } + + override fun isDebugLoggingEnabled(): Boolean { + return configuration.debugLogging + } + + override fun isAdTrackingLimitedGlobally(): Boolean { + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + return configuration.adTrackingLimitedGlobally + } + + override fun setAdTrackingLimitedForApp(uid: Int, limited: Boolean) { + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + configuration.adTrackingLimitedPerApp[uid] = limited + } + + override fun resetAdTrackingLimitedForApp(uid: Int) { + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + configuration.adTrackingLimitedPerApp.remove(uid) + } + + override fun getAllAppsLimitedAdTrackingConfiguration(): Bundle { + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + return bundleOf(*configuration.adTrackingLimitedPerApp.map { it.key.toString() to it.value }.toTypedArray()) + } + + override fun getAdvertisingIdForApp(uid: Int): String { + PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) + return configuration.getAdvertisingIdForApp(uid) + } +} diff --git a/play-services-ads-identifier/core/src/main/res/values-ar/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ar/strings.xml new file mode 100644 index 0000000..7d308cd --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ar/strings.xml @@ -0,0 +1,7 @@ + + + إشعار مُعَرِّف الإعلان + إذن مُعَرِّف الإعلان + يتيح للتطبيق تلقي إشعار عند تحديث مُعَرِّف الإعلان أو تحديد تفضيلات تتبع الإعلانات للمستخدم. + يتيح لتطبيق الناشر بالوصول إلى مُعَرِّف إعلان صالح بشكل مباشر أو غير مباشر. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ast/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ast/strings.xml new file mode 100644 index 0000000..faf5aa5 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ast/strings.xml @@ -0,0 +1,7 @@ + + + Permite qu\'una aplicación reciba un avisu al anovar la ID de publicidá o al llendar la preferencia de rastrexu publicitariu del usuariu. + Avisu d\'ID de publicidá + Permite que l\'aplicación d\'un espublizador acceda in/direutamente a una ID de publicidá. + Permisu d\'ID de publicidá + diff --git a/play-services-ads-identifier/core/src/main/res/values-az/strings.xml b/play-services-ads-identifier/core/src/main/res/values-az/strings.xml new file mode 100644 index 0000000..5209fd0 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-az/strings.xml @@ -0,0 +1,7 @@ + + + Reklam ID İcazəsi + Dərc edici tətbiq birbaşa və ya dolayı yolla etibarlı reklam ID-ə keçid icazəsi verir. + Reklam ID bildirişi + İstifadəçinin reklam ID-i və ya reklam izləmə seçiminin məhdudlaşdırılması yeniləndikdə, tətbiqə bildiriş almaq icazəsi verir. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-be/strings.xml b/play-services-ads-identifier/core/src/main/res/values-be/strings.xml new file mode 100644 index 0000000..0648bca --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-be/strings.xml @@ -0,0 +1,7 @@ + + + Дазвол рэкламнага ідэнтыфікатара + Дазваляе выдаўцу дадатку прама ці ўскосна атрымліваць доступ да рэкламнага ідэнтыфікатара. + Апавяшчэнне рэкламнага ідэнтыфікатара + Дазваляе дадаткам атрымліваць апавяшчэнне калі рэкламны ідэнтыфікатар або перавага аб ліміце рэкламнай сачэння карыстальніка абноўленыя. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-cs/strings.xml b/play-services-ads-identifier/core/src/main/res/values-cs/strings.xml new file mode 100644 index 0000000..846d2d0 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-cs/strings.xml @@ -0,0 +1,7 @@ + + + Oprávnění k reklamnímu ID + Umožní vydavatelské aplikaci přímý nebo nepřímý přístup k platnému reklamnímu ID. + Oznámení o reklamním ID + Umožní aplikaci obdržet oznámení při aktualizaci reklamního ID nebo uživatelské předvolby omezení reklamního sledování. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-de/strings.xml b/play-services-ads-identifier/core/src/main/res/values-de/strings.xml new file mode 100644 index 0000000..f565613 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-de/strings.xml @@ -0,0 +1,7 @@ + + + Erlaubt einer App, eine Benachrichtigung zu erhalten, wenn sich die Werbe-ID ändert oder der Nutzer das Tracking einschränkt. + Werbe-ID-Benachrichtigung + Erlaubt einer App, direkt oder indirekt, auf die Werbe-ID zuzugreifen. + Werbe-ID-Berechtigung + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-eo/strings.xml b/play-services-ads-identifier/core/src/main/res/values-eo/strings.xml new file mode 100644 index 0000000..a6b3dae --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-eo/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-es/strings.xml b/play-services-ads-identifier/core/src/main/res/values-es/strings.xml new file mode 100644 index 0000000..90c47f7 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-es/strings.xml @@ -0,0 +1,7 @@ + + + Permiso de identificación publicitaria + Permite que una aplicación de editor acceda directa o indirectamente a un ID de publicidad válido. + Notificación del ID de publicidad + Permite que una aplicación reciba una notificación cuando se actualiza el ID de publicidad o la preferencia de limitar el seguimiento de anuncios del usuario. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-fa/strings.xml b/play-services-ads-identifier/core/src/main/res/values-fa/strings.xml new file mode 100644 index 0000000..2239807 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-fa/strings.xml @@ -0,0 +1,7 @@ + + + مجوز شناسه آگهی + به یک برنامه ناشر اجازه می‌دهد تا به شیوه مستقیم یا غیرمستقیم به یک شناسه آگهی معتبر دسترسی پیدا کند. + آگاه‌ساز شناسه آگهی + به یک برنامه اجازه می‌دهد تا هنگام به‌روزرسانی شناسه آگهی یا تنظیمات ردیابی محدود آگهی کاربر، آگاه‌ساز دریافت کند. + diff --git a/play-services-ads-identifier/core/src/main/res/values-fi/strings.xml b/play-services-ads-identifier/core/src/main/res/values-fi/strings.xml new file mode 100644 index 0000000..eca968d --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-fi/strings.xml @@ -0,0 +1,7 @@ + + + Sallii sovelluksen vastaanottaa ilmoituksen, kun käyttäjän mainostunnus tai mainonnan seurantaa rajoittava asetus päivitetään. + Mainostunnuslupa + Mainostunnusilmoitus + Mahdollistaa julkaisijasovellukselle pääsyn voimassa olevaan mainostunnukseen suoraan tai välillisesti. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-fil/strings.xml b/play-services-ads-identifier/core/src/main/res/values-fil/strings.xml new file mode 100644 index 0000000..c00c7dc --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-fil/strings.xml @@ -0,0 +1,7 @@ + + + Pahintulot ng Advertising ID + Nagbibigay-daan sa isang publisher app na mag-access ng wastong advertising ID nang direkta o hindi direkta. + Notification ng Advertising ID + Nagbibigay-daan sa isang app na makatanggap ng notification kapag na-update ang advertising ID o limitahan ang kagustuhan sa pagsubaybay sa ad ng user. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-fr/strings.xml b/play-services-ads-identifier/core/src/main/res/values-fr/strings.xml new file mode 100644 index 0000000..c82f144 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-fr/strings.xml @@ -0,0 +1,7 @@ + + + Permission de l\'identifiant publicitaire + Autorise une application affichant de la publicité à accéder directement ou indirectement à un identifiant publicitaire valide. + Notification de l\'identifiant publicitaire + Autorise une application à être notifiée de la modification de l\'identifiant publicitaire ou de la limitation du suivi publicitaire de l\'utilisateur. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ga/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ga/strings.xml new file mode 100644 index 0000000..51d2e13 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ga/strings.xml @@ -0,0 +1,7 @@ + + + Ligeann sé d’aip fógra a fháil nuair a nuashonraítear an t-aitheantas fógraíochta nó an rogha rianaithe teorann atá ag an úsáideoir. + Fógra aitheantais fógraíochta + Cead ID Fógraíochta + Ligeann sé d’aip foilsitheora rochtain a fháil ar aitheantas bailí fógraíochta go díreach nó go hindíreach. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-in/strings.xml b/play-services-ads-identifier/core/src/main/res/values-in/strings.xml new file mode 100644 index 0000000..0570563 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-in/strings.xml @@ -0,0 +1,7 @@ + + + Memungkinkan aplikasi penerbit mengakses ID periklanan yang valid secara langsung atau tidak langsung. + Izin ID Periklanan + Pemberitahuan ID periklanan + Memungkinkan aplikasi menerima notifikasi ketika ID periklanan atau batas preferensi pelacakan iklan pengguna diperbarui. + diff --git a/play-services-ads-identifier/core/src/main/res/values-is/strings.xml b/play-services-ads-identifier/core/src/main/res/values-is/strings.xml new file mode 100644 index 0000000..a6b3dae --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-is/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-it/strings.xml b/play-services-ads-identifier/core/src/main/res/values-it/strings.xml new file mode 100644 index 0000000..ab94b6f --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-it/strings.xml @@ -0,0 +1,7 @@ + + + Consente a un\'app di ricevere una notifica in caso di aggiornamento dell\'ID pubblicità o della preferenza dell\'utente relativa alla limitazione del tracciamento degli annunci. + Notifica sull\'ID pubblicità + Consente a un\'app dell\'autore di accedere direttamente o indirettamente a un ID pubblicità valido. + Autorizzazione accesso all\'ID pubblicità + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ja/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ja/strings.xml new file mode 100644 index 0000000..c3499ac --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ja/strings.xml @@ -0,0 +1,7 @@ + + + ユーザーの広告 ID またはトラッキング拒否設定が更新されたときに、アプリが通知を受信できるようにします。 + 広告 ID の通知 + 外部アプリが有効な広告 ID に直接的または間接的にアクセスできるようにします。 + 広告 ID の許可 + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ko/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ko/strings.xml new file mode 100644 index 0000000..2593e7a --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ko/strings.xml @@ -0,0 +1,7 @@ + + + 광고 ID 권한 + 퍼블리셔 앱이 유효한 광고 ID에 직접 또는 간접적으로 접근할 수 있도록 합니다. + 광고 ID 알림 + 사용자의 광고 ID 또는 광고 추적 제한 설정이 변경되면 앱이 알림을 받을 수 있습니다. + diff --git a/play-services-ads-identifier/core/src/main/res/values-lv/strings.xml b/play-services-ads-identifier/core/src/main/res/values-lv/strings.xml new file mode 100644 index 0000000..53ee814 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-lv/strings.xml @@ -0,0 +1,7 @@ + + + Reklāmas identifikatora atļauja + Ļauj lietotnes izdevējam tieši vai netieši piekļūt derīgam reklāmas identifikatoram. + Reklāmas identifikatora paziņojums + Ļauj informēt lietotni, ja mainās reklāmas identifikators vai lietotāja ierobežotie, iestatītie reklāmu izsekošanas iestatījumi. + diff --git a/play-services-ads-identifier/core/src/main/res/values-lzh/strings.xml b/play-services-ads-identifier/core/src/main/res/values-lzh/strings.xml new file mode 100644 index 0000000..a6b3dae --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-lzh/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ml/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ml/strings.xml new file mode 100644 index 0000000..28a8ba2 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ml/strings.xml @@ -0,0 +1,7 @@ + + + പരസ്യ ഐഡി അനുമതി + ഒരു പ്രസാധക ആപ്പിന് സാധുവായ ഒരു പരസ്യ ഐഡി നേരിട്ടോ അല്ലാതെയോ ആക്‌സസ് ചെയ്യാൻ അനുവദിക്കുന്നു. + പരസ്യ ഐഡി അറിയിപ്പ് + ഉപയോക്താവിന്റെ പരസ്യ ഐഡി അല്ലെങ്കിൽ പരസ്യ ട്രാക്കിംഗ് മുൻഗണന പരിമിതപ്പെടുത്തുമ്പോൾ ഒരു ആപ്പിന് അറിയിപ്പ് ലഭിക്കാൻ അനുവദിക്കുന്നു. + diff --git a/play-services-ads-identifier/core/src/main/res/values-nb-rNO/strings.xml b/play-services-ads-identifier/core/src/main/res/values-nb-rNO/strings.xml new file mode 100644 index 0000000..e931b20 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-nb-rNO/strings.xml @@ -0,0 +1,7 @@ + + + Tillatelse til reklame-ID + Lar en app få tilgang til en gyldig reklame-ID direkte eller indirekte. + Reklame-ID-varsling + Lar en app bli varslet når reklame-ID-en til brukeren eller innstillingene til denne oppdateres. + diff --git a/play-services-ads-identifier/core/src/main/res/values-nl/strings.xml b/play-services-ads-identifier/core/src/main/res/values-nl/strings.xml new file mode 100644 index 0000000..3bb25c5 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-nl/strings.xml @@ -0,0 +1,7 @@ + + + Staart een app om een bericht te ontvangen wanneer de reclame ID of de beperkte advertentie verkiesbaar is. + Adverteren van ID Permissie + Staart een uitgever app toe om toegang te krijgen tot een geldige advertentie ID direct of indirect. + Adverteren van ID-informatie + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-pl/strings.xml b/play-services-ads-identifier/core/src/main/res/values-pl/strings.xml new file mode 100644 index 0000000..e21a8ab --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-pl/strings.xml @@ -0,0 +1,7 @@ + + + Umożliwia aplikacji otrzymywanie powiadomień w przypadku aktualizacji identyfikatora reklamowego lub ograniczenia preferencji śledzenia użytkownika w celach reklamowych. + Powiadomienie o indentyfikatorze reklamowym + Umożliwia wydawcy aplikacji na bezpośredni lub pośredni dostęp do ważnego identyfikatora reklamowego. + Pozwolenie na używanie identyfikatora reklamowego + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml b/play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml new file mode 100644 index 0000000..b3aa44e --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml @@ -0,0 +1,7 @@ + + + Permissão do ID de publicidade + Permite que o app publicante acesse um ID de publicidade válido diretamente ou indiretamente. + Notificação do ID de publicidade + Permite que um app receba uma notificação quando o ID de publicidade muda ou a configuração de limitação de rastreamento de anúncios do usuário muda. + diff --git a/play-services-ads-identifier/core/src/main/res/values-pt/strings.xml b/play-services-ads-identifier/core/src/main/res/values-pt/strings.xml new file mode 100644 index 0000000..a217bf6 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-pt/strings.xml @@ -0,0 +1,7 @@ + + + Permissão do ID de publicidade + Permite que a app de publicação aceda um ID de publicidade válido direta ou indireto. + Notificação do ID de publicidade + Permite que uma app receba uma notificação quando o ID de publicidade muda ou a configuração de limitação de rastreamento de anúncios do utilizador muda. + diff --git a/play-services-ads-identifier/core/src/main/res/values-ro/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ro/strings.xml new file mode 100644 index 0000000..9051e7a --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ro/strings.xml @@ -0,0 +1,7 @@ + + + Permite unei aplicații să primească o notificare atunci când ID-ul de publicitate sau preferința limitată de urmărire a anunțurilor a utilizatorului este actualizată. + Notificare de identificare publicitară + Permite unei aplicații de editor să acceseze direct sau indirect un ID de publicitate valid. + Permisiune de identificare publicitară + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ru/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ru/strings.xml new file mode 100644 index 0000000..dc46f14 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ru/strings.xml @@ -0,0 +1,7 @@ + + + Разрешает приложению получать уведомление когда рекламный идентификатор или предпочтение о лимите рекламной слежки пользователя обновлены. + Разрешение рекламного идентификатора + Разрешает издателю приложения прямо или косвенно получать доступ к рекламному идентификатору. + Уведомление рекламного идентификатора + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-sl/strings.xml b/play-services-ads-identifier/core/src/main/res/values-sl/strings.xml new file mode 100644 index 0000000..55344e5 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-sl/strings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-sr/strings.xml b/play-services-ads-identifier/core/src/main/res/values-sr/strings.xml new file mode 100644 index 0000000..cc171f7 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-sr/strings.xml @@ -0,0 +1,7 @@ + + + Обавештење за ID оглашавања + Дозвољава апликацији објављивача да директно или индиректно приступи важећем ID-у оглашавања. + Дозвола за ID оглашавања + Дозвољава апликацији да прими обавештење када се ажурира ID оглашавања или ограничење праћења огласа корисника. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-sv/strings.xml b/play-services-ads-identifier/core/src/main/res/values-sv/strings.xml new file mode 100644 index 0000000..8d4211a --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-sv/strings.xml @@ -0,0 +1,7 @@ + + + Tillåter en app att ta emot ett meddelande när annons-ID eller begränsad annonsspårningsinställning för användaren uppdateras. + Avisering av annons-ID + Tillåter en publicerad app att få tillgång till ett giltigt annons-ID direkt eller indirekt. + Behörighet för annons-ID + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ta/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ta/strings.xml new file mode 100644 index 0000000..afc6fdc --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ta/strings.xml @@ -0,0 +1,7 @@ + + + விளம்பர அடையாளம் அறிவிப்பு + விளம்பர அடையாளம் அல்லது பயனரின் விளம்பர கண்காணிப்பு விருப்பம் புதுப்பிக்கப்படும்போது ஒரு பயன்பாட்டை அறிவிப்பைப் பெற அனுமதிக்கிறது. + விளம்பர அடையாளம் இசைவு + சரியான விளம்பர அடையளத்தை நேரடியாகவோ அல்லது மறைமுகமாகவோ அணுக ஒரு வெளியீட்டாளர் பயன்பாட்டை அனுமதிக்கிறது. + diff --git a/play-services-ads-identifier/core/src/main/res/values-th/strings.xml b/play-services-ads-identifier/core/src/main/res/values-th/strings.xml new file mode 100644 index 0000000..73a203b --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-th/strings.xml @@ -0,0 +1,7 @@ + + + การอนุญาติให้เข้าถึงรหัสประจำตัวของโฆษณา + การแจ้งเตือน รหัสประจำตัวของโฆษณา + อนุญาตให้ผู้สร้างแอปเข้าถึง รหัสประจำตัวของโฆษณาที่ถูกต้องได้โดยตรงหรือโดยอ้อม + อนุญาตให้แอปรับการแจ้งเตือนเมื่อมีการอัปเดต รหัสประจำตัวของโฆษณา หรือ การตั้งค่าการติดตามโฆษณาของผู้ใช้ + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-tr/strings.xml b/play-services-ads-identifier/core/src/main/res/values-tr/strings.xml new file mode 100644 index 0000000..c505b7c --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-tr/strings.xml @@ -0,0 +1,7 @@ + + + Reklam kimliği izni + Reklam kimliği bildirimi + Bir uygulamanın, kullanıcının reklam takibini kısıtlama ayarını veya reklam kimliğini değiştirdiğinde bildirim almasına izin verir. + Bir uygulamanın geçerli bir reklam kimliğine doğrudan veya dolaylı olarak erişmesine izin verir. + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ug/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ug/strings.xml new file mode 100644 index 0000000..ae7324b --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-ug/strings.xml @@ -0,0 +1,7 @@ + + + ئېلان كىملىك ئۇقتۇرۇشى + ئېلان كىملىك ئىجازىتى + ئەپنىڭ ئىشلەتكۈچى ئېلان كىملىكى ياكى ئېلان ئىزلاشنى چەكلەش مايىللىقى ئۆزگەرگەندە ئۇقتۇرۇش تاپشۇرۇۋېلىشىغا يول قويىدۇ. + تارقاتقۇچىنىڭ ئەپىنىڭ بىۋاسىتە ياكى ۋاسىتىلىك ھالدا ئېلان كىملىكىنى زىيارەت قىلىشىغا يول قويىدۇ. + diff --git a/play-services-ads-identifier/core/src/main/res/values-uk/strings.xml b/play-services-ads-identifier/core/src/main/res/values-uk/strings.xml new file mode 100644 index 0000000..d4bc556 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-uk/strings.xml @@ -0,0 +1,7 @@ + + + Дозволяє програмі отримувати сповіщення, коли рекламний ідентифікатор або обмеження налаштувань відстеження реклами користувача оновлюється. + Сповіщення рекламного ідентифікатора + Дозволяє застосунку видавця отримувати доступ до дійсного рекламного ідентифікатор прямо або опосередковано. + Дозвіл на рекламний ідентифікатор + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-vi/strings.xml b/play-services-ads-identifier/core/src/main/res/values-vi/strings.xml new file mode 100644 index 0000000..8bdcdc6 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-vi/strings.xml @@ -0,0 +1,7 @@ + + + Cho phép một ứng dụng nhận thông báo khi ID quảng cáo hoặc tùy chọn giới hạn theo dõi quảng cáo của người dùng được cập nhật. + Quyền truy cập ID quảng cáo + Thông báo về ID quảng cáo + Cho phép ứng dụng của nhà phát hành truy cập trực tiếp hoặc gián tiếp vào ID quảng cáo hợp lệ. + diff --git a/play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml b/play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 0000000..f3c478c --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,7 @@ + + + 广告 ID 权限 + 允许发布者应用直接或间接地访问广告 ID。 + 广告 ID 通知 + 允许应用在用户的广告 ID 或限制广告跟踪设置更改时接收通知。 + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-zh-rTW/strings.xml b/play-services-ads-identifier/core/src/main/res/values-zh-rTW/strings.xml new file mode 100644 index 0000000..24e84f3 --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values-zh-rTW/strings.xml @@ -0,0 +1,7 @@ + + + 廣告 ID 權限 + 廣告 ID 通知 + 允許應用程式在使用者更新廣告 ID 或限制廣告追蹤設定時收到通知。 + 允許發布商應用程式直接或間接存取有效的廣告 ID。 + \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values/strings.xml b/play-services-ads-identifier/core/src/main/res/values/strings.xml new file mode 100644 index 0000000..865dd6a --- /dev/null +++ b/play-services-ads-identifier/core/src/main/res/values/strings.xml @@ -0,0 +1,11 @@ + + + + Advertising ID Permission + Allows a publisher app to access a valid advertising ID directly or indirectly. + Advertising ID notification + Allows an app to receive a notification when the advertising ID or limit ad tracking preference of the user is updated. + \ No newline at end of file diff --git a/play-services-ads-identifier/src/main/AndroidManifest.xml b/play-services-ads-identifier/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7f3bbf2 --- /dev/null +++ b/play-services-ads-identifier/src/main/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/play-services-ads-identifier/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl b/play-services-ads-identifier/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl new file mode 100644 index 0000000..bda8695 --- /dev/null +++ b/play-services-ads-identifier/src/main/aidl/com/google/android/gms/ads/identifier/internal/IAdvertisingIdService.aidl @@ -0,0 +1,17 @@ +package com.google.android.gms.ads.identifier.internal; + +import android.os.Bundle; + +interface IAdvertisingIdService { + String getAdvertisingId() = 0; + boolean isAdTrackingLimited(boolean ignored) = 1; + String resetAdvertisingId(String packageName) = 2; + void setAdTrackingLimitedGlobally(String packageName, boolean limited) = 3; + String setDebugLoggingEnabled(String packageName, boolean enabled) = 4; + boolean isDebugLoggingEnabled() = 5; + boolean isAdTrackingLimitedGlobally() = 6; + void setAdTrackingLimitedForApp(int uid, boolean limited) = 7; + void resetAdTrackingLimitedForApp(int uid) = 8; + Bundle getAllAppsLimitedAdTrackingConfiguration() = 9; // Map packageName -> Boolean + String getAdvertisingIdForApp(int uid) = 10; +} diff --git a/play-services-ads-identifier/src/main/java/com/google/android/gms/ads/identifier/AdvertisingIdClient.java b/play-services-ads-identifier/src/main/java/com/google/android/gms/ads/identifier/AdvertisingIdClient.java new file mode 100644 index 0000000..657c4a5 --- /dev/null +++ b/play-services-ads-identifier/src/main/java/com/google/android/gms/ads/identifier/AdvertisingIdClient.java @@ -0,0 +1,80 @@ +/* + * SPDX-FileCopyrightText: 2023 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.ads.identifier; + +import android.app.Activity; +import android.content.Context; +import android.provider.Settings; +import com.google.android.gms.common.GooglePlayServicesNotAvailableException; +import com.google.android.gms.common.GooglePlayServicesRepairableException; + +import java.io.IOException; + +/** + * Helper library for retrieval of advertising ID and related information such as the limit ad tracking setting. + *

+ * It is intended that the advertising ID completely replace existing usage of other identifiers for ads purposes (such as use + * of {@code ANDROID_ID} in {@link Settings.Secure}) when Google Play Services is available. Cases where Google Play Services is + * unavailable are indicated by a {@link GooglePlayServicesNotAvailableException} being thrown by getAdvertisingIdInfo(). + */ +public class AdvertisingIdClient { + /** + * Retrieves the user's advertising ID and limit ad tracking preference. + *

+ * This method cannot be called in the main thread as it may block leading to ANRs. An {@code IllegalStateException} will be + * thrown if this is called on the main thread. + * + * @param context Current {@link Context} (such as the current {@link Activity}). + * @return AdvertisingIdClient.Info with user's advertising ID and limit ad tracking preference. + * @throws IOException signaling connection to Google Play Services failed. + * @throws IllegalStateException indicating this method was called on the main thread. + * @throws GooglePlayServicesNotAvailableException indicating that Google Play is not installed on this device. + * @throws GooglePlayServicesRepairableException indicating that there was a recoverable error connecting to Google Play Services. + */ + public static Info getAdvertisingIdInfo(Context context) { + // We don't actually implement this functionality, but always claim that ad tracking was limited by user preference + return new Info("00000000-0000-0000-0000-000000000000", true); + } + + /** + * Includes both the advertising ID as well as the limit ad tracking setting. + */ + public static class Info { + private final String advertisingId; + private final boolean limitAdTrackingEnabled; + + /** + * Constructs an {@code Info} Object with the specified advertising Id and limit ad tracking setting. + * + * @param advertisingId The advertising ID. + * @param limitAdTrackingEnabled The limit ad tracking setting. It is true if the user has limit ad tracking enabled. False, otherwise. + */ + public Info(String advertisingId, boolean limitAdTrackingEnabled) { + this.advertisingId = advertisingId; + this.limitAdTrackingEnabled = limitAdTrackingEnabled; + } + + /** + * Retrieves the advertising ID. + */ + public String getId() { + return advertisingId; + } + + /** + * Retrieves whether the user has limit ad tracking enabled or not. + *

+ * When the returned value is true, the returned value of {@link #getId()} will always be + * {@code 00000000-0000-0000-0000-000000000000} starting with Android 12. + */ + public boolean isLimitAdTrackingEnabled() { + return limitAdTrackingEnabled; + } + } +} diff --git a/play-services-ads-identifier/src/main/java/com/google/android/gms/ads/identifier/package-info.java b/play-services-ads-identifier/src/main/java/com/google/android/gms/ads/identifier/package-info.java new file mode 100644 index 0000000..ff949da --- /dev/null +++ b/play-services-ads-identifier/src/main/java/com/google/android/gms/ads/identifier/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes relating to the Android Advertising ID (AAID). + */ +package com.google.android.gms.ads.identifier; diff --git a/play-services-ads-lite/build.gradle b/play-services-ads-lite/build.gradle new file mode 100644 index 0000000..1c8dbe1 --- /dev/null +++ b/play-services-ads-lite/build.gradle @@ -0,0 +1,42 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +android { + namespace "com.google.android.gms.ads" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +apply from: '../gradle/publish-android.gradle' + +description = 'microG implementation of play-services-ads-lite' + +dependencies { + api 'androidx.work:work-runtime:2.7.0' + api project(':play-services-ads-base') + api project(':play-services-basement') +// api project(':play-services-measurement-sdk-api') +// api project(':user-messaging-platform') +} diff --git a/play-services-ads-lite/core/build.gradle b/play-services-ads-lite/core/build.gradle new file mode 100644 index 0000000..4c4832e --- /dev/null +++ b/play-services-ads-lite/core/build.gradle @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +dependencies { + api project(':play-services-ads-lite') + implementation project(':play-services-base-core') +} + +android { + namespace "org.microg.gms.ads" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } +} diff --git a/play-services-ads-lite/core/src/main/AndroidManifest.xml b/play-services-ads-lite/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a9ef493 --- /dev/null +++ b/play-services-ads-lite/core/src/main/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/AdLoaderBuilderCreatorImpl.kt b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/AdLoaderBuilderCreatorImpl.kt new file mode 100644 index 0000000..dc258c2 --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/AdLoaderBuilderCreatorImpl.kt @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.ads + +import android.os.IBinder +import android.os.Parcel +import android.util.Log +import androidx.annotation.Keep +import com.google.android.gms.ads.internal.client.IAdLoaderBuilderCreator +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator +import com.google.android.gms.dynamic.IObjectWrapper +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "AdLoaderBuilder" + +@Keep +class AdLoaderBuilderCreatorImpl : IAdLoaderBuilderCreator.Stub() { + override fun newAdLoaderBuilder(context: IObjectWrapper?, adUnitId: String, adapterCreator: IAdapterCreator?, clientVersion: Int): IBinder? { + Log.d(TAG, "newAdLoaderBuilder: adUnitId=$adUnitId clientVersion=$clientVersion") + return null + } + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} diff --git a/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/AdManagerCreatorImpl.kt b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/AdManagerCreatorImpl.kt new file mode 100644 index 0000000..398956f --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/AdManagerCreatorImpl.kt @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.ads + +import android.os.Parcel +import androidx.annotation.Keep +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "AdManager" + +@Keep +class AdManagerCreatorImpl : AdManagerCreator.Stub() { + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = + warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} diff --git a/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/MobileAdsSettingManagerCreatorImpl.kt b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/MobileAdsSettingManagerCreatorImpl.kt new file mode 100644 index 0000000..176a17d --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/MobileAdsSettingManagerCreatorImpl.kt @@ -0,0 +1,29 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.ads + +import android.content.Context +import android.os.IBinder +import android.os.Parcel +import android.util.Log +import androidx.annotation.Keep +import com.google.android.gms.ads.internal.client.IMobileAdsSettingManagerCreator +import com.google.android.gms.dynamic.IObjectWrapper +import com.google.android.gms.dynamic.ObjectWrapper +import org.microg.gms.ads.MobileAdsSettingManagerImpl +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "AdsSettingManager" + +@Keep +class MobileAdsSettingManagerCreatorImpl : IMobileAdsSettingManagerCreator.Stub() { + override fun getMobileAdsSettingManager(context: IObjectWrapper?, clientVersion: Int): IBinder { + Log.d(TAG, "getMobileAdsSettingManager($clientVersion)") + return MobileAdsSettingManagerImpl(ObjectWrapper.unwrap(context) as Context) + } + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} + diff --git a/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/measurement/DynamiteMeasurementManager.kt b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/measurement/DynamiteMeasurementManager.kt new file mode 100644 index 0000000..5959db3 --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/measurement/DynamiteMeasurementManager.kt @@ -0,0 +1,24 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.ads.measurement + +import android.os.Parcel +import android.util.Log +import androidx.annotation.Keep +import com.google.android.gms.dynamic.IObjectWrapper +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "DynamiteMeasurement" + +@Keep +class DynamiteMeasurementManager : IMeasurementManager.Stub() { + + override fun initialize(context: IObjectWrapper?, proxy: IAppMeasurementProxy?) { + Log.d(TAG, "Not yet implemented: initialize") + } + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = + warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} diff --git a/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/rewarded/ChimeraRewardedAdCreatorImpl.kt b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/rewarded/ChimeraRewardedAdCreatorImpl.kt new file mode 100644 index 0000000..318ef3d --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/com/google/android/gms/ads/rewarded/ChimeraRewardedAdCreatorImpl.kt @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.ads.rewarded + +import android.content.Context +import android.os.IBinder +import android.util.Log +import androidx.annotation.Keep +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator +import com.google.android.gms.ads.internal.rewarded.client.IRewardedAdCreator +import com.google.android.gms.dynamic.IObjectWrapper +import com.google.android.gms.dynamic.ObjectWrapper +import org.microg.gms.ads.rewarded.RewardedAdImpl + +private const val TAG = "RewardedAd" + +@Keep +class ChimeraRewardedAdCreatorImpl : IRewardedAdCreator.Stub() { + override fun newRewardedAd(context: IObjectWrapper, str: String, adapterCreator: IAdapterCreator, clientVersion: Int): IBinder { + Log.d(TAG, "newRewardedAd($str, $clientVersion)") + return RewardedAdImpl(ObjectWrapper.unwrap(context) as Context?, str, adapterCreator, clientVersion) + } +} + diff --git a/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/MobileAdsSettingManagerImpl.kt b/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/MobileAdsSettingManagerImpl.kt new file mode 100644 index 0000000..a687502 --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/MobileAdsSettingManagerImpl.kt @@ -0,0 +1,110 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package org.microg.gms.ads + +import android.content.Context +import android.os.Handler +import android.os.Looper +import android.os.Parcel +import android.os.RemoteException +import android.util.Log +import com.google.android.gms.ads.internal.AdapterStatusParcel +import com.google.android.gms.ads.internal.RequestConfigurationParcel +import com.google.android.gms.ads.internal.client.IMobileAdsSettingManager +import com.google.android.gms.ads.internal.client.IOnAdInspectorClosedListener +import com.google.android.gms.ads.internal.initialization.IInitializationCallback +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator +import com.google.android.gms.dynamic.IObjectWrapper +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "AdsSettingManager" + +class MobileAdsSettingManagerImpl(private val context: Context?) : IMobileAdsSettingManager.Stub() { + private var initialized = false + private val initializationCallbacks = mutableListOf() + private var muted = false + private var volume = 1.0f + + override fun initialize() { + Log.d(TAG, "initialize") + if (initialized) return + initialized = true + for (callback in initializationCallbacks) { + runCatching { callback.onInitialized(emptyList()) } + } + } + + override fun setAppVolume(volume: Float) { + this.volume = volume + } + + override fun fetchAppSettings(appId: String?) { + fetchAppSettingsV2(appId, null) + } + + override fun setAppMuted(muted: Boolean) { + this.muted = muted + } + + override fun openDebugMenu(context: IObjectWrapper?, adUnitId: String?) { + Log.d(TAG, "openDebugMenu($adUnitId)") + } + + override fun fetchAppSettingsV2(appId: String?, runnable: IObjectWrapper?) { + Log.d(TAG, "fetchAppSettings($appId)") + } + + override fun getAdVolume(): Float { + return volume + } + + override fun isAdMuted(): Boolean { + return muted + } + + override fun getVersionString(): String { + return "" + } + + override fun registerRtbAdapter(className: String?) { + Log.d(TAG, "registerRtbAdapter($className)") + } + + override fun setAdapterCreator(iAdapterCreator: IAdapterCreator?) { + Log.d(TAG, "Not yet implemented: setAdapterCreator") + } + + override fun addInitializationCallback(callback: IInitializationCallback?) { + Log.d(TAG, "addInitializationCallback") + callback?.let { initializationCallbacks.add(it) } + } + + override fun getAdapterStatus(): List { + Log.d(TAG, "getAdapterStatus") + return arrayListOf(AdapterStatusParcel("com.google.android.gms.ads.MobileAds", true, 0, "Dummy")) + } + + override fun setRequestConfiguration(configuration: RequestConfigurationParcel?) { + Log.d(TAG, "setRequestConfiguration") + } + + override fun disableMediationAdapterInitialization() { + Log.d(TAG, "disableMediationAdapterInitialization") + } + + override fun openAdInspector(listener: IOnAdInspectorClosedListener?) { + Log.d(TAG, "openAdInspector") + } + + override fun enableSameAppKey(enabled: Boolean) { + Log.d(TAG, "enableSameAppKey($enabled)") + } + + override fun setPlugin(plugin: String?) { + Log.d(TAG, "setPlugin($plugin)") + } + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} \ No newline at end of file diff --git a/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/rewarded/ResponseInfoImpl.kt b/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/rewarded/ResponseInfoImpl.kt new file mode 100644 index 0000000..7767301 --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/rewarded/ResponseInfoImpl.kt @@ -0,0 +1,40 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.ads.rewarded + +import android.os.Bundle +import android.util.Log +import com.google.android.gms.ads.internal.AdapterResponseInfoParcel +import com.google.android.gms.ads.internal.client.IResponseInfo + +private const val TAG = "RewardedAdResponseInfo" + +class ResponseInfoImpl : IResponseInfo.Stub() { + override fun getMediationAdapterClassName(): String? { + Log.d(TAG, "getMediationAdapterClassName") + return null + } + + override fun getResponseId(): String? { + Log.d(TAG, "getResponseId") + return null + } + + override fun getAdapterResponseInfo(): List { + Log.d(TAG, "getAdapterResponseInfo") + return arrayListOf() + } + + override fun getLoadedAdapterResponse(): AdapterResponseInfoParcel? { + Log.d(TAG, "getLoadedAdapterResponse") + return null + } + + override fun getResponseExtras(): Bundle { + Log.d(TAG, "getResponseExtras") + return Bundle() + } +} \ No newline at end of file diff --git a/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/rewarded/RewardedAdImpl.kt b/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/rewarded/RewardedAdImpl.kt new file mode 100644 index 0000000..33b3bd8 --- /dev/null +++ b/play-services-ads-lite/core/src/main/kotlin/org/microg/gms/ads/rewarded/RewardedAdImpl.kt @@ -0,0 +1,108 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.ads.rewarded + +import android.content.Context +import android.os.Bundle +import android.os.Handler +import android.os.Looper +import android.os.RemoteException +import android.util.Log +import com.google.android.gms.ads.internal.AdErrorParcel +import com.google.android.gms.ads.internal.AdRequestParcel +import com.google.android.gms.ads.internal.ServerSideVerificationOptionsParcel +import com.google.android.gms.ads.internal.client.IOnAdMetadataChangedListener +import com.google.android.gms.ads.internal.client.IOnPaidEventListener +import com.google.android.gms.ads.internal.client.IResponseInfo +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator +import com.google.android.gms.ads.internal.rewarded.client.* +import com.google.android.gms.common.api.CommonStatusCodes +import com.google.android.gms.dynamic.IObjectWrapper + +private const val TAG = "RewardedAd" + +class RewardedAdImpl(context: Context?, str: String?, adapterCreator: IAdapterCreator?, clientVersion: Int) : IRewardedAd.Stub() { + private var immersive: Boolean = false + + private fun load(request: AdRequestParcel, callback: IRewardedAdLoadCallback, interstitial: Boolean) { + Handler(Looper.getMainLooper()).post { + try { + callback.onAdLoadError(AdErrorParcel().apply { code = CommonStatusCodes.INTERNAL_ERROR; message = "Not supported" }) + } catch (e: RemoteException) { + Log.w(TAG, e) + } + } + } + + override fun load(request: AdRequestParcel, callback: IRewardedAdLoadCallback) { + Log.d(TAG, "load") + load(request, callback, false) + } + + override fun setCallback(callback: IRewardedAdCallback) { + Log.d(TAG, "setCallback") + } + + override fun canBeShown(): Boolean { + Log.d(TAG, "canBeShown") + return false + } + + override fun getMediationAdapterClassName(): String { + Log.d(TAG, "getMediationAdapterClassName") + return responseInfo.mediationAdapterClassName + } + + override fun show(activity: IObjectWrapper) { + Log.d(TAG, "show") + showWithImmersive(activity, immersive) + } + + override fun setRewardedAdSkuListener(listener: IRewardedAdSkuListener?) { + Log.d(TAG, "setRewardedAdSkuListener") + } + + override fun setServerSideVerificationOptions(options: ServerSideVerificationOptionsParcel) { + Log.d(TAG, "setServerSideVerificationOptions") + } + + override fun setOnAdMetadataChangedListener(listener: IOnAdMetadataChangedListener) { + Log.d(TAG, "setOnAdMetadataChangedListener") + } + + override fun getAdMetadata(): Bundle { + Log.d(TAG, "getAdMetadata") + return Bundle() + } + + override fun showWithImmersive(activity: IObjectWrapper?, immersive: Boolean) { + Log.d(TAG, "showWithBoolean") + } + + override fun getRewardItem(): IRewardItem? { + Log.d(TAG, "getRewardItem") + return null + } + + override fun getResponseInfo(): IResponseInfo { + Log.d(TAG, "getResponseInfo") + return ResponseInfoImpl() + } + + override fun setOnPaidEventListener(listener: IOnPaidEventListener) { + Log.d(TAG, "setOnPaidEventListener") + } + + override fun loadInterstitial(request: AdRequestParcel, callback: IRewardedAdLoadCallback) { + Log.d(TAG, "loadInterstitial") + load(request, callback, true) + } + + override fun setImmersiveMode(enabled: Boolean) { + Log.d(TAG, "setImmersiveMode($enabled)") + } +} + diff --git a/play-services-ads-lite/src/main/AndroidManifest.xml b/play-services-ads-lite/src/main/AndroidManifest.xml new file mode 100644 index 0000000..1b55c5b --- /dev/null +++ b/play-services-ads-lite/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl new file mode 100644 index 0000000..7e07dd0 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/AdManagerCreator.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.ads; + +interface AdManagerCreator { +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdErrorParcel.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdErrorParcel.aidl new file mode 100644 index 0000000..54251c3 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdErrorParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable AdErrorParcel; \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdRequestParcel.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdRequestParcel.aidl new file mode 100644 index 0000000..220425e --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdRequestParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable AdRequestParcel; \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdapterResponseInfoParcel.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdapterResponseInfoParcel.aidl new file mode 100644 index 0000000..822be57 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdapterResponseInfoParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable AdapterResponseInfoParcel; \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdapterStatusParcel.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdapterStatusParcel.aidl new file mode 100644 index 0000000..fc1bd40 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/AdapterStatusParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable AdapterStatusParcel; \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/RequestConfigurationParcel.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/RequestConfigurationParcel.aidl new file mode 100644 index 0000000..45e9ebe --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/RequestConfigurationParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable RequestConfigurationParcel; \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/ServerSideVerificationOptionsParcel.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/ServerSideVerificationOptionsParcel.aidl new file mode 100644 index 0000000..b0b93d4 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/ServerSideVerificationOptionsParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable ServerSideVerificationOptionsParcel; \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IAdLoaderBuilderCreator.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IAdLoaderBuilderCreator.aidl new file mode 100644 index 0000000..b6f63ac --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IAdLoaderBuilderCreator.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IAdLoaderBuilderCreator { + IBinder newAdLoaderBuilder(IObjectWrapper context, String adUnitId, IAdapterCreator adapterCreator, int clientVersion); +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IMobileAdsSettingManager.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IMobileAdsSettingManager.aidl new file mode 100644 index 0000000..1df1f51 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IMobileAdsSettingManager.aidl @@ -0,0 +1,29 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.ads.internal.AdapterStatusParcel; +import com.google.android.gms.ads.internal.RequestConfigurationParcel; +import com.google.android.gms.ads.internal.client.IOnAdInspectorClosedListener; +import com.google.android.gms.ads.internal.initialization.IInitializationCallback; +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IMobileAdsSettingManager { + void initialize() = 0; + void setAppVolume(float volume) = 1; + void fetchAppSettings(String appId) = 2; + void setAppMuted(boolean muted) = 3; + void openDebugMenu(IObjectWrapper context, String adUnitId) = 4; + void fetchAppSettingsV2(String appId, IObjectWrapper runnable) = 5; + float getAdVolume() = 6; + boolean isAdMuted() = 7; + String getVersionString() = 8; + void registerRtbAdapter(String className) = 9; + void setAdapterCreator(IAdapterCreator iAdapterCreator) = 10; + void addInitializationCallback(IInitializationCallback callback) = 11; + List getAdapterStatus() = 12; + void setRequestConfiguration(in RequestConfigurationParcel configuration) = 13; + void disableMediationAdapterInitialization() = 14; + void openAdInspector(IOnAdInspectorClosedListener listener) = 15; + void enableSameAppKey(boolean enabled) = 16; + void setPlugin(String plugin) = 17; +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IMobileAdsSettingManagerCreator.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IMobileAdsSettingManagerCreator.aidl new file mode 100644 index 0000000..f468200 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IMobileAdsSettingManagerCreator.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IMobileAdsSettingManagerCreator { + IBinder getMobileAdsSettingManager(IObjectWrapper context, int clientVersion); +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnAdInspectorClosedListener.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnAdInspectorClosedListener.aidl new file mode 100644 index 0000000..63f625c --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnAdInspectorClosedListener.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.ads.internal.AdErrorParcel; + +interface IOnAdInspectorClosedListener { + void onAdInspectorClosed(in @nullable AdErrorParcel adErrorParcel); +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnAdMetadataChangedListener.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnAdMetadataChangedListener.aidl new file mode 100644 index 0000000..3a4ba6e --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnAdMetadataChangedListener.aidl @@ -0,0 +1,6 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.ads.internal.AdErrorParcel; + +interface IOnAdMetadataChangedListener { +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnPaidEventListener.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnPaidEventListener.aidl new file mode 100644 index 0000000..8f2d342 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IOnPaidEventListener.aidl @@ -0,0 +1,6 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.ads.internal.AdErrorParcel; + +interface IOnPaidEventListener { +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IResponseInfo.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IResponseInfo.aidl new file mode 100644 index 0000000..3b6fcd7 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/client/IResponseInfo.aidl @@ -0,0 +1,11 @@ +package com.google.android.gms.ads.internal.client; + +import com.google.android.gms.ads.internal.AdapterResponseInfoParcel; + +interface IResponseInfo { + String getMediationAdapterClassName() = 0; + String getResponseId() = 1; + List getAdapterResponseInfo() = 2; + AdapterResponseInfoParcel getLoadedAdapterResponse() = 3; + Bundle getResponseExtras() = 4; +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/initialization/IInitializationCallback.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/initialization/IInitializationCallback.aidl new file mode 100644 index 0000000..259c869 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/initialization/IInitializationCallback.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.ads.internal.initialization; + +import com.google.android.gms.ads.internal.AdapterStatusParcel; + +interface IInitializationCallback { + void onInitialized(in List status); +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/mediation/client/IAdapterCreator.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/mediation/client/IAdapterCreator.aidl new file mode 100644 index 0000000..dae5d56 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/mediation/client/IAdapterCreator.aidl @@ -0,0 +1,5 @@ +package com.google.android.gms.ads.internal.mediation.client; + +interface IAdapterCreator { + +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardItem.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardItem.aidl new file mode 100644 index 0000000..9d0cb53 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardItem.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.ads.internal.rewarded.client; + +interface IRewardItem { +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAd.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAd.aidl new file mode 100644 index 0000000..b3e1f51 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAd.aidl @@ -0,0 +1,30 @@ +package com.google.android.gms.ads.internal.rewarded.client; + +import com.google.android.gms.ads.internal.AdRequestParcel; +import com.google.android.gms.ads.internal.ServerSideVerificationOptionsParcel; +import com.google.android.gms.ads.internal.client.IOnPaidEventListener; +import com.google.android.gms.ads.internal.client.IOnAdMetadataChangedListener; +import com.google.android.gms.ads.internal.client.IResponseInfo; +import com.google.android.gms.ads.internal.rewarded.client.IRewardedAdCallback; +import com.google.android.gms.ads.internal.rewarded.client.IRewardedAdLoadCallback; +import com.google.android.gms.ads.internal.rewarded.client.IRewardedAdSkuListener; +import com.google.android.gms.ads.internal.rewarded.client.IRewardItem; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IRewardedAd { + void load(in AdRequestParcel request, IRewardedAdLoadCallback callback) = 0; + void setCallback(IRewardedAdCallback callback) = 1; + boolean canBeShown() = 2; + String getMediationAdapterClassName() = 3; + void show(IObjectWrapper activity) = 4; + void setRewardedAdSkuListener(IRewardedAdSkuListener listener) = 5; + void setServerSideVerificationOptions(in ServerSideVerificationOptionsParcel options) = 6; + void setOnAdMetadataChangedListener(IOnAdMetadataChangedListener listener) = 7; + Bundle getAdMetadata() = 8; + void showWithImmersive(IObjectWrapper activity, boolean immersive) = 9; + IRewardItem getRewardItem() = 10; + IResponseInfo getResponseInfo() = 11; + void setOnPaidEventListener(IOnPaidEventListener listener) = 12; + void loadInterstitial(in AdRequestParcel request, IRewardedAdLoadCallback callback) = 13; + void setImmersiveMode(boolean enabled) = 14; +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdCallback.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdCallback.aidl new file mode 100644 index 0000000..22b7f59 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdCallback.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.ads.internal.rewarded.client; + +interface IRewardedAdCallback { +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdCreator.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdCreator.aidl new file mode 100644 index 0000000..9b0defe --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdCreator.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.ads.internal.rewarded.client; + +import com.google.android.gms.ads.internal.mediation.client.IAdapterCreator; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IRewardedAdCreator { + IBinder newRewardedAd(IObjectWrapper context, String str, IAdapterCreator adapterCreator, int clientVersion); +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdLoadCallback.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdLoadCallback.aidl new file mode 100644 index 0000000..2bfb179 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdLoadCallback.aidl @@ -0,0 +1,9 @@ +package com.google.android.gms.ads.internal.rewarded.client; + +import com.google.android.gms.ads.internal.AdErrorParcel; + +interface IRewardedAdLoadCallback { + void onAdLoaded() = 0; + void onAdLoadErrorCode(int code) = 1; + void onAdLoadError(in AdErrorParcel error) = 2; +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdSkuListener.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdSkuListener.aidl new file mode 100644 index 0000000..e41f52e --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/internal/rewarded/client/IRewardedAdSkuListener.aidl @@ -0,0 +1,6 @@ +package com.google.android.gms.ads.internal.rewarded.client; + +import com.google.android.gms.ads.internal.AdErrorParcel; + +interface IRewardedAdSkuListener { +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/measurement/IAppMeasurementProxy.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/measurement/IAppMeasurementProxy.aidl new file mode 100644 index 0000000..1fc7500 --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/measurement/IAppMeasurementProxy.aidl @@ -0,0 +1,5 @@ +package com.google.android.gms.ads.measurement; + +interface IAppMeasurementProxy { + +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/measurement/IMeasurementManager.aidl b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/measurement/IMeasurementManager.aidl new file mode 100644 index 0000000..92f267b --- /dev/null +++ b/play-services-ads-lite/src/main/aidl/com/google/android/gms/ads/measurement/IMeasurementManager.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.ads.measurement; + +import com.google.android.gms.ads.measurement.IAppMeasurementProxy; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IMeasurementManager { + void initialize(IObjectWrapper context, IAppMeasurementProxy proxy) = 1; +} \ No newline at end of file diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/admanager/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/admanager/package-info.java new file mode 100644 index 0000000..a08a3ba --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/admanager/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Google Ad Manager. + */ +package com.google.android.gms.ads.admanager; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/h5/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/h5/package-info.java new file mode 100644 index 0000000..c40c268 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/h5/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for H5 ads. + */ +package com.google.android.gms.ads.h5; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/initialization/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/initialization/package-info.java new file mode 100644 index 0000000..f06f3c0 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/initialization/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes related to SDK initialization. + */ +package com.google.android.gms.ads.initialization; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdDataParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdDataParcel.java new file mode 100644 index 0000000..89f1f30 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdDataParcel.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class AdDataParcel extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(AdDataParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdErrorParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdErrorParcel.java new file mode 100644 index 0000000..9757b47 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdErrorParcel.java @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import com.google.android.gms.ads.internal.client.IResponseInfo; +import org.microg.safeparcel.AutoSafeParcelable; + +public class AdErrorParcel extends AutoSafeParcelable { + @Field(1) + public int code; + @Field(2) + public String message; + @Field(3) + public String domain; + @Field(4) + public AdErrorParcel cause; + @Field(5) + public IResponseInfo responseInfo; + public static final Creator CREATOR = new AutoCreator<>(AdErrorParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdRequestParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdRequestParcel.java new file mode 100644 index 0000000..cb96053 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdRequestParcel.java @@ -0,0 +1,62 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import android.location.Location; +import android.os.Bundle; +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.List; + +public class AdRequestParcel extends AutoSafeParcelable { + @Field(1) + private int versionCode = 8; + @Field(2) + public long birthday; + @Field(3) + public Bundle adMobNetworkExtras = new Bundle(); + @Field(4) + public int gender; + @Field(5) + public ArrayList keywords; + @Field(6) + public boolean isTestDevice; + @Field(7) + public int taggedForChildDirectedTreatment; + @Field(9) + public String publisherProvidedId; + @Field(10) + public SearchAdRequestParcel searchAdRequest; + @Field(11) + public Location location; + @Field(12) + public String contentUrl; + @Field(13) + public Bundle networkExtrasBundles = new Bundle(); + @Field(14) + public Bundle customTargeting; + @Field(15) + public List categoryExclusion; + @Field(16) + public String requestAgent; + @Field(18) + public boolean designedForFamilies; + @Field(19) + public AdDataParcel adData; + @Field(20) + public int tagForUnderAgeOfConsent; + @Field(21) + public String maxAdContentRating; + @Field(22) + public List neighboringContentUrls; + @Field(23) + public int httpTimeoutMillis; + @Field(24) + public String adString; + + public static final Creator CREATOR = new AutoCreator<>(AdRequestParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdapterResponseInfoParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdapterResponseInfoParcel.java new file mode 100644 index 0000000..f1a452e --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdapterResponseInfoParcel.java @@ -0,0 +1,30 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import android.os.Bundle; +import org.microg.safeparcel.AutoSafeParcelable; + +public class AdapterResponseInfoParcel extends AutoSafeParcelable { + @Field(1) + public String adapterClassName; + @Field(2) + public long latencyMillis; + @Field(3) + public AdErrorParcel error; + @Field(4) + public Bundle credentials; + @Field(5) + public String adSourceName; + @Field(6) + public String adSourceId; + @Field(7) + public String adSourceInstanceName; + @Field(8) + public String adSourceInstanceId; + + public static final Creator CREATOR = new AutoCreator<>(AdapterResponseInfoParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdapterStatusParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdapterStatusParcel.java new file mode 100644 index 0000000..cd04062 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/AdapterStatusParcel.java @@ -0,0 +1,30 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class AdapterStatusParcel extends AutoSafeParcelable { + @Field(1) + public String className; + @Field(2) + public boolean isReady; + @Field(3) + public int latency; + @Field(4) + public String description; + + public AdapterStatusParcel() {} + + public AdapterStatusParcel(String className, boolean isReady, int latency, String description) { + this.className = className; + this.isReady = isReady; + this.latency = latency; + this.description = description; + } + + public static final Creator CREATOR = new AutoCreator<>(AdapterStatusParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/RequestConfigurationParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/RequestConfigurationParcel.java new file mode 100644 index 0000000..f773f34 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/RequestConfigurationParcel.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class RequestConfigurationParcel extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(RequestConfigurationParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/SearchAdRequestParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/SearchAdRequestParcel.java new file mode 100644 index 0000000..d37b1c5 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/SearchAdRequestParcel.java @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SearchAdRequestParcel extends AutoSafeParcelable { + @Field(15) + public String query; + public static final Creator CREATOR = new AutoCreator<>(SearchAdRequestParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/ServerSideVerificationOptionsParcel.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/ServerSideVerificationOptionsParcel.java new file mode 100644 index 0000000..1b516a3 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/internal/ServerSideVerificationOptionsParcel.java @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ServerSideVerificationOptionsParcel extends AutoSafeParcelable { + @Field(1) + public String userId; + @Field(2) + public String customData; + public static final Creator CREATOR = new AutoCreator<>(ServerSideVerificationOptionsParcel.class); +} diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/interstitial/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/interstitial/package-info.java new file mode 100644 index 0000000..dc0a9f2 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/interstitial/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Interstitial Ads. + */ +package com.google.android.gms.ads.interstitial; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/customevent/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/customevent/package-info.java new file mode 100644 index 0000000..06bb35b --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/customevent/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Google Mobile Ads mediation custom events. + */ +package com.google.android.gms.ads.mediation.customevent; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/package-info.java new file mode 100644 index 0000000..d1df53d --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Google Mobile Ads mediation adapters. + */ +package com.google.android.gms.ads.mediation; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/rtb/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/rtb/package-info.java new file mode 100644 index 0000000..af175ec --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/mediation/rtb/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Google Mobile Ads RTB mediation adapters. + */ +package com.google.android.gms.ads.mediation.rtb; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/nativead/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/nativead/package-info.java new file mode 100644 index 0000000..a1c245c --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/nativead/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for native ads functionality within Google Mobile + Ads. + */ +package com.google.android.gms.ads.nativead; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/package-info.java new file mode 100644 index 0000000..69f78b9 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Google Mobile Ads. + */ +package com.google.android.gms.ads; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/rewarded/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/rewarded/package-info.java new file mode 100644 index 0000000..685d4c4 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/rewarded/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Rewarded Ads. + */ +package com.google.android.gms.ads.rewarded; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/rewardedinterstitial/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/rewardedinterstitial/package-info.java new file mode 100644 index 0000000..c37680e --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/rewardedinterstitial/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Rewarded Interstitial Ads. + */ +package com.google.android.gms.ads.rewardedinterstitial; diff --git a/play-services-ads-lite/src/main/java/com/google/android/gms/ads/search/package-info.java b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/search/package-info.java new file mode 100644 index 0000000..50d72e4 --- /dev/null +++ b/play-services-ads-lite/src/main/java/com/google/android/gms/ads/search/package-info.java @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * Contains classes for Search Ads for Apps. + */ +package com.google.android.gms.ads.search; diff --git a/play-services-ads/build.gradle b/play-services-ads/build.gradle new file mode 100644 index 0000000..34c0447 --- /dev/null +++ b/play-services-ads/build.gradle @@ -0,0 +1,46 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +android { + namespace "com.google.android.gms.ads.impl" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +apply from: '../gradle/publish-android.gradle' + +description = 'microG implementation of play-services-ads' + +dependencies { + implementation 'androidx.browser:browser:1.4.0' + implementation 'androidx.collection:collection:1.0.0' + implementation 'androidx.core:core:1.0.0' + api project(':play-services-ads-base') + api project(':play-services-ads-identifier') + api project(':play-services-ads-lite') +// api project(':play-services-appset') + api project(':play-services-basement') + api project(':play-services-tasks') +} diff --git a/play-services-ads/core/build.gradle b/play-services-ads/core/build.gradle new file mode 100644 index 0000000..c9beaf9 --- /dev/null +++ b/play-services-ads/core/build.gradle @@ -0,0 +1,40 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +dependencies { + api project(':play-services-ads') + implementation project(':play-services-base-core') + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" +} + +android { + namespace "org.microg.gms.ads.impl" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } +} diff --git a/play-services-ads/core/src/main/AndroidManifest.xml b/play-services-ads/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..78f153d --- /dev/null +++ b/play-services-ads/core/src/main/AndroidManifest.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/play-services-ads/core/src/main/java/com/google/android/gms/dynamite/descriptors/com/google/android/gms/ads/dynamite/ModuleDescriptor.java b/play-services-ads/core/src/main/java/com/google/android/gms/dynamite/descriptors/com/google/android/gms/ads/dynamite/ModuleDescriptor.java new file mode 100644 index 0000000..94ed94c --- /dev/null +++ b/play-services-ads/core/src/main/java/com/google/android/gms/dynamite/descriptors/com/google/android/gms/ads/dynamite/ModuleDescriptor.java @@ -0,0 +1,74 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.ContextWrapper; +import android.content.SharedPreferences; +import android.util.Log; +import androidx.annotation.Keep; + +import java.util.Locale; + +import static android.os.Build.DEVICE; +import static android.os.Build.DISPLAY; +import static android.os.Build.VERSION.RELEASE; + +@Keep +public class ModuleDescriptor { + public static final String MODULE_ID = "com.google.android.gms.ads.dynamite"; + public static final int MODULE_VERSION = 230500001; + private static final String TAG = "AdsDynamiteModule"; + + /** + * The ads module might try to access the user agent, requiring initialization on the main thread, + * which may result in deadlocks when invoked from any other thread. This only happens with microG, + * because we don't use the highly privileged SELinux Sandbox that regular Play Services uses + * (which allows apps to read the user-agent from Play Services instead of the WebView). To prevent + * the issue we pre-emptively write a user agent in the local storage of the app. + */ + public static void init(Context context) { + do { + try { + injectUserAgentSharedPreference(context); + } catch (Exception e) { + } + if (context instanceof ContextWrapper) { + Context baseContext = ((ContextWrapper) context).getBaseContext(); + if (context == baseContext) break; + context = baseContext; + } else { + break; + } + } while (context != null); + } + + /** + * @return A user-agent representing a browser on the current device. + */ + private static String buildDefaultUserAgent() { + StringBuilder sb = new StringBuilder(); + sb.append("Mozilla/5.0 (Linux; U; Android"); + if (RELEASE != null) sb.append(" ").append(RELEASE); + sb.append("; ").append(Locale.getDefault()); + if (DEVICE != null) { + sb.append("; ").append(DEVICE); + if (DISPLAY != null) sb.append(" Build/").append(DISPLAY); + } + sb.append(") AppleWebKit/533 Version/4.0 Safari/533"); + return sb.toString(); + } + + @SuppressLint("ApplySharedPref") + private static void injectUserAgentSharedPreference(Context context) { + SharedPreferences preferences = context.getSharedPreferences("admob_user_agent", Context.MODE_PRIVATE); + if (!preferences.contains("user_agent")) { + preferences.edit().putString("user_agent", buildDefaultUserAgent()).commit(); + Log.d(TAG, "Injected admob_user_agent into package " + context.getPackageName()); + } + } +} diff --git a/play-services-ads/core/src/main/kotlin/org/microg/gms/ads/AdRequestService.kt b/play-services-ads/core/src/main/kotlin/org/microg/gms/ads/AdRequestService.kt new file mode 100644 index 0000000..e451313 --- /dev/null +++ b/play-services-ads/core/src/main/kotlin/org/microg/gms/ads/AdRequestService.kt @@ -0,0 +1,68 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.ads + +import android.os.Bundle +import android.os.Parcel +import android.util.Log +import com.google.android.gms.ads.internal.ExceptionParcel +import com.google.android.gms.ads.internal.NonagonRequestParcel +import com.google.android.gms.ads.internal.request.IAdRequestService +import com.google.android.gms.ads.internal.request.INonagonStreamingResponseListener +import com.google.android.gms.common.api.CommonStatusCodes +import com.google.android.gms.common.internal.GetServiceRequest +import com.google.android.gms.common.internal.IGmsCallbacks +import org.microg.gms.BaseService +import org.microg.gms.common.GmsService +import org.microg.gms.common.PackageUtils +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "AdRequestService" + +class AdRequestService : BaseService(TAG, GmsService.ADREQUEST) { + override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) { + val packageName = PackageUtils.getAndCheckCallingPackage(this, request.packageName) + ?: throw IllegalArgumentException("Missing package name") + val binder = AdRequestServiceImpl().asBinder() + callback.onPostInitComplete(CommonStatusCodes.SUCCESS, binder, Bundle()) + } +} + +class AdRequestServiceImpl : IAdRequestService.Stub() { + override fun getAdRequest(request: NonagonRequestParcel, listener: INonagonStreamingResponseListener) { + Log.d(TAG, "getAdRequest") + listener.onException(ExceptionParcel().apply { + message = "Not supported" + code = CommonStatusCodes.INTERNAL_ERROR + }) + } + + override fun getSignals(request: NonagonRequestParcel, listener: INonagonStreamingResponseListener) { + Log.d(TAG, "getSignals") + listener.onException(ExceptionParcel().apply { + message = "Not supported" + code = CommonStatusCodes.INTERNAL_ERROR + }) + } + + override fun getUrlAndCacheKey(request: NonagonRequestParcel, listener: INonagonStreamingResponseListener) { + Log.d(TAG, "getUrlAndCacheKey") + listener.onException(ExceptionParcel().apply { + message = "Not supported" + code = CommonStatusCodes.INTERNAL_ERROR + }) + } + + override fun removeCacheUrl(key: String, listener: INonagonStreamingResponseListener) { + Log.d(TAG, "removeCacheUrl") + listener.onException(ExceptionParcel().apply { + message = "Not supported" + code = CommonStatusCodes.INTERNAL_ERROR + }) + } + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} \ No newline at end of file diff --git a/play-services-ads/src/main/AndroidManifest.xml b/play-services-ads/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2a578f7 --- /dev/null +++ b/play-services-ads/src/main/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/ExceptionParcel.aidl b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/ExceptionParcel.aidl new file mode 100644 index 0000000..41b8774 --- /dev/null +++ b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/ExceptionParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable ExceptionParcel; \ No newline at end of file diff --git a/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/NonagonRequestParcel.aidl b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/NonagonRequestParcel.aidl new file mode 100644 index 0000000..f952919 --- /dev/null +++ b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/NonagonRequestParcel.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.ads.internal; + +parcelable NonagonRequestParcel; \ No newline at end of file diff --git a/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/request/IAdRequestService.aidl b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/request/IAdRequestService.aidl new file mode 100644 index 0000000..52ca62a --- /dev/null +++ b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/request/IAdRequestService.aidl @@ -0,0 +1,11 @@ +package com.google.android.gms.ads.internal.request; + +import com.google.android.gms.ads.internal.NonagonRequestParcel; +import com.google.android.gms.ads.internal.request.INonagonStreamingResponseListener; + +interface IAdRequestService { + void getAdRequest(in NonagonRequestParcel request, INonagonStreamingResponseListener listener) = 3; + void getSignals(in NonagonRequestParcel request, INonagonStreamingResponseListener listener) = 4; + void getUrlAndCacheKey(in NonagonRequestParcel request, INonagonStreamingResponseListener listener) = 5; + void removeCacheUrl(String key, INonagonStreamingResponseListener listener) = 6; +} \ No newline at end of file diff --git a/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/request/INonagonStreamingResponseListener.aidl b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/request/INonagonStreamingResponseListener.aidl new file mode 100644 index 0000000..78eae30 --- /dev/null +++ b/play-services-ads/src/main/aidl/com/google/android/gms/ads/internal/request/INonagonStreamingResponseListener.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.ads.internal.request; + +import com.google.android.gms.ads.internal.ExceptionParcel; + +interface INonagonStreamingResponseListener { + void onSuccess(in ParcelFileDescriptor fd); + void onException(in ExceptionParcel exception); +} \ No newline at end of file diff --git a/play-services-ads/src/main/java/com/google/android/gms/ads/internal/ExceptionParcel.java b/play-services-ads/src/main/java/com/google/android/gms/ads/internal/ExceptionParcel.java new file mode 100644 index 0000000..55ddf34 --- /dev/null +++ b/play-services-ads/src/main/java/com/google/android/gms/ads/internal/ExceptionParcel.java @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ExceptionParcel extends AutoSafeParcelable { + @Field(1) + public String message; + @Field(2) + public int code; + public static final Creator CREATOR = new AutoCreator<>(ExceptionParcel.class); +} diff --git a/play-services-ads/src/main/java/com/google/android/gms/ads/internal/NonagonRequestParcel.java b/play-services-ads/src/main/java/com/google/android/gms/ads/internal/NonagonRequestParcel.java new file mode 100644 index 0000000..866ef36 --- /dev/null +++ b/play-services-ads/src/main/java/com/google/android/gms/ads/internal/NonagonRequestParcel.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.ads.internal; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class NonagonRequestParcel extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(NonagonRequestParcel.class); +} diff --git a/play-services-api/build.gradle b/play-services-api/build.gradle new file mode 100644 index 0000000..11c3911 --- /dev/null +++ b/play-services-api/build.gradle @@ -0,0 +1,46 @@ +/* + * 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 { + namespace "org.microg.gms.api" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } +} + +dependencies { + api project(':play-services-base') + api project(':play-services-phenotype') + + annotationProcessor project(':safe-parcel-processor') +} diff --git a/play-services-api/src/main/AndroidManifest.xml b/play-services-api/src/main/AndroidManifest.xml new file mode 100644 index 0000000..359a9b7 --- /dev/null +++ b/play-services-api/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + diff --git a/play-services-api/src/main/aidl/com/google/android/gms/ads/omid/IOmid.aidl b/play-services-api/src/main/aidl/com/google/android/gms/ads/omid/IOmid.aidl new file mode 100644 index 0000000..22a0cbc --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/ads/omid/IOmid.aidl @@ -0,0 +1,16 @@ +package com.google.android.gms.ads.omid; + +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IOmid { + boolean initializeOmid(IObjectWrapper context) = 1; + IObjectWrapper createHtmlAdSession(String version, IObjectWrapper webView, String customReferenceData, String impressionOwner, String altImpressionOwner) = 2; + void startAdSession(IObjectWrapper adSession) = 3; + void registerAdView(IObjectWrapper adSession, IObjectWrapper view) = 4; + String getVersion() = 5; + void finishAdSession(IObjectWrapper adSession) = 6; + void addFriendlyObstruction(IObjectWrapper adSession, IObjectWrapper view) = 7; + IObjectWrapper createHtmlAdSessionWithPartnerName(String version, IObjectWrapper webView, String customReferenceData, String impressionOwner, String altImpressionOwner, String parterName) = 8; + IObjectWrapper createJavascriptAdSessionWithPartnerNameImpressionCreativeType(String version, IObjectWrapper webView, String customReferenceData, String impressionOwner, String altImpressionOwner, String parterName, String impressionType, String creativeType, String contentUrl) = 9; + IObjectWrapper createHtmlAdSessionWithPartnerNameImpressionCreativeType(String version, IObjectWrapper webView, String customReferenceData, String impressionOwner, String altImpressionOwner, String parterName, String impressionType, String creativeType, String contentUrl) = 10; +} \ No newline at end of file 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 new file mode 100644 index 0000000..f893aef --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/CorpusStatus.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..c7f5e43 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdate.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..0ae6e4b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/PIMEUpdateResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..a0a785c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/RequestIndexingSpecification.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..0b3c47f --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestSpecification.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..57d2d63 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/SuggestionResults.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..b52e3d4 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/UsageInfo.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..ebc204c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/IAppDataSearch.aidl @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000..77e618a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearch.aidl @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000..338a142 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/appdatasearch/internal/ILightweightAppDataSearchCallbacks.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.appdatasearch.internal; + +interface ILightweightAppDataSearchCallbacks { +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/audit/LogAuditRecordsRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/audit/LogAuditRecordsRequest.aidl new file mode 100644 index 0000000..e2a0155 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/audit/LogAuditRecordsRequest.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.audit; + +parcelable LogAuditRecordsRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/audit/internal/IAuditService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/audit/internal/IAuditService.aidl new file mode 100644 index 0000000..7e26825 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/audit/internal/IAuditService.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.audit.internal; + +import com.google.android.gms.common.api.internal.IStatusCallback; +import com.google.android.gms.audit.LogAuditRecordsRequest; + +interface IAuditService { + void logAuditRecords(in LogAuditRecordsRequest request, IStatusCallback callback); +} \ No newline at end of file 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 new file mode 100644 index 0000000..ee7f733 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl @@ -0,0 +1,6 @@ +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 new file mode 100644 index 0000000..973de92 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl @@ -0,0 +1,7 @@ +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/credential/manager/common/IPendingIntentCallback.aidl b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/common/IPendingIntentCallback.aidl new file mode 100644 index 0000000..7af7a04 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/common/IPendingIntentCallback.aidl @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.common; + +import com.google.android.gms.common.api.Status; + +interface IPendingIntentCallback { + void onPendingIntent(in Status status, in PendingIntent pendingIntent); +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/common/ISettingsCallback.aidl b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/common/ISettingsCallback.aidl new file mode 100644 index 0000000..ef9ef41 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/common/ISettingsCallback.aidl @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.common; + +import com.google.android.gms.common.api.Status; + +interface ISettingsCallback { + void onSetting(in Status status, in byte[] value); +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/firstparty/internal/ICredentialManagerService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/firstparty/internal/ICredentialManagerService.aidl new file mode 100644 index 0000000..39ab381 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/firstparty/internal/ICredentialManagerService.aidl @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.firstparty.internal; + +import com.google.android.gms.common.api.internal.IStatusCallback; +import com.google.android.gms.credential.manager.common.IPendingIntentCallback; +import com.google.android.gms.credential.manager.common.ISettingsCallback; +import com.google.android.gms.credential.manager.invocationparams.CredentialManagerInvocationParams; + +interface ICredentialManagerService { + void getCredentialManagerIntent(IPendingIntentCallback callback, in CredentialManagerInvocationParams params) = 0; + void getSetting(ISettingsCallback callback, String key) = 1; + void setSetting(IStatusCallback callback, String key, in byte[] value) = 2; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/invocationparams/CredentialManagerInvocationParams.aidl b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/invocationparams/CredentialManagerInvocationParams.aidl new file mode 100644 index 0000000..81d4301 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/credential/manager/invocationparams/CredentialManagerInvocationParams.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.invocationparams; + +parcelable CredentialManagerInvocationParams; \ No newline at end of file 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 new file mode 100644 index 0000000..72a9af0 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..5bac21a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..627417d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..936f2ee --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..051f9e0 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..ecea95a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl @@ -0,0 +1,15 @@ +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 new file mode 100644 index 0000000..534c9de --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl @@ -0,0 +1,12 @@ +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/feedback/ErrorReport.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/ErrorReport.aidl new file mode 100644 index 0000000..0b4980d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/ErrorReport.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +parcelable ErrorReport; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/FeedbackOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/FeedbackOptions.aidl new file mode 100644 index 0000000..8e90ece --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/FeedbackOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.feedback; + +parcelable FeedbackOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl new file mode 100644 index 0000000..d6dd158 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +parcelable FileTeleporter; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl new file mode 100644 index 0000000..433575b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +parcelable LogOptions; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl new file mode 100644 index 0000000..7b189c9 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +parcelable ThemeSettings; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl new file mode 100644 index 0000000..eeb50c9 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback.internal; + +interface IFeedbackCallbacks { + void onServiceDestroy(); +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl new file mode 100644 index 0000000..48401b0 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback.internal; + +import com.google.android.gms.feedback.FeedbackOptions; +import android.os.IBinder; +import android.os.IInterface; +import android.os.Parcel; +import com.google.android.gms.googlehelp.GoogleHelp; +import com.google.android.gms.feedback.ErrorReport; +import android.content.Context; +import android.os.Bundle; +import android.content.Intent; + + +interface IFeedbackService { + + boolean startFeedbackFlow(in ErrorReport errorReport) = 0; + + boolean silentSendFeedback(in ErrorReport errorReport) = 2; + + void saveFeedbackDataAsync(in Bundle bundle, long id) = 3; + + void saveFeedbackDataAsyncWithOption(in FeedbackOptions options, in Bundle bundle, long id) = 4; + + void startFeedbackFlowAsync(in ErrorReport errorReport, long id) = 5; + + boolean isValidConfiguration(in FeedbackOptions options) = 6; + +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl new file mode 100644 index 0000000..ffe2ae7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.gass.internal; + +parcelable GassRequestParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl new file mode 100644 index 0000000..f8f40a7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.gass.internal; + +parcelable GassResponseParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl new file mode 100644 index 0000000..7fafe56 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.gass.internal; + +import android.os.Bundle; +import android.os.IInterface; +import com.google.android.gms.gass.internal.GassRequestParcel; +import com.google.android.gms.gass.internal.GassResponseParcel; + +interface IGassService { + GassResponseParcel getGassResponse(in GassRequestParcel gassRequestParcel) = 0; + Bundle getGassBundle(in Bundle bundle, int code) = 3; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/GoogleHelp.aidl b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/GoogleHelp.aidl new file mode 100644 index 0000000..9da8ad7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/GoogleHelp.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.googlehelp; + +parcelable GoogleHelp; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/InProductHelp.aidl b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/InProductHelp.aidl new file mode 100644 index 0000000..717af5b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/InProductHelp.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.googlehelp; + +parcelable InProductHelp; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/SupportRequestHelp.aidl b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/SupportRequestHelp.aidl new file mode 100644 index 0000000..4093b9c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/SupportRequestHelp.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.googlehelp; + +parcelable SupportRequestHelp; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/internal/common/IGoogleHelpCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/internal/common/IGoogleHelpCallbacks.aidl new file mode 100644 index 0000000..777fbf5 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/internal/common/IGoogleHelpCallbacks.aidl @@ -0,0 +1,26 @@ +package com.google.android.gms.googlehelp.internal.common; + +import android.graphics.Bitmap; +import android.os.Bundle; +import android.os.IBinder; +import android.os.Parcel; + +import com.google.android.gms.googlehelp.GoogleHelp; +import com.google.android.gms.googlehelp.InProductHelp; + +interface IGoogleHelpCallbacks { + void onProcessGoogleHelpFinished(in GoogleHelp googleHelp) = 0; + oneway void onSaveAsyncPsdFinished() = 6; + oneway void onSaveAsyncPsbdFinished() = 7; + void onRequestChatSupportSuccess(int chatQueuePosition) = 8; + void onRequestChatSupportFailed() = 9; + void onRequestC2cSupportSuccess() = 10; + void onRequestC2cSupportFailed() = 11; + void onSuggestions(in byte[] suggestions) = 12; + void onNoSuggestions() = 13; + void onEscalationOptions(in byte[] options) = 14; + void onNoEscalationOptions() = 15; + void onProcessInProductHelpFinished(in InProductHelp inProductHelp) = 16; + void onRealtimeSupportStatus(in byte[] status) = 17; + void onNoRealtimeSupportStatus() = 18; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/internal/common/IGoogleHelpService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/internal/common/IGoogleHelpService.aidl new file mode 100644 index 0000000..6fbb2a2 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/googlehelp/internal/common/IGoogleHelpService.aidl @@ -0,0 +1,26 @@ +package com.google.android.gms.googlehelp.internal.common; + +import android.graphics.Bitmap; +import android.os.Bundle; + +import com.google.android.gms.feedback.FeedbackOptions; +import com.google.android.gms.googlehelp.GoogleHelp; +import com.google.android.gms.googlehelp.InProductHelp; +import com.google.android.gms.googlehelp.SupportRequestHelp; +import com.google.android.gms.googlehelp.internal.common.IGoogleHelpCallbacks; + +interface IGoogleHelpService { + void processGoogleHelpAndPip(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 0; + void processGoogleHelpAndPipWithBitmap(in GoogleHelp googleHelp, in Bitmap bitmap, IGoogleHelpCallbacks callbacks) = 1; + oneway void saveAsyncHelpPsd(in Bundle bundle, long timestamp, in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 7; + oneway void saveAsyncFeedbackPsd(in Bundle bundle, long timestamp, in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 8; + oneway void saveAsyncFeedbackPsbd(in FeedbackOptions options, in Bundle bundle, long timestamp, in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 9; + oneway void requestChatSupport(in GoogleHelp googleHelp, String phoneNumber, String s2, IGoogleHelpCallbacks callbacks) = 10; + oneway void requestC2cSupport(in GoogleHelp googleHelp, String phoneNumber, String s2, IGoogleHelpCallbacks callbacks) = 11; + oneway void getSuggestions(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 12; + oneway void getEscalationOptions(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 13; + oneway void requestChatSupportWithSupportRequest(in SupportRequestHelp supportRequestHelp, IGoogleHelpCallbacks callbacks) = 14; + oneway void requestC2cSupportWithSupportRequest(in SupportRequestHelp supportRequestHelp, IGoogleHelpCallbacks callbacks) = 15; + void processInProductHelpAndPip(in InProductHelp inProductHelp, in Bitmap bitmap, IGoogleHelpCallbacks callbacks) = 16; + oneway void getRealtimeSupportStatus(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 17; +} 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 new file mode 100644 index 0000000..58ea0ba --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl @@ -0,0 +1,7 @@ +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/languageprofile/ClientLanguageSettings.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/ClientLanguageSettings.aidl new file mode 100644 index 0000000..9b451c3 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/ClientLanguageSettings.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.languageprofile; + +parcelable ClientLanguageSettings; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguageFluency.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguageFluency.aidl new file mode 100644 index 0000000..637d553 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguageFluency.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.languageprofile; + +parcelable LanguageFluency; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguageFluencyParams.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguageFluencyParams.aidl new file mode 100644 index 0000000..f61b1fa --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguageFluencyParams.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.languageprofile; + +parcelable LanguageFluencyParams; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguagePreference.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguagePreference.aidl new file mode 100644 index 0000000..d326c85 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguagePreference.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.languageprofile; + +parcelable LanguagePreference; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguagePreferenceParams.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguagePreferenceParams.aidl new file mode 100644 index 0000000..294f192 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/LanguagePreferenceParams.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.languageprofile; + +parcelable LanguagePreferenceParams; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/internal/ILanguageProfileCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/internal/ILanguageProfileCallbacks.aidl new file mode 100644 index 0000000..c72b49d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/internal/ILanguageProfileCallbacks.aidl @@ -0,0 +1,11 @@ +package com.google.android.gms.languageprofile.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.languageprofile.LanguageFluency; +import com.google.android.gms.languageprofile.LanguagePreference; + +interface ILanguageProfileCallbacks { + oneway void onString(in Status status, String s) = 0; + oneway void onLanguagePreferences(in Status status, in List preferences) = 1; + oneway void onLanguageFluencies(in Status status, in List fluencies) = 2; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/internal/ILanguageProfileService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/internal/ILanguageProfileService.aidl new file mode 100644 index 0000000..6becf73 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/languageprofile/internal/ILanguageProfileService.aidl @@ -0,0 +1,16 @@ +package com.google.android.gms.languageprofile.internal; + +import com.google.android.gms.common.api.internal.IStatusCallback; +import com.google.android.gms.languageprofile.ClientLanguageSettings; +import com.google.android.gms.languageprofile.LanguageFluencyParams; +import com.google.android.gms.languageprofile.LanguagePreferenceParams; +import com.google.android.gms.languageprofile.internal.ILanguageProfileCallbacks; + +interface ILanguageProfileService { + String fun1(String accountName) = 0; + void fun2(String accountName, ILanguageProfileCallbacks callbacks) = 1; + void getLanguagePreferences(String accountName, in LanguagePreferenceParams params, ILanguageProfileCallbacks callbacks) = 2; + void getLanguageFluencies(String accountName, in LanguageFluencyParams params, ILanguageProfileCallbacks callbacks) = 3; + void getLanguageSettings(String accountName, in ClientLanguageSettings settings, IStatusCallback callback) = 4; + void removeLanguageSettings(String accountName, IStatusCallback callback) = 5; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/IneligibilityRationale.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/IneligibilityRationale.aidl new file mode 100644 index 0000000..cd644d9 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/IneligibilityRationale.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable IneligibilityRationale; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationReportingStatus.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationReportingStatus.aidl new file mode 100644 index 0000000..20018a5 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationReportingStatus.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable LocationReportingStatus; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationShare.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationShare.aidl new file mode 100644 index 0000000..dc07a04 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationShare.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable LocationShare; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationUploadRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationUploadRequest.aidl new file mode 100644 index 0000000..deca656 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationUploadRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable LocationUploadRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationUploadResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationUploadResponse.aidl new file mode 100644 index 0000000..dbcb0f4 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/LocationUploadResponse.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable LocationUploadResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/NoticeAckedUpdateRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/NoticeAckedUpdateRequest.aidl new file mode 100644 index 0000000..de90453 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/NoticeAckedUpdateRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable NoticeAckedUpdateRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/PeriodicLocationReportingIssues.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/PeriodicLocationReportingIssues.aidl new file mode 100644 index 0000000..3a91fcb --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/PeriodicLocationReportingIssues.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable PeriodicLocationReportingIssues; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/PeriodicLocationUploadRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/PeriodicLocationUploadRequest.aidl new file mode 100644 index 0000000..4689029 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/PeriodicLocationUploadRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable PeriodicLocationUploadRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/StartLocationReportingRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/StartLocationReportingRequest.aidl new file mode 100644 index 0000000..034910b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/StartLocationReportingRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable StartLocationReportingRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/StopLocationReportingRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/StopLocationReportingRequest.aidl new file mode 100644 index 0000000..b00b992 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/StopLocationReportingRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +parcelable StopLocationReportingRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationReportingIssuesCallback.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationReportingIssuesCallback.aidl new file mode 100644 index 0000000..58e934a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationReportingIssuesCallback.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter.internal; + +import com.google.android.gms.common.api.ApiMetadata; +import com.google.android.gms.common.api.Status; +import com.google.android.gms.locationsharingreporter.PeriodicLocationReportingIssues; + +interface ILocationReportingIssuesCallback { + void onPeriodicLocationReportingIssues(in Status status, in PeriodicLocationReportingIssues periodicLocationReportingIssues, in ApiMetadata apiMetadata) = 0; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationReportingStatusCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationReportingStatusCallbacks.aidl new file mode 100644 index 0000000..ea04a6e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationReportingStatusCallbacks.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter.internal; + +import com.google.android.gms.common.api.ApiMetadata; +import com.google.android.gms.common.api.Status; +import com.google.android.gms.locationsharingreporter.LocationReportingStatus; + +interface ILocationReportingStatusCallbacks { + void onLocationReportingStatus(in Status status, in LocationReportingStatus locationReportingStatus, in ApiMetadata apiMetadata) = 0; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationSharingReporterService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationSharingReporterService.aidl new file mode 100644 index 0000000..5840185 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationSharingReporterService.aidl @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter.internal; + +import android.accounts.Account; +import com.google.android.gms.common.api.ApiMetadata; +import com.google.android.gms.common.api.internal.IStatusCallback; +import com.google.android.gms.locationsharingreporter.internal.ILocationReportingIssuesCallback; +import com.google.android.gms.locationsharingreporter.internal.ILocationReportingStatusCallbacks; +import com.google.android.gms.locationsharingreporter.internal.ILocationUploadCallbacks; +import com.google.android.gms.locationsharingreporter.LocationUploadRequest; +import com.google.android.gms.locationsharingreporter.PeriodicLocationUploadRequest; +import com.google.android.gms.locationsharingreporter.StartLocationReportingRequest; +import com.google.android.gms.locationsharingreporter.StopLocationReportingRequest; +import com.google.android.gms.locationsharingreporter.NoticeAckedUpdateRequest; + +interface ILocationSharingReporterService { + void uploadLocation(ILocationUploadCallbacks callback, in Account account, in LocationUploadRequest request, in ApiMetadata apiMetadata) = 0; + void getReportingStatus(ILocationReportingStatusCallbacks callback, in Account account, in ApiMetadata apiMetadata) = 1; + void syncReportingStatus(IStatusCallback callback, in Account account, in ApiMetadata apiMetadata) = 2; + void periodicLocationUpload(IStatusCallback callback, in Account account, in PeriodicLocationUploadRequest request, in ApiMetadata apiMetadata) = 3; + void startLocationReporting(IStatusCallback callback, in Account account, in StartLocationReportingRequest request, in ApiMetadata apiMetadata) = 4; + void stopLocationReporting(IStatusCallback callback, in Account account, in StopLocationReportingRequest request, in ApiMetadata apiMetadata) = 5; + void updateNoticeState(IStatusCallback callback, in Account account, in NoticeAckedUpdateRequest request, in ApiMetadata apiMetadata) = 6; + void getReportingIssues(ILocationReportingIssuesCallback callback, in Account account, in ApiMetadata apiMetadata) = 7; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationUploadCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationUploadCallbacks.aidl new file mode 100644 index 0000000..9bd0f8b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/locationsharingreporter/internal/ILocationUploadCallbacks.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter.internal; + +import com.google.android.gms.common.api.ApiMetadata; +import com.google.android.gms.common.api.Status; +import com.google.android.gms.locationsharingreporter.LocationUploadResponse; + +interface ILocationUploadCallbacks { + void onLocationUploadResponse(in Status status, in LocationUploadResponse locationUploadResponse, in ApiMetadata apiMetadata) = 0; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/auth/IApiTokenService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/auth/IApiTokenService.aidl new file mode 100644 index 0000000..122395e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/auth/IApiTokenService.aidl @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.maps.auth; + +import android.os.Bundle; + +interface IApiTokenService { + Bundle requestApiToken(in Bundle params); +} \ No newline at end of file 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 new file mode 100644 index 0000000..005edc3 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/AppMetadata.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..de59ae5 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..372d66f --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/EventParcel.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..380c045 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/IMeasurementService.aidl @@ -0,0 +1,27 @@ +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 sendEvent(in EventParcel event, in AppMetadata app) = 0; + void sendUserProperty(in UserAttributeParcel attribute, in AppMetadata app) = 1; + void sendAppLaunch(in AppMetadata app) = 3; +// void f5(in EventParcel event, String p1, String p2) = 4; + void sendMeasurementEnabled(in AppMetadata p0) = 5; + List getAllUserProperties(in AppMetadata app, boolean includeInternal) = 6; +// byte[] f9(in EventParcel event, String p1) = 8; + void sendCurrentScreen(long id, String name, String referrer, String packageName) = 9; + String getAppInstanceId(in AppMetadata app) = 10; + void sendConditionalUserProperty(in ConditionalUserPropertyParcel property, in AppMetadata app) = 11; +// void f13(ConditionalUserPropertyParcel p0) = 12; + List getUserProperties(String origin, String propertyNamePrefix, boolean includeInternal, in AppMetadata app) = 13; + List getUserPropertiesAs(String packageName, String origin, String propertyNamePrefix, boolean includeInternal) = 14; + List getConditionalUserProperties(String origin, String propertyNamePrefix, in AppMetadata app) = 15; + List getConditionalUserPropertiesAs(String packageName, String origin, String propertyNamePrefix) = 16; + void reset(in AppMetadata app) = 17; + void sendDefaultEventParameters(in Bundle params, in AppMetadata app) = 18; + void sendConsentSettings(in AppMetadata app) = 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 new file mode 100644 index 0000000..efb3b72 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/measurement/internal/UserAttributeParcel.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..75db9fa --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..62ae147 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl @@ -0,0 +1,44 @@ +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/phenotype/Configurations.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/Configurations.aidl new file mode 100644 index 0000000..33ccf3d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/Configurations.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.phenotype; + +parcelable Configurations; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/DogfoodsToken.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/DogfoodsToken.aidl new file mode 100644 index 0000000..991fca0 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/DogfoodsToken.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.phenotype; + +parcelable DogfoodsToken; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/ExperimentTokens.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/ExperimentTokens.aidl new file mode 100644 index 0000000..4b6ba4f --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/ExperimentTokens.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.phenotype; + +parcelable ExperimentTokens; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/Flag.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/Flag.aidl new file mode 100644 index 0000000..f91175f --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/Flag.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.phenotype; + +parcelable Flag; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/FlagOverrides.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/FlagOverrides.aidl new file mode 100644 index 0000000..bdf15a6 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/FlagOverrides.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.phenotype; + +parcelable FlagOverrides; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/RegistrationInfo.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/RegistrationInfo.aidl new file mode 100644 index 0000000..644ba2d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/RegistrationInfo.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.phenotype; + +parcelable RegistrationInfo; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeCallbacks.aidl new file mode 100644 index 0000000..3c29b8b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeCallbacks.aidl @@ -0,0 +1,27 @@ +package com.google.android.gms.phenotype.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.phenotype.Configurations; +import com.google.android.gms.phenotype.DogfoodsToken; +import com.google.android.gms.phenotype.ExperimentTokens; +import com.google.android.gms.phenotype.Flag; +import com.google.android.gms.phenotype.FlagOverrides; + +interface IPhenotypeCallbacks { + oneway void onRegistered(in Status status) = 0; + oneway void onWeakRegistered(in Status status) = 1; + oneway void onUnregistered(in Status status) = 2; + oneway void onConfiguration(in Status status, in Configurations configurations) = 3; + oneway void onCommitedToConfiguration(in Status status) = 4; + oneway void onExperimentTokens(in Status status, in ExperimentTokens experimentTokens) = 5; + oneway void onDogfoodsToken(in Status status, in DogfoodsToken dogfoodsToken) = 6; + oneway void onDogfoodsTokenSet(in Status status) = 7; + oneway void onFlag(in Status status, in Flag flag) = 8; + oneway void onCommittedConfiguration(in Status status, in Configurations configuration) = 9; + oneway void onSyncFinished(in Status status, long p1) = 10; + oneway void onFlagOverridesSet(in Status status) = 11; + oneway void onFlagOverrides(in Status status, in FlagOverrides overrides) = 12; + oneway void onAppSpecificPropertiesSet(in Status status) = 13; + + oneway void onServingVersion(in Status status, long version) = 15; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl new file mode 100644 index 0000000..eb6113d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl @@ -0,0 +1,35 @@ +package com.google.android.gms.phenotype.internal; + +import com.google.android.gms.common.api.internal.IStatusCallback; +import com.google.android.gms.phenotype.internal.IPhenotypeCallbacks; +import com.google.android.gms.phenotype.Flag; +import com.google.android.gms.phenotype.RegistrationInfo; + +interface IPhenotypeService { + oneway void register(IPhenotypeCallbacks callbacks, String packageName, int version, in String[] p3, in byte[] p4) = 0; // returns via callbacks.onRegistered() + oneway void weakRegister(IPhenotypeCallbacks callbacks, String packageName, int version, in String[] p3, in int[] p4, in byte[] p5) = 1; // returns via callbacks.onWeakRegistered() + oneway void unregister(IPhenotypeCallbacks callbacks, String packageName) = 2; // returns via callbacks.onUnregistered() + oneway void getConfigurationSnapshot(IPhenotypeCallbacks callbacks, String packageName, String user) = 3; // returns via callbacks.onConfiguration() + oneway void commitToConfiguration(IPhenotypeCallbacks callbacks, String snapshotToken) = 4; // returns via callbacks.onCommitedToConfiguration() + oneway void getExperimentTokens(IPhenotypeCallbacks callbacks, String packageName, String logSourceName) = 5; // returns via callbacks.onExperimentTokens() + oneway void getDogfoodsToken(IPhenotypeCallbacks callbacks) = 6; // returns via callbacks.onDogfoodsToken() + oneway void setDogfoodsToken(IPhenotypeCallbacks callbacks, in byte[] p1) = 7; // returns via callbacks.onDogfoodsTokenSet() + oneway void getFlag(IPhenotypeCallbacks callbacks, String packageName, String name, int type) = 8; // returns via callbacks.onFlag() + oneway void getCommitedConfiguration(IPhenotypeCallbacks callbacks, String packageName) = 9; // returns via callbacks.onCommittedConfiguration() + oneway void getConfigurationSnapshotWithToken(IPhenotypeCallbacks callbacks, String packageName, String user, String token) = 10; // returns via callbacks.onConfiguration() + oneway void syncAfterOperation(IPhenotypeCallbacks callbacks, String packageName, long version) = 11; // returns via callbacks.onSyncFinished() + oneway void registerSync(IPhenotypeCallbacks callbacks, String packageName, int version, in String[] p3, in byte[] p4, String p5, String p6) = 12; // returns via callbacks.onConfiguration() + oneway void setFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user, String flagName, int flagType, int flagDataType, String flagValue) = 13; // returns via callbacks.onFlagOverridesSet() + oneway void deleteFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user, String flagName) = 14; // returns via callbacks.onFlagOverrides() + oneway void listFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user, String flagName) = 15; // returns via callbacks.onFlagOverrides() + + oneway void clearFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user) = 17; // returns via callbacks.onFlagOverridesSet() + oneway void bulkRegister(IPhenotypeCallbacks callbacks, in RegistrationInfo[] infos) = 18; // returns via callbacks.onRegister() + oneway void setAppSpecificProperties(IPhenotypeCallbacks callbacks, String packageName, in byte[] p2) = 19; // returns via callbacks.onAppSpecificPropertiesSet() + + oneway void getServingVersion(IPhenotypeCallbacks callbacks) = 21; // returns via callbacks.onServingVersion() + oneway void getExperimentTokensForLogging(IPhenotypeCallbacks callbacks, String packageName, String logSourceName, String p3, String clientPackageName) = 22; // returns via callbacks.onExperimentTokens() + oneway void syncAllAfterOperation(IPhenotypeCallbacks callbacks, long p1) = 23; // returns via callbacks.onSyncFinished() + oneway void setRuntimeProperties(IStatusCallback callbacks, String p1, in byte[] p2) = 24; +// oneway void setExternalExperiments(IStatusCallback callbacks, String p1, in List p2) = 25; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl b/play-services-api/src/main/aidl/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl new file mode 100644 index 0000000..7e2121d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.plus.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IPlusOneButtonCreator { + IObjectWrapper create(IObjectWrapper context, int size, int annotation, String url, int activityRequestCode); + IObjectWrapper createForAccount(IObjectWrapper context, int size, int annotation, String url, String account); +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl b/play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl new file mode 100644 index 0000000..8cf0bb7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.potokens; + +parcelable PoToken; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl new file mode 100644 index 0000000..938c848 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.potokens.internal; + +import com.google.android.gms.common.api.internal.IStatusCallback; +import com.google.android.gms.potokens.internal.ITokenCallbacks; + +interface IPoTokensService { + void responseStatus(IStatusCallback call, int code) = 1; + void responseStatusToken(ITokenCallbacks call, int i, in byte[] bArr) = 2; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl new file mode 100644 index 0000000..55c71df --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.potokens.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.potokens.PoToken; + +interface ITokenCallbacks { + void responseToken(in Status status, in PoToken token) = 1; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl new file mode 100644 index 0000000..b8d88c1 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.pseudonymous; + +parcelable PseudonymousIdToken; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl new file mode 100644 index 0000000..f6a47de --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl @@ -0,0 +1,15 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.pseudonymous.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.pseudonymous.PseudonymousIdToken; + +interface IPseudonymousIdCallbacks { + void onGetTokenResponse(in Status status, in PseudonymousIdToken token) = 0; + void onSetTokenResponse(in Status status) = 1; + void onGetLastResetWallTimeMsResponse(in Status status, long time) = 2; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl new file mode 100644 index 0000000..e99f7df --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl @@ -0,0 +1,15 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.pseudonymous.internal; + +import com.google.android.gms.pseudonymous.internal.IPseudonymousIdCallbacks; +import com.google.android.gms.pseudonymous.PseudonymousIdToken; + +interface IPseudonymousIdService { + void getToken(IPseudonymousIdCallbacks call) = 0; + void setToken(IPseudonymousIdCallbacks call, in PseudonymousIdToken token) = 1; + void getLastResetWallTimeMs(IPseudonymousIdCallbacks callbacks) = 2; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl new file mode 100644 index 0000000..24ae0ff --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/AccountState.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders; + +parcelable AccountState; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl new file mode 100644 index 0000000..142dded --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/CreateReminderOptionsInternal.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders; + +parcelable CreateReminderOptionsInternal; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl new file mode 100644 index 0000000..ff41844 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/LoadRemindersOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders; + +parcelable LoadRemindersOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl new file mode 100644 index 0000000..55ac1be --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/ReindexDueDatesOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders; + +parcelable ReindexDueDatesOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl new file mode 100644 index 0000000..79f91de --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/UpdateRecurrenceOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders; + +parcelable UpdateRecurrenceOptions; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl new file mode 100644 index 0000000..5e5506e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersCallbacks.aidl @@ -0,0 +1,17 @@ +package com.google.android.gms.reminders.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.common.data.DataHolder; + +import com.google.android.gms.reminders.AccountState; + +interface IRemindersCallbacks { + void onDataHolder(in DataHolder data, in Status status) = 0; + void onStatus(in Status status) = 1; + void onNoStatus() = 2; + void onDataHolderNoStatus(in DataHolder data, in Status status) = 3; + void onBool(boolean b, in Status status) = 4; + void onString(in String s, in Status status) = 5; + void onAccountState(in AccountState accountState, in Status status) = 6; + void onAsyncDataHolder(in DataHolder data) = 7; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl new file mode 100644 index 0000000..2added9 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersListener.aidl @@ -0,0 +1,5 @@ +package com.google.android.gms.reminders.internal; + +interface IRemindersListener { + +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl new file mode 100644 index 0000000..f998648 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/internal/IRemindersService.aidl @@ -0,0 +1,37 @@ +package com.google.android.gms.reminders.internal; + +import com.google.android.gms.reminders.internal.IRemindersCallbacks; + +import com.google.android.gms.reminders.AccountState; +import com.google.android.gms.reminders.CreateReminderOptionsInternal; +import com.google.android.gms.reminders.LoadRemindersOptions; +import com.google.android.gms.reminders.ReindexDueDatesOptions; +import com.google.android.gms.reminders.UpdateRecurrenceOptions; +import com.google.android.gms.reminders.model.CustomizedSnoozePresetEntity; +import com.google.android.gms.reminders.model.TaskEntity; +import com.google.android.gms.reminders.model.TaskIdEntity; + +interface IRemindersService { + void loadReminders(IRemindersCallbacks callbacks, in LoadRemindersOptions options) = 0; + void addListener(IRemindersCallbacks callbacks) = 1; + void createReminder(IRemindersCallbacks callbacks, in TaskEntity task) = 2; + void updateReminder(IRemindersCallbacks callbacks, in TaskEntity task) = 3; + void deleteReminder(IRemindersCallbacks callbacks, in TaskIdEntity taskId) = 4; + void bumpReminder(IRemindersCallbacks callbacks, in TaskIdEntity taskId) = 5; + void hasUpcomingReminders(IRemindersCallbacks callbacks) = 6; + void createRecurrence(IRemindersCallbacks callbacks, in TaskEntity task) = 7; + void updateRecurrence(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 8; + void deleteRecurrence(IRemindersCallbacks callbacks, String s1, in UpdateRecurrenceOptions options) = 9; + void changeRecurrence(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 10; + void makeTaskRecurring(IRemindersCallbacks callbacks, in TaskEntity task) = 11; + void makeRecurrenceSingleInstance(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 12; + void clearListeners() = 13; + void batchUpdateReminders(IRemindersCallbacks callbacks, in List tasks) = 14; + void createReminderWithOptions(IRemindersCallbacks callbacks, in TaskEntity task, in CreateReminderOptionsInternal options) = 15; + void getCustomizedSnoozePreset(IRemindersCallbacks callbacks) = 16; + void setCustomizedSnoozePreset(IRemindersCallbacks callbacks, in CustomizedSnoozePresetEntity preset) = 17; + void setAccountState(IRemindersCallbacks callbacks, in AccountState accountState) = 18; + void getAccountState(IRemindersCallbacks callbacks) = 19; + void checkReindexDueDatesNeeded(IRemindersCallbacks callbacks, in ReindexDueDatesOptions options) = 20; + void reindexDueDates(IRemindersCallbacks callbacks, in ReindexDueDatesOptions options) = 21; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl new file mode 100644 index 0000000..bbb9083 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders.model; + +parcelable CustomizedSnoozePresetEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl new file mode 100644 index 0000000..9a3883c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskEntity.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders.model; + +parcelable TaskEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl new file mode 100644 index 0000000..a4c4148 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/reminders/model/TaskIdEntity.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.reminders.model; + +parcelable TaskIdEntity; \ No newline at end of file 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 new file mode 100644 index 0000000..404544c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/administration/internal/ISearchAdministrationService.aidl @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..9f71893 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..11b0a4d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..b2e549d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..a837a7d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..ad68ef3 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..7aaa548 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..863b016 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl @@ -0,0 +1,9 @@ +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 new file mode 100644 index 0000000..fe2073c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000..426cbe4 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..8fdb456 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..986ab4d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..86d52a1 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..8d7382e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..ca99ad5 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..2bd4d8b --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..ff55276 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetExperimentIdsResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..79cbb17 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..a5f2d6d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..b08d953 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminCallbacks.aidl @@ -0,0 +1,16 @@ +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 new file mode 100644 index 0000000..95bc32a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl @@ -0,0 +1,17 @@ +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 new file mode 100644 index 0000000..1986e95 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..9704725 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..8bcb891 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl @@ -0,0 +1,7 @@ +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 new file mode 100644 index 0000000..091cdae --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl @@ -0,0 +1,8 @@ +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/semanticlocation/PlaceCandidate.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/PlaceCandidate.aidl new file mode 100644 index 0000000..9b89b5c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/PlaceCandidate.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocation; + +parcelable PlaceCandidate; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl new file mode 100644 index 0000000..715a75c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocation; + +parcelable SemanticLocationEventRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl new file mode 100644 index 0000000..de75def --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocation.internal; + +import android.app.PendingIntent; +import android.os.IInterface; +import com.google.android.gms.semanticlocation.SemanticLocationEventRequest; +import com.google.android.gms.semanticlocation.internal.SemanticLocationParameters; +import com.google.android.gms.common.api.internal.IStatusCallback; + +interface ISemanticLocationService { + void registerSemanticLocationEvents(in SemanticLocationParameters params, IStatusCallback callback, in SemanticLocationEventRequest request, in PendingIntent pendingIntent) = 0; + void unregisterSemanticLocationEvents(in SemanticLocationParameters params, IStatusCallback callback, in PendingIntent pendingIntent) = 1; + + void setIncognitoMode(in SemanticLocationParameters params, IStatusCallback callback, boolean mode) = 4; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl new file mode 100644 index 0000000..1ac959e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocation.internal; + +parcelable SemanticLocationParameters; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FieldMask.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FieldMask.aidl new file mode 100644 index 0000000..9708311 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FieldMask.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable FieldMask; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FrequentPlace.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FrequentPlace.aidl new file mode 100644 index 0000000..07dcd9a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FrequentPlace.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable FrequentPlace; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FrequentTrip.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FrequentTrip.aidl new file mode 100644 index 0000000..4679af7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/FrequentTrip.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable FrequentTrip; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/InferredPlace.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/InferredPlace.aidl new file mode 100644 index 0000000..4341be9 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/InferredPlace.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable InferredPlace; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LocationHistorySegment.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LocationHistorySegment.aidl new file mode 100644 index 0000000..35737b8 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LocationHistorySegment.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable LocationHistorySegment; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LocationHistorySegmentRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LocationHistorySegmentRequest.aidl new file mode 100644 index 0000000..ef058fa --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LocationHistorySegmentRequest.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable LocationHistorySegmentRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LookupParameters.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LookupParameters.aidl new file mode 100644 index 0000000..f0a7be5 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/LookupParameters.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable LookupParameters; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/Persona.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/Persona.aidl new file mode 100644 index 0000000..181a806 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/Persona.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable Persona; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/RequestCredentials.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/RequestCredentials.aidl new file mode 100644 index 0000000..2f1ccb7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/RequestCredentials.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable RequestCredentials; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/TimeRangeFilter.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/TimeRangeFilter.aidl new file mode 100644 index 0000000..316a525 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/TimeRangeFilter.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable TimeRangeFilter; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/UserLocationProfile.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/UserLocationProfile.aidl new file mode 100644 index 0000000..7630d5d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/UserLocationProfile.aidl @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocationhistory; + +parcelable UserLocationProfile; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/internal/ISemanticLocationHistoryCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/internal/ISemanticLocationHistoryCallbacks.aidl new file mode 100644 index 0000000..18784fe --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/internal/ISemanticLocationHistoryCallbacks.aidl @@ -0,0 +1,21 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.common.data.DataHolder; +import com.google.android.gms.semanticlocationhistory.InferredPlace; +import com.google.android.gms.semanticlocationhistory.UserLocationProfile; + +interface ISemanticLocationHistoryCallbacks { + void onSegmentsReturn(in DataHolder dataHolder) = 4; + void onDeleteHistoryReturn(in Status status) = 5; + void onEditSegmentsReturn(in Status status) = 3; + void onGetBackupSummaryReturn(in Status status, in List list) = 7; + void onGetInferredHomeReturn(in Status status, in InferredPlace inferredPlace) = 1; + void onGetInferredWorkReturn(in Status status, in InferredPlace inferredPlace) = 2; + void onGetUserLocationProfileReturn(in Status status, in UserLocationProfile userLocationProfile) = 6; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/internal/ISemanticLocationHistoryService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/internal/ISemanticLocationHistoryService.aidl new file mode 100644 index 0000000..8377cc1 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocationhistory/internal/ISemanticLocationHistoryService.aidl @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory.internal; + +import com.google.android.gms.semanticlocationhistory.internal.ISemanticLocationHistoryCallbacks; +import com.google.android.gms.common.api.ApiMetadata; +import com.google.android.gms.semanticlocationhistory.RequestCredentials; +import com.google.android.gms.semanticlocationhistory.LocationHistorySegmentRequest; +import com.google.android.gms.common.api.internal.IStatusCallback; + +interface ISemanticLocationHistoryService { + void getSegments(in ISemanticLocationHistoryCallbacks callback, in ApiMetadata apiMetadata, in RequestCredentials requestCredentials, in LocationHistorySegmentRequest request) = 0; + void onDemandBackupRestore(in IStatusCallback callback, in ApiMetadata apiMetadata, in RequestCredentials requestCredentials) = 1; + void onDemandBackupRestoreV2(in IStatusCallback callback, in RequestCredentials requestCredentials, in List list, in ApiMetadata apiMetadata) = 2; + void getInferredHome(in ISemanticLocationHistoryCallbacks callback, in RequestCredentials requestCredentials, in ApiMetadata apiMetadata) = 3; + void getInferredWork(in ISemanticLocationHistoryCallbacks callback, in RequestCredentials requestCredentials, in ApiMetadata apiMetadata) = 4; + void editSegments(in ISemanticLocationHistoryCallbacks callback, in List list, in ApiMetadata apiMetadata, in RequestCredentials requestCredentials) = 5; + void deleteHistory(in ISemanticLocationHistoryCallbacks callback, in RequestCredentials requestCredentials, long startTime, long endTime, in ApiMetadata apiMetadata) = 6; + void getUserLocationProfile(in IStatusCallback callback, in ApiMetadata apiMetadata, in RequestCredentials requestCredentials) = 7; + void getBackupSummary(in IStatusCallback callback, in ApiMetadata apiMetadata, in RequestCredentials requestCredentials) = 8; + void deleteBackups(in IStatusCallback callback, in RequestCredentials requestCredentials, in List list, in ApiMetadata apiMetadata) = 9; +} \ No newline at end of file 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 new file mode 100644 index 0000000..a88060f --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/UsageReportingOptInOptions.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..3e877c2 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingCallbacks.aidl @@ -0,0 +1,11 @@ +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 new file mode 100644 index 0000000..8e9c287 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingOptInOptionsChangedListener.aidl @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..46d6265 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/usagereporting/internal/IUsageReportingService.aidl @@ -0,0 +1,12 @@ +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/google/android/gms/wallet/GetClientTokenRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/wallet/GetClientTokenRequest.aidl new file mode 100644 index 0000000..ad52402 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/wallet/GetClientTokenRequest.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.wallet; + +parcelable GetClientTokenRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/wallet/GetClientTokenResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/wallet/GetClientTokenResponse.aidl new file mode 100644 index 0000000..e2b7c30 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/wallet/GetClientTokenResponse.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.wallet; + +parcelable GetClientTokenResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/wallet/IsReadyToPayRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/wallet/IsReadyToPayRequest.aidl new file mode 100644 index 0000000..da1b034 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/wallet/IsReadyToPayRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.wallet; + +parcelable IsReadyToPayRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl new file mode 100644 index 0000000..4b5ac36 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IOwService.aidl @@ -0,0 +1,10 @@ +package com.google.android.gms.wallet.internal; + +import com.google.android.gms.wallet.internal.IWalletServiceCallbacks; +import com.google.android.gms.wallet.IsReadyToPayRequest; +import com.google.android.gms.wallet.GetClientTokenRequest; + +interface IOwService { + void isReadyToPay(in IsReadyToPayRequest request, in Bundle args, IWalletServiceCallbacks callbacks) = 13; + void getClientToken(in GetClientTokenRequest getClientTokenRequest, in Bundle options, IWalletServiceCallbacks callbacks) = 14; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IWalletServiceCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IWalletServiceCallbacks.aidl new file mode 100644 index 0000000..a7bd289 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/wallet/internal/IWalletServiceCallbacks.aidl @@ -0,0 +1,9 @@ +package com.google.android.gms.wallet.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.wallet.GetClientTokenResponse; + +interface IWalletServiceCallbacks { + void onIsReadyToPayResponse(in Status status, boolean result, in Bundle args) = 8; + void onClientTokenReceived(in Status status, in GetClientTokenResponse response, in Bundle extras) = 9; +} diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/CompoundHashParcelable.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/CompoundHashParcelable.aidl new file mode 100644 index 0000000..689e591 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/CompoundHashParcelable.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.database.connection.idl; + +parcelable CompoundHashParcelable; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/ConnectionConfig.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/ConnectionConfig.aidl new file mode 100644 index 0000000..d6c1fc3 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/ConnectionConfig.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.database.connection.idl; + +parcelable ConnectionConfig; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IConnectionAuthTokenProvider.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IConnectionAuthTokenProvider.aidl new file mode 100644 index 0000000..447f9f4 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IConnectionAuthTokenProvider.aidl @@ -0,0 +1,7 @@ +package com.google.firebase.database.connection.idl; + +import com.google.firebase.database.connection.idl.IGetTokenCallback; + +interface IConnectionAuthTokenProvider { + void zero(boolean var1, IGetTokenCallback var2) = 0; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IGetTokenCallback.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IGetTokenCallback.aidl new file mode 100644 index 0000000..c4d45cd --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IGetTokenCallback.aidl @@ -0,0 +1,6 @@ +package com.google.firebase.database.connection.idl; + +interface IGetTokenCallback { + void zero(String s) = 0; + void onError(String s) = 1; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IListenHashProvider.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IListenHashProvider.aidl new file mode 100644 index 0000000..a5aaa18 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IListenHashProvider.aidl @@ -0,0 +1,11 @@ +package com.google.firebase.database.connection.idl; + +import com.google.firebase.database.connection.idl.CompoundHashParcelable; + +interface IListenHashProvider { + String zzPY() = 0; + + boolean zzPZ() = 1; + + CompoundHashParcelable zzQF() = 2; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IPersistentConnection.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IPersistentConnection.aidl new file mode 100644 index 0000000..21e00b1 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IPersistentConnection.aidl @@ -0,0 +1,44 @@ +package com.google.firebase.database.connection.idl; + +import com.google.android.gms.dynamic.IObjectWrapper; + +import com.google.firebase.database.connection.idl.ConnectionConfig; +import com.google.firebase.database.connection.idl.IConnectionAuthTokenProvider; +import com.google.firebase.database.connection.idl.IListenHashProvider; +import com.google.firebase.database.connection.idl.IPersistentConnectionDelegate; +import com.google.firebase.database.connection.idl.IRequestResultCallback; + + +interface IPersistentConnection { + void setup(in ConnectionConfig var1, IConnectionAuthTokenProvider var2, IObjectWrapper var3, IPersistentConnectionDelegate var4) = 0; + + void initialize() = 1; + + void shutdown() = 2; + + void refreshAuthToken() = 3; + + void listen(in List var1, IObjectWrapper var2, IListenHashProvider var3, long var4, IRequestResultCallback var6) = 4; + + void unlisten(in List var1, IObjectWrapper var2) = 5; + + void purgeOutstandingWrites() = 6; + + void put(in List var1, IObjectWrapper var2, IRequestResultCallback var3) = 7; + + void compareAndPut(in List var1, IObjectWrapper var2, String var3, IRequestResultCallback var4) = 8; + + void merge(in List var1, IObjectWrapper var2, IRequestResultCallback var3) = 9; + + void onDisconnectPut(in List var1, IObjectWrapper var2, IRequestResultCallback var3) = 10; + + void onDisconnectMerge(in List var1, IObjectWrapper var2, IRequestResultCallback var3) = 11; + + void onDisconnectCancel(in List var1, IRequestResultCallback var2) = 12; + + void interrupt(String var1) = 13; + + void resume(String var1) = 14; + + boolean isInterrupted(String var1) = 15; +} diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IPersistentConnectionDelegate.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IPersistentConnectionDelegate.aidl new file mode 100644 index 0000000..9ae649d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IPersistentConnectionDelegate.aidl @@ -0,0 +1,19 @@ +package com.google.firebase.database.connection.idl; + +import com.google.android.gms.dynamic.IObjectWrapper; + +import com.google.firebase.database.connection.idl.RangeParcelable; + +interface IPersistentConnectionDelegate { + void zero(in List var1, IObjectWrapper var2, boolean var3, long var4) = 0; + + void one(in List var1, in List var2, IObjectWrapper var3, long var4) = 1; + + void two() = 2; + + void onDisconnect() = 3; + + void four(boolean var1) = 4; + + void five(IObjectWrapper var1) = 5; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IRequestResultCallback.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IRequestResultCallback.aidl new file mode 100644 index 0000000..5806bc3 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/IRequestResultCallback.aidl @@ -0,0 +1,5 @@ +package com.google.firebase.database.connection.idl; + +interface IRequestResultCallback { + void zero(String var1, String var2) = 0; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/RangeParcelable.aidl b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/RangeParcelable.aidl new file mode 100644 index 0000000..08d6df1 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/firebase/database/connection/idl/RangeParcelable.aidl @@ -0,0 +1,3 @@ +package com.google.firebase.database.connection.idl; + +parcelable RangeParcelable; \ No newline at end of file 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 new file mode 100644 index 0000000..5c71ea0 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/CorpusStatus.java @@ -0,0 +1,46 @@ +/* + * 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 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 new file mode 100644 index 0000000..2f8a596 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdate.java @@ -0,0 +1,24 @@ +/* + * 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 new file mode 100644 index 0000000..d542f48 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/PIMEUpdateResponse.java @@ -0,0 +1,42 @@ +/* + * 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 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 new file mode 100644 index 0000000..1be52c8 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java @@ -0,0 +1,72 @@ +/* + * 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 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 new file mode 100644 index 0000000..720f773 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/RequestIndexingSpecification.java @@ -0,0 +1,28 @@ +/* + * 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 new file mode 100644 index 0000000..fec25f0 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java @@ -0,0 +1,27 @@ +/* + * 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 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 new file mode 100644 index 0000000..0f80a05 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestSpecification.java @@ -0,0 +1,31 @@ +/* + * 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 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 new file mode 100644 index 0000000..f616d51 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SuggestionResults.java @@ -0,0 +1,54 @@ +/* + * 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 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 new file mode 100644 index 0000000..a2f0f9e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/UsageInfo.java @@ -0,0 +1,24 @@ +/* + * 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/audit/LogAuditRecordsRequest.java b/play-services-api/src/main/java/com/google/android/gms/audit/LogAuditRecordsRequest.java new file mode 100644 index 0000000..8042154 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/audit/LogAuditRecordsRequest.java @@ -0,0 +1,53 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.audit; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class LogAuditRecordsRequest extends AbstractSafeParcelable { + @Field(1) + public int writeMode; + @Field(2) + public int componentId; + @Field(3) + public String accountName; + @Field(4) + public byte[][] auditRecords; + @Field(5) + public byte[] traceToken; + @Field(6) + public byte[] auditToken; + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("LogAuditRecordsRequest") + .field("writeMode", writeMode) + .field("componentId", componentId) + .field("accountName", accountName) + .field("auditRecords", auditRecords) + .field("traceToken", traceToken) + .field("auditToken", auditToken) + .end(); + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LogAuditRecordsRequest.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 new file mode 100644 index 0000000..6c73b4b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java @@ -0,0 +1,46 @@ +/* + * 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 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 new file mode 100644 index 0000000..cd56eb1 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java @@ -0,0 +1,46 @@ +/* + * 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 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 new file mode 100644 index 0000000..c7db433 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java @@ -0,0 +1,34 @@ +/* + * 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 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/FACLConfig.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/FACLConfig.java new file mode 100644 index 0000000..17004b0 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/FACLConfig.java @@ -0,0 +1,27 @@ +/* + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.auth.firstparty.dataservice; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class FACLConfig extends AutoSafeParcelable { + @Field(1) + public int versionCode = 1; + @Field(2) + public boolean allCirclesVisible; + @Field(3) + public String visibleEdges; + @Field(4) + public boolean allContactsVisible; + @Field(5) + public boolean showCircles; + @Field(6) + public boolean showContacts; + @Field(7) + public boolean hasShowCircles; + + public static final Creator CREATOR = new AutoCreator(FACLConfig.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/PACLConfig.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/PACLConfig.java new file mode 100644 index 0000000..58f04dc --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/PACLConfig.java @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.auth.firstparty.dataservice; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class PACLConfig extends AutoSafeParcelable { + @Field(1) + private int versionCode = 1; + @Field(2) + public String visibleActions; + @Field(3) + public String data; + + public static final Creator CREATOR = new AutoCreator(PACLConfig.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 new file mode 100644 index 0000000..4ea4071 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2015 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.auth.firstparty.dataservice; + +import android.accounts.Account; +import android.os.Bundle; + +import com.google.android.gms.auth.firstparty.shared.AppDescription; +import com.google.android.gms.auth.firstparty.shared.CaptchaSolution; +import org.microg.safeparcel.AutoSafeParcelable; + +public class TokenRequest extends AutoSafeParcelable { + @Field(1) + private int versionCode = 8; + @Field(2) + private String service; + @Field(3) + public String accountName; + @Field(4) + public Bundle extras; + @Field(5) + public FACLConfig faclConfig; + @Field(6) + public PACLConfig paclConfig; + @Field(7) + public boolean signingIn; + @Field(9) + public String consent; + @Field(10) + public AppDescription callingAppDescription; + @Field(11) + public CaptchaSolution captchaSolution; + @Field(14) + public boolean useCache; + @Field(15) + public String accountType; + @Field(16) + public int delegationType; + @Field(17) + public String delegateeUserId; + @Field(19) + public String consentResult; + @Field(24) + public int mode; + + 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 new file mode 100644 index 0000000..999e9a9 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java @@ -0,0 +1,20 @@ +/* + * 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 new file mode 100644 index 0000000..0091dee --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java @@ -0,0 +1,43 @@ +/* + * 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 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 new file mode 100644 index 0000000..139bf29 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/proximity/data/Permit.java @@ -0,0 +1,20 @@ +/* + * 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 new file mode 100644 index 0000000..4b57130 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java @@ -0,0 +1,38 @@ +/* + * 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 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 new file mode 100644 index 0000000..9e339e8 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java @@ -0,0 +1,35 @@ +/* + * 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 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 new file mode 100644 index 0000000..9563798 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java @@ -0,0 +1,29 @@ +/* + * 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 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/credential/manager/invocationparams/CallerInfo.java b/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CallerInfo.java new file mode 100644 index 0000000..763a90c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CallerInfo.java @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.invocationparams; + +import androidx.annotation.NonNull; +import org.microg.safeparcel.AutoSafeParcelable; + +public class CallerInfo extends AutoSafeParcelable { + @Field(1) + public String source; + @Field(2) + public String medium; + @Field(3) + public String campaign; + @Field(4) + public String content; + + @NonNull + @Override + public String toString() { + return "CallerInfo(" + source + "," + medium + "," + campaign + "," + content + ")"; + } + + public static final Creator CREATOR = new AutoCreator<>(CallerInfo.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CredentialManagerAccount.java b/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CredentialManagerAccount.java new file mode 100644 index 0000000..f12db2f --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CredentialManagerAccount.java @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.invocationparams; + +import androidx.annotation.NonNull; +import org.microg.safeparcel.AutoSafeParcelable; + +public class CredentialManagerAccount extends AutoSafeParcelable { + @Field(1) + public String name; + + @NonNull + @Override + public String toString() { + return name; + } + + public static final String NAME_LOCAL = "pwm.constant.LocalAccount"; + public static final Creator CREATOR = new AutoCreator<>(CredentialManagerAccount.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CredentialManagerInvocationParams.java b/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CredentialManagerInvocationParams.java new file mode 100644 index 0000000..871754f --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/credential/manager/invocationparams/CredentialManagerInvocationParams.java @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.credential.manager.invocationparams; + +import androidx.annotation.NonNull; +import org.microg.gms.utils.ToStringHelper; +import org.microg.safeparcel.AutoSafeParcelable; + +public class CredentialManagerInvocationParams extends AutoSafeParcelable { + @Field(1) + public CredentialManagerAccount account; + @Field(2) + public CallerInfo caller; + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("CredentialManagerInvocationParams") + .field("account", account) + .field("caller", caller) + .end(); + } + + public static final Creator CREATOR = new AutoCreator<>(CredentialManagerInvocationParams.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 new file mode 100644 index 0000000..c74383e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java @@ -0,0 +1,17 @@ +/* + * 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 new file mode 100644 index 0000000..18f2177 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 0000000..ae68810 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.facs.cache; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class GetActivityControlsSettingsResult extends AbstractSafeParcelable { + @Field(value = 1) + public byte[] bytes; + + @Constructor + public GetActivityControlsSettingsResult(@Param(1) byte[] data) { + this.bytes = data; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(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 new file mode 100644 index 0000000..b89f861 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 0000000..4ef2c91 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java @@ -0,0 +1,13 @@ +/* + * 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/family/model/MemberDataModel.java b/play-services-api/src/main/java/com/google/android/gms/family/model/MemberDataModel.java new file mode 100644 index 0000000..500a509 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/family/model/MemberDataModel.java @@ -0,0 +1,79 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.family.model; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class MemberDataModel extends AbstractSafeParcelable { + @Field(1) + public String memberId = ""; + @Field(2) + public String email = ""; + @Field(3) + public String displayName = ""; + @Field(4) + public String hohGivenName = ""; + @Field(5) + public String profilePhotoUrl = ""; + @Field(6) + public String roleName = ""; + @Field(7) + public int role = 0; + @Field(8) + public boolean isActive = false; + @Field(9) + public int supervisionType = 0; + @Field(10) + public long timestamp = 0; + @Field(11) + public boolean isInviteEntry = false; + @Field(12) + public int inviteSlots = 0; + @Field(13) + public boolean isInvited = false; + @Field(14) + public String invitationId = ""; + @Field(15) + public long inviteState = 0; + @Field(16) + public String inviteSentDate = ""; + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(MemberDataModel.class); + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + @Override + public String toString() { + return "MemberDataModel{" + + "memberId='" + memberId + '\'' + + ", email='" + email + '\'' + + ", displayName='" + displayName + '\'' + + ", hohGivenName='" + hohGivenName + '\'' + + ", profilePhotoUrl='" + profilePhotoUrl + '\'' + + ", roleName='" + roleName + '\'' + + ", role=" + role + + ", isActive=" + isActive + + ", supervisionType=" + supervisionType + + ", timestamp=" + timestamp + + ", isInviteEntry=" + isInviteEntry + + ", inviteSlots=" + inviteSlots + + ", isInvited=" + isInvited + + ", invitationId='" + invitationId + '\'' + + ", inviteState=" + inviteState + + ", inviteSentDate='" + inviteSentDate + '\'' + + '}'; + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/family/v2/model/BulletPoint.java b/play-services-api/src/main/java/com/google/android/gms/family/v2/model/BulletPoint.java new file mode 100644 index 0000000..f1ef313 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/family/v2/model/BulletPoint.java @@ -0,0 +1,68 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.family.v2.model; + +import android.os.Parcel; +import android.os.Parcelable; + +import androidx.annotation.NonNull; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class BulletPoint implements Parcelable { + + public HashMap contentMap = new HashMap<>(); + + public BulletPoint() { + } + + public BulletPoint(HashMap contentMap) { + this.contentMap = contentMap; + } + + public BulletPoint(Parcel parcel) { + int readInt = parcel.readInt(); + for (int i = 0; i < readInt; i++) { + this.contentMap.put(parcel.readInt(), parcel.readString()); + } + } + + public final boolean equals(Object obj) { + return (obj instanceof BulletPoint) && ((BulletPoint) obj).contentMap.equals(this.contentMap); + } + + public final int hashCode() { + return Arrays.hashCode(new Object[]{this.contentMap}); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + dest.writeInt(this.contentMap.size()); + for (Map.Entry entry : this.contentMap.entrySet()) { + dest.writeInt((Integer) entry.getKey()); + dest.writeString((String) entry.getValue()); + } + } + + public static final Creator CREATOR = new Creator() { + @Override + public BulletPoint createFromParcel(Parcel source) { + return new BulletPoint(source); + } + + @Override + public BulletPoint[] newArray(int size) { + return new BulletPoint[size]; + } + }; +} diff --git a/play-services-api/src/main/java/com/google/android/gms/family/v2/model/HelpData.java b/play-services-api/src/main/java/com/google/android/gms/family/v2/model/HelpData.java new file mode 100644 index 0000000..21c1af7 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/family/v2/model/HelpData.java @@ -0,0 +1,45 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.family.v2.model; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class HelpData extends AbstractSafeParcelable { + @Field(1) + public String linkUrl; + @Field(2) + public String appContext; + + public HelpData() { + } + + public HelpData(String linkUrl, String appContext) { + this.linkUrl = linkUrl; + this.appContext = appContext; + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(HelpData.class); + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + @Override + public String toString() { + return "HelpData{" + + "linkUrl='" + linkUrl + '\'' + + ", appContext='" + appContext + '\'' + + '}'; + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/family/v2/model/PageData.java b/play-services-api/src/main/java/com/google/android/gms/family/v2/model/PageData.java new file mode 100644 index 0000000..5a0cb11 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/family/v2/model/PageData.java @@ -0,0 +1,61 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.family.v2.model; + +import android.os.Parcelable; + +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Objects; + +public class PageData extends AutoSafeParcelable { + @Field(1) + public int version = 1; + @Field(2) + public HashMap sectionMap = new HashMap<>(); + @Field(3) + public HashMap helpMap = new HashMap<>(); + @Field(4) + public ArrayList bulletPoints = new ArrayList<>(); + + public PageData() {} + + public PageData(HashMap sectionMap, HashMap helpMap, ArrayList bulletPoints) { + this.sectionMap = sectionMap; + this.helpMap = helpMap; + this.bulletPoints = bulletPoints; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (!(obj instanceof PageData)) return false; + PageData other = (PageData) obj; + return version == other.version && + Objects.equals(sectionMap, other.sectionMap) && + Objects.equals(helpMap, other.helpMap) && + Objects.equals(bulletPoints, other.bulletPoints); + } + + @Override + public int hashCode() { + return Objects.hash(version, sectionMap, helpMap, bulletPoints); + } + + @Override + public String toString() { + return "PageData{" + + "version=" + version + + ", sectionMap=" + sectionMap + + ", helpMap=" + helpMap + + ", bulletPoints=" + bulletPoints + + '}'; + } + + public static final Parcelable.Creator CREATOR = findCreator(PageData.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java b/play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java new file mode 100644 index 0000000..55d6d35 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java @@ -0,0 +1,163 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +import android.app.ApplicationErrorReport; +import android.graphics.Bitmap; +import android.graphics.RectF; +import android.os.Bundle; +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.data.BitmapTeleporter; +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import java.util.List; + +@SafeParcelable.Class +public class ErrorReport extends AbstractSafeParcelable { + @Field(2) + public ApplicationErrorReport applicationErrorReport; + @Field(3) + public String feedbackMsg; + @Field(4) + public int versionCode; + @Field(5) + public String versionName; + @Field(6) + public String mobileDevice; + @Field(7) + public String mobileDisplay; + @Field(8) + public String mobileType; + @Field(9) + public String mobileModel; + @Field(10) + public String mobileProduct; + @Field(11) + public String mobileFingerprint; + @Field(12) + public int mobileSdkInt; + @Field(13) + public String mobileRelease; + @Field(14) + public String mobileIncremental; + @Field(15) + public String mobileCodeName; + @Field(16) + public String mobileBoard; + @Field(17) + public String mobileBrand; + @Field(18) + public String[] unknownStringArray18; + @Field(19) + public String[] unknownStringArray19; + @Field(20) + public String[] unknownStringArray20; + @Field(21) + public String unknownString21; + @Field(22) + public String screenshotImgSrc; + @Field(23) + public byte[] screenshotImgData; + @Field(24) + public int screenshotHeight; + @Field(25) + public int screenshotWidth; + @Field(26) + public int phoneType; + @Field(27) + public int networkType; + @Field(28) + public String networkOperatorName; + @Field(29) + public String email; + @Field(30) + public String languageTag; + @Field(31) + public Bundle bundle; + @Field(32) + public boolean isFixedUri; + @Field(33) + public int mobileCountryCode; + @Field(34) + public int mobileNetworkCode; + @Field(35) + public boolean unknownBool35; + @Field(36) + public String exceptionClassName; + @Field(37) + public String throwFileName; + @Field(38) + public int throwLineNumber; + @Field(39) + public String throwClassName; + @Field(40) + public String throwMethodName; + @Field(41) + public String stackTrace; + @Field(42) + public String exceptionMessage; + @Field(43) + public String unknownString43; + @Field(44) + public String unknownString44; + @Field(45) + public String packageName; + @Field(46) + public BitmapTeleporter bitmapTeleporter; + @Field(47) + public String unknownString47; + @Field(48) + public FileTeleporter[] files; + @Field(49) + public String[] unknownByteArray49; + @Field(50) + public boolean unknownBool50; + @Field(51) + public String unknownString51; + @Field(52) + public ThemeSettings themeSettings; + @Field(53) + public LogOptions logOptions; + @Field(54) + public String unknownString54; + @Field(55) + public boolean unknownBool55; + @Field(56) + public Bundle bundleText; + @Field(57) + public List rectFS; + @Field(58) + public boolean unknownBool58; + @Field(59) + public Bitmap bitmap; + @Field(60) + public String unknownString60; + @Field(61) + public List camList; + @Field(62) + public int unknownInt62; + @Field(63) + public int unknownInt63; + @Field(64) + public String[] unknownStringArray64; + @Field(65) + public String[] unknownStringArray65; + @Field(66) + public String[] unknownStringArray66; + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(ErrorReport.class); + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java b/play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java new file mode 100644 index 0000000..679fe0f --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java @@ -0,0 +1,67 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +import android.app.ApplicationErrorReport; +import android.graphics.Bitmap; +import android.os.Bundle; +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.data.BitmapTeleporter; +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import java.util.List; + +@SafeParcelable.Class +public class FeedbackOptions extends AbstractSafeParcelable { + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FeedbackOptions.class); + + @Field(2) + public String unknownString2; + @Field(3) + public Bundle unknownBundle3; + @Field(5) + public String unknownString3; + @Field(6) + public ApplicationErrorReport applicationErrorReport; + @Field(7) + public String unknownString7; + @Field(8) + public BitmapTeleporter bitmapTeleporter; + @Field(9) + public String packageName; + @Field(10) + public List files; + @Field(11) + public boolean unknownBoolean11; + @Field(12) + public ThemeSettings themeSettings; + @Field(13) + public LogOptions logOptions; + @Field(14) + public boolean unknownBoolean14; + @Field(15) + public Bitmap screenshot; + @Field(16) + public String unknownString16; + @Field(17) + public boolean unknownBoolean17; + @Field(18) + public long unknownLong18; + @Field(19) + public boolean unknownBool19; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java b/play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java new file mode 100644 index 0000000..445200b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java @@ -0,0 +1,29 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class FileTeleporter extends AbstractSafeParcelable { + @Field(3) + public String contentType; + @Field(4) + public String content; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FileTeleporter.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java b/play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java new file mode 100644 index 0000000..ce1f820 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java @@ -0,0 +1,37 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class LogOptions extends AbstractSafeParcelable { + + @Field(2) + public String options; + @Field(3) + public boolean unknownBool3; + @Field(4) + public boolean unknownBool4; + @Field(5) + public boolean unknownBool5; + @Field(6) + public boolean unknownBool6; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LogOptions.class); + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/ThemeSettings.java b/play-services-api/src/main/java/com/google/android/gms/feedback/ThemeSettings.java new file mode 100644 index 0000000..3dee3f0 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/feedback/ThemeSettings.java @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.feedback; + +import androidx.annotation.NonNull; +import org.microg.gms.utils.ToStringHelper; +import org.microg.safeparcel.AutoSafeParcelable; + +public class ThemeSettings extends AutoSafeParcelable { + @Field(2) + public int unknownInt2; + @Field(3) + public int unknownInt3; + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("ThemeSettings") + .field("2", unknownInt2) + .field("3", unknownInt3) + .end(); + } + + public static final Creator CREATOR = findCreator(ThemeSettings.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java b/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java new file mode 100644 index 0000000..6666968 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java @@ -0,0 +1,32 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.gass.internal; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class GassRequestParcel extends AbstractSafeParcelable { + + @Field(1) + public int versionCode; + @Field(2) + public String packageName; + @Field(3) + public String appVersionCode; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GassRequestParcel.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java b/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java new file mode 100644 index 0000000..34e2c61 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java @@ -0,0 +1,49 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.gass.internal; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; +import com.google.android.gms.feedback.ErrorReport; + +@SafeParcelable.Class +public class GassResponseParcel extends AbstractSafeParcelable { + + @Field(1) + public int versionCode; + + @Field(2) + public byte[] data; + + public ErrorReport report; + + public GassResponseParcel() { + } + + public GassResponseParcel(int i, byte[] bArr) { + this.versionCode = i; + this.report = null; + this.data = bArr; + } + + public GassResponseParcel(ErrorReport report) { + this.versionCode = 1; + this.report = report; + this.data = null; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GassResponseParcel.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/FRDProductSpecificDataEntry.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/FRDProductSpecificDataEntry.java new file mode 100644 index 0000000..cf3bfd4 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/FRDProductSpecificDataEntry.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class FRDProductSpecificDataEntry extends AutoSafeParcelable { + public static final Creator CREATOR = findCreator(FRDProductSpecificDataEntry.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/GoogleHelp.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/GoogleHelp.java new file mode 100644 index 0000000..d189a2a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/GoogleHelp.java @@ -0,0 +1,131 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp; + +import android.accounts.Account; +import android.app.PendingIntent; +import android.graphics.Bitmap; +import android.net.Uri; +import android.os.Bundle; +import androidx.annotation.NonNull; +import com.google.android.gms.feedback.ErrorReport; +import com.google.android.gms.feedback.ThemeSettings; +import com.google.android.gms.googlehelp.internal.common.OverflowMenuItem; +import com.google.android.gms.googlehelp.internal.common.TogglingData; +import org.microg.gms.utils.ToStringHelper; +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.List; + +public class GoogleHelp extends AutoSafeParcelable { + @Field(1) + private int versionCode; + @Field(2) + public String appContext; + @Field(3) + public Account account; + @Field(4) + public Bundle extras; + @Field(5) + public boolean unknownBool5; + @Field(6) + public boolean unknownBool6; + @Field(7) + public List unknownStringList7; + @Field(15) + public Uri uri; + @Field(16) + public List overflowMenuItems; + @Field(17) + public int unknownAlwaysZero17; + @Field(18) + public List offlineSuggestions; + @Field(20) + public int unknownInt20; + @Field(21) + public int unknownInt21; + @Field(22) + public boolean unknownBool22; + @Field(23) + public ErrorReport errorReport; + @Field(25) + public ThemeSettings themeSettings; + @Field(28) + public String appPackageName; + @Field(31) + public TogglingData togglingData; + @Field(32) + public int unknownInt32; + @Field(33) + public PendingIntent customFeedbackPendingIntent; + @Field(34) + public String title; + @Field(35) + public Bitmap icon; + @Field(36) + public int unknownInt36; + @Field(37) + public boolean unknownBool37; + @Field(38) + public boolean unknownBool38; + @Field(39) + public int timeout; + @Field(40) + public String sessionId; + @Field(41) + public boolean unknownBool41; + @Field(42) + public String clientPackageName; + @Field(43) + public boolean unknownBool43; + @Field(44) + public ND4CSettings nd4CSettings; + @Field(45) + public boolean unknownBool45; + @Field(46) + public List productSpecificDataEntries; + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("GoogleHelp") + .field("appContext", appContext) + .field("account", account) + .field("extras", extras) + .field("5", unknownBool5) + .field("6", unknownBool6) + .field("7", unknownStringList7) + .field("uri", uri) + .field("overflowMenuItems", overflowMenuItems) + .field("17", unknownAlwaysZero17) + .field("offlineSuggestions", offlineSuggestions) + .field("20", unknownInt20) + .field("21", unknownInt21) + .field("22", unknownBool22) + .field("errorReport", errorReport) + .field("themeSettings", themeSettings) + .field("appPackageName", appPackageName) + .field("togglingData", togglingData) + .field("32", unknownInt32) + .field("customFeedbackPendingIntent", customFeedbackPendingIntent) + .field("title", title) + .field("icon", icon) + .field("36", unknownInt36) + .field("37", unknownBool37) + .field("38", unknownBool38) + .field("timeout", timeout) + .field("sessionId", sessionId) + .field("41", unknownBool41) + .field("clientPackageName", clientPackageName) + .field("43", unknownBool43) + .field("nd4CSettings", nd4CSettings) + .field("45", unknownBool45) + .field("productSpecificDataEntries", productSpecificDataEntries) + .end(); + } + + public static final Creator CREATOR = findCreator(GoogleHelp.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/InProductHelp.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/InProductHelp.java new file mode 100644 index 0000000..141a168 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/InProductHelp.java @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class InProductHelp extends AutoSafeParcelable { + @Field(1) + public GoogleHelp googleHelp; + public static final Creator CREATOR = findCreator(InProductHelp.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/ND4CSettings.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/ND4CSettings.java new file mode 100644 index 0000000..c16a0e1 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/ND4CSettings.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ND4CSettings extends AutoSafeParcelable { + public static final Creator CREATOR = findCreator(ND4CSettings.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/OfflineSuggestion.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/OfflineSuggestion.java new file mode 100644 index 0000000..952164a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/OfflineSuggestion.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class OfflineSuggestion extends AutoSafeParcelable { + public static final Creator CREATOR = findCreator(OfflineSuggestion.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/SupportRequestHelp.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/SupportRequestHelp.java new file mode 100644 index 0000000..4fd8d35 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/SupportRequestHelp.java @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class SupportRequestHelp extends AutoSafeParcelable { + @Field(1) + public GoogleHelp googleHelp; + @Field(4) + public String phoneNumber; + + public static final Creator CREATOR = findCreator(SupportRequestHelp.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/internal/common/OverflowMenuItem.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/internal/common/OverflowMenuItem.java new file mode 100644 index 0000000..e966f7c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/internal/common/OverflowMenuItem.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp.internal.common; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class OverflowMenuItem extends AutoSafeParcelable { + public static final Creator CREATOR = findCreator(OverflowMenuItem.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/googlehelp/internal/common/TogglingData.java b/play-services-api/src/main/java/com/google/android/gms/googlehelp/internal/common/TogglingData.java new file mode 100644 index 0000000..f2e21c8 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/googlehelp/internal/common/TogglingData.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.googlehelp.internal.common; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class TogglingData extends AutoSafeParcelable { + public static final Creator CREATOR = findCreator(TogglingData.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 new file mode 100644 index 0000000..d909cbf --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/identity/accounts/api/AccountData.java @@ -0,0 +1,20 @@ +/* + * 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 new file mode 100644 index 0000000..b9770e3 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/CountrySpecification.java @@ -0,0 +1,20 @@ +/* + * 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 new file mode 100644 index 0000000..aa3959f --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/identity/intents/model/UserAddress.java @@ -0,0 +1,20 @@ +/* + * 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/languageprofile/ClientLanguageSettings.java b/play-services-api/src/main/java/com/google/android/gms/languageprofile/ClientLanguageSettings.java new file mode 100644 index 0000000..6494728 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/languageprofile/ClientLanguageSettings.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.languageprofile; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ClientLanguageSettings extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(ClientLanguageSettings.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguageFluency.java b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguageFluency.java new file mode 100644 index 0000000..40058ee --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguageFluency.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.languageprofile; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LanguageFluency extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(LanguageFluency.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguageFluencyParams.java b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguageFluencyParams.java new file mode 100644 index 0000000..0c022ac --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguageFluencyParams.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.languageprofile; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LanguageFluencyParams extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(LanguageFluencyParams.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguagePreference.java b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguagePreference.java new file mode 100644 index 0000000..a9f7eb3 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguagePreference.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.languageprofile; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LanguagePreference extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(LanguagePreference.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguagePreferenceParams.java b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguagePreferenceParams.java new file mode 100644 index 0000000..6b599a8 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/languageprofile/LanguagePreferenceParams.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.languageprofile; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LanguagePreferenceParams extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(LanguagePreferenceParams.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/IneligibilityRationale.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/IneligibilityRationale.java new file mode 100644 index 0000000..2184aad --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/IneligibilityRationale.java @@ -0,0 +1,47 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class IneligibilityRationale extends AbstractSafeParcelable { + @Field(1) + public final String unknownStr1; + @Field(2) + public final boolean unknownBool2; + @Field(3) + public final String unknownStr3; + @Field(4) + public final boolean unknownBool4; + @Field(5) + public final boolean unknownBool5; + @Field(6) + public final boolean unknownBool6; + + @Constructor + public IneligibilityRationale(@Param(1) String unknownStr1, @Param(2) boolean unknownBool2, @Param(3) String unknownStr3, + @Param(4) boolean unknownBool4, @Param(5) boolean unknownBool5, @Param(6) boolean unknownBool6) { + this.unknownStr1 = unknownStr1; + this.unknownBool2 = unknownBool2; + this.unknownStr3 = unknownStr3; + this.unknownBool4 = unknownBool4; + this.unknownBool5 = unknownBool5; + this.unknownBool6 = unknownBool6; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(IneligibilityRationale.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationCollectionReason.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationCollectionReason.java new file mode 100644 index 0000000..d71ec7e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationCollectionReason.java @@ -0,0 +1,40 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + + +@SafeParcelable.Class +public class LocationCollectionReason extends AbstractSafeParcelable { + @Field(1) + public final int locationCollectionReason; + + @Constructor + public LocationCollectionReason(@Param(1) int locationCollectionReason) { + this.locationCollectionReason = locationCollectionReason; + } + + @NonNull + @Override + public String toString() { + return "LocationCollectionReason{" + + "locationCollectionReason=" + locationCollectionReason + + '}'; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationCollectionReason.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationReportingStatus.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationReportingStatus.java new file mode 100644 index 0000000..e476911 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationReportingStatus.java @@ -0,0 +1,41 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + + +@SafeParcelable.Class +public class LocationReportingStatus extends AbstractSafeParcelable { + @Field(1) + public final int unknownInt1; + @Field(2) + public final int unknownInt2; + @Field(3) + public final boolean unknownBool3; + @Field(4) + public final IneligibilityRationale ineligibilityRationale; + + @Constructor + public LocationReportingStatus(@Param(1) int unknownInt1, @Param(2) int unknownInt2, @Param(3) boolean unknownBool3, @Param(4) IneligibilityRationale ineligibilityRationale0) { + this.unknownInt1 = unknownInt1; + this.unknownInt2 = unknownInt2; + this.unknownBool3 = unknownBool3; + this.ineligibilityRationale = ineligibilityRationale0; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationReportingStatus.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationShare.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationShare.java new file mode 100644 index 0000000..5882039 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationShare.java @@ -0,0 +1,46 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class LocationShare extends AbstractSafeParcelable { + @Field(1) + public final int locationShareType; + @Field(2) + public final String tokenId; + @Field(3) + public final String obfuscatedGaiaId; + + @Constructor + public LocationShare(@Param(1) int locationShareType, @Param(2) String tokenId, @Param(3) String obfuscatedGaiaId) { + this.locationShareType = locationShareType; + this.tokenId = tokenId; + this.obfuscatedGaiaId = obfuscatedGaiaId; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationShare.class); + + @Override + public String toString() { + return "LocationShare{" + + "locationShareType=" + locationShareType + + ", tokenId=" + (tokenId != null ? "\"" + tokenId + "\"" : "null") + + ", obfuscatedGaiaId=" + (obfuscatedGaiaId != null ? "\"" + obfuscatedGaiaId + "\"" : "null") + + '}'; + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationUploadRequest.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationUploadRequest.java new file mode 100644 index 0000000..f5c7858 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationUploadRequest.java @@ -0,0 +1,63 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class LocationUploadRequest extends AbstractSafeParcelable { + @Field(1) + public final long accuracyMeters; + @Field(2) + public final int numberOfFix; + @Field(3) + public final long intervalMillis; + @Field(4) + public final long fastIntervalMillis; + @Field(5) + public final long expirationMillis; + @Field(6) + public final LocationCollectionReason locationCollectionReason; + @Field(7) + public final boolean unknownBool7; + @Field(8) + public final boolean throttleExempt; + @Field(9) + public final String moduleId; + @Field(10) + public final String unknownString10; + @Field(11) + public final long unknownLong11; + + @Constructor + public LocationUploadRequest(@Param(1) long accuracyMeters, @Param(2) int numberOfFix, @Param(3) long intervalMillis, @Param(4) long fastIntervalMillis, + @Param(5) long expirationMillis, @Param(6) LocationCollectionReason locationCollectionReason, + @Param(7) boolean unknownBool7, @Param(8) boolean throttleExempt, @Param(9) String moduleId, @Param(10) String unknownString10, @Param(11) long unknownLong11) { + this.accuracyMeters = accuracyMeters; + this.numberOfFix = numberOfFix; + this.intervalMillis = intervalMillis; + this.fastIntervalMillis = fastIntervalMillis; + this.expirationMillis = expirationMillis; + this.locationCollectionReason = locationCollectionReason; + this.unknownBool7 = unknownBool7; + this.throttleExempt = throttleExempt; + this.moduleId = moduleId; + this.unknownString10 = unknownString10; + this.unknownLong11 = unknownLong11; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationUploadRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationUploadResponse.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationUploadResponse.java new file mode 100644 index 0000000..4d452ea --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/LocationUploadResponse.java @@ -0,0 +1,34 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class LocationUploadResponse extends AbstractSafeParcelable { + @Field(1) + public final int unknownInt1; + @Field(2) + public final LocationReportingStatus locationReportingStatus; + + @Constructor + public LocationUploadResponse(@Param(1) int unknownInt1, @Param(2) LocationReportingStatus locationReportingStatus) { + this.unknownInt1 = unknownInt1; + this.locationReportingStatus = locationReportingStatus; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationUploadResponse.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/NoticeAckedUpdateRequest.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/NoticeAckedUpdateRequest.java new file mode 100644 index 0000000..7d1e01b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/NoticeAckedUpdateRequest.java @@ -0,0 +1,39 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class NoticeAckedUpdateRequest extends AbstractSafeParcelable { + @Field(1) + public final int isConfirmed; + + @Constructor + public NoticeAckedUpdateRequest(@Param(1) int isConfirmed) { + this.isConfirmed = isConfirmed; + } + + @NonNull + @Override + public final String toString() { + return "NoticeAckedUpdateRequest{" + + "isConfirmed=" + isConfirmed + + '}'; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(NoticeAckedUpdateRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/PeriodicLocationReportingIssues.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/PeriodicLocationReportingIssues.java new file mode 100644 index 0000000..fa02a27 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/PeriodicLocationReportingIssues.java @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Bundle; +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import java.util.Arrays; + +@SafeParcelable.Class +public class PeriodicLocationReportingIssues extends AbstractSafeParcelable { + @Field(1) + private final int[] generalIssues; + @Field(2) + private final Bundle issuesByAccount; + @Field(4) + private final boolean isCentralizedSharingFlagEnabled; + + @Constructor + public PeriodicLocationReportingIssues(@Param(1) int[] generalIssues, @Param(2) Bundle issuesByAccount, @Param(4) boolean isCentralizedSharingFlagEnabled) { + this.generalIssues = generalIssues; + this.issuesByAccount = issuesByAccount; + this.isCentralizedSharingFlagEnabled = isCentralizedSharingFlagEnabled; + } + + @NonNull + @Override + public final String toString() { + return "PeriodicLocationReportingIssues{generalIssues=" + Arrays.toString(this.generalIssues) + + ", issuesByAccount=" + this.issuesByAccount + ", isCentralizedSharingFlagEnabled=" + + this.isCentralizedSharingFlagEnabled + "}"; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PeriodicLocationReportingIssues.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/PeriodicLocationUploadRequest.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/PeriodicLocationUploadRequest.java new file mode 100644 index 0000000..d9cc17d --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/PeriodicLocationUploadRequest.java @@ -0,0 +1,50 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class PeriodicLocationUploadRequest extends AbstractSafeParcelable { + @Field(1) + public final LocationCollectionReason locationCollectionReason; + @Field(2) + public final LocationShare locationShare; + @Field(3) + public final int makePrimaryOption; + @Field(4) + public final long duration; + @Field(5) + public final boolean unknownBool5; + @Field(6) + public final String unknownStr6; + @Field(7) + public final boolean unknownBool7; + + @Constructor + public PeriodicLocationUploadRequest(@Param(1) LocationCollectionReason locationCollectionReason, @Param(2) LocationShare locationShare, + @Param(3) int makePrimaryOption, @Param(4) long duration, @Param(5) boolean unknownBool5, @Param(6) String unknownStr6, @Param(7) boolean unknownBool7) { + this.locationCollectionReason = locationCollectionReason; + this.locationShare = locationShare; + this.makePrimaryOption = makePrimaryOption; + this.duration = duration; + this.unknownBool5 = unknownBool5; + this.unknownStr6 = unknownStr6; + this.unknownBool7 = unknownBool7; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PeriodicLocationUploadRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/StartLocationReportingRequest.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/StartLocationReportingRequest.java new file mode 100644 index 0000000..8c2af87 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/StartLocationReportingRequest.java @@ -0,0 +1,56 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class StartLocationReportingRequest extends AbstractSafeParcelable { + @Field(1) + public final int makePrimary; + @Field(2) + public final int reportingType; + @Field(3) + public final LocationShare locationShare; + @Field(4) + public final long requestDurationMs; + @Field(5) + public final NoticeAckedUpdateRequest noticeAckedUpdateRequest; + + @Constructor + public StartLocationReportingRequest(@Param(1) int makePrimary, @Param(2) int reportingType, @Param(3) LocationShare locationShare, + @Param(4) long requestDurationMs, @Param(5) NoticeAckedUpdateRequest noticeAckedUpdateRequest) { + this.makePrimary = makePrimary; + this.reportingType = reportingType; + this.requestDurationMs = requestDurationMs; + this.locationShare = locationShare; + this.noticeAckedUpdateRequest = noticeAckedUpdateRequest; + } + + @NonNull + @Override + public final String toString() { + return "StartLocationReportingRequest{" + + "makePrimary=" + makePrimary + + ", reportingType=" + reportingType + + ", locationShare=" + locationShare + + ", requestDurationMs=" + requestDurationMs + + ", noticeAckedUpdateRequest=" + noticeAckedUpdateRequest + + '}'; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(StartLocationReportingRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/StopLocationReportingRequest.java b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/StopLocationReportingRequest.java new file mode 100644 index 0000000..da3440b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/locationsharingreporter/StopLocationReportingRequest.java @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.locationsharingreporter; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class StopLocationReportingRequest extends AbstractSafeParcelable { + @Field(1) + public final LocationShare locationShare; + @Constructor + public StopLocationReportingRequest(@Param(1) LocationShare locationShare) { + this.locationShare = locationShare; + } + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(StopLocationReportingRequest.class); + + @Override + public String toString() { + return "StopLocationReportingRequest{" + + "locationShare=" + (locationShare != null ? locationShare.toString() : "null") + + '}'; + } +} 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 new file mode 100644 index 0000000..ad2c505 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java @@ -0,0 +1,79 @@ +/* + * 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 googleVersion; + @Field(7) + private long devCertHash; + @Field(8) + private String healthMonitor; + @Field(9) + private boolean measurementEnabled = true; + @Field(10) + private boolean firstOpen; + @Field(11) + public long versionCode = Integer.MIN_VALUE; + @Field(12) + public String firebaseInstanceId; + @Field(13) + private long androidId; + @Field(14) + private long instantiationTime; + @Field(15) + public int appType; + @Field(16) + private boolean adIdReportingEnabled = true; + @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 dynamiteVersion; + @Field(23) + public List safelistedEvents; + @Field(24) + public String gaAppId; + @Field(25) + private String consentSettings = ""; + @Field(26) + public String ephemeralAppInstanceId = ""; + @Field(27) + private String sessionStitchingToken; + @Field(28) + private boolean sgtmUploadEnabled = false; + @Field(29) + private long targetOsVersion; + @Field(30) + private int consentSource = 100; + @Field(31) + private String dmaConsent = ""; + @Field(32) + private int adServicesVersion; + + 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 new file mode 100644 index 0000000..108c8ef --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/ConditionalUserPropertyParcel.java @@ -0,0 +1,35 @@ +/* + * 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 new file mode 100644 index 0000000..54de139 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParams.java @@ -0,0 +1,17 @@ +/* + * 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 new file mode 100644 index 0000000..7b5b617 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/EventParcel.java @@ -0,0 +1,21 @@ +/* + * 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 new file mode 100644 index 0000000..a2c03ed --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/UserAttributeParcel.java @@ -0,0 +1,35 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.measurement.internal; + +import androidx.annotation.Nullable; +import org.microg.safeparcel.AutoSafeParcelable; + +public class UserAttributeParcel extends AutoSafeParcelable { + @Field(1) + public int versionCode = 2; + @Field(2) + public String name; + @Field(3) + public long timestamp; + @Field(4) + @Nullable + public Long longValue; + @Deprecated + @Field(5) + @Nullable + public Float floatValue; + @Field(6) + @Nullable + public String stringValue; + @Field(7) + public String field7; + @Field(8) + @Nullable + public Double doubleValue; + + 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 new file mode 100644 index 0000000..61180fd --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java @@ -0,0 +1,36 @@ +/* + * 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 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 new file mode 100644 index 0000000..814a657 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java @@ -0,0 +1,40 @@ +/* + * 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 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 new file mode 100644 index 0000000..b03af38 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java @@ -0,0 +1,34 @@ +/* + * 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/phenotype/Configurations.java b/play-services-api/src/main/java/com/google/android/gms/phenotype/Configurations.java new file mode 100644 index 0000000..9d91f78 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/phenotype/Configurations.java @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.phenotype; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class Configurations extends AutoSafeParcelable { + @Field(2) + public String snapshotToken; + @Field(3) + public String serverToken; + @Field(4) + public Configuration[] field4; + @Field(5) + public boolean field5; + @Field(6) + public byte[] field6; + @Field(7) + public long version; + + public static final Creator CREATOR = new AutoCreator<>(Configurations.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/phenotype/DogfoodsToken.java b/play-services-api/src/main/java/com/google/android/gms/phenotype/DogfoodsToken.java new file mode 100644 index 0000000..917d375 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/phenotype/DogfoodsToken.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.phenotype; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class DogfoodsToken extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(DogfoodsToken.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/phenotype/FlagOverrides.java b/play-services-api/src/main/java/com/google/android/gms/phenotype/FlagOverrides.java new file mode 100644 index 0000000..dca1216 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/phenotype/FlagOverrides.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.phenotype; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class FlagOverrides extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator<>(FlagOverrides.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java b/play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java new file mode 100644 index 0000000..7b9f6cd --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java @@ -0,0 +1,27 @@ +/* + * SPDX-FileCopyrightText: 2021 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.phenotype; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class RegistrationInfo extends AutoSafeParcelable { + @Field(1) + public String packageName; + @Field(2) + public int version; + @Field(3) + public String[] field3; + @Field(4) + public byte[] field4; + @Field(5) + public boolean weak; + @Field(6) + public int[] field6; + @Field(7) + public String clientPackageName; + + public static final Creator CREATOR = new AutoCreator<>(RegistrationInfo.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/internal/PlusCommonExtras.java b/play-services-api/src/main/java/com/google/android/gms/plus/internal/PlusCommonExtras.java new file mode 100644 index 0000000..72d908e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/internal/PlusCommonExtras.java @@ -0,0 +1,20 @@ +/* + * 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.plus.internal; + +public class PlusCommonExtras { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/internal/PlusSession.java b/play-services-api/src/main/java/com/google/android/gms/plus/internal/PlusSession.java new file mode 100644 index 0000000..b5b3f8a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/internal/PlusSession.java @@ -0,0 +1,20 @@ +/* + * 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.plus.internal; + +public class PlusSession { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java new file mode 100644 index 0000000..aee4d0b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java @@ -0,0 +1,20 @@ +/* + * 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.plus.internal.model.smart_profile; + +public class CardsRequest { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java new file mode 100644 index 0000000..bf6c967 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java @@ -0,0 +1,20 @@ +/* + * 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.plus.internal.model.smart_profile; + +public class CardsResponse { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java new file mode 100644 index 0000000..c45512d --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java @@ -0,0 +1,20 @@ +/* + * 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.plus.internal.model.smart_profile; + +public class PeopleForProfilesRequest { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java new file mode 100644 index 0000000..4c108aa --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java @@ -0,0 +1,20 @@ +/* + * 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.plus.internal.model.smart_profile; + +public class PeopleForProfilesResponse { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Comment.java b/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Comment.java new file mode 100644 index 0000000..37a215c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Comment.java @@ -0,0 +1,20 @@ +/* + * 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.plus.model.posts; + +public class Comment { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Post.java b/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Post.java new file mode 100644 index 0000000..3b9c346 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Post.java @@ -0,0 +1,20 @@ +/* + * 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.plus.model.posts; + +public class Post { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Settings.java b/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Settings.java new file mode 100644 index 0000000..a7045a3 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/plus/model/posts/Settings.java @@ -0,0 +1,20 @@ +/* + * 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.plus.model.posts; + +public class Settings { +} diff --git a/play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java b/play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java new file mode 100644 index 0000000..9f5a3f4 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java @@ -0,0 +1,20 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.potokens; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class PoToken extends AutoSafeParcelable { + + @Field(1) + public byte[] data; + + public PoToken(byte[] data) { + this.data = data; + } + + public static Creator CREATOR = findCreator(PoToken.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java b/play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java new file mode 100644 index 0000000..18df15c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java @@ -0,0 +1,34 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.pseudonymous; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class PseudonymousIdToken extends AbstractSafeParcelable { + + @Field(2) + public String name; + + @Constructor + public PseudonymousIdToken(@Param(2) String name) { + this.name = name; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PseudonymousIdToken.class); + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java b/play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java new file mode 100644 index 0000000..4ad0101 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/AccountState.java @@ -0,0 +1,23 @@ +/* + * 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.reminders; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class AccountState extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(AccountState.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java b/play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java new file mode 100644 index 0000000..cc0d81c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/CreateReminderOptionsInternal.java @@ -0,0 +1,23 @@ +/* + * 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.reminders; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class CreateReminderOptionsInternal extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(CreateReminderOptionsInternal.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java b/play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java new file mode 100644 index 0000000..fd69c55 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/LoadRemindersOptions.java @@ -0,0 +1,23 @@ +/* + * 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.reminders; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class LoadRemindersOptions extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(LoadRemindersOptions.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java b/play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java new file mode 100644 index 0000000..e6a4eba --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/ReindexDueDatesOptions.java @@ -0,0 +1,23 @@ +/* + * 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.reminders; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ReindexDueDatesOptions extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(ReindexDueDatesOptions.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java b/play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java new file mode 100644 index 0000000..ae70874 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/UpdateRecurrenceOptions.java @@ -0,0 +1,23 @@ +/* + * 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.reminders; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class UpdateRecurrenceOptions extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(UpdateRecurrenceOptions.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java b/play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java new file mode 100644 index 0000000..29ee864 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/model/CustomizedSnoozePresetEntity.java @@ -0,0 +1,23 @@ +/* + * 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.reminders.model; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class CustomizedSnoozePresetEntity extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(CustomizedSnoozePresetEntity.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java b/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java new file mode 100644 index 0000000..4062335 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskEntity.java @@ -0,0 +1,23 @@ +/* + * 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.reminders.model; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class TaskEntity extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(TaskEntity.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java b/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java new file mode 100644 index 0000000..1816b1f --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/reminders/model/TaskIdEntity.java @@ -0,0 +1,23 @@ +/* + * 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.reminders.model; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class TaskIdEntity extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(TaskIdEntity.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 new file mode 100644 index 0000000..8e91b86 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java @@ -0,0 +1,23 @@ +/* + * 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 new file mode 100644 index 0000000..2da1509 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java @@ -0,0 +1,23 @@ +/* + * 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 new file mode 100644 index 0000000..051a533 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java @@ -0,0 +1,48 @@ +/* + * 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 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 new file mode 100644 index 0000000..2611d67 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java @@ -0,0 +1,47 @@ +/* + * 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 new file mode 100644 index 0000000..4fa3396 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java @@ -0,0 +1,53 @@ +/* + * 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 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 new file mode 100644 index 0000000..cf25d6a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java @@ -0,0 +1,46 @@ +/* + * 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 new file mode 100644 index 0000000..6cc364e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsRequest.java @@ -0,0 +1,28 @@ +/* + * 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 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 new file mode 100644 index 0000000..6fa3ef7 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/GetCurrentExperimentIdsResponse.java @@ -0,0 +1,57 @@ +/* + * 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 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 new file mode 100644 index 0000000..6c06261 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesRequest.java @@ -0,0 +1,39 @@ +/* + * 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 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 new file mode 100644 index 0000000..3aa8e3b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/GetGlobalSearchSourcesResponse.java @@ -0,0 +1,59 @@ +/* + * 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 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 new file mode 100644 index 0000000..3df0a0c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsRequest.java @@ -0,0 +1,28 @@ +/* + * 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 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 new file mode 100644 index 0000000..cd98184 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/GetPendingExperimentIdsResponse.java @@ -0,0 +1,57 @@ +/* + * 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 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 new file mode 100644 index 0000000..dd6982f --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsRequest.java @@ -0,0 +1,45 @@ +/* + * 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 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 new file mode 100644 index 0000000..17fb679 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/SetExperimentIdsResponse.java @@ -0,0 +1,49 @@ +/* + * 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 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 new file mode 100644 index 0000000..4e4fe7b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchRequest.java @@ -0,0 +1,47 @@ +/* + * 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 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 new file mode 100644 index 0000000..c967103 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/global/SetIncludeInGlobalSearchResponse.java @@ -0,0 +1,49 @@ +/* + * 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 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 new file mode 100644 index 0000000..b3f42a2 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java @@ -0,0 +1,57 @@ +/* + * 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 new file mode 100644 index 0000000..a3f1ce5 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java @@ -0,0 +1,47 @@ +/* + * 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 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/semanticlocation/PlaceCandidate.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/PlaceCandidate.java new file mode 100644 index 0000000..170f573 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/PlaceCandidate.java @@ -0,0 +1,138 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocation; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class PlaceCandidate extends AbstractSafeParcelable { + + @Field(1) + public Identifier identifier; + @Field(2) + public int confidence; + @Field(3) + public float distance; + @Field(4) + public float accuracy; + @Field(5) + public Point point; + @Field(6) + public boolean isLocationCandidate; + @Field(7) + public boolean isLocationCandidateVerified; + @Field(8) + public double latitude; + + public PlaceCandidate() { + } + + @Constructor + public PlaceCandidate(@Param(1) Identifier identifier, @Param(2) int confidence, @Param(3) float distance, @Param(4) float accuracy, @Param(5) Point point, @Param(6) boolean isLocationCandidate, @Param(7) boolean isLocationCandidateVerified, @Param(8) double latitude){ + this.identifier = identifier; + this.confidence = confidence; + this.distance = distance; + this.accuracy = accuracy; + this.point = point; + this.isLocationCandidate = isLocationCandidate; + this.isLocationCandidateVerified = isLocationCandidateVerified; + this.latitude = latitude; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PlaceCandidate.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("PlaceCandidate") + .field("identifier", identifier) + .field("confidence", confidence) + .field("distance", distance) + .field("accuracy", accuracy) + .field("point", point) + .field("isLocationCandidate", isLocationCandidate) + .field("isLocationCandidateVerified", isLocationCandidateVerified) + .field("latitude", latitude) + .end(); + } + + public static class Identifier extends AbstractSafeParcelable { + @Field(1) + public Long start; + @Field(2) + public Long end; + + public Identifier() { + } + + @Constructor + public Identifier(@Param(1) Long start, @Param(1) Long end) { + this.start = start; + this.end = end; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(Identifier.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("PlaceCandidate.Identifier") + .field("start", start) + .field("end", end) + .end(); + } + } + + public static class Point extends AbstractSafeParcelable { + @Field(1) + public int pointX; + @Field(2) + public int pointY; + + public Point() { + } + + @Constructor + public Point(@Param(1) int pointX, @Param(1) int pointY) { + this.pointX = pointX; + this.pointY = pointY; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(Point.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("PlaceCandidate.Point") + .field("pointX", pointX) + .field("pointY", pointY) + .end(); + } + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java new file mode 100644 index 0000000..65ee137 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java @@ -0,0 +1,32 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocation; + + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class SemanticLocationEventRequest extends AbstractSafeParcelable { + @Field(1) + public final float position; + + @Constructor + public SemanticLocationEventRequest(@Param(1) float position) { + this.position = position; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SemanticLocationEventRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java new file mode 100644 index 0000000..3dc753e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package com.google.android.gms.semanticlocation.internal; + +import android.accounts.Account; +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class SemanticLocationParameters extends AbstractSafeParcelable { + @Field(1) + public final Account account; + @Field(2) + public final String clientIdentifier; + @Field(3) + public final String packageName; + + @Constructor + public SemanticLocationParameters(@Param(1) Account account, @Param(2) String clientIdentifier, @Param(3) String packageName) { + this.account = account; + this.clientIdentifier = clientIdentifier; + this.packageName = packageName; + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SemanticLocationParameters.class); + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FieldMask.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FieldMask.java new file mode 100644 index 0000000..511c453 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FieldMask.java @@ -0,0 +1,46 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +import java.util.List; + +@SafeParcelable.Class +public class FieldMask extends AbstractSafeParcelable { + + @Field(1) + public List list; + + public FieldMask() { + } + + @Constructor + public FieldMask(@Param(1) List list) { + this.list = list; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FieldMask.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("FieldMask").field("list", list).end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FrequentPlace.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FrequentPlace.java new file mode 100644 index 0000000..2cf4555 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FrequentPlace.java @@ -0,0 +1,93 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; +import com.google.android.gms.semanticlocation.PlaceCandidate; + +import org.microg.gms.utils.ToStringHelper; + +import java.util.List; + +@SafeParcelable.Class +public class FrequentPlace extends AbstractSafeParcelable { + + @Field(1) + public PlaceCandidate.Identifier identifier; + @Field(2) + public PlaceCandidate.Point point; + @Field(3) + public int type; + @Field(4) + public FrequentPlaceMetadata placeMetadata; + @Field(5) + public List keys; + + public FrequentPlace() { + } + + @Constructor + public FrequentPlace(@Param(1) PlaceCandidate.Identifier identifier, @Param(2) PlaceCandidate.Point point, @Param(3) int type, @Param(4) FrequentPlaceMetadata placeMetadata, @Param(5) List keys){ + this.identifier = identifier; + this.point = point; + this.type = type; + this.placeMetadata = placeMetadata; + this.keys = keys; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FrequentPlace.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("FrequentPlace") + .field("identifier", identifier) + .field("point", point) + .field("type", type) + .field("placeMetadata", placeMetadata) + .field("keys", keys) + .end(); + } + + public static class FrequentPlaceMetadata extends AbstractSafeParcelable { + @Field(1) + public long timestamp; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FrequentPlace.FrequentPlaceMetadata.class); + + public FrequentPlaceMetadata() {} + + @Constructor + public FrequentPlaceMetadata(@Param(1) long timestamp) { + this.timestamp = timestamp; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("FrequentPlace.FrequentPlaceMetadata") + .field("timestamp", timestamp) + .end(); + } + } + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FrequentTrip.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FrequentTrip.java new file mode 100644 index 0000000..ccacd1a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/FrequentTrip.java @@ -0,0 +1,127 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; +import com.google.android.gms.semanticlocation.PlaceCandidate; + +import org.microg.gms.utils.ToStringHelper; + +import java.util.List; + +@SafeParcelable.Class +public class FrequentTrip extends AbstractSafeParcelable { + + @Field(1) + public List identifierList; + @Field(2) + public Metadata placeMetadata; + @Field(3) + public List keys; + @Field(4) + public List modeDistributionList; + @Field(5) + public int type; + @Field(6) + public int tripType; + @Field(7) + public int tripMode; + @Field(8) + public float distance; + @Field(9) + public int distanceUnit; + + public FrequentTrip() { + } + + @Constructor + public FrequentTrip(@Param(1) List identifierList, @Param(2) Metadata placeMetadata, @Param(3) List keys, @Param(4) List modeDistributionList, @Param(5) int type, @Param(6) int tripType, @Param(7) int tripMode, @Param(8) float distance, @Param(9) int distanceUnit) { + this.identifierList = identifierList; + this.placeMetadata = placeMetadata; + this.keys = keys; + this.modeDistributionList = modeDistributionList; + this.type = type; + this.tripType = tripType; + this.tripMode = tripMode; + this.distance = distance; + this.distanceUnit = distanceUnit; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FrequentTrip.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("FrequentTrip").field("identifierList", identifierList).field("placeMetadata", placeMetadata).field("keys", keys).field("modeDistributionList", modeDistributionList).field("type", type).field("tripType", tripType).field("tripMode", tripMode).field("distance", distance).field("distanceUnit", distanceUnit).end(); + } + + public static class Metadata extends AbstractSafeParcelable { + @Field(1) + public long timestamp; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FrequentTrip.Metadata.class); + + public Metadata() { + } + + @Constructor + public Metadata(@Param(1) long timestamp) { + this.timestamp = timestamp; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("FrequentTrip.Metadata").field("timestamp", timestamp).end(); + } + } + + public static class ModeDistribution extends AbstractSafeParcelable { + @Field(1) + public int distance; + @Field(2) + public float confidence; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FrequentTrip.ModeDistribution.class); + + public ModeDistribution() { + } + + @Constructor + public ModeDistribution(@Param(1) int distance, @Param(2) float confidence) { + this.distance = distance; + this.confidence = confidence; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("FrequentTrip.Metadata").field("distance", distance).field("confidence", confidence).end(); + } + } + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/InferredPlace.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/InferredPlace.java new file mode 100644 index 0000000..b12290d --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/InferredPlace.java @@ -0,0 +1,55 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; +import com.google.android.gms.semanticlocation.PlaceCandidate; + +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class InferredPlace extends AbstractSafeParcelable { + + @Field(1) + public PlaceCandidate.Identifier identifier; + @Field(2) + public PlaceCandidate.Point point; + @Field(3) + public int inferredPlaceType; + + public InferredPlace() { + } + + @Constructor + public InferredPlace(@Param(1) PlaceCandidate.Identifier identifier, @Param(2) PlaceCandidate.Point point, @Param(3) int inferredPlaceType) { + this.identifier = identifier; + this.point = point; + this.inferredPlaceType = inferredPlaceType; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(InferredPlace.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("InferredPlace") + .field("identifier", identifier) + .field("point", point) + .field("inferredPlaceType", inferredPlaceType) + .end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LocationHistorySegment.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LocationHistorySegment.java new file mode 100644 index 0000000..4dcca6d --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LocationHistorySegment.java @@ -0,0 +1,74 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class LocationHistorySegment extends AbstractSafeParcelable { + + @Field(1) + public long startTime; + @Field(2) + public long endTime; + @Field(3) + public int unknownFiled3; + @Field(4) + public int unknownFiled4; + @Field(7) + public String function; + @Field(8) + public int unknownFiled8; + @Field(12) + public int unknownFiled12; + @Field(13) + public int unknownFiled13; + + public LocationHistorySegment() { + } + + @Constructor + public LocationHistorySegment(@Param(1) long startTime, @Param(2) long endTime, @Param(3) int unknownFiled3, @Param(4) int unknownFiled4, @Param(7) String function, @Param(8) int unknownFiled8 , @Param(12) int unknownFiled12, @Param(13) int unknownFiled13){ + this.startTime = startTime; + this.endTime = endTime; + this.unknownFiled3 = unknownFiled3; + this.unknownFiled4 = unknownFiled4; + this.function = function; + this.unknownFiled8 = unknownFiled8; + this.unknownFiled12 = unknownFiled12; + this.unknownFiled13 = unknownFiled13; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationHistorySegment.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("LocationHistorySegment") + .field("startTime", startTime) + .field("endTime", endTime) + .field("unknownFiled3", unknownFiled3) + .field("unknownFiled4", unknownFiled4) + .field("unknownFiled7", function) + .field("unknownFiled8", unknownFiled8) + .field("unknownFiled12", unknownFiled12) + .field("unknownFiled13", unknownFiled13) + .end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LocationHistorySegmentRequest.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LocationHistorySegmentRequest.java new file mode 100644 index 0000000..be11802 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LocationHistorySegmentRequest.java @@ -0,0 +1,52 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +import java.util.List; + +@SafeParcelable.Class +public class LocationHistorySegmentRequest extends AbstractSafeParcelable { + + @Field(1) + public List list; + @Field(2) + public FieldMask fieldMask; + @Field(3) + public boolean status; + + public LocationHistorySegmentRequest() { + } + + @Constructor + public LocationHistorySegmentRequest(@Param(1) List list, @Param(2) FieldMask fieldMask, @Param(3) boolean status) { + this.list = list; + this.fieldMask = fieldMask; + this.status = status; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationHistorySegmentRequest.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("LocationHistorySegmentRequest").field("list", list).field("fieldMask", fieldMask).field("status", status).end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LookupParameters.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LookupParameters.java new file mode 100644 index 0000000..73e57af --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/LookupParameters.java @@ -0,0 +1,64 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class LookupParameters extends AbstractSafeParcelable { + + @Field(1) + public int index; + @Field(2) + public String tag; + @Field(3) + public TimeRangeFilter timeRangeFilter; + @Field(4) + public boolean check; + @Field(5) + public Integer start; + @Field(6) + public Integer end; + + public LookupParameters() { + } + + public LookupParameters(@Param(1) int index, @Param(2) String tag, @Param(3) TimeRangeFilter timeRangeFilter, @Param(4) boolean check, @Param(5) Integer start, @Param(6) Integer end){ + this.index = index; + this.tag = tag; + this.timeRangeFilter = timeRangeFilter; + this.check = check; + this.start = start; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LookupParameters.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("LookupParameters") + .field("index", index) + .field("tag", tag) + .field("timeRangeFilter", timeRangeFilter) + .field("check", check) + .field("start", start) + .field("end", end) + .end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/Persona.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/Persona.java new file mode 100644 index 0000000..a439eee --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/Persona.java @@ -0,0 +1,237 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; +import com.google.android.gms.semanticlocation.PlaceCandidate; + +import org.microg.gms.utils.ToStringHelper; + +import java.util.List; + +@SafeParcelable.Class +public class Persona extends AbstractSafeParcelable { + + @Field(1) + public PersonaMetadata personaMetadata; + @Field(2) + public List locationAffinityList; + @Field(3) + public List travelModeAffinityList; + + public Persona() { + } + + @Constructor + public Persona(@Param(1) PersonaMetadata personaMetadata, @Param(2) List locationAffinityList, @Param(3) List travelModeAffinityList){ + this.personaMetadata = personaMetadata; + this.locationAffinityList = locationAffinityList; + this.travelModeAffinityList = travelModeAffinityList; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(Persona.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("Persona") + .field("personaMetadata", personaMetadata) + .field("locationAffinityList", locationAffinityList) + .field("travelModeAffinityList", travelModeAffinityList) + .end(); + } + + public static class LocationAffinity extends AbstractSafeParcelable { + @Field(1) + public PlaceCandidate.Identifier identifier; + @Field(2) + public float confidence; + @Field(3) + public long timestamp; + @Field(4) + public float distance; + @Field(5) + public float accuracy; + @Field(6) + public float distanceToLocation; + + public LocationAffinity() {} + + @Constructor + public LocationAffinity(@Param(1) PlaceCandidate.Identifier identifier, @Param(2) float confidence, @Param(3) long timestamp, @Param(4) float distance, @Param(5) float accuracy, @Param(6) float distanceToLocation) { + this.identifier = identifier; + this.confidence = confidence; + this.timestamp = timestamp; + this.distance = distance; + this.accuracy = accuracy; + this.distanceToLocation = distanceToLocation; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LocationAffinity.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("Persona.LocationAffinity") + .field("identifier", identifier) + .field("confidence", confidence) + .field("timestamp", timestamp) + .field("distance", distance) + .field("accuracy", accuracy) + .field("distanceToLocation", distanceToLocation) + .end(); + } + } + + public static class PersonaMetadata extends AbstractSafeParcelable { + @Field(1) + public long timestamp; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PersonaMetadata.class); + + public PersonaMetadata() {} + + @Constructor + public PersonaMetadata(@Param(1) long timestamp) { + this.timestamp = timestamp; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("Persona.PersonaMetadata") + .field("timestamp", timestamp) + .end(); + } + } + + public static class TripSummary extends AbstractSafeParcelable { + @Field(1) + public float distance; + @Field(2) + public float duration; + @Field(3) + public long timestamp; + @Field(4) + public long endTime; + @Field(5) + public int tripType; + @Field(6) + public int tripMode; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(TripSummary.class); + + public TripSummary() {} + + @Constructor + public TripSummary(@Param(1) float distance, @Param(2) float duration, @Param(3) long timestamp, @Param(4) long endTime, @Param(5) int tripType, @Param(6) int tripMode) { + this.distance = distance; + this.duration = duration; + this.timestamp = timestamp; + this.endTime = endTime; + this.tripType = tripType; + this.tripMode = tripMode; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("Persona.TripSummary") + .field("distance", distance) + .field("duration", duration) + .field("timestamp", timestamp) + .field("endTime", endTime) + .field("tripType", tripType) + .field("tripMode", tripMode) + .end(); + } + } + + public static class TravelModeAffinity extends AbstractSafeParcelable { + @Field(1) + public int distance; + @Field(2) + public float confidence; + @Field(3) + public int travelMode; + @Field(4) + public int travelModeAffinity; + @Field(5) + public int tripType; + @Field(6) + public int tripMode; + @Field(7) + public TripSummary tripSummary; + @Field(8) + public TripSummary tripSummary2; + @Field(9) + public TripSummary tripSummary3; + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(TravelModeAffinity.class); + + public TravelModeAffinity() {} + + @Constructor + public TravelModeAffinity(@Param(1) int distance, @Param(2) float confidence, @Param(3) int travelMode, @Param(4) int travelModeAffinity, @Param(5) int tripType, @Param(6) int tripMode, @Param(7) TripSummary tripSummary, @Param(8) TripSummary tripSummary2, @Param(9) TripSummary tripSummary3) { + this.distance = distance; + this.confidence = confidence; + this.travelMode = travelMode; + this.travelModeAffinity = travelModeAffinity; + this.tripType = tripType; + this.tripMode = tripMode; + this.tripSummary = tripSummary; + this.tripSummary2 = tripSummary2; + this.tripSummary3 = tripSummary3; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("Persona.TravelModeAffinity") + .field("distance", distance) + .field("confidence", confidence) + .field("travelMode", travelMode) + .field("travelModeAffinity", travelModeAffinity) + .field("tripType", tripType) + .field("tripMode", tripMode) + .field("tripSummary", tripSummary) + .field("tripSummary2", tripSummary2) + .field("tripSummary3", tripSummary3) + .end(); + } + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/RequestCredentials.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/RequestCredentials.java new file mode 100644 index 0000000..9c97b87 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/RequestCredentials.java @@ -0,0 +1,52 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.accounts.Account; +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + + +@SafeParcelable.Class +public class RequestCredentials extends AbstractSafeParcelable { + + @Field(1) + public Account account; + @Field(2) + public String function; + @Field(3) + public String packageName; + + public RequestCredentials() { + } + + @Constructor + public RequestCredentials(@Param(1) Account account, @Param(2) String function, @Param(3) String packageName) { + this.account = account; + this.function = function; + this.packageName = packageName; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(RequestCredentials.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("RequestCredentials").field("account", account.name).field("function", function).field("packageName", packageName).end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/TimeRangeFilter.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/TimeRangeFilter.java new file mode 100644 index 0000000..8604f8c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/TimeRangeFilter.java @@ -0,0 +1,47 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +public class TimeRangeFilter extends AbstractSafeParcelable { + + @Field(1) + public Long startTime; + @Field(2) + public Long endTime; + + public TimeRangeFilter() { + } + + @Constructor + public TimeRangeFilter(@Param(1) Long startTime, @Param(1) Long endTime) { + this.startTime = startTime; + this.endTime = endTime; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(TimeRangeFilter.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("TimeRangeFilter").field("startTime", startTime).field("endTime", endTime).end(); + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/UserLocationProfile.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/UserLocationProfile.java new file mode 100644 index 0000000..7272f2e --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/semanticlocationhistory/UserLocationProfile.java @@ -0,0 +1,60 @@ +/** + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.semanticlocationhistory; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.utils.ToStringHelper; + +import java.util.List; + +@SafeParcelable.Class +public class UserLocationProfile extends AbstractSafeParcelable { + + @Field(1) + public List frequentPlaceList; + @Field(2) + public List frequentTripList; + @Field(3) + public Persona persona; + @Field(4) + public long timestamp; + + public UserLocationProfile() { + } + + @Constructor + public UserLocationProfile(@Param(1) List frequentPlaceList, @Param(2) List frequentTripList, @Param(3) Persona persona, @Param(4) long timestamp) { + this.frequentPlaceList = frequentPlaceList; + this.frequentTripList = frequentTripList; + this.persona = persona; + this.timestamp = timestamp; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(UserLocationProfile.class); + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("UserLocationProfile") + .field("frequentPlaceList", frequentPlaceList) + .field("frequentTripList", frequentTripList) + .field("persona", persona) + .field("timestamp", timestamp) + .end(); + } +} 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 new file mode 100644 index 0000000..0e7ec10 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/usagereporting/UsageReportingOptInOptions.java @@ -0,0 +1,15 @@ +/* + * 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/google/android/gms/wallet/GetClientTokenRequest.java b/play-services-api/src/main/java/com/google/android/gms/wallet/GetClientTokenRequest.java new file mode 100644 index 0000000..e0f8559 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/wallet/GetClientTokenRequest.java @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.wallet; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class GetClientTokenRequest extends AbstractSafeParcelable { + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GetClientTokenRequest.class); + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/wallet/GetClientTokenResponse.java b/play-services-api/src/main/java/com/google/android/gms/wallet/GetClientTokenResponse.java new file mode 100644 index 0000000..2d3a8a9 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/wallet/GetClientTokenResponse.java @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2025 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.wallet; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class GetClientTokenResponse extends AbstractSafeParcelable { + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GetClientTokenResponse.class); + +} diff --git a/play-services-api/src/main/java/com/google/android/gms/wallet/IsReadyToPayRequest.java b/play-services-api/src/main/java/com/google/android/gms/wallet/IsReadyToPayRequest.java new file mode 100644 index 0000000..2f9fde8 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/wallet/IsReadyToPayRequest.java @@ -0,0 +1,161 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 AND CC-BY-4.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.wallet; + +import org.microg.gms.common.PublicApi; +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * A Parcelable request that can optionally be passed to {@link PaymentsClient#isReadyToPay(IsReadyToPayRequest)} to specify additional filtering criteria for determining if a user is considered ready to pay. + */ +@PublicApi +public class IsReadyToPayRequest extends AutoSafeParcelable { + @Field(value = 2, useDirectList = true) + private ArrayList allowedCardNetworks; + @Field(4) + private String unknown4; + @Field(5) + private String unknown5; + @Field(value = 6, useDirectList = true) + private ArrayList allowedPaymentMethods; + @Field(7) + private boolean existingPaymentMethodRequired; + @Field(8) + private String json; + + private IsReadyToPayRequest() { + } + + private IsReadyToPayRequest(String json) { + this.json = json; + } + + /** + * Constructs {@link IsReadyToPayRequest} from a JSON object serialized as a string. + *

+ * To convert back to a JSON object serialized as string use {@link #toJson()}. + *

+ * Note that you shouldn't rely on the values returned by getters in {@link IsReadyToPayRequest} as they will not be populated with the data set in the given JSON. + *

+ * For the expected format of this JSON, please see IsReadyToPayRequest object reference documentation. + */ + public static IsReadyToPayRequest fromJson(String isReadyToPayRequestJson) { + return new IsReadyToPayRequest(isReadyToPayRequestJson); + } + + /** + * @return a builder for constructing the {@link IsReadyToPayRequest} object. + * @deprecated Use the JSON request format instead, see {@link #fromJson(String)}. + */ + public static IsReadyToPayRequest.Builder newBuilder() { + return new IsReadyToPayRequest().new Builder(); + } + + /** + * Returns {@link IsReadyToPayRequest} in JSON format. + *

+ * Note that this will be {@code null} if this request was not constructed using {@link #fromJson(String)}. + *

+ * For the expected format of this JSON, please see IsReadyToPayRequest object reference documentation. + */ + public String toJson() { + return json; + } + + /** + * @return the {@link WalletConstants.CardNetwork} that will be used to filter the instruments deemed acceptable by {@link PaymentsClient#isReadyToPay(IsReadyToPayRequest)}. If not explicitly set, the default supported networks will be {@link WalletConstants#CARD_NETWORK_AMEX}, {@link WalletConstants#CARD_NETWORK_DISCOVER}, {@link WalletConstants#CARD_NETWORK_MASTERCARD}, and {@link WalletConstants#CARD_NETWORK_VISA}. + * @deprecated Use the JSON request format instead, see {@link #fromJson(String)}. + */ + public ArrayList getAllowedCardNetworks() { + return allowedCardNetworks; + } + + /** + * @return the supported payment credential types defined in {@link WalletConstants.PaymentMethod}, or {@code null} if no restrictions were specified. + * @deprecated Use the JSON request format instead, see {@link #fromJson(String)}. + */ + public ArrayList getAllowedPaymentMethods() { + return allowedPaymentMethods; + } + + /** + * @return whether or not IsReadyToPay will be determined by the user having an existing payment method that matches the other criteria specified in the IsReadyToPayRequest. + * @deprecated Use the JSON request format instead, see {@link #fromJson(String)}. + */ + public boolean isExistingPaymentMethodRequired() { + return existingPaymentMethodRequired; + } + + /** + * Builder for creating an {@link IsReadyToPayRequest}. + * + * @deprecated Use the JSON request format instead, see {@link #fromJson(String)}. + */ + public class Builder { + /** + * Adds a card network for cards allowed in the purchase. See {@link WalletConstants.CardNetwork} for available options. If not explicitly set via this or {@link #addAllowedCardNetworks(Collection)}, the default supported networks will be {@link WalletConstants#CARD_NETWORK_AMEX}, {@link WalletConstants#CARD_NETWORK_DISCOVER}, {@link WalletConstants#CARD_NETWORK_MASTERCARD}, and {@link WalletConstants#CARD_NETWORK_VISA}. + */ + public Builder addAllowedCardNetwork(int allowedCardNetwork) { + if (allowedCardNetworks == null) allowedCardNetworks = new ArrayList<>(); + allowedCardNetworks.add(allowedCardNetwork); + return this; + } + + /** + * Adds a collection of card networks for cards allowed in the purchase. See {@link WalletConstants.CardNetwork} for available options. If not explicitly set via this or {@link #addAllowedCardNetwork(int)}, the default supported networks will be {@link WalletConstants#CARD_NETWORK_AMEX}, {@link WalletConstants#CARD_NETWORK_DISCOVER}, {@link WalletConstants#CARD_NETWORK_MASTERCARD}, and {@link WalletConstants#CARD_NETWORK_VISA}. + */ + public Builder addAllowedCardNetworks(Collection allowedCardNetworks) { + if (IsReadyToPayRequest.this.allowedCardNetworks == null) + IsReadyToPayRequest.this.allowedCardNetworks = new ArrayList<>(); + IsReadyToPayRequest.this.allowedCardNetworks.addAll(allowedCardNetworks); + return this; + } + + /** + * Adds an allowed payment method. See {@link WalletConstants.PaymentMethod} for available options. If not explicitly set via this or {@link #addAllowedPaymentMethods(Collection)}, then the default allowed payment method will be {@link WalletConstants#PAYMENT_METHOD_TOKENIZED_CARD}. + */ + public Builder addAllowedPaymentMethod(int allowedPaymentMethod) { + if (allowedPaymentMethods == null) allowedPaymentMethods = new ArrayList<>(); + allowedPaymentMethods.add(allowedPaymentMethod); + return this; + } + + /** + * Adds a collection of allowed payment methods. See {@link WalletConstants.PaymentMethod} for available options. If not explicitly set via this or {@link #addAllowedPaymentMethod(int)}, then the default allowed payment method will be {@link WalletConstants#PAYMENT_METHOD_TOKENIZED_CARD}. + */ + public Builder addAllowedPaymentMethods(Collection allowedPaymentMethods) { + if (IsReadyToPayRequest.this.allowedPaymentMethods == null) + IsReadyToPayRequest.this.allowedPaymentMethods = new ArrayList<>(); + IsReadyToPayRequest.this.allowedPaymentMethods.addAll(allowedPaymentMethods); + return this; + } + + /** + * @return The actual {@link IsReadyToPayRequest} created using the data passed to the Builder object. + */ + public IsReadyToPayRequest build() { + return IsReadyToPayRequest.this; + } + + /** + * If set to true, then IsReadyToPay will only return true if the user has an existing payment method that matches the other criteria specified in the IsReadyToPayRequest. + *

+ * If you set this to true, make sure to call {@link PaymentsClient#isReadyToPay(IsReadyToPayRequest)} as early as possible in your flow as the call may take longer to resolve due to the extra check for an existing payment method. + */ + public Builder setExistingPaymentMethodRequired(boolean existingPaymentMethodRequired) { + IsReadyToPayRequest.this.existingPaymentMethodRequired = existingPaymentMethodRequired; + return this; + } + } + + public static final Creator CREATOR = new AutoCreator<>(IsReadyToPayRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/wallet/IsReadyToPayResponse.java b/play-services-api/src/main/java/com/google/android/gms/wallet/IsReadyToPayResponse.java new file mode 100644 index 0000000..96b0240 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/wallet/IsReadyToPayResponse.java @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.wallet; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class IsReadyToPayResponse extends AutoSafeParcelable { + @Field(1) + public boolean result; + @Field(2) + public String json; + + private IsReadyToPayResponse() { + } + + public IsReadyToPayResponse(boolean result, String json) { + this.result = result; + this.json = json; + } + + public static final Creator CREATOR = new AutoCreator<>(IsReadyToPayResponse.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/wallet/WalletConstants.java b/play-services-api/src/main/java/com/google/android/gms/wallet/WalletConstants.java new file mode 100644 index 0000000..0e3e205 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/wallet/WalletConstants.java @@ -0,0 +1,117 @@ +/* + * SPDX-FileCopyrightText: 2020, microG Project Team + * SPDX-License-Identifier: Apache-2.0 AND CC-BY-4.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.wallet; + +import org.microg.gms.common.PublicApi; + +/** + * Collection of constant values used by the ClientLibrary. + */ +@PublicApi +public class WalletConstants { + /** + * Credit card networks. Different APIs may support only a subset of these. + *

+ * Available options: + *

    + *
  • {@link #CARD_NETWORK_AMEX}
  • + *
  • {@link #CARD_NETWORK_DISCOVER}
  • + *
  • {@link #CARD_NETWORK_JCB}
  • + *
  • {@link #CARD_NETWORK_MASTERCARD}
  • + *
  • {@link #CARD_NETWORK_VISA}
  • + *
  • {@link #CARD_NETWORK_INTERAC}
  • + *
  • {@link #CARD_NETWORK_OTHER}
  • + *
+ * When used with Google Pay, the following networks use EMV cryptograms instead of 3DS cryptograms as part of the payment credentials: + *
    + *
  • {@link #CARD_NETWORK_INTERAC}
  • + *
+ */ + public @interface CardNetwork { + /** + * @deprecated Use {@link #CARD_NETWORK_AMEX} instead. + */ + int AMEX = 1; + /** + * @deprecated Use {@link #CARD_NETWORK_DISCOVER} instead. + */ + int DISCOVER = 2; + /** + * @deprecated Use {@link #CARD_NETWORK_JCB} instead. + */ + int JCB = 3; + /** + * @deprecated Use {@link #CARD_NETWORK_MASTERCARD} instead. + */ + int MASTERCARD = 4; + /** + * @deprecated Use {@link #CARD_NETWORK_VISA} instead. + */ + int VISA = 5; + /** + * @deprecated Use {@link #CARD_NETWORK_INTERAC} instead. + */ + int INTERAC = 6; + /** + * @deprecated Use {@link #CARD_NETWORK_OTHER} instead. + */ + int OTHER = 1000; + } + + /** + * The payment methods you support. + *

+ * Available options: + *

    + *
  • {@link #PAYMENT_METHOD_UNKNOWN}
  • + *
  • {@link #PAYMENT_METHOD_CARD}
  • + *
  • {@link #PAYMENT_METHOD_TOKENIZED_CARD}
  • + *
+ * Note {@link WalletConstants.PaymentMethod} is different from {@link PaymentMethodTokenizationType}, which identifies how you want to receive the returned payment credential. + */ + public @interface PaymentMethod { + } + + /** + * Payment method tokenization types. + *

+ * Available options: + *

    + *
  • {@link #PAYMENT_METHOD_TOKENIZATION_TYPE_PAYMENT_GATEWAY}
  • + *
  • {@link #PAYMENT_METHOD_TOKENIZATION_TYPE_NETWORK_TOKEN}
  • + *
  • {@link #PAYMENT_METHOD_TOKENIZATION_TYPE_DIRECT}
  • + *
+ * Integrator can configure {@link PaymentDataRequest} to tokenize the credit card selected by the buyer for a transaction using one of the tokenization types listed above. The token for the selected payment method can be retrieved by calling {@link PaymentData#getPaymentMethodToken()}. + */ + public @interface PaymentMethodTokenizationType { + } + + + public static final int CARD_CLASS_CREDIT = 1; + public static final int CARD_CLASS_DEBIT = 2; + public static final int CARD_CLASS_PREPAID = 3; + public static final int CARD_CLASS_UNKNOWN = 0; + + public static final int CARD_NETWORK_AMEX = 1; + public static final int CARD_NETWORK_DISCOVER = 2; + public static final int CARD_NETWORK_INTERAC = 6; + public static final int CARD_NETWORK_JCB = 3; + public static final int CARD_NETWORK_MASTERCARD = 4; + public static final int CARD_NETWORK_OTHER = 1000; + public static final int CARD_NETWORK_VISA = 5; + + public static final int PAYMENT_METHOD_CARD = 1; + public static final int PAYMENT_METHOD_TOKENIZED_CARD = 2; + public static final int PAYMENT_METHOD_UNKNOWN = 0; + + + public static final int PAYMENT_METHOD_TOKENIZATION_TYPE_DIRECT = 3; + public static final int PAYMENT_METHOD_TOKENIZATION_TYPE_NETWORK_TOKEN = 2; + public static final int PAYMENT_METHOD_TOKENIZATION_TYPE_PAYMENT_GATEWAY = 1; +} diff --git a/play-services-api/src/main/java/com/google/firebase/database/connection/idl/CompoundHashParcelable.java b/play-services-api/src/main/java/com/google/firebase/database/connection/idl/CompoundHashParcelable.java new file mode 100644 index 0000000..4b72c85 --- /dev/null +++ b/play-services-api/src/main/java/com/google/firebase/database/connection/idl/CompoundHashParcelable.java @@ -0,0 +1,23 @@ +/* + * 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.firebase.database.connection.idl; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class CompoundHashParcelable extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator(CompoundHashParcelable.class); +} diff --git a/play-services-api/src/main/java/com/google/firebase/database/connection/idl/ConnectionConfig.java b/play-services-api/src/main/java/com/google/firebase/database/connection/idl/ConnectionConfig.java new file mode 100644 index 0000000..290467b --- /dev/null +++ b/play-services-api/src/main/java/com/google/firebase/database/connection/idl/ConnectionConfig.java @@ -0,0 +1,23 @@ +/* + * 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.firebase.database.connection.idl; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ConnectionConfig extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator(ConnectionConfig.class); +} diff --git a/play-services-api/src/main/java/com/google/firebase/database/connection/idl/RangeParcelable.java b/play-services-api/src/main/java/com/google/firebase/database/connection/idl/RangeParcelable.java new file mode 100644 index 0000000..cfd0fd7 --- /dev/null +++ b/play-services-api/src/main/java/com/google/firebase/database/connection/idl/RangeParcelable.java @@ -0,0 +1,23 @@ +/* + * 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.firebase.database.connection.idl; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class RangeParcelable extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator(RangeParcelable.class); +} diff --git a/play-services-appinvite/build.gradle b/play-services-appinvite/build.gradle new file mode 100644 index 0000000..9906bcb --- /dev/null +++ b/play-services-appinvite/build.gradle @@ -0,0 +1,40 @@ +/* + * SPDX-FileCopyrightText: 2019 e Foundation + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' + +group = 'org.microg' + +android { + namespace "com.google.android.gms.appinvite" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + // Dependencies from play-services-appinvite:18.0.0 + api project(':play-services-base') + api project(':play-services-basement') + api project(':play-services-tasks') +// api project(':firebase-analytics') + api project(':firebase-dynamic-links') +} diff --git a/play-services-appinvite/core/build.gradle b/play-services-appinvite/core/build.gradle new file mode 100644 index 0000000..9477a7b --- /dev/null +++ b/play-services-appinvite/core/build.gradle @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'com.squareup.wire' +apply plugin: 'kotlin-android' + +dependencies { + api project(':play-services-appinvite') + implementation project(':play-services-base-core') + + implementation "androidx.appcompat:appcompat:$appcompatVersion" + + implementation "com.android.volley:volley:$volleyVersion" + implementation "com.squareup.wire:wire-runtime:$wireVersion" +} + +android { + namespace "org.microg.gms.appinvite" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } +} + +wire { + kotlin {} +} diff --git a/play-services-appinvite/core/src/main/AndroidManifest.xml b/play-services-appinvite/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..4b89dcf --- /dev/null +++ b/play-services-appinvite/core/src/main/AndroidManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt new file mode 100644 index 0000000..4b2872a --- /dev/null +++ b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt @@ -0,0 +1,123 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.appinivite + +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import android.util.Log +import android.view.ViewGroup +import android.view.Window +import android.widget.ProgressBar +import androidx.appcompat.app.AppCompatActivity +import androidx.core.content.pm.PackageInfoCompat +import androidx.core.os.bundleOf +import androidx.core.view.setPadding +import androidx.lifecycle.lifecycleScope +import com.android.volley.toolbox.Volley +import com.google.android.gms.common.internal.safeparcel.SafeParcelableSerializer +import com.google.firebase.dynamiclinks.internal.DynamicLinkData +import org.microg.gms.appinvite.MutateAppInviteLinkResponse +import org.microg.gms.appinivite.utils.DynamicLinkUtils +import org.microg.gms.utils.singleInstanceOf + +private const val TAG = "AppInviteActivity" + +private const val APPINVITE_DEEP_LINK = "com.google.android.gms.appinvite.DEEP_LINK" +private const val APPINVITE_INVITATION_ID = "com.google.android.gms.appinvite.INVITATION_ID" +private const val APPINVITE_OPENED_FROM_PLAY_STORE = "com.google.android.gms.appinvite.OPENED_FROM_PLAY_STORE" +private const val APPINVITE_REFERRAL_BUNDLE = "com.google.android.gms.appinvite.REFERRAL_BUNDLE" +private const val DYNAMIC_LINK_DATA = "com.google.firebase.dynamiclinks.DYNAMIC_LINK_DATA" + +class AppInviteActivity : AppCompatActivity() { + private val queue by lazy { singleInstanceOf { Volley.newRequestQueue(applicationContext) } } + + private val Int.px: Int get() = (this * resources.displayMetrics.density).toInt() + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + requestWindowFeature(Window.FEATURE_NO_TITLE) + setContentView(ProgressBar(this).apply { + layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) + setPadding(20.px) + isIndeterminate = true + }) + val extras = intent.extras + extras?.keySet() + Log.d(TAG, "Intent: $intent $extras") + if (intent?.data == null) return finish() + lifecycleScope.launchWhenStarted { + val response = DynamicLinkUtils.requestLinkResponse(intent.data.toString(), queue) ?: return@launchWhenStarted redirectToBrowser() + open(response) + } + } + + private fun redirectToBrowser() { + try { + startActivity(Intent(Intent.ACTION_VIEW).apply { + addCategory(Intent.CATEGORY_DEFAULT) + data = intent.data + }) + } catch (e: Exception) { + Log.w(TAG, e) + } + finish() + } + + private fun open(appInviteLink: MutateAppInviteLinkResponse) { + val minAppVersion = appInviteLink.data_?.app?.minAppVersion + val dynamicLinkData = DynamicLinkData(appInviteLink.metadata?.info?.url, appInviteLink.data_?.intentData, + (minAppVersion ?: 0).toInt(), System.currentTimeMillis(), null, null) + val linkPackageName = appInviteLink.data_?.packageName + val intent = Intent(Intent.ACTION_VIEW).apply { + addCategory(Intent.CATEGORY_DEFAULT) + data = appInviteLink.data_?.intentData?.let { Uri.parse(it) } + `package` = linkPackageName + flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP + putExtra( + APPINVITE_REFERRAL_BUNDLE, bundleOf( + APPINVITE_DEEP_LINK to appInviteLink, + APPINVITE_INVITATION_ID to "", + APPINVITE_OPENED_FROM_PLAY_STORE to false + ) + ) + putExtra(DYNAMIC_LINK_DATA, SafeParcelableSerializer.serializeToBytes(dynamicLinkData)) + } + val fallbackIntent = Intent(Intent.ACTION_VIEW).apply { + addCategory(Intent.CATEGORY_DEFAULT) + data = appInviteLink.data_?.fallbackUrl?.let { Uri.parse(it) } + } + val installedVersionCode = runCatching { + if (linkPackageName != null) { + PackageInfoCompat.getLongVersionCode(packageManager.getPackageInfo(linkPackageName, 0)) + } else { + null + } + }.getOrNull() + if (installedVersionCode != null && (minAppVersion == null || installedVersionCode >= minAppVersion)) { + val componentName = intent.resolveActivity(packageManager) + if (componentName == null) { + Log.w(TAG, "open resolve activity is null") + if (linkPackageName != null) { + val intentLaunch = + packageManager.getLaunchIntentForPackage(linkPackageName) + if (intentLaunch != null) { + intent.setComponent(intentLaunch.component) + } + } + } + startActivity(intent) + finish() + } else { + try { + startActivity(fallbackIntent) + } catch (e: Exception) { + Log.w(TAG, e) + } + finish() + } + } +} \ No newline at end of file diff --git a/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteService.kt b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteService.kt new file mode 100644 index 0000000..8eb0ace --- /dev/null +++ b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteService.kt @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: 2019 e Foundation + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ +package org.microg.gms.appinivite + +import android.app.Activity +import android.content.Context +import android.os.Bundle +import android.os.Parcel +import android.os.RemoteException +import android.util.Log +import com.google.android.gms.appinvite.internal.IAppInviteCallbacks +import com.google.android.gms.appinvite.internal.IAppInviteService +import com.google.android.gms.common.api.Status +import com.google.android.gms.common.internal.GetServiceRequest +import com.google.android.gms.common.internal.IGmsCallbacks +import org.microg.gms.BaseService +import org.microg.gms.common.GmsService +import org.microg.gms.common.PackageUtils +import org.microg.gms.utils.warnOnTransactionIssues + +private const val TAG = "AppInviteService" + +class AppInviteService : BaseService(TAG, GmsService.APP_INVITE) { + override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) { + PackageUtils.getAndCheckCallingPackage(this, request.packageName) + callback.onPostInitComplete(0, AppInviteServiceImpl(this, request.packageName, request.extras), null) + } +} + + +class AppInviteServiceImpl(context: Context?, packageName: String?, extras: Bundle?) : IAppInviteService.Stub() { + override fun updateInvitationOnInstall(callback: IAppInviteCallbacks, invitationId: String) { + callback.onStatus(Status.SUCCESS) + } + + override fun convertInvitation(callback: IAppInviteCallbacks, invitationId: String) { + callback.onStatus(Status.SUCCESS) + } + + override fun getInvitation(callback: IAppInviteCallbacks) { + callback.onStatusIntent(Status(Activity.RESULT_CANCELED), null) + } + + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } +} diff --git a/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/utils/DynamicLinkUtils.kt b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/utils/DynamicLinkUtils.kt new file mode 100644 index 0000000..3d16ced --- /dev/null +++ b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/utils/DynamicLinkUtils.kt @@ -0,0 +1,147 @@ +/** + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.appinivite.utils + +import android.content.Context +import android.os.Build.VERSION.SDK_INT +import android.os.LocaleList +import com.android.volley.NetworkResponse +import com.android.volley.ParseError +import com.android.volley.Request +import com.android.volley.Request.Method.POST +import com.android.volley.RequestQueue +import com.android.volley.Response +import com.android.volley.VolleyError +import com.android.volley.toolbox.HttpHeaderParser +import com.android.volley.toolbox.JsonRequest +import com.squareup.wire.Message +import com.squareup.wire.ProtoAdapter +import kotlinx.coroutines.CompletableDeferred +import okio.ByteString.Companion.decodeHex +import org.json.JSONException +import org.json.JSONObject +import org.microg.gms.appinvite.ClientIdInfo +import org.microg.gms.appinvite.ClientPlatform +import org.microg.gms.appinvite.LinkInfo +import org.microg.gms.appinvite.MutateAppInviteLinkRequest +import org.microg.gms.appinvite.MutateAppInviteLinkResponse +import org.microg.gms.appinvite.MutateDataRequest +import org.microg.gms.appinvite.MutateDataResponseWithError +import org.microg.gms.appinvite.MutateOperation +import org.microg.gms.appinvite.MutateOperationId +import org.microg.gms.appinvite.SystemInfo +import org.microg.gms.common.Constants +import org.microg.gms.utils.digest +import org.microg.gms.utils.getCertificates +import org.microg.gms.utils.toHexString +import java.io.UnsupportedEncodingException +import java.nio.charset.Charset +import java.util.HashMap +import java.util.Locale +import kotlin.collections.firstOrNull +import kotlin.coroutines.resume +import kotlin.coroutines.resumeWithException +import kotlin.coroutines.suspendCoroutine + +object DynamicLinkUtils { + + suspend fun requestLinkResponse(linkUrl: String, queue: RequestQueue): MutateAppInviteLinkResponse? { + val request = ProtobufPostRequest( + "https://datamixer-pa.googleapis.com/v1/mutateonekey?alt=proto&key=AIzaSyAP-gfH3qvi6vgHZbSYwQ_XHqV_mXHhzIk", MutateOperation( + id = MutateOperationId.AppInviteLink, mutateRequest = MutateDataRequest( + appInviteLink = MutateAppInviteLinkRequest( + client = ClientIdInfo( + platform = ClientPlatform.Android, + packageName = Constants.GMS_PACKAGE_NAME, + signature = Constants.GMS_PACKAGE_SIGNATURE_SHA1.decodeHex().base64(), + language = Locale.getDefault().language + ), link = LinkInfo( + invitationId = "", uri = linkUrl + ), system = SystemInfo( + gms = SystemInfo.GmsInfo( + versionCode = Constants.GMS_VERSION_CODE + ) + ) + ) + ) + ), MutateDataResponseWithError.ADAPTER + ) + val response = try { + request.sendAndAwait(queue) + } catch (e: Exception) { + return null + } + if (response.errorStatus != null || response.dataResponse?.appInviteLink == null) return null + return response.dataResponse?.appInviteLink + } + + suspend fun requestShortLinks(context: Context, packageName: String, apiKey: String, longDynamicLink: String, queue: RequestQueue) = suspendCoroutine { con -> + queue.add(object : JsonRequest(POST, "https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=$apiKey", JSONObject().apply { + put("longDynamicLink", longDynamicLink) + }.toString(), { + con.resume(it) + }, { + con.resumeWithException(RuntimeException(it)) + }) { + override fun parseNetworkResponse(response: NetworkResponse): Response { + return try { + val jsonString = String(response.data, Charset.forName(HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET))) + Response.success(JSONObject(jsonString), null) + } catch (e: UnsupportedEncodingException) { + Response.error(ParseError(e)) + } catch (je: JSONException) { + Response.error(ParseError(je)) + } + } + + override fun getHeaders(): Map = mapOf( + "X-Android-Package" to packageName, + "X-Android-Cert" to context.packageManager.getCertificates(packageName).firstOrNull()?.digest("SHA1")?.toHexString()?.uppercase() + ) + }) + } +} + +internal class ProtobufPostRequest, O>(url: String, private val i: I, private val oAdapter: ProtoAdapter) : Request(Method.POST, url, null) { + private val deferred = CompletableDeferred() + + override fun getHeaders(): Map { + val headers = HashMap(super.getHeaders()) + headers["Accept-Language"] = if (SDK_INT >= 24) LocaleList.getDefault().toLanguageTags() else Locale.getDefault().language + headers["X-Android-Package"] = Constants.GMS_PACKAGE_NAME + headers["X-Android-Cert"] = Constants.GMS_PACKAGE_SIGNATURE_SHA1 + return headers + } + + override fun getBody(): ByteArray = i.encode() + + override fun getBodyContentType(): String = "application/x-protobuf" + + override fun parseNetworkResponse(response: NetworkResponse): Response { + return try { + Response.success(oAdapter.decode(response.data), null) + } catch (e: VolleyError) { + Response.error(e) + } catch (e: Exception) { + Response.error(VolleyError()) + } + } + + override fun deliverResponse(response: O) { + deferred.complete(response) + } + + override fun deliverError(error: VolleyError) { + deferred.completeExceptionally(error) + } + + suspend fun await(): O = deferred.await() + + suspend fun sendAndAwait(queue: RequestQueue): O { + queue.add(this) + return await() + } +} \ No newline at end of file diff --git a/play-services-appinvite/core/src/main/proto/datamixer.proto b/play-services-appinvite/core/src/main/proto/datamixer.proto new file mode 100644 index 0000000..1046f38 --- /dev/null +++ b/play-services-appinvite/core/src/main/proto/datamixer.proto @@ -0,0 +1,99 @@ +syntax = "proto2"; +option java_package = "org.microg.gms.appinvite"; + +enum ClientPlatform { + Android = 1; + IOS = 2; +} + +message ClientIdInfo { + optional ClientPlatform platform = 1; + optional string packageName = 3; // e.g. com.google.android.gms + optional string signature = 4; // Signing certificate sha-1 base64 with padding, e.g. WOHEEz90Qew9LCcCcKFIAtpHug4= + optional string language = 6; // e.g. en +} + +message LinkInfo { + optional string invitationId = 1; // e.g. "" + optional string uri = 2; +} + +message SystemInfo { + message GmsInfo { + optional uint32 versionCode = 1; // 212423054 + } + optional GmsInfo gms = 1; +} + +message MutateAppInviteLinkRequest { + optional ClientIdInfo client = 1; + optional LinkInfo link = 4; + optional SystemInfo system = 5; +} + +message MutateDataRequest { + oneof request { + MutateAppInviteLinkRequest appInviteLink = 84453462; + } +} + +message AppInviteLinkInfo { + optional int32 type = 1; + optional string url = 2; + optional string name = 3; +} + +message AppInviteAppData { + optional string packageName = 1; // apn + optional uint64 minAppVersion = 2; // amv + optional string altPackageName = 3; //apn +} + +message AppInviteLinkData { + optional string fallbackUrl = 1; // afl + optional string packageName = 2; // apn + optional string intentData = 3; // link + optional AppInviteAppData app = 6; +} + +message AppInviteLinkMetadata { + optional string source = 2; // utm_source + optional string medium = 3; // utm_medium + optional string campaign = 4; // utm_campaign + optional string id = 5; + optional string appCode = 6; + optional AppInviteLinkInfo info = 8; + optional string sessionId = 9; + optional string domainUriPrefix = 10; + optional string content = 11; // utm_content + optional string term = 12; // utm_term +} + +message MutateAppInviteLinkResponse { + optional AppInviteLinkData data = 1; + optional AppInviteLinkMetadata metadata = 4; +} + +message MutateDataResponse { + oneof response { + MutateAppInviteLinkResponse appInviteLink = 84453462; + } +} + +enum MutateOperationId { + AppInviteLink = 84453462; +} + +message MutateOperation { + optional MutateOperationId id = 1; // 84453462 + optional MutateDataRequest mutateRequest = 2; +} + +message StatusProto { + optional int32 code = 1; +} + +message MutateDataResponseWithError { + optional MutateDataResponse dataResponse = 1; + optional StatusProto errorStatus = 2; +} \ No newline at end of file diff --git a/play-services-appinvite/src/main/AndroidManifest.xml b/play-services-appinvite/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b6845e5 --- /dev/null +++ b/play-services-appinvite/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + diff --git a/play-services-appinvite/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl b/play-services-appinvite/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl new file mode 100644 index 0000000..66c64d7 --- /dev/null +++ b/play-services-appinvite/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl @@ -0,0 +1,11 @@ +package com.google.android.gms.appinvite.internal; + + +import com.google.android.gms.common.api.Status; +import android.content.Intent; + + +interface IAppInviteCallbacks { + void onStatus(in Status status) = 0; + void onStatusIntent(in Status status, in Intent intent) = 1; +} diff --git a/play-services-appinvite/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl b/play-services-appinvite/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl new file mode 100644 index 0000000..630edd4 --- /dev/null +++ b/play-services-appinvite/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl @@ -0,0 +1,14 @@ +package com.google.android.gms.appinvite.internal; + + +import com.google.android.gms.appinvite.internal.IAppInviteCallbacks; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.common.api.Status; + + +interface IAppInviteService { + void updateInvitationOnInstall(IAppInviteCallbacks callback, String invitationId) = 0; + void convertInvitation(IAppInviteCallbacks callback, String invitationId) = 1; + void getInvitation(IAppInviteCallbacks callback) = 2; +} diff --git a/play-services-appset/build.gradle b/play-services-appset/build.gradle new file mode 100644 index 0000000..cb838e7 --- /dev/null +++ b/play-services-appset/build.gradle @@ -0,0 +1,37 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' + +android { + namespace "com.google.android.gms.appset" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } +} + +description = 'microG implementation of play-services-appset' + +dependencies { + api project(':play-services-base') + api project(':play-services-basement') + + annotationProcessor project(':safe-parcel-processor') +} diff --git a/play-services-appset/core/build.gradle b/play-services-appset/core/build.gradle new file mode 100644 index 0000000..c6017e1 --- /dev/null +++ b/play-services-appset/core/build.gradle @@ -0,0 +1,56 @@ +/* + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +dependencies { + api project(':play-services-appset') + + implementation project(':play-services-base-core') + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion" +} + +android { + namespace "org.microg.gms.appset.core" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main { + java.srcDirs = ['src/main/kotlin'] + } + } + + lintOptions { + disable 'MissingTranslation' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } +} + +// Nothing to publish yet +//apply from: '../gradle/publish-android.gradle' + +description = 'microG service implementation for play-services-appset' diff --git a/play-services-appset/core/src/main/AndroidManifest.xml b/play-services-appset/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0df4322 --- /dev/null +++ b/play-services-appset/core/src/main/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt b/play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt new file mode 100644 index 0000000..1f55cfe --- /dev/null +++ b/play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2024 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.appset + +import android.util.Log +import com.google.android.gms.appset.AppSetIdInfo +import com.google.android.gms.appset.AppSetIdRequestParams +import com.google.android.gms.appset.AppSetInfoParcel +import com.google.android.gms.appset.internal.IAppSetIdCallback +import com.google.android.gms.appset.internal.IAppSetService +import com.google.android.gms.common.ConnectionResult +import com.google.android.gms.common.Feature +import com.google.android.gms.common.api.Status +import com.google.android.gms.common.internal.ConnectionInfo +import com.google.android.gms.common.internal.GetServiceRequest +import com.google.android.gms.common.internal.IGmsCallbacks +import org.microg.gms.BaseService +import org.microg.gms.common.GmsService +import java.util.UUID + +private const val TAG = "AppSetService" +private val FEATURES = arrayOf(Feature("app_set_id", 1L)) + +class AppSetService : BaseService(TAG, GmsService.APP_SET) { + + override fun handleServiceRequest(callback: IGmsCallbacks?, request: GetServiceRequest?, service: GmsService?) { + callback?.onPostInitCompleteWithConnectionInfo( + ConnectionResult.SUCCESS, + AppSetServiceImpl().asBinder(), + ConnectionInfo().apply { features = FEATURES } + ) + } +} + +class AppSetServiceImpl : IAppSetService.Stub() { + override fun getAppSetIdInfo(params: AppSetIdRequestParams?, callback: IAppSetIdCallback?) { + Log.d(TAG, "AppSetServiceImp getAppSetIdInfo is called -> ${params?.toString()} ") + callback?.onAppSetInfo(Status.SUCCESS, AppSetInfoParcel(UUID.randomUUID().toString(), AppSetIdInfo.SCOPE_APP)) + } +} diff --git a/play-services-appset/src/main/AndroidManifest.xml b/play-services-appset/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8bdb7e1 --- /dev/null +++ b/play-services-appset/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl new file mode 100644 index 0000000..5beef70 --- /dev/null +++ b/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.appset; + +parcelable AppSetIdRequestParams; diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl new file mode 100644 index 0000000..c2d4818 --- /dev/null +++ b/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.appset; + +parcelable AppSetInfoParcel; diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl new file mode 100644 index 0000000..1b453de --- /dev/null +++ b/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.appset.internal; + +import com.google.android.gms.appset.AppSetInfoParcel; +import com.google.android.gms.common.api.Status; + +interface IAppSetIdCallback { + void onAppSetInfo(in Status status, in AppSetInfoParcel info) = 0; +} \ No newline at end of file diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl new file mode 100644 index 0000000..59dbb6f --- /dev/null +++ b/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.appset.internal; + +import com.google.android.gms.appset.AppSetIdRequestParams; +import com.google.android.gms.appset.internal.IAppSetIdCallback; + +interface IAppSetService { + void getAppSetIdInfo(in AppSetIdRequestParams params, in IAppSetIdCallback callback) = 0; +} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java new file mode 100644 index 0000000..f361652 --- /dev/null +++ b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2024 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.appset; + +import android.content.Context; +import androidx.annotation.NonNull; + +/** + * Entry point of the app set APIs. + */ +public class AppSet { + /** + * Creates a new instance of {@link AppSetIdClient}. + */ + @NonNull + public static AppSetIdClient getClient (Context context) { + throw new UnsupportedOperationException(); + } +} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java new file mode 100644 index 0000000..91b6a67 --- /dev/null +++ b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java @@ -0,0 +1,25 @@ +/* + * SPDX-FileCopyrightText: 2024 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.appset; + +import androidx.annotation.NonNull; +import com.google.android.gms.tasks.Task; + +/** + * A client for interacting with the {@link AppSetIdInfo} API. + */ +public interface AppSetIdClient { + /** + * Gets the AppSetIdInfo asynchronously. + * + * @return a {@link Task} of the returned {@link AppSetIdInfo}. + */ + @NonNull + Task getAppSetIdInfo(); +} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java new file mode 100644 index 0000000..29608f5 --- /dev/null +++ b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java @@ -0,0 +1,75 @@ +/* + * SPDX-FileCopyrightText: 2024 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.appset; + +import androidx.annotation.IntDef; +import org.microg.gms.common.Hide; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Contains information about app set ID. + */ +public class AppSetIdInfo { + /** + * The app set ID is scoped to the app. + */ + public static final int SCOPE_APP = 1; + /** + * The app set ID is scoped to a developer account on an app store. All apps from the same developer on a device will have + * the same developer scoped app set ID. + */ + public static final int SCOPE_DEVELOPER = 2; + + private final String id; + private final @Scope int scope; + + @Hide + public AppSetIdInfo(String id, @Scope int scope) { + this.id = id; + this.scope = scope; + } + + /** + * Gets the app set ID. + * + * @return the app set ID. + */ + public String getId() { + return id; + } + + /** + * Returns the {@link AppSetIdInfo.Scope} of the app set ID. Possible values include {@link #SCOPE_APP} and {@link #SCOPE_DEVELOPER}. + * + * @return the app set ID's {@link AppSetIdInfo.Scope}. + */ + public @Scope int getScope() { + return scope; + } + + /** + * Allowed constants for {@link AppSetIdInfo#getScope()}. + *

+ * Supported constants: + *

    + *
  • {@link #SCOPE_APP}
  • + *
  • {@link #SCOPE_DEVELOPER}
  • + *
+ */ + @Target({ElementType.TYPE_USE}) + @Retention(RetentionPolicy.SOURCE) + @IntDef({SCOPE_APP, SCOPE_DEVELOPER}) + public @interface Scope { + + } +} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java new file mode 100644 index 0000000..2bc9b0d --- /dev/null +++ b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java @@ -0,0 +1,45 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.appset; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +import org.microg.gms.common.Hide; +import org.microg.gms.utils.ToStringHelper; + +@SafeParcelable.Class +@Hide +public class AppSetIdRequestParams extends AbstractSafeParcelable { + @Field(1) + public final String version; + @Field(2) + public final String clientAppPackageName; + + @Constructor + public AppSetIdRequestParams(@Param(1) String version, @Param(2) String clientAppPackageName) { + this.version = version; + this.clientAppPackageName = clientAppPackageName; + } + + @NonNull + @Override + public String toString() { + return ToStringHelper.name("AppSetIdRequestParams").field("version", version).field("clientAppPackageName", clientAppPackageName).end(); + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(AppSetIdRequestParams.class); +} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java new file mode 100644 index 0000000..dd47b94 --- /dev/null +++ b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.appset; + +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; +import org.microg.gms.common.Hide; + +@SafeParcelable.Class +@Hide +public class AppSetInfoParcel extends AbstractSafeParcelable { + @Field(1) + public final String id; + @Field(2) + public final int scope; + + @Constructor + public AppSetInfoParcel(@Param(1) String id, @Param(2) int scope) { + this.id = id; + this.scope = scope; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(AppSetInfoParcel.class); + +} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java b/play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java new file mode 100644 index 0000000..e9ab491 --- /dev/null +++ b/play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: CC-BY-4.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. + */ +/** + * For analytics or fraud prevention use cases, on a given device you may + need to correlate usage or actions across a set of apps owned by your organization. + */ +package com.google.android.gms.appset; diff --git a/play-services-auth-api-phone/build.gradle b/play-services-auth-api-phone/build.gradle new file mode 100644 index 0000000..18ddafa --- /dev/null +++ b/play-services-auth-api-phone/build.gradle @@ -0,0 +1,45 @@ +/* + * SPDX-FileCopyrightText: 2022 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +android { + namespace "com.google.android.gms.auth.api.phone" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + buildFeatures { + aidl = true + } + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } +} + +apply from: '../gradle/publish-android.gradle' + +description = 'microG implementation of play-services-auth-api-phone' + +dependencies { + // Dependencies from play-services-auth-api-phone:18.2.0 + api project(':play-services-base') + api project(':play-services-basement') + api project(':play-services-tasks') + api 'org.jetbrains.kotlin:kotlin-stdlib:1.8.21' + api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21' + api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3' + // api 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.0' +} diff --git a/play-services-auth-api-phone/core/build.gradle b/play-services-auth-api-phone/core/build.gradle new file mode 100644 index 0000000..4530d26 --- /dev/null +++ b/play-services-auth-api-phone/core/build.gradle @@ -0,0 +1,44 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +dependencies { + api project(':play-services-auth-api-phone') + implementation project(':play-services-base-core') + + implementation "androidx.appcompat:appcompat:$appcompatVersion" +} + +android { + namespace "org.microg.gms.auth.phone" + + compileSdkVersion androidCompileSdk + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName version + minSdkVersion androidMinSdk + targetSdkVersion androidTargetSdk + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + compileOptions { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + } + + kotlinOptions { + jvmTarget = 1.8 + } + + lintOptions { + disable 'MissingTranslation', 'GetLocales' + } +} diff --git a/play-services-auth-api-phone/core/src/main/AndroidManifest.xml b/play-services-auth-api-phone/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9c9cec5 --- /dev/null +++ b/play-services-auth-api-phone/core/src/main/AndroidManifest.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/AskPermissionActivity.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/AskPermissionActivity.kt new file mode 100644 index 0000000..c78eecf --- /dev/null +++ b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/AskPermissionActivity.kt @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.auth.phone + +import android.Manifest +import android.content.Intent +import android.os.Build.VERSION.SDK_INT +import android.os.Bundle +import android.os.Message +import android.os.Messenger +import android.util.Log +import androidx.appcompat.app.AppCompatActivity +import androidx.core.app.ActivityCompat +import androidx.core.os.bundleOf + +private const val TAG = "AskPermission" +private const val REQUEST_CODE_PERMISSION = 101 +private val ALLOWED_PERMISSIONS = setOf(Manifest.permission.RECEIVE_SMS, Manifest.permission.READ_CONTACTS) + +class AskPermissionActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + val permissions = intent.getStringArrayExtra(EXTRA_PERMISSIONS) ?: arrayOf(Manifest.permission.RECEIVE_SMS) + Log.d(TAG, "Requesting permissions: ${permissions.toList()}") + if (SDK_INT < 23 || permissions.any { it !in ALLOWED_PERMISSIONS }) { + sendReply(RESULT_CANCELED) + finish() + } else { + ActivityCompat.requestPermissions(this, permissions, REQUEST_CODE_PERMISSION) + } + } + + private fun sendReply(code: Int = RESULT_OK, extras: Bundle = Bundle.EMPTY) { + intent.getParcelableExtra(EXTRA_MESSENGER)?.let { + it.send(Message.obtain().apply { + what = code + data = extras + }) + } + setResult(code, Intent().apply { putExtras(extras) }) + } + + override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray) { + if (requestCode == REQUEST_CODE_PERMISSION) { + sendReply(extras = bundleOf(EXTRA_GRANT_RESULTS to grantResults)) + finish() + } else { + super.onRequestPermissionsResult(requestCode, permissions, grantResults) + } + } +} \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt new file mode 100644 index 0000000..1969359 --- /dev/null +++ b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt @@ -0,0 +1,359 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.auth.phone + +import android.Manifest.permission.READ_CONTACTS +import android.Manifest.permission.RECEIVE_SMS +import android.annotation.TargetApi +import android.app.Activity +import android.app.AlarmManager +import android.app.PendingIntent +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.content.pm.PackageManager.PERMISSION_GRANTED +import android.database.Cursor +import android.os.* +import android.os.Build.VERSION.SDK_INT +import android.provider.ContactsContract +import android.provider.ContactsContract.CommonDataKinds.Phone +import android.provider.Telephony +import android.telephony.SmsMessage +import android.text.TextUtils +import android.util.Base64 +import android.util.Log +import androidx.core.app.PendingIntentCompat +import androidx.core.content.ContextCompat +import androidx.core.os.bundleOf +import androidx.lifecycle.DefaultLifecycleObserver +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleOwner +import com.google.android.gms.auth.api.phone.SmsRetriever +import com.google.android.gms.common.api.CommonStatusCodes +import com.google.android.gms.common.api.Status +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.Deferred +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import org.microg.gms.auth.phone.SmsRetrieverRequestType.RETRIEVER +import org.microg.gms.auth.phone.SmsRetrieverRequestType.USER_CONSENT +import org.microg.gms.common.Constants +import org.microg.gms.utils.getSignatures +import java.nio.charset.StandardCharsets +import java.security.MessageDigest +import java.util.concurrent.atomic.AtomicInteger + + +private const val TAG = "SmsRetrieverCore" + +private const val ACTION_SMS_RETRIEVE_TIMEOUT = "org.microg.gms.auth.phone.ACTION_SMS_RETRIEVE_TIMEOUT" +private const val EXTRA_REQUEST_ID = "requestId" +private const val TIMEOUT = 1000 * 60 * 5 // 5 minutes +private const val MESSAGE_MAX_LEN = 140 + +class SmsRetrieverCore(private val context: Context, override val lifecycle: Lifecycle) : LifecycleOwner, DefaultLifecycleObserver { + private val requests: HashMap = hashMapOf() + private val requestIdCounter = AtomicInteger(0) + private lateinit var timeoutBroadcastReceiver: BroadcastReceiver + private lateinit var smsBroadcastReceiver: BroadcastReceiver + private var requestCode = 0 + private val alarmManager: AlarmManager + get() = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager + + init { + lifecycle.addObserver(this) + } + + @TargetApi(19) + private fun configureBroadcastListenersIfNeeded() { + synchronized(this) { + if (!this::timeoutBroadcastReceiver.isInitialized) { + val intentFilter = IntentFilter(ACTION_SMS_RETRIEVE_TIMEOUT) + timeoutBroadcastReceiver = TimeoutReceiver() + ContextCompat.registerReceiver(context, timeoutBroadcastReceiver, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED) + } + if (!this::smsBroadcastReceiver.isInitialized) { + val intentFilter = IntentFilter(Telephony.Sms.Intents.SMS_RECEIVED_ACTION) + intentFilter.priority = 999 + smsBroadcastReceiver = SmsReceiver() + context.registerReceiver(smsBroadcastReceiver, intentFilter) + } + } + } + + private suspend fun ensureReady(permissions: Array): Boolean { + if (SDK_INT < 19) throw RuntimeException("Version not supported") + if (!ensurePermission(permissions)) return false + configureBroadcastListenersIfNeeded() + return true + } + + suspend fun startSmsRetriever(packageName: String) { + val appHashString = getHashString(packageName) + + if (!ensureReady(arrayOf(RECEIVE_SMS))) + throw RuntimeException("Initialization failed") + if (anyOtherPackageHasHashString(packageName, appHashString)) + throw RuntimeException("Collision in hash string, can't use SMS Retriever API") + if (requests.values.any { it.packageName == packageName && it.appHashString == appHashString && it.type == RETRIEVER }) + throw RuntimeException("App already listening") + + val request = SmsRetrieverRequest( + id = requestIdCounter.incrementAndGet(), + type = RETRIEVER, + packageName = packageName, + appHashString = appHashString, + timeoutPendingIntent = getTimeoutPendingIntent(context, packageName) + ) + requests[request.id] = request + alarmManager.set(AlarmManager.RTC, request.creation + TIMEOUT, request.timeoutPendingIntent) + } + + suspend fun startWithConsentPrompt(packageName: String, senderPhoneNumber: String?) { + if (!ensureReady(arrayOf(RECEIVE_SMS, READ_CONTACTS))) + throw RuntimeException("Initialization failed") + if (requests.values.any { it.packageName == packageName && it.senderPhoneNumber == senderPhoneNumber && it.type == USER_CONSENT }) + throw RuntimeException("App already listening") + + val request = SmsRetrieverRequest( + id = requestIdCounter.incrementAndGet(), + type = USER_CONSENT, + packageName = packageName, + senderPhoneNumber = senderPhoneNumber, + timeoutPendingIntent = getTimeoutPendingIntent(context, packageName) + ) + requests[request.id] = request + alarmManager.set(AlarmManager.RTC, request.creation + TIMEOUT, request.timeoutPendingIntent) + } + + fun hasOngoingUserConsentRequest(): Boolean { + return requests.values.any { it.type == USER_CONSENT } + } + + private fun sendRetrieverBroadcast(request: SmsRetrieverRequest, messageBody: String) { + sendReply(request, Status.SUCCESS, bundleOf(SmsRetriever.EXTRA_SMS_MESSAGE to messageBody)) + } + + private fun sendUserConsentBroadcast(request: SmsRetrieverRequest, messageBody: String) { + val userConsentIntent = Intent(context, UserConsentPromptActivity::class.java) + userConsentIntent.setPackage(Constants.GMS_PACKAGE_NAME) + userConsentIntent.putExtra(EXTRA_MESSENGER, Messenger(object : Handler(Looper.getMainLooper()) { + override fun handleMessage(msg: Message) { + if (Binder.getCallingUid() == Process.myUid()) { + if (msg.what == MSG_REQUEST_MESSAGE_BODY) { + msg.replyTo?.send(Message.obtain().apply { + what = 1 + data = bundleOf("message" to messageBody) + }) + } else if (msg.what == MSG_CONSUME_MESSAGE) { + finishRequest(request) + } + } + } + })) + + sendReply(request, Status.SUCCESS, bundleOf(SmsRetriever.EXTRA_CONSENT_INTENT to userConsentIntent), false) + } + + private fun getTimeoutPendingIntent(context: Context, packageName: String): PendingIntent { + val intent = Intent(ACTION_SMS_RETRIEVE_TIMEOUT) + intent.setPackage(packageName) + return PendingIntentCompat.getBroadcast(context, ++requestCode, intent, 0, false)!! + } + + private fun tryHandleIncomingMessageAsRetrieverMessage(messageBody: String): Boolean { + for (request in requests.values) { + if (request.type == RETRIEVER) { + // 11-digit hash code that uniquely identifies your app + if (request.appHashString.isNullOrBlank() || !messageBody.contains(request.appHashString)) continue + + sendRetrieverBroadcast(request, messageBody) + return true + } + } + return false + } + + private fun tryHandleIncomingMessageAsUserConsentMessage(senderPhoneNumber: String?, messageBody: String): Boolean { + val senderPhoneNumber = senderPhoneNumber ?: return false + + // 4-10 digit alphanumeric code containing at least one number + if (messageBody.split("[^A-Za-z0-9]".toRegex()).none { it.length in 4..10 && it.any(Char::isDigit) }) return false + + // Sender cannot be in the user's Contacts list + if (isPhoneNumberInContacts(context, senderPhoneNumber)) return false + + for (request in requests.values) { + if (request.type == USER_CONSENT) { + if (!request.senderPhoneNumber.isNullOrBlank() && request.senderPhoneNumber != senderPhoneNumber) continue + + sendUserConsentBroadcast(request, messageBody) + return true + } + } + return false + } + + private fun handleIncomingSmsMessage(senderPhoneNumber: String?, messageBody: String) { + Log.d(TAG, "handleIncomingSmsMessage: senderPhoneNumber:$senderPhoneNumber messageBody: $messageBody") + if (messageBody.isBlank()) return + + if (tryHandleIncomingMessageAsRetrieverMessage(messageBody)) return + if (tryHandleIncomingMessageAsUserConsentMessage(senderPhoneNumber, messageBody)) return + } + + fun handleTimeout(requestId: Int) { + val request = requests[requestId] ?: return + sendReply(request, Status(CommonStatusCodes.TIMEOUT)) + } + + private fun sendReply(request: SmsRetrieverRequest, status: Status, extras: Bundle = Bundle.EMPTY, finish: Boolean = true) { + Log.d(TAG, "Send reply to ${request.packageName} ${CommonStatusCodes.getStatusCodeString(status.statusCode)}") + + val intent = Intent(SmsRetriever.SMS_RETRIEVED_ACTION) + intent.setPackage(request.packageName) + intent.putExtras(extras) + intent.putExtra(SmsRetriever.EXTRA_STATUS, status) + context.sendBroadcast(intent) + + if (finish) finishRequest(request) + } + + fun finishRequest(request: SmsRetrieverRequest) { + alarmManager.cancel(request.timeoutPendingIntent) + requests.remove(request.id) + } + + override fun onDestroy(owner: LifecycleOwner) { + super.onDestroy(owner) + + if (this::smsBroadcastReceiver.isInitialized) context.unregisterReceiver(smsBroadcastReceiver) + if (this::timeoutBroadcastReceiver.isInitialized) context.unregisterReceiver(timeoutBroadcastReceiver) + + for (request in requests.values) { + sendReply(request, Status(CommonStatusCodes.TIMEOUT)) + } + + requests.clear() + } + + @TargetApi(19) + private inner class SmsReceiver : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent) { + if (Telephony.Sms.Intents.SMS_RECEIVED_ACTION == intent.action) { + val messages = Telephony.Sms.Intents.getMessagesFromIntent(intent) + val messageBodyBuilder = StringBuilder() + var senderPhoneNumber: String? = null + for (message in messages) { + messageBodyBuilder.append(message.messageBody) + senderPhoneNumber = message.originatingAddress + } + try { + handleIncomingSmsMessage(senderPhoneNumber, messageBodyBuilder.toString()) + } catch (e: Exception) { + Log.w(TAG, "Error handling incoming SMS", e) + } + } + } + } + + private inner class TimeoutReceiver : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent) { + val requestId = intent.getIntExtra(EXTRA_REQUEST_ID, -1) + if (requestId != -1) { + handleTimeout(requestId) + } + } + } + + @TargetApi(19) + fun getHashString(packageName: String): String { + val signature = + context.packageManager.getSignatures(packageName).firstOrNull()?.toCharsString() ?: throw RuntimeException("No signature found for $packageName") + val appInfo = "$packageName $signature" + val messageDigest = MessageDigest.getInstance("SHA-256") + messageDigest.update(appInfo.toByteArray(StandardCharsets.UTF_8)) + return Base64.encodeToString(messageDigest.digest(), Base64.NO_PADDING or Base64.NO_WRAP).substring(0, 11) + } + + private fun anyOtherPackageHasHashString(packageName: String, hashString: String): Boolean { + val collision = context.packageManager.getInstalledPackages(0) + .firstOrNull { it.packageName != packageName && getHashString(it.packageName) == hashString } ?: return false + + Log.w(TAG, "Hash string collision between $packageName and ${collision.packageName} (both are $hashString)") + return true + } + + private fun isPhoneNumberInContacts(context: Context, phoneNumber: String): Boolean { + fun normalizePhoneNumber(input: String): String { + var output = "" + if (!TextUtils.isEmpty(input)) { + // only keep digits + val temp = input.replace("[^0-9]".toRegex(), "") + // trim leading zeroes + output = temp.replaceFirst("^0*".toRegex(), "") + } + return output + } + + val normalizePhoneNumber = normalizePhoneNumber(phoneNumber) + var cursor: Cursor? = null + try { + cursor = context.contentResolver.query(Phone.CONTENT_URI, arrayOf(Phone.NUMBER), null, null, null) ?: return false + while (cursor.moveToNext()) { + val addressIndex = cursor.getColumnIndex(Phone.NUMBER) + val contactPhoneNumber = normalizePhoneNumber(cursor.getString(addressIndex)) + if (!TextUtils.isEmpty(normalizePhoneNumber) && !TextUtils.isEmpty(contactPhoneNumber) && normalizePhoneNumber == contactPhoneNumber) { + return true + } + } + } catch (e: Exception) { + Log.w(TAG, e) + } finally { + cursor?.close() + } + return false + } + + private val activePermissionRequestLock = Mutex() + private var activePermissionRequest: Deferred? = null + + private suspend fun ensurePermission(permissions: Array): Boolean { + if (SDK_INT < 23) + return true + + if (permissions.all { ContextCompat.checkSelfPermission(context, it) == PERMISSION_GRANTED }) + return true + + val (completable, deferred) = activePermissionRequestLock.withLock { + if (activePermissionRequest == null) { + val completable = CompletableDeferred() + activePermissionRequest = completable + completable to activePermissionRequest!! + } else { + null to activePermissionRequest!! + } + } + if (completable != null) { + val intent = Intent(context, AskPermissionActivity::class.java) + intent.putExtra(EXTRA_MESSENGER, Messenger(object : Handler(Looper.getMainLooper()) { + override fun handleMessage(msg: Message) { + if (msg.what == Activity.RESULT_OK) { + val grantResults = msg.data?.getIntArray(EXTRA_GRANT_RESULTS) ?: IntArray(0) + completable.complete(grantResults.size == permissions.size && grantResults.all { it == PERMISSION_GRANTED }) + } else { + completable.complete(false) + } + } + })) + intent.putExtra(EXTRA_PERMISSIONS, permissions) + intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK + context.startActivity(intent) + } + return deferred.await() + } +} \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverRequest.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverRequest.kt new file mode 100644 index 0000000..0f942df --- /dev/null +++ b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverRequest.kt @@ -0,0 +1,22 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.auth.phone + +import android.app.PendingIntent + +data class SmsRetrieverRequest( + val id: Int, + val type: SmsRetrieverRequestType, + val packageName: String, + val timeoutPendingIntent: PendingIntent, + val appHashString: String? = null, + val creation: Long = System.currentTimeMillis(), + val senderPhoneNumber: String? = null +) + +enum class SmsRetrieverRequestType { + RETRIEVER, USER_CONSENT +} \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt new file mode 100644 index 0000000..76fe535 --- /dev/null +++ b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt @@ -0,0 +1,131 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.auth.phone + +import android.util.Log +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.lifecycleScope +import com.google.android.gms.auth.api.phone.SmsRetrieverStatusCodes +import com.google.android.gms.auth.api.phone.internal.IAutofillPermissionStateCallback +import com.google.android.gms.auth.api.phone.internal.IOngoingSmsRequestCallback +import com.google.android.gms.auth.api.phone.internal.ISmsRetrieverApiService +import com.google.android.gms.auth.api.phone.internal.ISmsRetrieverResultCallback +import com.google.android.gms.common.Feature +import com.google.android.gms.common.api.CommonStatusCodes +import com.google.android.gms.common.api.Status +import com.google.android.gms.common.api.internal.IStatusCallback +import com.google.android.gms.common.internal.ConnectionInfo +import com.google.android.gms.common.internal.GetServiceRequest +import com.google.android.gms.common.internal.IGmsCallbacks +import org.microg.gms.BaseService +import org.microg.gms.common.GmsService +import org.microg.gms.common.PackageUtils + + +private const val TAG = "SmsRetrieverService" +private val FEATURES = arrayOf( + Feature("sms_retrieve", 1), + Feature("user_consent", 3) +) + +class SmsRetrieverService : BaseService(TAG, GmsService.SMS_RETRIEVER) { + private val smsRetriever = SmsRetrieverCore(this, lifecycle) + + override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) { + val packageName = PackageUtils.getAndCheckCallingPackage(this, request.packageName) + ?: throw IllegalArgumentException("Missing package name") + callback.onPostInitCompleteWithConnectionInfo( + CommonStatusCodes.SUCCESS, + SmsRetrieverServiceImpl(smsRetriever, packageName, lifecycle), + ConnectionInfo().apply { features = FEATURES } + ) + } +} + + +class SmsRetrieverServiceImpl(private val smsRetriever: SmsRetrieverCore, private val packageName: String, override val lifecycle: Lifecycle) : + ISmsRetrieverApiService.Stub(), LifecycleOwner { + + override fun startSmsRetriever(callback: ISmsRetrieverResultCallback) { + Log.d(TAG, "startSmsRetriever()") + lifecycleScope.launchWhenStarted { + val status = try { + smsRetriever.startSmsRetriever(packageName) + Status.SUCCESS + } catch (e: Exception) { + Status(CommonStatusCodes.INTERNAL_ERROR, e.message) + } + try { + callback.onResult(status) + } catch (e: Exception) { + Log.w(TAG, "Failed delivering $status for startSmsRetriever()", e) + } + } + } + + override fun startWithConsentPrompt(senderPhoneNumber: String?, callback: ISmsRetrieverResultCallback) { + Log.d(TAG, "startWithConsentPrompt($senderPhoneNumber)") + lifecycleScope.launchWhenStarted { + val status = try { + smsRetriever.startWithConsentPrompt(packageName, senderPhoneNumber) + Status.SUCCESS + } catch (e: Exception) { + Status(CommonStatusCodes.INTERNAL_ERROR, e.message) + } + try { + callback.onResult(status) + } catch (e: Exception) { + Log.w(TAG, "Failed delivering $status for startWithConsentPrompt()", e) + } + } + } + + override fun startSmsCodeAutofill(callback: IStatusCallback) { + Log.d(TAG, "startSmsCodeAutofill()") + try { + callback.onResult(Status(SmsRetrieverStatusCodes.API_NOT_AVAILABLE)) + } catch (e: Exception) { + Log.w(TAG, "Failed delivering result for startSmsCodeAutofill()", e) + } + } + + override fun checkAutofillPermissionState(callback: IAutofillPermissionStateCallback) { + Log.d(TAG, "checkAutofillPermissionState()") + try { + callback.onCheckPermissionStateResult(Status.SUCCESS, 1) + } catch (e: Exception) { + Log.w(TAG, "Failed delivering result for checkAutofillPermissionState()", e) + } + } + + override fun checkOngoingSmsRequest(packageName: String?, callback: IOngoingSmsRequestCallback) { + Log.d(TAG, "checkOngoingSmsRequest($packageName)") + lifecycleScope.launchWhenStarted { + val result = try { + smsRetriever.hasOngoingUserConsentRequest() + } catch (e: Exception) { + true + } + + try { + callback.onHasOngoingSmsRequestResult(Status.SUCCESS, result) + } catch (e: Exception) { + Log.w(TAG, "Failed delivering $result for checkOngoingSmsRequest()", e) + } + } + } + + + override fun startSmsCodeBrowser(callback: IStatusCallback) { + Log.d(TAG, "startSmsCodeBrowser()") + try { + callback.onResult(Status(SmsRetrieverStatusCodes.API_NOT_AVAILABLE)) + } catch (e: Exception) { + Log.w(TAG, "Failed delivering result for startSmsCodeBrowser()", e) + } + } +} \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/UserConsentPromptActivity.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/UserConsentPromptActivity.kt new file mode 100644 index 0000000..2ec81da --- /dev/null +++ b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/UserConsentPromptActivity.kt @@ -0,0 +1,79 @@ +/* + * SPDX-FileCopyrightText: 2023 microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.microg.gms.auth.phone + +import android.annotation.TargetApi +import android.content.Intent +import android.os.* +import android.text.Html +import android.view.Gravity +import android.view.ViewGroup.LayoutParams +import android.widget.Button +import android.widget.TextView +import androidx.appcompat.app.AppCompatActivity +import com.google.android.gms.auth.api.phone.SmsRetriever +import org.microg.gms.ui.buildAlertDialog +import org.microg.gms.utils.getApplicationLabel + +private const val TAG = "UserConsentPrompt" + +class UserConsentPromptActivity : AppCompatActivity() { + private val messenger: Messenger? + get() = intent.getParcelableExtra(EXTRA_MESSENGER) + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + val callingPackage = callingActivity?.packageName ?: return finish() + val messenger = messenger ?: return finish() + messenger.send(Message.obtain().apply { + what = MSG_REQUEST_MESSAGE_BODY + replyTo = Messenger(object : Handler(Looper.getMainLooper()) { + override fun handleMessage(msg: Message) { + if (msg.what == MSG_REQUEST_MESSAGE_BODY) { + val message = msg.data.getString("message") ?: return + showConsentDialog(callingPackage, message) + } + } + }) + }) + } + + @TargetApi(16) + private fun showConsentDialog(callingPackage: String, message: String) { + val view = layoutInflater.inflate(R.layout.dialog_sms_user_consent, null) + val dialog = buildAlertDialog() + .setCancelable(false) + .setView(view) + .create() + val appName = packageManager.getApplicationLabel(callingPackage) + + view.findViewById(android.R.id.title).text = Html.fromHtml(getString(R.string.sms_user_consent_title, Html.escapeHtml(appName))) + view.findViewById(android.R.id.text1).text = message + view.findViewById