125e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov/* 225e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * Copyright (C) 2015 The Android Open Source Project 325e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * 425e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * Licensed under the Apache License, Version 2.0 (the "License"); 525e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * you may not use this file except in compliance with the License. 625e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * You may obtain a copy of the License at 725e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * 825e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * http://www.apache.org/licenses/LICENSE-2.0 925e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * 1025e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * Unless required by applicable law or agreed to in writing, software 1125e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * distributed under the License is distributed on an "AS IS" BASIS, 1225e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1325e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * See the License for the specific language governing permissions and 1425e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * limitations under the License. 1525e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov */ 1625e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov 1725e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganovpackage android.webkit; 1825e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov 198d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganovimport android.annotation.SystemApi; 208d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov 2125e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov/** 2225e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * Encapsulates information about errors occured during loading of web resources. See 2325e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * {@link WebViewClient#onReceivedError(WebView, WebResourceRequest, WebResourceError) WebViewClient.onReceivedError(WebView, WebResourceRequest, WebResourceError)} 2425e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov */ 2525e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganovpublic abstract class WebResourceError { 2625e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov /** 2725e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * Gets the error code of the error. The code corresponds to one 2825e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * of the ERROR_* constants in {@link WebViewClient}. 2925e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * 3025e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * @return The error code of the error 3125e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov */ 3225e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov public abstract int getErrorCode(); 3325e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov 3425e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov /** 3525e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * Gets the string describing the error. Descriptions are localized, 3625e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * and thus can be used for communicating the problem to the user. 3725e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * 3825e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov * @return The description of the error 3925e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov */ 4098fe09cba08f39906d632119352b14d0339fff01Selim Gurun public abstract CharSequence getDescription(); 418d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov 428d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov /** 438d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov * This class can not be subclassed by applications. 448d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov * @hide 458d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov */ 468d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov @SystemApi 478d4f07f8d377fc1888879d3ef84c084d3bc5fb5dMikhail Naganov public WebResourceError() {} 4825e89545736d62c59d19dd9b9587f7b0cbbee068Mikhail Naganov} 49