I would assume you would also need android.permission.MASTER_CLEAR.
And then it looks like this is the magic from that file:
ICheckinService service =
71
ICheckinService.Stub.asInterface(ServiceManager.getService("checkin"));
72 if (service != null) {
73 try {
74 // This RPC should never return
75 service.masterClear();
76 } catch (android.os.RemoteException e) {
77 // Intentionally blank - there's nothing
we can do here
78 Log.w("MasterClear", "Unable to invoke
ICheckinService.masterClear()");
79 }
80 } else {
81 Log.w("MasterClear", "Unable to locate
ICheckinService");
82 }
On Wed, Dec 17, 2008 at 5:40 PM, John Spurlock <[email protected]> wrote:
>
> I'm curious about this myself. Looking at the source code for the
> Settings app yields a few clues...
>
> http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=src/com/android/settings/MasterClear.java;h=38ad6081850061000fd84f9c1febf97a23d51a0d;hb=HEAD
>
> Hope that helps,
> - John
>
> On Dec 14, 9:16 pm, Siva G <[email protected]> wrote:
>> Hi All,
>>
>> Is there a way toresetthe android phone programatically? I mean is
>> there any API to do this?
>>
>> Thanks,
>> Siva G
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---