I found out that xiaomi devices implemented their own lock screen and below code is not working as per android documentation we can change the lock screen wallpaper using below code. unfortunately below code is not working for the xioami devices.
wpm.setBitmap(bitmap, null, true, WallpaperManager.FLAG_LOCK);
Please suggest any work around?