diff --git a/Opus/Code/Api/Services/Downloader.cs b/Opus/Code/Api/Services/Downloader.cs index f73e399..5b98131 100644 --- a/Opus/Code/Api/Services/Downloader.cs +++ b/Opus/Code/Api/Services/Downloader.cs @@ -215,7 +215,7 @@ namespace Opus.Api.Services meta.Tag.Album = title + " - " + artist; meta.Tag.Comment = youtubeID; IPicture[] pictures = new IPicture[1]; - Bitmap bitmap = Picasso.With(Application.Context).Load(await MainActivity.GetBestThumb(thumbnails)).Transform(new RemoveBlackBorder(true)).Get(); + Bitmap bitmap = Picasso.With(Application.Context).Load(await YoutubeManager.GetBestThumb(thumbnails)).Transform(new RemoveBlackBorder(true)).Get(); byte[] data; using (var MemoryStream = new MemoryStream()) { diff --git a/Opus/Code/Api/Services/MusicPlayer.cs b/Opus/Code/Api/Services/MusicPlayer.cs index 3e8e5dc..3387ae0 100644 --- a/Opus/Code/Api/Services/MusicPlayer.cs +++ b/Opus/Code/Api/Services/MusicPlayer.cs @@ -492,7 +492,7 @@ namespace Opus.Api.Services Video video = await client.GetVideoAsync(song.YoutubeID); song.Title = video.Title; song.Artist = video.Author; - song.Album = await MainActivity.GetBestThumb(new string[] { video.Thumbnails.MaxResUrl, video.Thumbnails.StandardResUrl, video.Thumbnails.HighResUrl }); + song.Album = await YoutubeManager.GetBestThumb(new string[] { video.Thumbnails.MaxResUrl, video.Thumbnails.StandardResUrl, video.Thumbnails.HighResUrl }); song.Duration = (int)video.Duration.TotalMilliseconds; Player.instance?.RefreshPlayer(); diff --git a/Opus/Code/Api/YoutubeManager.cs b/Opus/Code/Api/YoutubeManager.cs index b278bb0..14d945f 100644 --- a/Opus/Code/Api/YoutubeManager.cs +++ b/Opus/Code/Api/YoutubeManager.cs @@ -11,15 +11,18 @@ using Google.Apis.YouTube.v3.Data; using Opus.Api.Services; using Opus.DataStructure; using Opus.Fragments; +using SQLite; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Net; using System.Threading.Tasks; using TagLib; using YoutubeExplode; using YoutubeExplode.Models; using CursorLoader = Android.Support.V4.Content.CursorLoader; +using PlaylistItem = Opus.DataStructure.PlaylistItem; namespace Opus.Api { @@ -188,6 +191,41 @@ namespace Opus.Api if (names.Count > 0) DownloadFiles(names.ToArray(), videoIDs.ToArray(), playlist); } + + /// + /// Update all playlists that should be synced. + /// + public async static void SyncPlaylists() + { + if (!await MainActivity.instance.WaitForYoutube()) + return; + + ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(MainActivity.instance); + DateTime lastSync = DateTime.Parse(prefManager.GetString("syncDate", DateTime.MinValue.ToString())); + + if (lastSync.AddHours(1) > DateTime.Now || !MainActivity.instance.HasWifi()) //Make a time check, do not check if the user is downloading or if the user has just started the app two times + return; + + ISharedPreferencesEditor editor = prefManager.Edit(); + editor.PutString("syncDate", DateTime.Now.ToString()); + + List SyncedPlaylists = new List(); + await Task.Run(() => + { + SQLiteConnection db = new SQLiteConnection(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); + db.CreateTable(); + + SyncedPlaylists = db.Table().ToList(); + }); + + foreach (PlaylistItem item in SyncedPlaylists) + { + if (item.YoutubeID != null) + { + DownloadPlaylist(item.Name, item.YoutubeID, false); + } + } + } #endregion #region PlaylistsImplementation @@ -376,6 +414,33 @@ namespace Opus.Api #endregion #region Metadata + /// + /// Return the thumbnail with the greatest quality. + /// + /// This array should contains the urls of the thumbnails in this order: MaxResUrl, StandardResUrl, HighResUrl + /// + public async static Task GetBestThumb(string[] thumbnails) + { + foreach (string thumb in thumbnails) + { + HttpWebRequest request = new HttpWebRequest(new Uri(thumb)) + { + Method = "HEAD" + }; + try + { + HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync(); + + if (response.StatusCode == HttpStatusCode.OK) + return thumb; + } + catch (WebException) { } + } + + return thumbnails.Last(); + } + + /// /// Return the local path of a youtube video (if downloaded). If the video is not downloaded, return null. /// diff --git a/Opus/Code/MainActivity.cs b/Opus/Code/MainActivity.cs index d4c799c..fb49b03 100644 --- a/Opus/Code/MainActivity.cs +++ b/Opus/Code/MainActivity.cs @@ -21,10 +21,8 @@ using Android.Support.V7.App; using Android.Support.V7.Preferences; using Android.Views; using Android.Widget; -using Google.Apis.Auth.OAuth2; using Google.Apis.Services; using Google.Apis.YouTube.v3; -using Newtonsoft.Json.Linq; using Opus.Api; using Opus.Api.Services; using Opus.DataStructure; @@ -128,7 +126,7 @@ namespace Opus CheckForUpdate(this, false); HandleIntent(Intent); Login(true); - SyncPlaylists(); + YoutubeManager.SyncPlaylists(); } private void HandleIntent(Intent intent) @@ -170,6 +168,69 @@ namespace Opus } } + protected override void OnStart() + { + base.OnStart(); + CastContext = CastContext.GetSharedInstance(this); + CastContext.SessionManager.AddSessionManagerListener(this); + } + + protected override void OnResume() + { + base.OnResume(); + Paused = false; + instance = this; + + if (CastContext.SessionManager.CurrentSession == null && MusicPlayer.CurrentID() == -1) + MusicPlayer.currentID = MusicPlayer.RetrieveQueueSlot(); + else if (MusicPlayer.UseCastPlayer) + MusicPlayer.GetQueueFromCast(); + + if (SearchableActivity.instance != null && SearchableActivity.instance.SearchQuery != null && SearchableActivity.instance.SearchQuery != "") + { + SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, Pager.NewInstance(SearchableActivity.instance.SearchQuery, 0)).AddToBackStack("Youtube").Commit(); + SearchableActivity.instance = null; + } + + if (SheetBehavior != null && SheetBehavior.State == BottomSheetBehavior.StateExpanded) + FindViewById(Resource.Id.playerSheet).Visibility = ViewStates.Visible; + } + + protected override void OnDestroy() + { + YoutubeSearch.instances = null; + + if (MusicPlayer.instance != null && !MusicPlayer.isRunning && Preferences.instance == null && EditMetaData.instance == null) + { + Intent intent = new Intent(this, typeof(MusicPlayer)); + intent.SetAction("Stop"); + StartService(intent); + } + base.OnDestroy(); + } + + protected override void OnPause() + { + base.OnPause(); + Paused = true; + } + + public override void OnBackPressed() + { + if (Player.instance?.DrawerLayout.IsDrawerOpen((int)GravityFlags.Start) == true) + Player.instance?.DrawerLayout.CloseDrawer((int)GravityFlags.Start); + else if (SheetBehavior.State == BottomSheetBehavior.StateExpanded) + SheetBehavior.State = BottomSheetBehavior.StateCollapsed; + else + base.OnBackPressed(); + } + + protected override void OnNewIntent(Intent intent) + { + base.OnNewIntent(intent); + HandleIntent(intent); + } + public void SwitchTheme(int themeID) { Theme = themeID; @@ -185,345 +246,9 @@ namespace Opus } } + //UI PART - public void Login(bool canAsk = true, bool skipSilentLog = false, bool skipLastSigned = false) - { - //waitingForYoutube = true; - - //if (!skipLastSigned) - //{ - // if (account == null) - // account = GoogleSignIn.GetLastSignedInAccount(this); - - - // if (account != null) - // { - // CreateYoutube(); - // return; - // } - //} - - //This will be used only when the access has been revoked, when the refresh token has been lost or for the first loggin. - //In each case we want a refresh token so we call RequestServerAuthCode with true as the second parameter. - //GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) - // .RequestIdToken(GetString(Resource.String.clientID)) - // .RequestServerAuthCode(GetString(Resource.String.clientID), true) - // .RequestScopes(new Scope(YouTubeService.Scope.Youtube)) - // .Build(); - - //GoogleApiClient googleClient = new GoogleApiClient.Builder(this) - // .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) - // .Build(); - - //googleClient.Connect(); - - //if (!skipSilentLog) - //{ - // OptionalPendingResult silentLog = Auth.GoogleSignInApi.SilentSignIn(googleClient); - // if (silentLog.IsDone) - // { - // GoogleSignInResult result = (GoogleSignInResult)silentLog.Get(); - // if (result.IsSuccess) - // { - // account = result.SignInAccount; - // RunOnUiThread(() => { Picasso.With(this).Load(account.PhotoUrl).Transform(new CircleTransformation()).Into(new AccountTarget()); }); - // CreateYoutube(); - // } - // } - // else if (silentLog != null) - // { - // AskIntent = Auth.GoogleSignInApi.GetSignInIntent(googleClient); - // silentLog.SetResultCallback(this); - // } - // else if (canAsk) - // { - // ResumeKiller = true; - // StartActivityForResult(Auth.GoogleSignInApi.GetSignInIntent(googleClient), 1598); - // } - //} - //else if (canAsk) - //{ - //ResumeKiller = true; - //StartActivityForResult(Auth.GoogleSignInApi.GetSignInIntent(googleClient), 1598); - //} - //else - //{ - CreateYoutube(false); - //} - } - - protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data) - { - base.OnActivityResult(requestCode, resultCode, data); - if(requestCode == 1598) - { - GoogleSignInResult result = Auth.GoogleSignInApi.GetSignInResultFromIntent(data); - Console.WriteLine("&Result: " + result.ToString()); - if (result.IsSuccess) - { - account = result.SignInAccount; - RunOnUiThread(() => { Picasso.With(this).Load(account.PhotoUrl).Transform(new CircleTransformation()).Into(new AccountTarget()); }); - CreateYoutube(); - } - else - { - Console.WriteLine("&Loging error: " + result.Status); - waitingForYoutube = false; - CreateYoutube(false); - } - } - } - - public void OnResult(Java.Lang.Object result) //Silent log result - { - account = ((GoogleSignInResult)result).SignInAccount; - if (account != null) - { - RunOnUiThread(() => { Picasso.With(this).Load(account.PhotoUrl).Transform(new CircleTransformation()).Into(new AccountTarget()); }); - CreateYoutube(); - } - else if(AskIntent != null) - { - ResumeKiller = true; - StartActivityForResult(AskIntent, 1598); - AskIntent = null; - } - else - { - CreateYoutube(false); - } - } - - public /*async*/ void CreateYoutube(bool UseToken = true) - { - //if(/*!UseToken &&*/ YoutubeManager.YoutubeService == null) - //{ - YoutubeManager.YoutubeService = new YouTubeService(new BaseClientService.Initializer() - { - ApiKey = GetString(Resource.String.yt_api_key), - ApplicationName = "Opus" - }); - YoutubeManager.IsUsingAPI = true; - NextRefreshDate = DateTime.MaxValue; - Console.WriteLine("&Youtube service created - " + YoutubeManager.YoutubeService); - return; - //} - - //YoutubeManager.IsUsingAPI = false; - //NextRefreshDate = null; - //ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(this); - //string refreshToken = prefManager.GetString("refresh-token", null); - //Console.WriteLine("&Current refresh token: " + refreshToken); - - //This method do not return refresh-token if the app has already been aprouved by google for this user, should force request - //if (refreshToken == null) - //{ - //Console.WriteLine("&Getting refresh-token and creating a youtube service"); - //Console.WriteLine("&Code = " + account.ServerAuthCode); - - //if (account.ServerAuthCode == null) - //{ - // Login(true, false, true); - // return; - //} - - //Dictionary fields = new Dictionary - //{ - // { "grant_type", "authorization_code" }, - // { "client_id", GetString(Resource.String.clientID) }, - // { "client_secret", GetString(Resource.String.clientSecret) }, - // { "redirect_uri", "" }, - // { "code", account.ServerAuthCode }, - // { "id_token", account.IdToken }, - //}; - - //var items = from kvp in fields - // select kvp.Key + "=" + kvp.Value; - - //string content = string.Join("&", items); - - //try - //{ - // HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.googleapis.com/oauth2/v4/token"); - // request.Host = "www.googleapis.com"; - - // request.Method = "POST"; - // request.ContentType = "application/x-www-form-urlencoded"; - // request.ContentLength = content.Length; - - // using (StreamWriter writer = new StreamWriter(request.GetRequestStream())) - // { - // writer.Write(content); - // } - - // Console.WriteLine("&Content: " + content); - - // HttpWebResponse resp = (HttpWebResponse)await request.GetResponseAsync(); - - // string response; - // using (StreamReader responseReader = new StreamReader(request.GetResponse().GetResponseStream())) - // { - // response = responseReader.ReadToEnd(); - // } - // Console.WriteLine("&Response: " + response); - - // JToken json = JObject.Parse(response); - // GoogleCredential credential = GoogleCredential.FromAccessToken((string)json.SelectToken("access_token")); - // YoutubeManager.YoutubeService = new YouTubeService(new BaseClientService.Initializer() - // { - // HttpClientInitializer = credential, - // ApplicationName = "Opus" - // }); - - // refreshToken = (string)json.SelectToken("refresh_token"); - // if (refreshToken != null) - // { - // ISharedPreferencesEditor editor = prefManager.Edit(); - // editor.PutString("refresh-token", refreshToken); - // editor.Apply(); - // } - - // int expireIn = (int)json.SelectToken("expires_in"); - // NextRefreshDate = DateTime.UtcNow.AddSeconds(expireIn - 30); //Should refresh a bit before the expiration of the acess token - //} - //catch (WebException ex) - //{ - // Console.WriteLine("&Refresh token get error: " + ex.Message); - // CreateYoutube(false); - // UnknowError(new Action(() => { CreateYoutube(); })); - //} - //} - //else if (account != null) - //{ - // Console.WriteLine("&Getting a new access-token and creating a youtube service"); - // Dictionary fields = new Dictionary - // { - // { "refresh_token", refreshToken }, - // { "client_id", GetString(Resource.String.clientID) }, - // { "client_secret", GetString(Resource.String.clientSecret) }, - // { "grant_type", "refresh_token" }, - // }; - - // var items = from kvp in fields - // select kvp.Key + "=" + kvp.Value; - - // string content = string.Join("&", items); - - // try - // { - // HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.googleapis.com/oauth2/v4/token"); - // request.Host = "www.googleapis.com"; - - // request.Method = "POST"; - // request.ContentType = "application/x-www-form-urlencoded"; - // request.ContentLength = content.Length; - - // using (StreamWriter writer = new StreamWriter(request.GetRequestStream())) - // { - // writer.Write(content); - // } - - // Console.WriteLine("&Content: " + content); - - // HttpWebResponse resp = (HttpWebResponse)await request.GetResponseAsync(); - - // string response; - // using (StreamReader responseReader = new StreamReader(request.GetResponse().GetResponseStream())) - // { - // response = responseReader.ReadToEnd(); - // } - // Console.WriteLine("&Response: " + response); - - // JToken json = JObject.Parse(response); - // GoogleCredential credential = GoogleCredential.FromAccessToken((string)json.SelectToken("access_token")); - // YoutubeManager.YoutubeService = new YouTubeService(new BaseClientService.Initializer() - // { - // HttpClientInitializer = credential, - // ApplicationName = "Opus" - // }); - - // int expireIn = (int)json.SelectToken("expires_in"); - // NextRefreshDate = DateTime.UtcNow.AddSeconds(expireIn - 30); //Should refresh a bit before the expiration of the acess token - // } - // catch (WebException ex) - // { - // Console.WriteLine("&New access token get error: " + ex.Message + " - " + ex.StackTrace); - // CreateYoutube(false); - // UnknowError(new Action(() => { CreateYoutube(); })); - // } - //} - //else - //{ - // Login(true); - //} - } - - public void OnFailure(Request request, Java.IO.IOException iOException) - { - Console.WriteLine("&Failure"); - } - - public void OnConnectionFailed(ConnectionResult result) - { - Console.WriteLine("&Connection Failed: " + result.ErrorMessage); - } - - public async Task WaitForYoutube(bool silentWait = false) - { - if(YoutubeManager.YoutubeService == null) - { - if(!waitingForYoutube) - Login(!silentWait); - - waitingForYoutube = true; - - if(silentWait) - { - int i = 0; - while (true) - { - await Task.Delay(10); - i++; - - if (YoutubeManager.YoutubeService == null) - return true; - else if (i > 1000) //10 seconds timout - return false; - } - } - else - { - while (YoutubeManager.YoutubeService == null) - { - if (waitingForYoutube == false) - return false; - - await Task.Delay(10); - } - } - } - else if(NextRefreshDate == null || NextRefreshDate <= DateTime.UtcNow) //Acess token has expired - { - waitingForYoutube = true; - CreateYoutube(); - } - waitingForYoutube = false; - return true; - } - - public void Scroll(object sender, AbsListView.ScrollEventArgs e) - { - contentRefresh.Enabled = e.FirstVisibleItem == 0; - - if(PlaylistTracks.instance != null) - { - if (e.FirstVisibleItem + e.VisibleItemCount == e.TotalItemCount) - PlaylistTracks.instance.lastVisible = true; - else - PlaylistTracks.instance.lastVisible = false; - } - } - + #region Toolbar menu (right items) public override bool OnCreateOptionsMenu(IMenu menu) { if (NoToolbarMenu) @@ -563,7 +288,6 @@ namespace Opus } SupportFragmentManager.PopBackStack(); - //SupportFragmentManager.BeginTransaction().Remove(PlaylistTracks.instance).Commit(); } else if (YoutubeSearch.instances != null) { @@ -575,10 +299,6 @@ namespace Opus SupportActionBar.SetDisplayHomeAsUpEnabled(false); YoutubeSearch.instances = null; } - //else if (FolderTracks.instance != null) - //{ - // SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, Pager.NewInstance(0, 1)).Commit(); - //} } else if(item.ItemId == Resource.Id.search) { @@ -594,15 +314,9 @@ namespace Opus public bool OnMenuItemActionCollapse(IMenuItem item) //Youtube search collapse { - Console.WriteLine("&Youtube Search Collapse"); if (YoutubeSearch.instances == null || SearchableActivity.IgnoreMyself) return true; - Console.WriteLine("&Youtube instnace != null"); - for (int i = 0; i < SupportFragmentManager.BackStackEntryCount; i++) - { - Console.WriteLine("&Back stack entry " + i + ": " + SupportFragmentManager.GetBackStackEntryAt(i)); - } SupportFragmentManager.PopBackStack(); return true; } @@ -665,7 +379,9 @@ namespace Opus searchView.ClearFocus(); searchView.OnActionViewCollapsed(); } + #endregion + #region BottomNavigation private void PreNavigate(object sender, BottomNavigationView.NavigationItemSelectedEventArgs e) { Navigate(e.Item.ItemId); @@ -737,7 +453,9 @@ namespace Opus SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, fragment).SetCustomAnimations(Android.Resource.Animation.FadeIn, Android.Resource.Animation.FadeOut).Commit(); } + #endregion + #region SmallPlayer public void PrepareSmallPlayer() { FrameLayout smallPlayer = FindViewById(Resource.Id.smallPlayer); @@ -813,102 +531,9 @@ namespace Opus SheetBehavior.State = BottomSheetBehavior.StateHidden; FindViewById(Resource.Id.playerSheet).Visibility = ViewStates.Gone; } + #endregion - public bool HasReadPermission() - { - if (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadExternalStorage) == (int)Permission.Granted) - return true; - else - return false; - } - - public async Task GetReadPermission(bool ask = true) - { - if (HasReadPermission()) - return true; - PermissionGot = null; - - if(ask) - { - string[] permissions = new string[] { Manifest.Permission.ReadExternalStorage }; - RequestPermissions(permissions, RequestCode); - } - - while (PermissionGot == null) - await Task.Delay(10); - - return (bool)PermissionGot; - } - - public async Task GetWritePermission() - { - const string permission = Manifest.Permission.WriteExternalStorage; - if (ContextCompat.CheckSelfPermission(this, permission) == (int)Permission.Granted) - { - return true; - } - PermissionGot = null; - string[] permissions = new string[] { permission }; - RequestPermissions(permissions, RequestCode); - - while (PermissionGot == null) - await Task.Delay(10); - - return (bool)PermissionGot; - } - - public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) - { - if (requestCode == RequestCode) - { - if (grantResults.Length > 0) - { - if (grantResults[0] == Permission.Granted) - PermissionGot = true; - else - { - PermissionGot = false; - Snackbar snackBar = Snackbar.Make(FindViewById(Resource.Id.snackBar), Resource.String.no_permission, Snackbar.LengthLong); - snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); - snackBar.Show(); - } - } - } - else if (requestCode == WriteRequestCode) - { - if (grantResults[0] == Permission.Granted) - PermissionGot = true; - else - { - PermissionGot = false; - Snackbar snackBar = Snackbar.Make(FindViewById(Resource.Id.snackBar), Resource.String.no_permission, Snackbar.LengthLong); - snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); - snackBar.Show(); - } - } - } - - public async static Task GetBestThumb(string[] thumbnails) - { - foreach (string thumb in thumbnails) - { - HttpWebRequest request = new HttpWebRequest(new System.Uri(thumb)) - { - Method = "HEAD" - }; - try - { - HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync(); - - if (response.StatusCode == HttpStatusCode.OK) - return thumb; - } - catch (WebException) { } - } - - return thumbnails.Last(); - } - + #region Snackbars public void YoutubeEndPointChanged() { FindViewById(Resource.Id.ytProgress).Visibility = ViewStates.Gone; @@ -930,7 +555,7 @@ namespace Opus { Snackbar snackBar = Snackbar.Make(FindViewById(Resource.Id.snackBar), Resource.String.unknow, Snackbar.LengthIndefinite); if (action != null) - snackBar.SetAction("Try Again", (sender) => { action.Invoke(); snackBar.Dismiss(); }); + snackBar.SetAction("Try Again", (sender) => { action.Invoke(); snackBar.Dismiss(); }); else snackBar.SetAction("Dismiss", (sender) => { snackBar.Dismiss(); }); snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); @@ -945,7 +570,7 @@ namespace Opus snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); snackBar.Show(); } - else if(msg.Contains("not available")) + else if (msg.Contains("not available")) { Snackbar snackBar = Snackbar.Make(FindViewById(Resource.Id.snackBar), title + " " + GetString(Resource.String.not_streamable), Snackbar.LengthLong); snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); @@ -961,86 +586,12 @@ namespace Opus snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); snackBar.Show(); } + #endregion - public int DpToPx(int dx) - { - float scale = Resources.DisplayMetrics.Density; - return (int) (dx * scale + 0.5f); - } - - public static bool HasInternet() - { - ConnectivityManager connectivityManager = (ConnectivityManager)Application.Context.GetSystemService(ConnectivityService); - NetworkInfo activeNetworkInfo = connectivityManager.ActiveNetworkInfo; - if (activeNetworkInfo == null || !activeNetworkInfo.IsConnected) - return false; - - return true; - } - - bool HasWifi() - { - ConnectivityManager connectivityManager = (ConnectivityManager)Application.Context.GetSystemService(ConnectivityService); - if(Build.VERSION.SdkInt >= BuildVersionCodes.M) - { - Network network = connectivityManager.ActiveNetwork; - if (network == null) - return false; - - NetworkCapabilities capabilities = connectivityManager.GetNetworkCapabilities(network); - if (capabilities.HasTransport(TransportType.Wifi) || capabilities.HasTransport(TransportType.Ethernet)) - return true; - } - else - { - Network[] allNetworks = connectivityManager.GetAllNetworks(); - for (int i = 0; i < allNetworks.Length; i++) - { -#pragma warning disable CS0618 // Type or member is obsolete - if (allNetworks[i] != null && connectivityManager.GetNetworkInfo(allNetworks[i]).IsConnected && connectivityManager.GetNetworkInfo(allNetworks[i]).Type == ConnectivityType.Wifi) -#pragma warning restore CS0618 // Type or member is obsolete - return true; - } - } - - return false; - } - - private async void SyncPlaylists() - { - if (!await WaitForYoutube()) - return; - - ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(this); - DateTime lastSync = DateTime.Parse(prefManager.GetString("syncDate", DateTime.MinValue.ToString())); - - if (lastSync.AddHours(1) > DateTime.Now || !HasWifi()) //Make a time check, do not check if the user is downloading or if the user has just started the app two times - return; - - ISharedPreferencesEditor editor = prefManager.Edit(); - editor.PutString("syncDate", DateTime.Now.ToString()); - - List SyncedPlaylists = new List(); - await Task.Run(() => - { - SQLiteConnection db = new SQLiteConnection(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); - db.CreateTable(); - - SyncedPlaylists = db.Table().ToList(); - }); - - foreach (PlaylistItem item in SyncedPlaylists) - { - if (item.YoutubeID != null) - { - YoutubeManager.DownloadPlaylist(item.Name, item.YoutubeID, false); - } - } - } - + #region Updater public async static void CheckForUpdate(Activity activity, bool displayToast) { - if(!HasInternet()) + if (!HasInternet()) { if (displayToast) { @@ -1050,7 +601,7 @@ namespace Opus snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); snackBar.Show(); } - if(Preferences.instance != null) + if (Preferences.instance != null) { Snackbar snackBar = Snackbar.Make(Preferences.instance.FindViewById(Android.Resource.Id.Content), activity.GetString(Resource.String.update_no_internet), Snackbar.LengthLong); snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); @@ -1078,7 +629,7 @@ namespace Opus string downloadPath; bool beta = false; - using(WebClient client = new WebClient()) + using (WebClient client = new WebClient()) { string GitVersion = await client.DownloadStringTaskAsync(new System.Uri(versionURI)); gitVersionID = GitVersion.Substring(9, 5); @@ -1167,82 +718,462 @@ namespace Opus Application.Context.StartActivity(intent); } } + #endregion - protected override void OnStart() + //API PART THAT NEED CONTEXT TO WORK (SO THEY ARE HERE) + + #region Login with google services and creation of the youtube service object + public void Login(bool canAsk = true, bool skipSilentLog = false, bool skipLastSigned = false) { - base.OnStart(); - CastContext = CastContext.GetSharedInstance(this); - CastContext.SessionManager.AddSessionManagerListener(this); + //waitingForYoutube = true; + + //if (!skipLastSigned) + //{ + // if (account == null) + // account = GoogleSignIn.GetLastSignedInAccount(this); + + + // if (account != null) + // { + // CreateYoutube(); + // return; + // } + //} + + //This will be used only when the access has been revoked, when the refresh token has been lost or for the first loggin. + //In each case we want a refresh token so we call RequestServerAuthCode with true as the second parameter. + //GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) + // .RequestIdToken(GetString(Resource.String.clientID)) + // .RequestServerAuthCode(GetString(Resource.String.clientID), true) + // .RequestScopes(new Scope(YouTubeService.Scope.Youtube)) + // .Build(); + + //GoogleApiClient googleClient = new GoogleApiClient.Builder(this) + // .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) + // .Build(); + + //googleClient.Connect(); + + //if (!skipSilentLog) + //{ + // OptionalPendingResult silentLog = Auth.GoogleSignInApi.SilentSignIn(googleClient); + // if (silentLog.IsDone) + // { + // GoogleSignInResult result = (GoogleSignInResult)silentLog.Get(); + // if (result.IsSuccess) + // { + // account = result.SignInAccount; + // RunOnUiThread(() => { Picasso.With(this).Load(account.PhotoUrl).Transform(new CircleTransformation()).Into(new AccountTarget()); }); + // CreateYoutube(); + // } + // } + // else if (silentLog != null) + // { + // AskIntent = Auth.GoogleSignInApi.GetSignInIntent(googleClient); + // silentLog.SetResultCallback(this); + // } + // else if (canAsk) + // { + // ResumeKiller = true; + // StartActivityForResult(Auth.GoogleSignInApi.GetSignInIntent(googleClient), 1598); + // } + //} + //else if (canAsk) + //{ + //ResumeKiller = true; + //StartActivityForResult(Auth.GoogleSignInApi.GetSignInIntent(googleClient), 1598); + //} + //else + //{ + CreateYoutube(false); + //} } - protected override void OnResume() + protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data) { - base.OnResume(); - Paused = false; - instance = this; - - if (CastContext.SessionManager.CurrentSession == null && MusicPlayer.CurrentID() == -1) - MusicPlayer.currentID = MusicPlayer.RetrieveQueueSlot(); - else if(MusicPlayer.UseCastPlayer) - MusicPlayer.GetQueueFromCast(); - - if (SearchableActivity.instance != null && SearchableActivity.instance.SearchQuery != null && SearchableActivity.instance.SearchQuery != "") + base.OnActivityResult(requestCode, resultCode, data); + if (requestCode == 1598) { -// if (YoutubeEngine.instances != null) -// { -//#pragma warning disable CS4014 -// foreach (YoutubeEngine instance in YoutubeEngine.instances) -// instance.Search(SearchableActivity.instance.SearchQuery, instance.querryType, true); - -// SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, Pager.instance).AddToBackStack("Youtube").Commit(); -// } -// else - SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, Pager.NewInstance(SearchableActivity.instance.SearchQuery, 0)).AddToBackStack("Youtube").Commit(); - - SearchableActivity.instance = null; + GoogleSignInResult result = Auth.GoogleSignInApi.GetSignInResultFromIntent(data); + Console.WriteLine("&Result: " + result.ToString()); + if (result.IsSuccess) + { + account = result.SignInAccount; + RunOnUiThread(() => { Picasso.With(this).Load(account.PhotoUrl).Transform(new CircleTransformation()).Into(new AccountTarget()); }); + CreateYoutube(); + } + else + { + Console.WriteLine("&Loging error: " + result.Status); + waitingForYoutube = false; + CreateYoutube(false); + } } - - if (SheetBehavior != null && SheetBehavior.State == BottomSheetBehavior.StateExpanded) - FindViewById(Resource.Id.playerSheet).Visibility = ViewStates.Visible; } - protected override void OnDestroy() + public void OnResult(Java.Lang.Object result) //Silent log result { - YoutubeSearch.instances = null; - - if (MusicPlayer.instance != null && !MusicPlayer.isRunning && Preferences.instance == null && EditMetaData.instance == null) + account = ((GoogleSignInResult)result).SignInAccount; + if (account != null) { - Intent intent = new Intent(this, typeof(MusicPlayer)); - intent.SetAction("Stop"); - StartService(intent); + RunOnUiThread(() => { Picasso.With(this).Load(account.PhotoUrl).Transform(new CircleTransformation()).Into(new AccountTarget()); }); + CreateYoutube(); + } + else if (AskIntent != null) + { + ResumeKiller = true; + StartActivityForResult(AskIntent, 1598); + AskIntent = null; } - base.OnDestroy(); - } - - protected override void OnPause() - { - base.OnPause(); - Paused = true; - } - - public override void OnBackPressed() - { - if (Player.instance?.DrawerLayout.IsDrawerOpen((int)GravityFlags.Start) == true) - Player.instance?.DrawerLayout.CloseDrawer((int)GravityFlags.Start); - else if (SheetBehavior.State == BottomSheetBehavior.StateExpanded) - SheetBehavior.State = BottomSheetBehavior.StateCollapsed; else - base.OnBackPressed(); + { + CreateYoutube(false); + } } - protected override void OnNewIntent(Intent intent) + public /*async*/ void CreateYoutube(bool UseToken = true) { - base.OnNewIntent(intent); - HandleIntent(intent); + //if(/*!UseToken &&*/ YoutubeManager.YoutubeService == null) + //{ + YoutubeManager.YoutubeService = new YouTubeService(new BaseClientService.Initializer() + { + ApiKey = GetString(Resource.String.yt_api_key), + ApplicationName = "Opus" + }); + YoutubeManager.IsUsingAPI = true; + NextRefreshDate = DateTime.MaxValue; + Console.WriteLine("&Youtube service created - " + YoutubeManager.YoutubeService); + return; + //} + + //YoutubeManager.IsUsingAPI = false; + //NextRefreshDate = null; + //ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(this); + //string refreshToken = prefManager.GetString("refresh-token", null); + //Console.WriteLine("&Current refresh token: " + refreshToken); + + //This method do not return refresh-token if the app has already been aprouved by google for this user, should force request + //if (refreshToken == null) + //{ + //Console.WriteLine("&Getting refresh-token and creating a youtube service"); + //Console.WriteLine("&Code = " + account.ServerAuthCode); + + //if (account.ServerAuthCode == null) + //{ + // Login(true, false, true); + // return; + //} + + //Dictionary fields = new Dictionary + //{ + // { "grant_type", "authorization_code" }, + // { "client_id", GetString(Resource.String.clientID) }, + // { "client_secret", GetString(Resource.String.clientSecret) }, + // { "redirect_uri", "" }, + // { "code", account.ServerAuthCode }, + // { "id_token", account.IdToken }, + //}; + + //var items = from kvp in fields + // select kvp.Key + "=" + kvp.Value; + + //string content = string.Join("&", items); + + //try + //{ + // HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.googleapis.com/oauth2/v4/token"); + // request.Host = "www.googleapis.com"; + + // request.Method = "POST"; + // request.ContentType = "application/x-www-form-urlencoded"; + // request.ContentLength = content.Length; + + // using (StreamWriter writer = new StreamWriter(request.GetRequestStream())) + // { + // writer.Write(content); + // } + + // Console.WriteLine("&Content: " + content); + + // HttpWebResponse resp = (HttpWebResponse)await request.GetResponseAsync(); + + // string response; + // using (StreamReader responseReader = new StreamReader(request.GetResponse().GetResponseStream())) + // { + // response = responseReader.ReadToEnd(); + // } + // Console.WriteLine("&Response: " + response); + + // JToken json = JObject.Parse(response); + // GoogleCredential credential = GoogleCredential.FromAccessToken((string)json.SelectToken("access_token")); + // YoutubeManager.YoutubeService = new YouTubeService(new BaseClientService.Initializer() + // { + // HttpClientInitializer = credential, + // ApplicationName = "Opus" + // }); + + // refreshToken = (string)json.SelectToken("refresh_token"); + // if (refreshToken != null) + // { + // ISharedPreferencesEditor editor = prefManager.Edit(); + // editor.PutString("refresh-token", refreshToken); + // editor.Apply(); + // } + + // int expireIn = (int)json.SelectToken("expires_in"); + // NextRefreshDate = DateTime.UtcNow.AddSeconds(expireIn - 30); //Should refresh a bit before the expiration of the acess token + //} + //catch (WebException ex) + //{ + // Console.WriteLine("&Refresh token get error: " + ex.Message); + // CreateYoutube(false); + // UnknowError(new Action(() => { CreateYoutube(); })); + //} + //} + //else if (account != null) + //{ + // Console.WriteLine("&Getting a new access-token and creating a youtube service"); + // Dictionary fields = new Dictionary + // { + // { "refresh_token", refreshToken }, + // { "client_id", GetString(Resource.String.clientID) }, + // { "client_secret", GetString(Resource.String.clientSecret) }, + // { "grant_type", "refresh_token" }, + // }; + + // var items = from kvp in fields + // select kvp.Key + "=" + kvp.Value; + + // string content = string.Join("&", items); + + // try + // { + // HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.googleapis.com/oauth2/v4/token"); + // request.Host = "www.googleapis.com"; + + // request.Method = "POST"; + // request.ContentType = "application/x-www-form-urlencoded"; + // request.ContentLength = content.Length; + + // using (StreamWriter writer = new StreamWriter(request.GetRequestStream())) + // { + // writer.Write(content); + // } + + // Console.WriteLine("&Content: " + content); + + // HttpWebResponse resp = (HttpWebResponse)await request.GetResponseAsync(); + + // string response; + // using (StreamReader responseReader = new StreamReader(request.GetResponse().GetResponseStream())) + // { + // response = responseReader.ReadToEnd(); + // } + // Console.WriteLine("&Response: " + response); + + // JToken json = JObject.Parse(response); + // GoogleCredential credential = GoogleCredential.FromAccessToken((string)json.SelectToken("access_token")); + // YoutubeManager.YoutubeService = new YouTubeService(new BaseClientService.Initializer() + // { + // HttpClientInitializer = credential, + // ApplicationName = "Opus" + // }); + + // int expireIn = (int)json.SelectToken("expires_in"); + // NextRefreshDate = DateTime.UtcNow.AddSeconds(expireIn - 30); //Should refresh a bit before the expiration of the acess token + // } + // catch (WebException ex) + // { + // Console.WriteLine("&New access token get error: " + ex.Message + " - " + ex.StackTrace); + // CreateYoutube(false); + // UnknowError(new Action(() => { CreateYoutube(); })); + // } + //} + //else + //{ + // Login(true); + //} } + public void OnFailure(Request request, Java.IO.IOException iOException) + { + Console.WriteLine("&Failure"); + } - //SessionManagerListener + public void OnConnectionFailed(ConnectionResult result) + { + Console.WriteLine("&Connection Failed: " + result.ErrorMessage); + } + + public async Task WaitForYoutube(bool silentWait = false) + { + if (YoutubeManager.YoutubeService == null) + { + if (!waitingForYoutube) + Login(!silentWait); + + waitingForYoutube = true; + + if (silentWait) + { + int i = 0; + while (true) + { + await Task.Delay(10); + i++; + + if (YoutubeManager.YoutubeService == null) + return true; + else if (i > 1000) //10 seconds timout + return false; + } + } + else + { + while (YoutubeManager.YoutubeService == null) + { + if (waitingForYoutube == false) + return false; + + await Task.Delay(10); + } + } + } + else if (NextRefreshDate == null || NextRefreshDate <= DateTime.UtcNow) //Acess token has expired + { + waitingForYoutube = true; + CreateYoutube(); + } + waitingForYoutube = false; + return true; + } + #endregion + + #region Permission Request + public bool HasReadPermission() + { + if (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadExternalStorage) == (int)Permission.Granted) + return true; + else + return false; + } + + public async Task GetReadPermission(bool ask = true) + { + if (HasReadPermission()) + return true; + PermissionGot = null; + + if (ask) + { + string[] permissions = new string[] { Manifest.Permission.ReadExternalStorage }; + RequestPermissions(permissions, RequestCode); + } + + while (PermissionGot == null) + await Task.Delay(10); + + return (bool)PermissionGot; + } + + public async Task GetWritePermission() + { + const string permission = Manifest.Permission.WriteExternalStorage; + if (ContextCompat.CheckSelfPermission(this, permission) == (int)Permission.Granted) + { + return true; + } + PermissionGot = null; + string[] permissions = new string[] { permission }; + RequestPermissions(permissions, RequestCode); + + while (PermissionGot == null) + await Task.Delay(10); + + return (bool)PermissionGot; + } + + public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) + { + if (requestCode == RequestCode) + { + if (grantResults.Length > 0) + { + if (grantResults[0] == Permission.Granted) + PermissionGot = true; + else + { + PermissionGot = false; + Snackbar snackBar = Snackbar.Make(FindViewById(Resource.Id.snackBar), Resource.String.no_permission, Snackbar.LengthLong); + snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); + snackBar.Show(); + } + } + } + else if (requestCode == WriteRequestCode) + { + if (grantResults[0] == Permission.Granted) + PermissionGot = true; + else + { + PermissionGot = false; + Snackbar snackBar = Snackbar.Make(FindViewById(Resource.Id.snackBar), Resource.String.no_permission, Snackbar.LengthLong); + snackBar.View.FindViewById(Resource.Id.snackbar_text).SetTextColor(Color.White); + snackBar.Show(); + } + } + } + #endregion + + #region Has Wifi + public static bool HasInternet() + { + ConnectivityManager connectivityManager = (ConnectivityManager)Application.Context.GetSystemService(ConnectivityService); + NetworkInfo activeNetworkInfo = connectivityManager.ActiveNetworkInfo; + if (activeNetworkInfo == null || !activeNetworkInfo.IsConnected) + return false; + + return true; + } + + public bool HasWifi() + { + ConnectivityManager connectivityManager = (ConnectivityManager)Application.Context.GetSystemService(ConnectivityService); + if (Build.VERSION.SdkInt >= BuildVersionCodes.M) + { + Network network = connectivityManager.ActiveNetwork; + if (network == null) + return false; + + NetworkCapabilities capabilities = connectivityManager.GetNetworkCapabilities(network); + if (capabilities.HasTransport(TransportType.Wifi) || capabilities.HasTransport(TransportType.Ethernet)) + return true; + } + else + { + Network[] allNetworks = connectivityManager.GetAllNetworks(); + for (int i = 0; i < allNetworks.Length; i++) + { +#pragma warning disable CS0618 // Type or member is obsolete + if (allNetworks[i] != null && connectivityManager.GetNetworkInfo(allNetworks[i]).IsConnected && connectivityManager.GetNetworkInfo(allNetworks[i]).Type == ConnectivityType.Wifi) +#pragma warning restore CS0618 // Type or member is obsolete + return true; + } + } + + return false; + } + #endregion + + #region Convert density pixels to screen pixels + public int DpToPx(int dx) + { + float scale = Resources.DisplayMetrics.Density; + return (int)(dx * scale + 0.5f); + } + #endregion + + #region Chromcast session manager public void OnSessionEnded(Java.Lang.Object session, int error) { Console.WriteLine("&Session Ended"); @@ -1333,5 +1264,6 @@ namespace Opus } } } +#endregion } } \ No newline at end of file diff --git a/Opus/Code/UI/Fragments/EditMetaData.cs b/Opus/Code/UI/Fragments/EditMetaData.cs index 4209265..728b75c 100644 --- a/Opus/Code/UI/Fragments/EditMetaData.cs +++ b/Opus/Code/UI/Fragments/EditMetaData.cs @@ -11,6 +11,7 @@ using Android.Support.V7.App; using Android.Util; using Android.Views; using Android.Widget; +using Opus.Api; using Opus.DataStructure; using Opus.Others; using Square.Picasso; @@ -331,7 +332,7 @@ namespace Opus.Fragments album.Text = video.Title + " - " + video.Author; } - ytThumbUri = await MainActivity.GetBestThumb(new string[] { video.Thumbnails.MaxResUrl, video.Thumbnails.StandardResUrl, video.Thumbnails.HighResUrl }); + ytThumbUri = await YoutubeManager.GetBestThumb(new string[] { video.Thumbnails.MaxResUrl, video.Thumbnails.StandardResUrl, video.Thumbnails.HighResUrl }); Picasso.With(this).Load(ytThumbUri).Placeholder(Resource.Drawable.noAlbum).Transform(new RemoveBlackBorder(true)).MemoryPolicy(MemoryPolicy.NoCache, MemoryPolicy.NoStore).Into(albumArt); } diff --git a/Opus/Code/UI/Fragments/PlaylistTracks.cs b/Opus/Code/UI/Fragments/PlaylistTracks.cs index fdd41a2..e999ea9 100644 --- a/Opus/Code/UI/Fragments/PlaylistTracks.cs +++ b/Opus/Code/UI/Fragments/PlaylistTracks.cs @@ -69,8 +69,8 @@ namespace Opus.Fragments #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed if(useHeader) CreateHeader(); - if (item.SyncState == SyncState.Error) - CreateSyncBanner(); + //if (item.SyncState == SyncState.Error) + // CreateSyncBanner(); return view; } diff --git a/Opus/Resources/Resource.Designer.cs b/Opus/Resources/Resource.Designer.cs index 03c433b..6106a47 100644 --- a/Opus/Resources/Resource.Designer.cs +++ b/Opus/Resources/Resource.Designer.cs @@ -4991,8 +4991,8 @@ namespace Opus // aapt resource value: 0x7f0b0065 public const int META = 2131427429; - // aapt resource value: 0x7f0b01b7 - public const int PreferenceScreen = 2131427767; + // aapt resource value: 0x7f0b01b3 + public const int PreferenceScreen = 2131427763; // aapt resource value: 0x7f0b0066 public const int SHIFT = 2131427430; @@ -5000,14 +5000,14 @@ namespace Opus // aapt resource value: 0x7f0b0067 public const int SYM = 2131427431; - // aapt resource value: 0x7f0b01b9 - public const int accountPreference = 2131427769; + // aapt resource value: 0x7f0b01b5 + public const int accountPreference = 2131427765; // aapt resource value: 0x7f0b00fd public const int action = 2131427581; - // aapt resource value: 0x7f0b0180 - public const int action0 = 2131427712; + // aapt resource value: 0x7f0b017c + public const int action0 = 2131427708; // aapt resource value: 0x7f0b00bc public const int action_bar = 2131427516; @@ -5030,17 +5030,17 @@ namespace Opus // aapt resource value: 0x7f0b0098 public const int action_bar_title = 2131427480; - // aapt resource value: 0x7f0b017d - public const int action_container = 2131427709; + // aapt resource value: 0x7f0b0179 + public const int action_container = 2131427705; // aapt resource value: 0x7f0b00bd public const int action_context_bar = 2131427517; - // aapt resource value: 0x7f0b0184 - public const int action_divider = 2131427716; + // aapt resource value: 0x7f0b0180 + public const int action_divider = 2131427712; - // aapt resource value: 0x7f0b017e - public const int action_image = 2131427710; + // aapt resource value: 0x7f0b017a + public const int action_image = 2131427706; // aapt resource value: 0x7f0b0010 public const int action_menu_divider = 2131427344; @@ -5057,11 +5057,11 @@ namespace Opus // aapt resource value: 0x7f0b009a public const int action_mode_close_button = 2131427482; - // aapt resource value: 0x7f0b017f - public const int action_text = 2131427711; + // aapt resource value: 0x7f0b017b + public const int action_text = 2131427707; - // aapt resource value: 0x7f0b018d - public const int actions = 2131427725; + // aapt resource value: 0x7f0b0189 + public const int actions = 2131427721; // aapt resource value: 0x7f0b009b public const int activity_chooser_view_content = 2131427483; @@ -5087,8 +5087,8 @@ namespace Opus // aapt resource value: 0x7f0b0057 public const int add = 2131427415; - // aapt resource value: 0x7f0b01d6 - public const int addToQueue = 2131427798; + // aapt resource value: 0x7f0b01d2 + public const int addToQueue = 2131427794; // aapt resource value: 0x7f0b00cc public const int added = 2131427532; @@ -5111,17 +5111,17 @@ namespace Opus // aapt resource value: 0x7f0b0068 public const int always = 2131427432; - // aapt resource value: 0x7f0b01c1 - public const int apAlbum = 2131427777; + // aapt resource value: 0x7f0b01bd + public const int apAlbum = 2131427773; - // aapt resource value: 0x7f0b01c3 - public const int apTitle = 2131427779; + // aapt resource value: 0x7f0b01bf + public const int apTitle = 2131427775; // aapt resource value: 0x7f0b0119 public const int appbar = 2131427609; - // aapt resource value: 0x7f0b01af - public const int artist = 2131427759; + // aapt resource value: 0x7f0b01ab + public const int artist = 2131427755; // aapt resource value: 0x7f0b008d public const int async = 2131427469; @@ -5132,8 +5132,8 @@ namespace Opus // aapt resource value: 0x7f0b004b public const int auto = 2131427403; - // aapt resource value: 0x7f0b01c0 - public const int autoplay = 2131427776; + // aapt resource value: 0x7f0b01bc + public const int autoplay = 2131427772; // aapt resource value: 0x7f0b011d public const int backToolbar = 2131427613; @@ -5144,23 +5144,11 @@ namespace Opus // aapt resource value: 0x7f0b00dd public const int background_place_holder_image_view = 2131427549; - // aapt resource value: 0x7f0b0136 - public const int banner = 2131427638; - - // aapt resource value: 0x7f0b0138 - public const int bannerBtn1 = 2131427640; - - // aapt resource value: 0x7f0b0139 - public const int bannerBtn2 = 2131427641; - - // aapt resource value: 0x7f0b0137 - public const int bannerText = 2131427639; - // aapt resource value: 0x7f0b005f public const int beginning = 2131427423; - // aapt resource value: 0x7f0b01b8 - public const int behavior = 2131427768; + // aapt resource value: 0x7f0b01b4 + public const int behavior = 2131427764; // aapt resource value: 0x7f0b008e public const int blocking = 2131427470; @@ -5171,14 +5159,14 @@ namespace Opus // aapt resource value: 0x7f0b006d public const int bottom = 2131427437; - // aapt resource value: 0x7f0b01be - public const int bottomDivider = 2131427774; + // aapt resource value: 0x7f0b01ba + public const int bottomDivider = 2131427770; - // aapt resource value: 0x7f0b013c - public const int bottomView = 2131427644; + // aapt resource value: 0x7f0b0138 + public const int bottomView = 2131427640; - // aapt resource value: 0x7f0b01d1 - public const int browseLayout = 2131427793; + // aapt resource value: 0x7f0b01cd + public const int browseLayout = 2131427789; // aapt resource value: 0x7f0b00d7 public const int browseList = 2131427543; @@ -5216,14 +5204,14 @@ namespace Opus // aapt resource value: 0x7f0b00ee public const int button_play_pause_toggle = 2131427566; - // aapt resource value: 0x7f0b0194 - public const int buttonsRight = 2131427732; + // aapt resource value: 0x7f0b0190 + public const int buttonsRight = 2131427728; - // aapt resource value: 0x7f0b0181 - public const int cancel_action = 2131427713; + // aapt resource value: 0x7f0b017d + public const int cancel_action = 2131427709; - // aapt resource value: 0x7f0b0195 - public const int castButton = 2131427733; + // aapt resource value: 0x7f0b0191 + public const int castButton = 2131427729; // aapt resource value: 0x7f0b0000 public const int cast_button_type_closed_caption = 2131427328; @@ -5282,8 +5270,8 @@ namespace Opus // aapt resource value: 0x7f0b00b5 public const int checkbox = 2131427509; - // aapt resource value: 0x7f0b0189 - public const int chronometer = 2131427721; + // aapt resource value: 0x7f0b0185 + public const int chronometer = 2131427717; // aapt resource value: 0x7f0b0089 public const int clip_horizontal = 2131427465; @@ -5315,11 +5303,11 @@ namespace Opus // aapt resource value: 0x7f0b00a4 public const int contentPanel = 2131427492; - // aapt resource value: 0x7f0b013a - public const int contentRefresh = 2131427642; + // aapt resource value: 0x7f0b0136 + public const int contentRefresh = 2131427638; - // aapt resource value: 0x7f0b013b - public const int contentView = 2131427643; + // aapt resource value: 0x7f0b0137 + public const int contentView = 2131427639; // aapt resource value: 0x7f0b00dc public const int controllers = 2131427548; @@ -5342,8 +5330,8 @@ namespace Opus // aapt resource value: 0x7f0b009e public const int default_activity_button = 2131427486; - // aapt resource value: 0x7f0b01d3 - public const int delete = 2131427795; + // aapt resource value: 0x7f0b01cf + public const int delete = 2131427791; // aapt resource value: 0x7f0b010e public const int design_bottom_sheet = 2131427598; @@ -5366,20 +5354,20 @@ namespace Opus // aapt resource value: 0x7f0b00d0 public const int divider = 2131427536; - // aapt resource value: 0x7f0b0196 - public const int downButton = 2131427734; + // aapt resource value: 0x7f0b0192 + public const int downButton = 2131427730; - // aapt resource value: 0x7f0b01dc - public const int download = 2131427804; + // aapt resource value: 0x7f0b01d8 + public const int download = 2131427800; - // aapt resource value: 0x7f0b01d4 - public const int downloadMDfromYT = 2131427796; + // aapt resource value: 0x7f0b01d0 + public const int downloadMDfromYT = 2131427792; // aapt resource value: 0x7f0b0116 public const int downloadStatus = 2131427606; - // aapt resource value: 0x7f0b01b0 - public const int edit = 2131427760; + // aapt resource value: 0x7f0b01ac + public const int edit = 2131427756; // aapt resource value: 0x7f0b00be public const int edit_query = 2131427518; @@ -5393,8 +5381,8 @@ namespace Opus // aapt resource value: 0x7f0b0060 public const int end = 2131427424; - // aapt resource value: 0x7f0b018f - public const int end_padder = 2131427727; + // aapt resource value: 0x7f0b018b + public const int end_padder = 2131427723; // aapt resource value: 0x7f0b00e8 public const int end_text = 2131427560; @@ -5483,8 +5471,8 @@ namespace Opus // aapt resource value: 0x7f0b0128 public const int expendChilds = 2131427624; - // aapt resource value: 0x7f0b019a - public const int fav = 2131427738; + // aapt resource value: 0x7f0b0196 + public const int fav = 2131427734; // aapt resource value: 0x7f0b0117 public const int fileName = 2131427607; @@ -5501,8 +5489,8 @@ namespace Opus // aapt resource value: 0x7f0b0087 public const int filled = 2131427463; - // aapt resource value: 0x7f0b01d9 - public const int filter = 2131427801; + // aapt resource value: 0x7f0b01d5 + public const int filter = 2131427797; // aapt resource value: 0x7f0b0092 public const int fit = 2131427474; @@ -5528,8 +5516,8 @@ namespace Opus // aapt resource value: 0x7f0b008f public const int forever = 2131427471; - // aapt resource value: 0x7f0b01dd - public const int fork = 2131427805; + // aapt resource value: 0x7f0b01d9 + public const int fork = 2131427801; // aapt resource value: 0x7f0b0017 public const int ghost_view = 2131427351; @@ -5537,26 +5525,26 @@ namespace Opus // aapt resource value: 0x7f0b00b0 public const int group_divider = 2131427504; - // aapt resource value: 0x7f0b01a7 - public const int headerArt = 2131427751; + // aapt resource value: 0x7f0b01a3 + public const int headerArt = 2131427747; + + // aapt resource value: 0x7f0b01a5 + public const int headerAuthor = 2131427749; // aapt resource value: 0x7f0b01a9 - public const int headerAuthor = 2131427753; + public const int headerMore = 2131427753; - // aapt resource value: 0x7f0b01ad - public const int headerMore = 2131427757; + // aapt resource value: 0x7f0b01a6 + public const int headerNumber = 2131427750; - // aapt resource value: 0x7f0b01aa - public const int headerNumber = 2131427754; - - // aapt resource value: 0x7f0b01ab - public const int headerPlay = 2131427755; - - // aapt resource value: 0x7f0b01ac - public const int headerShuffle = 2131427756; + // aapt resource value: 0x7f0b01a7 + public const int headerPlay = 2131427751; // aapt resource value: 0x7f0b01a8 - public const int headerTitle = 2131427752; + public const int headerShuffle = 2131427752; + + // aapt resource value: 0x7f0b01a4 + public const int headerTitle = 2131427748; // aapt resource value: 0x7f0b0012 public const int home = 2131427346; @@ -5567,14 +5555,14 @@ namespace Opus // aapt resource value: 0x7f0b00a0 public const int icon = 2131427488; - // aapt resource value: 0x7f0b01ca - public const int icon1 = 2131427786; + // aapt resource value: 0x7f0b01c6 + public const int icon1 = 2131427782; // aapt resource value: 0x7f0b0126 public const int icon_frame = 2131427622; - // aapt resource value: 0x7f0b018e - public const int icon_group = 2131427726; + // aapt resource value: 0x7f0b018a + public const int icon_group = 2131427722; // aapt resource value: 0x7f0b0048 public const int icon_only = 2131427400; @@ -5588,14 +5576,14 @@ namespace Opus // aapt resource value: 0x7f0b009d public const int image = 2131427485; - // aapt resource value: 0x7f0b018a - public const int info = 2131427722; + // aapt resource value: 0x7f0b0186 + public const int info = 2131427718; - // aapt resource value: 0x7f0b01a6 - public const int infoPanel = 2131427750; + // aapt resource value: 0x7f0b01a2 + public const int infoPanel = 2131427746; - // aapt resource value: 0x7f0b01bc - public const int isLive = 2131427772; + // aapt resource value: 0x7f0b01b8 + public const int isLive = 2131427768; // aapt resource value: 0x7f0b0090 public const int italic = 2131427472; @@ -5609,8 +5597,8 @@ namespace Opus // aapt resource value: 0x7f0b010a public const int largeLabel = 2131427594; - // aapt resource value: 0x7f0b019f - public const int lastButton = 2131427743; + // aapt resource value: 0x7f0b019b + public const int lastButton = 2131427739; // aapt resource value: 0x7f0b007c public const int left = 2131427452; @@ -5624,8 +5612,8 @@ namespace Opus // aapt resource value: 0x7f0b0029 public const int line1 = 2131427369; - // aapt resource value: 0x7f0b01cd - public const int line2 = 2131427789; + // aapt resource value: 0x7f0b01c9 + public const int line2 = 2131427785; // aapt resource value: 0x7f0b002a public const int line3 = 2131427370; @@ -5660,17 +5648,17 @@ namespace Opus // aapt resource value: 0x7f0b0100 public const int logo = 2131427584; - // aapt resource value: 0x7f0b01cf - public const int masked = 2131427791; + // aapt resource value: 0x7f0b01cb + public const int masked = 2131427787; - // aapt resource value: 0x7f0b01c8 - public const int maxValue = 2131427784; + // aapt resource value: 0x7f0b01c4 + public const int maxValue = 2131427780; - // aapt resource value: 0x7f0b0183 - public const int media_actions = 2131427715; + // aapt resource value: 0x7f0b017f + public const int media_actions = 2131427711; - // aapt resource value: 0x7f0b01da - public const int media_route_menu_item = 2131427802; + // aapt resource value: 0x7f0b01d6 + public const int media_route_menu_item = 2131427798; // aapt resource value: 0x7f0b00cb public const int message = 2131427531; @@ -5699,8 +5687,8 @@ namespace Opus // aapt resource value: 0x7f0b0061 public const int middle = 2131427425; - // aapt resource value: 0x7f0b01c7 - public const int minValue = 2131427783; + // aapt resource value: 0x7f0b01c3 + public const int minValue = 2131427779; // aapt resource value: 0x7f0b0081 public const int mini = 2131427457; @@ -5717,146 +5705,146 @@ namespace Opus // aapt resource value: 0x7f0b0115 public const int more = 2131427605; - // aapt resource value: 0x7f0b019d - public const int moreButton = 2131427741; - - // aapt resource value: 0x7f0b0168 - public const int mr_art = 2131427688; - - // aapt resource value: 0x7f0b0159 - public const int mr_cast_checkbox = 2131427673; - - // aapt resource value: 0x7f0b0152 - public const int mr_cast_close_button = 2131427666; - - // aapt resource value: 0x7f0b014d - public const int mr_cast_group_icon = 2131427661; - - // aapt resource value: 0x7f0b014e - public const int mr_cast_group_name = 2131427662; - - // aapt resource value: 0x7f0b014c - public const int mr_cast_list = 2131427660; - - // aapt resource value: 0x7f0b0151 - public const int mr_cast_meta = 2131427665; - - // aapt resource value: 0x7f0b0153 - public const int mr_cast_meta_art = 2131427667; - - // aapt resource value: 0x7f0b0155 - public const int mr_cast_meta_subtitle = 2131427669; - - // aapt resource value: 0x7f0b0154 - public const int mr_cast_meta_title = 2131427668; - - // aapt resource value: 0x7f0b0157 - public const int mr_cast_route_icon = 2131427671; - - // aapt resource value: 0x7f0b0158 - public const int mr_cast_route_name = 2131427672; - - // aapt resource value: 0x7f0b0156 - public const int mr_cast_stop_button = 2131427670; - - // aapt resource value: 0x7f0b015a - public const int mr_cast_volume_layout = 2131427674; - - // aapt resource value: 0x7f0b015b - public const int mr_cast_volume_slider = 2131427675; - - // aapt resource value: 0x7f0b015d - public const int mr_chooser_list = 2131427677; - - // aapt resource value: 0x7f0b0160 - public const int mr_chooser_route_desc = 2131427680; - - // aapt resource value: 0x7f0b015e - public const int mr_chooser_route_icon = 2131427678; - - // aapt resource value: 0x7f0b015f - public const int mr_chooser_route_name = 2131427679; - - // aapt resource value: 0x7f0b015c - public const int mr_chooser_title = 2131427676; - - // aapt resource value: 0x7f0b0165 - public const int mr_close = 2131427685; - - // aapt resource value: 0x7f0b016b - public const int mr_control_divider = 2131427691; - - // aapt resource value: 0x7f0b0176 - public const int mr_control_playback_ctrl = 2131427702; - - // aapt resource value: 0x7f0b0179 - public const int mr_control_subtitle = 2131427705; - - // aapt resource value: 0x7f0b0178 - public const int mr_control_title = 2131427704; - - // aapt resource value: 0x7f0b0177 - public const int mr_control_title_container = 2131427703; - - // aapt resource value: 0x7f0b0166 - public const int mr_custom_control = 2131427686; - - // aapt resource value: 0x7f0b0167 - public const int mr_default_control = 2131427687; - - // aapt resource value: 0x7f0b0162 - public const int mr_dialog_area = 2131427682; - - // aapt resource value: 0x7f0b0171 - public const int mr_dialog_header_name = 2131427697; - - // aapt resource value: 0x7f0b0161 - public const int mr_expandable_area = 2131427681; - - // aapt resource value: 0x7f0b017a - public const int mr_group_expand_collapse = 2131427706; - - // aapt resource value: 0x7f0b014f - public const int mr_group_volume_route_name = 2131427663; - - // aapt resource value: 0x7f0b0150 - public const int mr_group_volume_slider = 2131427664; - - // aapt resource value: 0x7f0b0169 - public const int mr_media_main_control = 2131427689; + // aapt resource value: 0x7f0b0199 + public const int moreButton = 2131427737; // aapt resource value: 0x7f0b0164 - public const int mr_name = 2131427684; + public const int mr_art = 2131427684; + + // aapt resource value: 0x7f0b0155 + public const int mr_cast_checkbox = 2131427669; + + // aapt resource value: 0x7f0b014e + public const int mr_cast_close_button = 2131427662; + + // aapt resource value: 0x7f0b0149 + public const int mr_cast_group_icon = 2131427657; + + // aapt resource value: 0x7f0b014a + public const int mr_cast_group_name = 2131427658; + + // aapt resource value: 0x7f0b0148 + public const int mr_cast_list = 2131427656; + + // aapt resource value: 0x7f0b014d + public const int mr_cast_meta = 2131427661; + + // aapt resource value: 0x7f0b014f + public const int mr_cast_meta_art = 2131427663; + + // aapt resource value: 0x7f0b0151 + public const int mr_cast_meta_subtitle = 2131427665; + + // aapt resource value: 0x7f0b0150 + public const int mr_cast_meta_title = 2131427664; + + // aapt resource value: 0x7f0b0153 + public const int mr_cast_route_icon = 2131427667; + + // aapt resource value: 0x7f0b0154 + public const int mr_cast_route_name = 2131427668; + + // aapt resource value: 0x7f0b0152 + public const int mr_cast_stop_button = 2131427666; + + // aapt resource value: 0x7f0b0156 + public const int mr_cast_volume_layout = 2131427670; + + // aapt resource value: 0x7f0b0157 + public const int mr_cast_volume_slider = 2131427671; + + // aapt resource value: 0x7f0b0159 + public const int mr_chooser_list = 2131427673; + + // aapt resource value: 0x7f0b015c + public const int mr_chooser_route_desc = 2131427676; + + // aapt resource value: 0x7f0b015a + public const int mr_chooser_route_icon = 2131427674; + + // aapt resource value: 0x7f0b015b + public const int mr_chooser_route_name = 2131427675; + + // aapt resource value: 0x7f0b0158 + public const int mr_chooser_title = 2131427672; + + // aapt resource value: 0x7f0b0161 + public const int mr_close = 2131427681; + + // aapt resource value: 0x7f0b0167 + public const int mr_control_divider = 2131427687; // aapt resource value: 0x7f0b0172 - public const int mr_picker_close_button = 2131427698; - - // aapt resource value: 0x7f0b0173 - public const int mr_picker_list = 2131427699; - - // aapt resource value: 0x7f0b0174 - public const int mr_picker_route_icon = 2131427700; + public const int mr_control_playback_ctrl = 2131427698; // aapt resource value: 0x7f0b0175 - public const int mr_picker_route_name = 2131427701; + public const int mr_control_subtitle = 2131427701; - // aapt resource value: 0x7f0b016a - public const int mr_playback_control = 2131427690; + // aapt resource value: 0x7f0b0174 + public const int mr_control_title = 2131427700; + + // aapt resource value: 0x7f0b0173 + public const int mr_control_title_container = 2131427699; + + // aapt resource value: 0x7f0b0162 + public const int mr_custom_control = 2131427682; // aapt resource value: 0x7f0b0163 - public const int mr_title_bar = 2131427683; + public const int mr_default_control = 2131427683; - // aapt resource value: 0x7f0b016c - public const int mr_volume_control = 2131427692; + // aapt resource value: 0x7f0b015e + public const int mr_dialog_area = 2131427678; // aapt resource value: 0x7f0b016d - public const int mr_volume_group_list = 2131427693; + public const int mr_dialog_header_name = 2131427693; + + // aapt resource value: 0x7f0b015d + public const int mr_expandable_area = 2131427677; + + // aapt resource value: 0x7f0b0176 + public const int mr_group_expand_collapse = 2131427702; + + // aapt resource value: 0x7f0b014b + public const int mr_group_volume_route_name = 2131427659; + + // aapt resource value: 0x7f0b014c + public const int mr_group_volume_slider = 2131427660; + + // aapt resource value: 0x7f0b0165 + public const int mr_media_main_control = 2131427685; + + // aapt resource value: 0x7f0b0160 + public const int mr_name = 2131427680; + + // aapt resource value: 0x7f0b016e + public const int mr_picker_close_button = 2131427694; // aapt resource value: 0x7f0b016f - public const int mr_volume_item_icon = 2131427695; + public const int mr_picker_list = 2131427695; // aapt resource value: 0x7f0b0170 - public const int mr_volume_slider = 2131427696; + public const int mr_picker_route_icon = 2131427696; + + // aapt resource value: 0x7f0b0171 + public const int mr_picker_route_name = 2131427697; + + // aapt resource value: 0x7f0b0166 + public const int mr_playback_control = 2131427686; + + // aapt resource value: 0x7f0b015f + public const int mr_title_bar = 2131427679; + + // aapt resource value: 0x7f0b0168 + public const int mr_volume_control = 2131427688; + + // aapt resource value: 0x7f0b0169 + public const int mr_volume_group_list = 2131427689; + + // aapt resource value: 0x7f0b016b + public const int mr_volume_item_icon = 2131427691; + + // aapt resource value: 0x7f0b016c + public const int mr_volume_slider = 2131427692; // aapt resource value: 0x7f0b0021 public const int mtrl_child_content_container = 2131427361; @@ -5867,8 +5855,8 @@ namespace Opus // aapt resource value: 0x7f0b0058 public const int multiply = 2131427416; - // aapt resource value: 0x7f0b01d0 - public const int musicLayout = 2131427792; + // aapt resource value: 0x7f0b01cc + public const int musicLayout = 2131427788; // aapt resource value: 0x7f0b00ff public const int name = 2131427583; @@ -5879,11 +5867,11 @@ namespace Opus // aapt resource value: 0x7f0b006b public const int never = 2131427435; - // aapt resource value: 0x7f0b01a2 - public const int nextButton = 2131427746; + // aapt resource value: 0x7f0b019e + public const int nextButton = 2131427742; - // aapt resource value: 0x7f0b017c - public const int noPlaylist = 2131427708; + // aapt resource value: 0x7f0b0178 + public const int noPlaylist = 2131427704; // aapt resource value: 0x7f0b0047 public const int none = 2131427399; @@ -5891,17 +5879,17 @@ namespace Opus // aapt resource value: 0x7f0b004f public const int normal = 2131427407; + // aapt resource value: 0x7f0b0188 + public const int notification_background = 2131427720; + + // aapt resource value: 0x7f0b0182 + public const int notification_main_column = 2131427714; + + // aapt resource value: 0x7f0b0181 + public const int notification_main_column_container = 2131427713; + // aapt resource value: 0x7f0b018c - public const int notification_background = 2131427724; - - // aapt resource value: 0x7f0b0186 - public const int notification_main_column = 2131427718; - - // aapt resource value: 0x7f0b0185 - public const int notification_main_column_container = 2131427717; - - // aapt resource value: 0x7f0b0190 - public const int numberPicker = 2131427728; + public const int numberPicker = 2131427724; // aapt resource value: 0x7f0b0091 public const int one = 2131427473; @@ -5909,8 +5897,8 @@ namespace Opus // aapt resource value: 0x7f0b0088 public const int outline = 2131427464; - // aapt resource value: 0x7f0b01cc - public const int pager = 2131427788; + // aapt resource value: 0x7f0b01c8 + public const int pager = 2131427784; // aapt resource value: 0x7f0b007f public const int parallax = 2131427455; @@ -5927,38 +5915,38 @@ namespace Opus // aapt resource value: 0x7f0b012e public const int play = 2131427630; - // aapt resource value: 0x7f0b01a0 - public const int playButton = 2131427744; + // aapt resource value: 0x7f0b019c + public const int playButton = 2131427740; + + // aapt resource value: 0x7f0b018f + public const int playerAlbum = 2131427727; + + // aapt resource value: 0x7f0b0194 + public const int playerArtist = 2131427732; + + // aapt resource value: 0x7f0b019d + public const int playerBuffer = 2131427741; + + // aapt resource value: 0x7f0b0146 + public const int playerContainer = 2131427654; + + // aapt resource value: 0x7f0b0139 + public const int playerSheet = 2131427641; // aapt resource value: 0x7f0b0193 - public const int playerAlbum = 2131427731; + public const int playerTitle = 2131427731; - // aapt resource value: 0x7f0b0198 - public const int playerArtist = 2131427736; + // aapt resource value: 0x7f0b018e + public const int playerView = 2131427726; - // aapt resource value: 0x7f0b01a1 - public const int playerBuffer = 2131427745; - - // aapt resource value: 0x7f0b014a - public const int playerContainer = 2131427658; - - // aapt resource value: 0x7f0b013d - public const int playerSheet = 2131427645; - - // aapt resource value: 0x7f0b0197 - public const int playerTitle = 2131427735; - - // aapt resource value: 0x7f0b0192 - public const int playerView = 2131427730; - - // aapt resource value: 0x7f0b013e - public const int playersHolder = 2131427646; + // aapt resource value: 0x7f0b013a + public const int playersHolder = 2131427642; // aapt resource value: 0x7f0b0132 public const int playlistHeader = 2131427634; - // aapt resource value: 0x7f0b01d2 - public const int playlistLayout = 2131427794; + // aapt resource value: 0x7f0b01ce + public const int playlistLayout = 2131427790; // aapt resource value: 0x7f0b0108 public const int playlistLocation = 2131427592; @@ -5966,8 +5954,8 @@ namespace Opus // aapt resource value: 0x7f0b0107 public const int playlistName = 2131427591; - // aapt resource value: 0x7f0b01c4 - public const int playlistURL = 2131427780; + // aapt resource value: 0x7f0b01c0 + public const int playlistURL = 2131427776; // aapt resource value: 0x7f0b0118 public const int progress = 2131427608; @@ -5981,20 +5969,20 @@ namespace Opus // aapt resource value: 0x7f0b0014 public const int progress_horizontal = 2131427348; - // aapt resource value: 0x7f0b01a5 - public const int queue = 2131427749; + // aapt resource value: 0x7f0b01a1 + public const int queue = 2131427745; - // aapt resource value: 0x7f0b01a4 - public const int queueBackground = 2131427748; + // aapt resource value: 0x7f0b01a0 + public const int queueBackground = 2131427744; - // aapt resource value: 0x7f0b0191 - public const int queueDrawer = 2131427729; + // aapt resource value: 0x7f0b018d + public const int queueDrawer = 2131427725; - // aapt resource value: 0x7f0b01a3 - public const int queueParent = 2131427747; + // aapt resource value: 0x7f0b019f + public const int queueParent = 2131427743; - // aapt resource value: 0x7f0b01bf - public const int queueSwitch = 2131427775; + // aapt resource value: 0x7f0b01bb + public const int queueSwitch = 2131427771; // aapt resource value: 0x7f0b00b6 public const int radio = 2131427510; @@ -6002,20 +5990,20 @@ namespace Opus // aapt resource value: 0x7f0b00cf public const int recycler = 2131427535; - // aapt resource value: 0x7f0b01b3 - public const int recycler_view = 2131427763; + // aapt resource value: 0x7f0b01af + public const int recycler_view = 2131427759; - // aapt resource value: 0x7f0b01cb - public const int refine = 2131427787; + // aapt resource value: 0x7f0b01c7 + public const int refine = 2131427783; - // aapt resource value: 0x7f0b01d7 - public const int rename = 2131427799; + // aapt resource value: 0x7f0b01d3 + public const int rename = 2131427795; - // aapt resource value: 0x7f0b01c9 - public const int reorder = 2131427785; + // aapt resource value: 0x7f0b01c5 + public const int reorder = 2131427781; - // aapt resource value: 0x7f0b0199 - public const int repeat = 2131427737; + // aapt resource value: 0x7f0b0195 + public const int repeat = 2131427733; // aapt resource value: 0x7f0b007d public const int right = 2131427453; @@ -6023,17 +6011,17 @@ namespace Opus // aapt resource value: 0x7f0b012d public const int rightButtons = 2131427629; - // aapt resource value: 0x7f0b01c2 - public const int rightIcon = 2131427778; - - // aapt resource value: 0x7f0b018b - public const int right_icon = 2131427723; + // aapt resource value: 0x7f0b01be + public const int rightIcon = 2131427774; // aapt resource value: 0x7f0b0187 - public const int right_side = 2131427719; + public const int right_icon = 2131427719; - // aapt resource value: 0x7f0b01d8 - public const int saveAsPlaylist = 2131427800; + // aapt resource value: 0x7f0b0183 + public const int right_side = 2131427715; + + // aapt resource value: 0x7f0b01d4 + public const int saveAsPlaylist = 2131427796; // aapt resource value: 0x7f0b0019 public const int save_image_matrix = 2131427353; @@ -6062,11 +6050,11 @@ namespace Opus // aapt resource value: 0x7f0b0085 public const int scrollable = 2131427461; - // aapt resource value: 0x7f0b01c5 - public const int search = 2131427781; + // aapt resource value: 0x7f0b01c1 + public const int search = 2131427777; - // aapt resource value: 0x7f0b01c6 - public const int searchSuggestions = 2131427782; + // aapt resource value: 0x7f0b01c2 + public const int searchSuggestions = 2131427778; // aapt resource value: 0x7f0b00c0 public const int search_badge = 2131427520; @@ -6104,11 +6092,11 @@ namespace Opus // aapt resource value: 0x7f0b00e6 public const int seek_bar_controls = 2131427558; - // aapt resource value: 0x7f0b01b4 - public const int seekbar = 2131427764; + // aapt resource value: 0x7f0b01b0 + public const int seekbar = 2131427760; - // aapt resource value: 0x7f0b01b5 - public const int seekbar_value = 2131427765; + // aapt resource value: 0x7f0b01b1 + public const int seekbar_value = 2131427761; // aapt resource value: 0x7f0b00ca public const int select_dialog_listview = 2131427530; @@ -6116,8 +6104,8 @@ namespace Opus // aapt resource value: 0x7f0b0077 public const int selected = 2131427447; - // aapt resource value: 0x7f0b01db - public const int settings = 2131427803; + // aapt resource value: 0x7f0b01d7 + public const int settings = 2131427799; // aapt resource value: 0x7f0b00b2 public const int shortcut = 2131427506; @@ -6128,8 +6116,8 @@ namespace Opus // aapt resource value: 0x7f0b0054 public const int showHome = 2131427412; - // aapt resource value: 0x7f0b019b - public const int showQueue = 2131427739; + // aapt resource value: 0x7f0b0197 + public const int showQueue = 2131427735; // aapt resource value: 0x7f0b0055 public const int showTitle = 2131427413; @@ -6140,11 +6128,11 @@ namespace Opus // aapt resource value: 0x7f0b0109 public const int smallLabel = 2131427593; - // aapt resource value: 0x7f0b013f - public const int smallPlayer = 2131427647; + // aapt resource value: 0x7f0b013b + public const int smallPlayer = 2131427643; - // aapt resource value: 0x7f0b014b - public const int snackBar = 2131427659; + // aapt resource value: 0x7f0b0147 + public const int snackBar = 2131427655; // aapt resource value: 0x7f0b0023 public const int snackbar_action = 2131427363; @@ -6158,47 +6146,47 @@ namespace Opus // aapt resource value: 0x7f0b0074 public const int snapMargins = 2131427444; - // aapt resource value: 0x7f0b019e - public const int songTimer = 2131427742; + // aapt resource value: 0x7f0b019a + public const int songTimer = 2131427738; - // aapt resource value: 0x7f0b01bb - public const int songView = 2131427771; + // aapt resource value: 0x7f0b01b7 + public const int songView = 2131427767; - // aapt resource value: 0x7f0b0142 - public const int spArt = 2131427650; - - // aapt resource value: 0x7f0b0144 - public const int spArtist = 2131427652; - - // aapt resource value: 0x7f0b0147 - public const int spBuffer = 2131427655; - - // aapt resource value: 0x7f0b0141 - public const int spContainer = 2131427649; - - // aapt resource value: 0x7f0b0148 - public const int spLast = 2131427656; - - // aapt resource value: 0x7f0b0145 - public const int spNext = 2131427653; - - // aapt resource value: 0x7f0b0146 - public const int spPlay = 2131427654; - - // aapt resource value: 0x7f0b0149 - public const int spProgress = 2131427657; + // aapt resource value: 0x7f0b013e + public const int spArt = 2131427646; // aapt resource value: 0x7f0b0140 - public const int spReveal = 2131427648; + public const int spArtist = 2131427648; // aapt resource value: 0x7f0b0143 - public const int spTitle = 2131427651; + public const int spBuffer = 2131427651; + + // aapt resource value: 0x7f0b013d + public const int spContainer = 2131427645; + + // aapt resource value: 0x7f0b0144 + public const int spLast = 2131427652; + + // aapt resource value: 0x7f0b0141 + public const int spNext = 2131427649; + + // aapt resource value: 0x7f0b0142 + public const int spPlay = 2131427650; + + // aapt resource value: 0x7f0b0145 + public const int spProgress = 2131427653; + + // aapt resource value: 0x7f0b013c + public const int spReveal = 2131427644; + + // aapt resource value: 0x7f0b013f + public const int spTitle = 2131427647; // aapt resource value: 0x7f0b00a2 public const int spacer = 2131427490; - // aapt resource value: 0x7f0b01b2 - public const int spinner = 2131427762; + // aapt resource value: 0x7f0b01ae + public const int spinner = 2131427758; // aapt resource value: 0x7f0b0015 public const int split_action_bar = 2131427349; @@ -6224,8 +6212,8 @@ namespace Opus // aapt resource value: 0x7f0b00cd public const int status = 2131427533; - // aapt resource value: 0x7f0b0182 - public const int status_bar_latest_event_content = 2131427714; + // aapt resource value: 0x7f0b017e + public const int status_bar_latest_event_content = 2131427710; // aapt resource value: 0x7f0b00e5 public const int status_text = 2131427557; @@ -6245,11 +6233,11 @@ namespace Opus // aapt resource value: 0x7f0b0096 public const int surface_view = 2131427478; - // aapt resource value: 0x7f0b01b6 - public const int switchWidget = 2131427766; + // aapt resource value: 0x7f0b01b2 + public const int switchWidget = 2131427762; - // aapt resource value: 0x7f0b01b1 - public const int sync = 2131427761; + // aapt resource value: 0x7f0b01ad + public const int sync = 2131427757; // aapt resource value: 0x7f0b00ce public const int syncLoading = 2131427534; @@ -6275,14 +6263,14 @@ namespace Opus // aapt resource value: 0x7f0b002e public const int text = 2131427374; - // aapt resource value: 0x7f0b017b - public const int text1 = 2131427707; + // aapt resource value: 0x7f0b0177 + public const int text1 = 2131427703; // aapt resource value: 0x7f0b002f public const int text2 = 2131427375; - // aapt resource value: 0x7f0b01ae - public const int textLayout = 2131427758; + // aapt resource value: 0x7f0b01aa + public const int textLayout = 2131427754; // aapt resource value: 0x7f0b00a8 public const int textSpacerNoButtons = 2131427496; @@ -6314,11 +6302,11 @@ namespace Opus // aapt resource value: 0x7f0b0097 public const int texture_view = 2131427479; - // aapt resource value: 0x7f0b0188 - public const int time = 2131427720; + // aapt resource value: 0x7f0b0184 + public const int time = 2131427716; - // aapt resource value: 0x7f0b019c - public const int timer = 2131427740; + // aapt resource value: 0x7f0b0198 + public const int timer = 2131427736; // aapt resource value: 0x7f0b0030 public const int title = 2131427376; @@ -6341,8 +6329,8 @@ namespace Opus // aapt resource value: 0x7f0b006e public const int top = 2131427438; - // aapt resource value: 0x7f0b01ba - public const int topDivider = 2131427770; + // aapt resource value: 0x7f0b01b6 + public const int topDivider = 2131427766; // aapt resource value: 0x7f0b00ac public const int topPanel = 2131427500; @@ -6365,8 +6353,8 @@ namespace Opus // aapt resource value: 0x7f0b0020 public const int transition_transform = 2131427360; - // aapt resource value: 0x7f0b01d5 - public const int undoChange = 2131427797; + // aapt resource value: 0x7f0b01d1 + public const int undoChange = 2131427793; // aapt resource value: 0x7f0b005d public const int uniform = 2131427421; @@ -6386,11 +6374,11 @@ namespace Opus // aapt resource value: 0x7f0b0028 public const int view_offset_helper = 2131427368; - // aapt resource value: 0x7f0b01ce - public const int visible = 2131427790; + // aapt resource value: 0x7f0b01ca + public const int visible = 2131427786; - // aapt resource value: 0x7f0b016e - public const int volume_item_container = 2131427694; + // aapt resource value: 0x7f0b016a + public const int volume_item_container = 2131427690; // aapt resource value: 0x7f0b004a public const int wide = 2131427402; @@ -6401,8 +6389,8 @@ namespace Opus // aapt resource value: 0x7f0b005e public const int wrap_content = 2131427422; - // aapt resource value: 0x7f0b01bd - public const int youtubeIcon = 2131427773; + // aapt resource value: 0x7f0b01b9 + public const int youtubeIcon = 2131427769; // aapt resource value: 0x7f0b0135 public const int ytProgress = 2131427637;