1 /*
2  * Copyright (C) 2018 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  */
16 
17 package android.os.strictmode;
18 
19 import android.content.Context;
20 
21 /**
22  * Subclass of {@code Violation} that is used when a process accesses filesystem
23  * paths stored in credential protected storage areas while the user is locked.
24  * <p>
25  * When a user is locked, credential protected storage is unavailable, and files
26  * stored in these locations appear to not exist, which can result in subtle app
27  * bugs if they assume default behaviors or empty states. Instead, apps should
28  * store data needed while a user is locked under device protected storage
29  * areas.
30  *
31  * @see Context#createDeviceProtectedStorageContext()
32  */
33 public final class CredentialProtectedWhileLockedViolation extends Violation {
34     /** @hide */
CredentialProtectedWhileLockedViolation(String message)35     public CredentialProtectedWhileLockedViolation(String message) {
36         super(message);
37     }
38 }
39