| Index: net/disk_cache/simple/simple_index.cc
|
| diff --git a/net/disk_cache/simple/simple_index.cc b/net/disk_cache/simple/simple_index.cc
|
| index dafc0e72177541e1bbdfcf43c636457d36336c88..0ec322d7a2e00b775e8754204ee358c147f496a8 100644
|
| --- a/net/disk_cache/simple/simple_index.cc
|
| +++ b/net/disk_cache/simple/simple_index.cc
|
| @@ -187,8 +187,8 @@ void SimpleIndex::Initialize(base::Time cache_mtime) {
|
|
|
| #if defined(OS_ANDROID)
|
| if (base::android::IsVMInitialized()) {
|
| - activity_status_listener_.reset(new base::android::ActivityStatus::Listener(
|
| - base::Bind(&SimpleIndex::OnActivityStateChange, AsWeakPtr())));
|
| + app_status_listener_.reset(new base::android::ApplicationStatusListener(
|
| + base::Bind(&SimpleIndex::OnApplicationStateChange, AsWeakPtr())));
|
| }
|
| #endif
|
|
|
| @@ -455,15 +455,15 @@ void SimpleIndex::MergeInitializingSet(
|
| }
|
|
|
| #if defined(OS_ANDROID)
|
| -void SimpleIndex::OnActivityStateChange(
|
| - base::android::ActivityState state) {
|
| +void SimpleIndex::OnApplicationStateChange(
|
| + base::android::ApplicationState state) {
|
| DCHECK(io_thread_checker_.CalledOnValidThread());
|
| // For more info about android activities, see:
|
| // developer.android.com/training/basics/activity-lifecycle/pausing.html
|
| - // These values are defined in the file ActivityStatus.java
|
| - if (state == base::android::ACTIVITY_STATE_RESUMED) {
|
| + if (state == base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES) {
|
| app_on_background_ = false;
|
| - } else if (state == base::android::ACTIVITY_STATE_STOPPED) {
|
| + } else if (state ==
|
| + base::android::APPLICATION_STATE_HAS_ONLY_STOPPED_ACTIVITIES) {
|
| app_on_background_ = true;
|
| WriteToDisk();
|
| }
|
|
|