linebreaks

Signed-off-by: tobiaskaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiaskaminsky 2018-01-12 17:43:32 +01:00 committed by tobiasKaminsky
parent 66711f215c
commit 45f7cb1cc7
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
4 changed files with 18 additions and 16 deletions

View file

@ -1,4 +1,4 @@
/**
/*
* Nextcloud Android client application
*
* @author Mario Danic
@ -100,8 +100,8 @@ public class PushUtils {
private static int generateRsa2048KeyPair() {
MainApp.migratePushKeys();
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator + MainApp.getDataFolder() + File.separator
+ KEYPAIR_FOLDER;
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator +
MainApp.getDataFolder() + File.separator + KEYPAIR_FOLDER;
String privateKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PRIV_EXTENSION;
String publicKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PUB_EXTENSION;
@ -228,8 +228,8 @@ public class PushUtils {
publicKey,
context.getResources().getString(R.string.push_server_url));
RemoteOperationResult remoteOperationResult = registerAccountDeviceForNotificationsOperation.
execute(mClient);
RemoteOperationResult remoteOperationResult =
registerAccountDeviceForNotificationsOperation.execute(mClient);
if (remoteOperationResult.isSuccess()) {
PushResponse pushResponse = remoteOperationResult.getPushResponseData();
@ -272,8 +272,8 @@ public class PushUtils {
}
public static Key readKeyFromFile(boolean readPublicKey) {
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator + MainApp.getDataFolder() + File.separator
+ KEYPAIR_FOLDER;
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator +
MainApp.getDataFolder() + File.separator + KEYPAIR_FOLDER;
String privateKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PRIV_EXTENSION;
String publicKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PUB_EXTENSION;

View file

@ -242,7 +242,8 @@ public class MainApp extends MultiDexApplication {
Context context = getAppContext();
if (!PreferenceManager.getKeysMigration(context)) {
String oldKeyPath = getStoragePath() + File.separator + MainApp.getDataFolder() + File.separator + "nc-keypair";
String oldKeyPath = getStoragePath() + File.separator + MainApp.getDataFolder() +
File.separator + "nc-keypair";
File oldPrivateKey = new File(oldKeyPath, "push_key.priv");
File oldPublicKey = new File(oldKeyPath, "push_key.pub");

View file

@ -68,7 +68,8 @@ public class DataStorageProvider {
// Add external storage directory if available.
if (isExternalStorageWritable()) {
mCachedStoragePoints.add(new StoragePoint(MainApp.getAppContext().getExternalFilesDir(null).getAbsolutePath(),
mCachedStoragePoints.add(new StoragePoint(
MainApp.getAppContext().getExternalFilesDir(null).getAbsolutePath(),
MainApp.getAppContext().getExternalFilesDir(null).getAbsolutePath()));
}

View file

@ -1,4 +1,4 @@
/**
/*
* Nextcloud Android client application
*
* @author Mario Danic
@ -100,8 +100,8 @@ public class PushUtils {
private static int generateRsa2048KeyPair() {
MainApp.migratePushKeys();
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator + MainApp.getDataFolder() + File.separator
+ KEYPAIR_FOLDER;
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator +
MainApp.getDataFolder() + File.separator + KEYPAIR_FOLDER;
String privateKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PRIV_EXTENSION;
String publicKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PUB_EXTENSION;
@ -228,8 +228,8 @@ public class PushUtils {
publicKey,
context.getResources().getString(R.string.push_server_url));
RemoteOperationResult remoteOperationResult = registerAccountDeviceForNotificationsOperation.
execute(mClient);
RemoteOperationResult remoteOperationResult =
registerAccountDeviceForNotificationsOperation.execute(mClient);
if (remoteOperationResult.isSuccess()) {
PushResponse pushResponse = remoteOperationResult.getPushResponseData();
@ -268,8 +268,8 @@ public class PushUtils {
}
public static Key readKeyFromFile(boolean readPublicKey) {
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator + MainApp.getDataFolder() + File.separator
+ KEYPAIR_FOLDER;
String keyPath = MainApp.getAppContext().getFilesDir().getAbsolutePath() + File.separator +
MainApp.getDataFolder() + File.separator + KEYPAIR_FOLDER;
String privateKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PRIV_EXTENSION;
String publicKeyPath = keyPath + File.separator + KEYPAIR_FILE_NAME + KEYPAIR_PUB_EXTENSION;