Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ee93d37 authored by Fiona Campbell's avatar Fiona Campbell Committed by Automerger Merge Worker
Browse files

Merge "Prevent race condition by foregroundAppPackageName" into tm-qpr-dev am: 4a20c736

parents 7655195d 4a20c736
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -993,8 +993,9 @@ class AutomaticBrightnessController {
                    final String packageName = info.topActivity.getPackageName();
                    final String packageName = info.topActivity.getPackageName();
                    // If the app didn't change, there's nothing to do. Otherwise, we have to
                    // If the app didn't change, there's nothing to do. Otherwise, we have to
                    // update the category and re-apply the brightness correction.
                    // update the category and re-apply the brightness correction.
                    if (mForegroundAppPackageName != null
                    String currentForegroundAppPackageName = mForegroundAppPackageName;
                            && mForegroundAppPackageName.equals(packageName)) {
                    if (currentForegroundAppPackageName != null
                            && currentForegroundAppPackageName.equals(packageName)) {
                        return;
                        return;
                    }
                    }
                    mPendingForegroundAppPackageName = packageName;
                    mPendingForegroundAppPackageName = packageName;