misc formatting

This commit is contained in:
Salakar 2017-03-02 11:38:43 +00:00
parent c652d73c9f
commit 4d9255c3e9
9 changed files with 374 additions and 380 deletions

View File

@ -51,7 +51,7 @@ public class RNFirebaseMessagingService extends FirebaseMessagingService {
i.putExtra("hasError", true);
SendException sendException = (SendException) exception;
i.putExtra("errorCode", sendException.getErrorCode());
switch(sendException.getErrorCode()){
switch (sendException.getErrorCode()) {
case SendException.ERROR_INVALID_PARAMETERS:
i.putExtra("errorMessage", "Message was sent with invalid parameters.");
break;

View File

@ -25,6 +25,7 @@ public class RNFirebasePackage implements ReactPackage {
public RNFirebasePackage() {
}
/**
* @param reactContext react application context that can be used to create modules
* @return list of native modules to register with the newly created catalyst instance

View File

@ -22,7 +22,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @return
*/
@Override
@ -36,7 +35,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @param enabled
*/
@ReactMethod
@ -45,7 +43,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @param screenName
* @param screenClassOverride
*/
@ -65,7 +62,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @param milliseconds
*/
@ReactMethod
@ -74,7 +70,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @param milliseconds
*/
@ReactMethod
@ -83,7 +78,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @param id
*/
@ReactMethod
@ -92,7 +86,6 @@ public class RNFirebaseAnalytics extends ReactContextBaseJavaModule {
}
/**
*
* @param name
* @param value
*/

View File

@ -187,8 +187,8 @@ public class RNFirebaseStorage extends ReactContextBaseJavaModule {
@Override
public void doInBackground(StreamDownloadTask.TaskSnapshot taskSnapshot, InputStream inputStream) throws IOException {
int indexOfLastSlash = localPath.lastIndexOf("/");
String pathMinusFileName = indexOfLastSlash>0 ? localPath.substring(0, indexOfLastSlash) + "/" : "/";
String filename = indexOfLastSlash>0 ? localPath.substring(indexOfLastSlash+1) : localPath;
String pathMinusFileName = indexOfLastSlash > 0 ? localPath.substring(0, indexOfLastSlash) + "/" : "/";
String filename = indexOfLastSlash > 0 ? localPath.substring(indexOfLastSlash + 1) : localPath;
File fileWithJustPath = new File(pathMinusFileName);
fileWithJustPath.mkdirs();
File fileWithFullPath = new File(pathMinusFileName, filename);
@ -300,17 +300,17 @@ public class RNFirebaseStorage extends ReactContextBaseJavaModule {
//Firebase.Storage methods
@ReactMethod
public void setMaxDownloadRetryTime(final double milliseconds) {
FirebaseStorage.getInstance().setMaxDownloadRetryTimeMillis((long)milliseconds);
FirebaseStorage.getInstance().setMaxDownloadRetryTimeMillis((long) milliseconds);
}
@ReactMethod
public void setMaxOperationRetryTime(final double milliseconds) {
FirebaseStorage.getInstance().setMaxOperationRetryTimeMillis((long)milliseconds);
FirebaseStorage.getInstance().setMaxOperationRetryTimeMillis((long) milliseconds);
}
@ReactMethod
public void setMaxUploadRetryTime(final double milliseconds) {
FirebaseStorage.getInstance().setMaxUploadRetryTimeMillis((long)milliseconds);
FirebaseStorage.getInstance().setMaxUploadRetryTimeMillis((long) milliseconds);
}
private StorageReference getReference(String path) {