summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-09-07 12:40:29 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-09-07 12:40:29 -0700
commitabcf8652e4d308d51110fafd00ecc90f9b607d83 (patch)
tree94ea5631c76fe3c362bf668b35dd4e5bd97f1d42
parent333ca009c5e8c1c591b2a50351f2a18841a9e7ed (diff)
parent2169505c9a9300ca564a39d218b80dcfefc76c2a (diff)
downloadpackages_apps_Settings-abcf8652e4d308d51110fafd00ecc90f9b607d83.zip
packages_apps_Settings-abcf8652e4d308d51110fafd00ecc90f9b607d83.tar.gz
packages_apps_Settings-abcf8652e4d308d51110fafd00ecc90f9b607d83.tar.bz2
Merge tag 'android-6.0.1_r66' into HEAD
Android 6.0.1 release 66 # gpg: Signature made Tue 06 Sep 2016 09:27:08 AM PDT using DSA key ID 9AB10E78 # gpg: Can't check signature: public key not found
-rw-r--r--src/com/android/settings/HelpUtils.java7
-rw-r--r--src/com/android/settings/SettingsActivity.java5
-rw-r--r--src/com/android/settings/users/UserSettings.java6
3 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/settings/HelpUtils.java b/src/com/android/settings/HelpUtils.java
index 3c36edb..1b6cbf7 100644
--- a/src/com/android/settings/HelpUtils.java
+++ b/src/com/android/settings/HelpUtils.java
@@ -24,6 +24,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources.Theme;
import android.net.Uri;
+import android.provider.Settings.Global;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
@@ -90,6 +91,9 @@ public class HelpUtils {
*/
public static boolean prepareHelpMenuItem(final Activity activity, MenuItem helpMenuItem,
String helpUriString, String backupContext) {
+ if (Global.getInt(activity.getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
+ return false;
+ }
if (TextUtils.isEmpty(helpUriString)) {
// The help url string is empty or null, so set the help menu item to be invisible.
helpMenuItem.setVisible(false);
@@ -123,6 +127,9 @@ public class HelpUtils {
public static Intent getHelpIntent(Context context, String helpUriString,
String backupContext) {
+ if (Global.getInt(context.getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
+ return null;
+ }
// Try to handle as Intent Uri, otherwise just treat as Uri.
try {
Intent intent = Intent.parseUri(helpUriString,
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 9a8076e..b54d771 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -48,6 +48,7 @@ import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
+import android.provider.Settings.Global;
import android.text.TextUtils;
import android.transition.TransitionManager;
import android.util.ArrayMap;
@@ -1357,6 +1358,10 @@ public class SettingsActivity extends Activity
}
private void addExternalTiles(List<DashboardCategory> target) {
+ if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
+ // Don't add external tiles until device is set up.
+ return;
+ }
Map<Pair<String, String>, DashboardTile> addedCache =
new ArrayMap<Pair<String, String>, DashboardTile>();
UserManager userManager = UserManager.get(this);
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 85d2700..a172766 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -45,6 +45,7 @@ import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.provider.Settings;
+import android.provider.Settings.Global;
import android.provider.Settings.Secure;
import android.util.Log;
import android.util.SparseArray;
@@ -229,6 +230,11 @@ public class UserSettings extends SettingsPreferenceFragment
filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
context.registerReceiverAsUser(mUserChangeReceiver, UserHandle.ALL, filter, null,
mHandler);
+
+ if (Global.getInt(getContext().getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
+ getActivity().finish();
+ return;
+ }
}
@Override