Example #1
0
 /**
  * 将证书信息保存到数据库中
  *
  * @return
  */
 public static void saveCer(String packageName, CerInfor cerInfor) {
   DBUtil.operSvec(
       packageName,
       cerInfor.getSection(),
       Utils.getDiffDay(Utils.getStrSystemTime("1"), cerInfor.getExpiration()),
       10000,
       cerInfor.getSectSrc(),
       sdb,
       dbHelper);
 }
Example #2
0
 public static void sendBroadCast(Intent intent, String data, Context context) {
   List<SectionBean> packages = DBUtil.findPackages(data, sdb, dbHelper);
   if (packages != null && packages.size() > 0) {
     for (SectionBean sectionBean : packages) {
       intent.setPackage(sectionBean.getPackageName());
       context.sendBroadcast(intent);
       intent.putExtra("org_name", sectionBean.getOrgName());
       intent.setPackage("net.telesing.tscom");
       context.sendBroadcast(intent);
     }
   } else {
     intent.putExtra("org_name", "未知机构");
     intent.setPackage("net.telesing.tscom");
     context.sendBroadcast(intent);
   }
 }