Skip to content

Commit

Permalink
API Level 27 enumification.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushieno committed Dec 1, 2017
1 parent a301764 commit 914f95f
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@
<map package='android.view.accessibility' class='AccessibilityNodeInfo' fields='' prefix='MOVEMENT_GRANULARITY_' enum-name="MovementGranularity" api-level='16' />
<map package='android.view.accessibility' class='AccessibilityNodeInfo.CollectionInfo' fields='' prefix='SELECTION_MODE_' enum-name="SelectionMode" api-level='21' />
<map package='android.view.accessibility' class='AccessibilityNodeInfo.RangeInfo' fields='' prefix='RANGE_TYPE_' enum-name="RangeType" />
<map package='android.view.accessibility' class='AccessibilityRequestPreparer' prefix='REQUEST_TYPE_' enum-name="AccessibilityRequestTypes" api-level="27" />
<map package='android.view.accessibility' class='AccessibilityWindowInfo' fields='' prefix='TYPE_' enum-name="AccessibilityWindowType" api-level="21" />
<map package='android.view.accessibility' class='CaptioningManager.CaptionStyle' fields='' prefix='EDGE_TYPE_' enum-name="CaptionStyles" />
<map package='android.view' class='Gravity' fields='*' prefix='' enum-name="GravityFlags" is-transient="false" />
Expand Down Expand Up @@ -799,7 +800,7 @@
<field java='ACTION_DROP' managed='Drop' />
</map>
<map package='android.view' class='DragEvent' prefix='ACTION_DRAG_' enum-name='DragAction' is-transient='false' />
<map package='android.view' class='HapticFeedbackConstants' fields='CLOCK_TICK CONTEXT_CLICK KEYBOARD_TAP LONG_PRESS VIRTUAL_KEY' enum-name='FeedbackConstants' is-transient='true' />
<map package='android.view' class='HapticFeedbackConstants' fields='CLOCK_TICK CONTEXT_CLICK KEYBOARD_PRESS KEYBOARD_RELEASE KEYBOARD_TAP LONG_PRESS VIRTUAL_KEY TEXT_HANDLE_MOVE VIRTUAL_KEY_RELEASE' enum-name='FeedbackConstants' is-transient='true' />
<map package='android.view' class='HapticFeedbackConstants' prefix='FLAG_' enum-name='FeedbackFlags' is-transient='true' />
<map package='android.view' class='KeyCharacterMap' fields='ALPHA BUILT_IN_KEYBOARD FULL NUMERIC PREDICTIVE SPECIAL_FUNCTION VIRTUAL_KEYBOARD' enum-name='KeyboardType' is-transient='false' />
<map package='android.view' class='KeyCharacterMap' prefix='MODIFIER_BEHAVIOR_' enum-name='KeyModifierBehavior' is-transient='false' />
Expand Down Expand Up @@ -840,6 +841,7 @@
<map package='android.webkit' class='WebView' prefix='RENDERER_PRIORITY_' enum-name='RendererPriority' is-transient='false' />
<map package='android.webkit' class='WebView.HitTestResult' fields='*' enum-name='HitTestResult' is-transient='false' />
<map package='android.webkit' class='WebViewClient' prefix='ERROR_' enum-name='ClientError' is-transient='false' />
<map package='android.webkit' class='WebViewClient' prefix='SAFE_BROWSING_THREAT_' enum-name='SafeBrowsingThreat' is-transient='false' />
<map package='android.widget' class='AbsListView' prefix='CHOICE_MODE_' enum-name='ChoiceMode' is-transient='false' />
<map package='android.widget' class='AbsListView' prefix='TRANSCRIPT_MODE_' enum-name='TranscriptMode' is-transient='false' />
<map package='android.widget' class='AdapterView' prefix='ITEM_VIEW_TYPE_' enum-name='ItemViewType' is-transient='false' />
Expand Down
22 changes: 22 additions & 0 deletions build-tools/enumification-helpers/methodmap.ext.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1756,3 +1756,25 @@
26, android.widget, VideoView, setAudioFocusRequest, focusGain, Android.Media.AudioFocus

26, java.util, Calendar.Builder, set, field, Java.Util.CalendarField

27, android.content.pm, PackageInstaller.SessionInfo, getInstallLocation, return, Android.Content.PM.PackageInstallLocation
27, android.content.pm, PackageInstaller.SessionParams, setInstallLocation, installLocation, Android.Content.PM.PackageInstallLocation
27, android.content.pm, PackageInstaller.SessionInfo, getMode, return, Android.Content.PM.PackageInstallMode
27, android.content.pm, PackageInstaller.SessionParams, ctor, mode, Android.Content.PM.PackageInstallMode
// It was a bit too late to notice this method, or it was added after our final enumification effort for API Level 26.
// 26, android.content.pm, PackageManager, setApplicationCategory, categoryHint, Android.Content.PM.ApplicationCategories
// There is AssetInt property (of int) which was removed at API Level 21. We don't/can't enumify it.

27, android.database.sqlite, SQLiteDatabase.OpenParams.Builder, addOpenFlags, openFlags, Android.Database.Sqlite.DatabaseOpenFlags
27, android.database.sqlite, SQLiteDatabase.OpenParams.Builder, removeOpenFlags, openFlags, Android.Database.Sqlite.DatabaseOpenFlags
27, android.database.sqlite, SQLiteDatabase.OpenParams.Builder, setOpenFlags, openFlags, Android.Database.Sqlite.DatabaseOpenFlags
27, android.database.sqlite, SQLiteDatabase.OpenParams, getOpenFlags, return, Android.Database.Sqlite.DatabaseOpenFlags

// Android reference doc says it was added at 24 but I'm 100% sure it wasn't. They just add members and docs, and claims that they were part of 24.
24, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType

27, android.media, MediaMetadataRetriever, getScaledFrameAtTime, option, Android.Media.Option
// 27, android.os, SharedMemory, map, prot, ... is part of OsConstants.
27, android.view.accessibility, AccessibilityRequestPreparer, ctor, requestTypes, Android.Views.Accessibility.AccessibilityRequestTypes
// android.view.ViewStructure.setInputType never appeared before - it seems Google keeps breaking API on the docs, which is rather likely they are filling doc bits by fixing their tools.
27, android.webkit.WebViewClient, onSafeBrowsingHit, threatType, Android.Webkit.SafeBrowsingThreat
3 changes: 0 additions & 3 deletions build-tools/enumification-helpers/remaining-int-consts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,6 @@
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.Animations.Animation.cs: public const int StartOnFirstFrame = (int) -1;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.Display.cs: public const int DefaultDisplay = (int) 0;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.Display.cs: public const int InvalidDisplay = (int) -1;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.Display.cs: public const int StateDozing = (int) 3;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IMenu.cs: public const int First = (int) 1;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IMenu.cs: public const int None = (int) 0;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IMenu.cs: public const int SupportedModifiersMask = (int) 69647;
Expand All @@ -1440,7 +1439,6 @@
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IWindowManager.cs: public const int LastApplicationWindow = (int) 99;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IWindowManager.cs: public const int LastSubWindow = (int) 1999;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IWindowManager.cs: public const int LastSystemWindow = (int) 2999;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.IWindowManager.cs: public const int TypeKeyguard = (int) 2004;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.KeyCharacterMap.cs: public const int CombiningAccent = (int) -2147483648;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.KeyCharacterMap.cs: public const int CombiningAccentMask = (int) 2147483647;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.KeyCharacterMap.cs: public const int MetaLength = (int) 4;
Expand All @@ -1464,7 +1462,6 @@
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.View.cs: public const int MeasuredStateMask = (int) -16777216;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.View.cs: public const int MeasuredStateTooSmall = (int) 16777216;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.View.cs: public const int NoId = (int) -1;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.View.cs: public const int TextAlignmentResolvedDefault = (int) 131072;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.ViewGroup.cs: protected const int ClipToPaddingMask = (int) 34;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.ViewGroup.cs: public const int FillParent = (int) -1;
../../src/Mono.Android/obj/Debug/android-XXX/mcw/Android.Views.ViewGroup.cs: public const int MatchParent = (int) -1;
Expand Down
Loading

0 comments on commit 914f95f

Please sign in to comment.