Attempt to fix selector memeory leak. Add update checker

This commit is contained in:
hyb1996
2017-04-09 14:02:57 +08:00
parent 6844eb9841
commit 0e980c2e6a
72 changed files with 1282 additions and 415 deletions

View File

@@ -0,0 +1,22 @@
package com.stardust.util;
import android.support.annotation.Nullable;
/**
* Created by Stardust on 2017/4/5.
*/
public class DeveloperUtils {
private static final String PACKAGE_NAME = "com.stardust.scriptdroid";
public static void ensureRunningPackageNotSelf(@Nullable String runningPackage) {
if (PACKAGE_NAME.equals(runningPackage)) {
throw new SecurityException();
}
}
public static boolean isRunningPackageSelf(@Nullable String runningPackage) {
return PACKAGE_NAME.equals(runningPackage);
}
}