Add support for changing status widget on security screen
Change-Id: I68a8ce2ce03888a8decbe017d67634c6965f0a1a
This commit is contained in:
@@ -794,12 +794,18 @@
|
|||||||
<!-- Title for PreferenceScreen to launch picker for security method when there is none [CHAR LIMIT=22] -->
|
<!-- Title for PreferenceScreen to launch picker for security method when there is none [CHAR LIMIT=22] -->
|
||||||
<string name="unlock_set_unlock_launch_picker_title">Screen lock</string>
|
<string name="unlock_set_unlock_launch_picker_title">Screen lock</string>
|
||||||
|
|
||||||
|
<!-- Title for PreferenceScreen to launch picker for a user-selected time & data widget that will live on lock screen [CHAR LIMIT=22] -->
|
||||||
|
<string name="choose_lockscreen_status_widget_picker_title">Status widget</string>
|
||||||
|
|
||||||
<!-- Title for PreferenceScreen to launch picker for a user-selected widget that will live on lock screen [CHAR LIMIT=22] -->
|
<!-- Title for PreferenceScreen to launch picker for a user-selected widget that will live on lock screen [CHAR LIMIT=22] -->
|
||||||
<string name="choose_user_selected_lockscreen_widget_picker_title">Widget</string>
|
<string name="choose_user_selected_lockscreen_widget_picker_title">Other widget</string>
|
||||||
|
|
||||||
<!-- String to display if there is no user-selected widget on lock screen [CHAR LIMIT=22] -->
|
<!-- String to display if there is no user-selected widget on lock screen [CHAR LIMIT=22] -->
|
||||||
<string name="widget_none">None</string>
|
<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>
|
||||||
|
|
||||||
<!-- Title for PreferenceScreen to change security method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
|
<!-- 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>
|
<string name="unlock_set_unlock_launch_picker_change_title">Change lock screen</string>
|
||||||
|
|
||||||
|
@@ -26,6 +26,18 @@
|
|||||||
android:summary="@string/unlock_set_unlock_mode_biometric_weak"
|
android:summary="@string/unlock_set_unlock_mode_biometric_weak"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="choose_lockscreen_status_widget"
|
||||||
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
android:summary=""
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="choose_user_selected_lockscreen_widget"
|
||||||
|
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
||||||
|
android:summary=""
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="biometric_weak_improve_matching"
|
android:key="biometric_weak_improve_matching"
|
||||||
android:title="@string/biometric_weak_improve_matching_title"/>
|
android:title="@string/biometric_weak_improve_matching_title"/>
|
||||||
|
@@ -26,6 +26,12 @@
|
|||||||
android:summary="@string/unlock_set_unlock_mode_none"
|
android:summary="@string/unlock_set_unlock_mode_none"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="choose_lockscreen_status_widget"
|
||||||
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
android:summary=""
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_user_selected_lockscreen_widget"
|
android:key="choose_user_selected_lockscreen_widget"
|
||||||
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
||||||
|
@@ -26,6 +26,12 @@
|
|||||||
android:summary="@string/unlock_set_unlock_mode_password"
|
android:summary="@string/unlock_set_unlock_mode_password"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="choose_lockscreen_status_widget"
|
||||||
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
android:summary=""
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_user_selected_lockscreen_widget"
|
android:key="choose_user_selected_lockscreen_widget"
|
||||||
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
||||||
|
@@ -25,6 +25,13 @@
|
|||||||
android:title="@string/unlock_set_unlock_launch_picker_title"
|
android:title="@string/unlock_set_unlock_launch_picker_title"
|
||||||
android:summary="@string/unlock_set_unlock_mode_pattern"
|
android:summary="@string/unlock_set_unlock_mode_pattern"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="choose_lockscreen_status_widget"
|
||||||
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
android:summary=""
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_user_selected_lockscreen_widget"
|
android:key="choose_user_selected_lockscreen_widget"
|
||||||
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
||||||
|
@@ -25,11 +25,19 @@
|
|||||||
android:title="@string/unlock_set_unlock_launch_picker_title"
|
android:title="@string/unlock_set_unlock_launch_picker_title"
|
||||||
android:summary="@string/unlock_set_unlock_mode_pin"
|
android:summary="@string/unlock_set_unlock_mode_pin"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="choose_lockscreen_status_widget"
|
||||||
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
android:summary=""
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_user_selected_lockscreen_widget"
|
android:key="choose_user_selected_lockscreen_widget"
|
||||||
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
android:title="@string/choose_user_selected_lockscreen_widget_picker_title"
|
||||||
android:summary=""
|
android:summary=""
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:key="lock_after_timeout"
|
android:key="lock_after_timeout"
|
||||||
android:title="@string/lock_after_timeout"
|
android:title="@string/lock_after_timeout"
|
||||||
|
@@ -61,6 +61,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
// Lock Settings
|
// Lock Settings
|
||||||
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
|
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
|
||||||
|
private static final String KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET =
|
||||||
|
"choose_lockscreen_status_widget";
|
||||||
private static final String KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET =
|
private static final String KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET =
|
||||||
"choose_user_selected_lockscreen_widget";
|
"choose_user_selected_lockscreen_widget";
|
||||||
private static final String KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING =
|
private static final String KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING =
|
||||||
@@ -72,11 +74,14 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
private static final String KEY_SECURITY_CATEGORY = "security_category";
|
private static final String KEY_SECURITY_CATEGORY = "security_category";
|
||||||
private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout";
|
private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout";
|
||||||
private static final String EXTRA_NO_WIDGET = "com.android.settings.NO_WIDGET";
|
private static final String EXTRA_NO_WIDGET = "com.android.settings.NO_WIDGET";
|
||||||
|
private static final String EXTRA_DEFAULT_WIDGET = "com.android.settings.DEFAULT_WIDGET";
|
||||||
private static final int SET_OR_CHANGE_LOCK_METHOD_REQUEST = 123;
|
private static final int SET_OR_CHANGE_LOCK_METHOD_REQUEST = 123;
|
||||||
private static final int CONFIRM_EXISTING_FOR_BIOMETRIC_WEAK_IMPROVE_REQUEST = 124;
|
private static final int CONFIRM_EXISTING_FOR_BIOMETRIC_WEAK_IMPROVE_REQUEST = 124;
|
||||||
private static final int CONFIRM_EXISTING_FOR_BIOMETRIC_WEAK_LIVELINESS_OFF = 125;
|
private static final int CONFIRM_EXISTING_FOR_BIOMETRIC_WEAK_LIVELINESS_OFF = 125;
|
||||||
private static final int REQUEST_PICK_APPWIDGET = 126;
|
private static final int REQUEST_PICK_USER_SELECTED_APPWIDGET = 126;
|
||||||
private static final int REQUEST_CREATE_APPWIDGET = 127;
|
private static final int REQUEST_PICK_STATUS_APPWIDGET = 127;
|
||||||
|
private static final int REQUEST_CREATE_USER_SELECTED_APPWIDGET = 128;
|
||||||
|
private static final int REQUEST_CREATE_STATUS_APPWIDGET = 129;
|
||||||
|
|
||||||
// Misc Settings
|
// Misc Settings
|
||||||
private static final String KEY_SIM_LOCK = "sim_lock";
|
private static final String KEY_SIM_LOCK = "sim_lock";
|
||||||
@@ -254,6 +259,20 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mUserSelectedWidget = root.findPreference(KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET);
|
||||||
|
if (mUserSelectedWidget != null) {
|
||||||
|
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
||||||
|
int appWidgetId = getStatusAppWidgetId();
|
||||||
|
if (appWidgetId == -1) {
|
||||||
|
mUserSelectedWidget.setSummary(getResources().getString(R.string.widget_default));
|
||||||
|
} else {
|
||||||
|
AppWidgetProviderInfo appWidget = appWidgetManager.getAppWidgetInfo(appWidgetId);
|
||||||
|
if (appWidget != null) {
|
||||||
|
mUserSelectedWidget.setSummary(appWidget.label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mUserSelectedWidget = root.findPreference(KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET);
|
mUserSelectedWidget = root.findPreference(KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET);
|
||||||
if (mUserSelectedWidget != null) {
|
if (mUserSelectedWidget != null) {
|
||||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
||||||
@@ -271,6 +290,16 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getStatusAppWidgetId() {
|
||||||
|
int appWidgetId = -1;
|
||||||
|
String appWidgetIdString = Settings.Secure.getString(
|
||||||
|
getContentResolver(), Settings.Secure.LOCK_SCREEN_STATUS_APPWIDGET_ID);
|
||||||
|
if (appWidgetIdString != null) {;
|
||||||
|
appWidgetId = (int) Integer.decode(appWidgetIdString);
|
||||||
|
}
|
||||||
|
return appWidgetId;
|
||||||
|
}
|
||||||
|
|
||||||
private int getUserSelectedAppWidgetId() {
|
private int getUserSelectedAppWidgetId() {
|
||||||
int appWidgetId = -1;
|
int appWidgetId = -1;
|
||||||
String appWidgetIdString = Settings.Secure.getString(
|
String appWidgetIdString = Settings.Secure.getString(
|
||||||
@@ -457,6 +486,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
} else if (KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET.equals(key)) {
|
} else if (KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET.equals(key)) {
|
||||||
// Create intent to pick widget
|
// Create intent to pick widget
|
||||||
Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
|
Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
|
||||||
|
|
||||||
// Found in KeyguardHostView.java
|
// Found in KeyguardHostView.java
|
||||||
final int KEYGUARD_HOST_ID = 0x4B455947;
|
final int KEYGUARD_HOST_ID = 0x4B455947;
|
||||||
int appWidgetId = AppWidgetHost.allocateAppWidgetIdForSystem(KEYGUARD_HOST_ID);
|
int appWidgetId = AppWidgetHost.allocateAppWidgetIdForSystem(KEYGUARD_HOST_ID);
|
||||||
@@ -481,7 +511,41 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
// Launch the widget picker
|
// Launch the widget picker
|
||||||
pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, extraInfos);
|
pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, extraInfos);
|
||||||
pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, extraExtras);
|
pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, extraExtras);
|
||||||
startActivityForResult(pickIntent, REQUEST_PICK_APPWIDGET);
|
startActivityForResult(pickIntent, REQUEST_PICK_USER_SELECTED_APPWIDGET);
|
||||||
|
} else {
|
||||||
|
Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
|
||||||
|
}
|
||||||
|
} 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);
|
||||||
|
startActivityForResult(pickIntent, REQUEST_PICK_STATUS_APPWIDGET);
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
|
Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
|
||||||
}
|
}
|
||||||
@@ -567,44 +631,56 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
// is called by grabbing the value from lockPatternUtils. We can't set it here
|
// is called by grabbing the value from lockPatternUtils. We can't set it here
|
||||||
// because mBiometricWeakLiveliness could be null
|
// because mBiometricWeakLiveliness could be null
|
||||||
return;
|
return;
|
||||||
} else if (requestCode == REQUEST_PICK_APPWIDGET ||
|
} else if (requestCode == REQUEST_PICK_USER_SELECTED_APPWIDGET ||
|
||||||
requestCode == REQUEST_CREATE_APPWIDGET) {
|
requestCode == REQUEST_PICK_STATUS_APPWIDGET ||
|
||||||
|
requestCode == REQUEST_CREATE_USER_SELECTED_APPWIDGET ||
|
||||||
|
requestCode == REQUEST_CREATE_STATUS_APPWIDGET) {
|
||||||
int appWidgetId = (data == null) ? -1 : data.getIntExtra(
|
int appWidgetId = (data == null) ? -1 : data.getIntExtra(
|
||||||
AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
|
AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
|
||||||
if (requestCode == REQUEST_PICK_APPWIDGET && resultCode == Activity.RESULT_OK) {
|
if ((requestCode == REQUEST_PICK_USER_SELECTED_APPWIDGET ||
|
||||||
|
requestCode == REQUEST_PICK_STATUS_APPWIDGET) &&
|
||||||
|
resultCode == Activity.RESULT_OK) {
|
||||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
||||||
boolean noWidget = data.getBooleanExtra(EXTRA_NO_WIDGET, false);
|
boolean defaultOrNoWidget = data.getBooleanExtra(EXTRA_NO_WIDGET, false) ||
|
||||||
|
data.getBooleanExtra(EXTRA_DEFAULT_WIDGET, false);
|
||||||
|
|
||||||
AppWidgetProviderInfo appWidget = null;
|
AppWidgetProviderInfo appWidget = null;
|
||||||
if (!noWidget) {
|
if (!defaultOrNoWidget) {
|
||||||
appWidget = appWidgetManager.getAppWidgetInfo(appWidgetId);
|
appWidget = appWidgetManager.getAppWidgetInfo(appWidgetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!noWidget && appWidget.configure != null) {
|
int newRequestCode = requestCode == REQUEST_PICK_USER_SELECTED_APPWIDGET ?
|
||||||
|
REQUEST_CREATE_USER_SELECTED_APPWIDGET :
|
||||||
|
REQUEST_CREATE_STATUS_APPWIDGET;
|
||||||
|
if (!defaultOrNoWidget && appWidget.configure != null) {
|
||||||
// Launch over to configure widget, if needed
|
// Launch over to configure widget, if needed
|
||||||
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
|
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
|
||||||
intent.setComponent(appWidget.configure);
|
intent.setComponent(appWidget.configure);
|
||||||
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
|
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
|
||||||
|
|
||||||
startActivityForResultSafely(intent, REQUEST_CREATE_APPWIDGET);
|
startActivityForResultSafely(intent, newRequestCode);
|
||||||
} else {
|
} else {
|
||||||
// Otherwise just add it
|
// Otherwise just add it
|
||||||
if (noWidget) {
|
if (defaultOrNoWidget) {
|
||||||
// If we selected "none", delete the allocated id
|
// If we selected "none", delete the allocated id
|
||||||
AppWidgetHost.deleteAppWidgetIdForSystem(appWidgetId);
|
AppWidgetHost.deleteAppWidgetIdForSystem(appWidgetId);
|
||||||
data.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
|
data.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
|
||||||
}
|
}
|
||||||
onActivityResult(REQUEST_CREATE_APPWIDGET, Activity.RESULT_OK, data);
|
onActivityResult(newRequestCode, Activity.RESULT_OK, data);
|
||||||
}
|
}
|
||||||
} else if (
|
} else if ((requestCode == REQUEST_CREATE_USER_SELECTED_APPWIDGET ||
|
||||||
requestCode == REQUEST_CREATE_APPWIDGET && resultCode == Activity.RESULT_OK) {
|
requestCode == REQUEST_CREATE_STATUS_APPWIDGET) &&
|
||||||
|
resultCode == Activity.RESULT_OK) {
|
||||||
// If a widget existed before, delete it
|
// If a widget existed before, delete it
|
||||||
int oldAppWidgetId = getUserSelectedAppWidgetId();
|
int oldAppWidgetId = requestCode == REQUEST_CREATE_USER_SELECTED_APPWIDGET ?
|
||||||
|
getUserSelectedAppWidgetId() : getStatusAppWidgetId();
|
||||||
if (oldAppWidgetId != -1) {
|
if (oldAppWidgetId != -1) {
|
||||||
AppWidgetHost.deleteAppWidgetIdForSystem(oldAppWidgetId);
|
AppWidgetHost.deleteAppWidgetIdForSystem(oldAppWidgetId);
|
||||||
}
|
}
|
||||||
Settings.Secure.putString(getContentResolver(),
|
Settings.Secure.putString(getContentResolver(),
|
||||||
Settings.Secure.LOCK_SCREEN_USER_SELECTED_APPWIDGET_ID,
|
(requestCode == REQUEST_CREATE_USER_SELECTED_APPWIDGET ?
|
||||||
|
Settings.Secure.LOCK_SCREEN_USER_SELECTED_APPWIDGET_ID :
|
||||||
|
Settings.Secure.LOCK_SCREEN_STATUS_APPWIDGET_ID),
|
||||||
Integer.toString(appWidgetId));
|
Integer.toString(appWidgetId));
|
||||||
} else {
|
} else {
|
||||||
AppWidgetHost.deleteAppWidgetIdForSystem(appWidgetId);
|
AppWidgetHost.deleteAppWidgetIdForSystem(appWidgetId);
|
||||||
|
Reference in New Issue
Block a user