Merge branch 'android_branch' into android_bt

This commit is contained in:
Eric House 2012-02-22 09:52:31 -08:00
commit 10f41e5c5b
2 changed files with 67 additions and 3 deletions

View file

@ -457,7 +457,40 @@ public class DictUtils {
}
}
return success;
}
}
/*
// The goal here was to attach intalled dicts to email to save
// folks having to download them, but there are too many problems
// to make me think I can create a good UE. Chief is that the
// email clients are ignoring my mime type (though they require
// one in the Intent) because they think they know what an .xwd
// file is. Without the right mime type I can't get Crosswords
// launched to receive the attachment on the other end.
// Additionally, gmail at least requires that the path start with
// /mnt/sdcard, and there's no failure notification so I get to
// warn users myself, or disable the share menuitem for dicts in
// internal storage.
public static void shareDict( Context context, String name )
{
Intent intent = new Intent( Intent.ACTION_SEND );
intent.setType( "application/x-xwordsdict" );
File dictFile = new File( getDictPath( context, name ) );
DbgUtils.logf( "path: %s", dictFile.getPath() );
Uri uri = Uri.fromFile( dictFile );
DbgUtils.logf( "uri: %s", uri.toString() );
intent.putExtra( Intent.EXTRA_STREAM, uri );
intent.putExtra( Intent.EXTRA_SUBJECT,
context.getString( R.string.share_subject ) );
intent.putExtra( Intent.EXTRA_TEXT,
Utils.format( context, R.string.share_bodyf, name ) );
String title = context.getString( R.string.share_chooser );
context.startActivity( Intent.createChooser( intent, title ) );
}
*/
private static boolean isGame( String file )
{

View file

@ -1,5 +1,36 @@
#!/bin/sh
for DEVICE in $(adb devices | grep '^emulator' | sed 's/device//'); do
adb -s $DEVICE uninstall org.eehouse.android.xw4
set -u -e
usage() {
[ $# -ge 1 ] && echo "Error: $1"
echo "usage: $(basename $0) [-e] [-d]"
exit 1
}
DEVICES=""
while [ $# -ge 1 ]; do
case $1 in
-e)
DEVICES="$DEVICES $(adb devices | grep '^emulator' | awk '{print $1}')"
;;
-d)
DEVICES="$DEVICES $(adb devices | grep -v emulator | grep 'device$' | awk '{print $1}')"
;;
*)
usage
;;
esac
shift
done
COUNT=0
for DEVICE in $DEVICES; do
echo $DEVICE
adb -s $DEVICE uninstall org.eehouse.android.xw4
COUNT=$((COUNT+1))
done
echo "removed from $COUNT devices/emulators"