Add NetworkRequestDialogActivity

Framwork will call this activity to start network requesting process.
This activity is simple activity contained NetworkRequestDialogFragment
and any other dialog generated in this process, aka
NetworkRequestTimeoutDialog.

Bug: 117399926
Test: RunSettingsRoboTests
Change-Id: Ib1df28d12427ed3bd7d4b88ec10e52357564c797
This commit is contained in:
cosmohsieh
2018-11-26 11:58:02 +08:00
parent 5948259702
commit da37bb7df7
4 changed files with 345 additions and 226 deletions

View File

@@ -0,0 +1,38 @@
/*
* Copyright (C) 2018 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.wifi;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
/**
* When other applications request to have a wifi connection, framework will bring up this activity
* to let user select which wifi ap wanna to connect. This activity is just a door for framework
* call, and main functional process is at {@code NetworkRequestDialogFragment}.
*/
public class NetworkRequestDialogActivity extends FragmentActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final NetworkRequestDialogFragment fragment = NetworkRequestDialogFragment.newInstance();
fragment.show(getSupportFragmentManager(), "NetworkRequestDialogFragment");
}
}