forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize Xamarin.Android.NamingCustomAttributes.
context: dotnet/java-interop#58 dependent on: atsushieno/java.interop@5583d26 Copypasting the changes on Java.Interop We have complicated module interdependency between this and xamarin-android, so this set of changes is to fix the situation. So far, here is the changeset summary: - Xamarin.Android.NamingCustomAttributes.shproj is moved to xamarin-android - there will be new Java.Interop.NamingCustomAttributes.shproj which is for use in this repository. It will be shrinked in the later commits to have only required bits in Java/Interop. Now Xamarin.Android.sln has two NamingCustomAttributes.shproj: one for imported and then slightly stripped version of the original shared project in xamarin-android, and renamed and then significantly stripped version in Java.Interop. Build adjustment comes next.
- Loading branch information
1 parent
4fd61bc
commit 56045ef
Showing
17 changed files
with
462 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 bd53e1
This file contains 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 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
74 changes: 74 additions & 0 deletions
74
src/Xamarin.Android.NamingCustomAttributes/Android.App/ActivityAttribute.cs
This file contains 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,74 @@ | ||
using System; | ||
|
||
#if !JCW_ONLY_TYPE_NAMES | ||
using Android.Content.PM; | ||
using Android.Views; | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
|
||
namespace Android.App | ||
{ | ||
|
||
[Serializable] | ||
[AttributeUsage (AttributeTargets.Class, | ||
AllowMultiple=false, | ||
Inherited=false)] | ||
#if !JCW_ONLY_TYPE_NAMES | ||
public | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
sealed partial class ActivityAttribute : Attribute { | ||
|
||
public ActivityAttribute () | ||
{ | ||
} | ||
|
||
public string Name {get; set;} | ||
|
||
#if !JCW_ONLY_TYPE_NAMES | ||
#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 | ||
#endif // JCW_ONLY_TYPE_NAMES | ||
} | ||
} |
82 changes: 82 additions & 0 deletions
82
src/Xamarin.Android.NamingCustomAttributes/Android.App/ApplicationAttribute.cs
This file contains 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,82 @@ | ||
using System; | ||
|
||
#if !JCW_ONLY_TYPE_NAMES | ||
using Android.Content.PM; | ||
using Android.Views; | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
|
||
namespace Android.App { | ||
|
||
[Serializable] | ||
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class, | ||
AllowMultiple=false, | ||
Inherited=false)] | ||
#if !JCW_ONLY_TYPE_NAMES | ||
public | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
sealed partial class ApplicationAttribute : Attribute { | ||
|
||
public ApplicationAttribute () | ||
{ | ||
} | ||
|
||
public string Name {get; set;} | ||
|
||
#if !JCW_ONLY_TYPE_NAMES | ||
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 | ||
#endif // JCW_ONLY_TYPE_NAMES | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Xamarin.Android.NamingCustomAttributes/Android.App/InstrumentationAttribute.cs
This file contains 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,26 @@ | ||
using System; | ||
|
||
namespace Android.App { | ||
|
||
[Serializable] | ||
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class, | ||
AllowMultiple=true, | ||
Inherited=false)] | ||
#if !JCW_ONLY_TYPE_NAMES | ||
public | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
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;} | ||
} | ||
} | ||
|
37 changes: 37 additions & 0 deletions
37
src/Xamarin.Android.NamingCustomAttributes/Android.App/ServiceAttribute.cs
This file contains 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,37 @@ | ||
using System; | ||
|
||
#if !JCW_ONLY_TYPE_NAMES | ||
using Android.Content.PM; | ||
using Android.Views; | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
|
||
namespace Android.App { | ||
|
||
[Serializable] | ||
[AttributeUsage (AttributeTargets.Class, | ||
AllowMultiple=false, | ||
Inherited=false)] | ||
#if !JCW_ONLY_TYPE_NAMES | ||
public | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
sealed partial class ServiceAttribute : Attribute { | ||
|
||
public ServiceAttribute () | ||
{ | ||
} | ||
|
||
public string Name {get; set;} | ||
|
||
#if !JCW_ONLY_TYPE_NAMES | ||
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;} | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Xamarin.Android.NamingCustomAttributes/Android.Content/BroadcastReceiverAttribute.cs
This file contains 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,27 @@ | ||
using System; | ||
|
||
namespace Android.Content { | ||
|
||
[Serializable] | ||
[AttributeUsage (AttributeTargets.Class, | ||
AllowMultiple=false, | ||
Inherited=false)] | ||
#if !JCW_ONLY_TYPE_NAMES | ||
public | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
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;} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/Xamarin.Android.NamingCustomAttributes/Android.Content/ContentProviderAttribute.cs
This file contains 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,38 @@ | ||
using System; | ||
|
||
namespace Android.Content { | ||
|
||
[Serializable] | ||
[AttributeUsage (AttributeTargets.Class, | ||
AllowMultiple=false, | ||
Inherited=false)] | ||
#if !JCW_ONLY_TYPE_NAMES | ||
public | ||
#endif // !JCW_ONLY_TYPE_NAMES | ||
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 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;} | ||
} | ||
} |
Oops, something went wrong.