Implement the power-control widget.
This widget allows uses to turn on/off bluetooth, wifi, gps, and sync,
and adjust brightness without going through the settings menu.
The widget provider updates the settings when the buttons are pressed.
The widget provider is also a receiver for events indicating that the
status was updated elsewhere and the buttons need to be changed.
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 204da69..150e27d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -520,9 +520,16 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
+
+ <receiver android:name=".widget.SettingsAppWidgetProvider" android:label="@string/gadget_title">
+ <intent-filter>
+ <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
+ <action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
+ <action android:name="android.net.conn.BACKGROUND_DATA_SETTING_CHANGED" />
+ <action android:name="android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED" />
+ <action android:name="android.intent.action.CLOSE_SYSTEM_DIALOGS" /> <!-- pick up misc changes -->
+ </intent-filter>
+ <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info" />
+ </receiver>
</application>
-
</manifest>
-
-
-