public org.domokit.sky.shell.SkyMain.ensureInitialized()

It's useful to be able to call org.domokit.sky.shell.SkyMain.ensureInitialized() when implementing custom Android Activities. This commit makes ensureInitialized() public for this purpose.

Unrelated changes:
Added curly braces to pass PRESUBMIT check.
Add Lex Berezhny <lex@damoti.com> to AUTHORS file in order to be able to commit fixes (and pass PRESUBMIT check).

Patch by Lex Berezhny <lex@damoti.com>.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1135953004
This commit is contained in:
Adam Barth 2015-05-16 13:57:23 -07:00
parent 5b60d0a358
commit e8d8c1aaa8

View File

@ -25,9 +25,10 @@ public class SkyMain {
/** /**
* Initializes the native system. * Initializes the native system.
**/ **/
static void ensureInitialized(Context applicationContext) { public static void ensureInitialized(Context applicationContext) {
if (sInitialized) if (sInitialized) {
return; return;
}
try { try {
ResourceExtractor resourceExtractor = ResourceExtractor.get(applicationContext); ResourceExtractor resourceExtractor = ResourceExtractor.get(applicationContext);
resourceExtractor.startExtractingResources(); resourceExtractor.startExtractingResources();