Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Commit

Permalink
Fixed delays on N on Home and Recent Apps button click
Browse files Browse the repository at this point in the history
Auditors: @bbondy
  • Loading branch information
SergeyZhukovsky committed Sep 8, 2016
1 parent 111c57b commit e548192
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ public void onReloadMainServiceEvent(ReloadMainServiceEvent event) {
@Override
public void onReceive(Context context, Intent myIntent) {
if (myIntent.getAction().equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) {
// TODO made a Nougat after SDK update. It's a fix for it to avoid delays on HOME and Recent Apps button click
if (Build.VERSION.SDK_INT >= 24) {
try {
Thread.sleep(300);

This comment has been minimized.

Copy link
@bbondy

bbondy Sep 9, 2016

Member

I think this magic number might not be right for all conditions and might actually be a race conditions depending on what the device is doing and how fast/slow the device is. Pls spend some time to try an alt solution first.

} catch (InterruptedException e) {

}
}
MainController.get().onCloseSystemDialogs();
}
}
Expand Down

0 comments on commit e548192

Please sign in to comment.