diff --git a/play-services-core/src/main/java/org/microg/tools/selfcheck/DocumentationResolver.java b/play-services-core/src/main/java/org/microg/tools/selfcheck/DocumentationResolver.java new file mode 100644 index 0000000000..d7406cb055 --- /dev/null +++ b/play-services-core/src/main/java/org/microg/tools/selfcheck/DocumentationResolver.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2026 microG Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.tools.selfcheck; + +import android.content.Intent; +import android.net.Uri; +import android.util.Log; + +import androidx.fragment.app.Fragment; + +class DocumentationResolver implements SelfCheckGroup.CheckResolver { + private static final String TAG = "SelfCheck"; + private static final String WIKI_BASE_URL = "https://github.com/microg/GmsCore/wiki/"; + + private final String page; + + DocumentationResolver(String page) { + this.page = page; + } + + @Override + public void tryResolve(Fragment fragment) { + try { + fragment.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(WIKI_BASE_URL + page))); + } catch (Exception e) { + Log.w(TAG, e); + } + } +} diff --git a/play-services-core/src/main/java/org/microg/tools/selfcheck/InstalledPackagesChecks.java b/play-services-core/src/main/java/org/microg/tools/selfcheck/InstalledPackagesChecks.java index ebd0727d32..7c318ef42d 100644 --- a/play-services-core/src/main/java/org/microg/tools/selfcheck/InstalledPackagesChecks.java +++ b/play-services-core/src/main/java/org/microg/tools/selfcheck/InstalledPackagesChecks.java @@ -82,7 +82,8 @@ private boolean addPackageInstalledResult(Context context, ResultCollector colle packageExists = false; } collector.addResult(context.getString(R.string.self_check_name_app_installed, nicePackageName), packageExists ? Positive : Negative, - context.getString(R.string.self_check_resolution_app_installed, nicePackageName)); + context.getString(R.string.self_check_resolution_app_installed, nicePackageName), + new DocumentationResolver("Installation")); return packageExists; } } diff --git a/play-services-core/src/main/java/org/microg/tools/selfcheck/RomSpoofSignatureChecks.java b/play-services-core/src/main/java/org/microg/tools/selfcheck/RomSpoofSignatureChecks.java index 2e3ea64460..bc923b4c44 100644 --- a/play-services-core/src/main/java/org/microg/tools/selfcheck/RomSpoofSignatureChecks.java +++ b/play-services-core/src/main/java/org/microg/tools/selfcheck/RomSpoofSignatureChecks.java @@ -20,7 +20,6 @@ import android.content.pm.PackageManager; import androidx.core.content.ContextCompat; -import androidx.fragment.app.Fragment; import com.google.android.gms.R; @@ -31,7 +30,6 @@ import static org.microg.gms.common.Constants.GMS_PACKAGE_SIGNATURE_SHA1; import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Negative; import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Positive; -import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Unknown; public class RomSpoofSignatureChecks implements SelfCheckGroup { @@ -72,7 +70,7 @@ private boolean addSystemSpoofsSignature(Context context, ResultCollector collec context.getString(R.string.self_check_name_system_spoofs), spoofsSignature ? Positive : Negative, context.getString(R.string.self_check_resolution_system_spoofs), - fragment -> fragment.requestPermissions(new String[]{FAKE_SIGNATURE_PERMISSION}, 0) + new DocumentationResolver("Signature-Spoofing") ); } return spoofsSignature;