text:
namespace eRechnung
{
    partial class EbI4P1Ribbon : Microsoft.Office.Tools.Ribbon.RibbonBase
    {
        /// <summary>
        /// Erforderliche Designervariable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        public EbI4P1Ribbon()
            : base(Globals.Factory.GetRibbonFactory())
        {
            InitializeComponent();
        }

        /// <summary>
        /// Verwendete Ressourcen bereinigen.
        /// </summary>
        /// <param name="disposing">"true", wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls "false".</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Vom Komponenten-Designer generierter Code

        /// <summary>
        /// Erforderliche Methode für Designerunterstützung -
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this.tab1 = this.Factory.CreateRibbonTab();
            this.group7 = this.Factory.CreateRibbonGroup();
            this.btnNewInvoice = this.Factory.CreateRibbonButton();
            this.BtnSave = this.Factory.CreateRibbonButton();
            this.btnVerify = this.Factory.CreateRibbonButton();
            this.group2 = this.Factory.CreateRibbonGroup();
            this.BtnDetails = this.Factory.CreateRibbonButton();
            this.BtnSkonto = this.Factory.CreateRibbonButton();
            this.group1 = this.Factory.CreateRibbonGroup();
            this.BtnLoadTemplate = this.Factory.CreateRibbonButton();
            this.BtnSaveAsTemplate = this.Factory.CreateRibbonButton();
            this.btnChangeFormType = this.Factory.CreateRibbonButton();
            this.rbGrpSignSend = this.Factory.CreateRibbonGroup();
            this.btnSendByMail = this.Factory.CreateRibbonButton();
            this.btnSendByService = this.Factory.CreateRibbonButton();
            this.group6 = this.Factory.CreateRibbonGroup();
            this.BtnEditSettings = this.Factory.CreateRibbonButton();
            this.gallery1 = this.Factory.CreateRibbonGallery();
            this.gbtnKonto = this.Factory.CreateRibbonButton();
            this.gbtnHandySignatur = this.Factory.CreateRibbonButton();
            this.gbtnMail = this.Factory.CreateRibbonButton();
            this.gbtnSaveLoc = this.Factory.CreateRibbonButton();
            this.gbtnZustellung = this.Factory.CreateRibbonButton();
            this.group4 = this.Factory.CreateRibbonGroup();
            this.BtnEbInterface = this.Factory.CreateRibbonButton();
            this.BtnAustriaPro = this.Factory.CreateRibbonButton();
            this.btnErbGvAt = this.Factory.CreateRibbonButton();
            this.group3 = this.Factory.CreateRibbonGroup();
            this.BtnHelp = this.Factory.CreateRibbonButton();
            this.btnSupport = this.Factory.CreateRibbonButton();
            this.BtnAbout = this.Factory.CreateRibbonButton();
            this.tab1.SuspendLayout();
            this.group7.SuspendLayout();
            this.group2.SuspendLayout();
            this.group1.SuspendLayout();
            this.rbGrpSignSend.SuspendLayout();
            this.group6.SuspendLayout();
            this.group4.SuspendLayout();
            this.group3.SuspendLayout();
            this.SuspendLayout();
            //
            // tab1
            //
            this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
            this.tab1.Groups.Add(this.group7);
            this.tab1.Groups.Add(this.group2);
            this.tab1.Groups.Add(this.group1);
            this.tab1.Groups.Add(this.rbGrpSignSend);
            this.tab1.Groups.Add(this.group6);
            this.tab1.Groups.Add(this.group4);
            this.tab1.Groups.Add(this.group3);
            this.tab1.Label = "eRechnung";
            this.tab1.Name = "tab1";
            //
            // group7
            //
            this.group7.Items.Add(this.btnNewInvoice);
            this.group7.Items.Add(this.BtnSave);
            this.group7.Items.Add(this.btnVerify);
            this.group7.Label = "eRechnung ";
            this.group7.Name = "group7";
            //
            // btnNewInvoice
            //
            this.btnNewInvoice.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.btnNewInvoice.Image = global::eRechnung.Images.NewDocument_32x32;
            this.btnNewInvoice.Label = "Neu";
            this.btnNewInvoice.Name = "btnNewInvoice";
            this.btnNewInvoice.ScreenTip = "Daten löschen";
            this.btnNewInvoice.ShowImage = true;
            this.btnNewInvoice.SuperTip = "Löscht alle Daten im Formular und setzt die Werte aus den Einstellungen ein.";
            //
            // BtnSave
            //
            this.BtnSave.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.BtnSave.Image = global::eRechnung.Images.ebInterfaceSpeichern;
            this.BtnSave.Label = "eRechnung speichern";
            this.BtnSave.Name = "BtnSave";
            this.BtnSave.ScreenTip = "Speichern";
            this.BtnSave.ShowImage = true;
            this.BtnSave.SuperTip = "Überprüft die Einträge im Formular gemäß ebInterface Standard und speichert die e" +
    "Rechnung in der ausgewählten Datei";
            //
            // btnVerify
            //
            this.btnVerify.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.btnVerify.Image = global::eRechnung.Images.SubmitForApproval_32x32;
            this.btnVerify.Label = "eRechnung prüfen";
            this.btnVerify.Name = "btnVerify";
            this.btnVerify.ScreenTip = "Prüft die eRechnung";
            this.btnVerify.ShowImage = true;
            this.btnVerify.SuperTip = "Die aktuelle eRechnung wird gemäß ebInterface Standard und bei Bedarf gemäß eRech" +
    "nung an die öffentl. Verwaltung  geprüft.";
            //
            // group2
            //
            this.group2.Items.Add(this.BtnDetails);
            this.group2.Items.Add(this.BtnSkonto);
            this.group2.Label = "Bearbeiten";
            this.group2.Name = "group2";
            //
            // BtnDetails
            //
            this.BtnDetails.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.BtnDetails.Image = global::eRechnung.Images.DetailsBearbeiten;
            this.BtnDetails.Label = "Positionen bearbeiten";
            this.BtnDetails.Name = "BtnDetails";
            this.BtnDetails.ScreenTip = "Rechnungspositionen bearbeiten";
            this.BtnDetails.ShowImage = true;
            this.BtnDetails.SuperTip = "Öffnet ein Fenster zur Bearbeitung der Einzelpositionen dieser Rechnung";
            //
            // BtnSkonto
            //
            this.BtnSkonto.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.BtnSkonto.Image = global::eRechnung.Images.SkontoBearbeiten;
            this.BtnSkonto.Label = "Skonti bearbeiten";
            this.BtnSkonto.Name = "BtnSkonto";
            this.BtnSkonto.ScreenTip = "Skonti bearbeiten";
            this.BtnSkonto.ShowImage = true;
            this.BtnSkonto.SuperTip = "Öffnet ein Fenster zur Bearbeitung der Skonto Tabelle";
            //
            // group1
            //
            this.group1.Items.Add(this.BtnLoadTemplate);
            this.group1.Items.Add(this.BtnSaveAsTemplate);
            this.group1.Items.Add(this.btnChangeFormType);
            this.group1.Label = "Vorlagen";
            this.group1.Name = "group1";
            //
            // BtnLoadTemplate
            //
            this.BtnLoadTemplate.Image = global::eRechnung.Images.OpenSelectedItemHS;
            this.BtnLoadTemplate.Label = "Vorlage laden";
            this.BtnLoadTemplate.Name = "BtnLoadTemplate";
            this.BtnLoadTemplate.ScreenTip = "Vorlage laden";
            this.BtnLoadTemplate.ShowImage = true;
            this.BtnLoadTemplate.SuperTip = "Lädt eine eRechnungs-Vorlage aus der ausgewählten Datei";
            //
            // BtnSaveAsTemplate
            //
            this.BtnSaveAsTemplate.Image = global::eRechnung.Images.SaveFormDesignHS;
            this.BtnSaveAsTemplate.Label = "Vorlage speichern";
            this.BtnSaveAsTemplate.Name = "BtnSaveAsTemplate";
            this.BtnSaveAsTemplate.ScreenTip = "Vorlage speichern";
            this.BtnSaveAsTemplate.ShowImage = true;
            this.BtnSaveAsTemplate.SuperTip = "Speichert die Formular-Einträge als eRechnungs-Vorlage in der ausgwählten Datei";
            //
            // btnChangeFormType
            //
            this.btnChangeFormType.Image = global::eRechnung.Images.RefreshArrow_Blue_16x16_7;
            this.btnChangeFormType.Label = "Wechsel zu Wirtschaft";
            this.btnChangeFormType.Name = "btnChangeFormType";
            this.btnChangeFormType.ShowImage = true;
            this.btnChangeFormType.SuperTip = "Wechseln zwischen den Formularen für öffentl. Verwaltung und Wirtschaft";
            this.btnChangeFormType.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnToggleBund_Click);
            //
            // rbGrpSignSend
            //
            this.rbGrpSignSend.Items.Add(this.btnSendByMail);
            this.rbGrpSignSend.Items.Add(this.btnSendByService);
            this.rbGrpSignSend.Label = "Versand";
            this.rbGrpSignSend.Name = "rbGrpSignSend";
            //
            // btnSendByMail
            //
            this.btnSendByMail.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.btnSendByMail.Image = global::eRechnung.Images.SendLinkByEmail_32x32;
            this.btnSendByMail.Label = "per e-Mail versenden";
            this.btnSendByMail.Name = "btnSendByMail";
            this.btnSendByMail.ScreenTip = "Per e-Mail versenden";
            this.btnSendByMail.ShowImage = true;
            this.btnSendByMail.SuperTip = "Prüft und speichert die aktuelle eRechnung als XMLK und PDF und öffnet ein Outloo" +
    "k Mail-Formular.";
            //
            // btnSendByService
            //
            this.btnSendByService.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.btnSendByService.Image = global::eRechnung.Images.SendLinkByEmail_32x32;
            this.btnSendByService.Label = "Mit Zustelldienst versenden";
            this.btnSendByService.Name = "btnSendByService";
            this.btnSendByService.ScreenTip = "Versenden mit Zustelldienst";
            this.btnSendByService.ShowImage = true;
            this.btnSendByService.SuperTip = "Überprüft die Rechnung gemäß ebInterface Standard, erstellt ein PDF und ermöglich" +
    "t den Versand per separatem Zustelldienst-Programm";
            //
            // group6
            //
            this.group6.Items.Add(this.BtnEditSettings);
            this.group6.Items.Add(this.gallery1);
            this.group6.Label = "Einstellungen";
            this.group6.Name = "group6";
            //
            // BtnEditSettings
            //
            this.BtnEditSettings.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.BtnEditSettings.Image = global::eRechnung.Images.InvoicePreference;
            this.BtnEditSettings.Label = "Rechnungs- steller";
            this.BtnEditSettings.Name = "BtnEditSettings";
            this.BtnEditSettings.ScreenTip = "Einstellungen Rechnungssteller";
            this.BtnEditSettings.ShowImage = true;
            this.BtnEditSettings.SuperTip = "Öffnet ein Fenster zur Bearbeitung der Einstellungen zum Rechnungssteller";
            //
            // gallery1
            //
            this.gallery1.Buttons.Add(this.gbtnKonto);
            this.gallery1.Buttons.Add(this.gbtnHandySignatur);
            this.gallery1.Buttons.Add(this.gbtnMail);
            this.gallery1.Buttons.Add(this.gbtnSaveLoc);
            this.gallery1.Buttons.Add(this.gbtnZustellung);
            this.gallery1.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
            this.gallery1.Image = global::eRechnung.Images.InvoicePreference;
            this.gallery1.Label = "Weitere Einstellungen";
            this.gallery1.Name = "gallery1";
            this.gallery1.ScreenTip = "Auswahl für weitere Einstellungen";
            this.gallery1.ShowImage = true;
            this.gallery1.SuperTip = "Öffnet eine Auswahlliste weiterer Einstellungen";
            //
            // gbtnKonto
            //
            this.gbtnKonto.Label = "Konto";
            this.gbtnKonto.Name = "gbtnKonto";
            this.gbtnKonto.ScreenTip = "Einstellungen für Konto bearbeiten";
            this.gbtnKonto.Visible = false;
            //
            // gbtnHandySignatur
            //
            this.gbtnHandySignatur.Label = "Handy-Signatur";
            this.gbtnHandySignatur.Name = "gbtnHandySignatur";
            this.gbtnHandySignatur.ScreenTip = "Einstellungen zur Handy-Signatur";
            this.gbtnHandySignatur.SuperTip = "Hier können die Einstellungen zur Handy-Signatur bearbeitet werden";
            this.gbtnHandySignatur.Visible = false;
            //
            // gbtnMail
            //
            this.gbtnMail.Label = "e-Mail";
            this.gbtnMail.Name = "gbtnMail";
            this.gbtnMail.ScreenTip = "Mail Einstellungen";
            this.gbtnMail.SuperTip = "Öffnet eine Fenster zum Bearbeiten der Mail Einstellungen";
            //
            // gbtnSaveLoc
            //
            this.gbtnSaveLoc.Label = "Speicherorte";
            this.gbtnSaveLoc.Name = "gbtnSaveLoc";
            this.gbtnSaveLoc.ScreenTip = "Einstellungen für die Speicherorte";
            this.gbtnSaveLoc.SuperTip = "Öffnet ein Fenster zum Bearbeiten der Speicherorte";
            //
            // gbtnZustellung
            //
            this.gbtnZustellung.Label = "Zustelldienst";
            this.gbtnZustellung.Name = "gbtnZustellung";
            this.gbtnZustellung.ScreenTip = "Einstellungen für den Zustelldienst";
            this.gbtnZustellung.SuperTip = "Öffnet ein Fenster zum Bearbeiten der Einstellungen für den Zustelldienst";
            //
            // group4
            //
            this.group4.Items.Add(this.BtnEbInterface);
            this.group4.Items.Add(this.BtnAustriaPro);
            this.group4.Items.Add(this.btnErbGvAt);
            this.group4.Label = "Informationen";
            this.group4.Name = "group4";
            //
            // BtnEbInterface
            //
            this.BtnEbInterface.Image = global::eRechnung.Images.WebInsertHyperlinkHS;
            this.BtnEbInterface.Label = "ebInterface";
            this.BtnEbInterface.Name = "BtnEbInterface";
            this.BtnEbInterface.ScreenTip = "ebInterface";
            this.BtnEbInterface.ShowImage = true;
            this.BtnEbInterface.SuperTip = "Öffenet die ebInterface Home Page";
            //
            // BtnAustriaPro
            //
            this.BtnAustriaPro.Image = global::eRechnung.Images.WebInsertHyperlinkHS;
            this.BtnAustriaPro.Label = "AUSTRIAPRO";
            this.BtnAustriaPro.Name = "BtnAustriaPro";
            this.BtnAustriaPro.ScreenTip = "AUSTRIAPRO";
            this.BtnAustriaPro.ShowImage = true;
            this.BtnAustriaPro.SuperTip = "Öffnet die Home Page der AUSTRIAPRO";
            //
            // btnErbGvAt
            //
            this.btnErbGvAt.Image = global::eRechnung.Images.WebInsertHyperlinkHS;
            this.btnErbGvAt.Label = "ERECHNUNG.GV.AT";
            this.btnErbGvAt.Name = "btnErbGvAt";
            this.btnErbGvAt.ScreenTip = "Link zu ERECHNUNG.GV.AT";
            this.btnErbGvAt.ShowImage = true;
            this.btnErbGvAt.SuperTip = "Öffnet eine Webseite des BMF mit Informationen zur eRechnung an die öffentliche V" +
    "erwaltung";
            //
            // group3
            //
            this.group3.Items.Add(this.BtnHelp);
            this.group3.Items.Add(this.btnSupport);
            this.group3.Items.Add(this.BtnAbout);
            this.group3.Label = "Hilfe & Support";
            this.group3.Name = "group3";
            //
            // BtnHelp
            //
            this.BtnHelp.Image = global::eRechnung.Images.HilfeIcon;
            this.BtnHelp.Label = "Anleitung";
            this.BtnHelp.Name = "BtnHelp";
            this.BtnHelp.ScreenTip = "Ausfüllhilfe";
            this.BtnHelp.ShowImage = true;
            //
            // btnSupport
            //
            this.btnSupport.Image = global::eRechnung.Images.pending_request_16x16_72;
            this.btnSupport.Label = "Support";
            this.btnSupport.Name = "btnSupport";
            this.btnSupport.ScreenTip = "Link zum Supportforum";
            this.btnSupport.ShowImage = true;
            this.btnSupport.SuperTip = "Öffnet die Webseite zum ebInterface Forum";
            //
            // BtnAbout
            //
            this.BtnAbout.Image = global::eRechnung.Images.command_link_16x16;
            this.BtnAbout.Label = "Über das PlugIn";
            this.BtnAbout.Name = "BtnAbout";
            this.BtnAbout.ScreenTip = "Über das PlugIn";
            this.BtnAbout.ShowImage = true;
            this.BtnAbout.SuperTip = "Öffnet ein Fenster mit Angaben über das PlugIn";
            //
            // EbI4P1Ribbon
            //
            this.Name = "EbI4P1Ribbon";
            this.RibbonType = "Microsoft.Word.Document";
            this.Tabs.Add(this.tab1);
            this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.ebI4p1Ribbon_Load);
            this.tab1.ResumeLayout(false);
            this.tab1.PerformLayout();
            this.group7.ResumeLayout(false);
            this.group7.PerformLayout();
            this.group2.ResumeLayout(false);
            this.group2.PerformLayout();
            this.group1.ResumeLayout(false);
            this.group1.PerformLayout();
            this.rbGrpSignSend.ResumeLayout(false);
            this.rbGrpSignSend.PerformLayout();
            this.group6.ResumeLayout(false);
            this.group6.PerformLayout();
            this.group4.ResumeLayout(false);
            this.group4.PerformLayout();
            this.group3.ResumeLayout(false);
            this.group3.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        internal Microsoft.Office.Tools.Ribbon.RibbonTab tab1;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup group2;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnNewInvoice;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnDetails;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnSkonto;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnSave;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup rbGrpSignSend;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnSendByService;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup group1;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnSaveAsTemplate;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnLoadTemplate;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup group6;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnEditSettings;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup group4;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnEbInterface;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnAustriaPro;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnErbGvAt;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup group3;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnHelp;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnSupport;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnAbout;
        internal Microsoft.Office.Tools.Ribbon.RibbonGroup group7;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnVerify;
        internal Microsoft.Office.Tools.Ribbon.RibbonGallery gallery1;
        private Microsoft.Office.Tools.Ribbon.RibbonButton gbtnKonto;
        private Microsoft.Office.Tools.Ribbon.RibbonButton gbtnHandySignatur;
        private Microsoft.Office.Tools.Ribbon.RibbonButton gbtnMail;
        private Microsoft.Office.Tools.Ribbon.RibbonButton gbtnSaveLoc;
        private Microsoft.Office.Tools.Ribbon.RibbonButton gbtnZustellung;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnSendByMail;
        internal Microsoft.Office.Tools.Ribbon.RibbonButton btnChangeFormType;
    }

    partial class ThisRibbonCollection
    {
        internal EbI4P1Ribbon ebI4p1Ribbon
        {
            get { return this.GetRibbon<EbI4P1Ribbon>(); }
        }
    }
}


text:
Home » Savage Sucker Punch
Savage Sucker Punch
by Stephanie Shaw May 14, 1992 August 20, 2021
THE MARRIAGE OF BETTE AND BOO
Apple Tree Theatre
Christopher Durang's The Marriage of Bette and Boo is a nasty little comic masterpiece pointed at the heart of the ideal American family. Injustice and small cruelties abound in the world of Bette, Boo, and their extended families. Marriage is a mine field of miscommunication, family holidays are vicious affairs, and stillborn babies are a running gag.
The babies belong to Bette and Boo (Kathy Santen and Sean Grennan), who have little success producing live children after their first, a boy named Matt, is born. Bette is obsessed with having a large brood, all of whom she will name after the characters from A.A. Milne's Winnie-the-Pooh series. As failed pregnancy follows failed pregnancy, Boo retreats into alcoholism and the marriage begins to disintegrate. God, church, and family fall far short of expectations. In spite of Bette's prayers, God does not come through with a miracle for her. Her mother (Margaret Ingraham) refuses to address her children's problems–she prefers them unhappy and living at home with her. Her father (Don Blair) seems compassionate, but no one can understand a word of the gibberish he speaks. However, Boo's father (J. Patrick McCormack) speaks very well. A smooth sadist who uses his words brutally, he offers to "christen the next stillborn" and pours a glass of Scotch into Bette's lap. His obsequious wife (Barbara Simpson) fends off his verbal abuse with a habitual nervous twitter. The parish priest (Marc Silvia) offers nothing in the way of solace or advice and wonders "why God made people stupid."
This play can come off as more an ugly bundle of woes than a comedy, but it works well when it's done with savagery. Durang's characters are fun-house-mirror reflections, absurd and exaggerated yet perfectly recognizable. He magnifies not only the inanities of human behavior but also the pain behind them, so that if the script is served well we will wince as we laugh. The Apple Tree Theatre production started out with an unsteady sweetness that fooled me into thinking this would be yet another Durang production that missed the point. But it turned out to be a terrific tactic, putting the audience in position for a sucker punch.
The company and director Mark Lococo are to be congratulated for resisting the temptation to whitewash Durang for the benefit of their subscribers–Apple Tree is located in a shopping mall in Highland Park, where people may be a little more sensitive about satire aimed at families. Several people at the Saturday-night performance I attended headed straight for the door after the first act, including a few families and a flock of ladies in spring dresses who left the third row conspicuously empty when the lights went down.
But they missed the delicious, heartbreaking second act. They missed Don Blair's wonderfully understated heart attack and Matt's conversation with his grandparents, one senile, one surly, two dead. They didn't see the emptiness in Boo's eyes when he gazed at his final stillborn child and pleaded with Bette to give up trying to have children, complaining mournfully, "They get you up in the middle of the night, dead." The teenagers didn't hear the sage advice of Father Donnally regarding marriage: "For God's sake, if you're going to get married, pay attention to what you're doing, have conversations with the person." They passed up more of Kathy Santen's breathless, compelling performance, J. Patrick McCormack's cruel precision, and Marc Silvia's terrific bit of silliness as a priest impersonating a strip of frying bacon.
Yes, dead babies are tossed around the stage in a rather irreverent manner. But if you can get past this image (after all, the babies aren't real) and laugh at the absurdities Durang presents, you might appreciate the holes he pokes in the fairy tale of family life.
BABY WITH THE BATHWATER
Cram Productions
at Centre East Studio Theatre
In Baby With the Bathwater, another Durang satire about dysfunctional families, a young man named Daisy struggles to come to terms with his ludicrous upbringing. When his therapist says he's going out of town and there will be no session the next week, Daisy threatens to do violence to himself.
"You're trying to manipulate me," the therapist warns him.
"Yes," Daisy agrees. "But I mean well."
The same could be said of Cram Productions' play at Centre East, in what was clearly once a high school music room and is now called the Studio Theatre. It might be difficult for any production to overcome the air of amateurishness that hangs about the room, but this play didn't have a chance.
The story of a child brought up by parents who are too insane and inconsistent to verify what sex it is, what its needs are, or how to keep it from running head on into speeding buses, Baby With the Bathwater needs to be played fast and furiously, with very little time spent on introspection. These are not introspective people; they down Quaaludes and NyQuil and keep their child in the clothes hamper. Who would think of playing it realistically?
Yet Cram Productions takes Durang's nightmare vision of a vulnerable child at face value–and serves up the blandest dish imaginable. The performances are slow, hard to hear (except when the actors are screeching), and achingly amateur. The one exception is Paul Mougey as the adult Daisy; he alone shows confidence and some stage presence. If director Larry Paullin has any sort of plan behind his staging, it's not evident.
Art accompanying story in printed newspaper (not available in this archive): photo/Roger Lewin–Jennifer Girard Studio.
This Week on FilmStruck: Bette Davis

redpajama_set_name: RedPajamaCommonCrawl


Just as the name implies. A versatile file for wood or soft metals with a heavy-duty rasp on one side and a file for lighter work on the other side. Built-in handle. Mercer files have a multitude of styles and uses from sharpening, stock removal and removing burrs.


text:
Industrimotorer används i anläggningsmaskiner, jord- och skogsbruksmaskiner, generatoraggregat och så vidare. Industrimotorer är ofta konstruerade för drift vid specifikt varvtal, ofta med stabilare blockkonstruktion.

Motorteknik
Jordbruksredskap

redpajama_set_name: RedPajamaWikipedia


text:
Home/World News/General News/No Syria talks for time being: UN-AL envoy
No Syria talks for time being: UN-AL envoy
United Nations-Arab League Special Representative for Syria Lakhdar Brahimi has dismissed the likelihood of a new round of peace talks on the Syria crisis at the present juncture.
"A return to Geneva is out of question for the time being because the criteria have not been met," Brahimi said in Kuwait on Monday.
Two rounds of talks recently hosted by Brahimi and held in Switzerland have made little progress toward ending the crisis in Syria.
The second round of talks between delegations representing the Syrian government and the so-called Syrian National Coalition in the Swiss city of Geneva hit a deadlock in mid-February with both sides sticking to their positions.
The Syrian delegation said fighting terrorism should be the top priority, but the opposition said the resignation of President Assad and the formation of a transitional government must come first.
More than 130,000 people are said to have been killed over the past three years of turmoil in Syria. Millions have also been displaced due to the crisis.
Iran FM: israel complicit with Takfiris, extremist terrorists
UN chief condemns Dutch priest death in Syria
Imam Khomeini's (r.a) was welcomed by Imam Ali (a.s)
Many al-Nusra Front terrorists killed in Syria army ambush
Top Iranian official: Solution to crisis in Syria is political


text:
Q: On the condition for rolling without slipping
Imagine a wheel rolling on the floor as shown in the picture. Let $P_{0}$ be a point on the circle wheel such that it's the point of contact between floor and wheel.
The book I am going through mentions that, the condition for rolling without slipping is ,
$$v_{\text{CM}}=Rw$$,
Where $R$ is the radius of circle and $w$ is angular velocity.
My questions:-
$(1)$- Why is $v_{cm}=Rw$ the condition for rolling without slipping?
$(2)$- Why is it's said that $P_{0}$ is at rest. My argument is since the point is on the edge of wheel, shouldn't it move with the wheel?

redpajama_set_name: RedPajamaStackExchange


Frank Sinatra famously sang about New York City, "If I can make it here I'll make it anywhere!"
The city requires survival skills. The competition is tough, the living conditions cramped, and the work hours long. Now that I live near Manhattan, and in its busy commuter community, I realize how many distractions press down daily upon those who are fighting to survive. Some are distracted by trying to afford the cost of living, those more fortunate are distracted by the many pleasures their money can afford.
The verses above remind us that wisdom is readily available for those who listen. Yet many do not listen because they are distracted. Wisdom wants attention, but competes with noisy streets and marketplaces. You do not have to live in New York City, or in any big city, to recognize such distractions. If nothing else, distractions are delivered to our televisions 24/7. The city never sleeps, indeed!
But look again at these verses and notice something. Even though the streets are noisy, wisdom "cries aloud." Wisdom goes to the marketplace. Wisdom positions herself at the city's entrance so she is seen bright and early. What prevents us from paying heed? Perhaps these "distractions" are really choices.
Listening to wisdom is shorthand for listening to God, and taking God's words to heart: "The fear of the Lord is the beginning of wisdom" (Proverbs 9:10). Why would we distract ourselves from such a privilege?
Very cool blog, Ken. I've been reading Isaiah lately with an eye towards figuring out biblical assumptions about "the city." So far, all i've been able to figure is that the city is assumed to be a good thing, and citizenship to be among the responsibilities of the christian.
The city requires survival skills.
That's for sure! I'm in the Guadalajara airport right now using the wireless network here (thank you, globalization!) to check out your blog for the first time and getting ready to plunge back into my favorite city.


Synopsis A performance (in English) of The Creation by German Classical composer, Joseph Haydn (1732-1809).
Caption: "Part One." The Representation of Chaos (Die Vorstellung des Chaos). Film of astronomical and geological phenomena – volcanic fire, etc. Caption: "Chaos." Volcanic eruptions, lava, etc. Orchestra and chorus. Astronomical and terrestrial natural phenomena, African wildlife, etc. Caption: "Day I." "In the beginning God created the Heaven and the Earth" ("Im Anfange schuf Gott Himmel und Erde"). Weather fronts. "Now vanish before the holy beams" ("Nun schwanden vor dem heiligen Strahle"). Sunrises, dawn skies. Paintings by William Blake and others depicting the defeat of Satan, souls in Hell, etc. Performance; details of chapel architecture.
Caption: "Day II." "And God made the firmament" ("Und Gott machte das Firmament"). Paintings by Blake, natural phenomena. "The marv'lous work beholds amaz'd" ("Mit Staunen sieht das Wunderwerk"). Stained glass windows, singers, musicians, stained glass. Caption: "Day III." "And God said: Let the waters under the heaven" ("Und Gott sprach: Es sammle sich das Wasser"). Heavy seas. "Rolling in foaming billows" ("Rollend in schaumenden Wellen"). Water-related scenes. "And God said, Let the earth bring forth grass" ("Und Gott sprach: Es bringe die Erde Gras hervor") "With verdure clad the fields appear" ("Nun beut die Flur das frische Grün"). Flora, etc. "And the heav'nly host proclaimed" ("Und die himmlischen Heerscharen erkündigten"). "Awake the harp, the lyre awake" ("Stimmt an die Saiten"). Chorus, chapel ornaments and decoration.
Caption: "Day IV." "And God said: Let there be lights in the firmament of heaven" ("Und Gott sprach: Es sei'n Lichter an der Feste des Himmels") "In splendour bright is rising now the sun and darts his rays" ("In vollem Glanze steiget jetzt die Sonne"). Sunrise, paintings, church ceiling decorations. "The heavens are telling the glory of God" ("Die Himmel erzählen die Ehre Gottes"). Chorus, church decorations, etc.
Caption: "Part two." Caption: "Day V." "And God said: Let the waters bring forth abundantly" ("Und Gott sprach: Es bringe das Wasser in der Fülle hervor"). Birds, musicians. "On mighty pens, uplifted soars" ("Auf starkem Fittige schwinget sich der Adler stolz"). Birds, musicians. "And God created great whales" ("Und Gott schuf grosse Walfische"). Fish and sea birds.
"And the angels struck their immortal harps" ("Und die Engel rührten ihr' unsterblichen Harfen"). Waterfalls, tropical forests, rivers. "Most beautiful appear, with verdure young adorn'd" ("In holder Anmut stehn"). Birds, fish, landscape and other paintings. "The Lord is great, and great his might" ("Der Herr ist gross in seiner Macht"). Stained glass windows, chorus, church interior.
Caption: "Day VI." "And God said: Let the earth bring forth the living creature after his kind" ("Und Gott sprach: Es bringe die Erde hervor lebende Geschopfe" ). "Straight opening her fertile womb" ("Gleich öffnet sich der Erde Schoss"). African wildlife, insects, etc. "Now heav'n in fullest glory shone" ("Nun scheint in vollem Glanze der Himmel"). Various landscapes, creation paintings by Michelangelo and Blake. "And God created man in his own image" ("Und Gott schuf den Menschen").
"In native worth and honour clad" ("Mit Würd' und Hoheit angetan"). Creation paintings by Michelangelo, Blake and others. "And God saw ev'ry thing that he had made" ("Und Gott sah jedes Ding") "Achieved is the glorious work" ("Vollendet ist das grosse Werk"). Orchestra and chorus. African and other wildlife. Chorus, church interior, windows, etc.
Caption: "Part three." Caption: "Day VII." "In rosy mantle appears, by tunes sweet awak'd" ("Aus Rosenwolken bricht"). African wildlife, an African village. "By thee with bliss, o bounteous Lord" ("Von deiner Gut, o Herr und Gott"). Natural phenomena, church decorations, pastoral and other paintings by Blake, Turner, etc. Musicians.
"Our duty we performed now" ("Nun ist die erste Pflicht erfüllt") "Graceful consort! At thy side" ("Holde Gattin, dir zur Seite"). Church décor, countryside, pastoral paintings, etc. "O happy pair, and always happy yet" ("O glücklich Paar, und glücklich immerfort") "Sing the Lord, ye voices all!" ("Singt dem Herren alle Stimmen!"). Chorus, orchestra, the soloists, etc. Credits.
Full credits The Creation by Joseph Haydn. Performed by The Academy of Ancient Music, (leader Christopher Hirons), The Chorus of the Academy of Ancient Music (director Simon Halsey), The Choir of New College, Oxford (director Edward Higginbottom); Conductor Christopher Hogwood; Soloists Emma Kirkby, Anthony Rolfe Johnson, Michael George; [English Translation Robert Shaw]. With thanks to: The Dean & Chapter of Gloucester, Peter Bolton, David Todd, Roy Hankinson. Natural History film by courtesy of: BBC Television, Royal Society for the Protection of Birds; Photographs and paintings by courtesy of: Birmingham Museum and Art Gallery, Bridgeman Art Library, British Museum, City of Bristol Museum and Art Gallery, Mary Evans Picture Library, Simon Farrell, Fitzwilliam Museum, Cambridge, Peter Gibson, Laing Art Gallery, Newcastle-upon-Tyne, Mellon Bank Corporation National Gallery of Ireland, National Gallery of Scotland, National Trust Photographic Library, Tate Gallery, London, Turner Collection, Tate Gallery, Victoria and Albert Museum, Viewfinder Colour Photo Library, Whitworth Art Gallery, York City Art Gallery, The Dean & Chapter of York. Graphic Design Alison Murphy; Rostrum Camera Ken Morse; Make-up Sharon Dowsett; Sound by The Decca Record Company Limited; Sound Producer Peter Wadland; Sound Engineer John Dunkerley; Decca Executive Producer Herbert Chappell; O.B. Lighting Director Alan Woolford; O.B. Unit Manager Joe French; O.B. Cameramen Barrie Dodd, Simon Cooper, Duncan McLaren, Phil Piotrowski; Floor Manager Mike Morgan; Solo Cameraman Peter Bartlett; Stills Research Angela Gray; Film Research Jerry Short; Videotape Editor Mike Butler; Picture Editor Arthur Bennett; O.B. Director Rodney Greenberg; Associate Producer Judy Chesterman; Producer and Directed by Chris Hunt. Iambic Productions in association with Channel Four, The Arts Council, and The Decca Record Company Limited. An Iambic Production. © Iambic Productions MCMXC.


The 29 members of Class 2 of the Carroll County Sheriff's Office Training Academy entered the auditorium of Winters Mill High School as recruits, and left as officers and deputies of seven law enforcement agencies throughout Maryland.
Recruits began training Sept. 10 and endured 28 weeks of training based out of the former North Carroll High School.
Carroll County Sheriff Jim DeWees thanked the members of his office and all those who work to make the training academy possible. He also thanked the gathered chiefs and sheriffs of other jurisdictions for trusting the academy to train their newest members.
He told them he is confident they have been trained well and have what it takes for a career in law enforcement, and highlighted the importance of the support of their friends and families through both success and failure.
Police work isn't always car thieves or high-speed chases. But during training, sometimes it can be.
Elaine Miller, member of the Ocean City Police Department and president of the class, looked back on moments in the weeks of training that ranged from exciting to painful to funny.
Through the strenuous days, a common goal brought them together, she said. She thanked their instructors, friends and family who serve as their support system.
Many of those support systems included family members and friends who were also law enforcement officers, and some joined the ceremony to pin badges on the graduates.
Fourteen graduates will join the Carroll County Sheriff's Office, five will join the Ocean City Police Department, five will join the Frederick County Sheriff's Office, two will join the Queen Anne's County Sheriff's Office, one will join the Boonsboro Police Department, one will join the Thurmont Police Department and one will join the Office of the State Fire Marshal.
Deputy Kyle Dedmon said he decided he wanted to join the training academy after working as a dispatcher in the county for two and a half years. After speaking more with deputies and doing a ridealong, he decided it was the path for him.
His instructors instilled in the class to never give up, no matter the circumstances, he said.
"That's what all the training is about," Dedmon said. Born and raised in Carroll, he graduated from Francis Scott Key High School.
Carroll County Sheriff Jim DeWees congratulated 17 young men on Friday morning for what will be one of their proudest accomplishments, he said.
He knows because he still considers graduating from the police academy to be one of his greatest accomplishments.
Deputy Valerie Mizansky joined the training academy after graduating from college with a degree in criminal justice, and is working toward a career as a detective.
"Starting as a deputy is the first step to achieving my goals," she said. She and her fellow recruits were Tased, gassed and pepper-sprayed in the course of the 28 weeks.
"You don't think you can get through it, but with the help of your classmates and instructors, you do," she said.
The campus of the former North Carroll High School where the recruits train must have been familiar to her — she graduated from high school there.
Deputy Gregory Harris was a teenager when he decided to pursue law enforcement. The auditorium of Winters Mill was familiar to him because he graduated from the school.
"I knew I wanted to be a public servant and serve my community," he said.
Persistence was an important part of the training.
"You just [have] the the thought in your head that says 'This is hard.' You just keep pushing through," he said.


text:
You are here: Home / Awards / Francis L.K. Hsu Book Prize
Francis L.K. Hsu Book Prize
The Society for East Asian Anthropology invites submissions for the 2019 Francis L.K. Hsu
Book Prize. The prize of $300 is given to the English-language book published in the previous
calendar year (2018) judged to have made the most significant contribution to the field. The prize
is named for the late Francis L.K. Hsu (1909-2000), renowned cross-cultural anthropologist and
former President (1977-78) of the American Anthropological Association.
Book submissions from all four fields of anthropology as they relate to East Asia, as well as
books that venture beyond standard ethnographic modes of writing, are very much encouraged.
Nominations for the prize may be made by authors, publishers, or interested third parties (with
the consent of the author). Reference works, translations, textbooks, edited works, and
anthologies are not eligible. Both members and non-members of SEAA are eligible.
The 2019 submission deadline for this prize is May 1st, 2019.
Please send (1) a hard copy of the book and (2) either a PDF or e-book to each of the four
Committee members at the addresses listed below. Books must be received by the May 1
deadline for full consideration.
Dr. Priscilla SONG [Chair of the Book Prize Committee]
Centre for the Humanities and Medicine
Faculty of Arts, Centennial Campus
Professor Satsuki KAWANO
603 Mackinnon Building
Canada N1G 2W1
Dr. Nicole NEWENDORP
Social Studies, Harvard University
William James Hall, 3rd floor
33 Kirkland St.
Professor Young-a PARK
Asian Studies Program
University of Hawaii at Manoa
1890 East-West Road, Moore 321
2016 Hsu Prize: Jie Yang
2014 Hsu Prize: Manduhai Buyandelger
2013 Hsu Prize: Junko Kitanaka
2013 Hsu Prize: J. Farquhar & Q. Zhang
2011 Hsu Prize: Li Zhang
Past Francis Hsu Book Prize Recipients:
2018: Priscilla Song's Biomedical Odysseys: Fetal Cell Experiments from Cyberspace to China (Princeton: Princeton University Press, 2017)
2017: Yukiko Koga's Inheritance of Loss: China, Japan, and the Political Economy of Redemption after Empire (Studies of the Weatherhead East Asian Institute 2016).
2016: Jie Yang's Unknotting the Heart: Unemployment and Therapeutic Governance in China (Cornell University Press 2015).
2015: Rian Thum's The Sacred Routes of Uyghur History (Harvard University Press 2014).
2014: Manduhai Buyandelger's Tragic Spirits: Shamanism, Memory, and Gender in Contemporary Mongolia (University of Chicago Press 2013).
2013: Junko Kitanaka's Depression in Japan: Psychiatric Cures for a Society in Distress (Princeton University Press) and Judith Farquhar & Qicheng Zhang's Ten Thousand Things: Nurturing Life in Contemporary Beijing (Zone Books 2012).
2012: Andrew Kipnis's Governing Educational Desire: Culture, Politics, and Schooling in China (University of Chicago Press 2011).
2011: Li Zhang's In Search of Paradise: Middle Class Living in a Chinese Metropolis (Cornell University Press 2010).
2010: Cathryn Clayton's Sovereignty at the Edge: Macau and the Question of Chineseness (Harvard East Asian Monograph Series 2009).
2009: Nicole Dejong Newendorp's Uneasy Reunions: Immigration, Citizenship, and Family Life in Post-1997 Hong Kong (Stanford University Press 2008).
2008: David Palmer's Qigong Fever: Body, Science and Utopia (Columbia University Press 2007).
2007: Tamara Jacka's Rural Women in Urban China: Gender, Migration, and Social Change (M.E. Sharpe Press).
2006: Susan Orpett Long's Final Days: Japanese Culture and Choice at the End of Life (University of Hawaii Press 2005).
2005: Vanessa Fong's Only Hope: Coming of Age under China's One-Child Policy (Stanford University Press 2004).
2004: Bonnie Adrian's Framing the Bride: Globalizing Beauty and Romance in Taiwan's Bridal Industry (University of California Press 2003).


text:
package org.deviceconnect.android.deviceplugin.host.profile;

import android.Manifest;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.provider.BaseColumns;
import android.provider.MediaStore;
import androidx.annotation.NonNull;
import android.util.LongSparseArray;

import org.deviceconnect.android.activity.PermissionUtility;
import org.deviceconnect.android.deviceplugin.host.BuildConfig;
import org.deviceconnect.android.deviceplugin.host.file.HostFileProvider;
import org.deviceconnect.android.deviceplugin.host.mediaplayer.HostMediaPlayerManager;
import org.deviceconnect.android.event.EventError;
import org.deviceconnect.android.event.EventManager;
import org.deviceconnect.android.message.MessageUtils;
import org.deviceconnect.android.profile.MediaPlayerProfile;
import org.deviceconnect.android.profile.api.DConnectApi;
import org.deviceconnect.android.profile.api.DeleteApi;
import org.deviceconnect.android.profile.api.GetApi;
import org.deviceconnect.android.profile.api.PutApi;
import org.deviceconnect.android.provider.FileManager;
import org.deviceconnect.message.DConnectMessage;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * Media Player Profile.
 *
 * @author NTT DOCOMO, INC.
 */
public class HostMediaPlayerProfile extends MediaPlayerProfile {

    /** Debug Tag. */
    private static final String TAG = "HOST";

    /** ミリ秒 - 秒オーダー変換用. */
    private static final int UNIT_SEC = 1000;

    /** Sort flag. */
    enum SortOrder {
        /** Title (asc). */
        TITLE_ASC,
        /** Title (desc). */
        TITLE_DESC,
        /** Duration (asc). */
        DURATION_ASC,
        /** Duration (desc). */
        DURATION_DESC,
        /** Artist (asc). */
        ARTIST_ASC,
        /** Artist (desc). */
        ARTIST_DESC,
        /** Mime (asc). */
        MIME_ASC,
        /** Mime (desc). */
        MIME_DESC,
        /** Id (asc). */
        ID_ASC,
        /** Id (desc). */
        ID_DESC,
        /** Composer (asc). */
        COMPOSER_ASC,
        /** Composer (desc). */
        COMPOSER_DESC,
        /** Language (asc). */
        LANGUAGE_ASC,
        /** Language (desc). */
        LANGUAGE_DESC
    }

    /**
     * AudioのContentProviderのキー一覧を定義する.
     */
    private static final String[] AUDIO_TABLE_KEYS = { MediaStore.Audio.Media.ALBUM, MediaStore.Audio.Media.ARTIST,
            MediaStore.Audio.Media.COMPOSER, MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media.DURATION,
            MediaStore.Audio.Media._ID, MediaStore.Audio.Media.MIME_TYPE, MediaStore.Audio.Media.DATE_ADDED,
            MediaStore.Audio.Media.DISPLAY_NAME };

    /**
     * VideoのContentProviderのキー一覧を定義する.
     */
    private static final String[] VIDEO_TABLE_KEYS = { MediaStore.Video.Media.ALBUM, MediaStore.Video.Media.ARTIST,
            MediaStore.Video.Media.LANGUAGE, MediaStore.Video.Media.TITLE, MediaStore.Video.Media.DURATION,
            MediaStore.Video.Media._ID, MediaStore.Video.Media.MIME_TYPE, MediaStore.Video.Media.DATE_ADDED,
            MediaStore.Video.Media.DISPLAY_NAME };

    /** Mute Status. */
    private static Boolean sIsMute = false;

    private HostMediaPlayerManager mHostMediaPlayerManager;

    private final DConnectApi mPutPlayApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_PLAY;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            mHostMediaPlayerManager.playMedia(response);
            return false;
        }
    };

    private final DConnectApi mPutStopApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_STOP;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            mHostMediaPlayerManager.stopMedia(response);
            return false;
        }
    };

    private final DConnectApi mPutPauseApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_PAUSE;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            mHostMediaPlayerManager.pauseMedia(response);
            return false;
        }
    };

    private final DConnectApi mPutResumeApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_RESUME;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            mHostMediaPlayerManager.resumeMedia(response);
            return false;
        }
    };

    private final DConnectApi mGetPlayStatusApi = new GetApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_PLAY_STATUS;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            mHostMediaPlayerManager.getPlayStatus(response);
            return false;
        }
    };

    private final DConnectApi mPutMediaApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_MEDIA;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            final String mediaId = getMediaId(request);
            if (checkInteger(mediaId)) {
                mHostMediaPlayerManager.putMediaId(response, mediaId);
                return true;
            } else {
                PermissionUtility.requestPermissions(getContext(), new Handler(Looper.getMainLooper()),
                    new String[] { Manifest.permission.READ_EXTERNAL_STORAGE },
                    new PermissionUtility.PermissionRequestCallback() {
                        @Override
                        public void onSuccess() {
                            FileManager mFileManager = new FileManager(getContext(), HostFileProvider.class.getName());

                            long newMediaId = mediaIdFromPath(getContext(), mFileManager.getBasePath() + mediaId);
                            if (newMediaId == -1) {
                                MessageUtils.setInvalidRequestParameterError(response);
                                sendResponse(response);
                                return;
                            }
                            mHostMediaPlayerManager.putMediaId(response, "" + newMediaId);
                            sendResponse(response);
                        }

                        @Override
                        public void onFail(@NonNull String deniedPermission) {
                            MessageUtils.setIllegalServerStateError(response,
                                "Permission READ_EXTERNAL_STORAGE not granted.");
                            sendResponse(response);
                        }
                    });
                return false;
            }
        }
    };

    private final DConnectApi mGetMediaApi = new GetApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_MEDIA;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            final String serviceId = getServiceID(request);
            final String mediaId = getMediaId(request);
            PermissionUtility.requestPermissions(getContext(), new Handler(Looper.getMainLooper()),
                new String[] { Manifest.permission.READ_EXTERNAL_STORAGE },
                new PermissionUtility.PermissionRequestCallback() {
                    @Override
                    public void onSuccess() {
                        onGetMediaInternal(request, response, serviceId, mediaId);
                    }

                    @Override
                    public void onFail(@NonNull String deniedPermission) {
                        MessageUtils.setIllegalServerStateError(response,
                            "Permission READ_EXTERNAL_STORAGE not granted.");
                        sendResponse(response);
                    }
                });
            return false;
        }
    };

    private final DConnectApi mGetMediaListApi = new GetApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_MEDIA_LIST;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            String query = getQuery(request);
            String mimeType = getMIMEType(request);
            String[] orders = getOrder(request);
            Integer offset = getOffset(request);
            Integer limit = getLimit(request);
            Bundle b = request.getExtras();
            if (b.getString(PARAM_LIMIT) != null) {
                if (parseInteger(b.get(PARAM_LIMIT)) == null) {
                    MessageUtils.setInvalidRequestParameterError(response);
                    return true;
                }
            }
            if (b.getString(PARAM_OFFSET) != null) {
                if (parseInteger(b.get(PARAM_OFFSET)) == null) {
                    MessageUtils.setInvalidRequestParameterError(response);
                    return true;
                }
            }
            return getMediaList(response, query, mimeType, orders, offset, limit);
        }
    };

    private final DConnectApi mPutVolumeApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_VOLUME;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            Double volume = getVolume(request);

            AudioManager manager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);

            double maxVolume = manager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
            manager.setStreamVolume(AudioManager.STREAM_MUSIC, (int) (maxVolume * volume), 1);
            setResult(response, DConnectMessage.RESULT_OK);

            mHostMediaPlayerManager.sendOnStatusChangeEvent("volume");
            return true;
        }
    };

    private final DConnectApi mGetVolumeApi = new GetApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_VOLUME;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            AudioManager manager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);

            double maxVolume = 1;
            double mVolume = 0;

            mVolume = manager.getStreamVolume(AudioManager.STREAM_MUSIC);
            maxVolume = manager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
            setVolume(response, mVolume / maxVolume);

            setResult(response, DConnectMessage.RESULT_OK);
            return true;
        }
    };

    private final DConnectApi mPutSeekApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_SEEK;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            mHostMediaPlayerManager.setMediaPos(response, getPos(request));
            return false;
        }
    };

    private final DConnectApi mGetSeekApi = new GetApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_SEEK;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            int pos = mHostMediaPlayerManager.getMediaPos();
            if (pos < 0) {
                setPos(response, 0);
                switch (pos) {
                    case -1:
                        MessageUtils.setIllegalDeviceStateError(response, "Media is not set.");
                        break;
                    case -10:
                    default:
                        MessageUtils.setUnknownError(response, "Position acquisition failure.");
                        break;
                }
            } else if (pos == Integer.MAX_VALUE) {
                mHostMediaPlayerManager.setVideoMediaPosRes(response);
                return false;
            } else {
                setPos(response, pos);
                setResult(response, DConnectMessage.RESULT_OK);
            }
            return true;
        }
    };

    private final DConnectApi mPutMuteApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_MUTE;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            AudioManager manager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
            manager.setStreamMute(AudioManager.STREAM_MUSIC, true);
            sIsMute = true;
            setResult(response, DConnectMessage.RESULT_OK);
            mHostMediaPlayerManager.sendOnStatusChangeEvent("mute");
            return true;
        }
    };

    private final DConnectApi mDeleteMuteApi = new DeleteApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_MUTE;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            AudioManager manager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
            manager.setStreamMute(AudioManager.STREAM_MUSIC, false);
            sIsMute = false;
            setResult(response, DConnectMessage.RESULT_OK);
            mHostMediaPlayerManager.sendOnStatusChangeEvent("unmute");
            return true;
        }
    };

    private final DConnectApi mGetMuteApi = new GetApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_MUTE;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            setMute(response, sIsMute);
            setResult(response, DConnectMessage.RESULT_OK);
            return true;
        }
    };

    private final DConnectApi mPutOnStatusChangeApi = new PutApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_ON_STATUS_CHANGE;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            String serviceId = getServiceID(request);

            // イベントの登録
            EventError error = EventManager.INSTANCE.addEvent(request);
            if (error == EventError.NONE) {
                mHostMediaPlayerManager.registerOnStatusChange(response, serviceId);
                return false;
            } else {
                MessageUtils.setInvalidRequestParameterError(response, "Can not register event.");
                return true;
            }
        }
    };

    private final DConnectApi mDeleteOnStatusChangeApi = new DeleteApi() {

        @Override
        public String getAttribute() {
            return ATTRIBUTE_ON_STATUS_CHANGE;
        }

        @Override
        public boolean onRequest(final Intent request, final Intent response) {
            // イベントの解除
            EventError error = EventManager.INSTANCE.removeEvent(request);
            if (error == EventError.NONE) {
                mHostMediaPlayerManager.unregisterOnStatusChange(response);
                return false;
            } else {
                MessageUtils.setInvalidRequestParameterError(response, "Can not unregister event.");
                return true;
            }
        }
    };

    public HostMediaPlayerProfile(final HostMediaPlayerManager manager) {
        mHostMediaPlayerManager = manager;

        addApi(mPutPlayApi);
        addApi(mPutStopApi);
        addApi(mPutPauseApi);
        addApi(mPutResumeApi);
        addApi(mGetPlayStatusApi);
        addApi(mPutMediaApi);
        addApi(mGetMediaApi);
        addApi(mGetMediaListApi);
        addApi(mPutVolumeApi);
        addApi(mGetVolumeApi);
        addApi(mPutSeekApi);
        addApi(mGetSeekApi);
        addApi(mPutMuteApi);
        addApi(mDeleteMuteApi);
        addApi(mGetMuteApi);
        addApi(mPutOnStatusChangeApi);
        addApi(mDeleteOnStatusChangeApi);
    }

    private void onGetMediaInternal(final Intent request, final Intent response, final String serviceId,
            final String mediaId) {
        // Query table parameter.
        String[] param = null;
        // URI
        Uri uriType = null;
        // Query filter.
        String filter = "_display_name=?";
        // Query cursor.
        Cursor cursor = null;

        if (mediaId.length() == 0) {
            MessageUtils.setInvalidRequestParameterError(response);
            sendResponse(response);
            return;
        }

        // Get media path.
        String fileName = null;
        Uri uri = getMediaUri(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, mediaId);
        if (uri != null) {
            fileName = getDisplayNameFromUri(uri);
            if (fileName == null) {
                uri = getMediaUri(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, mediaId);
                if (uri != null) {
                    fileName = getDisplayNameFromUri(uri);
                    if (fileName != null) {
                        param = AUDIO_TABLE_KEYS;
                        uriType = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
                    }
                }
            } else {
                param = VIDEO_TABLE_KEYS;
                uriType = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
            }
        }

        if (fileName == null) {
            FileManager mFileManager = new FileManager(getContext(), HostFileProvider.class.getName());
            File basePath = mFileManager.getBasePath();
            String absolutePath = basePath.getAbsolutePath();

            uri = getMediaUri(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, absolutePath + mediaId);
            if (uri != null) {
                fileName = getDisplayNameFromUri(uri);
                if (fileName == null) {
                    uri = getMediaUri(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, absolutePath + mediaId);
                    if (uri != null) {
                        fileName = getDisplayNameFromUri(uri);
                        if (fileName != null) {
                            param = AUDIO_TABLE_KEYS;
                            uriType = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
                        }
                    }
                } else {
                    param = VIDEO_TABLE_KEYS;
                    uriType = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
                }
            }
        }

        if (fileName == null) {
            MessageUtils.setInvalidRequestParameterError(response);
            sendResponse(response);
            return;
        }

        ContentResolver cresolver = getContext().getApplicationContext().getContentResolver();
        try {
            cursor = cresolver.query(uriType, param, filter, new String[] { fileName }, null);
            if (cursor == null) {
                MessageUtils.setInvalidRequestParameterError(response);
            } else if (cursor.moveToFirst()) {
                loadMediaData(uriType, cursor, response);
                setResult(response, DConnectMessage.RESULT_OK);
            }
        } finally {
            if (cursor != null) {
                cursor.close();
            }
        }
        sendResponse(response);
    }

    /**
     * Get Media Uri.
     * @param typeUri type Uri.
     * @param mediaId media ID.
     * @return uri.
     */
    private Uri getMediaUri(final Uri typeUri, final String mediaId) {
        if (!(isMediaId(mediaId))) {
            long newMediaId = mediaIdFromPath(getContext(), mediaId);
            if (newMediaId != -1) {
                return ContentUris.withAppendedId(typeUri, newMediaId);
            } else {
                return null;
            }
        } else {
            return ContentUris.withAppendedId(typeUri, Long.valueOf(mediaId));
        }
    }

    /**
     * cursorからMediaDataを読み込みBundleに格納して返却する.
     *
     * @param uriType メディアタイプ
     * @param cursor データが格納されているCursor
     * @param response response.
     */
    private void loadMediaData(final Uri uriType, final Cursor cursor, final Intent response) {
        String mId;
        String mType;
        String mTitle;
        int mDuration;
        String mArtist;
        String mComp;

        if (uriType == MediaStore.Audio.Media.EXTERNAL_CONTENT_URI) {
            mId = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media._ID));
            mType = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE));
            mTitle = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.TITLE));
            mDuration = (cursor.getInt(cursor.getColumnIndex(MediaStore.Audio.Media.DURATION))) / UNIT_SEC;
            mArtist = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.ARTIST));
            mComp = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.COMPOSER));

            setType(response, "Music");

            List<Bundle> dataList = new ArrayList<>();
            Bundle creator = new Bundle();
            setCreator(creator, mArtist);
            setRole(creator, "Artist");
            dataList.add((Bundle) creator.clone());
            setCreator(creator, mComp);
            setRole(creator, "Composer");
            dataList.add((Bundle) creator.clone());

            setCreators(response, dataList.toArray(new Bundle[dataList.size()]));
        } else {
            mId = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media._ID));
            mType = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.MIME_TYPE));
            mTitle = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.TITLE));
            mDuration = (cursor.getInt(cursor.getColumnIndex(MediaStore.Video.Media.DURATION))) / UNIT_SEC;
            mArtist = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.ARTIST));
            String mLang = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.LANGUAGE));
            setLanguage(response, mLang);

            setType(response, "Video");

            List<Bundle> dataList = new ArrayList<>();
            Bundle creatorVideo = new Bundle();
            setCreator(creatorVideo, mArtist);
            setRole(creatorVideo, "Artist");
            dataList.add((Bundle) creatorVideo.clone());
            setCreators(response, dataList.toArray(new Bundle[dataList.size()]));
        }
        setMediaId(response, mId);
        setMIMEType(response, mType);
        setTitle(response, mTitle);
        setDuration(response, mDuration);
    }

    /**
     * Get display name from URI.
     *
     * @param mUri URI
     * @return name display name.
     */
    private String getDisplayNameFromUri(final Uri mUri) {
        Cursor c = null;
        try {
            ContentResolver mContentResolver = getContext().getApplicationContext().getContentResolver();
            c = mContentResolver.query(mUri, null, null, null, null);
            if (c != null && c.moveToFirst()) {
                int index = c.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME);
                if (index != -1) {
                    return c.getString(index);
                }
            }
        } finally {
            if (c != null) {
                c.close();
            }
        }
        return null;
    }

    /**
     * Get Media List.
     *
     * @param response Response
     * @param query Query
     * @param mimeType MIME Type
     * @param orders Order
     * @param offset Offset
     * @param limit Limit
     */
    private boolean getMediaList(final Intent response, final String query, final String mimeType,
            final String[] orders, final Integer offset, final Integer limit) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            PermissionUtility.requestPermissions(getContext(), new Handler(Looper.getMainLooper()),
                    new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
                    new PermissionUtility.PermissionRequestCallback() {
                        @Override
                        public void onSuccess() {
                            getMediaListInternal(response, query, mimeType, orders, offset, limit);
                            sendResponse(response);
                        }

                        @Override
                        public void onFail(@NonNull String deniedPermission) {
                            MessageUtils.setIllegalServerStateError(response,
                                    "READ_EXTERNAL_STORAGE permission not granted.");
                            sendResponse(response);
                        }
                    });
            return false;
        }
        getMediaListInternal(response, query, mimeType, orders, offset, limit);
        return true;
    }

    private void getMediaListInternal(final Intent response, final String query, final String mimeType,
            final String[] orders, final Integer offset, final Integer limit) {
        try {
            SortOrder mSort = SortOrder.TITLE_ASC;
            int counter;
            if (limit != null) {
                if (limit < 0) {
                    MessageUtils.setInvalidRequestParameterError(response);
                    return;
                }
            }
            if (offset != null) {
                if (offset < 0) {
                    MessageUtils.setInvalidRequestParameterError(response);
                    return;
                }
            }

            // 音楽用のテーブルの項目.
            String[] mMusicParam;
            String[] mVideoParam;

            // URI
            Uri mMusicUriType;
            Uri mVideoUriType;

            // 検索用 Filterを作成.
            String mVideoFilter = "";
            String mMusicFilter = "";

            // Orderの処理
            String mOrderBy = "";

            // 検索用Cursor.
            Cursor cursorMusic = null;
            Cursor cursorVideo = null;

            if (mimeType != null) {
                mVideoFilter = "" + MediaStore.Video.Media.MIME_TYPE + " LIKE '" + mimeType + "%'";
                mMusicFilter = "" + MediaStore.Audio.Media.MIME_TYPE + " LIKE '" + mimeType + "%'";
            }
            if (query != null) {
                if (!mVideoFilter.equals("")) {
                    mVideoFilter += " AND ";
                }
                mVideoFilter += MediaStore.Video.Media.TITLE + " LIKE '%" + query + "%'";

                if (!mMusicFilter.equals("")) {
                    mMusicFilter += " AND ";
                }
                mMusicFilter += "(" + MediaStore.Audio.Media.TITLE + " LIKE '%" + query + "%'";
                mMusicFilter += " OR " + MediaStore.Audio.Media.COMPOSER + " LIKE '%" + query + "%')";
            }
            if (orders != null) {
                if (orders.length == 2) {
                    mOrderBy = orders[0] + " " + orders[1];
                    mSort = getSortOrder(orders[0], orders[1]);
                } else {
                    MessageUtils.setInvalidRequestParameterError(response);
                    return;
                }
            } else {
                mOrderBy = "title asc";
                mSort = SortOrder.TITLE_ASC;
            }

            // 音楽用のテーブルキー設定.
            mMusicParam = new String[] { MediaStore.Audio.Media.ALBUM, MediaStore.Audio.Media.ARTIST,
                    MediaStore.Audio.Media.COMPOSER, MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media.DURATION,
                    MediaStore.Audio.Media._ID, MediaStore.Audio.Media.MIME_TYPE, MediaStore.Audio.Media.DATE_ADDED };
            mMusicUriType = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;

            // 動画用のテーブルキー設定.
            mVideoParam = new String[] { MediaStore.Video.Media.ALBUM, MediaStore.Video.Media.ARTIST,
                    MediaStore.Video.Media.LANGUAGE, MediaStore.Video.Media.TITLE, MediaStore.Video.Media.DURATION,
                    MediaStore.Video.Media._ID, MediaStore.Video.Media.MIME_TYPE, MediaStore.Video.Media.DATE_ADDED,
                    MediaStore.Video.Media.MINI_THUMB_MAGIC };
            mVideoUriType = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;

            ContentResolver mContentResolver = this.getContext().getApplicationContext().getContentResolver();

            try {
                cursorMusic = mContentResolver.query(mMusicUriType, mMusicParam, mMusicFilter, null, mOrderBy);
                if (cursorMusic != null) {
                    cursorMusic.moveToFirst();
                }
            } catch (Exception e) {
                MessageUtils.setInvalidRequestParameterError(response);
                if (cursorMusic != null) {
                    cursorMusic.close();
                }
                return;
            }

            ArrayList<MediaList> mList = new ArrayList<>();
            if (cursorMusic.getCount() > 0) {
                counter = getMusicList(cursorMusic, mList);
            }

            try {
                cursorVideo = mContentResolver.query(mVideoUriType, mVideoParam, mVideoFilter, null, mOrderBy);
                cursorVideo.moveToFirst();
            } catch (Exception e) {
                MessageUtils.setInvalidRequestParameterError(response);
                if (cursorMusic != null) {
                    cursorMusic.close();
                }
                if (cursorVideo != null) {
                    cursorVideo.close();
                }
                return;
            }

            if (cursorVideo.getCount() > 0) {
                counter = getVideoList(cursorVideo, mList);
            }

            List<Bundle> list = new ArrayList<>();
            counter = getMediaDataList(mList, list, offset, limit, mSort);
            setCount(response, counter);
            setMedia(response, list.toArray(new Bundle[list.size()]));
            setResult(response, DConnectMessage.RESULT_OK);
            cursorMusic.close();
            cursorVideo.close();
        } catch (Throwable throwable) {
            MessageUtils.setUnknownError(response, "Failed to get a media list.");
        }
    }

    /**
     * Get Music List.
     *
     * @param cursorMusic Cursor Music
     * @param list List
     * @return counter Music data count.
     */
    private int getMusicList(final Cursor cursorMusic, final ArrayList<MediaList> list) {
        int counter = 0;
        do {
            String id = cursorMusic.getString(cursorMusic.getColumnIndex(MediaStore.Audio.Media._ID));
            String mimeType = cursorMusic.getString(cursorMusic.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE));
            String title = cursorMusic.getString(cursorMusic.getColumnIndex(MediaStore.Audio.Media.TITLE));
            int duration = (cursorMusic.getInt(cursorMusic.getColumnIndex(MediaStore.Audio.Media.DURATION)))
                    / UNIT_SEC;
            String artist = cursorMusic.getString(cursorMusic.getColumnIndex(MediaStore.Audio.Media.ARTIST));
            String composer = cursorMusic.getString(cursorMusic.getColumnIndex(MediaStore.Audio.Media.COMPOSER));

            list.add(new MediaList(id, mimeType, title, artist, duration, composer, null, null,false));
            counter++;
        } while (cursorMusic.moveToNext());
        return counter;
    }

    /**
     * Get Video List.
     *
     * @param cursorVideo Cursor Video
     * @param list List
     * @return counter Video data count.
     */
    private int getVideoList(final Cursor cursorVideo, final List<MediaList> list) {
        int counter = 0;
        do {
            LongSparseArray<ThumbnailInfo> thumbnails = queryThumbnailInfoList();

            String lang = cursorVideo.getString(cursorVideo.getColumnIndex(MediaStore.Video.Media.LANGUAGE));
            String id = cursorVideo.getString(cursorVideo.getColumnIndex(MediaStore.Video.Media._ID));
            String type = cursorVideo.getString(cursorVideo.getColumnIndex(MediaStore.Video.Media.MIME_TYPE));
            String title = cursorVideo.getString(cursorVideo.getColumnIndex(MediaStore.Video.Media.TITLE));
            int duration = (cursorVideo.getInt(cursorVideo.getColumnIndex(MediaStore.Video.Media.DURATION)))
                    / UNIT_SEC;
            String artist = cursorVideo.getString(cursorVideo.getColumnIndex(MediaStore.Video.Media.ARTIST));
            String thumbnailUri;
            if (!cursorVideo.isNull(cursorVideo.getColumnIndex(MediaStore.Video.Media.MINI_THUMB_MAGIC))) {
                int thumbnailId = cursorVideo.getInt(cursorVideo.getColumnIndex(MediaStore.Video.Media.MINI_THUMB_MAGIC));
                ThumbnailInfo info = thumbnails.get(thumbnailId);
                thumbnailUri = info == null ? null : info.getUri();
            } else {
                thumbnailUri = null;
            }
            list.add(new MediaList(id, type, title, artist, duration, null, lang, thumbnailUri, true));
            counter++;
        } while (cursorVideo.moveToNext());

        return counter;
    }

    private LongSparseArray<ThumbnailInfo> queryThumbnailInfoList() {
        ContentResolver resolver = getContext().getApplicationContext().getContentResolver();
        Uri uri = MediaStore.Video.Thumbnails.EXTERNAL_CONTENT_URI;
        LongSparseArray<ThumbnailInfo> result = new LongSparseArray<>();
        try (Cursor cursor = resolver.query(uri, null,
                null, null, null)) {
            if (cursor == null) {
                return result;
            }
            if (cursor.moveToFirst()) {
                do {
                    ThumbnailInfo info = createThumbnailInfo(cursor);
                    result.put(info.getId(), info);
                } while (cursor.moveToNext());
            }
            return result;
        }
    }

    private ThumbnailInfo createThumbnailInfo(final Cursor cursor) {
        ThumbnailInfo info = new ThumbnailInfo();
        info.setId(cursor.getLong(cursor.getColumnIndex(MediaStore.Video.Thumbnails._ID)));
        info.setVideoId(cursor.getLong(cursor.getColumnIndex(MediaStore.Video.Thumbnails.VIDEO_ID)));
        info.setUri(cursor.getString(cursor.getColumnIndex(MediaStore.Video.Thumbnails.DATA)));
        info.setWidth(cursor.getInt(cursor.getColumnIndex(MediaStore.Video.Thumbnails.WIDTH)));
        info.setHeight(cursor.getInt(cursor.getColumnIndex(MediaStore.Video.Thumbnails.HEIGHT)));
        info.setKind(cursor.getInt(cursor.getColumnIndex(MediaStore.Video.Thumbnails.KIND)));
        return info;
    }

    /**
     * Get Media List.
     *
     * @param orglist original list.
     * @param medialist Media list.
     * @param offset Offset.
     * @param limit Limit.
     * @param sortflag Sort flag.
     * @return counter Video data count.
     */
    private int getMediaDataList(final List<MediaList> orglist, final List<Bundle> medialist, final Integer offset,
            final Integer limit, final SortOrder sortflag) {

        switch (sortflag) {
        case DURATION_ASC:
        case DURATION_DESC:
            Collections.sort(orglist, new MediaListDurationComparator());
            break;
        case ARTIST_ASC:
        case ARTIST_DESC:
            Collections.sort(orglist, new MediaListArtistComparator());
            break;
        case MIME_ASC:
        case MIME_DESC:
            Collections.sort(orglist, new MediaListTypeComparator());
            break;
        case ID_ASC:
        case ID_DESC:
            Collections.sort(orglist, new MediaListIdComparator());
            break;
        case COMPOSER_ASC:
        case COMPOSER_DESC:
            Collections.sort(orglist, new MediaListComposerComparator());
            break;
        case LANGUAGE_ASC:
        case LANGUAGE_DESC:
            Collections.sort(orglist, new MediaListLanguageComparator());
            break;
        case TITLE_ASC:
        case TITLE_DESC:
        default:
            Collections.sort(orglist, new MediaListTitleComparator());
            break;
        }

        switch (sortflag) {
        case TITLE_DESC:
        case DURATION_DESC:
        case ARTIST_DESC:
        case MIME_DESC:
        case ID_DESC:
        case COMPOSER_DESC:
        case LANGUAGE_DESC:
            Collections.reverse(orglist);
            break;
        default:
            break;
        }

        int mOffset = 0;
        if (offset == null) {
            mOffset = 0;
        } else {
            mOffset = offset;
        }

        int mLimit = 0;
        if (limit == null) {
            mLimit = orglist.size();
        } else {
            mLimit = limit + mOffset;
        }
        for (int i = mOffset; i < mLimit ; i++) {
            if (i >= orglist.size()) {
                break;
            }
            Bundle medium = new Bundle();
            String mComp = null;

            String mId = orglist.get(i).getId();
            String mType = orglist.get(i).getType();
            String mTitle = orglist.get(i).getTitle();
            String mArtist = orglist.get(i).getArtist();
            int mDuration = orglist.get(i).getDuration();
            String mThumbnailUri = orglist.get(i).getThumbnailUri();

            setMediaId(medium, mId);
            setMIMEType(medium, mType);
            setTitle(medium, mTitle);
            setDuration(medium, mDuration);
            setImageUri(medium, mThumbnailUri);

            if (orglist.get(i).isVideo()) {
                String mLang = orglist.get(i).getLanguage();
                setType(medium, "Video");
                setLanguage(medium, mLang);
            } else {
                mComp = orglist.get(i).getComposer();
                setType(medium, "Music");
            }

            List<Bundle> dataList = new ArrayList<Bundle>();
            Bundle creator = new Bundle();
            setCreator(creator, mArtist);
            setRole(creator, "Artist");
            dataList.add((Bundle) creator.clone());

            if (!(orglist.get(i).isVideo())) {
                setCreator(creator, mComp);
                setRole(creator, "Composer");
                dataList.add((Bundle) creator.clone());
            }
            setCreators(medium, dataList.toArray(new Bundle[dataList.size()]));
            medialist.add(medium);
        }

        return orglist.size();
    }

    /**
     * 数値かどうかをチェックする.
     *
     * @param value チェックしたいID
     * @return 数値の場合はtrue、そうでない場合はfalse
     */
    private boolean checkInteger(final String value) {
        try {
            Integer.parseInt(value);
            return true;
        } catch (NumberFormatException e) {
            return false;
        }
    }

    /**
     * ファイルパスからメディアIDを取得する.
     *
     * @param context コンテキスト
     * @param path パス
     * @return MediaID
     */
    private static long mediaIdFromPath(final Context context, final String path) {
        long id = 0;
        String[] mParam = { BaseColumns._ID };
        String[] mArgs = new String[] { path };
        Cursor mAudioCursor = null;

        // Audio
        Uri mAudioUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
        String mFilter = MediaStore.Audio.AudioColumns.DATA + " LIKE ?";

        // Search Contents Provider
        ContentResolver mAudioContentsProvider = context.getContentResolver();
        try {
            mAudioCursor = mAudioContentsProvider.query(mAudioUri, mParam, mFilter, mArgs, null);
            if (mAudioCursor.moveToFirst()) {
                int mIdField = mAudioCursor.getColumnIndex(mParam[0]);
                id = mAudioCursor.getLong(mIdField);
            }
            mAudioCursor.close();

        } catch (NullPointerException e) {
            if (BuildConfig.DEBUG) {
                e.printStackTrace();
            }
            if (mAudioCursor != null) {
                mAudioCursor.close();
            }
        } catch (Exception e) {
            if (BuildConfig.DEBUG) {
                e.printStackTrace();
            }
            if (mAudioCursor != null) {
                mAudioCursor.close();
            }
            return -1;
        }

        // Search video
        if (id == 0) {
            Cursor mVideoCursor = null;

            Uri mViodeUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
            mFilter = MediaStore.Video.VideoColumns.DATA + " LIKE ?";

            // Search Contents Provider
            ContentResolver mVideoContentsProvider = context.getContentResolver();
            try {
                mVideoCursor = mVideoContentsProvider.query(mViodeUri, mParam, mFilter, mArgs, null);

                if (mVideoCursor.moveToFirst()) {
                    int mIdField = mVideoCursor.getColumnIndex(mParam[0]);
                    id = mVideoCursor.getLong(mIdField);
                } else {
                    id = -1;
                }
                mVideoCursor.close();

            } catch (NullPointerException e) {
                if (BuildConfig.DEBUG) {
                    e.printStackTrace();
                }
                if (mVideoCursor != null) {
                    mVideoCursor.close();
                }
            } catch (Exception e) {
                if (BuildConfig.DEBUG) {
                    e.printStackTrace();
                }
                if (mVideoCursor != null) {
                    mVideoCursor.close();
                }
                return -1;
            }

        }

        return id;
    }

    /**
     * Media list class.
     */
    private class MediaList {
        /** ID. */
        private String mId;
        /** Mime Type. */
        private String mType;
        /** Title. */
        private String mTitle;
        /** Artist. */
        private String mArtist;
        /** Duration. */
        private int mDuration;
        /** Composer (Audio only). */
        private String mComposer;
        /** Language (Video only). */
        private String mLanguage;
        /** Thumbnail URI. */
        private String mThumbnailUri;
        /** Video flag. */
        private boolean mIsVideo;

        /**
         * Constructor.
         *
         * @param id Id.
         * @param type Mime type.
         * @param title Title.
         * @param artist Artist.
         * @param duration Duration.
         * @param composer Composer(Audio only).
         * @param language Language(Video only).
         * @param thumbnailUri Thumbnail URI.
         * @param isVideo Video flag.
         */
        public MediaList(final String id, final String type, final String title, final String artist,
                         final int duration, final String composer, final String language,
                         final String thumbnailUri, final boolean isVideo) {
            this.setId(id);
            this.setType(type);
            this.setTitle(title);
            this.setArtist(artist);
            this.setDuration(duration);
            this.setComposer(composer);
            this.setLanguage(language);
            this.setThumbnailUri(thumbnailUri);
            this.setVideo(isVideo);
        }

        /**
         * Get Id.
         *
         * @return Id.
         */
        public String getId() {
            return mId;
        }

        /**
         * Set Id.
         *
         * @param id Id.
         */
        public void setId(final String id) {
            this.mId = id;
        }

        /**
         * Get mime type.
         *
         * @return Mime type.
         */
        public String getType() {
            return mType;
        }

        /**
         * Set mime type.
         *
         * @param type mime type.
         */
        public void setType(final String type) {
            this.mType = type;
        }

        /**
         * Get title.
         *
         * @return Title.
         */
        public String getTitle() {
            return mTitle;
        }

        /**
         * Set title.
         *
         * @param title Title.
         */
        public void setTitle(final String title) {
            this.mTitle = title;
        }

        /**
         * Get artist.
         *
         * @return Artist.
         */
        public String getArtist() {
            return mArtist;
        }

        /**
         * Set artist.
         *
         * @param artist Artist.
         */
        public void setArtist(final String artist) {
            this.mArtist = artist;
        }

        /**
         * Get duration.
         *
         * @return Duration.
         */
        public int getDuration() {
            return mDuration;
        }

        /**
         * Set duration.
         *
         * @param duration Duration.
         */
        public void setDuration(final int duration) {
            this.mDuration = duration;
        }

        /**
         * Get composer.
         *
         * @return Composer.
         */
        public String getComposer() {
            return mComposer;
        }

        /**
         * Set composer.
         *
         * @param composer Composer.
         */
        public void setComposer(final String composer) {
            this.mComposer = composer;
        }

        /**
         * Get language.
         *
         * @return Language.
         */
        public String getLanguage() {
            return mLanguage;
        }

        /**
         * Set language.
         *
         * @param language Language.
         */
        public void setLanguage(final String language) {
            this.mLanguage = language;
        }

        /**
         * Get Thumbnail URI.
         * @return Thumbnail URI
         */
        public String getThumbnailUri() {
            return mThumbnailUri;
        }

        /**
         * Set Thumbnail URI.
         * @param thumbnailUri Thumbnail URI
         */
        public void setThumbnailUri(String thumbnailUri) {
            mThumbnailUri = thumbnailUri;
        }

        /**
         * Get Video flag.
         *
         * @return the mIsVideo.
         */
        public boolean isVideo() {
            return mIsVideo;
        }

        /**
         * Set video flag.
         *
         * @param isvideo the isVideo to set.
         */
        public void setVideo(final boolean isvideo) {
            this.mIsVideo = isvideo;
        }
    }

    /**
     * Duration sorting comparator.
     */
    private class MediaListDurationComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            int mData1 = lhs.getDuration();
            int mData2 = rhs.getDuration();

            if (mData1 > mData2) {
                return 1;
            } else if (mData1 == mData2) {
                return 0;
            } else {
                return -1;
            }
        }
    }

    /**
     * Title sorting comparator.
     */
    private class MediaListTitleComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            return compareData(lhs.getTitle(), rhs.getTitle());
        }
    }

    /**
     * Artist sorting comparator.
     */
    private class MediaListArtistComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            return compareData(lhs.getArtist(), rhs.getArtist());
        }
    }

    /**
     * Composer sorting comparator.
     */
    private class MediaListComposerComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            return compareData(lhs.getComposer(), rhs.getComposer());
        }
    }

    /**
     * Language sorting comparator.
     */
    private class MediaListLanguageComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            return compareData(lhs.getLanguage(), rhs.getLanguage());
        }
    }

    /**
     * ID sorting comparator.
     */
    private class MediaListIdComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            return compareData(lhs.getId(), rhs.getId());
        }
    }

    /**
     * Type sorting comparator.
     */
    private class MediaListTypeComparator implements Comparator<MediaList> {

        @Override
        public int compare(final MediaList lhs, final MediaList rhs) {
            return compareData(lhs.getType(), rhs.getType());
        }
    }

    /**
     * Data compare.
     *
     * @param data1 Data1.
     * @param data2 Data2.
     * @return result.
     */
    private int compareData(final String data1, final String data2) {
        if (data1 == null && data2 == null) {
            return 0;
        } else if (data1 != null && data2 == null) {
            return 1;
        } else if (data1 == null && data2 != null) {
            return -1;
        }

        if (data1.compareTo(data2) > 0) {
            return 1;
        } else if (data1.compareTo(data2) == 0) {
            return 0;
        } else {
            return -1;
        }
    }

    /**
     * Get sort order.
     *
     * @param order1 sort column.
     * @param order2 asc / desc.
     * @return SortOrder flag.
     */
    private SortOrder getSortOrder(final String order1, final String order2) {
        if (order1.compareToIgnoreCase("id") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.ID_DESC;
        } else if (order1.compareToIgnoreCase("id") == 0 && order2.compareToIgnoreCase("asc") == 0) {
            return SortOrder.ID_ASC;
        } else if (order1.compareToIgnoreCase("duration") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.DURATION_DESC;
        } else if (order1.compareToIgnoreCase("duration") == 0 && order2.compareToIgnoreCase("asc") == 0) {
            return SortOrder.DURATION_ASC;
        } else if (order1.compareToIgnoreCase("artist") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.ARTIST_DESC;
        } else if (order1.compareToIgnoreCase("artist") == 0 && order2.compareToIgnoreCase("asc") == 0) {
            return SortOrder.ARTIST_ASC;
        } else if (order1.compareToIgnoreCase("composer") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.COMPOSER_DESC;
        } else if (order1.compareToIgnoreCase("composer") == 0 && order2.compareToIgnoreCase("asc") == 0) {
            return SortOrder.COMPOSER_ASC;
        } else if (order1.compareToIgnoreCase("language") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.LANGUAGE_DESC;
        } else if (order1.compareToIgnoreCase("language") == 0 && order2.compareToIgnoreCase("asc") == 0) {
            return SortOrder.LANGUAGE_ASC;
        } else if (order1.compareToIgnoreCase("mime") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.MIME_DESC;
        } else if (order1.compareToIgnoreCase("mime") == 0 && order2.compareToIgnoreCase("asc") == 0) {
            return SortOrder.MIME_ASC;
        } else if (order1.compareToIgnoreCase("title") == 0 && order2.compareToIgnoreCase("desc") == 0) {
            return SortOrder.TITLE_DESC;
        } else {
            return SortOrder.TITLE_ASC;
        }
    }

    /**
     * Check mediaId exchange Long value.
     * @param mediaId media ID
     * @return true:OK, false:NG
     */
    private boolean isMediaId(final String mediaId) {
        try {
            Long.valueOf(mediaId);
            return true;
        } catch (NumberFormatException e) {
            return false;
        }
    }

    /**
     * サムネイル情報.
     */
    private static class ThumbnailInfo {

        private long mId;
        private long mVideoId;
        private String mUri;
        private int mWidth;
        private int mHeight;

        /**
         * 解像度の種類.
         * @see MediaStore.Images.Thumbnails#MINI_KIND
         * @see MediaStore.Images.Thumbnails#MICRO_KIND
         * @see MediaStore.Images.Thumbnails#FULL_SCREEN_KIND
         */
        private int mKind;

        public long getId() {
            return mId;
        }

        public void setId(final long id) {
            mId = id;
        }

        public long getVideoId() {
            return mVideoId;
        }

        public void setVideoId(long videoId) {
            mVideoId = videoId;
        }

        public String getUri() {
            return mUri;
        }

        public void setUri(final String uri) {
            mUri = uri;
        }

        public int getWidth() {
            return mWidth;
        }

        public void setWidth(final int width) {
            mWidth = width;
        }

        public int getHeight() {
            return mHeight;
        }

        public void setHeight(final int height) {
            mHeight = height;
        }

        public int getKind() {
            return mKind;
        }

        public void setKind(final int kind) {
            mKind = kind;
        }
    }
}

redpajama_set_name: RedPajamaGithub