Merge "Import translations. DO NOT MERGE" into jb-mr1-dev
diff --git a/res/layout/pick_item.xml b/res/layout/pick_item.xml
index 0ae0113..d85edc4 100755
--- a/res/layout/pick_item.xml
+++ b/res/layout/pick_item.xml
@@ -17,9 +17,9 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:textAppearance="?android:attr/textAppearanceLarge"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
+ android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
- android:drawablePadding="14dip"
- android:paddingStart="15dip"
- android:paddingEnd="15dip" />
+ android:drawablePadding="8dip"
+ android:paddingStart="11dip"
+ android:paddingEnd="11dip" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c315d94..fb1de52 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -807,8 +807,8 @@
<!-- String to display if there is no user-selected widget on lock screen [CHAR LIMIT=22] -->
<string name="widget_none">None</string>
- <!-- String to display if the default status widget is selected [CHAR LIMIT=22] -->
- <string name="widget_default">Default</string>
+ <!-- String to display if the clock status widget is selected (it is the default) [CHAR LIMIT=22] -->
+ <string name="widget_default">Clock</string>
<!-- Title for PreferenceScreen to change security method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
<string name="unlock_set_unlock_launch_picker_change_title">Change lock screen</string>
@@ -4250,6 +4250,8 @@
<!-- User settings screen title [CHAR LIMIT=25] -->
<string name="user_settings_title">Users</string>
+ <!-- User settings section title for details about you [CHAR LIMIT=25] -->
+ <string name="user_you_section">You</string>
<!-- User settings user list section header [CHAR LIMIT=30] -->
<string name="user_list_title">Other users</string>
<!-- User settings add user menu [CHAR LIMIT=20] -->
@@ -4266,8 +4268,10 @@
<string name="user_nickname">Nickname</string>
<!-- Title for add user confirmation dialog [CHAR LIMIT=30] -->
<string name="user_add_user_title">Add new user</string>
- <!-- Message for add user confirmation dialog [CHAR LIMIT=none] -->
- <string name="user_add_user_message">Each user you add can go to their own space from the lock screen and perform most routine tasks such as installing, updating, or uninstalling apps. After you create a new user, that person needs to go through a setup process.</string>
+ <!-- Message for add user confirmation dialog - long version. [CHAR LIMIT=none] -->
+ <string name="user_add_user_message_long">You can share this device with other people by creating additional users. Each user has their own space, which they can customize with their own apps, wallpaper, and so on. Users can also adjust tablet settings like Wi-Fi that affect everyone.\n\nAfter you create a new user, that person needs to go through a setup process.\n\nAny user can accept updated app permissions on behalf of all other users.</string>
+ <!-- Message for add user confirmation dialog - short version. [CHAR LIMIT=none] -->
+ <string name="user_add_user_message_short">After you create a new user, that person needs to go through a setup process.\n\nAny user can accept updated app permissions on behalf of all other users.</string>
<!-- Title of dialog to setup a new user [CHAR LIMIT=30] -->
<string name="user_setup_dialog_title">Set up user now?</string>
<!-- Message in dialog to setup a new user after creation [CHAR LIMIT=none] -->
diff --git a/res/xml/device_picker.xml b/res/xml/device_picker.xml
index 43b5829..9fef34d 100644
--- a/res/xml/device_picker.xml
+++ b/res/xml/device_picker.xml
@@ -21,7 +21,7 @@
android:key="bt_scan"
android:title="@string/bluetooth_preference_scan_title" />
- <com.android.settings.ProgressCategory
+ <com.android.settings.bluetooth.BluetoothProgressCategory
android:key="bt_device_list"
android:title="@string/bluetooth_preference_found_devices"
android:orderingFromXml="false" />
diff --git a/res/xml/user_settings.xml b/res/xml/user_settings.xml
index 457239a..d97f1a6 100644
--- a/res/xml/user_settings.xml
+++ b/res/xml/user_settings.xml
@@ -18,6 +18,9 @@
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/user_settings_title">
+ <PreferenceCategory
+ android:key="user_you"
+ android:title="@string/user_you_section"/>
<Preference
android:key="user_me"
android:summary="@string/user_owner" />
diff --git a/res/xml/wifi_access_points.xml b/res/xml/wifi_access_points.xml
index 48104dd..7b8c92b 100644
--- a/res/xml/wifi_access_points.xml
+++ b/res/xml/wifi_access_points.xml
@@ -17,7 +17,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/wifi_settings_category">
- <com.android.settings.ProgressCategory
+ <com.android.settings.bluetooth.BluetoothProgressCategory
android:key="access_points"
android:title="@string/wifi_access_points"
android:persistent="false" />
diff --git a/src/com/android/settings/AppWidgetPickActivity.java b/src/com/android/settings/AppWidgetPickActivity.java
index a475649..97f816a 100644
--- a/src/com/android/settings/AppWidgetPickActivity.java
+++ b/src/com/android/settings/AppWidgetPickActivity.java
@@ -21,17 +21,20 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcelable;
import android.os.SystemProperties;
+import android.util.DisplayMetrics;
import android.util.Log;
import java.text.Collator;
-import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.List;
/**
* Displays a list of {@link AppWidgetProviderInfo} widgets, along with any
@@ -49,6 +52,7 @@
private PackageManager mPackageManager;
private AppWidgetManager mAppWidgetManager;
+ List<PickAdapter.Item> mItems;
/**
* The allocated {@link AppWidgetManager#EXTRA_APPWIDGET_ID} that this
@@ -143,11 +147,10 @@
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = getIntentForPosition(which);
+ PickAdapter.Item item = (PickAdapter.Item) mItems.get(which);
int result;
- if (intent.getExtras() != null &&
- (intent.getExtras().containsKey(AppWidgetManager.EXTRA_CUSTOM_INFO) ||
- intent.getExtras().containsKey(AppWidgetManager.EXTRA_CUSTOM_EXTRAS))) {
+ if (item.extras != null) {
// If these extras are present it's because this entry is custom.
// Don't try to bind it, just pass it back to the app.
setResultData(RESULT_OK, intent);
@@ -185,11 +188,47 @@
for (int i = 0; i < size; i++) {
AppWidgetProviderInfo info = appWidgets.get(i);
+ // We remove any widgets whose category isn't included in the filter
+ if (!ignoreFilters && (info.widgetCategory & categoryFilter) == 0) {
+ continue;
+ }
+
+ // We remove any widgets who don't have all the features in the features filter
+ if (!ignoreFilters && (info.widgetFeatures & featuresFilter) != featuresFilter) {
+ continue;
+ }
+
CharSequence label = info.label;
Drawable icon = null;
if (info.icon != 0) {
- icon = mPackageManager.getDrawable(info.provider.getPackageName(), info.icon, null);
+ try {
+ final Resources res = getResources();
+ final int density = res.getDisplayMetrics().densityDpi;
+ int iconDensity;
+ switch (density) {
+ case DisplayMetrics.DENSITY_MEDIUM:
+ iconDensity = DisplayMetrics.DENSITY_LOW;
+ case DisplayMetrics.DENSITY_TV:
+ iconDensity = DisplayMetrics.DENSITY_MEDIUM;
+ case DisplayMetrics.DENSITY_HIGH:
+ iconDensity = DisplayMetrics.DENSITY_MEDIUM;
+ case DisplayMetrics.DENSITY_XHIGH:
+ iconDensity = DisplayMetrics.DENSITY_HIGH;
+ case DisplayMetrics.DENSITY_XXHIGH:
+ iconDensity = DisplayMetrics.DENSITY_XHIGH;
+ default:
+ // The density is some abnormal value. Return some other
+ // abnormal value that is a reasonable scaling of it.
+ iconDensity = (int)((density*0.75f)+.5f);
+ }
+ Resources packageResources = mPackageManager.
+ getResourcesForApplication(info.provider.getPackageName());
+ icon = packageResources.getDrawableForDensity(info.icon, iconDensity);
+ } catch (NameNotFoundException e) {
+ Log.w(TAG, "Can't load icon drawable 0x" + Integer.toHexString(info.icon)
+ + " for provider: " + info.provider);
+ }
if (icon == null) {
Log.w(TAG, "Can't load icon drawable 0x" + Integer.toHexString(info.icon)
+ " for provider: " + info.provider);
@@ -205,16 +244,6 @@
item.extras = customExtras.get(i);
}
- // We remove any widgets whose category isn't included in the filter
- if (!ignoreFilters && (info.widgetCategory & categoryFilter) == 0) {
- continue;
- }
-
- // We remove any widgets who don't have all the features in the features filter
- if (!ignoreFilters && (info.widgetFeatures & featuresFilter) != featuresFilter) {
- continue;
- }
-
items.add(item);
}
}
@@ -259,8 +288,9 @@
if (!sortCustomAppWidgets) {
List<PickAdapter.Item> customItems = new ArrayList<PickAdapter.Item>();
putCustomAppWidgets(customItems);
- items.addAll(0, customItems);
+ items.addAll(customItems);
}
+ mItems = items;
return items;
}
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 705ce55..b6a2beb 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -706,8 +706,8 @@
}
private void updateOverlayDisplayDevicesOptions() {
- String value = Settings.System.getString(getActivity().getContentResolver(),
- Settings.Secure.OVERLAY_DISPLAY_DEVICES);
+ String value = Settings.Global.getString(getActivity().getContentResolver(),
+ Settings.Global.OVERLAY_DISPLAY_DEVICES);
if (value == null) {
value = "";
}
@@ -725,8 +725,8 @@
}
private void writeOverlayDisplayDevicesOptions(Object newValue) {
- Settings.System.putString(getActivity().getContentResolver(),
- Settings.Secure.OVERLAY_DISPLAY_DEVICES, (String)newValue);
+ Settings.Global.putString(getActivity().getContentResolver(),
+ Settings.Global.OVERLAY_DISPLAY_DEVICES, (String)newValue);
updateOverlayDisplayDevicesOptions();
}
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index f5d1608..1b63acb 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -475,6 +475,46 @@
}
}
+ private void launchPickActivityIntent(int featuresFilter, int defaultLabelId, int defaultIconId,
+ ComponentName defaultComponentName, String defaultTag) {
+ // Create intent to pick widget
+ Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
+
+ // Found in KeyguardHostView.java
+ final int KEYGUARD_HOST_ID = 0x4B455947;
+ int appWidgetId = AppWidgetHost.allocateAppWidgetIdForSystem(KEYGUARD_HOST_ID);
+ if (appWidgetId != -1) {
+ pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
+ pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_SORT, false);
+ pickIntent.putExtra(AppWidgetManager.EXTRA_CATEGORY_FILTER,
+ AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD);
+ if (featuresFilter != AppWidgetProviderInfo.WIDGET_FEATURES_NONE) {
+ pickIntent.putExtra(AppWidgetManager.EXTRA_FEATURES_FILTER, featuresFilter);
+ }
+
+ // Add an entry for "none" to let someone select no widget
+ AppWidgetProviderInfo defaultInfo = new AppWidgetProviderInfo();
+ ArrayList<AppWidgetProviderInfo> extraInfos = new ArrayList<AppWidgetProviderInfo>();
+ defaultInfo.label = getResources().getString(defaultLabelId);
+ defaultInfo.icon = defaultIconId;
+ defaultInfo.provider = defaultComponentName;
+ extraInfos.add(defaultInfo);
+
+ ArrayList<Bundle> extraExtras = new ArrayList<Bundle>();
+ Bundle b = new Bundle();
+ b.putBoolean(defaultTag, true);
+ extraExtras.add(b);
+
+ // Launch the widget picker
+ pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, extraInfos);
+ pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, extraExtras);
+ pickIntent.putExtra(Intent.EXTRA_INTENT, getBaseIntent());
+ startActivityForResult(pickIntent, REQUEST_PICK_USER_SELECTED_APPWIDGET);
+ } else {
+ Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
+ }
+ }
+
private Intent getBaseIntent() {
Intent baseIntent = new Intent(Intent.ACTION_MAIN, null);
baseIntent.addCategory(Intent.CATEGORY_DEFAULT);
@@ -495,73 +535,19 @@
startFragment(this, "com.android.settings.ChooseLockGeneric$ChooseLockGenericFragment",
SET_OR_CHANGE_LOCK_METHOD_REQUEST, null);
} else if (KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET.equals(key)) {
- // Create intent to pick widget
- Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
-
- // Found in KeyguardHostView.java
- final int KEYGUARD_HOST_ID = 0x4B455947;
- int appWidgetId = AppWidgetHost.allocateAppWidgetIdForSystem(KEYGUARD_HOST_ID);
- if (appWidgetId != -1) {
- pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
- pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_SORT, false);
- pickIntent.putExtra(AppWidgetManager.EXTRA_CATEGORY_FILTER,
- AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD);
-
- // Add an entry for "none" to let someone select no widget
- AppWidgetProviderInfo noneInfo = new AppWidgetProviderInfo();
- ArrayList<AppWidgetProviderInfo> extraInfos = new ArrayList<AppWidgetProviderInfo>();
- noneInfo.label = getResources().getString(R.string.widget_none);
- noneInfo.provider = new ComponentName("", "");
- extraInfos.add(noneInfo);
-
- ArrayList<Bundle> extraExtras = new ArrayList<Bundle>();
- Bundle b = new Bundle();
- b.putBoolean(EXTRA_NO_WIDGET, true);
- extraExtras.add(b);
-
- // Launch the widget picker
- pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, extraInfos);
- pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, extraExtras);
- pickIntent.putExtra(Intent.EXTRA_INTENT, getBaseIntent());
- startActivityForResult(pickIntent, REQUEST_PICK_USER_SELECTED_APPWIDGET);
- } else {
- Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
- }
+ launchPickActivityIntent(AppWidgetProviderInfo.WIDGET_FEATURES_NONE,
+ R.string.widget_none, 0, new ComponentName("", ""), EXTRA_NO_WIDGET);
} else if (KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET.equals(key)) {
- // Create intent to pick widget
- Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
-
- // Found in KeyguardHostView.java
- final int KEYGUARD_HOST_ID = 0x4B455947;
- int appWidgetId = AppWidgetHost.allocateAppWidgetIdForSystem(KEYGUARD_HOST_ID);
- if (appWidgetId != -1) {
- pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
- pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_SORT, false);
- pickIntent.putExtra(AppWidgetManager.EXTRA_CATEGORY_FILTER,
- AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD);
- pickIntent.putExtra(AppWidgetManager.EXTRA_FEATURES_FILTER,
- AppWidgetProviderInfo.WIDGET_FEATURES_STATUS);
-
- // Add an entry for "none" to let someone select no widget
- AppWidgetProviderInfo noneInfo = new AppWidgetProviderInfo();
- ArrayList<AppWidgetProviderInfo> extraInfos = new ArrayList<AppWidgetProviderInfo>();
- noneInfo.label = getResources().getString(R.string.widget_default);
- noneInfo.provider = new ComponentName("", "");
- extraInfos.add(noneInfo);
-
- ArrayList<Bundle> extraExtras = new ArrayList<Bundle>();
- Bundle b = new Bundle();
- b.putBoolean(EXTRA_DEFAULT_WIDGET, true);
- extraExtras.add(b);
-
- // Launch the widget picker
- pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, extraInfos);
- pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, extraExtras);
- pickIntent.putExtra(Intent.EXTRA_INTENT, getBaseIntent());
- startActivityForResult(pickIntent, REQUEST_PICK_STATUS_APPWIDGET);
- } else {
- Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
+ int defaultIconId;
+ ComponentName clock = new ComponentName(
+ "com.google.android.deskclock", "com.android.deskclock.DeskClock");
+ try {
+ defaultIconId = getActivity().getPackageManager().getActivityInfo(clock, 0).icon;
+ } catch (PackageManager.NameNotFoundException e) {
+ defaultIconId = 0;
}
+ launchPickActivityIntent(AppWidgetProviderInfo.WIDGET_FEATURES_STATUS,
+ R.string.widget_default, defaultIconId, clock, EXTRA_DEFAULT_WIDGET);
} else if (KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING.equals(key)) {
ChooseLockSettingsHelper helper =
new ChooseLockSettingsHelper(this.getActivity(), this);
diff --git a/src/com/android/settings/bluetooth/BluetoothProgressCategory.java b/src/com/android/settings/bluetooth/BluetoothProgressCategory.java
new file mode 100644
index 0000000..1c81360
--- /dev/null
+++ b/src/com/android/settings/bluetooth/BluetoothProgressCategory.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2012 The Android Open Source 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.
+ */
+
+package com.android.settings.bluetooth;
+
+import com.android.settings.ProgressCategory;
+import com.android.settings.R;
+
+import android.content.Context;
+import android.util.AttributeSet;
+
+public class BluetoothProgressCategory extends ProgressCategory {
+ public BluetoothProgressCategory(Context context, AttributeSet attrs) {
+ super(context, attrs, R.string.bluetooth_no_devices_found);
+ }
+}
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 0765d8f..e9ba39d 100755
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -282,8 +282,7 @@
// Available devices category
if (mAvailableDevicesCategory == null) {
- mAvailableDevicesCategory = new ProgressCategory(getActivity(), null,
- R.string.bluetooth_no_devices_found);
+ mAvailableDevicesCategory = new BluetoothProgressCategory(getActivity(), null);
} else {
mAvailableDevicesCategory.removeAll();
}
diff --git a/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java b/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java
index 90f8de5..7fc1b65 100644
--- a/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java
+++ b/src/com/android/settings/bluetooth/DeviceListPreferenceFragment.java
@@ -193,8 +193,8 @@
}
private void updateProgressUi(boolean start) {
- if (mDeviceListGroup instanceof ProgressCategory) {
- ((ProgressCategory) mDeviceListGroup).setProgress(start);
+ if (mDeviceListGroup instanceof BluetoothProgressCategory) {
+ ((BluetoothProgressCategory) mDeviceListGroup).setProgress(start);
}
}
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 56c557e..c7829cb 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -24,6 +24,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.SharedPreferences;
import android.content.pm.UserInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -41,7 +42,6 @@
import android.preference.PreferenceGroup;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.text.InputType;
import android.util.Log;
import android.util.SparseArray;
@@ -50,7 +50,6 @@
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
-import android.widget.EditText;
import com.android.settings.R;
import com.android.settings.SelectableEditTextPreference;
@@ -80,6 +79,9 @@
private static final int MESSAGE_UPDATE_LIST = 1;
private static final int MESSAGE_SETUP_USER = 2;
+ private static final String KEY_ADD_USER_LONG_MESSAGE_DISPLAYED =
+ "key_add_user_long_message_displayed";
+
private static final int[] USER_DRAWABLES = {
R.drawable.ic_user,
R.drawable.ic_user_cyan,
@@ -171,7 +173,7 @@
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (UserHandle.myUserId() == UserHandle.USER_OWNER) {
- if (mUserManager.getMaxSupportedUsers() > mUserManager.getUsers(false).size()) {
+ if (UserManager.getMaxSupportedUsers() > mUserManager.getUsers(false).size()) {
MenuItem addUserItem = menu.add(0, MENU_ADD_USER, 0, R.string.user_add_user_menu);
addUserItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM
| MenuItem.SHOW_AS_ACTION_WITH_TEXT);
@@ -273,13 +275,24 @@
.setNegativeButton(android.R.string.cancel, null)
.create();
case DIALOG_ADD_USER:
+ final SharedPreferences preferences = getActivity().getPreferences(
+ Context.MODE_PRIVATE);
+ final boolean longMessageDisplayed = preferences.getBoolean(
+ KEY_ADD_USER_LONG_MESSAGE_DISPLAYED, false);
+ final int messageResId = longMessageDisplayed
+ ? R.string.user_add_user_message_short
+ : R.string.user_add_user_message_long;
return new AlertDialog.Builder(getActivity())
.setTitle(R.string.user_add_user_title)
- .setMessage(R.string.user_add_user_message)
+ .setMessage(messageResId)
.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
addUserNow();
+ if (!longMessageDisplayed) {
+ preferences.edit().putBoolean(KEY_ADD_USER_LONG_MESSAGE_DISPLAYED,
+ true).commit();
+ }
}
})
.setNegativeButton(android.R.string.cancel, null)
diff --git a/src/com/android/settings/wifi/AdvancedWifiSettings.java b/src/com/android/settings/wifi/AdvancedWifiSettings.java
index f574808..ac664e2 100644
--- a/src/com/android/settings/wifi/AdvancedWifiSettings.java
+++ b/src/com/android/settings/wifi/AdvancedWifiSettings.java
@@ -70,8 +70,8 @@
private void initPreferences() {
CheckBoxPreference notifyOpenNetworks =
(CheckBoxPreference) findPreference(KEY_NOTIFY_OPEN_NETWORKS);
- notifyOpenNetworks.setChecked(Secure.getInt(getContentResolver(),
- Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0) == 1);
+ notifyOpenNetworks.setChecked(Settings.Global.getInt(getContentResolver(),
+ Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0) == 1);
notifyOpenNetworks.setEnabled(mWifiManager.isWifiEnabled());
CheckBoxPreference poorNetworkDetection =
@@ -148,7 +148,7 @@
if (KEY_NOTIFY_OPEN_NETWORKS.equals(key)) {
Secure.putInt(getContentResolver(),
- Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
+ Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
((CheckBoxPreference) preference).isChecked() ? 1 : 0);
} else if (KEY_POOR_NETWORK_DETECTION.equals(key)) {
Secure.putInt(getContentResolver(),