/** * Generates policy response for service connection errors, as a result of * disconnections or timeouts. */ private synchronized void handleServiceConnectionError(LicenseValidator validator) { mPolicy.processServerResponse(Policy.RETRY, null); if (mPolicy.allowAccess()) { validator.getCallback().allow(Policy.RETRY); } else { validator.getCallback().dontAllow(Policy.RETRY); } }
public synchronized void onServiceConnected(ComponentName name, IBinder service) { mService = ILicensingService.Stub.asInterface(service); runChecks(); }
/** * Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); }
public ResultListener(LicenseValidator validator) { mValidator = validator; mOnTimeout = new Runnable() { public void run() { Log.i(TAG, "Check timed out."); handleServiceConnectionError(mValidator); finishCheck(mValidator); } }; startTimeout(); }
/** * Set the license URL value (LU) as received from the server and add to preferences. You must * manually call PreferenceObfuscator.commit() to commit these changes to disk. * * @param url the LU string received */ private void setLicensingUrl(String url) { mLicensingUrl = url; mPreferences.putString(PREF_LICENSING_URL, url); }
/** * Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); }
public static void cleanup() { if (mChecker != null) mChecker.onDestroy(); mLicenseCheckerCallback = null; mSalt = null; mLicenseCheckerCallback = null; }
/** * Generates policy response for service connection errors, as a result of * disconnections or timeouts. */ private synchronized void handleServiceConnectionError(LicenseValidator validator) { mPolicy.processServerResponse(Policy.RETRY, null); if (mPolicy.allowAccess()) { validator.getCallback().allow(Policy.RETRY); } else { validator.getCallback().dontAllow(Policy.RETRY); } }
public synchronized void onServiceConnected(ComponentName name, IBinder service) { mService = ILicensingService.Stub.asInterface(service); runChecks(); }
public ResultListener(LicenseValidator validator) { mValidator = validator; mOnTimeout = new Runnable() { public void run() { Log.i(TAG, "Check timed out."); handleServiceConnectionError(mValidator); finishCheck(mValidator); } }; startTimeout(); }
/** * Set the licensing URL that displays a Play Store UI for the user to regain app access. * * @param url the LU string received */ private void setLicensingUrl(String url) { mLicensingUrl = url; mPreferences.putString(PREF_LICENSING_URL, url); }
/** Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); } /**
/** Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); } /**
/** * Generates policy response for service connection errors, as a result of disconnections or * timeouts. */ private synchronized void handleServiceConnectionError(LicenseValidator validator) { mPolicy.processServerResponse(Policy.RETRY, null); if (mPolicy.allowAccess()) { validator.getCallback().allow(Policy.RETRY); } else { validator.getCallback().dontAllow(Policy.RETRY); } }
public synchronized void onServiceConnected(ComponentName name, IBinder service) { mService = ILicensingService.Stub.asInterface(service); runChecks(); }
public ResultListener(LicenseValidator validator) { mValidator = validator; mOnTimeout = new Runnable() { public void run() { Log.i(TAG, "Check timed out."); handleServiceConnectionError(mValidator); finishCheck(mValidator); } }; startTimeout(); }
/** * Generates policy response for service connection errors, as a result of disconnections or * timeouts. */ private synchronized void handleServiceConnectionError(LicenseValidator validator) { mPolicy.processServerResponse(Policy.RETRY, null); if (mPolicy.allowAccess()) { validator.getCallback().allow(Policy.RETRY); } else { validator.getCallback().dontAllow(Policy.RETRY); } }
public ResultListener(LicenseValidator validator) { mValidator = validator; mOnTimeout = new Runnable() { public void run() { Log.i(TAG, "Check timed out."); handleServiceConnectionError(mValidator); finishCheck(mValidator); } }; startTimeout(); }
/** * Generates policy response for service connection errors, as a result of * disconnections or timeouts. */ private synchronized void handleServiceConnectionError(LicenseValidator validator) { mPolicy.processServerResponse(Policy.RETRY, null); if (mPolicy.allowAccess()) { validator.getCallback().allow(Policy.RETRY); } else { validator.getCallback().dontAllow(Policy.RETRY); } }
/** * Confers with policy and calls appropriate callback method. */ private void handleResponse(int response, ResponseData rawData) { // Update policy data and increment retry counter (if needed) mPolicy.processServerResponse(response, rawData); // Given everything we know, including cached data, ask the policy if we should grant // access. if (mPolicy.allowAccess()) { mCallback.allow(response); } else { mCallback.dontAllow(response); } }