");
110 | }
111 |
112 | private void appendNoticesContainerEnd(final StringBuilder noticesHtmlBuilder) {
113 | noticesHtmlBuilder.append("");
114 | }
115 |
116 | private String getLicenseText(final License license) {
117 | if (license != null) {
118 | if (!mLicenseTextCache.containsKey(license)) {
119 | mLicenseTextCache.put(license, mShowFullLicenseText ? license.getFullText(mContext) : license.getSummaryText(mContext));
120 | }
121 | return mLicenseTextCache.get(license);
122 | }
123 | return "";
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/NoticesXmlParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog;
18 |
19 | import android.util.Xml;
20 |
21 | import org.xmlpull.v1.XmlPullParser;
22 | import org.xmlpull.v1.XmlPullParserException;
23 |
24 | import java.io.IOException;
25 | import java.io.InputStream;
26 |
27 | import de.psdev.licensesdialog.licenses.License;
28 | import de.psdev.licensesdialog.model.Notice;
29 | import de.psdev.licensesdialog.model.Notices;
30 |
31 | public final class NoticesXmlParser {
32 |
33 | private NoticesXmlParser() {
34 | }
35 |
36 | public static Notices parse(final InputStream inputStream) throws Exception {
37 | try {
38 | final XmlPullParser parser = Xml.newPullParser();
39 | parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
40 | parser.setInput(inputStream, null);
41 | parser.nextTag();
42 | return parse(parser);
43 | } finally {
44 | inputStream.close();
45 | }
46 | }
47 |
48 | private static Notices parse(final XmlPullParser parser) throws IOException, XmlPullParserException {
49 | final Notices notices = new Notices();
50 | parser.require(XmlPullParser.START_TAG, null, "notices");
51 | while (parser.next() != XmlPullParser.END_TAG) {
52 | if (parser.getEventType() != XmlPullParser.START_TAG) {
53 | continue;
54 | }
55 | final String name = parser.getName();
56 | // Starts by looking for the entry tag
57 | if ("notice".equals(name)) {
58 | notices.addNotice(readNotice(parser));
59 | } else {
60 | skip(parser);
61 | }
62 | }
63 | return notices;
64 | }
65 |
66 | private static Notice readNotice(final XmlPullParser parser) throws IOException,
67 | XmlPullParserException {
68 | parser.require(XmlPullParser.START_TAG, null, "notice");
69 | String name = null;
70 | String url = null;
71 | String copyright = null;
72 | License license = null;
73 | while (parser.next() != XmlPullParser.END_TAG) {
74 | if (parser.getEventType() != XmlPullParser.START_TAG) {
75 | continue;
76 | }
77 | final String element = parser.getName();
78 | if ("name".equals(element)) {
79 | name = readName(parser);
80 | } else if ("url".equals(element)) {
81 | url = readUrl(parser);
82 | } else if ("copyright".equals(element)) {
83 | copyright = readCopyright(parser);
84 | } else if ("license".equals(element)) {
85 | license = readLicense(parser);
86 | } else {
87 | skip(parser);
88 | }
89 | }
90 | return new Notice(name, url, copyright, license);
91 | }
92 |
93 | private static String readName(final XmlPullParser parser) throws IOException, XmlPullParserException {
94 | return readTag(parser, "name");
95 | }
96 |
97 | private static String readUrl(final XmlPullParser parser) throws IOException, XmlPullParserException {
98 | return readTag(parser, "url");
99 | }
100 |
101 | private static String readCopyright(final XmlPullParser parser) throws IOException, XmlPullParserException {
102 | return readTag(parser, "copyright");
103 | }
104 |
105 | private static License readLicense(final XmlPullParser parser) throws IOException, XmlPullParserException {
106 | final String license = readTag(parser, "license");
107 | return LicenseResolver.read(license);
108 | }
109 |
110 | private static String readTag(final XmlPullParser parser, final String tag) throws IOException, XmlPullParserException {
111 | parser.require(XmlPullParser.START_TAG, null, tag);
112 | final String title = readText(parser);
113 | parser.require(XmlPullParser.END_TAG, null, tag);
114 | return title;
115 | }
116 |
117 | private static String readText(final XmlPullParser parser) throws IOException, XmlPullParserException {
118 | String result = "";
119 | if (parser.next() == XmlPullParser.TEXT) {
120 | result = parser.getText();
121 | parser.nextTag();
122 | }
123 | return result;
124 | }
125 |
126 | private static void skip(final XmlPullParser parser) throws XmlPullParserException, IOException {
127 | if (parser.getEventType() != XmlPullParser.START_TAG) {
128 | throw new IllegalStateException();
129 | }
130 | int depth = 1;
131 | while (depth != 0) {
132 | switch (parser.next()) {
133 | case XmlPullParser.END_TAG:
134 | depth--;
135 | break;
136 | case XmlPullParser.START_TAG:
137 | depth++;
138 | break;
139 | }
140 | }
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/ApacheSoftwareLicense20.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import de.psdev.licensesdialog.R;
22 |
23 | public class ApacheSoftwareLicense20 extends License {
24 |
25 | private static final long serialVersionUID = 4854000061990891449L;
26 |
27 | @Override
28 | public String getName() {
29 | return "Apache Software License 2.0";
30 | }
31 |
32 | @Override
33 | public String readSummaryTextFromResources(final Context context) {
34 | return getContent(context, R.raw.asl_20_summary);
35 | }
36 |
37 | @Override
38 | public String readFullTextFromResources(final Context context) {
39 | return getContent(context, R.raw.asl_20_full);
40 | }
41 |
42 | @Override
43 | public String getVersion() {
44 | return "2.0";
45 | }
46 |
47 | @Override
48 | public String getUrl() {
49 | return "https://www.apache.org/licenses/LICENSE-2.0.txt";
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/BSD2ClauseLicense.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class BSD2ClauseLicense extends License {
23 |
24 | private static final long serialVersionUID = -5205394619884027401L;
25 |
26 | @Override
27 | public String getName() {
28 | return "BSD 2-Clause License";
29 | }
30 |
31 | @Override
32 | public String readSummaryTextFromResources(final Context context) {
33 | return getContent(context, R.raw.bsd2_summary);
34 | }
35 |
36 | @Override
37 | public String readFullTextFromResources(final Context context) {
38 | return getContent(context, R.raw.bsd2_full);
39 | }
40 |
41 | @Override
42 | public String getVersion() {
43 | return "";
44 | }
45 |
46 | @Override
47 | public String getUrl() {
48 | return "https://opensource.org/licenses/BSD-2-Clause";
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/BSD3ClauseLicense.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class BSD3ClauseLicense extends License {
23 |
24 | private static final long serialVersionUID = -5205394619884057474L;
25 |
26 | @Override
27 | public String getName() {
28 | return "BSD 3-Clause License";
29 | }
30 |
31 | @Override
32 | public String readSummaryTextFromResources(final Context context) {
33 | return getContent(context, R.raw.bsd3_summary);
34 | }
35 |
36 | @Override
37 | public String readFullTextFromResources(final Context context) {
38 | return getContent(context, R.raw.bsd3_full);
39 | }
40 |
41 | @Override
42 | public String getVersion() {
43 | return "";
44 | }
45 |
46 | @Override
47 | public String getUrl() {
48 | return "https://opensource.org/licenses/BSD-3-Clause";
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/CreativeCommonsAttribution30Unported.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Peter Heisig
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class CreativeCommonsAttribution30Unported extends License {
23 |
24 | private static final long serialVersionUID = -8244155573094118433L;
25 |
26 | @Override
27 | public String getName() {
28 | return "Creative Commons Attribution 3.0 Unported";
29 | }
30 |
31 | @Override
32 | public String readSummaryTextFromResources(final Context context) {
33 | return getContent(context, R.raw.ccby_30_summary);
34 | }
35 |
36 | @Override
37 | public String readFullTextFromResources(final Context context) {
38 | return getContent(context, R.raw.ccby_30_full);
39 | }
40 |
41 | @Override
42 | public String getVersion() {
43 | return "3.0";
44 | }
45 |
46 | @Override
47 | public String getUrl() {
48 | return "https://creativecommons.org/licenses/by/3.0/";
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/CreativeCommonsAttributionNoDerivs30Unported.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Peter Heisig
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class CreativeCommonsAttributionNoDerivs30Unported extends License {
23 |
24 | @Override
25 | public String getName() {
26 | return "Creative Commons Attribution-NoDerivs 3.0 Unported";
27 | }
28 |
29 | @Override
30 | public String readSummaryTextFromResources(final Context context) {
31 | return getContent(context, R.raw.ccand_30_summary);
32 | }
33 |
34 | @Override
35 | public String readFullTextFromResources(final Context context) {
36 | return getContent(context, R.raw.ccand_30_full);
37 | }
38 |
39 | @Override
40 | public String getVersion() {
41 | return "3.0";
42 | }
43 |
44 | @Override
45 | public String getUrl() {
46 | return "https://creativecommons.org/licenses/by-nd/3.0/";
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/CreativeCommonsAttributionShareAlike30Unported.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Peter Heisig
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import de.psdev.licensesdialog.R;
22 |
23 | public class CreativeCommonsAttributionShareAlike30Unported extends License {
24 |
25 | private static final long serialVersionUID = -1221518691431383957L;
26 |
27 | @Override
28 | public String getName() {
29 | return "Creative Commons Attribution-Share Alike 3.0 Unported";
30 | }
31 |
32 | @Override
33 | public String readSummaryTextFromResources(final Context context) {
34 | return getContent(context, R.raw.ccbysa_30_summary);
35 | }
36 |
37 | @Override
38 | public String readFullTextFromResources(final Context context) {
39 | return getContent(context, R.raw.ccbysa_30_full);
40 | }
41 |
42 | @Override
43 | public String getVersion() {
44 | return "3.0";
45 | }
46 |
47 | @Override
48 | public String getUrl() {
49 | return "https://creativecommons.org/licenses/by-sa/3.0/";
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/EclipsePublicLicense10.java:
--------------------------------------------------------------------------------
1 | package de.psdev.licensesdialog.licenses;
2 |
3 | import android.content.Context;
4 |
5 | import de.psdev.licensesdialog.R;
6 |
7 | public class EclipsePublicLicense10 extends License {
8 |
9 | @Override
10 | public String getName() {
11 | return "Eclipse Public License 1.0";
12 | }
13 |
14 | @Override
15 | public String readSummaryTextFromResources(Context context) {
16 | return getContent(context, R.raw.epl_v10_summary);
17 | }
18 |
19 | @Override
20 | public String readFullTextFromResources(Context context) {
21 | return getContent(context, R.raw.epl_v10_full);
22 | }
23 |
24 | @Override
25 | public String getVersion() {
26 | return "1.0";
27 | }
28 |
29 | @Override
30 | public String getUrl() {
31 | return "https://www.eclipse.org/legal/epl-v10.html";
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/GnuGeneralPublicLicense20.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Shaleen Jain
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class GnuGeneralPublicLicense20 extends License {
23 |
24 | @Override
25 | public String getName() {
26 | return "GNU General Public License 2.0";
27 | }
28 |
29 | @Override
30 | public String readSummaryTextFromResources(final Context context) {
31 | return getContent(context, R.raw.gpl_20_summary);
32 | }
33 |
34 | @Override
35 | public String readFullTextFromResources(final Context context) {
36 | return getContent(context, R.raw.gpl_20_full);
37 | }
38 |
39 | @Override
40 | public String getVersion() {
41 | return "2.0";
42 | }
43 |
44 | @Override
45 | public String getUrl() {
46 | return "https://www.gnu.org/licenses/";
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/GnuGeneralPublicLicense30.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Shaleen Jain
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class GnuGeneralPublicLicense30 extends License {
23 |
24 | @Override
25 | public String getName() {
26 | return "GNU General Public License 3.0";
27 | }
28 |
29 | @Override
30 | public String readSummaryTextFromResources(final Context context) {
31 | return getContent(context, R.raw.gpl_30_summary);
32 | }
33 |
34 | @Override
35 | public String readFullTextFromResources(final Context context) {
36 | return getContent(context, R.raw.gpl_30_full);
37 | }
38 |
39 | @Override
40 | public String getVersion() {
41 | return "3.0";
42 | }
43 |
44 | @Override
45 | public String getUrl() {
46 | return "https://www.gnu.org/licenses/";
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/GnuLesserGeneralPublicLicense21.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Peter Heisig
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 |
23 | public class GnuLesserGeneralPublicLicense21 extends License {
24 |
25 | @Override
26 | public String getName() {
27 | return "GNU Lesser General Public License 2.1";
28 | }
29 |
30 | @Override
31 | public String readSummaryTextFromResources(final Context context) {
32 | return getContent(context, R.raw.lgpl_21_summary);
33 | }
34 |
35 | @Override
36 | public String readFullTextFromResources(final Context context) {
37 | return getContent(context, R.raw.lgpl_21_full);
38 | }
39 |
40 | @Override
41 | public String getVersion() {
42 | return "2.1";
43 | }
44 |
45 | @Override
46 | public String getUrl() {
47 | return "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html";
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/GnuLesserGeneralPublicLicense3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Jakob Schrettenbrunner
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import de.psdev.licensesdialog.R;
22 |
23 |
24 | public class GnuLesserGeneralPublicLicense3 extends License {
25 |
26 | @Override
27 | public String getName() {
28 | return "GNU Lesser General Public License 3";
29 | }
30 |
31 | @Override
32 | public String readSummaryTextFromResources(final Context context) {
33 | return getContent(context, R.raw.lgpl_3_summary);
34 | }
35 |
36 | @Override
37 | public String readFullTextFromResources(final Context context) {
38 | return getContent(context, R.raw.lgpl_3_full);
39 | }
40 |
41 | @Override
42 | public String getVersion() {
43 | return "3";
44 | }
45 |
46 | @Override
47 | public String getUrl() {
48 | return "https://www.gnu.org/licenses/lgpl.html";
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/ISCLicense.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class ISCLicense extends License {
23 | private static final long serialVersionUID = -4636435634132169860L;
24 |
25 | @Override
26 | public String getName() {
27 | return "ISC License";
28 | }
29 |
30 | @Override
31 | public String readSummaryTextFromResources(final Context context) {
32 | return getContent(context, R.raw.isc_summary);
33 | }
34 |
35 | @Override
36 | public String readFullTextFromResources(final Context context) {
37 | return getContent(context, R.raw.isc_full);
38 | }
39 |
40 | @Override
41 | public String getVersion() {
42 | return "";
43 | }
44 |
45 | @Override
46 | public String getUrl() {
47 | return "https://opensource.org/licenses/isc-license.txt";
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/License.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import java.io.BufferedReader;
22 | import java.io.IOException;
23 | import java.io.InputStreamReader;
24 | import java.io.Serializable;
25 |
26 | public abstract class License implements Serializable {
27 |
28 | private static final long serialVersionUID = 3100331505738956523L;
29 | private static final String LINE_SEPARATOR = System.getProperty("line.separator");
30 |
31 | private String mCachedSummaryText = null;
32 | private String mCachedFullText = null;
33 |
34 | public abstract String getName();
35 |
36 | public abstract String readSummaryTextFromResources(final Context context);
37 |
38 | public abstract String readFullTextFromResources(final Context context);
39 |
40 | public abstract String getVersion();
41 |
42 | public abstract String getUrl();
43 |
44 | //
45 |
46 | public final String getSummaryText(final Context context) {
47 | if (mCachedSummaryText == null) {
48 | mCachedSummaryText = readSummaryTextFromResources(context);
49 | }
50 |
51 | return mCachedSummaryText;
52 | }
53 |
54 | public final String getFullText(final Context context) {
55 | if (mCachedFullText == null) {
56 | mCachedFullText = readFullTextFromResources(context);
57 | }
58 |
59 | return mCachedFullText;
60 | }
61 |
62 | protected String getContent(final Context context, final int contentResourceId) {
63 | try (final BufferedReader reader = new BufferedReader(new InputStreamReader(context.getResources().openRawResource(contentResourceId), "UTF-8"))) {
64 | return toString(reader);
65 | } catch (final IOException e) {
66 | throw new IllegalStateException(e);
67 | }
68 | }
69 |
70 | private String toString(final BufferedReader reader) throws IOException {
71 | final StringBuilder builder = new StringBuilder();
72 | String line;
73 | while ((line = reader.readLine()) != null) {
74 | builder.append(line).append(LINE_SEPARATOR);
75 | }
76 | return builder.toString();
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/MITLicense.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 | import de.psdev.licensesdialog.R;
21 |
22 | public class MITLicense extends License {
23 |
24 | private static final long serialVersionUID = 5673599951781482594L;
25 |
26 | @Override
27 | public String getName() {
28 | return "MIT License";
29 | }
30 |
31 | @Override
32 | public String readSummaryTextFromResources(final Context context) {
33 | return getContent(context, R.raw.mit_summary);
34 | }
35 |
36 | @Override
37 | public String readFullTextFromResources(final Context context) {
38 | return getContent(context, R.raw.mit_full);
39 | }
40 |
41 | @Override
42 | public String getVersion() {
43 | return "";
44 | }
45 |
46 | @Override
47 | public String getUrl() {
48 | return "https://opensource.org/licenses/MIT";
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/MozillaPublicLicense11.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import de.psdev.licensesdialog.R;
22 |
23 | public class MozillaPublicLicense11 extends License {
24 |
25 | private static final long serialVersionUID = -5912500033007492703L;
26 |
27 | @Override
28 | public String getName() {
29 | return "Mozilla Public License 1.1";
30 | }
31 |
32 | @Override
33 | public String readSummaryTextFromResources(final Context context) {
34 | return getContent(context, R.raw.mpl_11_summary);
35 | }
36 |
37 | @Override
38 | public String readFullTextFromResources(final Context context) {
39 | return getContent(context, R.raw.mpl_11_full);
40 | }
41 |
42 | @Override
43 | public String getVersion() {
44 | return "1.1";
45 | }
46 |
47 | @Override
48 | public String getUrl() {
49 | return "https://mozilla.org/MPL/1.1/";
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/MozillaPublicLicense20.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import de.psdev.licensesdialog.R;
22 |
23 | public class MozillaPublicLicense20 extends License {
24 |
25 | @Override
26 | public String getName() {
27 | return "Mozilla Public License 2.0";
28 | }
29 |
30 | @Override
31 | public String readSummaryTextFromResources(final Context context) {
32 | return getContent(context, R.raw.mpl_20_summary);
33 | }
34 |
35 | @Override
36 | public String readFullTextFromResources(final Context context) {
37 | return getContent(context, R.raw.mpl_20_full);
38 | }
39 |
40 | @Override
41 | public String getVersion() {
42 | return "2.0";
43 | }
44 |
45 | @Override
46 | public String getUrl() {
47 | return "https://mozilla.org/MPL/2.0/";
48 | }
49 |
50 | }
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/licenses/SILOpenFontLicense11.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.licenses;
18 |
19 | import android.content.Context;
20 |
21 | import de.psdev.licensesdialog.R;
22 |
23 | public class SILOpenFontLicense11 extends License {
24 |
25 | @Override
26 | public String getName() {
27 | return "SIL Open Font License v1.1";
28 | }
29 |
30 | @Override
31 | public String readSummaryTextFromResources(final Context context) {
32 | return getContent(context, R.raw.sil_ofl_11_summary);
33 | }
34 |
35 | @Override
36 | public String readFullTextFromResources(final Context context) {
37 | return getContent(context, R.raw.sil_ofl_11_full);
38 | }
39 |
40 | @Override
41 | public String getVersion() {
42 | return "1.1";
43 | }
44 |
45 | @Override
46 | public String getUrl() {
47 | return "https://opensource.org/licenses/OFL-1.1";
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/model/Notice.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.model;
18 |
19 | import android.os.Parcel;
20 | import android.os.Parcelable;
21 | import de.psdev.licensesdialog.licenses.License;
22 |
23 | public class Notice implements Parcelable {
24 |
25 | private String mName;
26 | private String mUrl;
27 | private String mCopyright;
28 | private License mLicense;
29 |
30 | //
31 |
32 | public Notice() {
33 | }
34 |
35 | public Notice(final String name, final String url, final String copyright, final License license) {
36 | mName = name;
37 | mUrl = url;
38 | mCopyright = copyright;
39 | mLicense = license;
40 | }
41 |
42 | // Setter / Getter
43 |
44 | public void setName(final String name) {
45 | mName = name;
46 | }
47 |
48 | public void setUrl(final String url) {
49 | mUrl = url;
50 | }
51 |
52 | public void setCopyright(final String copyright) {
53 | mCopyright = copyright;
54 | }
55 |
56 | public void setLicense(final License license) {
57 | mLicense = license;
58 | }
59 |
60 | public String getName() {
61 | return mName;
62 | }
63 |
64 | public String getUrl() {
65 | return mUrl;
66 | }
67 |
68 | public String getCopyright() {
69 | return mCopyright;
70 | }
71 |
72 | public License getLicense() {
73 | return mLicense;
74 | }
75 |
76 | // Parcelable
77 |
78 | protected Notice(final Parcel in) {
79 | mName = in.readString();
80 | mUrl = in.readString();
81 | mCopyright = in.readString();
82 | }
83 |
84 | @Override
85 | public void writeToParcel(final Parcel dest, final int flags) {
86 | dest.writeString(mName);
87 | dest.writeString(mUrl);
88 | dest.writeString(mCopyright);
89 | }
90 |
91 | @Override
92 | public int describeContents() {
93 | return 0;
94 | }
95 |
96 | public static final Creator CREATOR = new Creator() {
97 | @Override
98 | public Notice createFromParcel(final Parcel in) {
99 | return new Notice(in);
100 | }
101 |
102 | @Override
103 | public Notice[] newArray(final int size) {
104 | return new Notice[size];
105 | }
106 | };
107 |
108 | }
109 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/java/de/psdev/licensesdialog/model/Notices.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.model;
18 |
19 | import android.os.Parcel;
20 | import android.os.Parcelable;
21 |
22 | import java.util.ArrayList;
23 | import java.util.List;
24 |
25 | public class Notices implements Parcelable {
26 |
27 | private final List mNotices;
28 |
29 | public Notices() {
30 | mNotices = new ArrayList<>();
31 | }
32 |
33 | // Setter / Getter
34 |
35 | public void addNotice(final Notice notice) {
36 | mNotices.add(notice);
37 | }
38 |
39 | public List getNotices() {
40 | return mNotices;
41 | }
42 |
43 | // Parcelable
44 |
45 | protected Notices(final Parcel in) {
46 | mNotices = in.createTypedArrayList(Notice.CREATOR);
47 | }
48 |
49 | @Override
50 | public void writeToParcel(final Parcel dest, final int flags) {
51 | dest.writeTypedList(mNotices);
52 | }
53 |
54 | @Override
55 | public int describeContents() {
56 | return 0;
57 | }
58 |
59 | public static final Creator CREATOR = new Creator() {
60 | @Override
61 | public Notices createFromParcel(final Parcel in) {
62 | return new Notices(in);
63 | }
64 |
65 | @Override
66 | public Notices[] newArray(final int size) {
67 | return new Notices[size];
68 | }
69 | };
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/asl_20_full.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/asl_20_summary.txt:
--------------------------------------------------------------------------------
1 | Licensed under the Apache License, Version 2.0 (the "License");
2 | you may not use this file except in compliance with the License.
3 | You may obtain a copy of the License at
4 |
5 | http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | 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.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/bsd2_full.txt:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2 |
3 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4 | 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.
5 | 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 HOLDER 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.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/bsd2_summary.txt:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2 |
3 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4 | 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.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/bsd3_full.txt:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2 |
3 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4 | 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.
5 | Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
6 | 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 HOLDER 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.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/bsd3_summary.txt:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2 |
3 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4 | 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.
5 | Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/ccand_30_summary.txt:
--------------------------------------------------------------------------------
1 | You are free to:
2 |
3 | Share - copy and redistribute the material in any medium or format for any purpose, even commercially.
4 | The licensor cannot revoke these freedoms as long as you follow the license terms.
5 |
6 | Under the following terms:
7 |
8 | Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
9 | NoDerivatives - If you remix, transform, or build upon the material, you may not distribute the modified material.
10 |
11 | No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
12 |
13 | Notices:
14 |
15 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
16 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/ccby_30_summary.txt:
--------------------------------------------------------------------------------
1 | You are free to:
2 |
3 | Share — copy and redistribute the material in any medium or format
4 | Adapt — remix, transform, and build upon the material for any purpose, even commercially.
5 | The licensor cannot revoke these freedoms as long as you follow the license terms.
6 |
7 | Under the following terms:
8 |
9 | Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
10 |
11 | No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
12 |
13 | Notices:
14 |
15 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
16 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
17 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/ccbysa_30_summary.txt:
--------------------------------------------------------------------------------
1 | You are free to:
2 |
3 | Share — copy and redistribute the material in any medium or format
4 | Adapt — remix, transform, and build upon the material for any purpose, even commercially.
5 | The licensor cannot revoke these freedoms as long as you follow the license terms.
6 |
7 | Under the following terms:
8 |
9 | Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
10 | ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
11 |
12 | No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
13 |
14 | Notices:
15 |
16 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
17 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/epl_v10_full.txt:
--------------------------------------------------------------------------------
1 | Eclipse Public License - v 1.0
2 |
3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
4 |
5 | 1. DEFINITIONS
6 |
7 | "Contribution" means:
8 |
9 | a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
10 | b) in the case of each subsequent Contributor:
11 | i) changes to the Program, and
12 | ii) additions to the Program;
13 | where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
14 | "Contributor" means any person or entity that distributes the Program.
15 |
16 | "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
17 |
18 | "Program" means the Contributions distributed in accordance with this Agreement.
19 |
20 | "Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
21 |
22 | 2. GRANT OF RIGHTS
23 |
24 | a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
25 | b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
26 | c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
27 | d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
28 | 3. REQUIREMENTS
29 |
30 | A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
31 |
32 | a) it complies with the terms and conditions of this Agreement; and
33 | b) its license agreement:
34 | i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
35 | ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
36 | iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
37 | iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
38 | When the Program is made available in source code form:
39 |
40 | a) it must be made available under this Agreement; and
41 | b) a copy of this Agreement must be included with each copy of the Program.
42 | Contributors may not remove or alter any copyright notices contained within the Program.
43 |
44 | Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
45 |
46 | 4. COMMERCIAL DISTRIBUTION
47 |
48 | Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
49 |
50 | For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
51 |
52 | 5. NO WARRANTY
53 |
54 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
55 |
56 | 6. DISCLAIMER OF LIABILITY
57 |
58 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
59 |
60 | 7. GENERAL
61 |
62 | If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
63 |
64 | If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
65 |
66 | All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
67 |
68 | Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
69 |
70 | This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/epl_v10_summary.txt:
--------------------------------------------------------------------------------
1 | This license, made and used by the Eclipse Foundation, is similar to GPL but allows you to link code under the license to proprietary applications. You may also license binaries under a proprietary license, as long as the source code is available under EPL.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/gpl_20_summary.txt:
--------------------------------------------------------------------------------
1 | This program is free software; you can redistribute it and/or
2 | modify it under the terms of the GNU General Public License
3 | as published by the Free Software Foundation; either version 2
4 | of the License, or (at your option) any later version.
5 |
6 | This program is distributed in the hope that it will be useful,
7 | but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 | GNU General Public License for more details.
10 |
11 | You should have received a copy of the GNU General Public License
12 | along with this program; if not, write to the Free Software
13 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14 |
15 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/gpl_30_summary.txt:
--------------------------------------------------------------------------------
1 | This program is free software: you can redistribute it and/or modify
2 | it under the terms of the GNU General Public License as published by
3 | the Free Software Foundation, either version 3 of the License, or
4 | (at your option) any later version.
5 |
6 | This program is distributed in the hope that it will be useful,
7 | but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 | GNU General Public License for more details.
10 |
11 | You should have received a copy of the GNU General Public License
12 | along with this program. If not, see .
13 |
14 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/isc_full.txt:
--------------------------------------------------------------------------------
1 | Permission to use, copy, modify, and/or distribute this software for
2 | any purpose with or without fee is hereby granted, provided that this
3 | permission notice appear in all copies.
4 |
5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
6 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
8 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
9 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
10 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
11 | PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/isc_summary.txt:
--------------------------------------------------------------------------------
1 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that this permission notice appear in all copies.
2 |
3 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/lgpl_21_summary.txt:
--------------------------------------------------------------------------------
1 | This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
2 |
3 | This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
4 |
5 | You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/lgpl_3_full.txt:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/lgpl_3_summary.txt:
--------------------------------------------------------------------------------
1 | This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
2 |
3 | This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
4 |
5 | You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/mit_full.txt:
--------------------------------------------------------------------------------
1 | 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:
2 |
3 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4 |
5 | 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.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/mit_summary.txt:
--------------------------------------------------------------------------------
1 | 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:
2 |
3 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4 |
5 | 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.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/mpl_11_summary.txt:
--------------------------------------------------------------------------------
1 | This Source Code Form is subject to the terms of the Mozilla Public
2 | License, v. 1.1. If a copy of the MPL was not distributed with this
3 | file, You can obtain one at http://mozilla.org/MPL/1.1/.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/mpl_20_summary.txt:
--------------------------------------------------------------------------------
1 | This Source Code Form is subject to the terms of the Mozilla Public
2 | License, v. 2.0. If a copy of the MPL was not distributed with this
3 | file, You can obtain one at http://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/notices.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 | Apache Commons IO
21 | http://commons.apache.org/io/
22 | Copyright 2002-2012 The Apache Software Foundation
23 | Apache Software License 2.0
24 |
25 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/sil_ofl_11_full.txt:
--------------------------------------------------------------------------------
1 | SIL OPEN FONT LICENSE
2 |
3 | Version 1.1 - 26 February 2007
4 |
5 | PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
6 |
7 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
8 |
9 | DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
10 |
11 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s).
12 |
13 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
14 |
15 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
16 |
17 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
18 |
19 | PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
20 |
21 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
22 |
23 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
24 |
25 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
26 |
27 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
28 |
29 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
30 |
31 | TERMINATION This license becomes null and void if any of the above conditions are not met.
32 |
33 | DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/raw/sil_ofl_11_summary.txt:
--------------------------------------------------------------------------------
1 | OFL is used by almost all libre fonts. Selling fonts by themselves is not allowed, but bundling with software or selling font design services is allowed. Font names must usually be changed before making any modifications. Document embedding is allowed.
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-bg/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Уведомления
20 | Затваряне
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Dokumenty
20 | Zavřít
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Anmerkungen
20 | Schließen
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Νομικές σημειώσεις
20 | Κλείσιμο
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Avisos
20 | Cerrar
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Avis
20 | Fermer
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-hu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Figyelmeztetések
20 | Bezárás
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Avvisi
20 | Chiudi
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | オープンソースライセンス
20 | 閉じる
21 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 오픈소스 라이선스
20 | 닫기
21 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Powiadomienia
20 | Zamknij
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Avisos
20 | Fechar
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-ro/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Anunțuri
20 | Închide
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Лицензии открытого ПО
20 | Закрыть
21 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-tr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Bildirimler
20 | Kapat
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-uk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Ліцензії відкритого коду
20 | Закрити
21 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 开放源代码许可
20 | 关闭
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 開放原始碼授權
20 | 關閉
21 |
22 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values/base_html.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 | p.license {
21 | background:grey;
22 | }
23 | body {
24 | font-family: sans-serif;
25 | overflow-wrap: break-word;
26 | }
27 | pre {
28 | background-color: #eeeeee;
29 | padding: 1em;
30 | white-space: pre-wrap;
31 | }
32 |
33 |
34 |
--------------------------------------------------------------------------------
/licensesdialog/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Notices
20 | Close
21 |
--------------------------------------------------------------------------------
/licensesdialog/src/test/java/de/psdev/licensesdialog/LicenseResolverTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog;
18 |
19 | import android.content.Context;
20 |
21 | import org.junit.Before;
22 | import org.junit.Test;
23 |
24 | import de.psdev.licensesdialog.licenses.License;
25 |
26 | import static org.junit.Assert.assertEquals;
27 | import static org.junit.Assert.assertNotNull;
28 |
29 | public class LicenseResolverTest {
30 |
31 | private static final String TEST_LICENSE_NAME = "TestLicense";
32 |
33 | @Before
34 | public void setUp() throws Exception {
35 | LicenseResolver.registerDefaultLicenses();
36 | }
37 |
38 | @Test
39 | public void testRegisterLicense() throws Exception {
40 | LicenseResolver.registerLicense(new TestLicense());
41 | final License license = LicenseResolver.read(TEST_LICENSE_NAME);
42 | assertNotNull(license);
43 | assertEquals(TEST_LICENSE_NAME, license.getName());
44 | }
45 |
46 | @Test(expected = IllegalStateException.class)
47 | public void testReadUnknownLicense() throws Exception {
48 | LicenseResolver.read(TEST_LICENSE_NAME);
49 | }
50 |
51 | @Test
52 | public void testReadKnownLicense() throws Exception {
53 | final License license = LicenseResolver.read("MIT License");
54 | assertNotNull(license);
55 | assertEquals("MIT License", license.getName());
56 | }
57 |
58 | // Inner classes
59 |
60 | private static class TestLicense extends License {
61 |
62 | @Override
63 | public String getName() {
64 | return TEST_LICENSE_NAME;
65 | }
66 |
67 | @Override
68 | public String readSummaryTextFromResources(final Context context) {
69 | return "Testing license";
70 | }
71 |
72 | @Override
73 | public String readFullTextFromResources(final Context context) {
74 | return "Full testing license";
75 | }
76 |
77 | @Override
78 | public String getVersion() {
79 | return "1.0";
80 | }
81 |
82 | @Override
83 | public String getUrl() {
84 | return "http://example.org";
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/licensesdialog/src/test/java/de/psdev/licensesdialog/NoticesXmlParserTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog;
18 |
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.robolectric.RobolectricTestRunner;
22 | import org.robolectric.RuntimeEnvironment;
23 | import org.robolectric.annotation.Config;
24 |
25 | import static org.junit.Assert.assertNotNull;
26 |
27 | @RunWith(RobolectricTestRunner.class)
28 | @Config(sdk = Config.ALL_SDKS)
29 | public class NoticesXmlParserTest {
30 |
31 | @Test
32 | public void testParse() throws Exception {
33 | assertNotNull(NoticesXmlParser.parse(RuntimeEnvironment.application.getResources().openRawResource(R.raw.notices)));
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/licensesdialog/src/test/res/raw/notices.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | ActionBarSherlock
20 | http://actionbarsherlock.com/
21 | Copyright 2012 Jake Wharton
22 | Apache Software License 2.0
23 |
24 |
25 | RoboGuice 2.0
26 | http://roboguice.org
27 |
28 | Apache Software License 2.0
29 |
30 |
31 | Application Crash Reporting for Android (ACRA)
32 | http://acra.ch/
33 | Copyright 2010 Emmanuel Astier & Kevin Gaudin
34 | Apache Software License 2.0
35 |
36 |
37 | Android ViewPagerIndicator
38 | http://viewpagerindicator.com/
39 | Copyright (C) 2011 The Android Open Source Project<br/>Copyright (C) 2012 Jake Wharton
40 | Apache Software License 2.0
41 |
42 |
43 | Nine Old Androids
44 | http://nineoldandroids.com/
45 | Copyright (C) 2010 The Android Open Source Project
46 | Apache Software License 2.0
47 |
48 |
49 | Crouton
50 | https://github.com/keyboardsurfer/Crouton
51 | Copyright 2012 Benjamin Weiss<br/>Copyright 2012 Neofonie Mobile GmbH
52 | Apache Software License 2.0
53 |
54 |
55 | Jackson JSON-processor
56 | http://jackson.codehaus.org/
57 |
58 | Apache Software License 2.0
59 |
60 |
61 | OrmLite
62 | http://ormlite.com/
63 | Copyright Gray Watson
64 | ISC License
65 |
66 |
67 | Apache Commons IO
68 | http://commons.apache.org/io/
69 | Copyright 2002-2012 The Apache Software Foundation
70 | Apache Software License 2.0
71 |
72 |
73 | Apache Commons Lang
74 | http://commons.apache.org/lang/
75 | Copyright 2002-2011 The Apache Software Foundation
76 | Apache Software License 2.0
77 |
78 |
79 | Joda Time
80 | http://joda-time.sourceforge.net/
81 | Copyright 2001-2005 Stephen Colebourne
82 | Apache Software License 2.0
83 |
84 |
85 | StickyListHeaders
86 | https://github.com/emilsjolander/StickyListHeaders
87 | Copyright 2012 Emil Sjölander
88 | Apache Software License 2.0
89 |
90 |
91 | DiskLruCache
92 | https://github.com/JakeWharton/DiskLruCache
93 | Copyright (C) 2011 The Android Open Source Project<br/>Copyright 2012 Jake Wharton
94 | Apache Software License 2.0
95 |
96 |
97 | Google Guava
98 | http://code.google.com/p/guava-libraries/
99 | Copyright (C) 2007 The Guava Authors
100 | Apache Software License 2.0
101 |
102 |
103 | PhotoView
104 | https://github.com/chrisbanes/PhotoView
105 | Copyright 2011, 2012 Chris Banes.
106 | Apache Software License 2.0
107 |
108 |
109 | Inscription
110 | https://github.com/MartinvanZ/Inscription
111 | (c) 2012 Martin van Zuilekom (http://martin.cubeactive.com)
112 | Apache Software License 2.0
113 |
114 |
115 | Cool Project with BSD 3-Clause License
116 | http://example3.com
117 | Author of Cool Project with BSD 3-Clause License
118 | BSD 3-Clause License
119 |
120 |
121 | Cool Project with BSD 2-Clause License
122 | http://example2.com
123 | Author of Cool Project with BSD 2-Clause License
124 | BSD 2-Clause License
125 |
126 |
--------------------------------------------------------------------------------
/lint.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "config:base"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 30
5 | buildToolsVersion "30.0.3"
6 |
7 | defaultConfig {
8 | applicationId 'de.psdev.licensesdialog.sample'
9 | minSdkVersion 14
10 | targetSdkVersion 30
11 |
12 | versionName project.version
13 | versionCode buildVersionCode()
14 |
15 | buildConfigField 'String', 'GIT_SHA', "\"${gitScmVersion()}\""
16 | }
17 |
18 | compileOptions {
19 | sourceCompatibility JavaVersion.VERSION_1_8
20 | targetCompatibility JavaVersion.VERSION_1_8
21 | }
22 |
23 | lintOptions {
24 | lintConfig rootProject.file('lint.xml')
25 | }
26 |
27 | buildTypes {
28 | release {
29 | minifyEnabled false
30 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
31 | }
32 | }
33 | }
34 |
35 | dependencies {
36 | implementation project(':licensesdialog')
37 |
38 | implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
39 | }
40 |
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
20 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/sample/src/main/java/de/psdev/licensesdialog/sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Philip Schiffer
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package de.psdev.licensesdialog.sample;
18 |
19 | import android.graphics.Color;
20 | import android.os.Bundle;
21 | import android.view.View;
22 | import androidx.annotation.ColorInt;
23 | import androidx.appcompat.app.AppCompatActivity;
24 |
25 | import de.psdev.licensesdialog.LicensesDialog;
26 | import de.psdev.licensesdialog.LicensesDialogFragment;
27 | import de.psdev.licensesdialog.licenses.ApacheSoftwareLicense20;
28 | import de.psdev.licensesdialog.licenses.GnuLesserGeneralPublicLicense21;
29 | import de.psdev.licensesdialog.licenses.License;
30 | import de.psdev.licensesdialog.model.Notice;
31 | import de.psdev.licensesdialog.model.Notices;
32 |
33 | public class MainActivity extends AppCompatActivity {
34 |
35 | // ==========================================================================================================================
36 | // Android Lifecycle
37 | // ==========================================================================================================================
38 |
39 | public void onCreate(final Bundle savedInstanceState) {
40 | super.onCreate(savedInstanceState);
41 | setContentView(R.layout.activity_main);
42 | }
43 |
44 | // ==========================================================================================================================
45 | // Public API
46 | // ==========================================================================================================================
47 |
48 | public void onSingleClick(final View view) {
49 | final String name = "LicensesDialog";
50 | final String url = "http://psdev.de";
51 | final String copyright = "Copyright 2013 Philip Schiffer ";
52 | final License license = new ApacheSoftwareLicense20();
53 | final Notice notice = new Notice(name, url, copyright, license);
54 | new LicensesDialog.Builder(this)
55 | .setNotices(notice)
56 | .build()
57 | .show();
58 | }
59 |
60 | public void onMultipleClick(final View view) {
61 | new LicensesDialog.Builder(this)
62 | .setNotices(R.raw.notices)
63 | .build()
64 | .show();
65 | }
66 |
67 | public void onMultipleIncludeOwnClick(final View view) {
68 | new LicensesDialog.Builder(this)
69 | .setNotices(R.raw.notices)
70 | .setIncludeOwnLicense(true)
71 | .build()
72 | .show();
73 | }
74 |
75 | public void onMultipleProgrammaticClick(final View view) {
76 | final Notices notices = new Notices();
77 | notices.addNotice(new Notice("Test 1", "http://example.org", "Example Person", new ApacheSoftwareLicense20()));
78 | notices.addNotice(new Notice("Test 2", "http://example.org", "Example Person 2", new GnuLesserGeneralPublicLicense21()));
79 |
80 | new LicensesDialog.Builder(this)
81 | .setNotices(notices)
82 | .setIncludeOwnLicense(true)
83 | .build()
84 | .show();
85 | }
86 |
87 | public void onSingleFragmentClick(final View view) {
88 | final String name = "LicensesDialog";
89 | final String url = "http://psdev.de";
90 | final String copyright = "Copyright 2013 Philip Schiffer ";
91 | final License license = new ApacheSoftwareLicense20();
92 | final Notice notice = new Notice(name, url, copyright, license);
93 |
94 | final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
95 | .setNotice(notice)
96 | .setIncludeOwnLicense(false)
97 | .build();
98 |
99 | fragment.show(getSupportFragmentManager(), null);
100 | }
101 |
102 | public void onMultipleFragmentClick(final View view) throws Exception {
103 | final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
104 | .setNotices(R.raw.notices)
105 | .build();
106 |
107 | fragment.show(getSupportFragmentManager(), null);
108 | }
109 |
110 | public void onMultipleIncludeOwnFragmentClick(final View view) throws Exception {
111 | final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
112 | .setNotices(R.raw.notices)
113 | .setShowFullLicenseText(false)
114 | .setIncludeOwnLicense(true)
115 | .build();
116 |
117 | fragment.show(getSupportFragmentManager(), null);
118 | }
119 |
120 | public void onMultipleProgrammaticFragmentClick(final View view) {
121 | final Notices notices = new Notices();
122 | notices.addNotice(new Notice("Test 1", "http://example.org", "Example Person", new ApacheSoftwareLicense20()));
123 | notices.addNotice(new Notice("Test 2", "http://example.org", "Example Person 2", new GnuLesserGeneralPublicLicense21()));
124 |
125 | final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
126 | .setNotices(notices)
127 | .setShowFullLicenseText(false)
128 | .setIncludeOwnLicense(true)
129 | .build();
130 |
131 | fragment.show(getSupportFragmentManager(), null);
132 | }
133 |
134 | public void onCustomThemeClick(final View view) {
135 | new LicensesDialog.Builder(this)
136 | .setNotices(R.raw.notices)
137 | .setIncludeOwnLicense(true)
138 | .setThemeResourceId(R.style.custom_theme)
139 | .setDividerColorId(R.color.custom_divider_color)
140 | .build()
141 | .show();
142 | }
143 |
144 | public void onCustomThemeFragmentClick(final View view) throws Exception {
145 | final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
146 | .setNotices(R.raw.notices)
147 | .setShowFullLicenseText(false)
148 | .setIncludeOwnLicense(true)
149 | .setThemeResourceId(R.style.custom_theme)
150 | .setDividerColorRes(R.color.custom_divider_color)
151 | .build();
152 |
153 | fragment.show(getSupportFragmentManager(), null);
154 | }
155 |
156 | public void onCustomCssStyleClick(final View view) {
157 | new LicensesDialog.Builder(this)
158 | .setNotices(R.raw.notices)
159 | .setNoticesCssStyle(R.string.custom_notices_default_style)
160 | .build()
161 | .show();
162 | }
163 |
164 | public void onCustomCssStyleFragmentClick(final View view) throws Exception {
165 | String formatString = getString(R.string.custom_notices_format_style);
166 | String pBg = getRGBAString(Color.parseColor("#9E9E9E"));
167 | String bodyBg = getRGBAString(Color.parseColor("#424242"));
168 | String preBg = getRGBAString(Color.parseColor("#BDBDBD"));
169 | String liColor = "color: #ffffff";
170 | String linkColor = "color: #1976D2";
171 |
172 | String style = String.format(formatString, pBg, bodyBg, preBg, liColor, linkColor);
173 |
174 | final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
175 | .setNotices(R.raw.notices)
176 | .setNoticesCssStyle(style)
177 | .build();
178 |
179 | fragment.show(getSupportFragmentManager(), null);
180 | }
181 |
182 | public void onSingleDisableDarkModeClick(final View view) {
183 | final String name = "LicensesDialog";
184 | final String url = "http://psdev.de";
185 | final String copyright = "Copyright 2013 Philip Schiffer ";
186 | final License license = new ApacheSoftwareLicense20();
187 | final Notice notice = new Notice(name, url, copyright, license);
188 | new LicensesDialog.Builder(this)
189 | .setNotices(notice)
190 | .setEnableDarkMode(false)
191 | .build()
192 | .show();
193 | }
194 |
195 | private String getRGBAString(@ColorInt int color) {
196 | int red = Color.red(color);
197 | int green = Color.green(color);
198 | int blue = Color.blue(color);
199 | float alpha = ((float) Color.alpha(color) / 255);
200 | return String.format(getString(R.string.rgba_background_format), red, green, blue, alpha);
201 | }
202 | }
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
26 |
27 |
33 |
34 |
40 |
41 |
47 |
48 |
54 |
55 |
61 |
62 |
68 |
69 |
75 |
76 |
82 |
83 |
89 |
90 |
96 |
97 |
103 |
104 |
110 |
111 |
117 |
118 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/raw/notices.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
19 |
20 | ActionBarSherlock
21 | http://actionbarsherlock.com/
22 | Copyright 2012 Jake Wharton
23 | Apache Software License 2.0
24 |
25 |
26 | RoboGuice 2.0
27 | http://roboguice.org
28 |
29 | Apache Software License 2.0
30 |
31 |
32 | Application Crash Reporting for Android (ACRA)
33 | http://acra.ch/
34 | Copyright 2010 Emmanuel Astier & Kevin Gaudin
35 | Apache Software License 2.0
36 |
37 |
38 | Android ViewPagerIndicator
39 | http://viewpagerindicator.com/
40 | Copyright (C) 2011 The Android Open Source Project<br/>Copyright (C) 2012 Jake Wharton
41 | Apache Software License 2.0
42 |
43 |
44 | Nine Old Androids
45 | http://nineoldandroids.com/
46 | Copyright (C) 2010 The Android Open Source Project
47 | Apache Software License 2.0
48 |
49 |
50 | Crouton
51 | https://github.com/keyboardsurfer/Crouton
52 | Copyright 2012 Benjamin Weiss<br/>Copyright 2012 Neofonie Mobile GmbH
53 | Apache Software License 2.0
54 |
55 |
56 | Jackson JSON-processor
57 | http://jackson.codehaus.org/
58 |
59 | Apache Software License 2.0
60 |
61 |
62 | OrmLite
63 | http://ormlite.com/
64 | Copyright Gray Watson
65 | ISC License
66 |
67 |
68 | Apache Commons IO
69 | http://commons.apache.org/io/
70 | Copyright 2002-2012 The Apache Software Foundation
71 | Apache Software License 2.0
72 |
73 |
74 | Apache Commons Lang
75 | http://commons.apache.org/lang/
76 | Copyright 2002-2011 The Apache Software Foundation
77 | Apache Software License 2.0
78 |
79 |
80 | Joda Time
81 | http://joda-time.sourceforge.net/
82 | Copyright 2001-2005 Stephen Colebourne
83 | Apache Software License 2.0
84 |
85 |
86 | StickyListHeaders
87 | https://github.com/emilsjolander/StickyListHeaders
88 | Copyright 2012 Emil Sjölander
89 | Apache Software License 2.0
90 |
91 |
92 | DiskLruCache
93 | https://github.com/JakeWharton/DiskLruCache
94 | Copyright (C) 2011 The Android Open Source Project<br/>Copyright 2012 Jake Wharton
95 | Apache Software License 2.0
96 |
97 |
98 | Google Guava
99 | http://code.google.com/p/guava-libraries/
100 | Copyright (C) 2007 The Guava Authors
101 | Apache Software License 2.0
102 |
103 |
104 | PhotoView
105 | https://github.com/chrisbanes/PhotoView
106 | Copyright 2011, 2012 Chris Banes.
107 | Apache Software License 2.0
108 |
109 |
110 | Inscription
111 | https://github.com/MartinvanZ/Inscription
112 | (c) 2012 Martin van Zuilekom (http://martin.cubeactive.com)
113 | Apache Software License 2.0
114 |
115 |
116 | Cool Project with BSD License
117 | http://example.com
118 | Author of Cool Project with BSD License
119 | BSD 3-Clause License
120 |
121 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/base_html.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 | p.license {
21 | background:grey;
22 | }
23 | body {
24 | font-family: sans-serif;
25 | overflow-wrap: break-word;
26 | background:#616161;
27 | }
28 | pre {
29 | background-color: #eeeeee;
30 | padding: 1em;
31 | white-space: pre-wrap;
32 | }
33 |
34 |
35 | p.license {
36 | %1$s
37 | }
38 | body {
39 | font-family: sans-serif;
40 | overflow-wrap: break-word;
41 | %2$s
42 | }
43 | pre {
44 | %3$s
45 | padding: 1em;
46 | white-space: pre-wrap;
47 | }
48 | li {
49 | %4$s
50 | }
51 | li a {
52 | %5$s
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #FF79FF00
20 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | Single
19 | Single (Disabled Dark Mode)
20 | Multiple
21 | Multiple with own License
22 | Multiple programmatically
23 | Single (Fragment)
24 | Multiple (Fragment)
25 | Multiple with own License (Fragment)
26 | Multiple programmatically (Fragment)
27 | Custom theme
28 | Custom theme (Fragment)
29 | Custom CSS Style
30 | Custom CSS Style (Fragment)
31 |
32 | background-color:rgba(%1$d,%2$d,%3$d,%4$1f);
33 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PSDev/LicensesDialog/24e1f9f7b8194b8435e16dc61e1e157026f7c2cc/screenshot.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = "licensesdialog-parent"
2 |
3 | include ':licensesdialog'
4 | include ':sample'
5 |
--------------------------------------------------------------------------------