Fixed lint warning.
This commit is contained in:
parent
6c3f7a2bde
commit
684cc445ef
|
@ -12,6 +12,7 @@ import android.util.Log;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
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.
|
* @return Returns the full intent action used for local broadcasts.
|
||||||
*/
|
*/
|
||||||
public static String getEventIntentAction(String eventName) {
|
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());
|
Intent broadcastIntent =
|
||||||
eventBroadcastItent.putExtras(eventData);
|
new Intent(EVENT_BASE_ACTION + "." + eventType.toUpperCase(Locale.US));
|
||||||
mLocalBM.sendBroadcast(eventBroadcastItent);
|
broadcastIntent.putExtras(eventData);
|
||||||
|
mLocalBM.sendBroadcast(broadcastIntent);
|
||||||
|
|
||||||
Log.d(TAG,
|
Log.d(TAG, "Sent local event broadcast " + broadcastIntent.getAction() +
|
||||||
"Sent local event broadcast " + eventBroadcastItent.getAction() +
|
" including " + eventType.length() + " extra data items.");
|
||||||
" including " + eventType.length() + " extra data items."
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,6 +29,7 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
@ -727,7 +728,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
for (int i = 0; i < jsonEvents.length(); i++) {
|
for (int i = 0; i < jsonEvents.length(); i++) {
|
||||||
|
|
||||||
final JSONObject json = jsonEvents.getJSONObject(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");
|
final long id = json.getLong("id");
|
||||||
|
|
||||||
Bundle dataBundle = null;
|
Bundle dataBundle = null;
|
||||||
|
|
Loading…
Reference in New Issue