• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 androidx.lifecycle;
18 
19 import android.content.ContentProvider;
20 import android.content.ContentValues;
21 import android.database.Cursor;
22 import android.net.Uri;
23 
24 import androidx.annotation.NonNull;
25 import androidx.annotation.Nullable;
26 import androidx.annotation.RestrictTo;
27 
28 /**
29  * Internal class to initialize Lifecycles.
30  * @hide
31  */
32 @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
33 public class ProcessLifecycleOwnerInitializer extends ContentProvider {
34     @Override
onCreate()35     public boolean onCreate() {
36         LifecycleDispatcher.init(getContext());
37         ProcessLifecycleOwner.init(getContext());
38         return true;
39     }
40 
41     @Nullable
42     @Override
query(@onNull Uri uri, String[] strings, String s, String[] strings1, String s1)43     public Cursor query(@NonNull Uri uri, String[] strings, String s, String[] strings1,
44             String s1) {
45         return null;
46     }
47 
48     @Nullable
49     @Override
getType(@onNull Uri uri)50     public String getType(@NonNull Uri uri) {
51         return null;
52     }
53 
54     @Nullable
55     @Override
insert(@onNull Uri uri, ContentValues contentValues)56     public Uri insert(@NonNull Uri uri, ContentValues contentValues) {
57         return null;
58     }
59 
60     @Override
delete(@onNull Uri uri, String s, String[] strings)61     public int delete(@NonNull Uri uri, String s, String[] strings) {
62         return 0;
63     }
64 
65     @Override
update(@onNull Uri uri, ContentValues contentValues, String s, String[] strings)66     public int update(@NonNull Uri uri, ContentValues contentValues, String s, String[] strings) {
67         return 0;
68     }
69 }
70