OSDN Git Service

IpConfigStore: New constructor to accept writer
authorRoshan Pius <rpius@google.com>
Tue, 23 Feb 2016 01:06:47 +0000 (17:06 -0800)
committerRoshan Pius <rpius@google.com>
Tue, 23 Feb 2016 01:13:47 +0000 (17:13 -0800)
Add a new constructor to accept a DelayeDiskWrite object from the
caller.

BUG: 27293150
Change-Id: I13fb86c76ee5a0d05b45fec0c42b7e1b2233ee76
TEST: `runtest frameworks-wifi`

services/core/java/com/android/server/net/IpConfigStore.java

index 90e26d8..9f1435a 100644 (file)
@@ -59,8 +59,12 @@ public class IpConfigStore {
 
     protected static final int IPCONFIG_FILE_VERSION = 2;
 
+    public IpConfigStore(DelayedDiskWrite writer) {
+        mWriter = writer;
+    }
+
     public IpConfigStore() {
-        mWriter = new DelayedDiskWrite();
+        this(new DelayedDiskWrite());
     }
 
     private boolean writeConfig(DataOutputStream out, int configKey,