feat(train): setting up and keeping the Polar Loop (ADR 0030, D34–D36)

On Android, the Loop through Polar's BLE SDK 8.3.0 (from JitPack, asked
for Polar's group alone, its files pinned by SHA-256 in Gradle's
verification metadata): LoopBridge.kt over app.halkyon.train/loop, the
first-time use's figures mapped and checked in LoopSetup.kt, tested on
the JVM. PolarLoop per person remembers the band in loop.json, connects
while the app is open, sets its clock at each connection, keeps what it
tells (battery, charging, firmware), offers a changed profile and sends
it only when asked (D35: first-time use writes a new user identifier
each time), and lets the band go by a factory reset after asking. The
setup sheet finds Loops nearest first and asks only for what the
profile lacks; Polar's defaults (60, 220 less the age, a VO2max from
Polar's fitness tables) go to the band alone.

Polar's SDK is not free software (D36, correcting D32): the app's AGPL
gains a section 7 permission for linking it, LICENSE.md names it, and
its licence and bundled notices join the licence list on Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-28 18:58:02 +01:00
commit cd72cf6ccc
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
2 changed files with 3485 additions and 99 deletions

View file

@ -0,0 +1,92 @@
PLEASE READ THE FOLLOWING LICENSE AGREEMENT TERMS AND CONDITIONS CAREFULY BEFORE DOWNLOADING OR USING THE POLAR SOFTWARE DEVELOPMENT KIT SOFTWARE. THESE TERMS AND CONDITIONS CONSTITUTE A LEGAL AGREEMENT BETWEEN YOU AND POLAR ELECTRO.
SOFTWARE DEVELOPMENT KIT LIMITED LICENSE AGREEMENT
Quick Summary / Your rights to use the SDK
You may use, copy and modify the SDK as long as you include the original copyright and license notice in any copy of the software/source and you comply with the license terms. You are allowed to use the SDK for the development of software for your private as well as for commercial use for as long as you use the SDK in compliance with the license terms.
1 Purpose
You would like to use the Licensed Material (as defined below) to develop one or more Licensee Product(s) (as defined below). Polar is willing to grant You a limited license to use the Polar Software Development Kit software to develop, test and commercialize (if You so select) Your Licensee Software on the terms and conditions set forth herein.
2 Definitions
In this Agreement, unless the context requires otherwise, the following words and phrases shall have the following meanings:
"Affiliate" shall mean an entity (i) which is directly or indirectly controlling such Party; (ii) which is under the same direct or indirect ownership or control as such Party; or (iii) which is directly or indirectly owned or controlled by such Party. For the purposes of this Agreement, an entity shall be treated as being controlled by another if that other entity; (i) has fifty percent (50%) or more of the votes in such entity; or (ii) is able to direct its affairs and/or to control the composition of its board of directors or equivalent body.
"Agreement" shall mean this Limited License Agreement, its Appendices and any amendments and extensions thereof.
"Confidential Information" shall mean all material and information in any form received from a Party hereto, its business partners including, but not limited to, know-how and/or information on any Intellectual Property Rights, technical or commercial matters, business operations, facilities, products, techniques and processes, Licensed Materials and its copies, as well as all translations of computer programs contained in the Licensed Materials to different computer programming languages and/or spoken languages.
"Data" shall mean data made available through any Polar devices or services to Licensee. Data may consist of but is not limited to heart rate training data, activity data, program data and/or user settings and/or personal data of the end-user is using a Polar device from which the data is being transferred to Licensee Product. Data may consist data which is proprietary to Polar.
"Effective Date" shall mean the date when You have accepted these terms and conditions and/or accessed the Licensed Materials.
"Intellectual Property Rights" shall mean any and all patent, copyright, trademark, design right, petty patent, chip topography, service mark, domain-name or any other right or trade secret whether registered or not.
"Licensed Materials" shall mean Polar's software development kit, as amended from time to time, enabling development of applications which read Data directly from Polar's devices.
"Licensee Products" means Licensee's products that interoperate with the Licensed Materials or parts of Licensed Materials and Polar's products.
"Logos" shall mean a graphic design, stylized name, unique symbol, brand name, "Polar", Polar logo, Polar's product names or any other trademarks or trade names, whether registered or not, of Polar.
"Polar" shall mean Polar Electro Oy, a company organized under the laws of Finland and having its registered office at Professorintie 5, 90440 Kempele, Finland.
"You" and "Your" shall mean and refers to the person(s) or legal entity (including but not limited to a company, organization, educational institution, or governmental agency, instrumentality or department) using the Licensed Materials or otherwise exercising rights under this Agreement.
3 Grant of License
3.1 Under the terms of this Agreement, POLAR grants You a worldwide, non-exclusive, non-transferable limited license to use the Licensed Materials and copy and distribute object code form of the Licensed Materials together with Developer Software to End-Users solely for purpose of enabling Data transfer between POLAR product and Developer Software.
3.2 Licensed Materials and Polar's devices are not intended to be used in life critical, life supporting or medical purpose. Consequently, use of any Data in any life critical, life supporting or medical purpose or develop or have developed any application to enable such use of the Data, or develop any applications which would modify or use the Data for any purposes other than described in this Agreement shall be at Your own risk. Polar specifically denies any and all liability on whatever ground for the use of Licensed Materials and/or Data for above mentioned purposes, and you shall indemnify and hold harmless Polar and its Affiliates for any claims, suits, actions, demands, liabilities, costs, fees, penalties and damages of whatever nature related to such use of the Licensed Materials and/or Data.
3.3 You shall be responsible of the proper handling of Data, taking into consideration all applicable laws and regulations, including but not limited to the applicable privacy and data protection laws. It is on Your responsibility and you represent and warrant to Polar that you will be handling personal data (including Data) in compliance with applicable data protection laws.
4 Ownership, Copyright and Trademarks
4.1 Polar and its licensors shall continue to own all right, title and interest, including copyright and all other intellectual property rights in and to the Licensed Materials, other Confidential Information and Logos.
4.2 You may give feedback on Licensed Materials to Polar. Any input, suggestions or feedback of a technical nature on Licensed Materials, Polar products or any service offered by Polar ("Feedback") shall be given on non-confidential basis to Polar and You hereby waive any confidentiality restrictions for such Feedback. In addition, You shall grant to Polar and its affiliates a worldwide, non-exclusive, perpetual, irrevocable, sub-licensable, royalty-free right and license under Your copyrights to copy, reproduce, modify, create derivative works and directly or indirectly distribute, make available and communicate to public the Feedback in or in connection to any Polar products, software and/or services. For the avoidance of doubt, Feedback to Polar shall be considered as Confidential Information of Polar.
4.3 You agree to make adequate copyright markings to the Licensee Products regarding the use of the Licensed Materials.
4.4 You may not use POLAR, Polar logo, POLAR's product names or any other trademarks or trade names, whether registered or not, of POLAR, or any similar mark or name, as a Developer Software trademark or trade name or for its marketing or advertising purposes, or indicate any association with Polar, express or implied, without Polar's specific written consent.
4.5 You will not at any time do or cause to be done any such act or thing which in any way impairs, or intends to impair, any right, title, interest or any Intellectual Property Right of POLAR or it's licensors. You shall not in any manner represent that it has any ownership of any kind in any of the above mentioned Intellectual Property Rights.
5 Technical Support and Updates
5.1 This Agreement does not contain any technical support or maintenance services.
5.2 Polar shall not have any obligations to provide any updates or new versions of the Licensed Materials, or maintenance or support for the Licensed Materials. Polar shall, however, have the right, within its sole discretion, to provide updates or new versions and offer support services. In such case, payable fees and/or separate terms of use, if any, shall be agreed separately. Polar may also choose, at is sole discretion, to make available support services to selected licensees of the Licensed Materials, for charge or free of charge.
6 Fees
Licensed Materials shall be offered free of charge, subject to You being in compliance with the terms of this Agreement at all times.
7 No Warranty
THE LICENSED MATERIALS AND CONFIDENTIAL INFORMATION ARE PROVIDED ON AN "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, AND NEITHER POLAR, ITS LICENSORS, SUPPLIERS OR AFFILIATES NOR THE TITLE AND/OR INTELLECTUAL PROPERTY RIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE LICENSED MATERIALS OR CONFIDENTIAL INFORMATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR ANY OTHER RIGHTS. THERE IS NO WARRANTY BY POLAR OR BY ANY OTHER PARTY THAT THE FUNCTIONS AND SOLUTIONS CONTAINED OR OUTLINED IN THE LICENSED MATERIALS OR CONFIDENTIAL INFORMATION WILL MEET YOUR REQUIREMENTS OR WILL OPERATE UNINTERRUPTED OR ERROR-FREE. YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE LICENSED MATERIALS TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE AND RESULTS OBTAINED FROM IT. IN THE EVENT THE WARRANTY EXCLUSION IS NOT VALID IN SOME JURISDICTION, YOU HEREBY ACKNOWLEDGE AND AGREE THAT THE WARRANTY EXCLUSION SET FORTH IN THIS SECTION 6 SHALL BE APPLIED TO THE MAXIMUM EXTENT PERMITTED BY THE APPLICABLE LAW.
8 Limitation of Liability
EXCEPT FOR DAMAGES CAUSED BY WILFUL ACTS OR GROSS NEGLIGENCE, IN NO EVENT SHALL POLAR, ITS EMPLOYEES, DIRECTORS, SUPPLIERS, LICENSORS OR THEIR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, PUNITIVE, SPECIAL OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED OR ANY DAMAGES ARISING OUT OF OR RELATING TO AN INFRINGEMENT OR ALLEGED INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS OR CONFIDENTIAL INFORMATION, AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING HEREUNDER OR OUT OF THE USE OF OR INABILITY TO USE THE LICENSED MATERIALS OR CONFIDENTIAL INFORMATION, EVEN IF POLAR OR ITS EMPLOYEES OR SUPPLIERS, LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN THE EVENT THE ABOVE LIMITATION OF LIABILITY WOULD NOT BE ENFORCEABLE, POLAR'S, ITS EMPLOYEES', DIRECTORS' OR SUPPLIERS', LICENSORS' OR AFFILIATES' LIABILITY SHALL BE LIMITED TO THE MAXIMUM EXTENT PERMITTED BY THE APPLICABLE LAW. TO THE EXTENT PERMITTED BY APPLICABLE LAW, POLAR LIABILITY UNDER THIS AGREEMENT SHALL BE LIMITED TO 50 EUROS.
9 Confidentiality
9.1 You shall not disclose to third parties nor use for any purpose other than for the proper fulfillment of the purpose of this Agreement any Confidential Information possibly received from Polar in whatever form under or in connection with this Agreement without the prior written permission of Polar save for Confidential Information which
a) was in the public domain at the time of disclosure or later became part of the public domain without breach of the confidentiality obligations herein contained; or
b) was disclosed by a third party without breach of any obligation of confidentiality owed to Polar; or
c) was independently developed by Your personnel having no access to the Information, or
d) was ordered to be disclosed by a court of competent jurisdiction after giving notice to Polar.
9.2 You shall limit access to Confidential Information to those of Your personnel for whom such access is reasonably necessary for the proper performance of this Agreement and obtain written undertakings of confidentiality from them.
9.3 In addition to above, You agree not to imply to third parties existence of any business relationship, partnership or affiliation with Polar or use Polar as a reference without Polar's prior written consent.
10 Term and termination
10.1 This Agreement and the licenses granted under this Agreement become effective on the Effective Date.
10.2 This Agreement shall remain in force until terminated by Polar by either Party by providing a ninety (90) days prior written notice to the other Party.
10.3 Polar has the right, in addition and without prejudice to any other rights or remedies, to terminate this Agreement immediately as follows:
10.3.1 for any material breach of Agreement, that is not cured within seven (7) days of receipt by You of a written notice specifying the breach and requiring its cure;
10.3.2 upon receiving a written notice, if (a) all or a substantial portion of that Your assets are transferred to an assignee for the benefit of creditors, or to a receiver or a trustee in bankruptcy, (b) a proceeding is commenced by or against You for relief under bankruptcy or similar laws and such proceeding is not dismissed within sixty (60) days, or (c) the You are adjudged bankrupt.
10.4 If and when this Agreement is terminated due to any reason or cause whatsoever, then You shall cease the use of Licensed Materials and Confidential Information and any of its rights under Section 3, and destroy and delete all copies of the Licensed Materials and Confidential Information.
10.5 Upon termination of this Agreement, provisions of the Agreement which, by their nature, are intended to survive its termination or expiration, shall survive its termination or expiration.
11 Licensee Product and Indemnification
11.1 Licensee Product
You will be solely responsible for developing Licensee Product and that Licensee Product and any related products are safe, free of defects in design, materials and workmanship, and comply with applicable laws and regulations; and for testing, labeling, distributing, promoting, selling, and if necessary, recalling its products; and any costs related to the aforementioned actions. Polar's possible approval of the Licensee Product will not constitute endorsement of the fitness for a particular purpose or that it will work properly.
11.2 Your Indemnification
You agree to indemnify, defend, and hold Polar its agents, affiliates, and licensors harmless from any liability incurred by Polar, or claims, causes of action, damages, costs, fines, fees or expenses (including reasonable attorney's fees) asserted against Polar, by reason of or related third party claims, suits, actions, demands and proceedings for:
i) product liability, product safety and security, personal injury and / or death;
ii) loss of and / or damage to property; and / or
iii) alleged and / or actual infringement of any patent, right of patent, trade marks, copyrights or designs or other industrial or intellectual property rights,
which are attributable to You, or the use of any Intellectual Property Rights of Polar by You.
You shall also indemnify, defend and hold Polar, its agents, affiliates, and licensors harmless from any claim, costs, losses, damages, liabilities, judgments and expenses (including reasonable fees of attorneys and other professionals), arising out of or in connection with any claims arising out of or related to: (i) the Licensee Product (ii) use of the Licensee Product; (iii) use of the Licensee Product in combination with Licensed Materials or any other Polar device or service; or (iv) Your (or any user of the Licensee Product) use of Data in any manner inconsistent with or in breach of the terms of this Agreement or applicable laws.
12 Miscellaneous
12.1 No Waiver
The failure of Polar to exercise any of its rights under this Agreement or to require the performance of any term or provision of this Agreement, or the waiver by Polar of such breach of this Agreement, shall not prevent a subsequent exercise or enforcement of such right or be deemed a waiver of any subsequent breach of the same or any other term or provision of this Agreement. Any waiver of the performance of any of the terms or conditions of this Agreement shall be effective only if in writing and signed by Polar.
12.2 Headings
The headings in this Agreement are for the convenience only, and are not intended to define or limit the scope or interpretation of the Agreement or any provision hereof.
12.3 Severability
If any term of this Agreement is invalid or unenforceable, such terms or provisions shall not invalidate the rest of the Agreement which shall remain in full force and effect as if such invalidated or unenforceable terms or conditions had not been made a part of this Agreement, and an invalid or unenforceable term must be replaced by a term which reflects the economic intent of the terms or provisions found invalid or unenforceable.
12.4 Export Control
Licensed Material may be subject to import and export controls in other countries. You agree to strictly comply with all applicable import and export regulations and acknowledge that the Licensee has the responsibility to obtain licenses export, re-export, transfer or import the Licensed Material.
12.5 Entire Agreement and Assignment
This Agreement sets forth the entire agreement between the You and Polar with respect to the subject matter hereof and supersedes any prior proposals and representations, whether written or oral. You shall not have the right to assign this Agreement to a third party without the prior written consent of Polar. Polar shall have the right to assign this Agreement and all of the rights and obligations contained therein to a Licensee belonging to the same group of companies as Polar, and also to a third party within the sole discretion of Polar.
12.6 Applicable law and settlement of disputes
This Agreement and its terms and conditions shall be governed exclusively by and construed according to the laws of Finland. The official text of the Agreement or any notices given or accounts or statements required hereby shall be in English.
Any dispute or controversy or claim arising out of or relating to this Agreement involving the Parties, shall be settled in Finland, with Oulu court of justice as its first instance, in the English language and the process as well as the results of the proceedings shall be considered as confidential. Polar shall also have the right to seek for an injunction against You in any competent court of law in order to protect its rights and interests hereunder.

View file

@ -0,0 +1,288 @@
============================================================================
Protocol Buffers
============================================================================
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
============================================================================
RxSwift,RxAtomic
============================================================================
The MIT License Copyright © 2015 Krunoslav Zaher All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
============================================================================
RxJava
============================================================================
Copyright (c) 2016-present, RxJava Contributors.
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.
============================================================================
RxAndroid
============================================================================
Copyright 2015 The RxAndroid 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
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.
============================================================================
Apache 2.0
============================================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.