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

Commit b962950a authored by Brian Isganitis's avatar Brian Isganitis
Browse files

Add logging to investigate updateOverviewTargets state.

Test: Manual (logcat)
Bug: 258022658
Change-Id: I50640124f1e8fd5ae4aaf6240c044ded108849b5
parent 6ba531d1
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.util.Log;
import android.util.SparseIntArray;

import androidx.annotation.NonNull;
@@ -54,6 +55,8 @@ import java.util.function.Consumer;
 * and provide callers the relevant classes.
 */
public final class OverviewComponentObserver {
    private static final String TAG = "OverviewComponentObserver";

    private final BroadcastReceiver mUserPreferenceChangeReceiver =
            new SimpleBroadcastReceiver(this::updateOverviewTargets);
    private final BroadcastReceiver mOtherHomeAppUpdateReceiver =
@@ -146,7 +149,12 @@ public final class OverviewComponentObserver {
            }
        }

        if (!mDeviceState.isHomeDisabled() && (defaultHome == null || mIsDefaultHome)) {
        // TODO(b/258022658): Remove temporary logging.
        Log.i(TAG, "updateOverviewTargets: mIsHomeDisabled=" + mIsHomeDisabled
                + ", isDefaultHomeNull=" + (defaultHome == null)
                + ", mIsDefaultHome=" + mIsDefaultHome);

        if (!mIsHomeDisabled && (defaultHome == null || mIsDefaultHome)) {
            // User default home is same as out home app. Use Overview integrated in Launcher.
            mActivityInterface = LauncherActivityInterface.INSTANCE;
            mIsHomeAndOverviewSame = true;