blob: d9e265f9912343a6dd42fa614767b99d1b56f557 [file] [log] [blame]
Maurice Lamecd2b7b2014-12-01 10:41:49 -08001/*
2 * Copyright (C) 2014 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
17package com.android.settings;
18
Maurice Lamecd2b7b2014-12-01 10:41:49 -080019import android.content.Context;
20import android.content.Intent;
Maurice Lamecd2b7b2014-12-01 10:41:49 -080021
22/**
23 * Setup Wizard's version of EncryptionInterstitial screen. It inherits the logic and basic
24 * structure from EncryptionInterstitial class, and should remain similar to that behaviorally. This
25 * class should only overload base methods for minor theme and behavior differences specific to
26 * Setup Wizard. Other changes should be done to EncryptionInterstitial class instead and let this
27 * class inherit those changes.
28 */
Maurice Lam83301b52015-04-18 20:11:59 -070029public class SetupEncryptionInterstitial extends EncryptionInterstitial {
Maurice Lamecd2b7b2014-12-01 10:41:49 -080030
31 public static Intent createStartIntent(Context ctx, int quality,
Udam Sainiedac1362015-12-08 17:28:19 -080032 boolean requirePasswordDefault, Intent unlockMethodIntent) {
Maurice Lamecd2b7b2014-12-01 10:41:49 -080033 Intent startIntent = EncryptionInterstitial.createStartIntent(ctx, quality,
Udam Sainiedac1362015-12-08 17:28:19 -080034 requirePasswordDefault, unlockMethodIntent);
Maurice Lamecd2b7b2014-12-01 10:41:49 -080035 startIntent.setClass(ctx, SetupEncryptionInterstitial.class);
36 startIntent.putExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)
37 .putExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, -1);
38 return startIntent;
39 }
40
41 @Override
42 public Intent getIntent() {
43 Intent modIntent = new Intent(super.getIntent());
44 modIntent.putExtra(EXTRA_SHOW_FRAGMENT,
45 SetupEncryptionInterstitialFragment.class.getName());
46 return modIntent;
47 }
48
49 @Override
50 protected boolean isValidFragment(String fragmentName) {
51 return SetupEncryptionInterstitialFragment.class.getName().equals(fragmentName);
52 }
53
Maurice Lam190ec1c2016-04-22 16:41:18 -070054 public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment {
Maurice Lamecd2b7b2014-12-01 10:41:49 -080055 }
56}