Loading core/java/android/content/AbstractThreadedSyncAdapter.java +18 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.content; import android.accounts.Account; import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.IBinder; Loading Loading @@ -165,15 +166,29 @@ public abstract class AbstractThreadedSyncAdapter { } private class ISyncAdapterImpl extends ISyncAdapter.Stub { private boolean isCallerSystem() { final long callingUid = Binder.getCallingUid(); if (callingUid != Process.SYSTEM_UID) { android.util.EventLog.writeEvent(0x534e4554, "203229608", -1, ""); return false; } return true; } @Override public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) { if (!isCallerSystem()) { return; } if (ENABLE_LOG) { if (extras != null) { extras.size(); // Unparcel so its toString() will show the contents. } Log.d(TAG, "startSync() start " + authority + " " + account + " " + extras); } try { final SyncContext syncContextClient = new SyncContext(syncContext); Loading Loading @@ -229,6 +244,9 @@ public abstract class AbstractThreadedSyncAdapter { @Override public void cancelSync(ISyncContext syncContext) { if (!isCallerSystem()) { return; } try { // synchronize to make sure that mSyncThreads doesn't change between when we // check it and when we use it Loading Loading
core/java/android/content/AbstractThreadedSyncAdapter.java +18 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.content; import android.accounts.Account; import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.IBinder; Loading Loading @@ -165,15 +166,29 @@ public abstract class AbstractThreadedSyncAdapter { } private class ISyncAdapterImpl extends ISyncAdapter.Stub { private boolean isCallerSystem() { final long callingUid = Binder.getCallingUid(); if (callingUid != Process.SYSTEM_UID) { android.util.EventLog.writeEvent(0x534e4554, "203229608", -1, ""); return false; } return true; } @Override public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) { if (!isCallerSystem()) { return; } if (ENABLE_LOG) { if (extras != null) { extras.size(); // Unparcel so its toString() will show the contents. } Log.d(TAG, "startSync() start " + authority + " " + account + " " + extras); } try { final SyncContext syncContextClient = new SyncContext(syncContext); Loading Loading @@ -229,6 +244,9 @@ public abstract class AbstractThreadedSyncAdapter { @Override public void cancelSync(ISyncContext syncContext) { if (!isCallerSystem()) { return; } try { // synchronize to make sure that mSyncThreads doesn't change between when we // check it and when we use it Loading