diff options
author | Xin Li <delphij@google.com> | 2024-03-06 09:30:07 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2024-03-06 09:30:07 -0800 |
commit | 028f5095d22e28004edea6d8c0fed14cd8c6c734 (patch) | |
tree | b4b9acc75645543a9057d9412c120e09d56fa96e /Settings/src/com/android/tv/settings/system/EnterRestrictedProfileActivity.java | |
parent | 700112962b78e8ee6da11342e0a92aec22f7f44b (diff) | |
parent | 292709ed7403bbdced2dd372c475e4d18c05af74 (diff) | |
download | TvSettings-028f5095d22e28004edea6d8c0fed14cd8c6c734.tar.gz |
Merge Android 14 QPR2 to AOSP main
Bug: 319669529
Merged-In: I61279887ebfa34db0ebedb46c7c363a117c9094b
Change-Id: Ib92c445a5fd91a803a7de536c90d26b4418be967
Diffstat (limited to 'Settings/src/com/android/tv/settings/system/EnterRestrictedProfileActivity.java')
-rw-r--r-- | Settings/src/com/android/tv/settings/system/EnterRestrictedProfileActivity.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Settings/src/com/android/tv/settings/system/EnterRestrictedProfileActivity.java b/Settings/src/com/android/tv/settings/system/EnterRestrictedProfileActivity.java new file mode 100644 index 000000000..6587b6b64 --- /dev/null +++ b/Settings/src/com/android/tv/settings/system/EnterRestrictedProfileActivity.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2023 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.tv.settings.system; + +import static com.android.tv.settings.overlay.FlavorUtils.FLAVOR_CLASSIC; + +import android.os.Bundle; + +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; + +import com.android.tv.settings.TvSettingsActivity; + +/** + * A subset of security settings to enter a restricted profile. + */ +public class EnterRestrictedProfileActivity extends TvSettingsActivity { + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + getWindow().setDimAmount(0f); + } + + @Override + protected Fragment createSettingsFragment() { + return com.android.tv.settings.overlay.FlavorUtils.getFeatureFactory(this) + .getSettingsFragmentProvider() + .newSettingsFragment(EnterRestrictedProfileFragment.class.getName(), null); + } + + @Override + protected int getAvailableFlavors() { + return FLAVOR_CLASSIC; + } +} |