Rename Topic -> Event

This commit is contained in:
topjohnwu
2019-03-23 21:58:42 -04:00
parent a199b0ace1
commit 8ac3aaf36c
16 changed files with 183 additions and 178 deletions
@@ -4,7 +4,7 @@ import android.os.SystemClock;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Event;
import com.topjohnwu.net.Networking;
import com.topjohnwu.net.Request;
import com.topjohnwu.net.ResponseListener;
@@ -104,7 +104,7 @@ public class CheckUpdates {
JSONObject uninstaller = getJson(json, "uninstaller");
Config.uninstallerLink = getString(uninstaller, "link", null);
UiThreadHandler.handler.postAtTime(() -> Topic.publish(Topic.UPDATE_CHECK_DONE),
UiThreadHandler.handler.postAtTime(() -> Event.trigger(Event.UPDATE_CHECK_DONE),
start + 1000 /* Add artificial delay to let UI behave correctly */);
if (cb != null)
@@ -7,8 +7,8 @@ import com.topjohnwu.magisk.App;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.container.Repo;
import com.topjohnwu.magisk.utils.Event;
import com.topjohnwu.magisk.utils.Logger;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking;
import com.topjohnwu.net.Request;
@@ -155,7 +155,7 @@ public class UpdateRepos {
}
public void exec(boolean force) {
Topic.reset(Topic.REPO_LOAD_DONE);
Event.reset(Event.REPO_LOAD_DONE);
App.THREAD_POOL.execute(() -> {
cached = Collections.synchronizedSet(app.repoDB.getRepoIDSet());
moduleQueue = new ConcurrentLinkedQueue<>();
@@ -166,7 +166,7 @@ public class UpdateRepos {
} else if (force) {
fullReload();
}
Topic.publish(Topic.REPO_LOAD_DONE);
Event.trigger(Event.REPO_LOAD_DONE);
});
}