-
Notifications
You must be signed in to change notification settings - Fork 564
Reorganize Xamarin.Android.NamingCustomAttributes. #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Java.Interop
updated
from 46e58e to b58416
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/Xamarin.Android.NamingCustomAttributes/Android.App/ActivityAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| using System; | ||
|
|
||
| using Android.Content.PM; | ||
| using Android.Views; | ||
|
|
||
| namespace Android.App | ||
| { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Class, | ||
| AllowMultiple=false, | ||
| Inherited=false)] | ||
| public sealed partial class ActivityAttribute : Attribute { | ||
|
|
||
| public ActivityAttribute () | ||
| { | ||
| } | ||
|
|
||
| public string Name {get; set;} | ||
|
|
||
| #if ANDROID_20 | ||
| public bool AllowEmbedded {get; set;} | ||
| #endif | ||
| public bool AllowTaskReparenting {get; set;} | ||
| public bool AlwaysRetainTaskState {get; set;} | ||
| public bool ClearTaskOnLaunch {get; set;} | ||
| public ConfigChanges ConfigurationChanges {get; set;} | ||
| public bool Enabled {get; set;} | ||
| public bool ExcludeFromRecents {get; set;} | ||
| public bool Exported {get; set;} | ||
| public bool FinishOnTaskLaunch {get; set;} | ||
| #if ANDROID_11 | ||
| public bool HardwareAccelerated {get; set;} | ||
| #endif | ||
| public string Icon {get; set;} | ||
| public string Label {get; set;} | ||
| public LaunchMode LaunchMode {get; set;} | ||
| #if ANDROID_17 | ||
| [Obsolete ("There is no //activity/@android:layoutDirection attribute. This was a mistake. " + | ||
| "Perhaps you wanted ConfigurationChanges=ConfigChanges.LayoutDirection?")] | ||
| public LayoutDirection LayoutDirection {get; set;} | ||
| #endif | ||
| public bool MainLauncher {get; set;} | ||
| public bool MultiProcess {get; set;} | ||
| public bool NoHistory {get; set;} | ||
| #if ANDROID_16 | ||
| public Type ParentActivity {get; set;} | ||
| #endif | ||
| public string Permission {get; set;} | ||
| public string Process {get; set;} | ||
| #if ANDROID_24 | ||
| public bool ResizeableActivity {get;set;} | ||
| public bool SupportsPictureInPicture {get;set;} | ||
| #endif | ||
| public ScreenOrientation ScreenOrientation {get; set;} | ||
| public bool StateNotNeeded {get; set;} | ||
| public string TaskAffinity {get; set;} | ||
| public string Theme {get; set;} | ||
| #if ANDROID_14 | ||
| public UiOptions UiOptions {get; set;} | ||
| #endif | ||
| public SoftInput WindowSoftInputMode {get; set;} | ||
| #if ANDROID_15 // this is not documented on http://developer.android.com/guide/topics/manifest/activity-element.html but on https://developers.google.com/glass/develop/gdk/immersions | ||
| public bool Immersive {get; set;} | ||
| #endif | ||
| } | ||
| } |
75 changes: 75 additions & 0 deletions
75
src/Xamarin.Android.NamingCustomAttributes/Android.App/ApplicationAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| using System; | ||
|
|
||
| using Android.Content.PM; | ||
| using Android.Views; | ||
|
|
||
| namespace Android.App { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class, | ||
| AllowMultiple=false, | ||
| Inherited=false)] | ||
| public sealed partial class ApplicationAttribute : Attribute { | ||
|
|
||
| public ApplicationAttribute () | ||
| { | ||
| } | ||
|
|
||
| public string Name {get; set;} | ||
|
|
||
| public bool AllowBackup {get; set;} | ||
| public bool AllowClearUserData {get; set;} | ||
| public bool AllowTaskReparenting {get; set;} | ||
| #if ANDROID_8 | ||
| public Type BackupAgent {get; set;} | ||
| #endif | ||
| #if ANDROID_21 | ||
| public string Banner {get; set;} | ||
| #endif | ||
| public bool Debuggable {get; set;} | ||
| public string Description {get; set;} | ||
| public bool Enabled {get; set;} | ||
| #if ANDROID_23 | ||
| public bool ExtractNativeLibs {get; set;} | ||
| public bool FullBackupContent {get; set;} | ||
| #endif | ||
| #if ANDROID_11 | ||
| public bool HardwareAccelerated {get; set;} | ||
| #endif | ||
| public bool HasCode {get; set;} | ||
| public string Icon {get; set;} | ||
| public bool KillAfterRestore {get; set;} | ||
| #if ANDROID_11 | ||
| public bool LargeHeap {get; set;} | ||
| #endif | ||
| public string Label {get; set;} | ||
| #if ANDROID_11 | ||
| public string Logo {get; set;} | ||
| #endif | ||
| public Type ManageSpaceActivity {get; set;} | ||
| public string Permission {get; set;} | ||
| public bool Persistent {get; set;} | ||
| public string Process {get; set;} | ||
| #if ANDROID_18 | ||
| public string RequiredAccountType {get; set;} | ||
| #endif | ||
| public bool RestoreAnyVersion {get; set;} | ||
| #if ANDROID_18 | ||
| public string RestrictedAccountType {get; set;} | ||
| #endif | ||
| #if ANDROID_17 | ||
| public bool SupportsRtl {get; set;} | ||
| #endif | ||
| public string TaskAffinity {get; set;} | ||
| public string Theme {get; set;} | ||
| #if ANDROID_14 | ||
| public UiOptions UiOptions {get; set;} | ||
| #endif | ||
| #if ANDROID_10 | ||
| public bool VMSafeMode {get; set;} | ||
| #endif | ||
| #if ANDROID_24 | ||
| public bool ResizeableActivity {get; set;} | ||
| #endif | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
src/Xamarin.Android.NamingCustomAttributes/Android.App/InstrumentationAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| using System; | ||
|
|
||
| namespace Android.App { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class, | ||
| AllowMultiple=true, | ||
| Inherited=false)] | ||
| public sealed partial class InstrumentationAttribute : Attribute { | ||
|
|
||
| public InstrumentationAttribute () | ||
| { | ||
| } | ||
|
|
||
| public bool FunctionalTest {get; set;} | ||
| public bool HandleProfiling {get; set;} | ||
| public string Icon {get; set;} | ||
| public string Label {get; set;} | ||
| public string Name {get; set;} | ||
| public string TargetPackage {get; set;} | ||
| } | ||
| } | ||
|
|
30 changes: 30 additions & 0 deletions
30
src/Xamarin.Android.NamingCustomAttributes/Android.App/ServiceAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| using System; | ||
|
|
||
| using Android.Content.PM; | ||
| using Android.Views; | ||
|
|
||
| namespace Android.App { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Class, | ||
| AllowMultiple=false, | ||
| Inherited=false)] | ||
| public sealed partial class ServiceAttribute : Attribute { | ||
|
|
||
| public ServiceAttribute () | ||
| { | ||
| } | ||
|
|
||
| public string Name {get; set;} | ||
|
|
||
| public bool Enabled {get; set;} | ||
| public bool Exported {get; set;} | ||
| public string Icon {get; set;} | ||
| #if ANDROID_16 | ||
| public bool IsolatedProcess {get; set;} | ||
| #endif | ||
| public string Label {get; set;} | ||
| public string Permission {get; set;} | ||
| public string Process {get; set;} | ||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/Xamarin.Android.NamingCustomAttributes/Android.Content/BroadcastReceiverAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using System; | ||
|
|
||
| namespace Android.Content { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Class, | ||
| AllowMultiple=false, | ||
| Inherited=false)] | ||
| public partial class BroadcastReceiverAttribute : Attribute { | ||
|
|
||
| public BroadcastReceiverAttribute () | ||
| { | ||
| } | ||
|
|
||
| public bool DirectBootAware {get; set;} | ||
| public bool Enabled {get; set;} | ||
| public bool Exported {get; set;} | ||
| public string Icon {get; set;} | ||
| public string Label {get; set;} | ||
| public string Name {get; set;} | ||
| public string Permission {get; set;} | ||
| public string Process {get; set;} | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
src/Xamarin.Android.NamingCustomAttributes/Android.Content/ContentProviderAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using System; | ||
|
|
||
| namespace Android.Content { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Class, | ||
| AllowMultiple=false, | ||
| Inherited=false)] | ||
| public partial class ContentProviderAttribute : Attribute { | ||
|
|
||
| public ContentProviderAttribute (string[] authorities) | ||
| { | ||
| if (authorities == null) | ||
| throw new ArgumentNullException ("authorities"); | ||
| if (authorities.Length < 1) | ||
| throw new ArgumentException ("At least one authority must be specified.", "authorities"); | ||
| Authorities = authorities; | ||
| } | ||
|
|
||
| public string[] Authorities {get; private set;} | ||
| public bool Enabled {get; set;} | ||
| public bool Exported {get; set;} | ||
| public bool GrantUriPermissions {get; set;} | ||
| public string Icon {get; set;} | ||
| public int InitOrder {get; set;} | ||
| public string Label {get; set;} | ||
| public bool MultiProcess {get; set;} | ||
| public string Name {get; set;} | ||
| public string Permission {get; set;} | ||
| public string Process {get; set;} | ||
| public string ReadPermission {get; set;} | ||
| public bool Syncable {get; set;} | ||
| public string WritePermission {get; set;} | ||
| } | ||
| } |
46 changes: 46 additions & 0 deletions
46
src/Xamarin.Android.NamingCustomAttributes/Android.Runtime/RegisterAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| using System; | ||
|
|
||
| namespace Android.Runtime { | ||
|
|
||
| [AttributeUsage (AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Property)] | ||
| #if !JCW_ONLY_TYPE_NAMES | ||
| public | ||
| #endif // !JCW_ONLY_TYPE_NAMES | ||
| sealed class RegisterAttribute : Attribute { | ||
|
|
||
| string connector; | ||
| string name; | ||
| string signature; | ||
|
|
||
| public RegisterAttribute (string name) | ||
| { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public RegisterAttribute (string name, string signature, string connector) | ||
| : this (name) | ||
| { | ||
| this.connector = connector; | ||
| this.signature = signature; | ||
| } | ||
|
|
||
| public string Connector { | ||
| get { return connector; } | ||
| set { connector = value; } | ||
| } | ||
|
|
||
| public string Name { | ||
| get { return name; } | ||
| set { name = value; } | ||
| } | ||
|
|
||
| public string Signature { | ||
| get { return signature; } | ||
| set { signature = value; } | ||
| } | ||
|
|
||
| public bool DoNotGenerateAcw {get; set;} | ||
|
|
||
| public int ApiSince {get; set;} | ||
| } | ||
| } |
30 changes: 30 additions & 0 deletions
30
src/Xamarin.Android.NamingCustomAttributes/Java.Interop/ExportAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| using System; | ||
|
|
||
| namespace Java.Interop { | ||
|
|
||
| [Serializable] | ||
| [AttributeUsage (AttributeTargets.Method | AttributeTargets.Constructor, | ||
| AllowMultiple=false, | ||
| Inherited=false)] | ||
| #if !JCW_ONLY_TYPE_NAMES | ||
| public | ||
| #endif // !JCW_ONLY_TYPE_NAMES | ||
| partial class ExportAttribute : Attribute { | ||
|
|
||
| public ExportAttribute () | ||
| { | ||
| } | ||
|
|
||
| public ExportAttribute (string name) | ||
| { | ||
| Name = name; | ||
| } | ||
|
|
||
| public string Name {get; private set;} | ||
| public string SuperArgumentsString {get; set;} | ||
| public Type [] Throws {get; set;} | ||
| internal string [] ThrownNames {get; set;} // msbuild internal use | ||
| } | ||
| } | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inclusion of this type seems "odd" given that
ExportAttributeis also definedJava.Interop/src/Java.Interop.NamingCustomAttributes.Should this copy be removed? Ditto
RegisterAttribute.cs,ExportFieldAttribute.cs, etc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing those copies break build. Since it should be rather dealt by those who work on those registration types (which I guess is likely you) and I have no idea about the ideal state of them, I don't plan to deal with them. You can make different changes once they are merged.