mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
EC-602 Constants namespace fix (#2127)
This commit is contained in:
parent
2d35a00caa
commit
d800e9a43e
7 changed files with 16 additions and 16 deletions
|
@ -367,7 +367,7 @@ namespace Bit.Droid.Accessibility
|
|||
|
||||
public static string GetUri(AccessibilityNodeInfo root)
|
||||
{
|
||||
var uri = string.Concat(Constants.AndroidAppProtocol, root.PackageName);
|
||||
var uri = string.Concat(Core.Constants.AndroidAppProtocol, root.PackageName);
|
||||
if (SupportedBrowsers.ContainsKey(root.PackageName))
|
||||
{
|
||||
var browser = SupportedBrowsers[root.PackageName];
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace Bit.Droid.Autofill
|
|||
{
|
||||
case CipherType.Login:
|
||||
intent.PutExtra("autofillFrameworkName", parser.Uri
|
||||
.Replace(Constants.AndroidAppProtocol, string.Empty)
|
||||
.Replace(Core.Constants.AndroidAppProtocol, string.Empty)
|
||||
.Replace("https://", string.Empty)
|
||||
.Replace("http://", string.Empty));
|
||||
intent.PutExtra("autofillFrameworkUri", parser.Uri);
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Bit.Droid.Autofill
|
|||
}
|
||||
else
|
||||
{
|
||||
_uri = string.Concat(Constants.AndroidAppProtocol, PackageName);
|
||||
_uri = string.Concat(Core.Constants.AndroidAppProtocol, PackageName);
|
||||
}
|
||||
return _uri;
|
||||
}
|
||||
|
|
|
@ -150,9 +150,9 @@ namespace Bit.Droid
|
|||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (Intent?.GetStringExtra(Constants.NotificationData) is string notificationDataJson)
|
||||
if (Intent?.GetStringExtra(Core.Constants.NotificationData) is string notificationDataJson)
|
||||
{
|
||||
var notificationType = JToken.Parse(notificationDataJson).SelectToken(Constants.NotificationDataType);
|
||||
var notificationType = JToken.Parse(notificationDataJson).SelectToken(Core.Constants.NotificationDataType);
|
||||
if (notificationType.ToString() == PasswordlessNotificationData.TYPE)
|
||||
{
|
||||
_pushNotificationListenerService.OnNotificationTapped(JsonConvert.DeserializeObject<PasswordlessNotificationData>(notificationDataJson)).FireAndForget();
|
||||
|
@ -211,7 +211,7 @@ namespace Bit.Droid
|
|||
public async override void OnRequestPermissionsResult(int requestCode, string[] permissions,
|
||||
[GeneratedEnum] Permission[] grantResults)
|
||||
{
|
||||
if (requestCode == Constants.SelectFilePermissionRequestCode)
|
||||
if (requestCode == Core.Constants.SelectFilePermissionRequestCode)
|
||||
{
|
||||
if (grantResults.Any(r => r != Permission.Granted))
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ namespace Bit.Droid
|
|||
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
|
||||
{
|
||||
if (resultCode == Result.Ok &&
|
||||
(requestCode == Constants.SelectFileRequestCode || requestCode == Constants.SaveFileRequestCode))
|
||||
(requestCode == Core.Constants.SelectFileRequestCode || requestCode == Core.Constants.SaveFileRequestCode))
|
||||
{
|
||||
Android.Net.Uri uri = null;
|
||||
string fileName = null;
|
||||
|
@ -252,7 +252,7 @@ namespace Bit.Droid
|
|||
return;
|
||||
}
|
||||
|
||||
if (requestCode == Constants.SaveFileRequestCode)
|
||||
if (requestCode == Core.Constants.SaveFileRequestCode)
|
||||
{
|
||||
_messagingService.Send("selectSaveFileResult",
|
||||
new Tuple<string, string>(uri.ToString(), fileName));
|
||||
|
@ -433,7 +433,7 @@ namespace Bit.Droid
|
|||
return;
|
||||
}
|
||||
|
||||
var channel = new NotificationChannel(Constants.AndroidNotificationChannelId, AppResources.AllNotifications, NotificationImportance.Default);
|
||||
var channel = new NotificationChannel(Core.Constants.AndroidNotificationChannelId, AppResources.AllNotifications, NotificationImportance.Default);
|
||||
if(GetSystemService(NotificationService) is NotificationManager notificationManager)
|
||||
{
|
||||
notificationManager.CreateNotificationChannel(channel);
|
||||
|
|
|
@ -46,8 +46,8 @@ namespace Bit.Droid
|
|||
{
|
||||
RegisterLocalServices();
|
||||
var deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
|
||||
ServiceContainer.Init(deviceActionService.DeviceUserAgent, Constants.ClearCiphersCacheKey,
|
||||
Constants.AndroidAllClearCipherCacheKeys);
|
||||
ServiceContainer.Init(deviceActionService.DeviceUserAgent, Core.Constants.ClearCiphersCacheKey,
|
||||
Core.Constants.AndroidAllClearCipherCacheKeys);
|
||||
InitializeAppSetup();
|
||||
|
||||
// TODO: Update when https://github.com/bitwarden/mobile/pull/1662 gets merged
|
||||
|
|
|
@ -79,11 +79,11 @@ namespace Bit.Droid.Services
|
|||
|
||||
var context = Android.App.Application.Context;
|
||||
var intent = new Intent(context, typeof(MainActivity));
|
||||
intent.PutExtra(Constants.NotificationData, JsonConvert.SerializeObject(data));
|
||||
intent.PutExtra(Core.Constants.NotificationData, JsonConvert.SerializeObject(data));
|
||||
|
||||
var pendingIntentFlags = AndroidHelpers.AddPendingIntentMutabilityFlag(PendingIntentFlags.UpdateCurrent, true);
|
||||
var pendingIntent = PendingIntent.GetActivity(context, 20220801, intent, pendingIntentFlags);
|
||||
var builder = new NotificationCompat.Builder(context, Constants.AndroidNotificationChannelId)
|
||||
var builder = new NotificationCompat.Builder(context, Core.Constants.AndroidNotificationChannelId)
|
||||
.SetContentIntent(pendingIntent)
|
||||
.SetContentTitle(title)
|
||||
.SetContentText(message)
|
||||
|
|
|
@ -321,7 +321,7 @@ namespace Bit.Droid.Services
|
|||
intent.AddCategory(Intent.CategoryOpenable);
|
||||
intent.PutExtra(Intent.ExtraTitle, fileName);
|
||||
|
||||
activity.StartActivityForResult(intent, Constants.SaveFileRequestCode);
|
||||
activity.StartActivityForResult(intent, Core.Constants.SaveFileRequestCode);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -386,7 +386,7 @@ namespace Bit.Droid.Services
|
|||
{
|
||||
chooserIntent.PutExtra(Intent.ExtraInitialIntents, additionalIntents.ToArray());
|
||||
}
|
||||
activity.StartActivityForResult(chooserIntent, Constants.SelectFileRequestCode);
|
||||
activity.StartActivityForResult(chooserIntent, Core.Constants.SelectFileRequestCode);
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
|
@ -882,7 +882,7 @@ namespace Bit.Droid.Services
|
|||
private void AskPermission(string permission)
|
||||
{
|
||||
ActivityCompat.RequestPermissions(CrossCurrentActivity.Current.Activity, new string[] { permission },
|
||||
Constants.SelectFilePermissionRequestCode);
|
||||
Core.Constants.SelectFilePermissionRequestCode);
|
||||
}
|
||||
|
||||
private List<IParcelable> GetCameraIntents(Android.Net.Uri outputUri)
|
||||
|
|
Loading…
Reference in a new issue