Changeset 6d938a1


Ignore:
Timestamp:
Jun 2, 2011 1:24:47 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
733d6db5
Parents:
8a56531
Message:

android build fixes

Location:
android
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • android/README.txt

    r8a56531 r6d938a1  
    2929
    3030#then wait a couple minutes until the emulator is up
    31 #then install the I2P app
     31#then install the I2P app (ONE TIME ONLY)
    3232ant install
    3333
  • android/build.xml

    r8a56531 r6d938a1  
    7777        <unjar src="../build/i2p.jar" dest="tmp/" />
    7878        <delete file="tmp/net/i2p/util/LogWriter.class" />
     79        <delete file="tmp/net/i2p/util/SecureDirectory.class" />
     80        <delete file="tmp/net/i2p/util/SecureFile.class" />
     81        <delete file="tmp/net/i2p/util/SecureFileOutputStream.class" />
    7982        <!-- org.bouncycastle.crypto already in android
    8083             but we need a little trickery because our HMac is incompatible...
     
    238241        <javac encoding="ascii" target="1.5" debug="true" extdirs=""
    239242                destdir="${out-classes}"
     243                includeantruntime="false"
    240244                bootclasspathref="android.target.classpath">
    241245            <src path="${source-folder}" />
     
    281285    <!-- Package the application and sign it with a debug key.
    282286         This is the default target when building. It is used for debug. -->
     287    <!--
     288         I2P when this fails 365 days later because the key expired, delete ~/.android/debug.keystore
     289         Then do 'ant uninstall' (since the new key doesn't match the old key)
     290         Then do 'ant install'
     291         See http://developer.android.com/guide/publishing/app-signing.html for more info
     292      -->
    283293    <target name="debug" depends="dex, package-resources">
    284294        <apkbuilder
     
    328338    </target>
    329339
    330     <!-- Uinstall the package from the default emulator -->
     340    <!-- Uninstall the package from the default emulator -->
    331341    <target name="uninstall">
    332342        <echo>Uninstalling ${application-package} from the default emulator...</echo>
    333343        <exec executable="${adb}" failonerror="true">
    334344            <arg value="uninstall" />
    335             <arg path="${application-package}" />
     345            <arg value="${application-package}" />
    336346        </exec>
    337347    </target>
  • android/src/net/i2p/router/I2PAndroid.java

    r8a56531 r6d938a1  
    4747        System.err.println("onStart called");
    4848        super.onStart();
     49//      net.i2p.crypto.DSAEngine.main(null);
    4950        RouterLaunch.main(null);
    5051        System.err.println("Router.main finished");
  • android/src/net/i2p/util/LogWriter.java

    r8a56531 r6d938a1  
    1111import java.io.OutputStream;
    1212import java.util.List;
     13import java.util.Queue;
    1314
    1415/**
     
    5758    public void flushRecords(boolean shouldWait) {
    5859        try {
    59             List records = _manager._removeAll();
     60            // zero copy, drain the manager queue directly
     61            Queue<LogRecord> records = _manager.getQueue();
    6062            if (records == null) return;
    61             for (int i = 0; i < records.size(); i++) {
    62                 LogRecord rec = (LogRecord) records.get(i);
    63                 writeRecord(rec);
     63            if (!records.isEmpty()) {
     64                LogRecord rec;
     65                while ((rec = records.poll()) != null) {
     66                    writeRecord(rec);
     67                }
     68                try {
     69                    if (_currentOut != null)
     70                        _currentOut.flush();
     71                } catch (IOException ioe) {
     72                    //if (++_diskFullMessageCount < MAX_DISKFULL_MESSAGES)
     73                        System.err.println("Error writing the router log - disk full? " + ioe);
     74                }
    6475            }
    6576        } catch (Throwable t) {
Note: See TracChangeset for help on using the changeset viewer.