public static boolean isTopApplication ( Context context ) { ComponentName activity = getTopActivity ( context ) ; if ( activity == null ) { return false ; } return activity . getPackageName ( ) . equals ( context . getApplicationInfo ( ) . packageName ) ; }
Determines if this application is top activity