title: Check if the context is the same as class in intent call
body: <p>Currently i have a method that calls an activity:</p>
  
  <pre><code>  public void startActivity(final Context context, final Class mClass){
  
                      Intent i = new Intent(context, mClass);
                      i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                      mContext.startActivity(i);
          }
  </code></pre>
  
  <p>i need to know if my context and my  class are the same. is that possible?
  i need to do that because i don't want to call a same activity if i'm already in that activity(context).</p>
  
  <p>here is my sample implementation on how i'm currently using the method:</p>
  
  <pre><code>  @Override
          public boolean onNavigationItemSelected(@NonNull MenuItem item) {
              // set item as selected to persist highlight
              //     item.setChecked(false);
              // close drawer when item is tapped
              mDrawerLayout.closeDrawers()
              switch (id) {
                  case R.id.drawer_home:
                      startActivity(mContext,MainActivity.class);
                      break;
                  case R.id.drawer_pay:
                      startActivity(mContext,BillsPaymentActivity.class);
                      break;
                  case R.id.drawer_load:
                      startActivity(mContext,BuyAndSellLoadActivity.class);
                      break;
  
                  default:
                      break;
              }
              return false;
          }
  </code></pre>