When I boot the android, I want the screen to be unlocked automatically (and run an application) rather than me unlocking the screen . Can anyone tell me where the kernel source code change has to be done to do so ?
The java code is here.. Can you please correct it
public class AddnumsActivity extends BroadcastReceiver {
private static final String KEYGUARD_SERVICE = null;
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
KeyguardManager keyguardManager = (KeyguardManager)context.getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard();
if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
Intent pushIntent = new Intent(context, AddnumsActivity.class);
pushIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(pushIntent);
}
}
}