Fix KeyboardShortcuts show
The keyboard shortcuts should be shown only if they have not been dismissed already (by using the dismiss method). Check that sInstance is not null just before displaying the shortcuts popup. Test: Manual Bug: 35163857 Change-Id: I17079bc893808c84ccee8e9a6e31130921b7db28
This commit is contained in:
@@ -381,12 +381,7 @@ public final class KeyboardShortcuts {
|
||||
if (appShortcuts != null) {
|
||||
result.add(appShortcuts);
|
||||
}
|
||||
synchronized (sLock) {
|
||||
// showKeyboardShortcutsDialog only if it has not been dismissed already
|
||||
if (sInstance != null) {
|
||||
showKeyboardShortcutsDialog(result);
|
||||
}
|
||||
}
|
||||
showKeyboardShortcutsDialog(result);
|
||||
}
|
||||
}, deviceId);
|
||||
}
|
||||
@@ -585,7 +580,12 @@ public final class KeyboardShortcuts {
|
||||
mKeyboardShortcutsDialog.setCanceledOnTouchOutside(true);
|
||||
Window keyboardShortcutsWindow = mKeyboardShortcutsDialog.getWindow();
|
||||
keyboardShortcutsWindow.setType(TYPE_SYSTEM_DIALOG);
|
||||
mKeyboardShortcutsDialog.show();
|
||||
synchronized (sLock) {
|
||||
// showKeyboardShortcutsDialog only if it has not been dismissed already
|
||||
if (sInstance != null) {
|
||||
mKeyboardShortcutsDialog.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void populateKeyboardShortcuts(LinearLayout keyboardShortcutsLayout,
|
||||
|
||||
Reference in New Issue
Block a user