Attempt to fix selector memeory leak. Add update checker
This commit is contained in:
22
common/src/main/java/com/stardust/util/DeveloperUtils.java
Normal file
22
common/src/main/java/com/stardust/util/DeveloperUtils.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user