diff --git a/src/gplay/java/com/owncloud/android/utils/PushUtils.java b/src/gplay/java/com/owncloud/android/utils/PushUtils.java index 9ab7d60658..ac2d78ae55 100644 --- a/src/gplay/java/com/owncloud/android/utils/PushUtils.java +++ b/src/gplay/java/com/owncloud/android/utils/PushUtils.java @@ -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; diff --git a/src/main/java/com/owncloud/android/MainApp.java b/src/main/java/com/owncloud/android/MainApp.java index 98a552a3ed..63e1da5ba1 100644 --- a/src/main/java/com/owncloud/android/MainApp.java +++ b/src/main/java/com/owncloud/android/MainApp.java @@ -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"); diff --git a/src/main/java/com/owncloud/android/datastorage/DataStorageProvider.java b/src/main/java/com/owncloud/android/datastorage/DataStorageProvider.java index 632ede9929..13805e1579 100644 --- a/src/main/java/com/owncloud/android/datastorage/DataStorageProvider.java +++ b/src/main/java/com/owncloud/android/datastorage/DataStorageProvider.java @@ -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())); } diff --git a/src/modified/java/com/owncloud/android/utils/PushUtils.java b/src/modified/java/com/owncloud/android/utils/PushUtils.java index b80cb71557..6386318606 100644 --- a/src/modified/java/com/owncloud/android/utils/PushUtils.java +++ b/src/modified/java/com/owncloud/android/utils/PushUtils.java @@ -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;