if (intent.getAction().equals("android.intent.action.GTALK_DATA_MESSAGE_RECEIVED")) {
if (!intent.getBooleanExtra("from_trusted_server", false)) {
Log.w(TAG, "Ignoring master clear request -- not from trusted server.");
return;
}
}
Log.w(TAG, "!!! FACTORY RESETTING DEVICE !!!");
ICheckinService service =
ICheckinService.Stub.asInterface(
ServiceManager.getService("checkin"));
if (service != null) {
try {
// This RPC should never return.
service.masterClear();
} catch (RemoteException e) {
Log.w("MasterClear",
"Unable to invoke ICheckinService.masterClear()");
}
}