removed unused components to make app smaller
This commit is contained in:
parent
b6616b8355
commit
511b1abf38
|
@ -69,7 +69,6 @@ dependencies {
|
|||
compile 'com.twitter:twitter-text:1.11.1'
|
||||
aarLinkSources 'com.twitter:twitter-text:1.11.1:sources@jar'
|
||||
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
|
||||
compile 'org.apache.commons:commons-csv:1.1'
|
||||
compile 'com.google.android.apps.dashclock:dashclock-api:2.0.0'
|
||||
compile 'com.squareup:otto:1.3.6'
|
||||
compile 'dnsjava:dnsjava:2.1.7'
|
||||
|
|
|
@ -85,7 +85,6 @@ import org.mariotaku.twidere.util.ClipboardUtils;
|
|||
import org.mariotaku.twidere.util.CompareUtils;
|
||||
import org.mariotaku.twidere.util.ImageLoaderWrapper;
|
||||
import org.mariotaku.twidere.util.ImageLoadingHandler;
|
||||
import org.mariotaku.twidere.util.StatisticUtils;
|
||||
import org.mariotaku.twidere.util.StatusLinkClickHandler;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.util.TwidereLinkify;
|
||||
|
@ -100,7 +99,6 @@ import org.mariotaku.twidere.view.holder.GapViewHolder;
|
|||
import org.mariotaku.twidere.view.holder.LoadIndicatorViewHolder;
|
||||
import org.mariotaku.twidere.view.holder.StatusViewHolder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
|
@ -112,7 +110,6 @@ import edu.tsinghua.spice.Utilies.TypeMapingUtil;
|
|||
import twitter4j.TwitterException;
|
||||
|
||||
import static android.text.TextUtils.isEmpty;
|
||||
import static android.text.TextUtils.substring;
|
||||
import static org.mariotaku.twidere.util.UserColorNameUtils.clearUserColor;
|
||||
import static org.mariotaku.twidere.util.UserColorNameUtils.clearUserNickname;
|
||||
import static org.mariotaku.twidere.util.UserColorNameUtils.getUserColor;
|
||||
|
@ -294,9 +291,9 @@ public class StatusFragment extends BaseSupportFragment
|
|||
Utils.openMediaDirectly(getActivity(), accountId, media, status.media);
|
||||
//spice
|
||||
SpiceProfilingUtil.log(getActivity(),
|
||||
status.id + ",Clicked," + accountId + "," + status.user_id + "," + status.text_plain.length() + "," + media.media_url + "," + TypeMapingUtil.getMediaType(media.type) + "," + status.timestamp );
|
||||
SpiceProfilingUtil.profile(getActivity(),accountId,
|
||||
status.id + ",Clicked," + accountId + "," + status.user_id + "," + status.text_plain.length() + "," + media.media_url + "," + TypeMapingUtil.getMediaType(media.type) + "," + status.timestamp);
|
||||
status.id + ",Clicked," + accountId + "," + status.user_id + "," + status.text_plain.length() + "," + media.media_url + "," + TypeMapingUtil.getMediaType(media.type) + "," + status.timestamp);
|
||||
SpiceProfilingUtil.profile(getActivity(), accountId,
|
||||
status.id + ",Clicked," + accountId + "," + status.user_id + "," + status.text_plain.length() + "," + media.media_url + "," + TypeMapingUtil.getMediaType(media.type) + "," + status.timestamp);
|
||||
//end
|
||||
}
|
||||
|
||||
|
@ -336,11 +333,6 @@ public class StatusFragment extends BaseSupportFragment
|
|||
final int position = mStatusAdapter.findPositionById(itemId);
|
||||
mLayoutManager.scrollToPositionWithOffset(position, top);
|
||||
}
|
||||
try {
|
||||
StatisticUtils.writeStatusOpen(status, null, 0);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
setState(STATE_LOADED);
|
||||
} else {
|
||||
//TODO show errors
|
||||
|
@ -371,13 +363,13 @@ public class StatusFragment extends BaseSupportFragment
|
|||
//spice
|
||||
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 );
|
||||
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 );
|
||||
} else {
|
||||
status.id + ",Preview," + status.account_id + "," + status.user_id + "," + status.text_plain.length() + "," + TypeMapingUtil.getMediaType(status.media[0].type) + "," + 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 );
|
||||
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);
|
||||
}
|
||||
//end
|
||||
|
||||
|
@ -980,15 +972,15 @@ public class StatusFragment extends BaseSupportFragment
|
|||
twitter.destroyFavoriteAsync(status.account_id, status.id);
|
||||
//spice
|
||||
SpiceProfilingUtil.profile(adapter.getContext(),
|
||||
status.account_id, status.id + ",Unfavor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(adapter.getContext(),status.id + ",Unfavor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
status.account_id, status.id + ",Unfavor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(adapter.getContext(), status.id + ",Unfavor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
//end
|
||||
} else {
|
||||
twitter.createFavoriteAsync(status.account_id, status.id);
|
||||
//spice
|
||||
SpiceProfilingUtil.profile(adapter.getContext(),
|
||||
status.account_id, status.id + ",Favor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(adapter.getContext(),status.id + ",Favor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
status.account_id, status.id + ",Favor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
SpiceProfilingUtil.log(adapter.getContext(), status.id + ",Favor," + status.account_id + "," + status.user_id + "," + status.timestamp);
|
||||
//end
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.util;
|
||||
|
||||
import android.location.Location;
|
||||
import android.support.v4.util.LogWriter;
|
||||
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVPrinter;
|
||||
import org.mariotaku.twidere.model.ParcelableStatus;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 15/1/12.
|
||||
*/
|
||||
public class StatisticUtils {
|
||||
|
||||
|
||||
public static void writeStatusOpen(ParcelableStatus status, Location location, int signalStrength) throws IOException {
|
||||
final LogWriter writer = new LogWriter("Twidere");
|
||||
final CSVPrinter printer = CSVFormat.DEFAULT.print(writer);
|
||||
printer.printRecord(status.account_id, status.id, status.user_id, status.user_screen_name,
|
||||
status.text_html, fromStringLocation(location), signalStrength);
|
||||
}
|
||||
|
||||
private static String fromStringLocation(Location location) {
|
||||
if (location == null) return "";
|
||||
return location.getLatitude() + "," + location.getLongitude();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue