1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 import android.content.SyncStatusInfo; 18 19 public class SyncStatusInfoCompat { 20 21 private final SyncStatusInfo mSyncStatusInfo; 22 SyncStatusInfoCompat(SyncStatusInfo syncStatusInfo)23 SyncStatusInfoCompat(SyncStatusInfo syncStatusInfo) { 24 this.mSyncStatusInfo = syncStatusInfo; 25 } 26 getLastFailureMesgAsInt(int def)27 public int getLastFailureMesgAsInt(int def) { 28 return mSyncStatusInfo.getLastFailureMesgAsInt(def); 29 } 30 getPending()31 public boolean getPending() { 32 return mSyncStatusInfo.pending; 33 } 34 getInitialize()35 public boolean getInitialize() { 36 return mSyncStatusInfo.initialize; 37 } 38 getLastFailureTime()39 public long getLastFailureTime() { 40 return mSyncStatusInfo.lastFailureTime; 41 } 42 getLastSuccessTime()43 public long getLastSuccessTime() { 44 return mSyncStatusInfo.lastSuccessTime; 45 } 46 } 47