/* * Copyright (C) 2018 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 dalvik.system; import java.util.Objects; import java.util.TimeZone; import java.util.function.Supplier; /** * Provides lifecycle methods and other hooks for an Android runtime "container" to call into the * runtime and core libraries during initialization. For example, from * {@link com.android.internal.os.RuntimeInit}. * *
Having a facade class helps to limit the container's knowledge of runtime and core libraries
* internal details. All methods assume the container initialization is single threaded.
*
* @hide
*/
@libcore.api.CorePlatformApi
public final class RuntimeHooks {
private static Supplier This method also clears the current {@link TimeZone} default ensuring that the supplier
* will be used next time {@link TimeZone#getDefault()} is called (unless
* {@link TimeZone#setDefault(TimeZone)} is called with a non-null value in the interim).
*
* Once set the supplier cannot be changed.
*/
@libcore.api.CorePlatformApi
public static void setTimeZoneIdSupplier(Supplier