Update PRESUBMIT.py to be less likely to hit the android bot.

BUG=None
TEST=

Review URL: https://chromiumcodereview.appspot.com/9566028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124485 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 8244215..b34d3f3 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -308,10 +308,31 @@
   only_objc_files = all(f.endswith(('.mm', '.m')) for f in affected_files)
   if only_objc_files:
     return ['mac_rel']
-  preferred = ['win_rel', 'linux_rel', 'mac_rel', 'android']
+  preferred = ['win_rel', 'linux_rel', 'mac_rel']
   if any(f.endswith(('.h', '.cc', '.cpp', '.cxx')) for f in affected_files):
     preferred.append('linux_clang')
   aura_re = '_aura[^/]*[.][^/]*'
   if any(re.search(aura_re, f) for f in affected_files):
     preferred.append('linux_chromeos')
+  # Nothing in chrome/
+  android_re_list = ('^base/',
+                     '^build/common.gypi$',
+                     '^content/',
+                     '^ipc/',
+                     '^jingle/',
+                     '^media/',
+                     '^net/',
+                     '^sql/')
+  # Nothing that looks like win-only or aura-only
+  win_re = '_win\.(cc|h)$'
+  possibly_android = True
+  for non_android_re in (aura_re, win_re):
+    if all(re.search(non_android_re, f) for f in affected_files):
+      possibly_android = False
+      break
+  if possibly_android:
+    for f in change.AffectedFiles():
+      if any(re.search(r, f.LocalPath()) for r in android_re_list):
+        preferred.append('android')
+        break
   return preferred