fixed crashes on refresh
This commit is contained in:
parent
0e1ee9d999
commit
d854cf180d
|
@ -36,7 +36,7 @@ public class MediaEntityImpl implements MediaEntity {
|
|||
@JsonField(name = "id")
|
||||
long id;
|
||||
|
||||
@JsonField(name = "indices")
|
||||
@JsonField(name = "indices", typeConverter = IndicesConverter.class)
|
||||
Indices indices;
|
||||
|
||||
@JsonField(name = "media_url")
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.mariotaku.twidere.api.twitter.model.UrlEntity;
|
|||
*/
|
||||
@JsonObject
|
||||
public class UrlEntityImpl implements UrlEntity {
|
||||
@JsonField(name = "indices")
|
||||
@JsonField(name = "indices", typeConverter = IndicesConverter.class)
|
||||
Indices indices;
|
||||
@JsonField(name = "display_url")
|
||||
String displayUrl;
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.mariotaku.twidere.api.twitter.model.UserMentionEntity;
|
|||
*/
|
||||
@JsonObject
|
||||
public class UserMentionEntityImpl implements UserMentionEntity {
|
||||
@JsonField(name = "indices")
|
||||
@JsonField(name = "indices", typeConverter = IndicesConverter.class)
|
||||
Indices indices;
|
||||
@JsonField(name = "id")
|
||||
long id;
|
||||
|
|
|
@ -102,6 +102,8 @@ public class HotMobiLogger {
|
|||
return "battery";
|
||||
} else if (event instanceof NotificationEvent) {
|
||||
return "notification";
|
||||
} else if (event instanceof ScreenEvent) {
|
||||
return "screen";
|
||||
}
|
||||
throw new UnsupportedOperationException("Unknown event type " + event);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,13 @@ public class ScreenEvent extends BaseEvent {
|
|||
@JsonField(name = "action", typeConverter = Action.ScreenActionConverter.class)
|
||||
Action action;
|
||||
|
||||
public static ScreenEvent create(Context context, Action action) {
|
||||
final ScreenEvent event = new ScreenEvent();
|
||||
event.markStart(context);
|
||||
event.setAction(action);
|
||||
return event;
|
||||
}
|
||||
|
||||
public Action getAction() {
|
||||
return action;
|
||||
}
|
||||
|
@ -42,11 +49,11 @@ public class ScreenEvent extends BaseEvent {
|
|||
this.action = action;
|
||||
}
|
||||
|
||||
public static ScreenEvent create(Context context, Action action) {
|
||||
final ScreenEvent event = new ScreenEvent();
|
||||
event.markStart(context);
|
||||
event.setAction(action);
|
||||
return event;
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ScreenEvent{" +
|
||||
"action=" + action +
|
||||
"} " + super.toString();
|
||||
}
|
||||
|
||||
public enum Action {
|
||||
|
@ -81,5 +88,4 @@ public class ScreenEvent extends BaseEvent {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue