question: public static boolean isNetworkChanged ( Context context , String prevConnectivityType , String mPrevConnectionSubType ) { String connectivityType = getNetworkType ( context ) ; String connectivitySubType = getNetworkSubType ( context ) ; if ( null == prevConnectivityType ) { return false ; } else if ( ! prevConnectivityType . equals ( connectivityType ) ) { return true ; } else if ( ! mPrevConnectionSubType . equals ( connectivitySubType ) ) { return true ; } return false ; }
target:  Check if network connection has changed