That fuck shit the fascists are using

continue

+339 -89
+42
README.md
··· 59 59 Licensed under the GNU AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html 60 60 61 61 Google Play and the Google Play logo are trademarks of Google LLC. 62 + 63 + 64 + //**TM_SA**// 65 + Signal – New Base-line 66 + 1. Download the Signal official open source from this link: 67 + https://github.com/signalapp/Signal-Android 68 + 69 + 2. Rename each folder at the next order: 70 + a. thoughtcrime  tm 71 + b. securesms  archive 72 + 3. Replace all old package mentions vie “replace all” function (Ctrl +Shift + R) 73 + a. org.thoughtcrime.securesms -> org.tm.archive 74 + 4. Add our archiver SDK and Common library to new folder “libs” and compile them via dependencies. 75 + 5. Add archiver,intune,selfauthentication folders with all archiving class with util etc. (Take them from src->main->java->org) 76 + 6. Search “ArchiveLogger.Companion.sendArchiveLog” in the current project and add all those mentions to the updated project. 77 + 7. Add launcher icon app and change the round icon path in the manifest 78 + 8. Add proguard-event_bus from the current project to the updated one. 79 + 9. Go to the current TeleMessage Signal project and search via ctrl+alt+F : //**TM_SA**// 80 + 81 + There are dozens of references to this string please move on the result one by one and replace or add the code with this string ( //**TM_SA**//, in order to create continuation to baseline updating method) 82 + 83 + 84 + intune 85 + 86 + 1. add dependencies using //**TM_SA**// 87 + 2. add MAMSDK folder with aar and jar 88 + 3. 1. register the app to intune server 89 + 2. https://aad.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview3. Azure Active Directory > App registrations > New Registration 90 + 3. Authentication, add platform -> add uri -> package name. 91 + 4. then add auth-config file using the View button that show it. put it in resource-> raw 92 + 5. API permissions... 93 + 94 + 4. 1. https://aad.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps 95 + 2. then, App configuration policies -> create app configuration policy -> manage apps -> Settings -> add the values(managerID etc) 96 + 3. Then, Assignments -> include groups you want or assign everyone. 97 + 98 + 5. http://everythingaboutintune.com/2021/07/guide-for-integrating-intune-sdk-and-msal-to-lob-application/ 99 + 100 + https://www.youtube.com/watch?v=1AyGpcdDRkY&t=741s&ab_channel=EverythingAboutIntune 101 + 102 + https://github.com/msintuneappsdk/Taskr-Sample-Intune-Android-App#readme 103 + //**TM_SA**//
+3 -1
app/jni/Android.mk
··· 7 7 LOCAL_CFLAGS += -Wall 8 8 9 9 LOCAL_SRC_FILES := $(JNI_DIR)/utils/org_thoughtcrime_securesms_util_FileUtils.cpp 10 - 10 + #//**TM_SA**//Start 11 + LOCAL_SRC_FILES := $(JNI_DIR)/utils/org_tm_archive_util_FileUtils.cpp 12 + # //**TM_SA**//End 11 13 include $(BUILD_SHARED_LIBRARY)
+4 -3
app/jni/utils/org_thoughtcrime_securesms_util_FileUtils.cpp
··· 5 5 #include <unistd.h> 6 6 #include <linux/memfd.h> 7 7 #include <syscall.h> 8 - 9 - jint JNICALL Java_org_thoughtcrime_securesms_util_FileUtils_getFileDescriptorOwner 8 + //**TM_SA**//Change the package name to be our name. 9 + jint JNICALL Java_org_tm_archive_util_FileUtils_getFileDescriptorOwner 10 10 (JNIEnv *env, jclass clazz, jobject fileDescriptor) 11 11 { 12 12 jclass fdClass = env->GetObjectClass(fileDescriptor); ··· 32 32 return stat_struct.st_uid; 33 33 } 34 34 35 - JNIEXPORT jint JNICALL Java_org_thoughtcrime_securesms_util_FileUtils_createMemoryFileDescriptor 35 + //**TM_SA**//Change the package name to be our name. 36 + JNIEXPORT jint JNICALL Java_org_tm_archive_util_FileUtils_createMemoryFileDescriptor 36 37 (JNIEnv *env, jclass clazz, jstring jname) 37 38 { 38 39 const char *name = env->GetStringUTFChars(jname, NULL);
+4 -2
app/jni/utils/org_thoughtcrime_securesms_util_FileUtils.h
··· 12 12 * Method: getFileDescriptorOwner 13 13 * Signature: (Ljava/io/FileDescriptor;)I 14 14 */ 15 - JNIEXPORT jint JNICALL Java_org_thoughtcrime_securesms_util_FileUtils_getFileDescriptorOwner 15 + //**TM_SA**//Change the package name to be our name. 16 + JNIEXPORT jint JNICALL Java_org_tm_archive_util_FileUtils_getFileDescriptorOwner 16 17 (JNIEnv *, jclass, jobject); 17 18 18 19 /* ··· 20 21 * Method: createMemoryFileDescriptor 21 22 * Signature: (Ljava/lang/String;)I 22 23 */ 23 - JNIEXPORT jint JNICALL Java_org_thoughtcrime_securesms_util_FileUtils_createMemoryFileDescriptor 24 + //**TM_SA**//Change the package name to be our name. 25 + JNIEXPORT jint JNICALL Java_org_tm_archive_util_FileUtils_createMemoryFileDescriptor 24 26 (JNIEnv *, jclass, jstring); 25 27 26 28 #ifdef __cplusplus
+81 -1
app/src/main/java/org/tm/archive/ApplicationContext.java
··· 16 16 */ 17 17 package org.tm.archive; 18 18 19 + import android.app.Application; 19 20 import android.content.Context; 20 21 21 22 import androidx.annotation.NonNull; ··· 25 26 import androidx.multidex.MultiDexApplication; 26 27 27 28 import com.google.android.gms.security.ProviderInstaller; 29 + import com.google.firebase.FirebaseApp; 30 + import com.tm.androidcopysdk.AndroidCopySDK; 31 + import com.tm.androidcopysdk.AndroidCopySettings; 32 + import com.tm.androidcopysdk.BackupService; 33 + import com.tm.androidcopysdk.CommonUtils; 34 + import com.tm.androidcopysdk.utils.PrefManager; 35 + import com.tm.authenticatorsdk.selfAuthenticator.AuthenticatorConstants; 28 36 37 + import org.archiver.ArchiveConstants; 38 + import org.archiver.ArchiveLogger; 39 + import org.archiver.FCMConnector; 29 40 import org.conscrypt.ConscryptSignal; 30 41 import org.greenrobot.eventbus.EventBus; 31 42 import org.signal.aesgcmprovider.AesGcmProvider; ··· 112 123 import io.reactivex.rxjava3.exceptions.UndeliverableException; 113 124 import io.reactivex.rxjava3.plugins.RxJavaPlugins; 114 125 import io.reactivex.rxjava3.schedulers.Schedulers; 126 + import kotlin.Pair; 115 127 import kotlin.Unit; 116 128 import rxdogtag2.RxDogTag; 129 + 130 + import static org.archiver.ArchiveConstants.isTestMode; 117 131 118 132 /** 119 133 * Will be called once when the TextSecure process is created. ··· 127 141 128 142 private static final String TAG = Log.tag(ApplicationContext.class); 129 143 144 + private static Application mApplicationContext;//**TM_SA**// 145 + 130 146 public static ApplicationContext getInstance(Context context) { 131 147 return (ApplicationContext)context.getApplicationContext(); 148 + } 149 + 150 + public static Application getInstance() {//**TM_SA**// 151 + return mApplicationContext; 132 152 } 133 153 134 154 @Override ··· 221 241 Log.d(TAG, "onCreate() took " + (System.currentTimeMillis() - startTime) + " ms"); 222 242 SignalLocalMetrics.ColdStart.onApplicationCreateFinished(); 223 243 Tracer.getInstance().end("Application#onCreate()"); 244 + 245 + //**TM_SA**// start 246 + com.tm.logger.Log.i(TAG, "1 current FCM: " + FirebaseApp.getInstance().getOptions().getProjectId()); 247 + mApplicationContext = this; 248 + 249 + com.tm.logger.Log.createInstance(getApplicationContext()); 250 + ArchiveLogger.Companion.sendArchiveLog("TeleMessage logger created"); 251 + 252 + initArchiveUrlsAndStartArchive(); 224 253 } 225 254 255 + private void initArchiveUrlsAndStartArchive() { 256 + 257 + if(CommonUtils.isMyServiceRunning(mApplicationContext, BackupService.class)){ 258 + CommonUtils.stopBackupService(mApplicationContext, false); 259 + } 260 + 261 + ArchiveLogger.Companion.sendArchiveLog("initializeTMAndroidArchive \nsetUrl: \nchosenUrl =" + ArchiveConstants.charlieProduction + "\nKeeperUrl =" + ArchiveConstants.prodKeeper); 262 + if(org.tm.archive.BuildConfig.DEBUG){ 263 + String baseUrlPrefProd = PrefManager.getStringPref(mApplicationContext, ArchiveConstants.SHARED_PREFERENCE_SELECTED_BASE_URL_PRODUCTION_KEY, ArchiveConstants.charlieProduction); 264 + String baseUrlPrefKeeper = PrefManager.getStringPref(mApplicationContext, ArchiveConstants.SHARED_PREFERENCE_SELECTED_BASE_URL_KEEPER_KEY,ArchiveConstants.prodKeeper); 265 + AuthenticatorConstants.Companion.setBASE_URL(new Pair(baseUrlPrefProd, baseUrlPrefKeeper)); 266 + CommonUtils.setUrl(mApplicationContext, baseUrlPrefProd, baseUrlPrefKeeper); 267 + }else { 268 + CommonUtils.setUrl(mApplicationContext, ArchiveConstants.charlieProduction, ArchiveConstants.prodKeeper); 269 + } 270 + CommonUtils.setSqlInfo(getApplicationContext(), ArchiveConstants.isTestMode ? ArchiveConstants.signalTestPassword : ArchiveConstants.signalCurrentPassword); 271 + 272 + //set SDK to active -> need to change it with the self register 273 + boolean installationEventSent = PrefManager.getBooleanPref(getApplicationContext(), R.string.installation_event_sent, false); 274 + PrefManager.setBooleanPref(getApplicationContext(), "activated_aa" ,true); 275 + 276 + if(isTestMode || !installationEventSent) { 277 + initializeTMAndroidArchive(); 278 + ArchiveLogger.Companion.sendArchiveLog("initializeTMAndroidArchive"); 279 + } 280 + 281 + CommonUtils.startBackupService(getApplicationContext()); 282 + ArchiveLogger.Companion.sendArchiveLog("Backup service started"); 283 + } 284 + 285 + private void initializeTMAndroidArchive() { 286 + 287 + AndroidCopySettings mSettings = new AndroidCopySettings(); 288 + 289 + PrefManager.setStringPref(getApplicationContext(),"wifi3g","WIFI3G"); 290 + 291 + mSettings.setData(AndroidCopySettings.DataSaving.WIFI3G); 292 + com.tm.logger.Log.d("initializeTMAndroidArchive", "signupSucess with emptey password and user name"); 293 + AndroidCopySDK.getInstance(getApplicationContext()).signupSucess(/*ArchiveConstants.signalTestUserName, ArchiveConstants.signalTestPassword*/ "", ""); 294 + 295 + ArchiveLogger.Companion.sendArchiveLog("User name = " + "Password = "); 296 + 297 + boolean installationEventSent = PrefManager.getBooleanPref(getApplicationContext(), R.string.installation_event_sent, false); 298 + // InstallEvent should be sent only once 299 + if(!installationEventSent) { 300 + PrefManager.setBooleanPref(getApplicationContext(),R.string.installation_event_sent,true); 301 + } 302 + } 303 + //**TM_SA**// End 304 + 226 305 @Override 227 306 public void onForeground() { 228 307 long startTime = System.currentTimeMillis(); ··· 384 463 long nextSetTime = SignalStore.account().getFcmTokenLastSetTime() + TimeUnit.HOURS.toMillis(6); 385 464 386 465 if (SignalStore.account().getFcmToken() == null || nextSetTime <= System.currentTimeMillis()) { 387 - ApplicationDependencies.getJobManager().add(new FcmRefreshJob()); 466 + FCMConnector.initOfficialSignalFirebaseAccount(this);//**TM_SA**// 467 + // ApplicationDependencies.getJobManager().add(new FcmRefreshJob());//**TM_SA**// 388 468 } 389 469 } 390 470 }
+1 -1
app/src/main/java/org/tm/archive/DeviceProvisioningActivity.java
··· 38 38 .setOnDismissListener(dialog13 -> finish()) 39 39 .create(); 40 40 41 - dialog.setIcon(getResources().getDrawable(R.drawable.icon_dialog)); 41 + dialog.setIcon(getResources().getDrawable(R.drawable.ic_launcher_foreground_new));//**TM_SA**// 42 42 dialog.show(); 43 43 } 44 44 }
+31
app/src/main/java/org/tm/archive/MainActivity.java
··· 6 6 import android.content.Intent; 7 7 import android.net.Uri; 8 8 import android.os.Bundle; 9 + import android.os.Handler; 10 + import android.os.Looper; 9 11 import android.view.View; 10 12 import android.view.ViewTreeObserver; 11 13 ··· 15 17 import androidx.lifecycle.ViewModelProvider; 16 18 17 19 import com.google.android.material.dialog.MaterialAlertDialogBuilder; 20 + import com.tm.androidcopysdk.utils.PrefManager; 18 21 22 + import org.archiver.ArchivePreferenceConstants; 19 23 import org.signal.core.util.concurrent.LifecycleDisposable; 20 24 import org.signal.core.util.logging.Log; 21 25 import org.signal.donations.StripeApi; ··· 25 29 import org.tm.archive.components.voice.VoiceNoteMediaController; 26 30 import org.tm.archive.components.voice.VoiceNoteMediaControllerOwner; 27 31 import org.tm.archive.conversationlist.RelinkDevicesReminderBottomSheetFragment; 32 + import org.tm.archive.dependencies.ApplicationDependencies; 28 33 import org.tm.archive.devicetransfer.olddevice.OldDeviceExitActivity; 29 34 import org.tm.archive.keyvalue.SignalStore; 30 35 import org.tm.archive.net.DeviceTransferBlockingInterceptor; ··· 168 173 updateTabVisibility(); 169 174 170 175 vitalsViewModel.checkSlowNotificationHeuristics(); 176 + //**TM_SA**// start 177 + notifyMessageIfNeeded(); 171 178 } 179 + 180 + private void notifyMessageIfNeeded() { 181 + boolean isAlreadyRestarted = PrefManager.getBooleanPref(this, ArchivePreferenceConstants.PREF_KEY_MAIN_ACTIVITY_RESTART, false); 182 + 183 + if(!isAlreadyRestarted){ 184 + PrefManager.setBooleanPref(this, ArchivePreferenceConstants.PREF_KEY_MAIN_ACTIVITY_RESTART, true); 185 + 186 + final Handler handler = new Handler(Looper.getMainLooper()); 187 + handler.postDelayed(new Runnable() { 188 + @Override 189 + public void run() { 190 + notifyMessage(); 191 + } 192 + }, 4000); 193 + } 194 + } 195 + 196 + public synchronized void notifyMessage(){ 197 + synchronized (ApplicationDependencies.getIncomingMessageObserver()) { 198 + ApplicationDependencies.getIncomingMessageObserver().notifyAll(); 199 + } 200 + } 201 + 202 + //**TM_SA**// End 172 203 173 204 @Override 174 205 protected void onStop() {
+6
app/src/main/java/org/tm/archive/audio/AudioWaveFormGenerator.java
··· 57 57 throw new IOException("Mime not audio"); 58 58 } 59 59 60 + //**TM_SA**//S 61 + if(mime.equals("audio/ac3")){ 62 + throw new IOException("Ac3 Audio type not supported"); 63 + } 64 + //**TM_SA**//E 65 + 60 66 MediaCodec codec = MediaCodec.createDecoderByType(mime); 61 67 62 68 if (totalDurationUs == 0) {
+4 -2
app/src/main/java/org/tm/archive/backup/FullBackupImporter.java
··· 155 155 } 156 156 157 157 private static void processVersion(@NonNull SQLiteDatabase db, DatabaseVersion version) throws IOException { 158 - if (version.version == null || version.version > db.getVersion()) { 158 + //**TM_SA**//s 159 + /*if (version.version == null || version.version > db.getVersion()) { 159 160 throw new DatabaseDowngradeException(db.getVersion(), version.version != null ? version.version : -1); 160 - } 161 + }*/ 162 + //**TM_SA**//s 161 163 162 164 db.setVersion(version.version); 163 165 }
+3 -1
app/src/main/java/org/tm/archive/components/reminder/OutdatedBuildReminder.java
··· 37 37 return false; 38 38 } 39 39 40 + //**TM_SA**// start 40 41 public static boolean isEligible() { 41 - return getDaysUntilExpiry() <= 10; 42 + return false;//getDaysUntilExpiry() <= 10; 42 43 } 44 + //**TM_SA**// End 43 45 44 46 private static int getDaysUntilExpiry() { 45 47 return (int) TimeUnit.MILLISECONDS.toDays(Util.getTimeUntilBuildExpiry());
+154 -74
app/src/main/java/org/tm/archive/components/settings/app/AppSettingsFragment.kt
··· 1 1 package org.tm.archive.components.settings.app 2 2 3 + import android.app.AlertDialog 4 + import android.app.Dialog 3 5 import android.os.Bundle 4 6 import android.view.View 5 7 import android.widget.TextView ··· 7 9 import androidx.annotation.IdRes 8 10 import androidx.fragment.app.viewModels 9 11 import androidx.navigation.fragment.findNavController 12 + import com.tm.androidcopysdk.AndroidCopySDK 13 + import com.tm.androidcopysdk.ISendLogCallback 14 + import com.tm.androidcopysdk.utils.PrefManager 15 + import org.archiver.ArchivePreferenceConstants 10 16 import org.greenrobot.eventbus.EventBus 11 17 import org.greenrobot.eventbus.Subscribe 12 18 import org.greenrobot.eventbus.ThreadMode 19 + import org.selfAuthentication.ProgressDialog 13 20 import org.tm.archive.R 14 21 import org.tm.archive.badges.BadgeImageView 15 22 import org.tm.archive.components.AvatarImageView ··· 46 53 class AppSettingsFragment : DSLSettingsFragment( 47 54 titleId = R.string.text_secure_normal__menu_settings, 48 55 layoutId = R.layout.dsl_settings_fragment_with_reminder 49 - ) { 56 + ) , 57 + ISendLogCallback { //**TM_SA**// add ISendLogCallback{ 50 58 51 59 private val viewModel: AppSettingsViewModel by viewModels() 52 60 53 61 private lateinit var reminderView: Stub<ReminderView> 62 + 63 + lateinit var mProgressDialog : Dialog //**TM_SA**// 54 64 55 65 override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 56 66 viewLifecycleOwner.lifecycle.addObserver(TerminalDonationDelegate(childFragmentManager, viewLifecycleOwner)) ··· 162 172 isEnabled = state.isDeprecatedOrUnregistered() 163 173 ) 164 174 165 - if (state.allowUserToGoToDonationManagementScreen) { 166 - clickPref( 175 + //**TM_SA**// Start - Comment all the Signal mention and put our about and sending logs logic. 176 + if (false/*state.allowUserToGoToDonationManagementScreen*/) { 177 + /*clickPref( 167 178 title = DSLSettingsText.from(R.string.preferences__donate_to_signal), 168 179 icon = DSLSettingsIcon.from(R.drawable.symbol_heart_24), 169 180 iconEnd = if (state.hasExpiredGiftBadge) DSLSettingsIcon.from(R.drawable.symbol_info_fill_24, R.color.signal_accent_primary) else null, ··· 171 182 findNavController().safeNavigate(AppSettingsFragmentDirections.actionAppSettingsFragmentToManageDonationsFragment()) 172 183 }, 173 184 onLongClick = this@AppSettingsFragment::copySubscriberIdToClipboard 174 - ) 185 + )*/ 175 186 } else { 176 - externalLinkPref( 187 + /*externalLinkPref( 177 188 title = DSLSettingsText.from(R.string.preferences__donate_to_signal), 178 189 icon = DSLSettingsIcon.from(R.drawable.symbol_heart_24), 179 190 linkId = R.string.donate_url 180 191 ) 181 - } 192 + }*/ 182 193 183 - dividerPref() 194 + clickPref( 195 + title = DSLSettingsText.from(R.string.preferences__send_logs_to_telemessage), 196 + icon = DSLSettingsIcon.from(R.drawable.ic_settings_logs_icon), 197 + onClick = { 198 + doSendLogsClicked() 199 + }) 184 200 185 - clickPref( 186 - title = DSLSettingsText.from(R.string.preferences__appearance), 187 - icon = DSLSettingsIcon.from(R.drawable.symbol_appearance_24), 188 - onClick = { 189 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_appearanceSettingsFragment) 190 - } 191 - ) 201 + clickPref( 202 + title = DSLSettingsText.from(R.string.EditAboutFragment_about), 203 + icon = DSLSettingsIcon.from(R.drawable.ic_about_icon), 204 + onClick = { 205 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_tmAboutSettings) 206 + } 207 + ) 192 208 193 - clickPref( 194 - title = DSLSettingsText.from(R.string.preferences_chats__chats), 195 - icon = DSLSettingsIcon.from(R.drawable.symbol_chat_24), 196 - onClick = { 197 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_chatsSettingsFragment) 198 - }, 199 - isEnabled = state.isDeprecatedOrUnregistered() 200 - ) 209 + //**TM_SA**// End 201 210 202 - clickPref( 203 - title = DSLSettingsText.from(R.string.preferences__stories), 204 - icon = DSLSettingsIcon.from(R.drawable.symbol_stories_24), 205 - onClick = { 206 - findNavController().safeNavigate(AppSettingsFragmentDirections.actionAppSettingsFragmentToStoryPrivacySettings(R.string.preferences__stories)) 207 - }, 208 - isEnabled = state.isDeprecatedOrUnregistered() 209 - ) 211 + dividerPref() 210 212 211 - clickPref( 212 - title = DSLSettingsText.from(R.string.preferences__notifications), 213 - icon = DSLSettingsIcon.from(R.drawable.symbol_bell_24), 214 - onClick = { 215 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_notificationsSettingsFragment) 216 - }, 217 - isEnabled = state.isDeprecatedOrUnregistered() 218 - ) 213 + clickPref( 214 + title = DSLSettingsText.from(R.string.preferences__appearance), 215 + icon = DSLSettingsIcon.from(R.drawable.symbol_appearance_24), 216 + onClick = { 217 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_appearanceSettingsFragment) 218 + } 219 + ) 219 220 220 - clickPref( 221 - title = DSLSettingsText.from(R.string.preferences__privacy), 222 - icon = DSLSettingsIcon.from(R.drawable.symbol_lock_24), 223 - onClick = { 224 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_privacySettingsFragment) 225 - }, 226 - isEnabled = state.isDeprecatedOrUnregistered() 227 - ) 221 + clickPref( 222 + title = DSLSettingsText.from(R.string.preferences_chats__chats), 223 + icon = DSLSettingsIcon.from(R.drawable.symbol_chat_24), 224 + onClick = { 225 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_chatsSettingsFragment) 226 + }, 227 + isEnabled = state.isDeprecatedOrUnregistered() 228 + ) 228 229 229 - clickPref( 230 - title = DSLSettingsText.from(R.string.preferences__data_and_storage), 231 - icon = DSLSettingsIcon.from(R.drawable.symbol_data_24), 232 - onClick = { 233 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_dataAndStorageSettingsFragment) 234 - } 235 - ) 230 + clickPref( 231 + title = DSLSettingsText.from(R.string.preferences__stories), 232 + icon = DSLSettingsIcon.from(R.drawable.symbol_stories_24), 233 + onClick = { 234 + findNavController().safeNavigate(AppSettingsFragmentDirections.actionAppSettingsFragmentToStoryPrivacySettings(R.string.preferences__stories)) 235 + }, 236 + isEnabled = state.isDeprecatedOrUnregistered() 237 + ) 236 238 237 - if (Environment.IS_NIGHTLY) { 238 239 clickPref( 239 - title = DSLSettingsText.from("App updates"), 240 - icon = DSLSettingsIcon.from(R.drawable.symbol_calendar_24), 240 + title = DSLSettingsText.from(R.string.preferences__notifications), 241 + icon = DSLSettingsIcon.from(R.drawable.symbol_bell_24), 241 242 onClick = { 242 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_appUpdatesSettingsFragment) 243 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_notificationsSettingsFragment) 244 + }, 245 + isEnabled = state.isDeprecatedOrUnregistered() 246 + ) 247 + 248 + clickPref( 249 + title = DSLSettingsText.from(R.string.preferences__privacy), 250 + icon = DSLSettingsIcon.from(R.drawable.symbol_lock_24), 251 + onClick = { 252 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_privacySettingsFragment) 253 + }, 254 + isEnabled = state.isDeprecatedOrUnregistered() 255 + ) 256 + 257 + clickPref( 258 + title = DSLSettingsText.from(R.string.preferences__data_and_storage), 259 + icon = DSLSettingsIcon.from(R.drawable.symbol_data_24), 260 + onClick = { 261 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_dataAndStorageSettingsFragment) 243 262 } 244 263 ) 245 - } 264 + 265 + if (Environment.IS_NIGHTLY) { 266 + clickPref( 267 + title = DSLSettingsText.from("App updates"), 268 + icon = DSLSettingsIcon.from(R.drawable.symbol_calendar_24), 269 + onClick = { 270 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_appUpdatesSettingsFragment) 271 + } 272 + ) 273 + } 246 274 247 - dividerPref() 275 + dividerPref() 248 276 249 - if (SignalStore.paymentsValues().paymentsAvailability.showPaymentsMenu()) { 277 + //**TM_SA**// Mark this part 278 + /*if (SignalStore.paymentsValues().paymentsAvailability.showPaymentsMenu()) { 250 279 customPref( 251 280 PaymentsPreference( 252 281 unreadCount = state.unreadPaymentsCount ··· 264 293 onClick = { 265 294 findNavController().safeNavigate(R.id.action_appSettingsFragment_to_helpSettingsFragment) 266 295 } 267 - ) 268 - 269 - clickPref( 270 - title = DSLSettingsText.from(R.string.AppSettingsFragment__invite_your_friends), 271 - icon = DSLSettingsIcon.from(R.drawable.symbol_invite_24), 272 - onClick = { 273 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_inviteActivity) 274 - } 275 - ) 276 - 277 - if (FeatureFlags.internalUser()) { 278 - dividerPref() 296 + )*/ 297 + //**TM_SA**//end 279 298 280 299 clickPref( 281 - title = DSLSettingsText.from(R.string.preferences__internal_preferences), 300 + title = DSLSettingsText.from(R.string.AppSettingsFragment__invite_your_friends), 301 + icon = DSLSettingsIcon.from(R.drawable.symbol_invite_24), 282 302 onClick = { 283 - findNavController().safeNavigate(R.id.action_appSettingsFragment_to_internalSettingsFragment) 303 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_inviteActivity) 284 304 } 285 305 ) 306 + 307 + if (FeatureFlags.internalUser()) { 308 + dividerPref() 309 + 310 + clickPref( 311 + title = DSLSettingsText.from(R.string.preferences__internal_preferences), 312 + onClick = { 313 + findNavController().safeNavigate(R.id.action_appSettingsFragment_to_internalSettingsFragment) 314 + } 315 + ) 316 + } 286 317 } 287 318 } 319 + 288 320 } 321 + 322 + //**TM_SA**// start 323 + 324 + 325 + override fun sendLogSucceed() { 326 + mProgressDialog.hide() 327 + com.tm.logger.Log.d("sendLog", "sendLogSucceed") 328 + } 329 + 330 + override fun sendLogFailure() { 331 + mProgressDialog.hide() 332 + com.tm.logger.Log.d("sendLog", "sendLogFailure") 333 + } 334 + 335 + 336 + private fun doSendLogsClicked() { 337 + 338 + val builder = AlertDialog.Builder(context) 339 + 340 + mProgressDialog = ProgressDialog.progressDialog(requireContext()) 341 + 342 + builder.setTitle(R.string.issue_report_list_title) 343 + builder.setMessage(getString(R.string.issue_report_list_summery) + "?") 344 + 345 + builder.setPositiveButton(R.string.ShareActivity__send) { dialog, which -> 346 + 347 + mProgressDialog.show() 348 + 349 + AndroidCopySDK.getInstance(context).sentLogs( 350 + activity, 351 + this, 352 + PrefManager.getStringPref(context, ArchivePreferenceConstants.PREF_KEY_DEVICE_PHONE_NUMBER, ""), 353 + "Signal Archiver logs", 354 + PrefManager.getStringPref(context, ArchivePreferenceConstants.PREF_KEY_DEVICE_NAME, ""), 355 + "", 356 + "", 357 + "", 358 + "", 359 + ArchivePreferenceConstants.GENERATE_TOK_NAME, 360 + ArchivePreferenceConstants.GENERATE_TOK_PASS 361 + ) 362 + } 363 + builder.setNegativeButton(R.string.CommunicationActions_cancel, null) 364 + builder.show() 365 + 366 + } 367 + 368 + //**TM_SA**// End 289 369 290 370 private fun copySubscriberIdToClipboard(): Boolean { 291 371 val subscriber = SignalStore.donationsValues().getSubscriber()
+4 -2
app/src/main/java/org/tm/archive/components/settings/app/help/HelpSettingsFragment.kt
··· 37 37 summary = DSLSettingsText.from(BuildConfig.VERSION_NAME) 38 38 ) 39 39 40 - clickPref( 40 + //**TM_SA**//s 41 + /*clickPref( 41 42 title = DSLSettingsText.from(R.string.HelpSettingsFragment__debug_log), 42 43 onClick = { 43 44 Navigation.findNavController(requireView()).safeNavigate(R.id.action_helpSettingsFragment_to_submitDebugLogActivity) 44 45 } 45 - ) 46 + )*/ 47 + //**TM_SA**//e 46 48 47 49 clickPref( 48 50 title = DSLSettingsText.from(R.string.HelpSettingsFragment__licenses),
+2 -2
app/src/main/java/org/tm/archive/components/settings/app/privacy/PrivacySettingsFragment.kt
··· 313 313 314 314 dividerPref() 315 315 316 - sectionHeaderPref(R.string.preferences_app_protection__payments) 316 + /*sectionHeaderPref(R.string.preferences_app_protection__payments) 317 317 318 318 switchPref( 319 319 title = DSLSettingsText.from(R.string.preferences__payment_lock), ··· 328 328 viewModel.togglePaymentLock(true) 329 329 } 330 330 } 331 - ) 331 + )*/ 332 332 333 333 dividerPref() 334 334