FileDocCategorySizeDatePackage
MasterClearReceiver.javaAPI DocAndroid 1.5 API1891Wed May 06 22:42:00 BST 2009com.android.server

MasterClearReceiver

public class MasterClearReceiver extends android.content.BroadcastReceiver

Fields Summary
private static final String
TAG
Constructors Summary
Methods Summary
public voidonReceive(android.content.Context context, android.content.Intent intent)


    
          
        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()");
            }
        }