summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-05-05 16:44:26 -0700
committercretin45 <cretin45@gmail.com>2015-05-06 16:03:38 -0700
commitb076a55991ee6e913b13ba1a16dd0c559a7eccce (patch)
treeceee2c98d2b00487a557c1d9b9d38747a8438958 /src/com/cyanogenmod/setupwizard/setup
parentac84dc0fce1396307d56bea5e68a845f8e77ff90 (diff)
downloadpackages_apps_SetupWizard-b076a55991ee6e913b13ba1a16dd0c559a7eccce.zip
packages_apps_SetupWizard-b076a55991ee6e913b13ba1a16dd0c559a7eccce.tar.gz
packages_apps_SetupWizard-b076a55991ee6e913b13ba1a16dd0c559a7eccce.tar.bz2
SetupWizard: Use new LegaleseViewer for privacy policy web views
WebViews are no longer allowed in priv-apps. Change-Id: Iddf9c79d50ea9f9d9d32218342f9948a6cbf30ef
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java14
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java15
2 files changed, 22 insertions, 7 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
index 7c75d10..bdc3076 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
@@ -18,12 +18,15 @@ package com.cyanogenmod.setupwizard.setup;
import android.app.Fragment;
import android.app.FragmentManager;
+import android.content.ComponentName;
import android.content.Context;
+import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ThemeUtils;
import android.content.res.ThemeConfig;
import android.content.res.ThemeManager;
import android.hardware.CmHardwareManager;
+import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.preference.PreferenceManager;
@@ -42,6 +45,7 @@ import android.widget.CheckBox;
import android.widget.TextView;
import com.cyanogenmod.setupwizard.R;
+import com.cyanogenmod.setupwizard.SetupWizardApp;
import com.cyanogenmod.setupwizard.cmstats.SetupStats;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.ui.WebViewDialogFragment;
@@ -267,9 +271,13 @@ public class CyanogenSettingsPage extends SetupPage {
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(View textView) {
- WebViewDialogFragment.newInstance()
- .setUri(PRIVACY_POLICY_URI)
- .show(getActivity().getFragmentManager(), WebViewDialogFragment.TAG);
+ final Intent intent = new Intent(SetupWizardApp.ACTION_VIEW_LEGAL);
+ intent.setData(Uri.parse(PRIVACY_POLICY_URI));
+ try {
+ getActivity().startActivity(intent);
+ } catch (Exception e) {
+ Log.e(TAG, "Unable to start activity " + intent.toString(), e);
+ }
}
};
ss.setSpan(clickableSpan,
diff --git a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
index e5029a6..1ebd161 100644
--- a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
@@ -19,11 +19,14 @@ package com.cyanogenmod.setupwizard.setup;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.backup.IBackupManager;
+import android.content.ComponentName;
import android.content.ContentQueryMap;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.Intent;
import android.database.Cursor;
import android.location.LocationManager;
+import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -32,6 +35,7 @@ import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
+import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
@@ -151,10 +155,13 @@ public class OtherSettingsPage extends SetupPage {
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(View textView) {
- WebViewDialogFragment.newInstance()
- .setUri(PRIVACY_POLICY_URI)
- .show(getActivity().getFragmentManager(),
- WebViewDialogFragment.TAG);
+ final Intent intent = new Intent(SetupWizardApp.ACTION_VIEW_LEGAL);
+ intent.setData(Uri.parse(PRIVACY_POLICY_URI));
+ try {
+ getActivity().startActivity(intent);
+ } catch (Exception e) {
+ Log.e(TAG, "Unable to start activity " + intent.toString());
+ }
}
};
ss.setSpan(clickableSpan,