SetupWizard: Use new LegaleseViewer for privacy policy web views
WebViews are no longer allowed in priv-apps. Change-Id: Iddf9c79d50ea9f9d9d32218342f9948a6cbf30ef
This commit is contained in:
parent
ac84dc0fce
commit
b076a55991
@ -45,6 +45,7 @@
|
||||
<uses-permission android:name="android.permission.BACKUP" />
|
||||
<uses-permission android:name="org.whispersystems.whisperpush.permissions.REGISTER" />
|
||||
<uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.LEGALESE" />
|
||||
<uses-permission android:name="com.cyngn.cmstats.SEND_ANALYTICS" />
|
||||
|
||||
<permission
|
||||
|
@ -37,6 +37,7 @@ public class SetupWizardApp extends Application {
|
||||
public static final String ACCOUNT_TYPE_GMS = "com.google";
|
||||
|
||||
public static final String ACTION_SETUP_WIFI = "com.android.net.wifi.SETUP_WIFI_NETWORK";
|
||||
public static final String ACTION_VIEW_LEGAL = "cyanogenmod.intent.action.LEGALESE";
|
||||
|
||||
public static final String EXTRA_FIRST_RUN = "firstRun";
|
||||
public static final String EXTRA_ALLOW_SKIP = "allowSkip";
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user