summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/MasterClear.java
diff options
context:
space:
mode:
authorDan Egnor <egnor@google.com>2010-02-10 19:29:47 -0800
committerDan Egnor <egnor@google.com>2010-02-11 10:22:18 -0800
commit3352d10f0733eb8b8715ce89346378444fbfe3b2 (patch)
treea580e860de5d3b6fb2723cfdad5399d4ddf695fb /src/com/android/settings/MasterClear.java
parent438ba554b77999996888dcb374a09d5d729e56d3 (diff)
downloadpackages_apps_Settings-3352d10f0733eb8b8715ce89346378444fbfe3b2.zip
packages_apps_Settings-3352d10f0733eb8b8715ce89346378444fbfe3b2.tar.gz
packages_apps_Settings-3352d10f0733eb8b8715ce89346378444fbfe3b2.tar.bz2
Perform master clear via Intent broadcast, rather than using ICheckinService.
Diffstat (limited to 'src/com/android/settings/MasterClear.java')
-rw-r--r--src/com/android/settings/MasterClear.java27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index d33e1e8..4cf0546 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -60,35 +60,12 @@ public class MasterClear extends Activity {
*/
private Button.OnClickListener mFinalClickListener = new Button.OnClickListener() {
public void onClick(View v) {
-
if (Utils.isMonkeyRunning()) {
return;
}
- ICheckinService service =
- ICheckinService.Stub.asInterface(ServiceManager.getService("checkin"));
- if (service != null) {
- try {
- // This RPC should never return
- service.masterClear();
- } catch (android.os.RemoteException e) {
- // Intentionally blank - there's nothing we can do here
- Log.w("MasterClear", "Unable to invoke ICheckinService.masterClear()");
- }
- } else {
- Log.w("MasterClear", "Unable to locate ICheckinService");
- }
-
- /* If we reach this point, the master clear didn't happen -- the
- * service might have been unregistered with the ServiceManager,
- * the RPC might have thrown an exception, or for some reason
- * the implementation of masterClear() may have returned instead
- * of resetting the device.
- */
- new AlertDialog.Builder(MasterClear.this)
- .setMessage(getText(R.string.master_clear_failed))
- .setPositiveButton(getText(android.R.string.ok), null)
- .show();
+ sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));
+ // Intent handling is asynchronous -- assume it will happen soon.
}
};