Assigning permissions to System Settings File
<p>I am trying to assign permission to a file i have created which is used to set the system Settings.I am getting an Io Exception on line </p>

<pre><code>inputStream=context.getAssets().open(fileName);
</code></pre>

<p>In my manifest file i have assigned the file permission using  </p>

<pre><code>&lt;uses-permission android:name="android.permission.WRITE_SETTINGS"/&gt;
</code></pre>

<p>which allows to read and write to system settings file.But still the Exception.Thanks in advance.
As per request I am adding the code where Error occurs</p>

<pre><code>public boolean copyConfigFile(String fileName) throws IOException {
        File configFile = new File(systemDir, fileName);
        Log.d(getClass().getSimpleName(), "Config file path :" + configFile.getAbsolutePath());
        Log.d(getClass().getSimpleName(), "FILE NAME::" + fileName);
        if(!configFile.exists()){
            configFile.createNewFile();
            InputStream is = null;
            OutputStream os = null;
            try {
                is = ctx.getAssets().open(fileName);
                os = new FileOutputStream(configFile);
                byte []fileBytes = new byte[is.available()];
                is.read(fileBytes);
                os.write(fileBytes);
                Log.d(getClass().getSimpleName(), "File copied.");
                return true;
            } finally {
                if(is != null){
                    is.close();
                }
                if(os != null){
                    os.close();
                }
            }
        }else{
            Log.d(getClass().getSimpleName(), "File already exist.");
            return true;
        }
    }
</code></pre>
