[ui] Bug 454709 - Support showing the popup dialog only when needed

Change-Id: I9287f69a2e87a229bf23c39673d572d129ce5b6e
Signed-off-by: Yasser Aziza <yasser.aziza@gmail.com>