Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deviceinfo): add state for background / foreground
fix #1029 Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
- Loading branch information
Showing
8 changed files
with
207 additions
and
13 deletions.
There are no files selected for viewing
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
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,12 @@ | ||
package deviceinfo | ||
|
||
var appState = AppState_Kill | ||
|
||
func GetAppState() AppState { | ||
return appState | ||
} | ||
|
||
func SetAppState(state AppState) { | ||
logger().Info("application switch from " + AppState_name[int32(appState)] + " to " + AppState_name[int32(state)] + " mode") | ||
appState = state | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,11 @@ | ||
syntax = "proto3"; | ||
|
||
package berty.pkg.deviceinfo; | ||
|
||
option go_package = "berty.tech/core/pkg/deviceinfo"; | ||
|
||
enum AppState { | ||
Kill = 0; | ||
Background = 1; | ||
Foreground = 2; | ||
} |
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