title: how can i disconnect a activity from the application
body: <p>In code, Calling an activity(lock Screen) from a service class(background service). Here finish is not used because we're not supposed to close it. From that activity(lock screen) android package is called using Intent. Here activity(lock screen) is finished and package app starts now when back button is pressed, it moves back to the application. How can I make lock screen a separate activity so it is no more connected to the application so that on pressing back button control don't navigate to the application instead of closing and moving to locker app it navigates to the home screen</p>
  
  <p>this is how lock screen is called </p>
  
  <pre><code> Intent lockIntent = new Intent(mContext, LockScreen.class);
   lockIntent.putExtra("name", pass);
   lockIntent.putExtra("pack", printForegroundTask());
   lockIntent.putExtra("app", "an Application");
   lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
   mContext.startActivity(lockIntent);
  
  </code></pre>
  
  <p>from lock screen android package is intended</p>
  
  <pre><code>if (v1.equals(t1.getText().toString())) {
                      Intent launchIntent = getPackageManager().getLaunchIntentForPackage(v2);
                      launchIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
                      new SendNotification("Unlocked " + v3);  
                      startActivity(launchIntent);
                      Toast.makeText(LockScreen.this, "Master Code Correct", Toast.LENGTH_LONG).show();
                      finish();
  
                  } else {
                      Toast.makeText(LockScreen.this, "Wrong Master Code", Toast.LENGTH_LONG).show();
                      t1.setText("");
                  }
  </code></pre>