Skip to content

Commit dccc9c5

Browse files
committed
Merge pull request googlesamples#1 from a11n/issue-message
Corrected issue-message.
2 parents 1059845 + e3c13da commit dccc9c5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/example/google/lint/MainActivityDetector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class MainActivityDetector extends ResourceXmlDetector implements Detecto
6363
Severity.ERROR,
6464
new Implementation(
6565
MainActivityDetector.class,
66-
EnumSet.of(Scope.MANIFEST)));
66+
Scope.MANIFEST_SCOPE));
6767

6868
/**
6969
* This will be <code>true</code> if the current file we're checking has at least one activity.
@@ -104,7 +104,7 @@ public void afterCheckProject(@NonNull Context context) {
104104
&& mManifestLocation != null) {
105105
if (!mHasActivity) {
106106
context.report(ISSUE, mManifestLocation,
107-
"Expecting " + ANDROID_MANIFEST_XML + " to have an <" + TAG_APPLICATION +
107+
"Expecting " + ANDROID_MANIFEST_XML + " to have an <" + TAG_ACTIVITY +
108108
"> tag.");
109109
} else if (!mHasLauncherActivity) {
110110
// Report the issue if the manifest file has no activity with a launcher intent.

src/test/java/com/example/google/lint/MainActivityDetectorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public void testMissingMainActivity() throws Exception {
140140
public void testMissingApplication() throws Exception {
141141
mEnabled = Collections.singleton(MainActivityDetector.ISSUE);
142142
String expected = "AndroidManifest.xml: Error: Expecting AndroidManifest.xml to have an " +
143-
"<application> tag. [MainActivityDetector]\n" +
143+
"<activity> tag. [MainActivityDetector]\n" +
144144
"1 errors, 0 warnings\n";
145145
String result = lintProject(xml(FN_ANDROID_MANIFEST_XML, "" +
146146
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +

0 commit comments

Comments
 (0)