use of com.owncloud.android.utils.SecurityUtils in project android by nextcloud.
the class MainApp method onCreate.
@SuppressFBWarnings("ST")
@Override
public void onCreate() {
enableStrictMode();
setAppTheme(preferences.getDarkThemeMode());
super.onCreate();
insertConscrypt();
initSecurityKeyManager();
registerActivityLifecycleCallbacks(new ActivityInjector());
int startedMigrationsCount = migrationsManager.startMigration();
logger.i(TAG, String.format(Locale.US, "Started %d migrations", startedMigrationsCount));
new SecurityUtils();
DisplayUtils.useCompatVectorIfNeeded();
fixStoragePath();
MainApp.storagePath = preferences.getStoragePath(getApplicationContext().getFilesDir().getAbsolutePath());
OwnCloudClientManagerFactory.setUserAgent(getUserAgent());
// initialise thumbnails cache on background thread
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
if (BuildConfig.DEBUG || getApplicationContext().getResources().getBoolean(R.bool.logger_enabled)) {
// use app writable dir, no permissions needed
Log_OC.setLoggerImplementation(new LegacyLoggerAdapter(logger));
Log_OC.d("Debug", "start logging");
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
try {
Method m = StrictMode.class.getMethod("disableDeathOnFileUriExposure");
m.invoke(null);
} catch (Exception e) {
Log_OC.d("Debug", "Failed to disable uri exposure");
}
}
initSyncOperations(preferences, uploadsStorageManager, accountManager, connectivityService, powerManagementService, backgroundJobManager, clock);
initContactsBackup(accountManager, backgroundJobManager);
notificationChannels();
backgroundJobManager.scheduleMediaFoldersDetectionJob();
backgroundJobManager.startMediaFoldersDetectionJob();
registerGlobalPassCodeProtection();
}
Aggregations