-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This diff adds `Observer` interface, and `ObserverHolder`, a static holder for an array of `Observer`s that dispatches calls to all of the `Obsever`s in the array. SoLoader uses `ObserverHolder` to notify all `Observer`s of library loading progress. Reviewed By: adicatana, danjin250 Differential Revision: D48040740 fbshipit-source-id: 8963a48749670504d71f894436dab6e9728cd4d8
- Loading branch information
1 parent
87947ff
commit ad4dcc1
Showing
5 changed files
with
291 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* 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.facebook.soloader.observer; | ||
|
||
import com.facebook.soloader.SoSource; | ||
import com.facebook.soloader.recovery.RecoveryStrategy; | ||
import javax.annotation.Nullable; | ||
|
||
public interface Observer { | ||
void onLoadLibraryStart(String library, int flags); | ||
|
||
void onLoadLibraryEnd(@Nullable Throwable t); | ||
|
||
void onLoadDependencyStart(String library, int flags); | ||
|
||
void onLoadDependencyEnd(@Nullable Throwable t); | ||
|
||
void onSoSourceLoadLibraryStart(SoSource source); | ||
|
||
void onSoSourceLoadLibraryEnd(@Nullable Throwable t); | ||
|
||
void onRecoveryStart(RecoveryStrategy recovery); | ||
|
||
void onRecoveryEnd(@Nullable Throwable t); | ||
|
||
void onGetDependenciesStart(); | ||
|
||
void onGetDependenciesEnd(@Nullable Throwable t); | ||
} |
Oops, something went wrong.