Esempio n. 1
0
 @Override
 protected String doInBackground(PackageInfo... params) {
   Log.i(TAG, "doInBackground params[0]=" + params[0]);
   Aplugin aplugin = Aplugin.getInsance();
   PluginContainer container = aplugin.getPluginContainer(params[0].getContainer());
   if (container != null) {
     PluginInfo pluginInfo =
         aplugin.getPluginManager().installPlugin(params[0], container, this);
     if (pluginInfo == null) {
       // installed failed
       return "install failed";
     } else {
       return "install succeed";
     }
   }
   return null;
 }
Esempio n. 2
0
      @Override
      protected String doInBackground(PackageInfo... params) {
        Aplugin aplugin = Aplugin.getInsance();
        PluginContainer container = aplugin.getPluginContainer(params[0].getContainer());
        PluginInfo pluginInfo =
            (PluginInfo) container.doFindPluginInfo(params[0].getClassName(), false);
        if (container != null && pluginInfo != null) {
          boolean succeed = aplugin.getPluginManager().uninstallPlugin(pluginInfo, container);
          if (!succeed) {
            // uninstalled failed
            return "uninstall failed";
          } else {
            return "uninstall succeed";
          }
        }

        return null;
      }