Skip to content

Commit

Permalink
[Chromecast] Add REGENERATE_CLOUD_ID as a reboot reason.
Browse files Browse the repository at this point in the history
Also abstract out the GN target referencing the internal Android
implementation of RebootShlib.

Merge-With: eureka-internal/276643

Bug: 123253176
Test: Instructions on internal patch
Change-Id: I188fc39bc8a5ea862b4cc9c56b6163114dc17e9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1643827
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Simeon Anfinrud <sanfin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667672}
  • Loading branch information
Simeon Anfinrud authored and Commit Bot committed Jun 10, 2019
1 parent 7105120 commit f9abe67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions chromecast/public/reboot_shlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class CHROMECAST_EXPORT RebootShlib {

// A reboot caused by overheat.
OVERHEAT = 11,

// The device got into a state such that it needs to regenerate the cloud
// device id.
REGENERATE_CLOUD_ID = 12,
};

// Initializes any platform-specific reboot systems.
Expand Down
7 changes: 2 additions & 5 deletions chromecast/system/reboot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ cast_source_set("reboot_util") {
sources += [ "reboot_util_dummy.cc" ]
}

if (is_android_things && chromecast_branding != "public") {
if (is_android && chromecast_branding != "public") {
deps += [
"//chromecast/internal/system/reboot/android:reboot_android_things",
"//chromecast/internal/system/reboot/android:reboot_shlib_impl",
"//chromecast/public",
]
} else if (is_android) {
sources += [ "reboot_dummy.cc" ]
deps += [ "//chromecast/public" ]
} else {
deps += [ ":libcast_reboot_1.0" ]
}
Expand Down
1 change: 1 addition & 0 deletions chromecast/system/reboot/reboot_util_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ bool RebootUtil::IsValidRebootSource(RebootShlib::RebootSource reboot_source) {
case RebootShlib::RebootSource::HW_WATCHDOG:
case RebootShlib::RebootSource::SW_OTHER:
case RebootShlib::RebootSource::OVERHEAT:
case RebootShlib::RebootSource::REGENERATE_CLOUD_ID:
return true;
default:
return false;
Expand Down

0 comments on commit f9abe67

Please sign in to comment.