Merge "P2p UI fixes"
diff --git a/src/com/android/settings/widget/SettingsAppWidgetProvider.java b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
index 656d072..3101b01 100644
--- a/src/com/android/settings/widget/SettingsAppWidgetProvider.java
+++ b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
@@ -605,9 +605,10 @@
@Override
public void onEnabled(Context context) {
+ Class clazz = com.android.settings.widget.SettingsAppWidgetProvider.class;
PackageManager pm = context.getPackageManager();
pm.setComponentEnabledSetting(
- new ComponentName("com.android.settings", ".widget.SettingsAppWidgetProvider"),
+ new ComponentName(context.getPackageName(), clazz.getName()),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP);
checkObserver(context);
@@ -618,7 +619,7 @@
Class clazz = com.android.settings.widget.SettingsAppWidgetProvider.class;
PackageManager pm = context.getPackageManager();
pm.setComponentEnabledSetting(
- new ComponentName("com.android.settings", ".widget.SettingsAppWidgetProvider"),
+ new ComponentName(context.getPackageName(), clazz.getName()),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
if (sSettingsObserver != null) {