-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[battery] use context properties #232
Conversation
batteryNotifier->applyChargingState(0, QBatteryInfo::Charging); | ||
batteryNotifier->notificationTimer.stop(); | ||
batteryNotifier->applyChargingState(0, QBatteryInfo::UnknownChargingState); | ||
QCOMPARE(gNotificationManagerStub->stubCallCount("CloseNotification"), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you comment why you comment these out?:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there is no notificationTimer now
2b5707e
to
542addc
Compare
Removed non-applicable or duplicated unit tests. Unified prepareNotification() function. |
Any comments? I am going to merge it today. |
LGTM |
QBatteryInfo provides more information than needed, using context properties (as also for information about PSM). What is removed: 100mA charging from SDP or invalid charger can't be tracked by this layer reliably, so do not show NotificationNoEnoughPower w/o support from underlying middleware. Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
542addc
to
6697c21
Compare
I tried to build this locally, and got:
Is there a BuildRequires version bump or something missing from the .spec file? Or have I forgotten something obvious? |
@chriadam Hm, statefs-qt5 has explicit "BuildRequires: pkgconfig(qtaround) >= 0.2.4", so libcontextkit-statefs-qt5.so should be linked with proper libqtaround. |
$ ls -al /srv/mer/targets/jolla-qt5/usr/lib/libcontextkit-statefs-qt5.so |
Heh, thanks to a suggestion from Robin, I ran ldd under sb2, and got some real output: $ ldd /usr/lib/libcontextkit-statefs-qt5.so |
Not sure what happened - after a zypper ref -f && zypper dup inside scratchbox, it now builds correctly. |
Tested on device, seems to work nicely. |
@chriadam the interesting part is that Thank you for verifying it! |
[battery] use context properties
QBatteryInfo provides more information than needed, using context properties (as
also for information about PSM).
What is removed: 100mA charging from SDP or invalid charger can't be tracked by
this layer reliably, so do not show NotificationNoEnoughPower w/o support from
underlying middleware.
Signed-off-by: Denis Zalevskiy denis.zalevskiy@jolla.com