squid:S1118 - Utility classes should not have public constructors (#281)

This commit is contained in:
Mohamed Ezzat
2016-04-28 18:45:39 +02:00
committed by inorichi
parent 2e6fc70353
commit 9f546d13c2
7 changed files with 35 additions and 7 deletions
@@ -8,7 +8,11 @@ import android.content.pm.PackageManager;
import timber.log.Timber;
public class AndroidComponentUtil {
public final class AndroidComponentUtil {
private AndroidComponentUtil() throws InstantiationException {
throw new InstantiationException("This class is not for instantiation");
}
public static void toggleComponent(Context context, Class componentClass, boolean enable) {
Timber.i((enable ? "Enabling " : "Disabling ") + componentClass.getSimpleName());