mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1012462 - Part 6: Change Distribution.init() to return an instance (r=rnewman)
This commit is contained in:
parent
7bb6ac291a
commit
ac575fe3cf
@ -181,7 +181,7 @@ public class Distribution {
|
||||
}
|
||||
}
|
||||
|
||||
private static void init(final Distribution distribution) {
|
||||
private static Distribution init(final Distribution distribution) {
|
||||
// Read/write preferences and files on the background thread.
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
@ -192,6 +192,8 @@ public class Distribution {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return distribution;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -201,8 +203,8 @@ public class Distribution {
|
||||
* @param packagePath where to look for the distribution directory.
|
||||
*/
|
||||
@RobocopTarget
|
||||
public static void init(final Context context, final String packagePath, final String prefsPath) {
|
||||
init(new Distribution(context, packagePath, prefsPath));
|
||||
public static Distribution init(final Context context, final String packagePath, final String prefsPath) {
|
||||
return init(new Distribution(context, packagePath, prefsPath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,8 +212,8 @@ public class Distribution {
|
||||
* package path. Reuses the existing Distribution if one exists.
|
||||
*/
|
||||
@RobocopTarget
|
||||
public static void init(final Context context) {
|
||||
Distribution.init(Distribution.getInstance(context));
|
||||
public static Distribution init(final Context context) {
|
||||
return init(Distribution.getInstance(context));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user