mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-03 07:21:29 +01:00
Make naming great again
When we build APKs in PRs it's also a GITHUB_APK...
This commit is contained in:
parent
8dc34274a1
commit
e5fd24b0d1
@ -46,7 +46,8 @@ public final class CheckForNewAppVersion extends IntentService {
|
|||||||
private static final boolean DEBUG = MainActivity.DEBUG;
|
private static final boolean DEBUG = MainActivity.DEBUG;
|
||||||
private static final String TAG = CheckForNewAppVersion.class.getSimpleName();
|
private static final String TAG = CheckForNewAppVersion.class.getSimpleName();
|
||||||
|
|
||||||
private static final String GITHUB_APK_SHA1
|
// Public key of the certificate that is used in NewPipe release versions
|
||||||
|
private static final String RELEASE_CERT_PUBLIC_KEY_SHA1
|
||||||
= "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15";
|
= "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15";
|
||||||
private static final String NEWPIPE_API_URL = "https://newpipe.net/api/data.json";
|
private static final String NEWPIPE_API_URL = "https://newpipe.net/api/data.json";
|
||||||
|
|
||||||
@ -156,8 +157,8 @@ public final class CheckForNewAppVersion extends IntentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isGithubApk(@NonNull final App app) {
|
public static boolean isReleaseApk(@NonNull final App app) {
|
||||||
return getCertificateSHA1Fingerprint(app).equals(GITHUB_APK_SHA1);
|
return getCertificateSHA1Fingerprint(app).equals(RELEASE_CERT_PUBLIC_KEY_SHA1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkNewVersion() throws IOException, ReCaptchaException {
|
private void checkNewVersion() throws IOException, ReCaptchaException {
|
||||||
@ -167,7 +168,7 @@ public final class CheckForNewAppVersion extends IntentService {
|
|||||||
final NewVersionManager manager = new NewVersionManager();
|
final NewVersionManager manager = new NewVersionManager();
|
||||||
|
|
||||||
// Check if the current apk is a github one or not.
|
// Check if the current apk is a github one or not.
|
||||||
if (!isGithubApk(app)) {
|
if (!isReleaseApk(app)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public class MainSettingsFragment extends BasePreferenceFragment {
|
|||||||
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {
|
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {
|
||||||
addPreferencesFromResource(R.xml.main_settings);
|
addPreferencesFromResource(R.xml.main_settings);
|
||||||
|
|
||||||
if (!CheckForNewAppVersion.isGithubApk(App.getApp())) {
|
if (!CheckForNewAppVersion.isReleaseApk(App.getApp())) {
|
||||||
final Preference update
|
final Preference update
|
||||||
= findPreference(getString(R.string.update_pref_screen_key));
|
= findPreference(getString(R.string.update_pref_screen_key));
|
||||||
getPreferenceScreen().removePreference(update);
|
getPreferenceScreen().removePreference(update);
|
||||||
|
Loading…
Reference in New Issue
Block a user