mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2024-12-18 11:39:10 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2a05b88119
@ -361,18 +361,34 @@ public class StatusFragment extends BaseSupportFragment
|
||||
getLoaderManager().initLoader(LOADER_ID_STATUS_REPLIES, args, mRepliesLoaderCallback);
|
||||
mRepliesLoaderInitialized = true;
|
||||
//spice
|
||||
if (status.media != null) {
|
||||
if (status.media == null) {
|
||||
SpiceProfilingUtil.profile(getActivity(), status.account_id,
|
||||
status.id + ",Preview," + status.account_id + "," + status.user_id + "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(status.media[0].type) + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(getActivity(),
|
||||
status.id + ",Preview," + status.account_id + "," + status.user_id + "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(status.media[0].type) + "," + status.timestamp);
|
||||
status.id + ",Words," + status.account_id + "," + status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + status.text_plain.length() + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(getActivity(), status.id + ",Words," + status.account_id + "," + status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + status.text_plain.length() + "," + status.timestamp);
|
||||
} else {
|
||||
SpiceProfilingUtil.profile(getActivity(), status.account_id,
|
||||
status.id + ",Words," + status.account_id + "," + status.user_id + "," + status.text_plain.length() + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(getActivity(), status.account_id + ",Words," + status.user_id + "," + status.text_plain.length() + "," + status.timestamp);
|
||||
for (final ParcelableMedia spiceMedia : status.media) {
|
||||
if(TypeMapingUtil.getMediaType(spiceMedia.type).equals("image")) {
|
||||
SpiceProfilingUtil.profile(getActivity(), status.account_id,
|
||||
status.id + ",PreviewM," + status.account_id + "," + status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(spiceMedia.type) + "," + spiceMedia.width + "x" + spiceMedia.height + ","
|
||||
+ status.timestamp);
|
||||
SpiceProfilingUtil.log(getActivity(),
|
||||
status.id + ",PreviewM," + status.account_id + "," + status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(spiceMedia.type) + "," + spiceMedia.width + "x" + spiceMedia.height + ","
|
||||
+ status.timestamp);
|
||||
} else {
|
||||
SpiceProfilingUtil.profile(getActivity(), status.account_id,
|
||||
status.id + ",PreviewO," + status.account_id + "," + status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(spiceMedia.type) + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(getActivity(),
|
||||
status.id + ",PreviewO," + status.account_id + "," + status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(spiceMedia.type) + "," + status.timestamp);
|
||||
}
|
||||
}
|
||||
}
|
||||
//end
|
||||
|
||||
}
|
||||
|
||||
private void setConversation(List<ParcelableStatus> data) {
|
||||
|
@ -42,6 +42,7 @@ import org.mariotaku.twidere.app.TwidereApplication;
|
||||
import org.mariotaku.twidere.model.ListResponse;
|
||||
import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
import org.mariotaku.twidere.model.ParcelableLocation;
|
||||
import org.mariotaku.twidere.model.ParcelableMedia;
|
||||
import org.mariotaku.twidere.model.ParcelableMediaUpdate;
|
||||
import org.mariotaku.twidere.model.ParcelableStatus;
|
||||
import org.mariotaku.twidere.model.ParcelableStatusUpdate;
|
||||
@ -80,6 +81,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
import edu.tsinghua.spice.Utilies.SpiceProfilingUtil;
|
||||
import edu.tsinghua.spice.Utilies.TypeMapingUtil;
|
||||
import edu.ucdavis.earlybird.ProfilingUtil;
|
||||
import twitter4j.DirectMessage;
|
||||
import twitter4j.Paging;
|
||||
@ -2329,10 +2331,30 @@ public class AsyncTwitterWrapper extends TwitterWrapper {
|
||||
final Bus bus = TwidereApplication.getInstance(mContext).getMessageBus();
|
||||
bus.post(new StatusRetweetedEvent(status));
|
||||
//spice
|
||||
SpiceProfilingUtil.log(getContext(),status.id + ",Retweet," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count);
|
||||
SpiceProfilingUtil.profile(getContext(), account_id, status.id + ",Retweet," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count);
|
||||
if (status.media == null) {
|
||||
SpiceProfilingUtil.log(getContext(),status.id + ",Retweet," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count);
|
||||
SpiceProfilingUtil.profile(getContext(), account_id, status.id + ",Retweet," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count);
|
||||
} else {
|
||||
for (final ParcelableMedia spiceMedia : status.media) {
|
||||
if(TypeMapingUtil.getMediaType(spiceMedia.type).equals("image")) {
|
||||
SpiceProfilingUtil.log(getContext(),status.id + ",RetweetM," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + spiceMedia.media_url + "," + TypeMapingUtil.getMediaType(spiceMedia.type) + "," + spiceMedia.width + "x" + spiceMedia.height);
|
||||
SpiceProfilingUtil.profile(getContext(), account_id, status.id + ",RetweetM," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + spiceMedia.media_url + "," + TypeMapingUtil.getMediaType(spiceMedia.type) + "," + spiceMedia.width + "x" + spiceMedia.height);
|
||||
} else {
|
||||
SpiceProfilingUtil.log(getContext(),status.id + ",RetweetO," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + spiceMedia.media_url + "," + TypeMapingUtil.getMediaType(spiceMedia.type));
|
||||
SpiceProfilingUtil.profile(getContext(), account_id, status.id + ",RetweetO," + account_id + ","
|
||||
+ status.user_id + "," + status.reply_count + "," + status.retweet_count + "," + status.favorite_count
|
||||
+ "," + spiceMedia.media_url + "," + TypeMapingUtil.getMediaType(spiceMedia.type));
|
||||
}
|
||||
}
|
||||
}
|
||||
//end
|
||||
mMessagesManager.showOkMessage(R.string.status_retweeted, false);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user