Unable to set Time on rooted device with android ICS
===

I have implemented code for setting time on a rooted device in android.I have made it an in-built app and it works fine in the sample application.But when I tried to use the same code into my application which is also in-built it is NOT able to set the time.
Below is the code 

    AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
    alarmManager.setTime(date.getTime());

with the permissions....

     <uses-permission android:name="android.permission.SET_TIME"></uses-permission>
     <uses-permission android:name="android.permission.SET_TIME_ZONE"></uses-permission>

Instead it gives the following error:

    "Neither user 10042 nor current process has SecurityException:android.permission.SET_TIME
    unable to open Alarm Driver:Permission Denied.
    android.OS.Parcel.readException
    android.app.AlarmManagerStubProxy.setTime(AlarmManager.java)".
Any advice would help.