Home | History | Annotate | Download | only in testingcamera2
      1 /*
      2  * Copyright (C) 2014 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.testingcamera2;
     18 
     19 import android.util.AttributeSet;
     20 
     21 import org.xmlpull.v1.XmlPullParser;
     22 import org.xmlpull.v1.XmlPullParserException;
     23 
     24 import java.io.IOException;
     25 
     26 public class BurstControlPane extends ControlPane {
     27 
     28     // XML attributes
     29 
     30     /** Name of pane tag */
     31     private static final String PANE_NAME = "burst_pane";
     32 
     33     // End XML attributes
     34 
     35     public BurstControlPane(TestingCamera21 tc, AttributeSet attrs, StatusListener listener) {
     36         super(tc, attrs, listener, tc.getPaneTracker());
     37 
     38         this.setName(tc.getResources().getString(R.string.burst_pane_title));
     39     }
     40 
     41     public BurstControlPane(TestingCamera21 tc, XmlPullParser configParser, StatusListener listener)
     42             throws XmlPullParserException, IOException {
     43         super(tc, null, listener, tc.getPaneTracker());
     44 
     45         this.setName(tc.getResources().getString(R.string.request_pane_title));
     46 
     47         configParser.require(XmlPullParser.START_TAG,
     48                 XmlPullParser.NO_NAMESPACE, PANE_NAME);
     49         // Parse attributes here
     50         configParser.next();
     51         configParser.require(XmlPullParser.END_TAG,
     52                 XmlPullParser.NO_NAMESPACE, PANE_NAME);
     53 
     54     }
     55 
     56 }
     57