SUW: remove privacy policy link on large-notouch
TV's don't have any way to open links. Change-Id: Ia7123e37668199b76e1e12803223b1cef4e25175
This commit is contained in:
committed by
Nolen Johnson
parent
161a3a68a6
commit
829c0d85c9
19
res/values-large-notouch/config.xml
Normal file
19
res/values-large-notouch/config.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2021 The CyanogenMod Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<bool name="config_isLargeNoTouch">true</bool>
|
||||||
|
</resources>
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2013 The CyanogenMod Project
|
Copyright (C) 2013 The CyanogenMod Project
|
||||||
|
2021 The LineageOS Project
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -22,5 +23,5 @@
|
|||||||
<bool name="check_custom_theme_by_default">true</bool>
|
<bool name="check_custom_theme_by_default">true</bool>
|
||||||
<string name="wizard_script_uri" translatable="false">android.resource://org.lineageos.setupwizard/raw/wizard_script</string>
|
<string name="wizard_script_uri" translatable="false">android.resource://org.lineageos.setupwizard/raw/wizard_script</string>
|
||||||
<string name="wizard_script_user_uri" translatable="false">android.resource://org.lineageos.setupwizard/raw/wizard_script_user</string>
|
<string name="wizard_script_user_uri" translatable="false">android.resource://org.lineageos.setupwizard/raw/wizard_script_user</string>
|
||||||
|
<bool name="config_isLargeNoTouch">false</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -76,6 +76,7 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
|
|||||||
String privacy_policy = getString(R.string.services_privacy_policy);
|
String privacy_policy = getString(R.string.services_privacy_policy);
|
||||||
String policySummary = getString(R.string.services_explanation, os_name, privacy_policy);
|
String policySummary = getString(R.string.services_explanation, os_name, privacy_policy);
|
||||||
SpannableString ss = new SpannableString(policySummary);
|
SpannableString ss = new SpannableString(policySummary);
|
||||||
|
if (!getResources().getBoolean(R.bool.config_isLargeNoTouch)) {
|
||||||
ClickableSpan clickableSpan = new ClickableSpan() {
|
ClickableSpan clickableSpan = new ClickableSpan() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View textView) {
|
public void onClick(View textView) {
|
||||||
@@ -94,6 +95,7 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
|
|||||||
ss.setSpan(clickableSpan,
|
ss.setSpan(clickableSpan,
|
||||||
ppStartIndex, ppStartIndex + privacy_policy.length(),
|
ppStartIndex, ppStartIndex + privacy_policy.length(),
|
||||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
}
|
||||||
TextView privacyPolicy = (TextView) findViewById(R.id.privacy_policy);
|
TextView privacyPolicy = (TextView) findViewById(R.id.privacy_policy);
|
||||||
privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance());
|
privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
privacyPolicy.setText(ss);
|
privacyPolicy.setText(ss);
|
||||||
|
Reference in New Issue
Block a user