Aclaraciones de implementación de WakefulIntentService

De CommonswareWakefulIntentService Funciona a la perfección, pero hay algunas cosas que no entiendo del todo. A continuación se muestra el núcleo del servicio: una versión simplificada delfuente :

class WIS extends IntentService {

    private static final String NAME = WIS.class.getName() + ".Lock";
    private static volatile WakeLock lockStatic = null;

    synchronized private static PowerManager.WakeLock getLock(Context context) {
        if (lockStatic == null) {
            PowerManager mgr = (PowerManager) context
                    .getSystemService(Context.POWER_SERVICE);
            lockStatic = mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, NAME);
            lockStatic.setReferenceCounted(true);
        }
        return (lockStatic);
    }

    public static void startWIS(Context ctxt, Intent i) {
        getLock(ctxt.getApplicationContext()).acquire();
        ctxt.startService(i);
    }

    public WIS(String name) {
        super(name);
        setIntentRedelivery(true);
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        PowerManager.WakeLock lock = getLock(this.getApplicationContext());
        if (!lock.isHeld() || (flags & START_FLAG_REDELIVERY) != 0) { // ?
            lock.acquire();
        }
        super.onStartCommand(intent, flags, startId);
        return (START_REDELIVER_INTENT);
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        try {
            // do your thing
        } finally {
            PowerManager.WakeLock lock = getLock(this.getApplicationContext());
            if (lock.isHeld()) lock.release();
        }
    }
}

Preguntas

¿Qué pasa si el proceso es asesinado justo después de laonReceive() de nuestro receptor de alarma vuelve? Eso es si servicioonCreate() (si el servicio no está ya instanciado) oonStartCommand() nunca corras. AFAIK un proceso muerto lleva sus bloqueos con él. ¿O es este un escenario imposible?En vista de lo anterior se debe(flags & START_FLAG_RETRY) ser agregado ?Porqué elif (!lock.isHeld()) chequePor que esthis.getApplicationContext() necesario ? no esthis suficiente ?

Respuestas a la pregunta(2)

Su respuesta a la pregunta