From 74b117fe8b82d4441fb5f795724167c5b0c212a6 Mon Sep 17 00:00:00 2001 From: Hixie Date: Mon, 14 Mar 2016 12:28:06 -0700 Subject: [PATCH] Update .analysis_options to link to blocking bugs Also, some minor cleanup in activity.dart, though much more is needed (see https://github.com/flutter/flutter/issues/2668). --- .../flutter/lib/src/services/activity.dart | 29 ++++++++++++++----- packages/flutter_tools/.analysis_options | 10 +++---- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/packages/flutter/lib/src/services/activity.dart b/packages/flutter/lib/src/services/activity.dart index 6bba0fbe93..4e5d83585f 100644 --- a/packages/flutter/lib/src/services/activity.dart +++ b/packages/flutter/lib/src/services/activity.dart @@ -11,14 +11,29 @@ import 'binding.dart'; export 'package:sky_services/activity/activity.mojom.dart'; -/// Dart wrapper around Activity mojo service available in Flutter on Android. -/// -/// Most clients will want to use these methods instead of the activity service -/// directly. +// Dart wrapper around Activity mojo service available in Flutter on Android. +// +// Most clients will want to use these methods instead of the activity service +// directly. -const int NEW_DOCUMENT = 0x00080000; -const int NEW_TASK = 0x10000000; -const int MULTIPLE_TASK = 0x08000000; +// The constants below are from +// http://developer.android.com/reference/android/content/Intent.html + +/// Open a document into a new task rooted at the activity launched by +/// this Intent. +/// +/// See Android's Intent.FLAG_ACTIVITY_NEW_DOCUMENT. +const int NEW_DOCUMENT = 0x00080000; // ignore: constant_identifier_names + +/// Start a new task on this history stack. +/// +/// See Android's Intent.FLAG_ACTIVITY_NEW_TASK. +const int NEW_TASK = 0x10000000; // ignore: constant_identifier_names + +/// Create a new task and launch an activity into it. +/// +/// See Android's Intent.FLAG_ACTIVITY_MULTIPLE_TASK. +const int MULTIPLE_TASK = 0x08000000; // ignore: constant_identifier_names ActivityProxy _initActivityProxy() { ActivityProxy activity = new ActivityProxy.unbound(); diff --git a/packages/flutter_tools/.analysis_options b/packages/flutter_tools/.analysis_options index 0a56cc42ab..c773324135 100644 --- a/packages/flutter_tools/.analysis_options +++ b/packages/flutter_tools/.analysis_options @@ -25,16 +25,16 @@ linter: # - annotate_overrides # still a lot of work to do before enabling this one # - avoid_as # https://github.com/dart-lang/linter/issues/195 - avoid_init_to_null - # - avoid_return_types_on_setters # still a lot of work to do before enabling this one + # - avoid_return_types_on_setters # https://github.com/dart-lang/linter/issues/202 - camel_case_types - # - constant_identifier_names # still a lot of work to do before enabling this one + # - constant_identifier_names # https://github.com/dart-lang/linter/issues/204 (and 203) - empty_constructor_bodies - hash_and_equals - # - implementation_imports # "// ignore:" isn't working yet + # - implementation_imports # https://github.com/dart-lang/linter/issues/203 - library_names - library_prefixes - non_constant_identifier_names - # - one_member_abstracts # "// ignore:" isn't working yet + # - one_member_abstracts # https://github.com/dart-lang/linter/issues/203 - package_api_docs - package_names - package_prefixed_library_names @@ -44,7 +44,7 @@ linter: - sort_constructors_first - sort_unnamed_constructors_first - super_goes_last - # - type_annotate_public_apis # see always_specify_types, which this is a subset of + - type_annotate_public_apis # subset of always_specify_types - type_init_formals - unnecessary_brace_in_string_interp - unnecessary_getters_setters