コード例 #1
0
 public DispatcherManager(Context context) {
   a = new HashMap();
   b = new ObjectBuilder();
   c = new EventReader();
   d = new PolicyHelper();
   e = context;
   b.registerClass(com / xiaomi / miui / analyticstracker / service / XiaomiDispatcher, "xiaomi");
 }
コード例 #2
0
  public void switchDispatcher(Map map) {
    a.clear();
    if (map != null) {
      for (Iterator iterator = map.keySet().iterator(); iterator.hasNext(); ) {
        String s = (String) iterator.next();
        Dispatchable dispatchable = (Dispatchable) b.buildObject(s);
        if (dispatchable == null) {
          Log.d("DispatcherManager", String.format("server:%s does not exist", new Object[] {s}));
        } else {
          a.put(dispatchable, map.get(s));
        }
      }

      if (map.size() > 0) {
        Event.setDispatcher(new ArrayList(a.keySet()));
      }
    }
  }