-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee24382
commit 5946128
Showing
6 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
core/runtime/android/runtime/src/main/java/org/hapjs/component/ComponentProvider.java
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,20 @@ | ||
/* | ||
* Copyright (c) 2023, the hapjs-platform Project Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.hapjs.component; | ||
|
||
import android.content.Context; | ||
|
||
public interface ComponentProvider { | ||
String NAME = "component"; | ||
|
||
/** | ||
* Android O以下版本Bitmap是否默认RGB565 | ||
* | ||
* @param context | ||
* @return true: Android O以下版本Bitmap默认RGB565 false:Android O以下版本Bitmap默认ARGB8888 | ||
*/ | ||
boolean isDefaultRgb565EnableBelowAndroidO(Context context); | ||
} |
15 changes: 15 additions & 0 deletions
15
...ntime/android/runtime/src/main/java/org/hapjs/component/DefaultComponentProviderImpl.java
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,15 @@ | ||
/* | ||
* Copyright (c) 2023, the hapjs-platform Project Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.hapjs.component; | ||
|
||
import android.content.Context; | ||
|
||
public class DefaultComponentProviderImpl implements ComponentProvider { | ||
@Override | ||
public boolean isDefaultRgb565EnableBelowAndroidO(Context context) { | ||
return true; | ||
} | ||
} |
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