Frameworks: Fix possible ANR and navigation bar freeze