requestWindowFeature() in External Class by Passing Activity Context
<p>I am trying to make most of the utility functions abstract, so I decided to separate them in a new class called Utils.java (inside the Android app package).</p>

<p>However, I am having hard time passing the activity context to this helper class and run some system stuff in its (the helper class' methods).</p>

<p>I have this scenario in the main activity's onCreate:</p>

<pre><code>Utils u = new Utils(this);
u.makeFullscreen();
</code></pre>

<p>Utils.java:</p>

<pre><code>package mypackagenamehere;

import android.content.Context;
import android.view.Window;
import android.view.WindowManager;

public class Utils{
    Context context;

    // Constructor  
    public Utils(Context c) {
        context = c;
    }

    public void makeFullscreen(){
        context.requestWindowFeature(Window.FEATURE_NO_TITLE);
        context.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }

}
</code></pre>

<p>The issue is with the contents of the makeFullscreen() method.</p>
