Not use NEW_TASKS for Wallpaper & style's 2-pane UX

Refine launch mode to support 2-pane UX for Settings.

Bug: 197609643
Test: make RunSettingsRoboTests
Change-Id: I5212bbcf8c512fac571284379a29cf487f387c5a
This commit is contained in:
Kunhung Li
2021-09-30 14:19:18 +08:00
parent 0a942ab338
commit c692af2a76
3 changed files with 66 additions and 8 deletions

View File

@@ -0,0 +1,41 @@
/*
* 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.android.settings.testutils.shadow;
import android.content.Context;
import com.android.settings.activityembedding.ActivityEmbeddingUtils;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
/**
* Shadow class for {@link ActivityEmbeddingUtils} to test embedding activity features.
*/
@Implements(ActivityEmbeddingUtils.class)
public class ShadowActivityEmbeddingUtils {
private static boolean sIsEmbeddingActivityEnabled;
@Implementation
public static boolean isEmbeddingActivityEnabled(Context context) {
return sIsEmbeddingActivityEnabled;
}
public static void setIsEmbeddingActivityEnabled(boolean isEmbeddingActivityEnabled) {
sIsEmbeddingActivityEnabled = isEmbeddingActivityEnabled;
}
}