src/xyz/kumaraswamy/autostart/Autostart.java
/**
     * Finds the method of the MIUI clazz
     *
     * @return returns the method, is null
     * if method is not found
     */
Finds the method of the MIUI clazz
@return returns the method, is null
if method is not found
Finds the method of the MIUI clazz @return returns the method is null if method is not found
private @Nullable Method findMethod(final Class<?> clazz) {
        final String methodName = "getApplicationAutoStart";
        try {
            final Method method = clazz.getDeclaredMethod("getApplicationAutoStart",
                    Context.class, String.class);
            method.setAccessible(true);
            return method;
        } catch (NoSuchMethodException e) {
            for (Method method : clazz.getDeclaredMethods()) {
                if (method.getName().equals(methodName)) {
                    Log.i(TAG, "Found a new method matching method name");
                }
            }
            return null;
        }
    }
private @ Nullable Method findMethod ( final Class < ? > clazz ) { final String methodName = "getApplicationAutoStart" ; try { final Method method = clazz . getDeclaredMethod ( "getApplicationAutoStart" , Context . class , String . class ) ; method . setAccessible ( true ) ; return method ; } catch ( NoSuchMethodException e ) { for ( Method method : clazz . getDeclaredMethods ( ) ) { if ( method . getName ( ) . equals ( methodName ) ) { Log . i ( TAG , "Found a new method matching method name" ) ; } } return null ; } }
Finds the method of the MIUI clazz
 @return returns the method, is null
 if method is not found
Finds the method of the MIUI clazz @return returns the method is null if method is not found
// we could not find the method name // we were near to get the autostart