From 4c0941420e798b7916799cc381191e173564ed05 Mon Sep 17 00:00:00 2001 From: Chen Xu Date: Tue, 26 Nov 2019 13:46:41 -0800 Subject: move encodeException to non-updatable framework/base/telephony/common Bug: 140908357 Test: Build Change-Id: I9be6b41fe4af0eb4eb56debffc020735509dc407 (cherry picked from commit 3a7dfca8db0185ce0683e22c11b7906215a96a51) Merged-in: I9be6b41fe4af0eb4eb56debffc020735509dc407 --- .../internal/telephony/EncodeException.java | 54 ++++++++++++++++++++++ .../internal/telephony/EncodeException.java | 54 ---------------------- 2 files changed, 54 insertions(+), 54 deletions(-) create mode 100644 telephony/common/com/android/internal/telephony/EncodeException.java delete mode 100644 telephony/java/com/android/internal/telephony/EncodeException.java diff --git a/telephony/common/com/android/internal/telephony/EncodeException.java b/telephony/common/com/android/internal/telephony/EncodeException.java new file mode 100644 index 000000000000..cdc853e09895 --- /dev/null +++ b/telephony/common/com/android/internal/telephony/EncodeException.java @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2006 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.internal.telephony; + +import android.annotation.UnsupportedAppUsage; + +/** + * {@hide} + */ +public class EncodeException extends Exception { + + private int mError = ERROR_UNENCODABLE; + + public static final int ERROR_UNENCODABLE = 0; + public static final int ERROR_EXCEED_SIZE = 1; + + public EncodeException() { + super(); + } + + @UnsupportedAppUsage + public EncodeException(String s) { + super(s); + } + + public EncodeException(String s, int error) { + super(s); + mError = error; + } + + @UnsupportedAppUsage + public EncodeException(char c) { + super("Unencodable char: '" + c + "'"); + } + + public int getError() { + return mError; + } +} + diff --git a/telephony/java/com/android/internal/telephony/EncodeException.java b/telephony/java/com/android/internal/telephony/EncodeException.java deleted file mode 100644 index cdc853e09895..000000000000 --- a/telephony/java/com/android/internal/telephony/EncodeException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2006 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.internal.telephony; - -import android.annotation.UnsupportedAppUsage; - -/** - * {@hide} - */ -public class EncodeException extends Exception { - - private int mError = ERROR_UNENCODABLE; - - public static final int ERROR_UNENCODABLE = 0; - public static final int ERROR_EXCEED_SIZE = 1; - - public EncodeException() { - super(); - } - - @UnsupportedAppUsage - public EncodeException(String s) { - super(s); - } - - public EncodeException(String s, int error) { - super(s); - mError = error; - } - - @UnsupportedAppUsage - public EncodeException(char c) { - super("Unencodable char: '" + c + "'"); - } - - public int getError() { - return mError; - } -} - -- cgit v1.2.3-59-g8ed1b