1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.settings.privatespace.delete; 18 19 import android.app.settings.SettingsEnums; 20 import android.os.Bundle; 21 22 import androidx.navigation.fragment.NavHostFragment; 23 24 import com.android.settings.R; 25 import com.android.settings.SetupWizardUtils; 26 import com.android.settings.core.InstrumentedActivity; 27 28 import com.google.android.setupdesign.util.ThemeHelper; 29 30 public class PrivateSpaceDeleteActivity extends InstrumentedActivity { 31 @Override getMetricsCategory()32 public int getMetricsCategory() { 33 return SettingsEnums.PRIVATE_SPACE_SETTINGS; 34 } 35 36 @Override onCreate(Bundle savedInstanceState)37 protected void onCreate(Bundle savedInstanceState) { 38 if (!android.os.Flags.allowPrivateProfile() 39 || !android.multiuser.Flags.enablePrivateSpaceFeatures()) { 40 return; 41 } 42 setTheme(SetupWizardUtils.getTheme(this, getIntent())); 43 ThemeHelper.trySetDynamicColor(this); 44 super.onCreate(savedInstanceState); 45 setContentView(R.layout.privatespace_setup_root); 46 NavHostFragment navHostFragment = 47 (NavHostFragment) 48 getSupportFragmentManager().findFragmentById(R.id.ps_nav_host_fragment); 49 navHostFragment.getNavController().setGraph(R.navigation.private_space_delete_nav); 50 } 51 } 52