Migrate service-statsd off IoUtils
There's an equivalent public method in FileUtils, so use that one instead for now. Note that the method is deprecated, so there may be reason to move off it altogether. Bug: 146757305 Test: m Change-Id: Ia4f29a255bd02e16c1fa8be331d3e7834a2cefdc
This commit is contained in:
@@ -30,6 +30,7 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Binder;
|
||||
import android.os.Bundle;
|
||||
import android.os.FileUtils;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.IBinder;
|
||||
@@ -47,8 +48,6 @@ import android.util.proto.ProtoOutputStream;
|
||||
|
||||
import com.android.internal.annotations.GuardedBy;
|
||||
|
||||
import libcore.io.IoUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -226,7 +225,7 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
|
||||
Log.d(TAG, "Sent data for " + numRecords + " apps");
|
||||
}
|
||||
} finally {
|
||||
IoUtils.closeQuietly(fout);
|
||||
FileUtils.closeQuietly(fout);
|
||||
backgroundThread.quit();
|
||||
backgroundThread.interrupt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user