mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Update website build to use PackageInstaller.
This commit is contained in:
@@ -14,7 +14,7 @@ public final class PlayStoreUtil {
|
||||
private PlayStoreUtil() {}
|
||||
|
||||
public static void openPlayStoreOrOurApkDownloadPage(@NonNull Context context) {
|
||||
if (BuildConfig.PLAY_STORE_DISABLED) {
|
||||
if (BuildConfig.MANAGES_APP_UPDATES) {
|
||||
CommunicationActions.openBrowserLink(context, "https://signal.org/android/apk");
|
||||
} else {
|
||||
openPlayStore(context);
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.util;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.AlarmManager;
|
||||
import android.app.DownloadManager;
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.job.JobScheduler;
|
||||
@@ -112,4 +113,8 @@ public class ServiceUtil {
|
||||
public static BluetoothManager getBluetoothManager(@NotNull Context context) {
|
||||
return ContextCompat.getSystemService(context, BluetoothManager.class);
|
||||
}
|
||||
|
||||
public static DownloadManager getDownloadManager(@NonNull Context context) {
|
||||
return ContextCompat.getSystemService(context, DownloadManager.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,6 @@ public class TextSecurePreferences {
|
||||
private static final String PROMPTED_OPTIMIZE_DOZE_PREF = "pref_prompted_optimize_doze";
|
||||
private static final String DIRECTORY_FRESH_TIME_PREF = "pref_directory_refresh_time";
|
||||
private static final String UPDATE_APK_REFRESH_TIME_PREF = "pref_update_apk_refresh_time";
|
||||
private static final String UPDATE_APK_DOWNLOAD_ID = "pref_update_apk_download_id";
|
||||
private static final String UPDATE_APK_DIGEST = "pref_update_apk_digest";
|
||||
private static final String SIGNED_PREKEY_ROTATION_TIME_PREF = "pref_signed_pre_key_rotation_time";
|
||||
|
||||
private static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
|
||||
@@ -624,22 +622,6 @@ public class TextSecurePreferences {
|
||||
setLongPreference(context, UPDATE_APK_REFRESH_TIME_PREF, value);
|
||||
}
|
||||
|
||||
public static void setUpdateApkDownloadId(Context context, long value) {
|
||||
setLongPreference(context, UPDATE_APK_DOWNLOAD_ID, value);
|
||||
}
|
||||
|
||||
public static long getUpdateApkDownloadId(Context context) {
|
||||
return getLongPreference(context, UPDATE_APK_DOWNLOAD_ID, -1);
|
||||
}
|
||||
|
||||
public static void setUpdateApkDigest(Context context, String value) {
|
||||
setStringPreference(context, UPDATE_APK_DIGEST, value);
|
||||
}
|
||||
|
||||
public static String getUpdateApkDigest(Context context) {
|
||||
return getStringPreference(context, UPDATE_APK_DIGEST, null);
|
||||
}
|
||||
|
||||
public static boolean isEnterImeKeyEnabled(Context context) {
|
||||
return getBooleanPreference(context, ENTER_PRESENT_PREF, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user