Java 类android.content.SyncStats 实例源码
项目:FMTech
文件:auq.java
private final void a(int paramInt, bup parambup, SyncResult paramSyncResult, boolean paramBoolean)
{
try
{
if (Log.isLoggable("PhotoSyncService", 4)) {
new StringBuilder(66).append("----> Start highlights metadata down sync for account: ").append(paramInt);
}
bsn localbsn = bsn.e;
bry.a(getContext(), paramInt, parambup, localbsn);
bgp.a(getContext(), paramInt, dnn.b, System.currentTimeMillis());
return;
}
catch (Exception localException)
{
do
{
if (Log.isLoggable("PhotoSyncService", 6)) {
Log.e("PhotoSyncService", 65 + "----> doHighlightsMetadataDownSync error for account: " + paramInt);
}
} while (GooglePhotoDownsyncService.a(localException));
SyncStats localSyncStats = paramSyncResult.stats;
localSyncStats.numIoExceptions = (1L + localSyncStats.numIoExceptions);
}
}
项目:FMTech
文件:auq.java
private final void a(List<Integer> paramList, bup parambup, SyncResult paramSyncResult)
{
hyi localhyi = (hyi)mbb.a(getContext(), hyi.class);
Iterator localIterator = paramList.iterator();
while (localIterator.hasNext())
{
int i = ((Integer)localIterator.next()).intValue();
if (localhyi.b(bwb.g, i))
{
try
{
a(i, parambup, paramSyncResult, false);
}
catch (Exception localException)
{
Log.e("PhotoSyncService", 83 + "----> performUnconditionalHighlightsMetadataDownSync error for account: " + i, localException);
}
if (!GooglePhotoDownsyncService.a(localException))
{
SyncStats localSyncStats = paramSyncResult.stats;
localSyncStats.numIoExceptions = (1L + localSyncStats.numIoExceptions);
}
}
}
}
项目:intellij-ce-playground
文件:UnitTest.java
@Test
public void instanceFields() throws Exception {
SyncResult result = mock(SyncResult.class);
Field statsField = result.getClass().getField("stats");
SyncStats syncStats = mock(SyncStats.class);
statsField.set(result, syncStats);
syncStats.numDeletes = 42;
assertEquals(42, result.stats.numDeletes);
}
项目:intellij-ce-playground
文件:UnitTest.java
@Test
public void instanceFields() throws Exception {
SyncResult result = mock(SyncResult.class);
Field statsField = result.getClass().getField("stats");
SyncStats syncStats = mock(SyncStats.class);
statsField.set(result, syncStats);
syncStats.numDeletes = 42;
assertEquals(42, result.stats.numDeletes);
}
项目:intellij-ce-playground
文件:UnitTest.java
@Test
public void instanceFields() throws Exception {
SyncResult result = mock(SyncResult.class);
Field statsField = result.getClass().getField("stats");
SyncStats syncStats = mock(SyncStats.class);
statsField.set(result, syncStats);
syncStats.numDeletes = 42;
assertEquals(42, result.stats.numDeletes);
}
项目:intellij-ce-playground
文件:UnitTest.java
@Test
public void instanceFields() throws Exception {
SyncResult result = mock(SyncResult.class);
Field statsField = result.getClass().getField("stats");
SyncStats syncStats = mock(SyncStats.class);
statsField.set(result, syncStats);
syncStats.numDeletes = 42;
assertEquals(42, result.stats.numDeletes);
}
项目:FMTech
文件:hca.java
private final void a(SyncStats paramSyncStats, int paramInt)
{
MediaRecordEntry localMediaRecordEntry = this.e;
localMediaRecordEntry.mUploadState = 600;
localMediaRecordEntry.mUploadTaskState = 11;
localMediaRecordEntry.mUploadStatus = paramInt;
paramSyncStats.numSkippedEntries = (1L + paramSyncStats.numSkippedEntries);
}
项目:FMTech
文件:hay.java
private final void a(int paramInt, boolean paramBoolean, SyncResult paramSyncResult)
{
int i;
if ((this.a.c(paramInt)) && (this.a.a(paramInt).a()))
{
i = 1;
if (i != 0) {
break label74;
}
if (Log.isLoggable("iu.SyncService", 4)) {
new StringBuilder(43).append("====> Account is not signed in: ").append(paramInt);
}
}
label74:
do
{
hau localhau;
do
{
return;
i = 0;
break;
if ((Log.isLoggable("iu.SyncService", 4)) && (!paramBoolean)) {
new StringBuilder(53).append("====> Manual or requested up sync account=").append(paramInt);
}
Iterator localIterator = mbb.c(getContext(), hat.class).iterator();
while (localIterator.hasNext()) {
((hat)localIterator.next()).a();
}
if (paramInt == -1)
{
Log.e("iu.SyncService", "----> performUpSync account not found");
return;
}
localhau = (hau)mbb.b(getContext(), hau.class);
} while (localhau == null);
try
{
((hbn)mbb.a(getContext(), hbn.class)).a();
try
{
if (Thread.currentThread().isInterrupted()) {
return;
}
}
finally {}
SyncStats localSyncStats;
this.b = new haz(paramInt, paramSyncResult);
}
catch (Exception localException)
{
Log.e("iu.SyncService", 50 + "----> performUpSync error for account: " + paramInt, localException);
localSyncStats = paramSyncResult.stats;
localSyncStats.numIoExceptions = (1L + localSyncStats.numIoExceptions);
return;
}
if (Log.isLoggable("iu.SyncService", 4)) {
new StringBuilder(44).append("----> Start up sync for account: ").append(paramInt);
}
localhau.a(this.b);
} while (!Log.isLoggable("iu.SyncService", 4));
boolean bool = this.b.b();
new StringBuilder(65).append("----> Up sync finished for account: ").append(paramInt).append(", cancelled? ").append(bool);
}
项目:FMTech
文件:hca.java
private final void a(SyncStats paramSyncStats, Throwable paramThrowable)
{
paramSyncStats.numIoExceptions = (1L + paramSyncStats.numIoExceptions);
a(3, 604800000L, paramThrowable);
b(false);
}
项目:FMTech
文件:auq.java
private final void a(List<Integer> paramList, bup parambup, SyncResult paramSyncResult, boolean paramBoolean)
{
Context localContext = getContext();
hyi localhyi = (hyi)mbb.a(localContext, hyi.class);
Iterator localIterator = paramList.iterator();
while (localIterator.hasNext())
{
int i = ((Integer)localIterator.next()).intValue();
if (localhyi.b(bwb.g, i))
{
long l2;
long l3;
for (;;)
{
try
{
long l1 = bgp.a(localContext, i, dnn.b);
l2 = System.currentTimeMillis() - l1;
if (!paramBoolean) {
break label224;
}
l3 = dnn.b.f;
if (l2 <= l3) {
break label249;
}
if (Log.isLoggable("PhotoSyncService", 4)) {
new StringBuilder(59).append("----> Highlights sync for account: ").append(i).append(" starting now");
}
a(i, parambup, paramSyncResult, false);
}
catch (Exception localException)
{
if (Log.isLoggable("PhotoSyncService", 6)) {
Log.e("PhotoSyncService", 81 + "----> performConditionalHighlightsMetadataDownSync error for account: " + i, localException);
}
}
if (GooglePhotoDownsyncService.a(localException)) {
break;
}
SyncStats localSyncStats = paramSyncResult.stats;
localSyncStats.numIoExceptions = (1L + localSyncStats.numIoExceptions);
break;
label224:
l3 = Math.max(1000L * bsp.b(localContext, i), dnn.b.f);
}
label249:
if (Log.isLoggable("PhotoSyncService", 4))
{
long l4 = (l3 - l2) / 1000L;
new StringBuilder(83).append("----> Highlights sync for account: ").append(i).append(" is due in: ").append(l4).append(" secs");
}
}
}
}
项目:FMTech
文件:auq.java
private final void b(List<Integer> paramList, bup parambup, SyncResult paramSyncResult)
{
Context localContext = getContext();
Iterator localIterator = paramList.iterator();
for (;;)
{
if (localIterator.hasNext())
{
int i = ((Integer)localIterator.next()).intValue();
gjb localgjb = this.a.a(i);
long l1 = bgp.a(localContext, i, dnn.d);
long l2 = System.currentTimeMillis() - l1;
long l3 = dnn.d.f;
if (l2 < l3)
{
if (Log.isLoggable("PhotoSyncService", 4))
{
long l4 = (l3 - l2) / 1000L;
new StringBuilder(78).append("----> Media sync for account: ").append(i).append(" is due in: ").append(l4).append(" secs");
}
}
else
{
ivl localivl = (ivl)mbb.a(localContext, ivl.class);
localivl.h();
try
{
if (Log.isLoggable("PhotoSyncService", 4)) {
new StringBuilder(52).append("----> Start media down sync for account: ").append(i);
}
btl.a(localContext).a(i, parambup, paramSyncResult);
localivl.h();
if (((iwb)mbb.a(localContext, iwb.class)).a(i)) {
if (Log.isLoggable("PhotoSyncService", 4)) {
new StringBuilder(42).append("----> Movie maker for account: ").append(i);
}
}
}
catch (Exception localException1)
{
try
{
localgjb.b("gaia_id");
localivl.d();
bua.c(localContext, i);
bgp.a(localContext, i, dnn.d, System.currentTimeMillis());
continue;
localException1 = localException1;
Log.e("PhotoSyncService", 57 + "----> performMediaDownSync error for account: " + i, localException1);
SyncStats localSyncStats = paramSyncResult.stats;
localSyncStats.numIoExceptions = (1L + localSyncStats.numIoExceptions);
}
catch (Exception localException2)
{
for (;;)
{
Log.e("PhotoSyncService", 69 + "----> performMediaDownSync movie maker error for account: " + i, localException2);
}
}
}
}
}
}
}