DF-506 applicationDidEnterBackground now checks if it was due to lock and sends OnDeviceLocked instead of OnBackground in that case