Skip to content

Commit 45078d0

Browse files
Fix compilation error in AndroidImplementation.
Corrected the placement of `notifyPushCompletion()` in `AndroidImplementation.java` to resolve the "java.lang.Override is not a repeatable annotation type" error caused by improper nesting with `notifyCommandBehavior`. This completes the cross-platform push completion support feature, which is OPT-IN via the `delayPushCompletion` build hint. If the hint is present and true: - Android: Acquires a `PARTIAL_WAKE_LOCK` upon receiving a push, releasing it only when `notifyPushCompletion()` is called. - iOS: Delays firing the system completion handler until `notifyPushCompletion()` is called. Builders have been updated to inject the necessary permissions and runtime properties. Developer guide documentation has been updated.
1 parent 3dd7497 commit 45078d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2797,7 +2797,6 @@ public void exitApplication() {
27972797
android.os.Process.killProcess(android.os.Process.myPid());
27982798
}
27992799

2800-
@Override
28012800
@Override
28022801
public void notifyPushCompletion() {
28032802
if (pushWakeLock != null && pushWakeLock.isHeld()) {
@@ -2809,6 +2808,7 @@ public void notifyPushCompletion() {
28092808
}
28102809
}
28112810

2811+
@Override
28122812
public void notifyCommandBehavior(int commandBehavior) {
28132813
if (commandBehavior == Display.COMMAND_BEHAVIOR_NATIVE) {
28142814
if (getActivity() instanceof CodenameOneActivity) {

0 commit comments

Comments
 (0)