Merge "Fixing FileLogs tests" into ub-launcher3-calgary
This commit is contained in:
+10
-1
@@ -49,7 +49,16 @@
|
||||
<uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" />
|
||||
<uses-permission android:name="com.android.launcher3.permission.WRITE_SETTINGS" />
|
||||
|
||||
<application>
|
||||
<application
|
||||
android:backupAgent="com.android.launcher3.LauncherBackupAgent"
|
||||
android:fullBackupOnly="true"
|
||||
android:fullBackupContent="@xml/backupscheme"
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@mipmap/ic_launcher_home"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="@bool/config_largeHeap"
|
||||
android:restoreAnyVersion="true"
|
||||
android:supportsRtl="true" >
|
||||
|
||||
<!--
|
||||
Main launcher activity. When extending only change the name, and keep all the
|
||||
|
||||
@@ -40,6 +40,15 @@ public final class FileLog {
|
||||
private static File sLogsDirectory = null;
|
||||
|
||||
public static void setDir(File logsDir) {
|
||||
if (ProviderConfig.IS_DOGFOOD_BUILD) {
|
||||
synchronized (DATE_FORMAT) {
|
||||
// If the target directory changes, stop any active thread.
|
||||
if (sHandler != null && !logsDir.equals(sLogsDirectory)) {
|
||||
((HandlerThread) sHandler.getLooper().getThread()).quit();
|
||||
sHandler = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
sLogsDirectory = logsDir;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user