forked from BeyondDimension/SteamTools
-
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.
拆分 Xamarin.Essentials,在 MAUI 中使用 .NET MAUI Essentials
- Loading branch information
Showing
112 changed files
with
2,613 additions
and
1,639 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
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
34 changes: 15 additions & 19 deletions
34
...ientLib.Droid/Application/Services/Implementation/Permissions/GetPhoneNumberPermission.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 |
---|---|---|
@@ -1,30 +1,26 @@ | ||
using Android; | ||
using Android.OS; | ||
using XEPermissions = Xamarin.Essentials.Permissions; | ||
|
||
namespace System.Application.Services.Implementation.Permissions | ||
{ | ||
internal sealed class GetPhoneNumberPermission : XEPermissions.BasePlatformPermission, IPermissions.IGetPhoneNumber | ||
{ | ||
XEPermissions.BasePermission IPermissions.IPermission.Permission => this; | ||
namespace System.Application.Services.Implementation.Permissions; | ||
|
||
public const string Description = "自动填充输入框中的手机号码"; | ||
internal sealed class GetPhoneNumberPermission : BasePlatformPermission, Permissions2.IGetPhoneNumber | ||
{ | ||
public const string Description = "自动填充输入框中的手机号码"; | ||
|
||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions | ||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions | ||
{ | ||
get | ||
{ | ||
get | ||
string androidPermission; | ||
if (Build.VERSION.SdkInt >= BuildVersionCodes.O) | ||
{ | ||
androidPermission = Manifest.Permission.ReadPhoneNumbers; | ||
} | ||
else | ||
{ | ||
string androidPermission; | ||
if (Build.VERSION.SdkInt >= BuildVersionCodes.O) | ||
{ | ||
androidPermission = Manifest.Permission.ReadPhoneNumbers; | ||
} | ||
else | ||
{ | ||
androidPermission = Manifest.Permission.ReadPhoneState; | ||
} | ||
return new[] { (androidPermission, true) }; | ||
androidPermission = Manifest.Permission.ReadPhoneState; | ||
} | ||
return new[] { (androidPermission, true) }; | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.