mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 10:18:59 +03:00
linebreaks
Signed-off-by: tobiaskaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
66711f215c
commit
45f7cb1cc7
4 changed files with 18 additions and 16 deletions
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue