| | |
| | | synchronized (Upgrade.class) { |
| | | if (instance == null) { |
| | | instance = new Upgrade(context); |
| | | instance.context = context; |
| | | } |
| | | } |
| | | } |
| | |
| | | handlerCheckNewVersion.postDelayed(runnableCheckNewVersion, 100); |
| | | } |
| | | |
| | | public void ManualUpgrade(String path) { |
| | | installUtil.InstallAppNormal(context, path); |
| | | } |
| | | |
| | | class DMCB implements DownloadManagerCallback { |
| | | @Override |
| | | public void DownloadComplete(String title, String path) { |
| | |
| | | Signature[] sig2 = installUtil.getSignature(path); |
| | | |
| | | if (sig != null && sig2 != null && installUtil.getFingerprint(sig[0], "SHA-1").equals(installUtil.getFingerprint(sig2[0], "SHA-1"))) { |
| | | installUtil.InstallApp(path); |
| | | if (RemoteService.mAyDevice) { |
| | | installUtil.InstallApp(path); |
| | | } else { |
| | | installUtil.InstallAppNormal(context, path); |
| | | } |
| | | } |
| | | } |
| | | } |