/development/samples/browseable/DisplayingBitmaps/src/com.example.android.displayingbitmaps/util/ |
D | AsyncTask.java | 197 public abstract class AsyncTask<Params, Progress, Result> { 239 private final WorkerRunnable<Params, Result> mWorker; 240 private final FutureTask<Result> mFuture; 307 mWorker = new WorkerRunnable<Params, Result>() { in AsyncTask() 308 public Result call() throws Exception { in AsyncTask() 317 mFuture = new FutureTask<Result>(mWorker) { in AsyncTask() 334 private void postResultIfNotInvoked(Result result) { in postResultIfNotInvoked() 341 private Result postResult(Result result) { in postResult() 344 new AsyncTaskResult<Result>(this, result)); in postResult() 374 protected abstract Result doInBackground(Params... params); in doInBackground() [all …]
|
/development/tools/external_crates/crate_health/src/ |
D | crate_collection.rs | 22 use anyhow::{anyhow, Result}; 43 pub fn add_from(&mut self, path: &impl AsRef<Path>) -> Result<()> { in add_from() argument 64 pub fn print(&self) -> Result<()> { in print() argument 70 pub fn stage_crates(&self) -> Result<()> { in stage_crates() argument 76 pub fn generate_android_bps(&mut self) -> Result<()> { in generate_android_bps() argument 85 pub fn diff_android_bps(&mut self) -> Result<()> { in diff_android_bps() argument
|
D | android_bp.rs | 24 use anyhow::{anyhow, Context, Result}; 31 ) -> Result<BTreeMap<NameAndVersion, Output>> { in generate_android_bps() 54 pub(crate) fn generate_android_bp(staging_path: &RepoPath) -> Result<Output> { in generate_android_bp() 67 fn run_cargo_embargo(staging_path: &RepoPath) -> Result<Output> { in run_cargo_embargo() 89 pub fn maybe_build_cargo_embargo(repo_root: &impl AsRef<Path>, force_rebuild: bool) -> Result<()> { in maybe_build_cargo_embargo() argument 101 pub fn build_cargo_embargo(repo_root: &impl AsRef<Path>) -> Result<()> { in build_cargo_embargo() argument
|
D | reports.rs | 22 use anyhow::Result; 38 fn len_formatter(value: &serde_json::Value, out: &mut String) -> tinytemplate::error::Result<()> { in len_formatter() argument 55 pub fn new() -> Result<ReportEngine<'template>> { in new() 64 pub fn size_report(&self, cc: &CrateCollection) -> Result<String> { in size_report() 77 pub fn table<'a>(&self, crates: impl Iterator<Item = &'a Crate>) -> Result<String> { in table() 90 pub fn health_table<'a>(&self, crates: impl Iterator<Item = &'a Crate>) -> Result<String> { in health_table() 138 ) -> Result<String> { in migratable_table() 162 ) -> Result<String> { in migration_ineligible_table() 191 ) -> Result<String> { in migration_eligible_table() 248 ) -> Result<()> { in health_report() argument [all …]
|
D | lib.rs | 21 use anyhow::{anyhow, Context, Result}; 71 pub fn default_repo_root() -> Result<PathBuf> { in default_repo_root() 91 pub fn ensure_exists_and_empty(dir: &impl AsRef<Path>) -> Result<()> { in ensure_exists_and_empty() argument 100 pub fn copy_dir(src: &impl AsRef<Path>, dst: &impl AsRef<Path>) -> Result<()> { in copy_dir() argument
|
D | pseudo_crate.rs | 21 use anyhow::{anyhow, Context, Result}; 51 ) -> Result<()> { in init() argument 92 pub fn add(&self, krate: &impl NamedAndVersioned) -> Result<()> { in add() argument 105 pub fn vendor(&self) -> Result<()> { in vendor() argument
|
D | crate_type.rs | 22 use anyhow::{anyhow, Context, Result}; 75 pub fn from<P: Into<PathBuf>>(cargo_toml: &impl AsRef<Path>, root: P) -> Result<Crate> { in from() 177 pub fn print(&self) -> Result<()> { in print() argument 193 pub fn stage_crate(&self) -> Result<()> { in stage_crate() argument 210 pub fn diff_android_bp(&mut self) -> Result<()> { in diff_android_bp() argument 222 pub fn apply_patches(&mut self) -> Result<()> { in apply_patches() argument 297 fn write_test_manifest(temp_crate_dir: &Path, name: &str, version: &str) -> Result<PathBuf> { in write_test_manifest() 310 fn test_from_and_properties() -> Result<()> { in test_from_and_properties() 326 fn test_from_error() -> Result<()> { in test_from_error() 338 ) -> Result<Output> { in diff_android_bp()
|
D | migration.rs | 21 use anyhow::{anyhow, Context, Result}; 35 pub fn copy_customizations(&self) -> Result<()> { in copy_customizations() argument 85 pub fn diff_android_bps(&self) -> Result<Output> { in diff_android_bps() 98 ) -> Result<VersionMatch<CrateCollection>> { in migrate()
|
D | version_match.rs | 17 use anyhow::{anyhow, Result}; 49 pub fn new(source: CollectionType, dest: CollectionType) -> Result<Self> { in new() 166 pub fn copy_customizations(&self) -> Result<()> { in copy_customizations() argument 172 pub fn stage_crates(&mut self) -> Result<()> { in stage_crates() argument 178 pub fn apply_patches(&mut self) -> Result<()> { in apply_patches() argument 191 pub fn generate_android_bps(&mut self) -> Result<()> { in generate_android_bps() argument 203 pub fn diff_android_bps(&mut self) -> Result<()> { in diff_android_bps() argument 224 use anyhow::Result; 229 fn test_version_map() -> Result<()> { in test_version_map() 385 fn test_migratability() -> Result<()> { in test_migratability()
|
D | name_and_version_map.rs | 17 use anyhow::Result; 29 fn insert_or_error(&mut self, key: NameAndVersion, val: Self::Value) -> Result<(), CrateError>; in insert_or_error() argument 76 fn insert_or_error(&mut self, key: NameAndVersion, val: Self::Value) -> Result<(), CrateError> { in insert_or_error() argument 173 ) -> Result<BTreeMap<NameAndVersion, ValueType>> { in try_name_version_map_from_iter() 186 use anyhow::Result; 190 fn test_name_and_version_map_empty() -> Result<()> { in test_name_and_version_map_empty() 204 fn test_name_and_version_map_nonempty() -> Result<()> { in test_name_and_version_map_nonempty() 264 fn test_filter_versions() -> Result<()> { in test_filter_versions()
|
D | name_and_version.rs | 22 use anyhow::Result; 58 pub fn try_from_str(name: &str, version: &str) -> Result<Self> { in try_from_str() 140 use anyhow::Result; 143 fn test_name_version_ref() -> Result<()> { in test_name_version_ref() 167 fn test_name_and_version() -> Result<()> { in test_name_and_version()
|
D | main.rs | 17 use anyhow::{anyhow, Result}; 128 fn main() -> Result<()> { in main()
|
D | repo_path.rs | 25 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { in fmt() argument
|
/development/samples/browseable/NetworkConnect/src/com.example.android.networkconnect/ |
D | NetworkFragment.java | 122 private class DownloadTask extends AsyncTask<String, Integer, DownloadTask.Result> { 130 class Result { class in NetworkFragment.DownloadTask 133 public Result(String resultValue) { in Result() method in NetworkFragment.DownloadTask.Result 136 public Result(Exception exception) { in Result() method in NetworkFragment.DownloadTask.Result 162 protected Result doInBackground(String... urls) { in doInBackground() 163 Result result = null; in doInBackground() 170 result = new Result(resultString); in doInBackground() 175 result = new Result(e); in doInBackground() 196 protected void onPostExecute(Result result) { in onPostExecute() 211 protected void onCancelled(Result result) { in onCancelled()
|
/development/tools/external_crates/crate_health_proc_macros/src/ |
D | lib.rs | 27 Data, DataStruct, DeriveInput, Error, Field, GenericArgument, PathArguments, Result, Type, 30 pub(crate) fn expand(input: DeriveInput) -> Result<TokenStream> { in expand() 54 … fn insert_or_error(&mut self, key: NameAndVersion, val: Self::Value) -> Result<(), CrateError> { in expand() 83 fn get_struct(input: &DeriveInput) -> Result<&DataStruct> { in get_struct() 90 fn get_map_field(strukt: &DataStruct) -> Result<&Field> { in get_map_field() 105 fn get_map_type(typ: &Type) -> Result<(&Type, &Type)> { in get_map_type() 118 fn get_type(arg: &GenericArgument) -> Result<&Type> { in get_type()
|
/development/tools/external_crates/crate_health/src/bin/ |
D | migration_report.rs | 17 use anyhow::Result; 37 fn main() -> Result<()> { in main()
|
D | health_report.rs | 17 use anyhow::Result; 37 fn main() -> Result<()> { in main()
|
/development/tools/cargo_embargo/src/ |
D | bp.rs | 15 use anyhow::Result; 62 pub fn write(&self, w: &mut impl std::fmt::Write) -> Result<()> { in write() argument 103 pub fn write(&self, w: &mut impl std::fmt::Write) -> Result<()> { in write() argument 169 pub fn write(&self, w: &mut impl std::fmt::Write) -> Result<()> { in write() argument
|
D | main.rs | 40 use anyhow::Result; 164 fn main() -> Result<()> { in main() 196 ) -> Result<()> { in dump_crates() argument 209 fn autoconfig(args: &Args, config_filename: &Path, intermediates_dir: &Path) -> Result<()> { in autoconfig() argument 252 fn find_android_rust_toolchain() -> Result<PathBuf> { in find_android_rust_toolchain() 273 fn add_to_path(extra_path: PathBuf) -> Result<()> { in add_to_path() argument 284 fn make_all_crates(args: &Args, cfg: &Config, intermediates_dir: &Path) -> Result<Vec<Vec<Crate>>> { in make_all_crates() 288 fn make_crates(args: &Args, cfg: &VariantConfig, intermediates_dir: &Path) -> Result<Vec<Crate>> { in make_crates() 330 fn run_embargo(args: &Args, config_filename: &Path, intermediates_dir: &Path) -> Result<()> { in run_embargo() argument 403 ) -> Result<()> { in write_all_build_files() argument [all …]
|
D | config.rs | 29 use anyhow::{bail, Context, Result}; 84 pub fn from_file(filename: &Path) -> Result<Self> { in from_file() 91 pub fn from_json_str(json_str: &str) -> Result<Self> { in from_json_str() 164 pub fn to_json_string(&self) -> Result<String> { in to_json_string()
|
/development/tools/cargo_embargo/src/cargo/ |
D | cargo_out.rs | 21 use anyhow::Result; 34 pub fn parse_cargo_out(cargo_output: &CargoOutput) -> Result<Vec<Crate>> { in parse_cargo_out() 52 ) -> Result<Vec<Crate>> { in parse_cargo_out_str() 120 fn parse(contents: &str) -> Result<CargoOut> { in parse() 236 ) -> Result<Crate> { in from_rustc_invocation() 429 fn split_src_path(src_path: &Path) -> Result<(PathBuf, PathBuf)> { in split_src_path() 449 fn find_cargo_toml(src_path: &Path) -> Result<PathBuf> { in find_cargo_toml()
|
D | metadata.rs | 19 use anyhow::{bail, Context, Result}; 107 pub fn parse_cargo_metadata_str(cargo_metadata: &str, cfg: &VariantConfig) -> Result<Vec<Crate>> { in parse_cargo_metadata_str() 118 ) -> Result<Vec<Crate>> { in parse_cargo_metadata() 223 ) -> Result<Vec<Extern>> { in get_externs() 238 .collect::<Result<Vec<Extern>>>()?; in get_externs() 260 fn make_extern(packages: &[PackageMetadata], dependency: &DependencyMetadata) -> Result<Extern> { in make_extern() 290 fn package_dir_from_id(id: &str) -> Result<PathBuf> { in package_dir_from_id() 373 fn extract_package_dir_from_id() -> Result<()> { in extract_package_dir_from_id()
|
/development/samples/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/ |
D | MusicService.java | 239 public void onLoadChildren(final String parentMediaId, final Result<List<MediaItem>> result) { in onLoadChildren() 267 final Result<List<MediaItem>> result) { in loadChildrenImpl()
|