Remove unused binaries and layouts

pull/14/head
Alex Baker 11 years ago
parent d71b43260e
commit 59f87528fe

2
.gitignore vendored

@ -1,5 +1,7 @@
.idea/workspace.xml
out/
proguard_logs/
*.apk
*~
.DS_Store

@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="commons-codec">
<CLASSES>
<root url="jar://$PROJECT_DIR$/astrid/libs/commons-codec-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="gcm">
<CLASSES>
<root url="jar://$PROJECT_DIR$/astrid/libs/gcm.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/astrid/libs/gcm-src.jar!/" />
</SOURCES>
</library>
</component>

@ -15,6 +15,7 @@
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src-legacy" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/proguard_logs" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
@ -25,7 +26,6 @@
<orderEntry type="module" module-name="ActionBarSherlock" exported="" />
<orderEntry type="module" module-name="api" exported="" />
<orderEntry type="module" module-name="android-aac-enc" exported="" />
<orderEntry type="library" exported="" name="commons-codec" level="project" />
<orderEntry type="library" exported="" name="CWAC-SackOfViewsAdapter" level="project" />
<orderEntry type="library" exported="" name="framework" level="project" />
<orderEntry type="library" exported="" name="rfc2445-4Mar2011" level="project" />
@ -36,7 +36,6 @@
<orderEntry type="library" exported="" name="httpmime" level="project" />
<orderEntry type="library" exported="" name="guava" level="project" />
<orderEntry type="library" exported="" name="gson" level="project" />
<orderEntry type="library" exported="" name="gcm" level="project" />
<orderEntry type="library" exported="" name="google-oauth-client" level="project" />
<orderEntry type="library" exported="" name="google-http-client" level="project" />
<orderEntry type="library" exported="" name="googleloginclient-helper" level="project" />

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -15,14 +15,12 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.TimeZone;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.http.HttpEntity;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.StringBody;
import org.json.JSONException;
import org.json.JSONObject;
import android.text.TextUtils;
import android.util.Log;
import org.astrid.R;
@ -315,8 +313,8 @@ public class ActFmInvoker {
}
sigBuilder.append(APP_SECRET);
String signature = DigestUtils.md5Hex(sigBuilder.toString());
requestBuilder.append("sig").append('=').append(signature);
// String signature = DigestUtils.md5Hex(sigBuilder.toString());
// requestBuilder.append("sig").append('=').append(signature);
return requestBuilder.toString();
}

@ -1,95 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#aaa"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/premium_description_holder"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingRight="5dip"
android:paddingTop="10dip" >
<TextView
android:id="@+id/premium_description_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dip"
android:gravity="left"
android:text="@string/premium_description_header"
android:textColor="#404040"
android:paddingLeft="20dip"
android:textSize="20dip"
android:textStyle="bold" />
<WebView
android:id="@+id/premium_bullets"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="20dip" />
</LinearLayout>
<include layout="@layout/astrid_speech_bubble"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical"
android:background="@android:color/white">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:background="@android:color/white">
<Button
android:id="@+id/premium_buy_month"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
android:layout_marginBottom="8dip"
android:layout_marginTop="8dip"
android:layout_weight="1"
android:background="#707070"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="24sp"
android:text="@string/premium_buy_month"
android:gravity="center"/>
<Button
android:id="@+id/premium_buy_year"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
android:layout_marginBottom="8dip"
android:layout_marginTop="8dip"
android:layout_weight="1"
android:background="?attr/asThemeTextColor"
android:textColor="@android:color/white"
android:textSize="24sp"
android:textStyle="bold"
android:text="@string/premium_buy_year"
android:gravity="center" />
</LinearLayout>
<TextView
android:id="@+id/check_for_purchases"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:textColor="#404040"
android:gravity="center"
android:text="@string/premium_check_for_purchases"/>
</LinearLayout>
</LinearLayout>

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_marginBottom="5dip">
<com.todoroo.astrid.ui.ContactsAutoComplete
android:id="@+id/assigned_custom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dip"
android:layout_marginLeft="5dip"
android:paddingLeft="5dip"
android:layout_weight="1"
android:background="?attr/asEditTextBackground"
android:textColor="?attr/asTextColor"
android:inputType="textEmailAddress"
android:hint="@string/actfm_person_hint" />
<ImageButton
android:id="@+id/assigned_clear"
android:background="@drawable/btn_dismiss"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center"
android:layout_marginLeft="2dip"
android:gravity="center_vertical" />
<Button
android:id="@+id/edit_dlg_ok"
android:background="@drawable/btn_add"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center"
android:layout_marginLeft="2dip"
android:layout_marginRight="3dip"
android:gravity="center_vertical" />
</LinearLayout>
<com.todoroo.astrid.ui.ErrorCatchingListView
android:id="@+id/assigned_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="3dip"
android:layout_marginRight="3dip"
android:layout_marginBottom="3dip"
android:layout_weight="100"/>
</LinearLayout>

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/no_members"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical"
style="@style/TextAppearance"
android:textStyle="bold"
android:textColor="#333333"
android:text="@string/actfm_TVA_no_members_alert"/>

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<WebView android:id="@+id/browser"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="10dip"
android:paddingRight="10dip" >
<TextView
android:id="@+id/update_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginBottom="30sp"/>
<TextView
android:id="@+id/update_link"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginBottom="10sp"
android:gravity="center"/>
</LinearLayout>

@ -1,93 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:astrid="http://schemas.android.com/apk/res/org.astrid"
android:layout_width="fill_parent"
android:layout_height="100dip"
android:background="@android:drawable/list_selector_background">
<!-- imageview -->
<com.todoroo.astrid.helper.AsyncImageView android:id="@+id/image"
android:layout_width="70dip"
android:layout_height="100dip"
android:layout_marginLeft="5dip"
android:scaleType="fitCenter"
astrid:defaultSrc="@drawable/ic_contact_picture_2" />
<!-- title -->
<TextView android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/image"
android:layout_marginLeft="5dip"
android:layout_marginTop="5dip"
android:layout_marginBottom="3dip"
android:paddingRight="30dp"
android:lines="2"
android:singleLine="false"
android:textSize="12sp"
android:textStyle="bold"
android:gravity="center_vertical"
android:text="7-feet Xx-large Rust Cozy Sac Foof Bean Bag Chair"
android:ellipsize="end" />
<!-- subtitle -->
<TextView android:id="@+id/subtitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_toRightOf="@id/image"
android:layout_marginLeft="5dip"
android:layout_marginBottom="3dip"
android:paddingRight="30dp"
android:singleLine="true"
android:textSize="12sp"
android:text="The Cozy Sac"
android:gravity="center_vertical" />
<!-- price -->
<TextView android:id="@+id/price"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/subtitle"
android:layout_toRightOf="@id/image"
android:layout_marginLeft="5dip"
android:layout_marginBottom="3dip"
android:paddingRight="30dp"
android:singleLine="true"
android:textSize="12sp"
android:textStyle="bold"
android:textColor="#990000"
android:text="$259.00"
android:gravity="center_vertical" />
<!-- new and used -->
<TextView android:id="@+id/new_and_used"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/price"
android:layout_toRightOf="@id/image"
android:layout_marginLeft="5dip"
android:layout_marginBottom="3dip"
android:paddingRight="30dp"
android:ellipsize="start"
android:singleLine="true"
android:textSize="12sp"
android:text="2 New &amp; Used from $224"
android:gravity="center_vertical" />
<!-- arrow -->
<ImageView
android:layout_width="10dip"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="5dip"
android:src="@drawable/icn_arrow_right"
android:scaleType="centerInside" />
</RelativeLayout>

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:astrid="http://schemas.android.com/apk/res/org.astrid"
android:layout_width="fill_parent"
android:layout_height="100dip"
android:background="@android:drawable/list_selector_background">
<!-- imageview -->
<com.todoroo.astrid.helper.AsyncImageView android:id="@+id/image"
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_marginLeft="5dip"
android:scaleType="fitCenter"
astrid:defaultSrc="@drawable/ic_contact_picture_2" />
<!-- title -->
<TextView android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_toRightOf="@id/image"
android:paddingRight="30dp"
android:lines="3"
android:singleLine="false"
android:textSize="16sp"
android:textStyle="bold"
android:gravity="center_vertical"
android:text="Probiotic - Wikepedia, the free encyclopedia"
android:ellipsize="end" />
<!-- url -->
<TextView android:id="@+id/subtitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_toRightOf="@id/image"
android:layout_marginLeft="5dip"
android:paddingRight="30dp"
android:singleLine="true"
android:textSize="14sp"
android:text="en.wikipedia.org"
android:gravity="center_vertical" />
<!-- arrow -->
<ImageView
android:layout_width="10dip"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="5dip"
android:src="@drawable/icn_arrow_right"
android:scaleType="centerInside" />
</RelativeLayout>

@ -1,17 +0,0 @@
<!-- No Tasks label -->
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webServicesLoad"
style="@style/TextAppearance.TLA_NoItems"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="true"
android:drawableTop="@drawable/icon"
android:gravity="center"
android:text="@string/WSV_click_to_load"/>

@ -10,7 +10,6 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
@ -23,7 +22,6 @@ import org.json.JSONObject;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.RestClient;
import com.todoroo.andlib.utility.Preferences;
/**
* Invoker for communicating with the Astrid Analytics server
@ -102,8 +100,8 @@ public class ABTestInvoker {
}
sigBuilder.append(API_SECRET);
String signature = DigestUtils.md5Hex(sigBuilder.toString());
params.add(new BasicNameValuePair("sig", signature));
// String signature = DigestUtils.md5Hex(sigBuilder.toString());
// params.add(new BasicNameValuePair("sig", signature));
try {
return new UrlEncodedFormEntity(params, HTTP.UTF_8);

@ -1,16 +1,15 @@
#!/bin/bash
PROJECT=$(cd `dirname $0`/../astrid; pwd)
for file in $(ls $PROJECT/res/drawable -l | awk '{ print $8}' | sed 's/\..\+//g'); do
count=0;
for SRCFILE in `find $PROJECT -name "*.xml" -print 2> /dev/null`; do
let "count+=$(grep -c @drawable/$file $SRCFILE)";
done
for SRCFILE in `find $PROJECT -name "*.java" -print 2> /dev/null`; do
let "count+=$(grep -c R.drawable.$file $SRCFILE)";
done;
if [ $count -lt 1 ]; then
echo -e "\e[0;31m$file\e[0m not used";
else
echo -e "\e[0;32m$file\e[0m used";
fi;
done;
#PATH="../astrid/res/drawable"
for file in $(ls -l ../astrid/res/drawable | awk '{ print $9}' | sed 's/\..\+//g'); do
if [ ! -f ../astrid/res/drawable/${file} ]; then
continue
fi;
filename=`basename ${file}`
filename=${filename%.*}
git grep -q ${filename} ..
if [ $? -ne 0 ]; then
echo -e "${file} not used"
fi;
done;
#let "count+=$(grep -c @drawable/$file $SRCFILE)";
#let "count+=$(grep -c R.drawable.$file $SRCFILE)";

@ -0,0 +1,17 @@
#!/bin/bash
PROJECT=$(cd `dirname $0`/..; pwd)
pushd ${PROJECT}
echo ${PROJECT}
path=astrid/res/layout
for file in $(ls -l ${path} | awk '{ print $9}' | sed 's/\..\+//g'); do
if [ ! -f ${path}/${file} ]; then
continue
fi;
filename=`basename ${file}`
filename=${filename%.*}
git grep -q ${filename}
if [ $? -ne 0 ]; then
echo -e "${file} not used"
fi;
done;
popd
Loading…
Cancel
Save