[Mono.Android] Fix mapping of Android.Content.PM.ForegroundService (#5650)
The following [`android.app.Service`][0] methods: * [`int getForegroundServiceType()`][1] * [`void startForeground(int id, Notification notification, int foregroundServiceType)`][2] were not being bound within `Mono.Android.dll`, because of the following warnings emitted during the `src/Mono.Android` build: warning BG8700: Unknown return type 'Android.App.ForegroundService' for member 'Android.App.Service.GetForegroundServiceType ()'. warning BG8800: Unknown parameter type 'Android.App.ForegroundService' for member 'Android.App.Service.StartForeground (int, Android.App.Notification, Android.App.ForegroundService)'. The cause of these warnings is that the `Service` methods were "enumified" to use a C# enum instead of an `int`, and a nonexistent `Android.App.ForegroundService` type was specified in `methodmap.csv`. Fix these warnings by specifying the correct type `Android.Content.PM.ForegroundService`. This will ensure that these methods are bound within `Mono.Android.dll`: partial class Service { Android.Content.PM.ForegroundService GetForegroundServiceType(); void StartForeground(int, Android.App.Notification, Android.Content.PM.ForegroundService); } [0]: https://developer.android.com/reference/android/app/Service [1]: https://developer.android.com/reference/android/app/Service#getForegroundServiceType() [2]: https://developer.android.com/reference/android/app/Service#startForeground(int,%20android.app.Notification,%20int)
This commit is contained in:
Родитель
e2a5a12b26
Коммит
1dbda0f2a4
|
@ -1909,8 +1909,8 @@
|
|||
29, android.app, AppOpsManager, startWatchingMode, flags, Android.App.Admin.WatchForeground
|
||||
29, android.app, RemoteInput.Builder, setEditChoicesBeforeSending, editChoicesBeforeSending, Android.App.EditChoices
|
||||
29, android.app, RemoteInput, getEditChoicesBeforeSending, return, Android.App.EditChoices
|
||||
29, android.app, Service, getForegroundServiceType, return, Android.App.ForegroundService
|
||||
29, android.app, Service, startForeground, foregroundServiceType, Android.App.ForegroundService
|
||||
29, android.app, Service, getForegroundServiceType, return, Android.Content.PM.ForegroundService
|
||||
29, android.app, Service, startForeground, foregroundServiceType, Android.Content.PM.ForegroundService
|
||||
// Cannot change this at this state.
|
||||
// 27, android.app, WallpaperManager.OnColorsChangedListener, onColorsChanged, which, Android.App.WallpaperManagerFlags
|
||||
29, android.content, Context, bindIsolatedService, flags, Android.App.Bind
|
||||
|
|
Не удается отобразить этот файл, потому что он содержит неожиданный символ в строке 27 и столбце 22.
|
|
@ -2519,8 +2519,8 @@
|
|||
29, android.app, AppOpsManager, startWatchingMode, flags, Android.App.WatchForeground
|
||||
29, android.app, RemoteInput.Builder, setEditChoicesBeforeSending, editChoicesBeforeSending, Android.App.EditChoices
|
||||
29, android.app, RemoteInput, getEditChoicesBeforeSending, return, Android.App.EditChoices
|
||||
29, android.app, Service, getForegroundServiceType, return, Android.App.ForegroundService
|
||||
29, android.app, Service, startForeground, foregroundServiceType, Android.App.ForegroundService
|
||||
29, android.app, Service, getForegroundServiceType, return, Android.Content.PM.ForegroundService
|
||||
29, android.app, Service, startForeground, foregroundServiceType, Android.Content.PM.ForegroundService
|
||||
// Cannot change this at this state.
|
||||
// 27, android.app, WallpaperManager.OnColorsChangedListener, onColorsChanged, which, Android.App.WallpaperManagerFlags
|
||||
29, android.content, Context, bindIsolatedService, flags, Android.App.Bind
|
||||
|
|
Не удается отобразить этот файл, потому что он содержит неожиданный символ в строке 8 и столбце 27.
|
Загрузка…
Ссылка в новой задаче