1/*
2 * Copyright (C) 2016 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 */
16package com.android.managedprovisioning.e2eui;
17
18import android.app.Activity;
19import android.app.admin.DevicePolicyManager;
20import android.content.Context;
21import android.os.Bundle;
22
23public class DpcPostProvisioningActivity extends Activity {
24    @Override
25    protected void onCreate(Bundle savedInstanceState) {
26        super.onCreate(savedInstanceState);
27        DevicePolicyManager dpm =
28                (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
29        // Verify that managed profile has been successfully created.
30        boolean testResult = E2eUiTestUtils.verifyProfile(this, getIntent(), dpm);
31        // Informs the result to provisioning result listener.
32        E2eUiTestUtils.sendResult(ProvisioningResultListener.ACTION_PROVISION_RESULT_INTENT,
33                this, testResult);
34        finish();
35    }
36}
37