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

Commit cbb0cf5c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Tweak the way to get the enabled component" into sc-v2-dev am: 21ac89fa am: 1c87a2e7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16426616

Change-Id: I5772e33a555b2bfb299d719c150095c69a27697e
parents cdde3b8e 1c87a2e7
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.settingslib.activityembedding;

import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;

import com.android.settingslib.utils.BuildCompatUtils;

@@ -37,11 +36,10 @@ public class ActivityEmbeddingUtils {
        if (BuildCompatUtils.isAtLeastS()) {
            final Intent intent = new Intent(ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY);
            intent.setPackage(PACKAGE_NAME_SETTINGS);
            final ResolveInfo resolveInfo =
                    context.getPackageManager().resolveActivity(intent, 0 /* flags */);
            return resolveInfo != null
                    && resolveInfo.activityInfo != null
                    && resolveInfo.activityInfo.enabled;
            final boolean isEmbeddingActivityEnabled =
                    intent.resolveActivity(context.getPackageManager()) != null;

            return isEmbeddingActivityEnabled;
        }
        return false;
    }