public static void maybeInvokeRetrieval(TextView textView, ParsedResult result, HistoryManager historyManager, Context context) { AsyncTaskExecInterface taskExec = new AsyncTaskExecManager().build(); if (result instanceof URIParsedResult) { taskExec.execute(new URIResultInfoRetriever(textView, (URIParsedResult) result, historyManager, context)); taskExec.execute(new TitleRetriever(textView, (URIParsedResult) result, historyManager)); } else if (result instanceof ProductParsedResult) { String productID = ((ProductParsedResult) result).getProductID(); taskExec.execute(new ProductResultInfoRetriever(textView, productID, historyManager, context)); } else if (result instanceof ISBNParsedResult) { String isbn = ((ISBNParsedResult) result).getISBN(); taskExec.execute(new ProductResultInfoRetriever(textView, isbn, historyManager, context)); taskExec.execute(new BookResultInfoRetriever(textView, isbn, historyManager, context)); } }
public static void maybeInvokeRetrieval(TextView textView, ParsedResult result, HistoryManager historyManager, Context context) { AsyncTaskExecInterface taskExec = new AsyncTaskExecManager().build(); if (result instanceof URIParsedResult) { taskExec.execute(new URIResultInfoRetriever(textView, (URIParsedResult) result, historyManager, context)); taskExec.execute(new TitleRetriever(textView, (URIParsedResult) result, historyManager)); } else if (result instanceof ProductParsedResult) { String productID = ((ProductParsedResult) result).getProductID(); taskExec.execute(new ProductResultInfoRetriever(textView, productID, historyManager, context)); switch (productID.length()) { case 12: taskExec.execute(new AmazonInfoRetriever(textView, "UPC", productID, historyManager, context)); break; case 13: taskExec.execute(new AmazonInfoRetriever(textView, "EAN", productID, historyManager, context)); break; } } else if (result instanceof ISBNParsedResult) { String isbn = ((ISBNParsedResult) result).getISBN(); taskExec.execute(new ProductResultInfoRetriever(textView, isbn, historyManager, context)); taskExec.execute(new BookResultInfoRetriever(textView, isbn, historyManager, context)); taskExec.execute(new AmazonInfoRetriever(textView, "ISBN", isbn, historyManager, context)); } }
AutoFocusManager(Context context, Camera camera) { this.camera = camera; taskExec = new AsyncTaskExecManager().build(); SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); String currentFocusMode = camera.getParameters().getFocusMode(); useAutoFocus = FOCUS_MODES_CALLING_AF.contains(currentFocusMode); Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus); start(); }
AutoFocusManager(Context context, Camera camera) { this.camera = camera; taskExec = new AsyncTaskExecManager().build(); SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); String currentFocusMode = camera.getParameters().getFocusMode(); useAutoFocus = sharedPrefs.getBoolean(PreferencesActivity.KEY_AUTO_FOCUS, true) && FOCUS_MODES_CALLING_AF.contains(currentFocusMode); Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus); start(); }
AutoFocusManager(Context context, Camera camera) { this.camera = camera; taskExec = new AsyncTaskExecManager().build(); String currentFocusMode = camera.getParameters().getFocusMode(); useAutoFocus = true && FOCUS_MODES_CALLING_AF.contains(currentFocusMode); Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus); start(); }
AutoFocusManager(Context context, Camera camera) { this.camera = camera; taskExec = new AsyncTaskExecManager().build(); //SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); // No need to get SharedPreferences String currentFocusMode = camera.getParameters().getFocusMode(); useAutoFocus = /*sharedPrefs.getBoolean(PreferencesActivity.KEY_AUTO_FOCUS, true) &&*/ // No need to get SharedPreferences FOCUS_MODES_CALLING_AF.contains(currentFocusMode); Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus); start(); }
InactivityTimer(Activity activity) { this.activity = activity; taskExec = new AsyncTaskExecManager().build(); powerStatusReceiver = new PowerStatusReceiver(); onActivity(); }
public SearchBookContentsActivity() { taskExec = new AsyncTaskExecManager().build(); }
public AppPickerActivity() { labelsPackages = new ArrayList<String[]>(); taskExec = new AsyncTaskExecManager().build(); }
public WifiResultHandler(CaptureActivity activity, ParsedResult result) { super(activity, result); parent = activity; taskExec = new AsyncTaskExecManager().build(); }
public AppPickerActivity() { taskExec = new AsyncTaskExecManager().build(); }