diff --git a/entry/src/main/ets/utils/WindowUtil.ets b/entry/src/main/ets/utils/WindowUtil.ets index 8b922734117d37c44811eca9b5835cb9e59b8e19..d0468e255df0af76f392d22e4148ee00f78c07b9 100644 --- a/entry/src/main/ets/utils/WindowUtil.ets +++ b/entry/src/main/ets/utils/WindowUtil.ets @@ -24,13 +24,7 @@ export class WindowUtil { public static updateStatusBarColor(context: common.BaseContext, isDark: boolean): void { window.getLastWindow(context).then((windowClass: window.Window) => { try { - windowClass.setWindowSystemBarProperties({ statusBarContentColor: isDark ? '#FFFFFF' : '#000000' }, (err) => { - if (err.code) { - Logger.error(TAG, 'Failed to set the system bar properties. Cause: ' + JSON.stringify(err)); - return; - } - Logger.info(TAG, 'Succeeded in setting the system bar properties.'); - }); + windowClass.setWindowSystemBarProperties({ statusBarContentColor: isDark ? '#FFFFFF' : '#000000' }); } catch (exception) { Logger.error(TAG, 'Failed to set the system bar properties. Cause: ' + JSON.stringify(exception)); }