Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java |
| index 935b9005f8a0b61f8856780e344dc5e368a32869..be80d9f0d2fffcc267a1ba84e44a11050b7be846 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java |
| @@ -4,10 +4,7 @@ |
| package org.chromium.chrome.browser.offlinepages; |
| -import android.annotation.TargetApi; |
| -import android.os.Build; |
| import android.os.Bundle; |
| -import android.os.PersistableBundle; |
| import org.chromium.chrome.browser.ChromeBackgroundService; |
| @@ -33,23 +30,11 @@ public class TaskExtrasPacker { |
| bundle.putLong(SCHEDULED_TIME_TAG, System.currentTimeMillis()); |
| } |
| - /** Puts current time into the input bundle. */ |
| - @TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1) |
|
Pete Williamson
2017/02/28 20:17:48
How come we don't need these anymore? Just curiuo
fgorski
2017/02/28 21:24:09
The consumed component abstracts that and we get t
|
| - public static void packTimeInBundle(PersistableBundle bundle) { |
| - bundle.putLong(SCHEDULED_TIME_TAG, System.currentTimeMillis()); |
| - } |
| - |
| /** Extracts the time we put into the bundle. */ |
| public static long unpackTimeFromBundle(Bundle bundle) { |
| return bundle.getLong(SCHEDULED_TIME_TAG); |
| } |
| - /** Extracts the time we put into the bundle. */ |
| - @TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1) |
| - public static long unpackTimeFromBundle(PersistableBundle bundle) { |
| - return bundle.getLong(SCHEDULED_TIME_TAG); |
| - } |
| - |
| /** Puts trigger conditions into the input bundle. */ |
| public static void packTriggerConditionsInBundle(Bundle bundle, TriggerConditions conditions) { |
| bundle.putBoolean(POWER_CONNECTED_TAG, conditions.requirePowerConnected()); |
| @@ -57,15 +42,6 @@ public class TaskExtrasPacker { |
| bundle.putBoolean(UNMETERED_NETWORK_TAG, conditions.requireUnmeteredNetwork()); |
| } |
| - /** Puts trigger conditions into the input bundle. */ |
| - @TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1) |
| - public static void packTriggerConditionsInBundle( |
| - PersistableBundle bundle, TriggerConditions conditions) { |
| - bundle.putBoolean(POWER_CONNECTED_TAG, conditions.requirePowerConnected()); |
| - bundle.putInt(BATTERY_PERCENTAGE_TAG, conditions.getMinimumBatteryPercentage()); |
| - bundle.putBoolean(UNMETERED_NETWORK_TAG, conditions.requireUnmeteredNetwork()); |
| - } |
| - |
| /** Extracts the trigger conditions we put into the bundle. */ |
| public static TriggerConditions unpackTriggerConditionsFromBundle(Bundle bundle) { |
| boolean requirePowerConnected = bundle.getBoolean(POWER_CONNECTED_TAG, true); |
| @@ -74,14 +50,4 @@ public class TaskExtrasPacker { |
| return new TriggerConditions( |
| requirePowerConnected, minimumBatteryPercentage, requireUnmeteredNetwork); |
| } |
| - |
| - /** Extracts the trigger conditions we put into the bundle. */ |
| - @TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1) |
| - public static TriggerConditions unpackTriggerConditionsFromBundle(PersistableBundle bundle) { |
| - boolean requirePowerConnected = bundle.getBoolean(POWER_CONNECTED_TAG, true); |
| - int minimumBatteryPercentage = bundle.getInt(BATTERY_PERCENTAGE_TAG, 100); |
| - boolean requireUnmeteredNetwork = bundle.getBoolean(UNMETERED_NETWORK_TAG, true); |
| - return new TriggerConditions( |
| - requirePowerConnected, minimumBatteryPercentage, requireUnmeteredNetwork); |
| - } |
| } |