Loading packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java +18 −20 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.app.ActivityManager.TaskDescription; import android.annotation.ColorInt; import android.annotation.UserIdInt; import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.KeyguardManager; import android.app.PendingIntent; Loading @@ -32,9 +31,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.graphics.Color; import android.os.Bundle; import android.os.RemoteException; import android.os.UserHandle; import android.util.Log; import android.view.View; import com.android.internal.annotations.VisibleForTesting; Loading @@ -57,6 +54,8 @@ public class WorkLockActivity extends Activity { static final String EXTRA_TASK_DESCRIPTION = "com.android.systemui.keyguard.extra.TASK_DESCRIPTION"; private static final int REQUEST_CODE_CONFIRM_CREDENTIALS = 1; /** * Cached keyguard manager instance populated by {@link #getKeyguardManager}. * @see KeyguardManager Loading Loading @@ -111,7 +110,6 @@ public class WorkLockActivity extends Activity { @Override public void onBackPressed() { // Ignore back presses. return; } @Override Loading Loading @@ -151,26 +149,26 @@ public class WorkLockActivity extends Activity { PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, options.toBundle()); if (target != null) { credential.putExtra(Intent.EXTRA_INTENT, target.getIntentSender()); try { ActivityManager.getService().startConfirmDeviceCredentialIntent(credential, getChallengeOptions().toBundle()); } catch (RemoteException e) { Log.e(TAG, "Failed to start confirm credential intent", e); } startActivityForResult(credential, REQUEST_CODE_CONFIRM_CREDENTIALS); } private ActivityOptions getChallengeOptions() { // If we are taking up the whole screen, just use the default animation of clipping the // credentials activity into the entire foreground. if (!isInMultiWindowMode()) { return ActivityOptions.makeBasic(); @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_CONFIRM_CREDENTIALS && resultCode != RESULT_OK) { // The user dismissed the challenge, don't show it again. goToHomeScreen(); } } // Otherwise, animate the transition from this part of the screen to fullscreen // using our own decor as the starting position. final View view = getWindow().getDecorView(); return ActivityOptions.makeScaleUpAnimation(view, 0, 0, view.getWidth(), view.getHeight()); private void goToHomeScreen() { final Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME); homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(homeIntent); } private KeyguardManager getKeyguardManager() { Loading services/core/java/com/android/server/wm/ActivityStartInterceptor.java +0 −7 Original line number Diff line number Diff line Loading @@ -280,13 +280,6 @@ class ActivityStartInterceptor { mActivityOptions = ActivityOptions.makeBasic(); } ActivityRecord homeActivityRecord = mRootActivityContainer.getDefaultDisplayHomeActivity(); if (homeActivityRecord != null && homeActivityRecord.getTaskRecord() != null) { // Showing credential confirmation activity in home task to avoid stopping // multi-windowed mode after showing the full-screen credential confirmation activity. mActivityOptions.setLaunchTaskId(homeActivityRecord.getTaskRecord().taskId); } final UserInfo parent = mUserManager.getProfileParent(mUserId); mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id, 0, mRealCallingUid); mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/); Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +2 −9 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECOND import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static android.content.Intent.FLAG_ACTIVITY_TASK_ON_HOME; import static android.content.pm.ApplicationInfo.FLAG_FACTORY_TEST; import static android.content.pm.ConfigurationInfo.GL_ES_VERSION_UNDEFINED; import static android.content.pm.PackageManager.FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS; Loading Loading @@ -6892,15 +6891,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { synchronized (mGlobalLock) { final long ident = Binder.clearCallingIdentity(); try { intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | FLAG_ACTIVITY_TASK_ON_HOME); ActivityOptions activityOptions = options != null intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); final ActivityOptions activityOptions = options != null ? new ActivityOptions(options) : ActivityOptions.makeBasic(); final ActivityRecord homeActivity = mRootActivityContainer.getDefaultDisplayHomeActivity(); if (homeActivity != null) { activityOptions.setLaunchTaskId(homeActivity.getTaskRecord().taskId); } mContext.startActivityAsUser(intent, activityOptions.toBundle(), UserHandle.CURRENT); } finally { Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java +18 −20 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.app.ActivityManager.TaskDescription; import android.annotation.ColorInt; import android.annotation.UserIdInt; import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.KeyguardManager; import android.app.PendingIntent; Loading @@ -32,9 +31,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.graphics.Color; import android.os.Bundle; import android.os.RemoteException; import android.os.UserHandle; import android.util.Log; import android.view.View; import com.android.internal.annotations.VisibleForTesting; Loading @@ -57,6 +54,8 @@ public class WorkLockActivity extends Activity { static final String EXTRA_TASK_DESCRIPTION = "com.android.systemui.keyguard.extra.TASK_DESCRIPTION"; private static final int REQUEST_CODE_CONFIRM_CREDENTIALS = 1; /** * Cached keyguard manager instance populated by {@link #getKeyguardManager}. * @see KeyguardManager Loading Loading @@ -111,7 +110,6 @@ public class WorkLockActivity extends Activity { @Override public void onBackPressed() { // Ignore back presses. return; } @Override Loading Loading @@ -151,26 +149,26 @@ public class WorkLockActivity extends Activity { PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, options.toBundle()); if (target != null) { credential.putExtra(Intent.EXTRA_INTENT, target.getIntentSender()); try { ActivityManager.getService().startConfirmDeviceCredentialIntent(credential, getChallengeOptions().toBundle()); } catch (RemoteException e) { Log.e(TAG, "Failed to start confirm credential intent", e); } startActivityForResult(credential, REQUEST_CODE_CONFIRM_CREDENTIALS); } private ActivityOptions getChallengeOptions() { // If we are taking up the whole screen, just use the default animation of clipping the // credentials activity into the entire foreground. if (!isInMultiWindowMode()) { return ActivityOptions.makeBasic(); @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_CONFIRM_CREDENTIALS && resultCode != RESULT_OK) { // The user dismissed the challenge, don't show it again. goToHomeScreen(); } } // Otherwise, animate the transition from this part of the screen to fullscreen // using our own decor as the starting position. final View view = getWindow().getDecorView(); return ActivityOptions.makeScaleUpAnimation(view, 0, 0, view.getWidth(), view.getHeight()); private void goToHomeScreen() { final Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME); homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(homeIntent); } private KeyguardManager getKeyguardManager() { Loading
services/core/java/com/android/server/wm/ActivityStartInterceptor.java +0 −7 Original line number Diff line number Diff line Loading @@ -280,13 +280,6 @@ class ActivityStartInterceptor { mActivityOptions = ActivityOptions.makeBasic(); } ActivityRecord homeActivityRecord = mRootActivityContainer.getDefaultDisplayHomeActivity(); if (homeActivityRecord != null && homeActivityRecord.getTaskRecord() != null) { // Showing credential confirmation activity in home task to avoid stopping // multi-windowed mode after showing the full-screen credential confirmation activity. mActivityOptions.setLaunchTaskId(homeActivityRecord.getTaskRecord().taskId); } final UserInfo parent = mUserManager.getProfileParent(mUserId); mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id, 0, mRealCallingUid); mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/); Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +2 −9 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECOND import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static android.content.Intent.FLAG_ACTIVITY_TASK_ON_HOME; import static android.content.pm.ApplicationInfo.FLAG_FACTORY_TEST; import static android.content.pm.ConfigurationInfo.GL_ES_VERSION_UNDEFINED; import static android.content.pm.PackageManager.FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS; Loading Loading @@ -6892,15 +6891,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { synchronized (mGlobalLock) { final long ident = Binder.clearCallingIdentity(); try { intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | FLAG_ACTIVITY_TASK_ON_HOME); ActivityOptions activityOptions = options != null intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); final ActivityOptions activityOptions = options != null ? new ActivityOptions(options) : ActivityOptions.makeBasic(); final ActivityRecord homeActivity = mRootActivityContainer.getDefaultDisplayHomeActivity(); if (homeActivity != null) { activityOptions.setLaunchTaskId(homeActivity.getTaskRecord().taskId); } mContext.startActivityAsUser(intent, activityOptions.toBundle(), UserHandle.CURRENT); } finally { Loading