Skip to content
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

Revert "fix: 解决dconfig属性类型不对导致崩溃的问题" #711

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions session/power1/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ func (m *Manager) initDsg() {
case dsettingCustomShutdownWeekDays:
res := []byte{}
for _, v := range data.Value().([]dbus.Variant) {
res = append(res, byte(v.Value().(int64)))
res = append(res, byte(v.Value().(float64)))
}
if init {
m.CustomShutdownWeekDays = res
Expand All @@ -676,15 +676,15 @@ func (m *Manager) initDsg() {
logger.Info("Set CustomShutdownWeekDays property", m.CustomShutdownWeekDays)
}
case dsettingShutdownCountdown:
m.shutdownCountdown = int(data.Value().(int64))
m.shutdownCountdown = int(data.Value().(float64))
case dsettingNextShutdownTime:
m.nextShutdownTime = int64(data.Value().(int64))
m.nextShutdownTime = int64(data.Value().(float64))
case dsettingShutdownRepetition:
if init {
m.ShutdownRepetition = int(data.Value().(int64))
m.ShutdownRepetition = int(data.Value().(float64))
return
}
if m.setPropShutdownRepetition(int(data.Value().(int64))) {
if m.setPropShutdownRepetition(int(data.Value().(float64))) {
logger.Info("Set ShutdownRepetition property", m.ShutdownRepetition)
}
case dsettingShutdownTime:
Expand Down
Loading