mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Fixed lint warning.
This commit is contained in:
parent
6c3f7a2bde
commit
684cc445ef
2 changed files with 10 additions and 9 deletions
|
@ -12,6 +12,7 @@ import android.util.Log;
|
|||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class EventProcessor implements SyncthingService.OnWebGuiAvailableListene
|
|||
* @return Returns the full intent action used for local broadcasts.
|
||||
*/
|
||||
public static String getEventIntentAction(String eventName) {
|
||||
return EVENT_BASE_ACTION + "." + eventName.toUpperCase();
|
||||
return EVENT_BASE_ACTION + "." + eventName.toUpperCase(Locale.US);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,14 +130,13 @@ public class EventProcessor implements SyncthingService.OnWebGuiAvailableListene
|
|||
}
|
||||
}
|
||||
|
||||
final Intent eventBroadcastItent = new Intent(EVENT_BASE_ACTION + "." + eventType.toUpperCase());
|
||||
eventBroadcastItent.putExtras(eventData);
|
||||
mLocalBM.sendBroadcast(eventBroadcastItent);
|
||||
Intent broadcastIntent =
|
||||
new Intent(EVENT_BASE_ACTION + "." + eventType.toUpperCase(Locale.US));
|
||||
broadcastIntent.putExtras(eventData);
|
||||
mLocalBM.sendBroadcast(broadcastIntent);
|
||||
|
||||
Log.d(TAG,
|
||||
"Sent local event broadcast " + eventBroadcastItent.getAction() +
|
||||
" including " + eventType.length() + " extra data items."
|
||||
);
|
||||
Log.d(TAG, "Sent local event broadcast " + broadcastIntent.getAction() +
|
||||
" including " + eventType.length() + " extra data items.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
|
@ -727,7 +728,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
|||
for (int i = 0; i < jsonEvents.length(); i++) {
|
||||
|
||||
final JSONObject json = jsonEvents.getJSONObject(i);
|
||||
final String eventType = json.getString("type").toLowerCase();
|
||||
final String eventType = json.getString("type").toLowerCase(Locale.US);
|
||||
final long id = json.getLong("id");
|
||||
|
||||
Bundle dataBundle = null;
|
||||
|
|
Loading…
Reference in a new issue