Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 {

Expand Down Expand Up @@ -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;
Expand Down