Revert the change to DNS_TTL and fix the renewer's TTL

In a previous change, DNSConstants.DNS_TTL had been changed to reduce
the TTL of mDNS services advertised by the A@H broker.  Instead of
changing this for all users of JmDNS, A@H will use the
DNSStateTask.setDefaultTTL internal API to control the TTL.

Also, patch the Renewer so that the renewal interval is based on the
task's own TTL instead of the hardcoded TTL in DNSConstants.

Change-Id: I9f42b98e8088267b38d380edfd8b2e737d00414e
diff --git a/src/javax/jmdns/impl/constants/DNSConstants.java b/src/javax/jmdns/impl/constants/DNSConstants.java
index b79400b..2704f94 100644
--- a/src/javax/jmdns/impl/constants/DNSConstants.java
+++ b/src/javax/jmdns/impl/constants/DNSConstants.java
@@ -18,8 +18,8 @@
     public static final int    MDNS_PORT                      = Integer.parseInt(System.getProperty("net.mdns.port", "5353"));
     public static final int    DNS_PORT                       = 53;
 
-    // DNS Records Expiration Time in Seconds
-    public static final int    DNS_TTL                        = 25;
+    // One hour expiration time 
+    public static final int    DNS_TTL                        = 60 * 60;
 
     public static final int    MAX_MSG_TYPICAL                = 1460;
     public static final int    MAX_MSG_ABSOLUTE               = 8972;
diff --git a/src/javax/jmdns/impl/tasks/state/Renewer.java b/src/javax/jmdns/impl/tasks/state/Renewer.java
index 1c638d4..f79ee12 100644
--- a/src/javax/jmdns/impl/tasks/state/Renewer.java
+++ b/src/javax/jmdns/impl/tasks/state/Renewer.java
@@ -54,7 +54,10 @@
     @Override
     public void start(Timer timer) {
         if (!this.getDns().isCanceling() && !this.getDns().isCanceled()) {
-            timer.schedule(this, DNSConstants.ANNOUNCED_RENEWAL_TTL_INTERVAL, DNSConstants.ANNOUNCED_RENEWAL_TTL_INTERVAL);
+            // BEGIN android-changed
+            // Schedule the renewer based on this task's TTL, not the default TTL
+            timer.schedule(this, getTTL() * 500, getTTL() * 500);
+            // END android-changed
         }
     }