Finish empty activity
<p>I'm trying to turn screen on using an activity.
I reached my goal, but the activity stays alive.
If I use finish method, it doesn't get closed.</p>

<p>Note: it doesn't work even if I setContentView(...my xml...);</p>

<pre><code>package it.android.smartscreenon;

import android.app.Activity;
import android.os.Bundle;
import android.view.WindowManager;

public class AccendiSchermo extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
                finish();
    }
}
</code></pre>
