Error while creating extension

Hello Developers,
I have written a java code to find out whether wifi or data is connected in my device . The code is:
@SimpleFunction(description="Which one is connected data or wifi")
public String IsDataOrWifi(){

	  ConnectivityManager cm = (ConnectivityManager) this.context.getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo info = cm.getActiveNetworkInfo();
    return info.getTypeName();

My Imports are:
import android.content.Context;

@SimpleObject(external = true)
public class NetworkInfo extends AndroidNonvisibleComponent {
    private ComponentContainer container;
    private final Context context;

 * @param container container, component will be placed in
public NetworkInfo(ComponentContainer container) {
    this.container = container;
    this.context = container.$context();

But the error is coming something like this:
[mkdir] Created dir: %SERVER_WORKSPACE%/appinventor/components/build/classes/AndroidRuntime
[javac] Compiling 266 source files to %SERVER_WORKSPACE%/appinventor/components/build/classes/AndroidRuntime
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] %SERVER_WORKSPACE%/appinventor/components/src/test/networkinfo/ error: NetworkInfo is already defined in this compilation unit
[javac] import;
[javac] ^
[javac] %SERVER_WORKSPACE%/appinventor/components/src/test/networkinfo/ error: incompatible types: cannot be converted to test.networkinfo.NetworkInfo
[javac] NetworkInfo info = cm.getActiveNetworkInfo();
[javac] ^
[javac] %SERVER_WORKSPACE%/appinventor/components/src/test/networkinfo/ error: cannot find symbol
[javac] return info.getTypeName();
[javac] ^
[javac] symbol: method getTypeName()
[javac] location: variable info of type NetworkInfo
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 3 errors
[javac] 1 warning


%SERVER_WORKSPACE%/appinventor/build.xml:42: The following error occurred while executing this line:
%SERVER_WORKSPACE%/appinventor/components/build.xml:193: The following error occurred while executing this line:
%SERVER_WORKSPACE%/appinventor/build-common.xml:125: Compile failed; see the compiler error output for details.

Total time: 8 seconds

Rename your class.

Thank you @vknow360 .
This is for you :

Check This

:heart: :heart: :+1: :+1: