O botão liga / desliga do Android não está recebendo pelo receptor

Estou tentando receber o pressionamento do botão liga / desliga, mas não consigo recebê-lo.

Receptor.

public class PowerSendMessage extends BroadcastReceiver
{
public PowerSendMessage(Activity activity) 
    {
        this.activity=activity;
    }
static int countPowerOff = 0;
private Activity activity = null;
@Override
public void onReceive(Context context, Intent intent) 
{
    Log.d("Power Button", "Click");

    if(intent.getAction().equals(Intent.ACTION_SCREEN_OFF))
    {
        countPowerOff++;
    }
    else if(intent.getAction().equals(Intent.ACTION_SCREEN_ON))
    {
        if(countPowerOff == 2)
        {
            Log.d("Power Click", "2 Times");
        }
    }
}

Entrada de manifesto

<receiver android:name=".PowerSendMessage">

        <intent-filter>
            <action android:name="android.intent.action.SCREEN_OFF"></action>
            <action android:name="android.intent.action.SCREEN_ON"></action>
            <action android:name="android.intent.action.ACTION_POWER_CONNECTED"></action>
            <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"></action>
            <action android:name="android.intent.action.ACTION_SHUTDOWN"></action>
        </intent-filter>
    </receiver>

Onde colocar o código abaixo (significa em qual arquivo)

IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
    filter.addAction(Intent.ACTION_SCREEN_OFF);
    PowerSendMessage mReceiver = new PowerSendMessage(this);
    registerReceiver(mReceiver, filter);

Alguma permissão requer para este procedimento?

Eu acho que estou perdendo alguma coisa, mas o que eu não sei, por favor me ajude.

questionAnswers(1)

yourAnswerToTheQuestion