In AOSP code i am trying to enable the Talk-back i.e. to speak "Device locked" when lock screen is shown either due to sleep time or manual lock
However, i managed to speak out "device Locked" on manual lock by overriding the dispatchPopulateAccessibilityEvent(..) method by setting the contentdescrition to "Device locked" in the KeyGuardview class but i am not able to do it in automatic elapsed sleep time flow (lock screen is enabled in the background when i touch again the device)
@Override
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
if(event != null){
event.setContentDescription(getResources().getString(R.string.device_locked));
}
return super.dispatchPopulateAccessibilityEvent(event);
}
Does anyone have any idea ?