Merge "Adding singleInstancePerTask type activity in IntentPlayground" into sc-dev am: 77261d6571
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/14420656 Change-Id: I6dfd12410505d7f5dabae7d12463f332c771e70d
This commit is contained in:
@@ -30,6 +30,10 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".SingleInstancePerTaskActivity"
|
||||
android:launchMode="singleInstancePerTask"
|
||||
/>
|
||||
<activity
|
||||
android:name=".SingleTopActivity"
|
||||
android:launchMode="singleTop" />
|
||||
|
||||
@@ -288,6 +288,9 @@ class FlagUtils {
|
||||
case ActivityInfo.LAUNCH_SINGLE_TOP:
|
||||
lm += "singleTop";
|
||||
break;
|
||||
case ActivityInfo.LAUNCH_SINGLE_INSTANCE_PER_TASK:
|
||||
lm += "singleInstancePerTask";
|
||||
break;
|
||||
case ActivityInfo.LAUNCH_MULTIPLE:
|
||||
default:
|
||||
lm += "standard";
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.intentplayground;
|
||||
|
||||
/**
|
||||
* An activity with launchMode="singleInstancePerTask" set in AndroidManifest.xml.
|
||||
*/
|
||||
public class SingleInstancePerTaskActivity extends BaseActivity {}
|
||||
Reference in New Issue
Block a user