I am trying to shutdown my custom android device programatically. I am using the below code to do the same, but it is restarting again.I want the device to be completely shut down.
Intent intent = new Intent("android.intent.action.ACTION_REQUEST_SHUTDOWN");
intent.putExtra("android.intent.extra.KEY_CONFIRM", false);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
How to achieve complete shut down i,e avoid auto restart?
Note: I have signed app with platform signatures.
Placed it in /system/app
Added <uses-permission android:name="android.permission.SHUTDOWN" />
permission in manifest.