I am writing a script which will play the video then go to suspend and resume will be happened after 60 seconds followed by holding wake_lock.On next loop video is playing but display is not turning on and rest of functionality is working fine.
Please share your thought on this and main concern is how to turn on the display on next loop.
Below is my script:
Script:
rand_test_loop(){
while [ 1 ]
do
input keyevent 82 // unlock home screen
input keyevent 3 // home screen
am start -a android.intent.action.VIEW -d "file:///mnt/sdcard/AV_1080p.mp4" -t "video/*"
sleep 30
echo "calling suspend"
echo 60 >/d/pm_debug/wakeup_timer_seconds
#echo mem > /sys/power/state
echo test>/sys/power/wake_unlock
echo "call power button"
input keyevent 26 //power button
sleep 7
echo "test" >/sys/power/wake_lock
input keyevent 82
input keyevent 3
echo "home came***"
off_count=`cat /d/pm_debug/count | grep DEVICE-OFF`
echo "OFF Mode count $off_count ************!!!!!!!!!!!!!!!"
done
}
rand_test_loop
Regards
Chinmoy