Changeset 41595ca for apps/addressbook


Ignore:
Timestamp:
Aug 31, 2013 3:35:57 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6812dc1
Parents:
d6c4e41
Message:
  • Addressbook: Don't write to log file on Android (ticket #859)
Location:
apps/addressbook/java/src/net/i2p/addressbook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java

    rd6c4e41 r41595ca  
    261261     * @param overwrite True to overwrite
    262262     * @param log
    263      *            The log to write messages about new addresses or conflicts to.
     263     *            The log to write messages about new addresses or conflicts to. May be null.
    264264     *
    265265     * @throws IllegalStateException if this was created with the Subscription constructor.
  • apps/addressbook/java/src/net/i2p/addressbook/Daemon.java

    rd6c4e41 r41595ca  
    3838import net.i2p.data.Destination;
    3939import net.i2p.util.SecureDirectory;
     40import net.i2p.util.SystemVersion;
    4041
    4142/**
     
    169170                                    publishedNS = new SingleFileNamingService(I2PAppContext.getGlobalContext(), published.getAbsolutePath());
    170171                                success = publishedNS.putIfAbsent(key, dest);
    171                                 if (!success) {
     172                                if (log != null && !success) {
    172173                                    try {
    173174                                        log.append("Save to published address book " + published.getCanonicalPath() + " failed for new key " + key);
     
    258259                etagsFile, lastModifiedFile, lastFetchedFile, delay, defaultSubs, settings
    259260                .get("proxy_host"), Integer.parseInt(settings.get("proxy_port")));
    260         Log log = new Log(logFile);
     261        Log log = SystemVersion.isAndroid() ? null : new Log(logFile);
    261262
    262263        // If false, add hosts via naming service; if true, write hosts.txt file directly
Note: See TracChangeset for help on using the changeset viewer.