示例#1
0
 public void testUpdate() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   CryptInfo ci = service.find(10);
   ci.setHashid(ci.hashCode());
   ci.setFilename("hello.jpg");
   ci.setFilepath("hi");
   ci.setDestpath("happy");
   service.update(ci);
   Log.i(tag, ci.toString());
 }
示例#2
0
 public void testSave() throws Exception {
   PrivacyCalcSQLite service = new PrivacyCalcSQLite(this.getContext());
   for (int i = 3; i < 4; i++) {
     CryptInfo ci = new CryptInfo();
     //			Log.i(tag,ci.getFilename()+" "+ci.getHashid());
     ci.setHashid(ci.hashCode() + (i * i * i));
     ci.setFilepath("");
     ci.setFilename("hello.jpg");
     ci.setFilesize(15);
     ci.setFiletype("jpg");
     ci.setMove(false);
     ci.setDestpath("");
     ci.setCryptdate(ci.getCryptdate().toString());
     Log.i(tag, ci.getFiletype() + " " + ci.getHashid());
     service.save(ci);
   }
 }