Add VPN settings classes to Settings app.
PATCH SET 2: + Add import com.android.settings.R PATCH SET 3: + Remove @Override interface methods to be compilable by Java 1.5. PATCH SET 4: + Add import android.net.vpn.VpnManager PATCH SET 5: + Add license headers. PATCH SET 6: + Remove Constant.java and move the constants to VpnSettings. + Make AuthenticationActor implement DialogInterface's handlers. + Remove trailing spaces. PATCH SET 7: + Remove default username.
This commit is contained in:
41
src/com/android/settings/vpn/VpnProfileEditor.java
Normal file
41
src/com/android/settings/vpn/VpnProfileEditor.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2007 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.vpn;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.vpn.VpnProfile;
|
||||
import android.preference.PreferenceGroup;
|
||||
|
||||
/**
|
||||
* The interface to set up preferences for editing a {@link VpnProfile}.
|
||||
*/
|
||||
public interface VpnProfileEditor {
|
||||
VpnProfile getProfile();
|
||||
|
||||
/**
|
||||
* Adds the preferences to the panel.
|
||||
*/
|
||||
void loadPreferencesTo(PreferenceGroup subpanel);
|
||||
|
||||
/**
|
||||
* Validates the inputs in the preferences.
|
||||
*
|
||||
* @return an error message that is ready to be displayed in a dialog; or
|
||||
* null if all the inputs are valid
|
||||
*/
|
||||
String validate(Context c);
|
||||
}
|
Reference in New Issue
Block a user