ignalxy 4 лет назад
Сommit
ad75431488
90 измененных файлов с 7958 добавлено и 0 удалено
  1. 3 0
      .idea/.gitignore
  2. 7 0
      .idea/codeStyles/Project.xml
  3. 5 0
      .idea/codeStyles/codeStyleConfig.xml
  4. 10 0
      .idea/libraries/lib.xml
  5. 22 0
      .idea/misc.xml
  6. 8 0
      .idea/modules.xml
  7. 124 0
      .idea/uiDesigner.xml
  8. 6 0
      .idea/vcs.xml
  9. 1 0
      Aidl.cmd
  10. 126 0
      Aidl.g4
  11. 48 0
      AidlToJson.java
  12. 12 0
      aidl.iml
  13. 19 0
      aidl/AudioPolicyConfig.aidl
  14. 58 0
      aidl/IAccessibilityInteractionConnection.aidl
  15. 97 0
      aidl/IAccessibilityServiceConnection.aidl
  16. 118 0
      aidl/IBluetoothGatt.aidl
  17. 64 0
      aidl/IBluetoothHeadsetClient.aidl
  18. 124 0
      aidl/IConnectionServiceAdapter.aidl
  19. 9 0
      aidl/IFingerprintDaemonCallback.aidl
  20. 453 0
      aidl/INetworkManagementService.aidl
  21. 36 0
      aidl/IOnAppsChangedListener.aidl
  22. 105 0
      aidl/IUserManager.aidl
  23. 118 0
      antlr/aidl/Aidl.interp
  24. 80 0
      antlr/aidl/Aidl.tokens
  25. 279 0
      antlr/aidl/AidlBaseListener.java
  26. 154 0
      antlr/aidl/AidlBaseVisitor.java
  27. 150 0
      antlr/aidl/AidlLexer.interp
  28. 256 0
      antlr/aidl/AidlLexer.java
  29. 80 0
      antlr/aidl/AidlLexer.tokens
  30. 210 0
      antlr/aidl/AidlListener.java
  31. 1683 0
      antlr/aidl/AidlParser.java
  32. 133 0
      antlr/aidl/AidlVisitor.java
  33. 79 0
      antlr/aidl/tools/AidlLoader.java
  34. 4 0
      foreach.cmd
  35. 1327 0
      json/IBluetoothGatt.json
  36. 3 0
      out/production/aidl/.idea/.gitignore
  37. 7 0
      out/production/aidl/.idea/codeStyles/Project.xml
  38. 5 0
      out/production/aidl/.idea/codeStyles/codeStyleConfig.xml
  39. 10 0
      out/production/aidl/.idea/libraries/lib.xml
  40. 22 0
      out/production/aidl/.idea/misc.xml
  41. 8 0
      out/production/aidl/.idea/modules.xml
  42. 124 0
      out/production/aidl/.idea/uiDesigner.xml
  43. 1 0
      out/production/aidl/Aidl.cmd
  44. 126 0
      out/production/aidl/Aidl.g4
  45. BIN
      out/production/aidl/AidlToJson.class
  46. 12 0
      out/production/aidl/aidl.iml
  47. 19 0
      out/production/aidl/aidl/AudioPolicyConfig.aidl
  48. 58 0
      out/production/aidl/aidl/IAccessibilityInteractionConnection.aidl
  49. 97 0
      out/production/aidl/aidl/IAccessibilityServiceConnection.aidl
  50. 118 0
      out/production/aidl/aidl/IBluetoothGatt.aidl
  51. 64 0
      out/production/aidl/aidl/IBluetoothHeadsetClient.aidl
  52. 124 0
      out/production/aidl/aidl/IConnectionServiceAdapter.aidl
  53. 9 0
      out/production/aidl/aidl/IFingerprintDaemonCallback.aidl
  54. 453 0
      out/production/aidl/aidl/INetworkManagementService.aidl
  55. 36 0
      out/production/aidl/aidl/IOnAppsChangedListener.aidl
  56. 105 0
      out/production/aidl/aidl/IUserManager.aidl
  57. 118 0
      out/production/aidl/antlr/aidl/Aidl.interp
  58. 80 0
      out/production/aidl/antlr/aidl/Aidl.tokens
  59. BIN
      out/production/aidl/antlr/aidl/AidlBaseListener.class
  60. BIN
      out/production/aidl/antlr/aidl/AidlBaseVisitor.class
  61. BIN
      out/production/aidl/antlr/aidl/AidlLexer.class
  62. 150 0
      out/production/aidl/antlr/aidl/AidlLexer.interp
  63. 80 0
      out/production/aidl/antlr/aidl/AidlLexer.tokens
  64. BIN
      out/production/aidl/antlr/aidl/AidlListener.class
  65. BIN
      out/production/aidl/antlr/aidl/AidlParser$AidlContext.class
  66. BIN
      out/production/aidl/antlr/aidl/AidlParser$ClassNameContext.class
  67. BIN
      out/production/aidl/antlr/aidl/AidlParser$ConstStatementContext.class
  68. BIN
      out/production/aidl/antlr/aidl/AidlParser$IdContext.class
  69. BIN
      out/production/aidl/antlr/aidl/AidlParser$ImportStatementContext.class
  70. BIN
      out/production/aidl/antlr/aidl/AidlParser$InterfaceNameContext.class
  71. BIN
      out/production/aidl/antlr/aidl/AidlParser$InterfaceStatementContext.class
  72. BIN
      out/production/aidl/antlr/aidl/AidlParser$InterfaceSubStatementContext.class
  73. BIN
      out/production/aidl/antlr/aidl/AidlParser$ListContext.class
  74. BIN
      out/production/aidl/antlr/aidl/AidlParser$MethodReturnTypeContext.class
  75. BIN
      out/production/aidl/antlr/aidl/AidlParser$MethodStatementContext.class
  76. BIN
      out/production/aidl/antlr/aidl/AidlParser$NameContext.class
  77. BIN
      out/production/aidl/antlr/aidl/AidlParser$PackageStatementContext.class
  78. BIN
      out/production/aidl/antlr/aidl/AidlParser$ParamContext.class
  79. BIN
      out/production/aidl/antlr/aidl/AidlParser$ParamListContext.class
  80. BIN
      out/production/aidl/antlr/aidl/AidlParser$ParamTagContext.class
  81. BIN
      out/production/aidl/antlr/aidl/AidlParser$ParamTypeContext.class
  82. BIN
      out/production/aidl/antlr/aidl/AidlParser$ParcelableStatementContext.class
  83. BIN
      out/production/aidl/antlr/aidl/AidlParser$PathContext.class
  84. BIN
      out/production/aidl/antlr/aidl/AidlParser$TypeContext.class
  85. BIN
      out/production/aidl/antlr/aidl/AidlParser.class
  86. BIN
      out/production/aidl/antlr/aidl/AidlVisitor.class
  87. BIN
      out/production/aidl/antlr/aidl/tools/AidlLoader.class
  88. 4 0
      out/production/aidl/foreach.cmd
  89. BIN
      out/production/aidl/tools/MapToJson.class
  90. 117 0
      tools/MapToJson.java

+ 3 - 0
.idea/.gitignore

@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml

+ 7 - 0
.idea/codeStyles/Project.xml

@@ -0,0 +1,7 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <ScalaCodeStyleSettings>
+      <option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
+    </ScalaCodeStyleSettings>
+  </code_scheme>
+</component>

+ 5 - 0
.idea/codeStyles/codeStyleConfig.xml

@@ -0,0 +1,5 @@
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
+  </state>
+</component>

+ 10 - 0
.idea/libraries/lib.xml

@@ -0,0 +1,10 @@
+<component name="libraryTable">
+  <library name="lib">
+    <CLASSES>
+      <root url="file://C:/lib" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+    <jarDirectory url="file://C:/lib" recursive="false" />
+  </library>
+</component>

+ 22 - 0
.idea/misc.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ANTLRGenerationPreferences">
+    <option name="perGrammarGenerationSettings">
+      <list>
+        <PerGrammarGenerationSettings>
+          <option name="fileName" value="$PROJECT_DIR$/Aidl.g4" />
+          <option name="autoGen" value="true" />
+          <option name="outputDir" value="E:\subjects\Compilers Principle\exp\2\antlr" />
+          <option name="libDir" value="" />
+          <option name="encoding" value="" />
+          <option name="pkg" value="antlr" />
+          <option name="language" value="Java" />
+          <option name="generateVisitor" value="true" />
+        </PerGrammarGenerationSettings>
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/aidl.iml" filepath="$PROJECT_DIR$/aidl.iml" />
+    </modules>
+  </component>
+</project>

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 1 - 0
Aidl.cmd

@@ -0,0 +1 @@
+grun antlr.aidl.Aidl aidl -gui %*

+ 126 - 0
Aidl.g4

@@ -0,0 +1,126 @@
+grammar Aidl;
+
+@members {
+    int oneway = 0;
+}
+
+aidl: 
+    packageStatement ( 
+        parcelableStatement | 
+        importStatement* interfaceStatement
+    );
+
+packageStatement: 
+    PACKAGE name SE;
+
+parcelableStatement: 
+    PARCELABLE id SE;
+
+importStatement: 
+    IMPORT path SE;
+
+interfaceStatement:
+    {oneway = 0;}
+    (ONEWAY {oneway = 1;})? 
+    INTERFACE id LC interfaceSubStatement* RC;
+
+interfaceSubStatement: 
+    methodStatement | constStatement;
+
+methodStatement:
+    {oneway &= 1;}
+    (ONEWAY {oneway |= 2;})? 
+    methodReturnType id LP paramList? RP (EQ INT)? SE;
+
+constStatement: 
+    CONST INT id EQ INTEGER SE |
+    CONST STRING id EQ LITERALSTRING SE;
+
+methodReturnType:
+    {oneway==0}? (NULLABLE? type) | VOID;
+
+paramList:
+    param (CO param)*;
+
+param:
+	NULLABLE? paramTag? paramType[$paramTag.text] id;
+
+paramTag:
+    IN | 
+    {oneway==0}? (OUT | INOUT);
+
+paramType[String tag]
+locals [int tid = 0]:
+    {$tag==null}? (
+        (PRIMITIVE | STRING | interfaceName {$tid = 1;})
+    ) | {$tag!=null}? (
+        MAP 
+        | CHARSEQUENCE
+        | list 
+        | (
+            name {$tid = -1;}
+            | type {$tid = $type.tid;}
+        ) {$tag.equals("in")}?
+        | className {$tid = 2;}
+        | type LB RB
+    );
+
+type
+returns [int tid = 0]: 
+    (PRIMITIVE | STRING | CHARSEQUENCE | MAP | list | className {$tid = 2;}) (LB RB)*;
+list: LIST (LA type RA)?;
+interfaceName: IBINDER | name;
+className: name;
+name: ID | PATH;
+path: PATH;
+id: ID;
+
+PRIMITIVE: BYTE | SHORT | INT | LONG | FLOAT | DOUBLE | BOOLEAN | CHAR;
+BYTE: 'byte';
+SHORT: 'short';
+INT: 'int';
+LONG: 'long';
+FLOAT: 'float';
+DOUBLE: 'double';
+BOOLEAN: 'boolean';
+CHAR: 'char';
+PACKAGE: 'package';
+PARCELABLE: 'parcelable';
+IMPORT: 'import';
+INTERFACE: 'interface';
+ONEWAY: 'oneway';
+VOID: 'void';
+CONST: 'const';
+NULLABLE: '@nullable';
+INOUT: 'inout';
+IN: 'in';
+OUT: 'out';
+STRING: 'String';
+CHARSEQUENCE: 'CharSequence';
+MAP: 'Map';
+LIST: 'List';
+IBINDER: 'IBinder';
+
+LP: '(';
+RP: ')';
+LC: '{';
+RC: '}';
+LB: '[';
+RB: ']';
+LA: '<';
+RA: '>';
+DOT: '.';
+CO: ',';
+SE: ';';
+EQ: '=';
+
+PATH: ID (DOT ID)+;
+ID: [_a-zA-Z][_a-zA-Z0-9]*;
+INTEGER: [0-9]+;
+LITERALSTRING: '"' (ESC | .)*? '"';
+fragment ESC: '\\"' | '\\\\';
+
+WS: [ \t\r\n]+ -> channel(1);
+COMMENT_BLOCK: '/*' .*? '*/' -> channel(2);
+COMMENT_LINE: '//' .*? EL -> channel(2);
+fragment EL: '\r\n' | '\n' | '\n\r' | EOF;

+ 48 - 0
AidlToJson.java

@@ -0,0 +1,48 @@
+import java.io.*;
+
+import antlr.aidl.tools.AidlLoader;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.tree.*;
+
+import antlr.aidl.*;
+
+public class AidlToJson
+{
+    public static void main(String[] args)
+    {
+        if (args.length < 2) {
+            System.out.println("AidlToJson input_filename output_directory");
+            return;
+        }
+        CharStream input = null;
+        try {
+            input = CharStreams.fromFileName(args[0]);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        AidlLexer lexer = new AidlLexer(input);
+        CommonTokenStream tokens = new CommonTokenStream(lexer);
+        AidlParser parser = new AidlParser(tokens);
+        ParseTree tree = parser.aidl();
+        ParseTreeWalker walker = new ParseTreeWalker();
+        AidlLoader loader = new AidlLoader();
+        walker.walk(loader, tree);
+        OutputStream os = null;
+        try {
+            os = new FileOutputStream(new File(args[1] + '\\' + loader.getName() + ".json"), false);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        try {
+            os.write(loader.toJson().getBytes());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        try {
+            os.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 12 - 0
aidl.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="lib" level="project" />
+  </component>
+</module>

+ 19 - 0
aidl/AudioPolicyConfig.aidl

@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audiopolicy;
+
+parcelable AudioPolicyConfig;

+ 58 - 0
aidl/IAccessibilityInteractionConnection.aidl

@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.accessibility;
+
+import android.graphics.Region;
+import android.graphics.Point;
+import android.os.Bundle;
+import android.view.MagnificationSpec;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
+
+/**
+ * Interface for interaction between the AccessibilityManagerService
+ * and the ViewRoot in a given window.
+ *
+ * @hide
+ */
+oneway interface IAccessibilityInteractionConnection {
+
+    void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId, in Region bounds,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec,
+        in Bundle arguments);
+
+    void findAccessibilityNodeInfosByViewId(long accessibilityNodeId, String viewId,
+        in Region bounds, int interactionId, IAccessibilityInteractionConnectionCallback callback,
+        int flags, int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+
+    void findAccessibilityNodeInfosByText(long accessibilityNodeId, String text, in Region bounds,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+
+    void findFocus(long accessibilityNodeId, int focusType, in Region bounds, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
+        long interrogatingTid, in MagnificationSpec spec);
+
+    void focusSearch(long accessibilityNodeId, int direction, in Region bounds, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
+        long interrogatingTid, in MagnificationSpec spec);
+
+    void performAccessibilityAction(long accessibilityNodeId, int action, in Bundle arguments,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid);
+}

+ 97 - 0
aidl/IAccessibilityServiceConnection.aidl

@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.accessibilityservice;
+
+import android.accessibilityservice.AccessibilityServiceInfo;
+import android.content.pm.ParceledListSlice;
+import android.graphics.Region;
+import android.os.Bundle;
+import android.view.MagnificationSpec;
+import android.view.MotionEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
+import android.view.accessibility.AccessibilityWindowInfo;
+
+/**
+ * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService.
+ *
+ * @hide
+ */
+interface IAccessibilityServiceConnection {
+
+    void setServiceInfo(in AccessibilityServiceInfo info);
+
+    String[] findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
+        long accessibilityNodeId, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int flags, long threadId,
+        in Bundle arguments);
+
+    String[] findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
+        String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
+        long threadId);
+
+    String[] findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
+        long accessibilityNodeId, String viewId, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    String[] findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    String[] focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
+        int action, in Bundle arguments, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    AccessibilityWindowInfo getWindow(int windowId);
+
+    List<AccessibilityWindowInfo> getWindows();
+
+    AccessibilityServiceInfo getServiceInfo();
+
+    boolean performGlobalAction(int action);
+
+    void disableSelf();
+
+    oneway void setOnKeyEventResult(boolean handled, int sequence);
+
+    float getMagnificationScale();
+
+    float getMagnificationCenterX();
+
+    float getMagnificationCenterY();
+
+    Region getMagnificationRegion();
+
+    boolean resetMagnification(boolean animate);
+
+    boolean setMagnificationScaleAndCenter(float scale, float centerX, float centerY,
+        boolean animate);
+
+    void setMagnificationCallbackEnabled(boolean enabled);
+
+    boolean setSoftKeyboardShowMode(int showMode);
+
+    void setSoftKeyboardCallbackEnabled(boolean enabled);
+
+    boolean isAccessibilityButtonAvailable();
+
+    void sendGesture(int sequence, in ParceledListSlice gestureSteps);
+
+    boolean isFingerprintGestureDetectionAvailable();
+}

+ 118 - 0
aidl/IBluetoothGatt.aidl

@@ -0,0 +1,118 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.bluetooth;
+
+import android.app.PendingIntent;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothGattService;
+import android.bluetooth.le.AdvertiseSettings;
+import android.bluetooth.le.AdvertiseData;
+import android.bluetooth.le.AdvertisingSetParameters;
+import android.bluetooth.le.PeriodicAdvertisingParameters;
+import android.bluetooth.le.ScanFilter;
+import android.bluetooth.le.ScanResult;
+import android.bluetooth.le.ScanSettings;
+import android.bluetooth.le.ResultStorageDescriptor;
+import android.os.ParcelUuid;
+import android.os.WorkSource;
+
+import android.bluetooth.IBluetoothGattCallback;
+import android.bluetooth.IBluetoothGattServerCallback;
+import android.bluetooth.le.IAdvertisingSetCallback;
+import android.bluetooth.le.IPeriodicAdvertisingCallback;
+import android.bluetooth.le.IScannerCallback;
+
+/**
+ * API for interacting with BLE / GATT
+ * @hide
+ */
+interface IBluetoothGatt {
+    List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
+
+    void registerScanner(in IScannerCallback callback, in WorkSource workSource);
+    void unregisterScanner(in int scannerId);
+    void startScan(in int scannerId, in ScanSettings settings, in List<ScanFilter> filters,
+                   in List scanStorages, in String callingPackage);
+    void startScanForIntent(in PendingIntent intent, in ScanSettings settings, in List<ScanFilter> filters,
+                            in String callingPackage);
+    void stopScanForIntent(in PendingIntent intent, in String callingPackage);
+    void stopScan(in int scannerId);
+    void flushPendingBatchResults(in int scannerId);
+
+    void startAdvertisingSet(in AdvertisingSetParameters parameters, in AdvertiseData advertiseData,
+                                in AdvertiseData scanResponse, in PeriodicAdvertisingParameters periodicParameters,
+                                in AdvertiseData periodicData, in int duration, in int maxExtAdvEvents,
+                                in IAdvertisingSetCallback callback);
+    void stopAdvertisingSet(in IAdvertisingSetCallback callback);
+
+    void getOwnAddress(in int advertiserId);
+    void enableAdvertisingSet(in int advertiserId, in boolean enable, in int duration, in int maxExtAdvEvents);
+    void setAdvertisingData(in int advertiserId, in AdvertiseData data);
+    void setScanResponseData(in int advertiserId, in AdvertiseData data);
+    void setAdvertisingParameters(in int advertiserId, in AdvertisingSetParameters parameters);
+    void setPeriodicAdvertisingParameters(in int advertiserId, in PeriodicAdvertisingParameters parameters);
+    void setPeriodicAdvertisingData(in int advertiserId, in AdvertiseData data);
+    void setPeriodicAdvertisingEnable(in int advertiserId, in boolean enable);
+
+    void registerSync(in ScanResult scanResult, in int skip, in int timeout, in IPeriodicAdvertisingCallback callback);
+    void unregisterSync(in IPeriodicAdvertisingCallback callback);
+
+    void registerClient(in ParcelUuid appId, in IBluetoothGattCallback callback);
+
+    void unregisterClient(in int clientIf);
+    void clientConnect(in int clientIf, in String address, in boolean isDirect, in int transport, in boolean opportunistic, in int phy);
+    void clientDisconnect(in int clientIf, in String address);
+    void clientSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int phyOptions);
+    void clientReadPhy(in int clientIf, in String address);
+    void refreshDevice(in int clientIf, in String address);
+    void discoverServices(in int clientIf, in String address);
+    void discoverServiceByUuid(in int clientIf, in String address, in ParcelUuid uuid);
+    void readCharacteristic(in int clientIf, in String address, in int handle, in int authReq);
+    void readUsingCharacteristicUuid(in int clientIf, in String address, in ParcelUuid uuid,
+                           in int startHandle, in int endHandle, in int authReq);
+    void writeCharacteristic(in int clientIf, in String address, in int handle,
+                            in int writeType, in int authReq, in byte[] value);
+    void readDescriptor(in int clientIf, in String address, in int handle, in int authReq);
+    void writeDescriptor(in int clientIf, in String address, in int handle,
+                            in int authReq, in byte[] value);
+    void registerForNotification(in int clientIf, in String address, in int handle, in boolean enable);
+    void beginReliableWrite(in int clientIf, in String address);
+    void endReliableWrite(in int clientIf, in String address, in boolean execute);
+    void readRemoteRssi(in int clientIf, in String address);
+    void configureMTU(in int clientIf, in String address, in int mtu);
+    void connectionParameterUpdate(in int clientIf, in String address, in int connectionPriority);
+    void leConnectionUpdate(int clientIf, String address, int minInterval,
+                            int maxInterval, int slaveLatency, int supervisionTimeout,
+                            int minConnectionEventLen, int maxConnectionEventLen);
+
+    void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback);
+    void unregisterServer(in int serverIf);
+    void serverConnect(in int serverIf, in String address, in boolean isDirect, in int transport);
+    void serverDisconnect(in int serverIf, in String address);
+    void serverSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int phyOptions);
+    void serverReadPhy(in int clientIf, in String address);
+    void addService(in int serverIf, in BluetoothGattService service);
+    void removeService(in int serverIf, in int handle);
+    void clearServices(in int serverIf);
+    void sendResponse(in int serverIf, in String address, in int requestId,
+                            in int status, in int offset, in byte[] value);
+    void sendNotification(in int serverIf, in String address, in int handle,
+                            in boolean confirm, in byte[] value);
+    void disconnectAll();
+    void unregAll();
+    int numHwTrackFiltersAvailable();
+}

+ 64 - 0
aidl/IBluetoothHeadsetClient.aidl

@@ -0,0 +1,64 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.bluetooth;
+
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothHeadsetClientCall;
+import android.os.Bundle;
+
+/**
+ * API for Bluetooth Headset Client service (HFP HF Role)
+ *
+ * {@hide}
+ */
+interface IBluetoothHeadsetClient {
+    boolean connect(in BluetoothDevice device);
+    boolean disconnect(in BluetoothDevice device);
+
+    List<BluetoothDevice> getConnectedDevices();
+    List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
+    int getConnectionState(in BluetoothDevice device);
+    boolean setPriority(in BluetoothDevice device, int priority);
+    int getPriority(in BluetoothDevice device);
+
+    boolean startVoiceRecognition(in BluetoothDevice device);
+    boolean stopVoiceRecognition(in BluetoothDevice device);
+
+    List<BluetoothHeadsetClientCall> getCurrentCalls(in BluetoothDevice device);
+    Bundle getCurrentAgEvents(in BluetoothDevice device);
+
+    boolean acceptCall(in BluetoothDevice device, int flag);
+    boolean holdCall(in BluetoothDevice device);
+    boolean rejectCall(in BluetoothDevice device);
+    boolean terminateCall(in BluetoothDevice device, in BluetoothHeadsetClientCall call);
+
+    boolean enterPrivateMode(in BluetoothDevice device, int index);
+    boolean explicitCallTransfer(in BluetoothDevice device);
+
+    BluetoothHeadsetClientCall dial(in BluetoothDevice device, String number);
+
+    boolean sendDTMF(in BluetoothDevice device, byte code);
+    boolean getLastVoiceTagNumber(in BluetoothDevice device);
+
+    int getAudioState(in BluetoothDevice device);
+    boolean connectAudio(in BluetoothDevice device);
+    boolean disconnectAudio(in BluetoothDevice device);
+    void setAudioRouteAllowed(in BluetoothDevice device, boolean allowed);
+    boolean getAudioRouteAllowed(in BluetoothDevice device);
+
+    Bundle getCurrentAgFeatures(in BluetoothDevice device);
+}

+ 124 - 0
aidl/IConnectionServiceAdapter.aidl

@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.telecom;
+
+import android.app.PendingIntent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.telecom.ConnectionRequest;
+import android.telecom.DisconnectCause;
+import android.telecom.Logging.Session;
+import android.telecom.ParcelableConnection;
+import android.telecom.ParcelableConference;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.StatusHints;
+
+import com.android.internal.telecom.IVideoProvider;
+import com.android.internal.telecom.RemoteServiceCallback;
+
+/**
+ * Internal remote callback interface for connection services.
+ *
+ * @see android.telecom.ConnectionServiceAdapter
+ *
+ * {@hide}
+ */
+oneway interface IConnectionServiceAdapter {
+    void handleCreateConnectionComplete(
+            String callId,
+            in ConnectionRequest request,
+            in ParcelableConnection connection,
+            in Session.Info sessionInfo);
+
+    void setActive(String callId, in Session.Info sessionInfo);
+
+    void setRinging(String callId, in Session.Info sessionInfo);
+
+    void setDialing(String callId, in Session.Info sessionInfo);
+
+    void setPulling(String callId, in Session.Info sessionInfo);
+
+    void setDisconnected(String callId, in DisconnectCause disconnectCause,
+    in Session.Info sessionInfo);
+
+    void setOnHold(String callId, in Session.Info sessionInfo);
+
+    void setRingbackRequested(String callId, boolean ringing, in Session.Info sessionInfo);
+
+    void setConnectionCapabilities(String callId, int connectionCapabilities,
+    in Session.Info sessionInfo);
+
+    void setConnectionProperties(String callId, int connectionProperties,
+    in Session.Info sessionInfo);
+
+    void setIsConferenced(String callId, String conferenceCallId, in Session.Info sessionInfo);
+
+    void setConferenceMergeFailed(String callId, in Session.Info sessionInfo);
+
+    void addConferenceCall(String callId, in ParcelableConference conference,
+    in Session.Info sessionInfo);
+
+    void removeCall(String callId, in Session.Info sessionInfo);
+
+    void onPostDialWait(String callId, String remaining, in Session.Info sessionInfo);
+
+    void onPostDialChar(String callId, char nextChar, in Session.Info sessionInfo);
+
+    void queryRemoteConnectionServices(RemoteServiceCallback callback, in Session.Info sessionInfo);
+
+    void setVideoProvider(String callId, IVideoProvider videoProvider, in Session.Info sessionInfo);
+
+    void setVideoState(String callId, int videoState, in Session.Info sessionInfo);
+
+    void setIsVoipAudioMode(String callId, boolean isVoip, in Session.Info sessionInfo);
+
+    void setStatusHints(String callId, in StatusHints statusHints, in Session.Info sessionInfo);
+
+    void setAddress(String callId, in Uri address, int presentation, in Session.Info sessionInfo);
+
+    void setCallerDisplayName(String callId, String callerDisplayName, int presentation,
+    in Session.Info sessionInfo);
+
+    void setConferenceableConnections(String callId, in List<String> conferenceableCallIds,
+    in Session.Info sessionInfo);
+
+    void addExistingConnection(String callId, in ParcelableConnection connection,
+    in Session.Info sessionInfo);
+
+    void putExtras(String callId, in Bundle extras, in Session.Info sessionInfo);
+
+    void removeExtras(String callId, in List<String> keys, in Session.Info sessionInfo);
+
+    void setAudioRoute(String callId, int audioRoute, String bluetoothAddress,
+            in Session.Info sessionInfo);
+
+    void onConnectionEvent(String callId, String event, in Bundle extras,
+    in Session.Info sessionInfo);
+
+    void onRttInitiationSuccess(String callId, in Session.Info sessionInfo);
+
+    void onRttInitiationFailure(String callId, int reason, in Session.Info sessionInfo);
+
+    void onRttSessionRemotelyTerminated(String callId, in Session.Info sessionInfo);
+
+    void onRemoteRttRequest(String callId, in Session.Info sessionInfo);
+
+    void onPhoneAccountChanged(String callId, in PhoneAccountHandle pHandle,
+    in Session.Info sessionInfo);
+
+    void onConnectionServiceFocusReleased(in Session.Info sessionInfo);
+}

+ 9 - 0
aidl/IFingerprintDaemonCallback.aidl

@@ -0,0 +1,9 @@
+package android.hardware.fingerprint;
+ interface IFingerprintDaemonCallback {
+    void onEnrollResult(long deviceId, int fingerId, int groupId, int remaining);
+    void onAcquired(long deviceId, int acquiredInfo);
+    void onAuthenticated(long deviceId, int fingerId, int groupId);
+    void onError(long deviceId, int error);
+    void onRemoved(long deviceId, int fingerId, int groupId);
+    void onEnumerate(long deviceId, in int [] fingerIds, in int [] groupIds);
+}

+ 453 - 0
aidl/INetworkManagementService.aidl

@@ -0,0 +1,453 @@
+/* //device/java/android/android/os/INetworkManagementService.antlr.aidl
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.os;
+
+import android.net.InterfaceConfiguration;
+import android.net.INetd;
+import android.net.INetworkManagementEventObserver;
+import android.net.ITetheringStatsProvider;
+import android.net.Network;
+import android.net.NetworkStats;
+import android.net.RouteInfo;
+import android.net.UidRange;
+import android.os.INetworkActivityListener;
+
+/**
+ * @hide
+ */
+interface INetworkManagementService
+{
+    /**
+     ** GENERAL
+     **/
+
+    /**
+     * Register an observer to receive events.
+     */
+    void registerObserver(INetworkManagementEventObserver obs);
+
+    /**
+     * Unregister an observer from receiving events.
+     */
+    void unregisterObserver(INetworkManagementEventObserver obs);
+
+    /**
+     * Retrieve an INetd to talk to netd.
+     */
+    INetd getNetdService();
+
+    /**
+     * Returns a list of currently known network interfaces
+     */
+    String[] listInterfaces();
+
+    /**
+     * Retrieves the specified interface config
+     *
+     */
+    InterfaceConfiguration getInterfaceConfig(String iface);
+
+    /**
+     * Sets the configuration of the specified interface
+     */
+    void setInterfaceConfig(String iface, in InterfaceConfiguration cfg);
+
+    /**
+     * Clear all IP addresses on the specified interface
+     */
+    void clearInterfaceAddresses(String iface);
+
+    /**
+     * Set interface down
+     */
+    void setInterfaceDown(String iface);
+
+    /**
+     * Set interface up
+     */
+    void setInterfaceUp(String iface);
+
+    /**
+     * Set interface IPv6 privacy extensions
+     */
+    void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable);
+
+    /**
+     * Disable IPv6 on an interface
+     */
+    void disableIpv6(String iface);
+
+    /**
+     * Enable IPv6 on an interface
+     */
+    void enableIpv6(String iface);
+
+    /**
+     * Set IPv6 autoconf address generation mode.
+     * This is a no-op if an unsupported mode is requested.
+     */
+    void setIPv6AddrGenMode(String iface, int mode);
+
+    /**
+     * Add the specified route to the interface.
+     */
+    void addRoute(int netId, in RouteInfo route);
+
+    /**
+     * Remove the specified route from the interface.
+     */
+    void removeRoute(int netId, in RouteInfo route);
+
+    /**
+     * Set the specified MTU size
+     */
+    void setMtu(String iface, int mtu);
+
+    /**
+     * Shuts down the service
+     */
+    void shutdown();
+
+    /**
+     ** TETHERING RELATED
+     **/
+
+    /**
+     * Returns true if IP forwarding is enabled
+     */
+    boolean getIpForwardingEnabled();
+
+    /**
+     * Enables/Disables IP Forwarding
+     */
+    void setIpForwardingEnabled(boolean enabled);
+
+    /**
+     * Start tethering services with the specified dhcp server range
+     * arg is a set of start end pairs defining the ranges.
+     */
+    void startTethering(in String[] dhcpRanges);
+
+    /**
+     * Stop currently running tethering services
+     */
+    void stopTethering();
+
+    /**
+     * Returns true if tethering services are started
+     */
+    boolean isTetheringStarted();
+
+    /**
+     * Tethers the specified interface
+     */
+    void tetherInterface(String iface);
+
+    /**
+     * Untethers the specified interface
+     */
+    void untetherInterface(String iface);
+
+    /**
+     * Returns a list of currently tethered interfaces
+     */
+    String[] listTetheredInterfaces();
+
+    /**
+     * Sets the list of DNS forwarders (in order of priority)
+     */
+    void setDnsForwarders(in Network network, in String[] dns);
+
+    /**
+     * Returns the list of DNS forwarders (in order of priority)
+     */
+    String[] getDnsForwarders();
+
+    /**
+     * Enables unidirectional packet forwarding from {@code fromIface} to
+     * {@code toIface}.
+     */
+    void startInterfaceForwarding(String fromIface, String toIface);
+
+    /**
+     * Disables unidirectional packet forwarding from {@code fromIface} to
+     * {@code toIface}.
+     */
+    void stopInterfaceForwarding(String fromIface, String toIface);
+
+    /**
+     *  Enables Network Address Translation between two interfaces.
+     *  The address and netmask of the external interface is used for
+     *  the NAT'ed network.
+     */
+    void enableNat(String internalInterface, String externalInterface);
+
+    /**
+     *  Disables Network Address Translation between two interfaces.
+     */
+    void disableNat(String internalInterface, String externalInterface);
+
+    /**
+     * Registers a {@code ITetheringStatsProvider} to provide tethering statistics.
+     * All registered providers will be called in order, and their results will be added together.
+     * Netd is always registered as a tethering stats provider.
+     */
+    void registerTetheringStatsProvider(ITetheringStatsProvider provider, String name);
+
+    /**
+     * Unregisters a previously-registered {@code ITetheringStatsProvider}.
+     */
+    void unregisterTetheringStatsProvider(ITetheringStatsProvider provider);
+
+    /**
+     * Reports that a tethering provider has reached a data limit.
+     *
+     * Currently triggers a global alert, which causes NetworkStatsService to poll counters and
+     * re-evaluate data usage.
+     *
+     * This does not take an interface name because:
+     * 1. The tethering offload stats provider cannot reliably determine the interface on which the
+     *    limit was reached, because the HAL does not provide it.
+     * 2. Firing an interface-specific alert instead of a global alert isn't really useful since in
+     *    all cases of interest, the system responds to both in the same way - it polls stats, and
+     *    then notifies NetworkPolicyManagerService of the fact.
+     */
+    void tetherLimitReached(ITetheringStatsProvider provider);
+
+    /**
+     ** PPPD
+     **/
+
+    /**
+     * Returns the list of currently known TTY devices on the system
+     */
+    String[] listTtys();
+
+    /**
+     * Attaches a PPP server daemon to the specified TTY with the specified
+     * local/remote addresses.
+     */
+    void attachPppd(String tty, String localAddr, String remoteAddr, String dns1Addr,
+            String dns2Addr);
+
+    /**
+     * Detaches a PPP server daemon from the specified TTY.
+     */
+    void detachPppd(String tty);
+
+    /**
+     ** DATA USAGE RELATED
+     **/
+
+    /**
+     * Return global network statistics summarized at an interface level,
+     * without any UID-level granularity.
+     */
+    NetworkStats getNetworkStatsSummaryDev();
+    NetworkStats getNetworkStatsSummaryXt();
+
+    /**
+     * Return detailed network statistics with UID-level granularity,
+     * including interface and tag details.
+     */
+    NetworkStats getNetworkStatsDetail();
+
+    /**
+     * Return detailed network statistics for the requested UID and interfaces,
+     * including interface and tag details.
+     * @param uid UID to obtain statistics for, or {@link NetworkStats#UID_ALL}.
+     * @param ifaces Interfaces to obtain statistics for, or {@link NetworkStats#INTERFACES_ALL}.
+     */
+    NetworkStats getNetworkStatsUidDetail(int uid, in String[] ifaces);
+
+    /**
+     * Return summary of network statistics all tethering interfaces.
+     */
+    NetworkStats getNetworkStatsTethering(int how);
+
+    /**
+     * Set quota for an interface.
+     */
+    void setInterfaceQuota(String iface, long quotaBytes);
+
+    /**
+     * Remove quota for an interface.
+     */
+    void removeInterfaceQuota(String iface);
+
+    /**
+     * Set alert for an interface; requires that iface already has quota.
+     */
+    void setInterfaceAlert(String iface, long alertBytes);
+
+    /**
+     * Remove alert for an interface.
+     */
+    void removeInterfaceAlert(String iface);
+
+    /**
+     * Set alert across all interfaces.
+     */
+    void setGlobalAlert(long alertBytes);
+
+    /**
+     * Control network activity of a UID over interfaces with a quota limit.
+     */
+    void setUidMeteredNetworkBlacklist(int uid, boolean enable);
+    void setUidMeteredNetworkWhitelist(int uid, boolean enable);
+    boolean setDataSaverModeEnabled(boolean enable);
+
+    void setUidCleartextNetworkPolicy(int uid, int policy);
+
+    /**
+     * Return status of bandwidth control module.
+     */
+    boolean isBandwidthControlEnabled();
+
+    /**
+     * Sets idletimer for an interface.
+     *
+     * This either initializes a new idletimer or increases its
+     * reference-counting if an idletimer already exists for given
+     * {@code iface}.
+     *
+     * {@code type} is the type of the interface, such as TYPE_MOBILE.
+     *
+     * Every {@code addIdleTimer} should be paired with a
+     * {@link removeIdleTimer} to cleanup when the network disconnects.
+     */
+    void addIdleTimer(String iface, int timeout, int type);
+
+    /**
+     * Removes idletimer for an interface.
+     */
+    void removeIdleTimer(String iface);
+
+    /**
+     * Configure name servers, search paths, and resolver parameters for the given network.
+     */
+    void setDnsConfigurationForNetwork(int netId, in String[] servers, in String[] domains,
+            in int[] params, String tlsHostname, in String[] tlsServers);
+
+    void setFirewallEnabled(boolean enabled);
+    boolean isFirewallEnabled();
+    void setFirewallInterfaceRule(String iface, boolean allow);
+    void setFirewallUidRule(int chain, int uid, int rule);
+    void setFirewallUidRules(int chain, in int[] uids, in int[] rules);
+    void setFirewallChainEnabled(int chain, boolean enable);
+
+    /**
+     * Set all packets from users in ranges to go through VPN specified by netId.
+     */
+    void addVpnUidRanges(int netId, in UidRange[] ranges);
+
+    /**
+     * Clears the special VPN rules for users in ranges and VPN specified by netId.
+     */
+    void removeVpnUidRanges(int netId, in UidRange[] ranges);
+
+    /**
+     * Start the clatd (464xlat) service on the given interface.
+     */
+    void startClatd(String interfaceName);
+
+    /**
+     * Stop the clatd (464xlat) service on the given interface.
+     */
+    void stopClatd(String interfaceName);
+
+    /**
+     * Determine whether the clatd (464xlat) service has been started on the given interface.
+     */
+    boolean isClatdStarted(String interfaceName);
+
+    /**
+     * Start listening for mobile activity state changes.
+     */
+    void registerNetworkActivityListener(INetworkActivityListener listener);
+
+    /**
+     * Stop listening for mobile activity state changes.
+     */
+    void unregisterNetworkActivityListener(INetworkActivityListener listener);
+
+    /**
+     * Check whether the mobile radio is currently active.
+     */
+    boolean isNetworkActive();
+
+    /**
+     * Setup a new physical network.
+     * @param permission null if no permissions required to access this network.  PERMISSION_NETWORK
+     *                   or PERMISSION_SYSTEM to set respective permission.
+     */
+    void createPhysicalNetwork(int netId, String permission);
+
+    /**
+     * Setup a new VPN.
+     */
+    void createVirtualNetwork(int netId, boolean hasDNS, boolean secure);
+
+    /**
+     * Remove a network.
+     */
+    void removeNetwork(int netId);
+
+    /**
+     * Add an interface to a network.
+     */
+    void addInterfaceToNetwork(String iface, int netId);
+
+    /**
+     * Remove an Interface from a network.
+     */
+    void removeInterfaceFromNetwork(String iface, int netId);
+
+    void addLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid);
+
+    void setDefaultNetId(int netId);
+    void clearDefaultNetId();
+
+    /**
+     * Set permission for a network.
+     * @param permission null to clear permissions. PERMISSION_NETWORK or PERMISSION_SYSTEM to set
+     *                   permission.
+     */
+    void setNetworkPermission(int netId, String permission);
+
+    void setPermission(String permission, in int[] uids);
+    void clearPermission(in int[] uids);
+
+    /**
+     * Allow UID to call protect().
+     */
+    void allowProtect(int uid);
+
+    /**
+     * Deny UID from calling protect().
+     */
+    void denyProtect(int uid);
+
+    void addInterfaceToLocalNetwork(String iface, in List<RouteInfo> routes);
+    void removeInterfaceFromLocalNetwork(String iface);
+    int removeRoutesFromLocalNetwork(in List<RouteInfo> routes);
+
+    void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges);
+
+    boolean isNetworkRestricted(int uid);
+}

+ 36 - 0
aidl/IOnAppsChangedListener.aidl

@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2014, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.content.pm;
+
+import android.content.pm.ParceledListSlice;
+import android.os.Bundle;
+import android.os.UserHandle;
+
+/**
+ * {@hide}
+ */
+oneway interface IOnAppsChangedListener {
+    void onPackageRemoved(in UserHandle user, String packageName);
+    void onPackageAdded(in UserHandle user, String packageName);
+    void onPackageChanged(in UserHandle user, String packageName);
+    void onPackagesAvailable(in UserHandle user, in String[] packageNames, boolean replacing);
+    void onPackagesUnavailable(in UserHandle user, in String[] packageNames, boolean replacing);
+    void onPackagesSuspended(in UserHandle user, in String[] packageNames,
+            in Bundle launcherExtras);
+    void onPackagesUnsuspended(in UserHandle user, in String[] packageNames);
+    void onShortcutChanged(in UserHandle user, String packageName, in ParceledListSlice shortcuts);
+}

+ 105 - 0
aidl/IUserManager.aidl

@@ -0,0 +1,105 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.os;
+
+import android.os.Bundle;
+import android.os.PersistableBundle;
+import android.os.UserManager;
+import android.content.pm.UserInfo;
+import android.content.IntentSender;
+import android.content.RestrictionEntry;
+import android.graphics.Bitmap;
+import android.os.ParcelFileDescriptor;
+
+/**
+ *  {@hide}
+ */
+interface IUserManager {
+
+    /*
+     * DO NOT MOVE - UserManager.h depends on the ordering of this function.
+     */
+    int getCredentialOwnerProfile(int userHandle);
+    int getProfileParentId(int userHandle);
+    /*
+     * END OF DO NOT MOVE
+     */
+
+    UserInfo createUser(in String name, int flags);
+    UserInfo createProfileForUser(in String name, int flags, int userHandle,
+            in String[] disallowedPackages);
+    UserInfo createRestrictedProfile(String name, int parentUserHandle);
+    void setUserEnabled(int userHandle);
+    void setUserAdmin(int userId);
+    void evictCredentialEncryptionKey(int userHandle);
+    boolean removeUser(int userHandle);
+    boolean removeUserEvenWhenDisallowed(int userHandle);
+    void setUserName(int userHandle, String name);
+    void setUserIcon(int userHandle, in Bitmap icon);
+    ParcelFileDescriptor getUserIcon(int userHandle);
+    UserInfo getPrimaryUser();
+    List<UserInfo> getUsers(boolean excludeDying);
+    List<UserInfo> getProfiles(int userHandle, boolean enabledOnly);
+    int[] getProfileIds(int userId, boolean enabledOnly);
+    boolean canAddMoreManagedProfiles(int userHandle, boolean allowedToRemoveOne);
+    UserInfo getProfileParent(int userHandle);
+    boolean isSameProfileGroup(int userHandle, int otherUserHandle);
+    UserInfo getUserInfo(int userHandle);
+    String getUserAccount(int userHandle);
+    void setUserAccount(int userHandle, String accountName);
+    long getUserCreationTime(int userHandle);
+    boolean isRestricted();
+    boolean canHaveRestrictedProfile(int userHandle);
+    int getUserSerialNumber(int userHandle);
+    int getUserHandle(int userSerialNumber);
+    int getUserRestrictionSource(String restrictionKey, int userHandle);
+    List<UserManager.EnforcingUser> getUserRestrictionSources(String restrictionKey, int userHandle);
+    Bundle getUserRestrictions(int userHandle);
+    boolean hasBaseUserRestriction(String restrictionKey, int userHandle);
+    boolean hasUserRestriction(in String restrictionKey, int userHandle);
+    boolean hasUserRestrictionOnAnyUser(in String restrictionKey);
+    void setUserRestriction(String key, boolean value, int userHandle);
+    void setApplicationRestrictions(in String packageName, in Bundle restrictions,
+            int userHandle);
+    Bundle getApplicationRestrictions(in String packageName);
+    Bundle getApplicationRestrictionsForUser(in String packageName, int userHandle);
+    void setDefaultGuestRestrictions(in Bundle restrictions);
+    Bundle getDefaultGuestRestrictions();
+    boolean markGuestForDeletion(int userHandle);
+    boolean isQuietModeEnabled(int userHandle);
+    void setSeedAccountData(int userHandle, in String accountName,
+            in String accountType, in PersistableBundle accountOptions, boolean persist);
+    String getSeedAccountName();
+    String getSeedAccountType();
+    PersistableBundle getSeedAccountOptions();
+    void clearSeedAccountData();
+    boolean someUserHasSeedAccount(in String accountName, in String accountType);
+    boolean isManagedProfile(int userId);
+    boolean isDemoUser(int userId);
+    UserInfo createProfileForUserEvenWhenDisallowed(in String name, int flags, int userHandle,
+            in String[] disallowedPackages);
+    boolean isUserUnlockingOrUnlocked(int userId);
+    int getManagedProfileBadge(int userId);
+    boolean isUserUnlocked(int userId);
+    boolean isUserRunning(int userId);
+    boolean isUserNameSet(int userHandle);
+    boolean hasRestrictedProfiles();
+    boolean requestQuietModeEnabled(String callingPackage, boolean enableQuietMode, int userHandle, in IntentSender target);
+    long getUserStartRealtime();
+    long getUserUnlockRealtime();
+}

Разница между файлами не показана из-за своего большого размера
+ 118 - 0
antlr/aidl/Aidl.interp


+ 80 - 0
antlr/aidl/Aidl.tokens

@@ -0,0 +1,80 @@
+PRIMITIVE=1
+BYTE=2
+SHORT=3
+INT=4
+LONG=5
+FLOAT=6
+DOUBLE=7
+BOOLEAN=8
+CHAR=9
+PACKAGE=10
+PARCELABLE=11
+IMPORT=12
+INTERFACE=13
+ONEWAY=14
+VOID=15
+CONST=16
+NULLABLE=17
+INOUT=18
+IN=19
+OUT=20
+STRING=21
+CHARSEQUENCE=22
+MAP=23
+LIST=24
+IBINDER=25
+LP=26
+RP=27
+LC=28
+RC=29
+LB=30
+RB=31
+LA=32
+RA=33
+DOT=34
+CO=35
+SE=36
+EQ=37
+PATH=38
+ID=39
+INTEGER=40
+LITERALSTRING=41
+WS=42
+COMMENT_BLOCK=43
+COMMENT_LINE=44
+'byte'=2
+'short'=3
+'int'=4
+'long'=5
+'float'=6
+'double'=7
+'boolean'=8
+'char'=9
+'package'=10
+'parcelable'=11
+'import'=12
+'interface'=13
+'oneway'=14
+'void'=15
+'const'=16
+'@nullable'=17
+'inout'=18
+'in'=19
+'out'=20
+'String'=21
+'CharSequence'=22
+'Map'=23
+'List'=24
+'IBinder'=25
+'('=26
+')'=27
+'{'=28
+'}'=29
+'['=30
+']'=31
+'<'=32
+'>'=33
+'.'=34
+','=35
+';'=36
+'='=37

+ 279 - 0
antlr/aidl/AidlBaseListener.java

@@ -0,0 +1,279 @@
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
+package antlr.aidl;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ErrorNode;
+import org.antlr.v4.runtime.tree.TerminalNode;
+
+/**
+ * This class provides an empty implementation of {@link AidlListener},
+ * which can be extended to create a listener which only needs to handle a subset
+ * of the available methods.
+ */
+public class AidlBaseListener implements AidlListener {
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterAidl(AidlParser.AidlContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitAidl(AidlParser.AidlContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterPackageStatement(AidlParser.PackageStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitPackageStatement(AidlParser.PackageStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterParcelableStatement(AidlParser.ParcelableStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitParcelableStatement(AidlParser.ParcelableStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterImportStatement(AidlParser.ImportStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitImportStatement(AidlParser.ImportStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterInterfaceStatement(AidlParser.InterfaceStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitInterfaceStatement(AidlParser.InterfaceStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterInterfaceSubStatement(AidlParser.InterfaceSubStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitInterfaceSubStatement(AidlParser.InterfaceSubStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterMethodStatement(AidlParser.MethodStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitMethodStatement(AidlParser.MethodStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterConstStatement(AidlParser.ConstStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitConstStatement(AidlParser.ConstStatementContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterMethodReturnType(AidlParser.MethodReturnTypeContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitMethodReturnType(AidlParser.MethodReturnTypeContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterParamList(AidlParser.ParamListContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitParamList(AidlParser.ParamListContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterParam(AidlParser.ParamContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitParam(AidlParser.ParamContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterParamTag(AidlParser.ParamTagContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitParamTag(AidlParser.ParamTagContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterParamType(AidlParser.ParamTypeContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitParamType(AidlParser.ParamTypeContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterType(AidlParser.TypeContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitType(AidlParser.TypeContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterList(AidlParser.ListContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitList(AidlParser.ListContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterInterfaceName(AidlParser.InterfaceNameContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitInterfaceName(AidlParser.InterfaceNameContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterClassName(AidlParser.ClassNameContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitClassName(AidlParser.ClassNameContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterName(AidlParser.NameContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitName(AidlParser.NameContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterPath(AidlParser.PathContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitPath(AidlParser.PathContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterId(AidlParser.IdContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitId(AidlParser.IdContext ctx) { }
+
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void enterEveryRule(ParserRuleContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void exitEveryRule(ParserRuleContext ctx) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void visitTerminal(TerminalNode node) { }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation does nothing.</p>
+	 */
+	@Override public void visitErrorNode(ErrorNode node) { }
+}

+ 154 - 0
antlr/aidl/AidlBaseVisitor.java

@@ -0,0 +1,154 @@
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
+package antlr.aidl;
+import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
+
+/**
+ * This class provides an empty implementation of {@link AidlVisitor},
+ * which can be extended to create a visitor which only needs to handle a subset
+ * of the available methods.
+ *
+ * @param <T> The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public class AidlBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements AidlVisitor<T> {
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitAidl(AidlParser.AidlContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitPackageStatement(AidlParser.PackageStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitParcelableStatement(AidlParser.ParcelableStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitImportStatement(AidlParser.ImportStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitInterfaceStatement(AidlParser.InterfaceStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitInterfaceSubStatement(AidlParser.InterfaceSubStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitMethodStatement(AidlParser.MethodStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitConstStatement(AidlParser.ConstStatementContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitMethodReturnType(AidlParser.MethodReturnTypeContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitParamList(AidlParser.ParamListContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitParam(AidlParser.ParamContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitParamTag(AidlParser.ParamTagContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitParamType(AidlParser.ParamTypeContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitType(AidlParser.TypeContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitList(AidlParser.ListContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitInterfaceName(AidlParser.InterfaceNameContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitClassName(AidlParser.ClassNameContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitName(AidlParser.NameContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitPath(AidlParser.PathContext ctx) { return visitChildren(ctx); }
+	/**
+	 * {@inheritDoc}
+	 *
+	 * <p>The default implementation returns the result of calling
+	 * {@link #visitChildren} on {@code ctx}.</p>
+	 */
+	@Override public T visitId(AidlParser.IdContext ctx) { return visitChildren(ctx); }
+}

Разница между файлами не показана из-за своего большого размера
+ 150 - 0
antlr/aidl/AidlLexer.interp


+ 256 - 0
antlr/aidl/AidlLexer.java

@@ -0,0 +1,256 @@
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
+package antlr.aidl;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
+public class AidlLexer extends Lexer {
+	static { RuntimeMetaData.checkVersion("4.9.1", RuntimeMetaData.VERSION); }
+
+	protected static final DFA[] _decisionToDFA;
+	protected static final PredictionContextCache _sharedContextCache =
+		new PredictionContextCache();
+	public static final int
+		PRIMITIVE=1, BYTE=2, SHORT=3, INT=4, LONG=5, FLOAT=6, DOUBLE=7, BOOLEAN=8, 
+		CHAR=9, PACKAGE=10, PARCELABLE=11, IMPORT=12, INTERFACE=13, ONEWAY=14, 
+		VOID=15, CONST=16, NULLABLE=17, INOUT=18, IN=19, OUT=20, STRING=21, CHARSEQUENCE=22, 
+		MAP=23, LIST=24, IBINDER=25, LP=26, RP=27, LC=28, RC=29, LB=30, RB=31, 
+		LA=32, RA=33, DOT=34, CO=35, SE=36, EQ=37, PATH=38, ID=39, INTEGER=40, 
+		LITERALSTRING=41, WS=42, COMMENT_BLOCK=43, COMMENT_LINE=44;
+	public static String[] channelNames = {
+		"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+	};
+
+	public static String[] modeNames = {
+		"DEFAULT_MODE"
+	};
+
+	private static String[] makeRuleNames() {
+		return new String[] {
+			"PRIMITIVE", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE", "BOOLEAN", 
+			"CHAR", "PACKAGE", "PARCELABLE", "IMPORT", "INTERFACE", "ONEWAY", "VOID", 
+			"CONST", "NULLABLE", "INOUT", "IN", "OUT", "STRING", "CHARSEQUENCE", 
+			"MAP", "LIST", "IBINDER", "LP", "RP", "LC", "RC", "LB", "RB", "LA", "RA", 
+			"DOT", "CO", "SE", "EQ", "PATH", "ID", "INTEGER", "LITERALSTRING", "ESC", 
+			"WS", "COMMENT_BLOCK", "COMMENT_LINE", "EL"
+		};
+	}
+	public static final String[] ruleNames = makeRuleNames();
+
+	private static String[] makeLiteralNames() {
+		return new String[] {
+			null, null, "'byte'", "'short'", "'int'", "'long'", "'float'", "'double'", 
+			"'boolean'", "'char'", "'package'", "'parcelable'", "'import'", "'interface'", 
+			"'oneway'", "'void'", "'const'", "'@nullable'", "'inout'", "'in'", "'out'", 
+			"'String'", "'CharSequence'", "'Map'", "'List'", "'IBinder'", "'('", 
+			"')'", "'{'", "'}'", "'['", "']'", "'<'", "'>'", "'.'", "','", "';'", 
+			"'='"
+		};
+	}
+	private static final String[] _LITERAL_NAMES = makeLiteralNames();
+	private static String[] makeSymbolicNames() {
+		return new String[] {
+			null, "PRIMITIVE", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE", 
+			"BOOLEAN", "CHAR", "PACKAGE", "PARCELABLE", "IMPORT", "INTERFACE", "ONEWAY", 
+			"VOID", "CONST", "NULLABLE", "INOUT", "IN", "OUT", "STRING", "CHARSEQUENCE", 
+			"MAP", "LIST", "IBINDER", "LP", "RP", "LC", "RC", "LB", "RB", "LA", "RA", 
+			"DOT", "CO", "SE", "EQ", "PATH", "ID", "INTEGER", "LITERALSTRING", "WS", 
+			"COMMENT_BLOCK", "COMMENT_LINE"
+		};
+	}
+	private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+	/**
+	 * @deprecated Use {@link #VOCABULARY} instead.
+	 */
+	@Deprecated
+	public static final String[] tokenNames;
+	static {
+		tokenNames = new String[_SYMBOLIC_NAMES.length];
+		for (int i = 0; i < tokenNames.length; i++) {
+			tokenNames[i] = VOCABULARY.getLiteralName(i);
+			if (tokenNames[i] == null) {
+				tokenNames[i] = VOCABULARY.getSymbolicName(i);
+			}
+
+			if (tokenNames[i] == null) {
+				tokenNames[i] = "<INVALID>";
+			}
+		}
+	}
+
+	@Override
+	@Deprecated
+	public String[] getTokenNames() {
+		return tokenNames;
+	}
+
+	@Override
+
+	public Vocabulary getVocabulary() {
+		return VOCABULARY;
+	}
+
+
+	    int oneway = 0;
+
+
+	public AidlLexer(CharStream input) {
+		super(input);
+		_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+	}
+
+	@Override
+	public String getGrammarFileName() { return "Aidl.g4"; }
+
+	@Override
+	public String[] getRuleNames() { return ruleNames; }
+
+	@Override
+	public String getSerializedATN() { return _serializedATN; }
+
+	@Override
+	public String[] getChannelNames() { return channelNames; }
+
+	@Override
+	public String[] getModeNames() { return modeNames; }
+
+	@Override
+	public ATN getATN() { return _ATN; }
+
+	public static final String _serializedATN =
+		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2.\u016f\b\1\4\2\t"+
+		"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
+		"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
+		"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
+		"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
+		"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
+		",\t,\4-\t-\4.\t.\4/\t/\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\5\2h\n\2\3\3\3"+
+		"\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6"+
+		"\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3"+
+		"\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3"+
+		"\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3"+
+		"\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17"+
+		"\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21"+
+		"\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23"+
+		"\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\26\3\26\3\26"+
+		"\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27"+
+		"\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\32\3\32"+
+		"\3\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36"+
+		"\3\37\3\37\3 \3 \3!\3!\3\"\3\"\3#\3#\3$\3$\3%\3%\3&\3&\3\'\3\'\3\'\3\'"+
+		"\6\'\u0126\n\'\r\'\16\'\u0127\3(\3(\7(\u012c\n(\f(\16(\u012f\13(\3)\6"+
+		")\u0132\n)\r)\16)\u0133\3*\3*\3*\7*\u0139\n*\f*\16*\u013c\13*\3*\3*\3"+
+		"+\3+\3+\3+\5+\u0144\n+\3,\6,\u0147\n,\r,\16,\u0148\3,\3,\3-\3-\3-\3-\7"+
+		"-\u0151\n-\f-\16-\u0154\13-\3-\3-\3-\3-\3-\3.\3.\3.\3.\7.\u015f\n.\f."+
+		"\16.\u0162\13.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\5/\u016e\n/\5\u013a\u0152"+
+		"\u0160\2\60\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33"+
+		"\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67"+
+		"\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U\2W,Y-[.]\2\3\2\6\5\2C\\aac|\6\2"+
+		"\62;C\\aac|\3\2\62;\5\2\13\f\17\17\"\"\2\u017f\2\3\3\2\2\2\2\5\3\2\2\2"+
+		"\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3"+
+		"\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2"+
+		"\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2"+
+		"\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2"+
+		"\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2"+
+		"\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2"+
+		"\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2["+
+		"\3\2\2\2\3g\3\2\2\2\5i\3\2\2\2\7n\3\2\2\2\tt\3\2\2\2\13x\3\2\2\2\r}\3"+
+		"\2\2\2\17\u0083\3\2\2\2\21\u008a\3\2\2\2\23\u0092\3\2\2\2\25\u0097\3\2"+
+		"\2\2\27\u009f\3\2\2\2\31\u00aa\3\2\2\2\33\u00b1\3\2\2\2\35\u00bb\3\2\2"+
+		"\2\37\u00c2\3\2\2\2!\u00c7\3\2\2\2#\u00cd\3\2\2\2%\u00d7\3\2\2\2\'\u00dd"+
+		"\3\2\2\2)\u00e0\3\2\2\2+\u00e4\3\2\2\2-\u00eb\3\2\2\2/\u00f8\3\2\2\2\61"+
+		"\u00fc\3\2\2\2\63\u0101\3\2\2\2\65\u0109\3\2\2\2\67\u010b\3\2\2\29\u010d"+
+		"\3\2\2\2;\u010f\3\2\2\2=\u0111\3\2\2\2?\u0113\3\2\2\2A\u0115\3\2\2\2C"+
+		"\u0117\3\2\2\2E\u0119\3\2\2\2G\u011b\3\2\2\2I\u011d\3\2\2\2K\u011f\3\2"+
+		"\2\2M\u0121\3\2\2\2O\u0129\3\2\2\2Q\u0131\3\2\2\2S\u0135\3\2\2\2U\u0143"+
+		"\3\2\2\2W\u0146\3\2\2\2Y\u014c\3\2\2\2[\u015a\3\2\2\2]\u016d\3\2\2\2_"+
+		"h\5\5\3\2`h\5\7\4\2ah\5\t\5\2bh\5\13\6\2ch\5\r\7\2dh\5\17\b\2eh\5\21\t"+
+		"\2fh\5\23\n\2g_\3\2\2\2g`\3\2\2\2ga\3\2\2\2gb\3\2\2\2gc\3\2\2\2gd\3\2"+
+		"\2\2ge\3\2\2\2gf\3\2\2\2h\4\3\2\2\2ij\7d\2\2jk\7{\2\2kl\7v\2\2lm\7g\2"+
+		"\2m\6\3\2\2\2no\7u\2\2op\7j\2\2pq\7q\2\2qr\7t\2\2rs\7v\2\2s\b\3\2\2\2"+
+		"tu\7k\2\2uv\7p\2\2vw\7v\2\2w\n\3\2\2\2xy\7n\2\2yz\7q\2\2z{\7p\2\2{|\7"+
+		"i\2\2|\f\3\2\2\2}~\7h\2\2~\177\7n\2\2\177\u0080\7q\2\2\u0080\u0081\7c"+
+		"\2\2\u0081\u0082\7v\2\2\u0082\16\3\2\2\2\u0083\u0084\7f\2\2\u0084\u0085"+
+		"\7q\2\2\u0085\u0086\7w\2\2\u0086\u0087\7d\2\2\u0087\u0088\7n\2\2\u0088"+
+		"\u0089\7g\2\2\u0089\20\3\2\2\2\u008a\u008b\7d\2\2\u008b\u008c\7q\2\2\u008c"+
+		"\u008d\7q\2\2\u008d\u008e\7n\2\2\u008e\u008f\7g\2\2\u008f\u0090\7c\2\2"+
+		"\u0090\u0091\7p\2\2\u0091\22\3\2\2\2\u0092\u0093\7e\2\2\u0093\u0094\7"+
+		"j\2\2\u0094\u0095\7c\2\2\u0095\u0096\7t\2\2\u0096\24\3\2\2\2\u0097\u0098"+
+		"\7r\2\2\u0098\u0099\7c\2\2\u0099\u009a\7e\2\2\u009a\u009b\7m\2\2\u009b"+
+		"\u009c\7c\2\2\u009c\u009d\7i\2\2\u009d\u009e\7g\2\2\u009e\26\3\2\2\2\u009f"+
+		"\u00a0\7r\2\2\u00a0\u00a1\7c\2\2\u00a1\u00a2\7t\2\2\u00a2\u00a3\7e\2\2"+
+		"\u00a3\u00a4\7g\2\2\u00a4\u00a5\7n\2\2\u00a5\u00a6\7c\2\2\u00a6\u00a7"+
+		"\7d\2\2\u00a7\u00a8\7n\2\2\u00a8\u00a9\7g\2\2\u00a9\30\3\2\2\2\u00aa\u00ab"+
+		"\7k\2\2\u00ab\u00ac\7o\2\2\u00ac\u00ad\7r\2\2\u00ad\u00ae\7q\2\2\u00ae"+
+		"\u00af\7t\2\2\u00af\u00b0\7v\2\2\u00b0\32\3\2\2\2\u00b1\u00b2\7k\2\2\u00b2"+
+		"\u00b3\7p\2\2\u00b3\u00b4\7v\2\2\u00b4\u00b5\7g\2\2\u00b5\u00b6\7t\2\2"+
+		"\u00b6\u00b7\7h\2\2\u00b7\u00b8\7c\2\2\u00b8\u00b9\7e\2\2\u00b9\u00ba"+
+		"\7g\2\2\u00ba\34\3\2\2\2\u00bb\u00bc\7q\2\2\u00bc\u00bd\7p\2\2\u00bd\u00be"+
+		"\7g\2\2\u00be\u00bf\7y\2\2\u00bf\u00c0\7c\2\2\u00c0\u00c1\7{\2\2\u00c1"+
+		"\36\3\2\2\2\u00c2\u00c3\7x\2\2\u00c3\u00c4\7q\2\2\u00c4\u00c5\7k\2\2\u00c5"+
+		"\u00c6\7f\2\2\u00c6 \3\2\2\2\u00c7\u00c8\7e\2\2\u00c8\u00c9\7q\2\2\u00c9"+
+		"\u00ca\7p\2\2\u00ca\u00cb\7u\2\2\u00cb\u00cc\7v\2\2\u00cc\"\3\2\2\2\u00cd"+
+		"\u00ce\7B\2\2\u00ce\u00cf\7p\2\2\u00cf\u00d0\7w\2\2\u00d0\u00d1\7n\2\2"+
+		"\u00d1\u00d2\7n\2\2\u00d2\u00d3\7c\2\2\u00d3\u00d4\7d\2\2\u00d4\u00d5"+
+		"\7n\2\2\u00d5\u00d6\7g\2\2\u00d6$\3\2\2\2\u00d7\u00d8\7k\2\2\u00d8\u00d9"+
+		"\7p\2\2\u00d9\u00da\7q\2\2\u00da\u00db\7w\2\2\u00db\u00dc\7v\2\2\u00dc"+
+		"&\3\2\2\2\u00dd\u00de\7k\2\2\u00de\u00df\7p\2\2\u00df(\3\2\2\2\u00e0\u00e1"+
+		"\7q\2\2\u00e1\u00e2\7w\2\2\u00e2\u00e3\7v\2\2\u00e3*\3\2\2\2\u00e4\u00e5"+
+		"\7U\2\2\u00e5\u00e6\7v\2\2\u00e6\u00e7\7t\2\2\u00e7\u00e8\7k\2\2\u00e8"+
+		"\u00e9\7p\2\2\u00e9\u00ea\7i\2\2\u00ea,\3\2\2\2\u00eb\u00ec\7E\2\2\u00ec"+
+		"\u00ed\7j\2\2\u00ed\u00ee\7c\2\2\u00ee\u00ef\7t\2\2\u00ef\u00f0\7U\2\2"+
+		"\u00f0\u00f1\7g\2\2\u00f1\u00f2\7s\2\2\u00f2\u00f3\7w\2\2\u00f3\u00f4"+
+		"\7g\2\2\u00f4\u00f5\7p\2\2\u00f5\u00f6\7e\2\2\u00f6\u00f7\7g\2\2\u00f7"+
+		".\3\2\2\2\u00f8\u00f9\7O\2\2\u00f9\u00fa\7c\2\2\u00fa\u00fb\7r\2\2\u00fb"+
+		"\60\3\2\2\2\u00fc\u00fd\7N\2\2\u00fd\u00fe\7k\2\2\u00fe\u00ff\7u\2\2\u00ff"+
+		"\u0100\7v\2\2\u0100\62\3\2\2\2\u0101\u0102\7K\2\2\u0102\u0103\7D\2\2\u0103"+
+		"\u0104\7k\2\2\u0104\u0105\7p\2\2\u0105\u0106\7f\2\2\u0106\u0107\7g\2\2"+
+		"\u0107\u0108\7t\2\2\u0108\64\3\2\2\2\u0109\u010a\7*\2\2\u010a\66\3\2\2"+
+		"\2\u010b\u010c\7+\2\2\u010c8\3\2\2\2\u010d\u010e\7}\2\2\u010e:\3\2\2\2"+
+		"\u010f\u0110\7\177\2\2\u0110<\3\2\2\2\u0111\u0112\7]\2\2\u0112>\3\2\2"+
+		"\2\u0113\u0114\7_\2\2\u0114@\3\2\2\2\u0115\u0116\7>\2\2\u0116B\3\2\2\2"+
+		"\u0117\u0118\7@\2\2\u0118D\3\2\2\2\u0119\u011a\7\60\2\2\u011aF\3\2\2\2"+
+		"\u011b\u011c\7.\2\2\u011cH\3\2\2\2\u011d\u011e\7=\2\2\u011eJ\3\2\2\2\u011f"+
+		"\u0120\7?\2\2\u0120L\3\2\2\2\u0121\u0125\5O(\2\u0122\u0123\5E#\2\u0123"+
+		"\u0124\5O(\2\u0124\u0126\3\2\2\2\u0125\u0122\3\2\2\2\u0126\u0127\3\2\2"+
+		"\2\u0127\u0125\3\2\2\2\u0127\u0128\3\2\2\2\u0128N\3\2\2\2\u0129\u012d"+
+		"\t\2\2\2\u012a\u012c\t\3\2\2\u012b\u012a\3\2\2\2\u012c\u012f\3\2\2\2\u012d"+
+		"\u012b\3\2\2\2\u012d\u012e\3\2\2\2\u012eP\3\2\2\2\u012f\u012d\3\2\2\2"+
+		"\u0130\u0132\t\4\2\2\u0131\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0131"+
+		"\3\2\2\2\u0133\u0134\3\2\2\2\u0134R\3\2\2\2\u0135\u013a\7$\2\2\u0136\u0139"+
+		"\5U+\2\u0137\u0139\13\2\2\2\u0138\u0136\3\2\2\2\u0138\u0137\3\2\2\2\u0139"+
+		"\u013c\3\2\2\2\u013a\u013b\3\2\2\2\u013a\u0138\3\2\2\2\u013b\u013d\3\2"+
+		"\2\2\u013c\u013a\3\2\2\2\u013d\u013e\7$\2\2\u013eT\3\2\2\2\u013f\u0140"+
+		"\7^\2\2\u0140\u0144\7$\2\2\u0141\u0142\7^\2\2\u0142\u0144\7^\2\2\u0143"+
+		"\u013f\3\2\2\2\u0143\u0141\3\2\2\2\u0144V\3\2\2\2\u0145\u0147\t\5\2\2"+
+		"\u0146\u0145\3\2\2\2\u0147\u0148\3\2\2\2\u0148\u0146\3\2\2\2\u0148\u0149"+
+		"\3\2\2\2\u0149\u014a\3\2\2\2\u014a\u014b\b,\2\2\u014bX\3\2\2\2\u014c\u014d"+
+		"\7\61\2\2\u014d\u014e\7,\2\2\u014e\u0152\3\2\2\2\u014f\u0151\13\2\2\2"+
+		"\u0150\u014f\3\2\2\2\u0151\u0154\3\2\2\2\u0152\u0153\3\2\2\2\u0152\u0150"+
+		"\3\2\2\2\u0153\u0155\3\2\2\2\u0154\u0152\3\2\2\2\u0155\u0156\7,\2\2\u0156"+
+		"\u0157\7\61\2\2\u0157\u0158\3\2\2\2\u0158\u0159\b-\3\2\u0159Z\3\2\2\2"+
+		"\u015a\u015b\7\61\2\2\u015b\u015c\7\61\2\2\u015c\u0160\3\2\2\2\u015d\u015f"+
+		"\13\2\2\2\u015e\u015d\3\2\2\2\u015f\u0162\3\2\2\2\u0160\u0161\3\2\2\2"+
+		"\u0160\u015e\3\2\2\2\u0161\u0163\3\2\2\2\u0162\u0160\3\2\2\2\u0163\u0164"+
+		"\5]/\2\u0164\u0165\3\2\2\2\u0165\u0166\b.\3\2\u0166\\\3\2\2\2\u0167\u0168"+
+		"\7\17\2\2\u0168\u016e\7\f\2\2\u0169\u016e\7\f\2\2\u016a\u016b\7\f\2\2"+
+		"\u016b\u016e\7\17\2\2\u016c\u016e\7\2\2\3\u016d\u0167\3\2\2\2\u016d\u0169"+
+		"\3\2\2\2\u016d\u016a\3\2\2\2\u016d\u016c\3\2\2\2\u016e^\3\2\2\2\16\2g"+
+		"\u0127\u012d\u0133\u0138\u013a\u0143\u0148\u0152\u0160\u016d\4\2\3\2\2"+
+		"\4\2";
+	public static final ATN _ATN =
+		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+	static {
+		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+		}
+	}
+}

+ 80 - 0
antlr/aidl/AidlLexer.tokens

@@ -0,0 +1,80 @@
+PRIMITIVE=1
+BYTE=2
+SHORT=3
+INT=4
+LONG=5
+FLOAT=6
+DOUBLE=7
+BOOLEAN=8
+CHAR=9
+PACKAGE=10
+PARCELABLE=11
+IMPORT=12
+INTERFACE=13
+ONEWAY=14
+VOID=15
+CONST=16
+NULLABLE=17
+INOUT=18
+IN=19
+OUT=20
+STRING=21
+CHARSEQUENCE=22
+MAP=23
+LIST=24
+IBINDER=25
+LP=26
+RP=27
+LC=28
+RC=29
+LB=30
+RB=31
+LA=32
+RA=33
+DOT=34
+CO=35
+SE=36
+EQ=37
+PATH=38
+ID=39
+INTEGER=40
+LITERALSTRING=41
+WS=42
+COMMENT_BLOCK=43
+COMMENT_LINE=44
+'byte'=2
+'short'=3
+'int'=4
+'long'=5
+'float'=6
+'double'=7
+'boolean'=8
+'char'=9
+'package'=10
+'parcelable'=11
+'import'=12
+'interface'=13
+'oneway'=14
+'void'=15
+'const'=16
+'@nullable'=17
+'inout'=18
+'in'=19
+'out'=20
+'String'=21
+'CharSequence'=22
+'Map'=23
+'List'=24
+'IBinder'=25
+'('=26
+')'=27
+'{'=28
+'}'=29
+'['=30
+']'=31
+'<'=32
+'>'=33
+'.'=34
+','=35
+';'=36
+'='=37

+ 210 - 0
antlr/aidl/AidlListener.java

@@ -0,0 +1,210 @@
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
+package antlr.aidl;
+import org.antlr.v4.runtime.tree.ParseTreeListener;
+
+/**
+ * This interface defines a complete listener for a parse tree produced by
+ * {@link AidlParser}.
+ */
+public interface AidlListener extends ParseTreeListener {
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#aidl}.
+	 * @param ctx the parse tree
+	 */
+	void enterAidl(AidlParser.AidlContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#aidl}.
+	 * @param ctx the parse tree
+	 */
+	void exitAidl(AidlParser.AidlContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#packageStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterPackageStatement(AidlParser.PackageStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#packageStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitPackageStatement(AidlParser.PackageStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#parcelableStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterParcelableStatement(AidlParser.ParcelableStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#parcelableStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitParcelableStatement(AidlParser.ParcelableStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#importStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterImportStatement(AidlParser.ImportStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#importStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitImportStatement(AidlParser.ImportStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#interfaceStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterInterfaceStatement(AidlParser.InterfaceStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#interfaceStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitInterfaceStatement(AidlParser.InterfaceStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#interfaceSubStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterInterfaceSubStatement(AidlParser.InterfaceSubStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#interfaceSubStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitInterfaceSubStatement(AidlParser.InterfaceSubStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#methodStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterMethodStatement(AidlParser.MethodStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#methodStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitMethodStatement(AidlParser.MethodStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#constStatement}.
+	 * @param ctx the parse tree
+	 */
+	void enterConstStatement(AidlParser.ConstStatementContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#constStatement}.
+	 * @param ctx the parse tree
+	 */
+	void exitConstStatement(AidlParser.ConstStatementContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#methodReturnType}.
+	 * @param ctx the parse tree
+	 */
+	void enterMethodReturnType(AidlParser.MethodReturnTypeContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#methodReturnType}.
+	 * @param ctx the parse tree
+	 */
+	void exitMethodReturnType(AidlParser.MethodReturnTypeContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#paramList}.
+	 * @param ctx the parse tree
+	 */
+	void enterParamList(AidlParser.ParamListContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#paramList}.
+	 * @param ctx the parse tree
+	 */
+	void exitParamList(AidlParser.ParamListContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#param}.
+	 * @param ctx the parse tree
+	 */
+	void enterParam(AidlParser.ParamContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#param}.
+	 * @param ctx the parse tree
+	 */
+	void exitParam(AidlParser.ParamContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#paramTag}.
+	 * @param ctx the parse tree
+	 */
+	void enterParamTag(AidlParser.ParamTagContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#paramTag}.
+	 * @param ctx the parse tree
+	 */
+	void exitParamTag(AidlParser.ParamTagContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#paramType}.
+	 * @param ctx the parse tree
+	 */
+	void enterParamType(AidlParser.ParamTypeContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#paramType}.
+	 * @param ctx the parse tree
+	 */
+	void exitParamType(AidlParser.ParamTypeContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#type}.
+	 * @param ctx the parse tree
+	 */
+	void enterType(AidlParser.TypeContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#type}.
+	 * @param ctx the parse tree
+	 */
+	void exitType(AidlParser.TypeContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#list}.
+	 * @param ctx the parse tree
+	 */
+	void enterList(AidlParser.ListContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#list}.
+	 * @param ctx the parse tree
+	 */
+	void exitList(AidlParser.ListContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#interfaceName}.
+	 * @param ctx the parse tree
+	 */
+	void enterInterfaceName(AidlParser.InterfaceNameContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#interfaceName}.
+	 * @param ctx the parse tree
+	 */
+	void exitInterfaceName(AidlParser.InterfaceNameContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#className}.
+	 * @param ctx the parse tree
+	 */
+	void enterClassName(AidlParser.ClassNameContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#className}.
+	 * @param ctx the parse tree
+	 */
+	void exitClassName(AidlParser.ClassNameContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#name}.
+	 * @param ctx the parse tree
+	 */
+	void enterName(AidlParser.NameContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#name}.
+	 * @param ctx the parse tree
+	 */
+	void exitName(AidlParser.NameContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#path}.
+	 * @param ctx the parse tree
+	 */
+	void enterPath(AidlParser.PathContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#path}.
+	 * @param ctx the parse tree
+	 */
+	void exitPath(AidlParser.PathContext ctx);
+	/**
+	 * Enter a parse tree produced by {@link AidlParser#id}.
+	 * @param ctx the parse tree
+	 */
+	void enterId(AidlParser.IdContext ctx);
+	/**
+	 * Exit a parse tree produced by {@link AidlParser#id}.
+	 * @param ctx the parse tree
+	 */
+	void exitId(AidlParser.IdContext ctx);
+}

+ 1683 - 0
antlr/aidl/AidlParser.java

@@ -0,0 +1,1683 @@
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
+package antlr.aidl;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.tree.*;
+import java.util.List;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
+public class AidlParser extends Parser {
+	static { RuntimeMetaData.checkVersion("4.9.1", RuntimeMetaData.VERSION); }
+
+	protected static final DFA[] _decisionToDFA;
+	protected static final PredictionContextCache _sharedContextCache =
+		new PredictionContextCache();
+	public static final int
+		PRIMITIVE=1, BYTE=2, SHORT=3, INT=4, LONG=5, FLOAT=6, DOUBLE=7, BOOLEAN=8, 
+		CHAR=9, PACKAGE=10, PARCELABLE=11, IMPORT=12, INTERFACE=13, ONEWAY=14, 
+		VOID=15, CONST=16, NULLABLE=17, INOUT=18, IN=19, OUT=20, STRING=21, CHARSEQUENCE=22, 
+		MAP=23, LIST=24, IBINDER=25, LP=26, RP=27, LC=28, RC=29, LB=30, RB=31, 
+		LA=32, RA=33, DOT=34, CO=35, SE=36, EQ=37, PATH=38, ID=39, INTEGER=40, 
+		LITERALSTRING=41, WS=42, COMMENT_BLOCK=43, COMMENT_LINE=44;
+	public static final int
+		RULE_aidl = 0, RULE_packageStatement = 1, RULE_parcelableStatement = 2, 
+		RULE_importStatement = 3, RULE_interfaceStatement = 4, RULE_interfaceSubStatement = 5, 
+		RULE_methodStatement = 6, RULE_constStatement = 7, RULE_methodReturnType = 8, 
+		RULE_paramList = 9, RULE_param = 10, RULE_paramTag = 11, RULE_paramType = 12, 
+		RULE_type = 13, RULE_list = 14, RULE_interfaceName = 15, RULE_className = 16, 
+		RULE_name = 17, RULE_path = 18, RULE_id = 19;
+	private static String[] makeRuleNames() {
+		return new String[] {
+				"antlr/aidl", "packageStatement", "parcelableStatement", "importStatement",
+			"interfaceStatement", "interfaceSubStatement", "methodStatement", "constStatement", 
+			"methodReturnType", "paramList", "param", "paramTag", "paramType", "type", 
+			"list", "interfaceName", "className", "name", "path", "id"
+		};
+	}
+	public static final String[] ruleNames = makeRuleNames();
+
+	private static String[] makeLiteralNames() {
+		return new String[] {
+			null, null, "'byte'", "'short'", "'int'", "'long'", "'float'", "'double'", 
+			"'boolean'", "'char'", "'package'", "'parcelable'", "'import'", "'interface'", 
+			"'oneway'", "'void'", "'const'", "'@nullable'", "'inout'", "'in'", "'out'", 
+			"'String'", "'CharSequence'", "'Map'", "'List'", "'IBinder'", "'('", 
+			"')'", "'{'", "'}'", "'['", "']'", "'<'", "'>'", "'.'", "','", "';'", 
+			"'='"
+		};
+	}
+	private static final String[] _LITERAL_NAMES = makeLiteralNames();
+	private static String[] makeSymbolicNames() {
+		return new String[] {
+			null, "PRIMITIVE", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE", 
+			"BOOLEAN", "CHAR", "PACKAGE", "PARCELABLE", "IMPORT", "INTERFACE", "ONEWAY", 
+			"VOID", "CONST", "NULLABLE", "INOUT", "IN", "OUT", "STRING", "CHARSEQUENCE", 
+			"MAP", "LIST", "IBINDER", "LP", "RP", "LC", "RC", "LB", "RB", "LA", "RA", 
+			"DOT", "CO", "SE", "EQ", "PATH", "ID", "INTEGER", "LITERALSTRING", "WS", 
+			"COMMENT_BLOCK", "COMMENT_LINE"
+		};
+	}
+	private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+	/**
+	 * @deprecated Use {@link #VOCABULARY} instead.
+	 */
+	@Deprecated
+	public static final String[] tokenNames;
+	static {
+		tokenNames = new String[_SYMBOLIC_NAMES.length];
+		for (int i = 0; i < tokenNames.length; i++) {
+			tokenNames[i] = VOCABULARY.getLiteralName(i);
+			if (tokenNames[i] == null) {
+				tokenNames[i] = VOCABULARY.getSymbolicName(i);
+			}
+
+			if (tokenNames[i] == null) {
+				tokenNames[i] = "<INVALID>";
+			}
+		}
+	}
+
+	@Override
+	@Deprecated
+	public String[] getTokenNames() {
+		return tokenNames;
+	}
+
+	@Override
+
+	public Vocabulary getVocabulary() {
+		return VOCABULARY;
+	}
+
+	@Override
+	public String getGrammarFileName() { return "Aidl.g4"; }
+
+	@Override
+	public String[] getRuleNames() { return ruleNames; }
+
+	@Override
+	public String getSerializedATN() { return _serializedATN; }
+
+	@Override
+	public ATN getATN() { return _ATN; }
+
+
+	    int oneway = 0;
+
+	public AidlParser(TokenStream input) {
+		super(input);
+		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+	}
+
+	public static class AidlContext extends ParserRuleContext {
+		public PackageStatementContext packageStatement() {
+			return getRuleContext(PackageStatementContext.class,0);
+		}
+		public ParcelableStatementContext parcelableStatement() {
+			return getRuleContext(ParcelableStatementContext.class,0);
+		}
+		public InterfaceStatementContext interfaceStatement() {
+			return getRuleContext(InterfaceStatementContext.class,0);
+		}
+		public List<ImportStatementContext> importStatement() {
+			return getRuleContexts(ImportStatementContext.class);
+		}
+		public ImportStatementContext importStatement(int i) {
+			return getRuleContext(ImportStatementContext.class,i);
+		}
+		public AidlContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_aidl; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterAidl(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitAidl(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitAidl(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final AidlContext aidl() throws RecognitionException {
+		AidlContext _localctx = new AidlContext(_ctx, getState());
+		enterRule(_localctx, 0, RULE_aidl);
+		int _la;
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(40);
+			packageStatement();
+			setState(49);
+			_errHandler.sync(this);
+			switch (_input.LA(1)) {
+			case PARCELABLE:
+				{
+				setState(41);
+				parcelableStatement();
+				}
+				break;
+			case IMPORT:
+			case INTERFACE:
+			case ONEWAY:
+				{
+				setState(45);
+				_errHandler.sync(this);
+				_la = _input.LA(1);
+				while (_la==IMPORT) {
+					{
+					{
+					setState(42);
+					importStatement();
+					}
+					}
+					setState(47);
+					_errHandler.sync(this);
+					_la = _input.LA(1);
+				}
+				setState(48);
+				interfaceStatement();
+				}
+				break;
+			default:
+				throw new NoViableAltException(this);
+			}
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class PackageStatementContext extends ParserRuleContext {
+		public TerminalNode PACKAGE() { return getToken(AidlParser.PACKAGE, 0); }
+		public NameContext name() {
+			return getRuleContext(NameContext.class,0);
+		}
+		public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
+		public PackageStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_packageStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterPackageStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitPackageStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitPackageStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final PackageStatementContext packageStatement() throws RecognitionException {
+		PackageStatementContext _localctx = new PackageStatementContext(_ctx, getState());
+		enterRule(_localctx, 2, RULE_packageStatement);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(51);
+			match(PACKAGE);
+			setState(52);
+			name();
+			setState(53);
+			match(SE);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ParcelableStatementContext extends ParserRuleContext {
+		public TerminalNode PARCELABLE() { return getToken(AidlParser.PARCELABLE, 0); }
+		public IdContext id() {
+			return getRuleContext(IdContext.class,0);
+		}
+		public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
+		public ParcelableStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_parcelableStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParcelableStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParcelableStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParcelableStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ParcelableStatementContext parcelableStatement() throws RecognitionException {
+		ParcelableStatementContext _localctx = new ParcelableStatementContext(_ctx, getState());
+		enterRule(_localctx, 4, RULE_parcelableStatement);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(55);
+			match(PARCELABLE);
+			setState(56);
+			id();
+			setState(57);
+			match(SE);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ImportStatementContext extends ParserRuleContext {
+		public TerminalNode IMPORT() { return getToken(AidlParser.IMPORT, 0); }
+		public PathContext path() {
+			return getRuleContext(PathContext.class,0);
+		}
+		public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
+		public ImportStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_importStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterImportStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitImportStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitImportStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ImportStatementContext importStatement() throws RecognitionException {
+		ImportStatementContext _localctx = new ImportStatementContext(_ctx, getState());
+		enterRule(_localctx, 6, RULE_importStatement);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(59);
+			match(IMPORT);
+			setState(60);
+			path();
+			setState(61);
+			match(SE);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class InterfaceStatementContext extends ParserRuleContext {
+		public TerminalNode INTERFACE() { return getToken(AidlParser.INTERFACE, 0); }
+		public IdContext id() {
+			return getRuleContext(IdContext.class,0);
+		}
+		public TerminalNode LC() { return getToken(AidlParser.LC, 0); }
+		public TerminalNode RC() { return getToken(AidlParser.RC, 0); }
+		public TerminalNode ONEWAY() { return getToken(AidlParser.ONEWAY, 0); }
+		public List<InterfaceSubStatementContext> interfaceSubStatement() {
+			return getRuleContexts(InterfaceSubStatementContext.class);
+		}
+		public InterfaceSubStatementContext interfaceSubStatement(int i) {
+			return getRuleContext(InterfaceSubStatementContext.class,i);
+		}
+		public InterfaceStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_interfaceStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterInterfaceStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitInterfaceStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitInterfaceStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final InterfaceStatementContext interfaceStatement() throws RecognitionException {
+		InterfaceStatementContext _localctx = new InterfaceStatementContext(_ctx, getState());
+		enterRule(_localctx, 8, RULE_interfaceStatement);
+		int _la;
+		try {
+			int _alt;
+			enterOuterAlt(_localctx, 1);
+			{
+			oneway = 0;
+			setState(66);
+			_errHandler.sync(this);
+			_la = _input.LA(1);
+			if (_la==ONEWAY) {
+				{
+				setState(64);
+				match(ONEWAY);
+				oneway = 1;
+				}
+			}
+
+			setState(68);
+			match(INTERFACE);
+			setState(69);
+			id();
+			setState(70);
+			match(LC);
+			setState(74);
+			_errHandler.sync(this);
+			_alt = getInterpreter().adaptivePredict(_input,3,_ctx);
+			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+				if ( _alt==1 ) {
+					{
+					{
+					setState(71);
+					interfaceSubStatement();
+					}
+					} 
+				}
+				setState(76);
+				_errHandler.sync(this);
+				_alt = getInterpreter().adaptivePredict(_input,3,_ctx);
+			}
+			setState(77);
+			match(RC);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class InterfaceSubStatementContext extends ParserRuleContext {
+		public MethodStatementContext methodStatement() {
+			return getRuleContext(MethodStatementContext.class,0);
+		}
+		public ConstStatementContext constStatement() {
+			return getRuleContext(ConstStatementContext.class,0);
+		}
+		public InterfaceSubStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_interfaceSubStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterInterfaceSubStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitInterfaceSubStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitInterfaceSubStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final InterfaceSubStatementContext interfaceSubStatement() throws RecognitionException {
+		InterfaceSubStatementContext _localctx = new InterfaceSubStatementContext(_ctx, getState());
+		enterRule(_localctx, 10, RULE_interfaceSubStatement);
+		try {
+			setState(81);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
+			case 1:
+				enterOuterAlt(_localctx, 1);
+				{
+				setState(79);
+				methodStatement();
+				}
+				break;
+			case 2:
+				enterOuterAlt(_localctx, 2);
+				{
+				setState(80);
+				constStatement();
+				}
+				break;
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class MethodStatementContext extends ParserRuleContext {
+		public MethodReturnTypeContext methodReturnType() {
+			return getRuleContext(MethodReturnTypeContext.class,0);
+		}
+		public IdContext id() {
+			return getRuleContext(IdContext.class,0);
+		}
+		public TerminalNode LP() { return getToken(AidlParser.LP, 0); }
+		public TerminalNode RP() { return getToken(AidlParser.RP, 0); }
+		public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
+		public TerminalNode ONEWAY() { return getToken(AidlParser.ONEWAY, 0); }
+		public ParamListContext paramList() {
+			return getRuleContext(ParamListContext.class,0);
+		}
+		public TerminalNode EQ() { return getToken(AidlParser.EQ, 0); }
+		public TerminalNode INT() { return getToken(AidlParser.INT, 0); }
+		public MethodStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_methodStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterMethodStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitMethodStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitMethodStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final MethodStatementContext methodStatement() throws RecognitionException {
+		MethodStatementContext _localctx = new MethodStatementContext(_ctx, getState());
+		enterRule(_localctx, 12, RULE_methodStatement);
+		int _la;
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			oneway &= 1;
+			setState(86);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
+			case 1:
+				{
+				setState(84);
+				match(ONEWAY);
+				oneway |= 2;
+				}
+				break;
+			}
+			setState(88);
+			methodReturnType();
+			setState(89);
+			id();
+			setState(90);
+			match(LP);
+			setState(92);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
+			case 1:
+				{
+				setState(91);
+				paramList();
+				}
+				break;
+			}
+			setState(94);
+			match(RP);
+			setState(97);
+			_errHandler.sync(this);
+			_la = _input.LA(1);
+			if (_la==EQ) {
+				{
+				setState(95);
+				match(EQ);
+				setState(96);
+				match(INT);
+				}
+			}
+
+			setState(99);
+			match(SE);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ConstStatementContext extends ParserRuleContext {
+		public TerminalNode CONST() { return getToken(AidlParser.CONST, 0); }
+		public TerminalNode INT() { return getToken(AidlParser.INT, 0); }
+		public IdContext id() {
+			return getRuleContext(IdContext.class,0);
+		}
+		public TerminalNode EQ() { return getToken(AidlParser.EQ, 0); }
+		public TerminalNode INTEGER() { return getToken(AidlParser.INTEGER, 0); }
+		public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
+		public TerminalNode STRING() { return getToken(AidlParser.STRING, 0); }
+		public TerminalNode LITERALSTRING() { return getToken(AidlParser.LITERALSTRING, 0); }
+		public ConstStatementContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_constStatement; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterConstStatement(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitConstStatement(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitConstStatement(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ConstStatementContext constStatement() throws RecognitionException {
+		ConstStatementContext _localctx = new ConstStatementContext(_ctx, getState());
+		enterRule(_localctx, 14, RULE_constStatement);
+		try {
+			setState(115);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
+			case 1:
+				enterOuterAlt(_localctx, 1);
+				{
+				setState(101);
+				match(CONST);
+				setState(102);
+				match(INT);
+				setState(103);
+				id();
+				setState(104);
+				match(EQ);
+				setState(105);
+				match(INTEGER);
+				setState(106);
+				match(SE);
+				}
+				break;
+			case 2:
+				enterOuterAlt(_localctx, 2);
+				{
+				setState(108);
+				match(CONST);
+				setState(109);
+				match(STRING);
+				setState(110);
+				id();
+				setState(111);
+				match(EQ);
+				setState(112);
+				match(LITERALSTRING);
+				setState(113);
+				match(SE);
+				}
+				break;
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class MethodReturnTypeContext extends ParserRuleContext {
+		public TypeContext type() {
+			return getRuleContext(TypeContext.class,0);
+		}
+		public TerminalNode NULLABLE() { return getToken(AidlParser.NULLABLE, 0); }
+		public TerminalNode VOID() { return getToken(AidlParser.VOID, 0); }
+		public MethodReturnTypeContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_methodReturnType; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterMethodReturnType(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitMethodReturnType(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitMethodReturnType(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final MethodReturnTypeContext methodReturnType() throws RecognitionException {
+		MethodReturnTypeContext _localctx = new MethodReturnTypeContext(_ctx, getState());
+		enterRule(_localctx, 16, RULE_methodReturnType);
+		int _la;
+		try {
+			setState(123);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
+			case 1:
+				enterOuterAlt(_localctx, 1);
+				{
+				setState(117);
+				if (!(oneway==0)) throw new FailedPredicateException(this, "oneway==0");
+				{
+				setState(119);
+				_errHandler.sync(this);
+				_la = _input.LA(1);
+				if (_la==NULLABLE) {
+					{
+					setState(118);
+					match(NULLABLE);
+					}
+				}
+
+				setState(121);
+				type();
+				}
+				}
+				break;
+			case 2:
+				enterOuterAlt(_localctx, 2);
+				{
+				setState(122);
+				match(VOID);
+				}
+				break;
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ParamListContext extends ParserRuleContext {
+		public List<ParamContext> param() {
+			return getRuleContexts(ParamContext.class);
+		}
+		public ParamContext param(int i) {
+			return getRuleContext(ParamContext.class,i);
+		}
+		public List<TerminalNode> CO() { return getTokens(AidlParser.CO); }
+		public TerminalNode CO(int i) {
+			return getToken(AidlParser.CO, i);
+		}
+		public ParamListContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_paramList; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParamList(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParamList(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParamList(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ParamListContext paramList() throws RecognitionException {
+		ParamListContext _localctx = new ParamListContext(_ctx, getState());
+		enterRule(_localctx, 18, RULE_paramList);
+		int _la;
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(125);
+			param();
+			setState(130);
+			_errHandler.sync(this);
+			_la = _input.LA(1);
+			while (_la==CO) {
+				{
+				{
+				setState(126);
+				match(CO);
+				setState(127);
+				param();
+				}
+				}
+				setState(132);
+				_errHandler.sync(this);
+				_la = _input.LA(1);
+			}
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ParamContext extends ParserRuleContext {
+		public ParamTagContext paramTag;
+		public ParamTypeContext paramType() {
+			return getRuleContext(ParamTypeContext.class,0);
+		}
+		public IdContext id() {
+			return getRuleContext(IdContext.class,0);
+		}
+		public TerminalNode NULLABLE() { return getToken(AidlParser.NULLABLE, 0); }
+		public ParamTagContext paramTag() {
+			return getRuleContext(ParamTagContext.class,0);
+		}
+		public ParamContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_param; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParam(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParam(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParam(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ParamContext param() throws RecognitionException {
+		ParamContext _localctx = new ParamContext(_ctx, getState());
+		enterRule(_localctx, 20, RULE_param);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(134);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
+			case 1:
+				{
+				setState(133);
+				match(NULLABLE);
+				}
+				break;
+			}
+			setState(137);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
+			case 1:
+				{
+				setState(136);
+				((ParamContext)_localctx).paramTag = paramTag();
+				}
+				break;
+			}
+			setState(139);
+			paramType((((ParamContext)_localctx).paramTag!=null?_input.getText(((ParamContext)_localctx).paramTag.start,((ParamContext)_localctx).paramTag.stop):null));
+			setState(140);
+			id();
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ParamTagContext extends ParserRuleContext {
+		public TerminalNode IN() { return getToken(AidlParser.IN, 0); }
+		public TerminalNode OUT() { return getToken(AidlParser.OUT, 0); }
+		public TerminalNode INOUT() { return getToken(AidlParser.INOUT, 0); }
+		public ParamTagContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_paramTag; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParamTag(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParamTag(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParamTag(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ParamTagContext paramTag() throws RecognitionException {
+		ParamTagContext _localctx = new ParamTagContext(_ctx, getState());
+		enterRule(_localctx, 22, RULE_paramTag);
+		int _la;
+		try {
+			setState(145);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
+			case 1:
+				enterOuterAlt(_localctx, 1);
+				{
+				setState(142);
+				match(IN);
+				}
+				break;
+			case 2:
+				enterOuterAlt(_localctx, 2);
+				{
+				setState(143);
+				if (!(oneway==0)) throw new FailedPredicateException(this, "oneway==0");
+				setState(144);
+				_la = _input.LA(1);
+				if ( !(_la==INOUT || _la==OUT) ) {
+				_errHandler.recoverInline(this);
+				}
+				else {
+					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+					_errHandler.reportMatch(this);
+					consume();
+				}
+				}
+				break;
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ParamTypeContext extends ParserRuleContext {
+		public String tag;
+		public int tid = 0;
+		public TypeContext type;
+		public TerminalNode PRIMITIVE() { return getToken(AidlParser.PRIMITIVE, 0); }
+		public TerminalNode STRING() { return getToken(AidlParser.STRING, 0); }
+		public InterfaceNameContext interfaceName() {
+			return getRuleContext(InterfaceNameContext.class,0);
+		}
+		public TerminalNode MAP() { return getToken(AidlParser.MAP, 0); }
+		public TerminalNode CHARSEQUENCE() { return getToken(AidlParser.CHARSEQUENCE, 0); }
+		public ListContext list() {
+			return getRuleContext(ListContext.class,0);
+		}
+		public ClassNameContext className() {
+			return getRuleContext(ClassNameContext.class,0);
+		}
+		public TypeContext type() {
+			return getRuleContext(TypeContext.class,0);
+		}
+		public TerminalNode LB() { return getToken(AidlParser.LB, 0); }
+		public TerminalNode RB() { return getToken(AidlParser.RB, 0); }
+		public NameContext name() {
+			return getRuleContext(NameContext.class,0);
+		}
+		public ParamTypeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); }
+		public ParamTypeContext(ParserRuleContext parent, int invokingState, String tag) {
+			super(parent, invokingState);
+			this.tag = tag;
+		}
+		@Override public int getRuleIndex() { return RULE_paramType; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParamType(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParamType(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParamType(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ParamTypeContext paramType(String tag) throws RecognitionException {
+		ParamTypeContext _localctx = new ParamTypeContext(_ctx, getState(), tag);
+		enterRule(_localctx, 24, RULE_paramType);
+		try {
+			setState(178);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
+			case 1:
+				enterOuterAlt(_localctx, 1);
+				{
+				setState(147);
+				if (!(_localctx.tag==null)) throw new FailedPredicateException(this, "$tag==null");
+				{
+				setState(153);
+				_errHandler.sync(this);
+				switch (_input.LA(1)) {
+				case PRIMITIVE:
+					{
+					setState(148);
+					match(PRIMITIVE);
+					}
+					break;
+				case STRING:
+					{
+					setState(149);
+					match(STRING);
+					}
+					break;
+				case IBINDER:
+				case PATH:
+				case ID:
+					{
+					setState(150);
+					interfaceName();
+					((ParamTypeContext)_localctx).tid =  1;
+					}
+					break;
+				default:
+					throw new NoViableAltException(this);
+				}
+				}
+				}
+				break;
+			case 2:
+				enterOuterAlt(_localctx, 2);
+				{
+				setState(155);
+				if (!(_localctx.tag!=null)) throw new FailedPredicateException(this, "$tag!=null");
+				setState(176);
+				_errHandler.sync(this);
+				switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
+				case 1:
+					{
+					setState(156);
+					match(MAP);
+					}
+					break;
+				case 2:
+					{
+					setState(157);
+					match(CHARSEQUENCE);
+					}
+					break;
+				case 3:
+					{
+					setState(158);
+					list();
+					}
+					break;
+				case 4:
+					{
+					setState(165);
+					_errHandler.sync(this);
+					switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
+					case 1:
+						{
+						setState(159);
+						name();
+						((ParamTypeContext)_localctx).tid =  -1;
+						}
+						break;
+					case 2:
+						{
+						setState(162);
+						((ParamTypeContext)_localctx).type = type();
+						((ParamTypeContext)_localctx).tid =  ((ParamTypeContext)_localctx).type.tid;
+						}
+						break;
+					}
+					setState(167);
+					if (!(_localctx.tag.equals("in"))) throw new FailedPredicateException(this, "$tag.equals(\"in\")");
+					}
+					break;
+				case 5:
+					{
+					setState(169);
+					className();
+					((ParamTypeContext)_localctx).tid =  2;
+					}
+					break;
+				case 6:
+					{
+					setState(172);
+					((ParamTypeContext)_localctx).type = type();
+					setState(173);
+					match(LB);
+					setState(174);
+					match(RB);
+					}
+					break;
+				}
+				}
+				break;
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class TypeContext extends ParserRuleContext {
+		public int tid = 0;
+		public TerminalNode PRIMITIVE() { return getToken(AidlParser.PRIMITIVE, 0); }
+		public TerminalNode STRING() { return getToken(AidlParser.STRING, 0); }
+		public TerminalNode CHARSEQUENCE() { return getToken(AidlParser.CHARSEQUENCE, 0); }
+		public TerminalNode MAP() { return getToken(AidlParser.MAP, 0); }
+		public ListContext list() {
+			return getRuleContext(ListContext.class,0);
+		}
+		public ClassNameContext className() {
+			return getRuleContext(ClassNameContext.class,0);
+		}
+		public List<TerminalNode> LB() { return getTokens(AidlParser.LB); }
+		public TerminalNode LB(int i) {
+			return getToken(AidlParser.LB, i);
+		}
+		public List<TerminalNode> RB() { return getTokens(AidlParser.RB); }
+		public TerminalNode RB(int i) {
+			return getToken(AidlParser.RB, i);
+		}
+		public TypeContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_type; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterType(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitType(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitType(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final TypeContext type() throws RecognitionException {
+		TypeContext _localctx = new TypeContext(_ctx, getState());
+		enterRule(_localctx, 26, RULE_type);
+		try {
+			int _alt;
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(188);
+			_errHandler.sync(this);
+			switch (_input.LA(1)) {
+			case PRIMITIVE:
+				{
+				setState(180);
+				match(PRIMITIVE);
+				}
+				break;
+			case STRING:
+				{
+				setState(181);
+				match(STRING);
+				}
+				break;
+			case CHARSEQUENCE:
+				{
+				setState(182);
+				match(CHARSEQUENCE);
+				}
+				break;
+			case MAP:
+				{
+				setState(183);
+				match(MAP);
+				}
+				break;
+			case LIST:
+				{
+				setState(184);
+				list();
+				}
+				break;
+			case PATH:
+			case ID:
+				{
+				setState(185);
+				className();
+				((TypeContext)_localctx).tid =  2;
+				}
+				break;
+			default:
+				throw new NoViableAltException(this);
+			}
+			setState(194);
+			_errHandler.sync(this);
+			_alt = getInterpreter().adaptivePredict(_input,20,_ctx);
+			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+				if ( _alt==1 ) {
+					{
+					{
+					setState(190);
+					match(LB);
+					setState(191);
+					match(RB);
+					}
+					} 
+				}
+				setState(196);
+				_errHandler.sync(this);
+				_alt = getInterpreter().adaptivePredict(_input,20,_ctx);
+			}
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ListContext extends ParserRuleContext {
+		public TerminalNode LIST() { return getToken(AidlParser.LIST, 0); }
+		public TerminalNode LA() { return getToken(AidlParser.LA, 0); }
+		public TypeContext type() {
+			return getRuleContext(TypeContext.class,0);
+		}
+		public TerminalNode RA() { return getToken(AidlParser.RA, 0); }
+		public ListContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_list; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterList(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitList(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitList(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ListContext list() throws RecognitionException {
+		ListContext _localctx = new ListContext(_ctx, getState());
+		enterRule(_localctx, 28, RULE_list);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(197);
+			match(LIST);
+			setState(202);
+			_errHandler.sync(this);
+			switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) {
+			case 1:
+				{
+				setState(198);
+				match(LA);
+				setState(199);
+				type();
+				setState(200);
+				match(RA);
+				}
+				break;
+			}
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class InterfaceNameContext extends ParserRuleContext {
+		public TerminalNode IBINDER() { return getToken(AidlParser.IBINDER, 0); }
+		public NameContext name() {
+			return getRuleContext(NameContext.class,0);
+		}
+		public InterfaceNameContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_interfaceName; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterInterfaceName(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitInterfaceName(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitInterfaceName(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final InterfaceNameContext interfaceName() throws RecognitionException {
+		InterfaceNameContext _localctx = new InterfaceNameContext(_ctx, getState());
+		enterRule(_localctx, 30, RULE_interfaceName);
+		try {
+			setState(206);
+			_errHandler.sync(this);
+			switch (_input.LA(1)) {
+			case IBINDER:
+				enterOuterAlt(_localctx, 1);
+				{
+				setState(204);
+				match(IBINDER);
+				}
+				break;
+			case PATH:
+			case ID:
+				enterOuterAlt(_localctx, 2);
+				{
+				setState(205);
+				name();
+				}
+				break;
+			default:
+				throw new NoViableAltException(this);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class ClassNameContext extends ParserRuleContext {
+		public NameContext name() {
+			return getRuleContext(NameContext.class,0);
+		}
+		public ClassNameContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_className; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterClassName(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitClassName(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitClassName(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final ClassNameContext className() throws RecognitionException {
+		ClassNameContext _localctx = new ClassNameContext(_ctx, getState());
+		enterRule(_localctx, 32, RULE_className);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(208);
+			name();
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class NameContext extends ParserRuleContext {
+		public TerminalNode ID() { return getToken(AidlParser.ID, 0); }
+		public TerminalNode PATH() { return getToken(AidlParser.PATH, 0); }
+		public NameContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_name; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterName(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitName(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitName(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final NameContext name() throws RecognitionException {
+		NameContext _localctx = new NameContext(_ctx, getState());
+		enterRule(_localctx, 34, RULE_name);
+		int _la;
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(210);
+			_la = _input.LA(1);
+			if ( !(_la==PATH || _la==ID) ) {
+			_errHandler.recoverInline(this);
+			}
+			else {
+				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+				_errHandler.reportMatch(this);
+				consume();
+			}
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class PathContext extends ParserRuleContext {
+		public TerminalNode PATH() { return getToken(AidlParser.PATH, 0); }
+		public PathContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_path; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterPath(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitPath(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitPath(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final PathContext path() throws RecognitionException {
+		PathContext _localctx = new PathContext(_ctx, getState());
+		enterRule(_localctx, 36, RULE_path);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(212);
+			match(PATH);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public static class IdContext extends ParserRuleContext {
+		public TerminalNode ID() { return getToken(AidlParser.ID, 0); }
+		public IdContext(ParserRuleContext parent, int invokingState) {
+			super(parent, invokingState);
+		}
+		@Override public int getRuleIndex() { return RULE_id; }
+		@Override
+		public void enterRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).enterId(this);
+		}
+		@Override
+		public void exitRule(ParseTreeListener listener) {
+			if ( listener instanceof AidlListener ) ((AidlListener)listener).exitId(this);
+		}
+		@Override
+		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
+			if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitId(this);
+			else return visitor.visitChildren(this);
+		}
+	}
+
+	public final IdContext id() throws RecognitionException {
+		IdContext _localctx = new IdContext(_ctx, getState());
+		enterRule(_localctx, 38, RULE_id);
+		try {
+			enterOuterAlt(_localctx, 1);
+			{
+			setState(214);
+			match(ID);
+			}
+		}
+		catch (RecognitionException re) {
+			_localctx.exception = re;
+			_errHandler.reportError(this, re);
+			_errHandler.recover(this, re);
+		}
+		finally {
+			exitRule();
+		}
+		return _localctx;
+	}
+
+	public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
+		switch (ruleIndex) {
+		case 8:
+			return methodReturnType_sempred((MethodReturnTypeContext)_localctx, predIndex);
+		case 11:
+			return paramTag_sempred((ParamTagContext)_localctx, predIndex);
+		case 12:
+			return paramType_sempred((ParamTypeContext)_localctx, predIndex);
+		}
+		return true;
+	}
+	private boolean methodReturnType_sempred(MethodReturnTypeContext _localctx, int predIndex) {
+		switch (predIndex) {
+		case 0:
+			return oneway==0;
+		}
+		return true;
+	}
+	private boolean paramTag_sempred(ParamTagContext _localctx, int predIndex) {
+		switch (predIndex) {
+		case 1:
+			return oneway==0;
+		}
+		return true;
+	}
+	private boolean paramType_sempred(ParamTypeContext _localctx, int predIndex) {
+		switch (predIndex) {
+		case 2:
+			return _localctx.tag==null;
+		case 3:
+			return _localctx.tag!=null;
+		case 4:
+			return _localctx.tag.equals("in");
+		}
+		return true;
+	}
+
+	public static final String _serializedATN =
+		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3.\u00db\4\2\t\2\4"+
+		"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
+		"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
+		"\4\23\t\23\4\24\t\24\4\25\t\25\3\2\3\2\3\2\7\2.\n\2\f\2\16\2\61\13\2\3"+
+		"\2\5\2\64\n\2\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6"+
+		"\3\6\5\6E\n\6\3\6\3\6\3\6\3\6\7\6K\n\6\f\6\16\6N\13\6\3\6\3\6\3\7\3\7"+
+		"\5\7T\n\7\3\b\3\b\3\b\5\bY\n\b\3\b\3\b\3\b\3\b\5\b_\n\b\3\b\3\b\3\b\5"+
+		"\bd\n\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+
+		"\t\5\tv\n\t\3\n\3\n\5\nz\n\n\3\n\3\n\5\n~\n\n\3\13\3\13\3\13\7\13\u0083"+
+		"\n\13\f\13\16\13\u0086\13\13\3\f\5\f\u0089\n\f\3\f\5\f\u008c\n\f\3\f\3"+
+		"\f\3\f\3\r\3\r\3\r\5\r\u0094\n\r\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u009c"+
+		"\n\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00a8\n\16"+
+		"\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00b3\n\16\5\16\u00b5"+
+		"\n\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\5\17\u00bf\n\17\3\17\3\17"+
+		"\7\17\u00c3\n\17\f\17\16\17\u00c6\13\17\3\20\3\20\3\20\3\20\3\20\5\20"+
+		"\u00cd\n\20\3\21\3\21\5\21\u00d1\n\21\3\22\3\22\3\23\3\23\3\24\3\24\3"+
+		"\25\3\25\3\25\2\2\26\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(\2\4"+
+		"\4\2\24\24\26\26\3\2()\2\u00e6\2*\3\2\2\2\4\65\3\2\2\2\69\3\2\2\2\b=\3"+
+		"\2\2\2\nA\3\2\2\2\fS\3\2\2\2\16U\3\2\2\2\20u\3\2\2\2\22}\3\2\2\2\24\177"+
+		"\3\2\2\2\26\u0088\3\2\2\2\30\u0093\3\2\2\2\32\u00b4\3\2\2\2\34\u00be\3"+
+		"\2\2\2\36\u00c7\3\2\2\2 \u00d0\3\2\2\2\"\u00d2\3\2\2\2$\u00d4\3\2\2\2"+
+		"&\u00d6\3\2\2\2(\u00d8\3\2\2\2*\63\5\4\3\2+\64\5\6\4\2,.\5\b\5\2-,\3\2"+
+		"\2\2.\61\3\2\2\2/-\3\2\2\2/\60\3\2\2\2\60\62\3\2\2\2\61/\3\2\2\2\62\64"+
+		"\5\n\6\2\63+\3\2\2\2\63/\3\2\2\2\64\3\3\2\2\2\65\66\7\f\2\2\66\67\5$\23"+
+		"\2\678\7&\2\28\5\3\2\2\29:\7\r\2\2:;\5(\25\2;<\7&\2\2<\7\3\2\2\2=>\7\16"+
+		"\2\2>?\5&\24\2?@\7&\2\2@\t\3\2\2\2AD\b\6\1\2BC\7\20\2\2CE\b\6\1\2DB\3"+
+		"\2\2\2DE\3\2\2\2EF\3\2\2\2FG\7\17\2\2GH\5(\25\2HL\7\36\2\2IK\5\f\7\2J"+
+		"I\3\2\2\2KN\3\2\2\2LJ\3\2\2\2LM\3\2\2\2MO\3\2\2\2NL\3\2\2\2OP\7\37\2\2"+
+		"P\13\3\2\2\2QT\5\16\b\2RT\5\20\t\2SQ\3\2\2\2SR\3\2\2\2T\r\3\2\2\2UX\b"+
+		"\b\1\2VW\7\20\2\2WY\b\b\1\2XV\3\2\2\2XY\3\2\2\2YZ\3\2\2\2Z[\5\22\n\2["+
+		"\\\5(\25\2\\^\7\34\2\2]_\5\24\13\2^]\3\2\2\2^_\3\2\2\2_`\3\2\2\2`c\7\35"+
+		"\2\2ab\7\'\2\2bd\7\6\2\2ca\3\2\2\2cd\3\2\2\2de\3\2\2\2ef\7&\2\2f\17\3"+
+		"\2\2\2gh\7\22\2\2hi\7\6\2\2ij\5(\25\2jk\7\'\2\2kl\7*\2\2lm\7&\2\2mv\3"+
+		"\2\2\2no\7\22\2\2op\7\27\2\2pq\5(\25\2qr\7\'\2\2rs\7+\2\2st\7&\2\2tv\3"+
+		"\2\2\2ug\3\2\2\2un\3\2\2\2v\21\3\2\2\2wy\6\n\2\2xz\7\23\2\2yx\3\2\2\2"+
+		"yz\3\2\2\2z{\3\2\2\2{~\5\34\17\2|~\7\21\2\2}w\3\2\2\2}|\3\2\2\2~\23\3"+
+		"\2\2\2\177\u0084\5\26\f\2\u0080\u0081\7%\2\2\u0081\u0083\5\26\f\2\u0082"+
+		"\u0080\3\2\2\2\u0083\u0086\3\2\2\2\u0084\u0082\3\2\2\2\u0084\u0085\3\2"+
+		"\2\2\u0085\25\3\2\2\2\u0086\u0084\3\2\2\2\u0087\u0089\7\23\2\2\u0088\u0087"+
+		"\3\2\2\2\u0088\u0089\3\2\2\2\u0089\u008b\3\2\2\2\u008a\u008c\5\30\r\2"+
+		"\u008b\u008a\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e"+
+		"\5\32\16\2\u008e\u008f\5(\25\2\u008f\27\3\2\2\2\u0090\u0094\7\25\2\2\u0091"+
+		"\u0092\6\r\3\2\u0092\u0094\t\2\2\2\u0093\u0090\3\2\2\2\u0093\u0091\3\2"+
+		"\2\2\u0094\31\3\2\2\2\u0095\u009b\6\16\4\3\u0096\u009c\7\3\2\2\u0097\u009c"+
+		"\7\27\2\2\u0098\u0099\5 \21\2\u0099\u009a\b\16\1\2\u009a\u009c\3\2\2\2"+
+		"\u009b\u0096\3\2\2\2\u009b\u0097\3\2\2\2\u009b\u0098\3\2\2\2\u009c\u00b5"+
+		"\3\2\2\2\u009d\u00b2\6\16\5\3\u009e\u00b3\7\31\2\2\u009f\u00b3\7\30\2"+
+		"\2\u00a0\u00b3\5\36\20\2\u00a1\u00a2\5$\23\2\u00a2\u00a3\b\16\1\2\u00a3"+
+		"\u00a8\3\2\2\2\u00a4\u00a5\5\34\17\2\u00a5\u00a6\b\16\1\2\u00a6\u00a8"+
+		"\3\2\2\2\u00a7\u00a1\3\2\2\2\u00a7\u00a4\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9"+
+		"\u00aa\6\16\6\3\u00aa\u00b3\3\2\2\2\u00ab\u00ac\5\"\22\2\u00ac\u00ad\b"+
+		"\16\1\2\u00ad\u00b3\3\2\2\2\u00ae\u00af\5\34\17\2\u00af\u00b0\7 \2\2\u00b0"+
+		"\u00b1\7!\2\2\u00b1\u00b3\3\2\2\2\u00b2\u009e\3\2\2\2\u00b2\u009f\3\2"+
+		"\2\2\u00b2\u00a0\3\2\2\2\u00b2\u00a7\3\2\2\2\u00b2\u00ab\3\2\2\2\u00b2"+
+		"\u00ae\3\2\2\2\u00b3\u00b5\3\2\2\2\u00b4\u0095\3\2\2\2\u00b4\u009d\3\2"+
+		"\2\2\u00b5\33\3\2\2\2\u00b6\u00bf\7\3\2\2\u00b7\u00bf\7\27\2\2\u00b8\u00bf"+
+		"\7\30\2\2\u00b9\u00bf\7\31\2\2\u00ba\u00bf\5\36\20\2\u00bb\u00bc\5\"\22"+
+		"\2\u00bc\u00bd\b\17\1\2\u00bd\u00bf\3\2\2\2\u00be\u00b6\3\2\2\2\u00be"+
+		"\u00b7\3\2\2\2\u00be\u00b8\3\2\2\2\u00be\u00b9\3\2\2\2\u00be\u00ba\3\2"+
+		"\2\2\u00be\u00bb\3\2\2\2\u00bf\u00c4\3\2\2\2\u00c0\u00c1\7 \2\2\u00c1"+
+		"\u00c3\7!\2\2\u00c2\u00c0\3\2\2\2\u00c3\u00c6\3\2\2\2\u00c4\u00c2\3\2"+
+		"\2\2\u00c4\u00c5\3\2\2\2\u00c5\35\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00cc"+
+		"\7\32\2\2\u00c8\u00c9\7\"\2\2\u00c9\u00ca\5\34\17\2\u00ca\u00cb\7#\2\2"+
+		"\u00cb\u00cd\3\2\2\2\u00cc\u00c8\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\37"+
+		"\3\2\2\2\u00ce\u00d1\7\33\2\2\u00cf\u00d1\5$\23\2\u00d0\u00ce\3\2\2\2"+
+		"\u00d0\u00cf\3\2\2\2\u00d1!\3\2\2\2\u00d2\u00d3\5$\23\2\u00d3#\3\2\2\2"+
+		"\u00d4\u00d5\t\3\2\2\u00d5%\3\2\2\2\u00d6\u00d7\7(\2\2\u00d7\'\3\2\2\2"+
+		"\u00d8\u00d9\7)\2\2\u00d9)\3\2\2\2\31/\63DLSX^cuy}\u0084\u0088\u008b\u0093"+
+		"\u009b\u00a7\u00b2\u00b4\u00be\u00c4\u00cc\u00d0";
+	public static final ATN _ATN =
+		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+	static {
+		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+		}
+	}
+}

+ 133 - 0
antlr/aidl/AidlVisitor.java

@@ -0,0 +1,133 @@
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
+package antlr.aidl;
+import org.antlr.v4.runtime.tree.ParseTreeVisitor;
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by {@link AidlParser}.
+ *
+ * @param <T> The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public interface AidlVisitor<T> extends ParseTreeVisitor<T> {
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#aidl}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitAidl(AidlParser.AidlContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#packageStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitPackageStatement(AidlParser.PackageStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#parcelableStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitParcelableStatement(AidlParser.ParcelableStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#importStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitImportStatement(AidlParser.ImportStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#interfaceStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitInterfaceStatement(AidlParser.InterfaceStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#interfaceSubStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitInterfaceSubStatement(AidlParser.InterfaceSubStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#methodStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitMethodStatement(AidlParser.MethodStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#constStatement}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitConstStatement(AidlParser.ConstStatementContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#methodReturnType}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitMethodReturnType(AidlParser.MethodReturnTypeContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#paramList}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitParamList(AidlParser.ParamListContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#param}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitParam(AidlParser.ParamContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#paramTag}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitParamTag(AidlParser.ParamTagContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#paramType}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitParamType(AidlParser.ParamTypeContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#type}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitType(AidlParser.TypeContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#list}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitList(AidlParser.ListContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#interfaceName}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitInterfaceName(AidlParser.InterfaceNameContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#className}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitClassName(AidlParser.ClassNameContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#name}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitName(AidlParser.NameContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#path}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitPath(AidlParser.PathContext ctx);
+	/**
+	 * Visit a parse tree produced by {@link AidlParser#id}.
+	 * @param ctx the parse tree
+	 * @return the visitor result
+	 */
+	T visitId(AidlParser.IdContext ctx);
+}

+ 79 - 0
antlr/aidl/tools/AidlLoader.java

@@ -0,0 +1,79 @@
+package antlr.aidl.tools;
+
+import java.util.*;
+import antlr.aidl.*;
+import tools.MapToJson;
+
+public class AidlLoader extends AidlBaseListener
+{
+    String name;
+    String type;
+    ArrayList<String> imports = new ArrayList<>();
+
+    ArrayList<Map<String, Object>> statements = new ArrayList<>();
+
+    public String getName() {
+        return name;
+    }
+
+    public String toJson() {
+        Map<String, Object> map = new HashMap<>();
+        map.put("name", name);
+        map.put("type", type);
+        map.put("imports", imports);
+        map.put("statements", statements);
+        MapToJson mapToJson = new MapToJson(map);
+        return mapToJson.toJson();
+    }
+
+    @Override
+    public void enterAidl(AidlParser.AidlContext ctx) {
+        if (ctx.parcelableStatement() != null) {
+            name = ctx.parcelableStatement().id().getText();
+            type = "parcelable";
+        } else {
+            name = ctx.interfaceStatement().id().getText();
+            type = "interface";
+            for (AidlParser.ImportStatementContext i : ctx.importStatement()) {
+                imports.add(i.path().getText());
+            }
+        }
+    }
+
+    @Override
+    public void enterMethodStatement(AidlParser.MethodStatementContext ctx) {
+        Map<String, Object> statement = new HashMap<>();
+        statement.put("type", "method");
+        statement.put("id", ctx.id().getText());
+        statement.put("return", ctx.methodReturnType().getText());
+        if (ctx.paramList() != null) {
+            ArrayList<Map<String, Object>> params = new ArrayList<>();
+            for (AidlParser.ParamContext i : ctx.paramList().param()) {
+                Map<String, Object> param = new HashMap<>();
+                if (i.paramTag() != null) {
+                    param.put("tag", i.paramTag().getText());
+                }
+                param.put("type", i.paramType().getText());
+                param.put("tid", i.paramType().tid);
+                param.put("id", i.id().getText());
+                params.add(param);
+            }
+            statement.put("params", params);
+        }
+        statements.add(statement);
+    }
+
+    @Override
+    public void enterConstStatement(AidlParser.ConstStatementContext ctx) {
+        Map<String, Object> statement = new HashMap<>();
+        statement.put("type", "const");
+        statement.put("id", ctx.id().getText());
+        if (ctx.INT() != null) {
+            statement.put("value", Integer.getInteger(ctx.INTEGER().getText()));
+        } else {
+            String str = ctx.LITERALSTRING().getText();
+            statement.put("value", str.substring(1, str.length()-1));
+        }
+        statements.add(statement);
+    }
+}

+ 4 - 0
foreach.cmd

@@ -0,0 +1,4 @@
+call antlr antlr.aidl.g4
+javac *.java
+set dir="antlr.aidl"
+for /r %dir% %%i in (*.antlr.aidl) do java antlr.AidlToJson "%%i" json

+ 1327 - 0
json/IBluetoothGatt.json

@@ -0,0 +1,1327 @@
+{
+    "imports": [
+        "android.app.PendingIntent",
+        "android.bluetooth.BluetoothDevice",
+        "android.bluetooth.BluetoothGattService",
+        "android.bluetooth.le.AdvertiseSettings",
+        "android.bluetooth.le.AdvertiseData",
+        "android.bluetooth.le.AdvertisingSetParameters",
+        "android.bluetooth.le.PeriodicAdvertisingParameters",
+        "android.bluetooth.le.ScanFilter",
+        "android.bluetooth.le.ScanResult",
+        "android.bluetooth.le.ScanSettings",
+        "android.bluetooth.le.ResultStorageDescriptor",
+        "android.os.ParcelUuid",
+        "android.os.WorkSource",
+        "android.bluetooth.IBluetoothGattCallback",
+        "android.bluetooth.IBluetoothGattServerCallback",
+        "android.bluetooth.le.IAdvertisingSetCallback",
+        "android.bluetooth.le.IPeriodicAdvertisingCallback",
+        "android.bluetooth.le.IScannerCallback"
+    ],
+    "name": "IBluetoothGatt",
+    "statements": [
+        {
+            "id": "getDevicesMatchingConnectionStates",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "states",
+                    "type": "int[]",
+                    "tid": 0
+                }
+            ],
+            "return": "List<BluetoothDevice>"
+        },
+        {
+            "id": "registerScanner",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IScannerCallback",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "workSource",
+                    "type": "WorkSource",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "unregisterScanner",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "scannerId",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "startScan",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "scannerId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "settings",
+                    "type": "ScanSettings",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "filters",
+                    "type": "List<ScanFilter>",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "scanStorages",
+                    "type": "List",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "callingPackage",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "startScanForIntent",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "intent",
+                    "type": "PendingIntent",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "settings",
+                    "type": "ScanSettings",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "filters",
+                    "type": "List<ScanFilter>",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "callingPackage",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "stopScanForIntent",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "intent",
+                    "type": "PendingIntent",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "callingPackage",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "stopScan",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "scannerId",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "flushPendingBatchResults",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "scannerId",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "startAdvertisingSet",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "parameters",
+                    "type": "AdvertisingSetParameters",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "advertiseData",
+                    "type": "AdvertiseData",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "scanResponse",
+                    "type": "AdvertiseData",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "periodicParameters",
+                    "type": "PeriodicAdvertisingParameters",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "periodicData",
+                    "type": "AdvertiseData",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "duration",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "maxExtAdvEvents",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IAdvertisingSetCallback",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "stopAdvertisingSet",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IAdvertisingSetCallback",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "getOwnAddress",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "enableAdvertisingSet",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "enable",
+                    "type": "boolean",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "duration",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "maxExtAdvEvents",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "setAdvertisingData",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "data",
+                    "type": "AdvertiseData",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "setScanResponseData",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "data",
+                    "type": "AdvertiseData",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "setAdvertisingParameters",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "parameters",
+                    "type": "AdvertisingSetParameters",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "setPeriodicAdvertisingParameters",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "parameters",
+                    "type": "PeriodicAdvertisingParameters",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "setPeriodicAdvertisingData",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "data",
+                    "type": "AdvertiseData",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "setPeriodicAdvertisingEnable",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "advertiserId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "enable",
+                    "type": "boolean",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "registerSync",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "scanResult",
+                    "type": "ScanResult",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "skip",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "timeout",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IPeriodicAdvertisingCallback",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "unregisterSync",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IPeriodicAdvertisingCallback",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "registerClient",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "appId",
+                    "type": "ParcelUuid",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IBluetoothGattCallback",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "unregisterClient",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "clientConnect",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "isDirect",
+                    "type": "boolean",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "transport",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "opportunistic",
+                    "type": "boolean",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "phy",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "clientDisconnect",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "clientSetPreferredPhy",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "txPhy",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "rxPhy",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "phyOptions",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "clientReadPhy",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "refreshDevice",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "discoverServices",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "discoverServiceByUuid",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "uuid",
+                    "type": "ParcelUuid",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "readCharacteristic",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "authReq",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "readUsingCharacteristicUuid",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "uuid",
+                    "type": "ParcelUuid",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "startHandle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "endHandle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "authReq",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "writeCharacteristic",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "writeType",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "authReq",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "value",
+                    "type": "byte[]",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "readDescriptor",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "authReq",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "writeDescriptor",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "authReq",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "value",
+                    "type": "byte[]",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "registerForNotification",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "enable",
+                    "type": "boolean",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "beginReliableWrite",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "endReliableWrite",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "execute",
+                    "type": "boolean",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "readRemoteRssi",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "configureMTU",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "mtu",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "connectionParameterUpdate",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "connectionPriority",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "leConnectionUpdate",
+            "type": "method",
+            "params": [
+                {
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "id": "minInterval",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "id": "maxInterval",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "id": "slaveLatency",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "id": "supervisionTimeout",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "id": "minConnectionEventLen",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "id": "maxConnectionEventLen",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "registerServer",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "appId",
+                    "type": "ParcelUuid",
+                    "tid": -1
+                },
+                {
+                    "tag": "in",
+                    "id": "callback",
+                    "type": "IBluetoothGattServerCallback",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "unregisterServer",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "serverConnect",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "isDirect",
+                    "type": "boolean",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "transport",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "serverDisconnect",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "serverSetPreferredPhy",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "txPhy",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "rxPhy",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "phyOptions",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "serverReadPhy",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "clientIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "addService",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "service",
+                    "type": "BluetoothGattService",
+                    "tid": -1
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "removeService",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "clearServices",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "sendResponse",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "requestId",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "status",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "offset",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "value",
+                    "type": "byte[]",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "sendNotification",
+            "type": "method",
+            "params": [
+                {
+                    "tag": "in",
+                    "id": "serverIf",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "address",
+                    "type": "String",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "handle",
+                    "type": "int",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "confirm",
+                    "type": "boolean",
+                    "tid": 0
+                },
+                {
+                    "tag": "in",
+                    "id": "value",
+                    "type": "byte[]",
+                    "tid": 0
+                }
+            ],
+            "return": "void"
+        },
+        {
+            "id": "disconnectAll",
+            "type": "method",
+            "return": "void"
+        },
+        {
+            "id": "unregAll",
+            "type": "method",
+            "return": "void"
+        },
+        {
+            "id": "numHwTrackFiltersAvailable",
+            "type": "method",
+            "return": "int"
+        }
+    ],
+    "type": "interface"
+}

+ 3 - 0
out/production/aidl/.idea/.gitignore

@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml

+ 7 - 0
out/production/aidl/.idea/codeStyles/Project.xml

@@ -0,0 +1,7 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <ScalaCodeStyleSettings>
+      <option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
+    </ScalaCodeStyleSettings>
+  </code_scheme>
+</component>

+ 5 - 0
out/production/aidl/.idea/codeStyles/codeStyleConfig.xml

@@ -0,0 +1,5 @@
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
+  </state>
+</component>

+ 10 - 0
out/production/aidl/.idea/libraries/lib.xml

@@ -0,0 +1,10 @@
+<component name="libraryTable">
+  <library name="lib">
+    <CLASSES>
+      <root url="file://C:/lib" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+    <jarDirectory url="file://C:/lib" recursive="false" />
+  </library>
+</component>

+ 22 - 0
out/production/aidl/.idea/misc.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ANTLRGenerationPreferences">
+    <option name="perGrammarGenerationSettings">
+      <list>
+        <PerGrammarGenerationSettings>
+          <option name="fileName" value="$PROJECT_DIR$/Aidl.g4" />
+          <option name="autoGen" value="true" />
+          <option name="outputDir" value="E:\subjects\Compilers Principle\exp\2\antlr" />
+          <option name="libDir" value="" />
+          <option name="encoding" value="" />
+          <option name="pkg" value="antlr" />
+          <option name="language" value="Java" />
+          <option name="generateVisitor" value="true" />
+        </PerGrammarGenerationSettings>
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 8 - 0
out/production/aidl/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/aidl.iml" filepath="$PROJECT_DIR$/aidl.iml" />
+    </modules>
+  </component>
+</project>

+ 124 - 0
out/production/aidl/.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 1 - 0
out/production/aidl/Aidl.cmd

@@ -0,0 +1 @@
+grun antlr.aidl.Aidl aidl -gui %*

+ 126 - 0
out/production/aidl/Aidl.g4

@@ -0,0 +1,126 @@
+grammar Aidl;
+
+@members {
+    int oneway = 0;
+}
+
+aidl: 
+    packageStatement ( 
+        parcelableStatement | 
+        importStatement* interfaceStatement
+    );
+
+packageStatement: 
+    PACKAGE name SE;
+
+parcelableStatement: 
+    PARCELABLE id SE;
+
+importStatement: 
+    IMPORT path SE;
+
+interfaceStatement:
+    {oneway = 0;}
+    (ONEWAY {oneway = 1;})? 
+    INTERFACE id LC interfaceSubStatement* RC;
+
+interfaceSubStatement: 
+    methodStatement | constStatement;
+
+methodStatement:
+    {oneway &= 1;}
+    (ONEWAY {oneway |= 2;})? 
+    methodReturnType id LP paramList? RP (EQ INT)? SE;
+
+constStatement: 
+    CONST INT id EQ INTEGER SE |
+    CONST STRING id EQ LITERALSTRING SE;
+
+methodReturnType:
+    {oneway==0}? (NULLABLE? type) | VOID;
+
+paramList:
+    param (CO param)*;
+
+param:
+	NULLABLE? paramTag? paramType[$paramTag.text] id;
+
+paramTag:
+    IN | 
+    {oneway==0}? (OUT | INOUT);
+
+paramType[String tag]
+locals [int tid = 0]:
+    {$tag==null}? (
+        (PRIMITIVE | STRING | interfaceName {$tid = 1;})
+    ) | {$tag!=null}? (
+        MAP 
+        | CHARSEQUENCE
+        | list 
+        | (
+            name {$tid = -1;}
+            | type {$tid = $type.tid;}
+        ) {$tag.equals("in")}?
+        | className {$tid = 2;}
+        | type LB RB
+    );
+
+type
+returns [int tid = 0]: 
+    (PRIMITIVE | STRING | CHARSEQUENCE | MAP | list | className {$tid = 2;}) (LB RB)*;
+list: LIST (LA type RA)?;
+interfaceName: IBINDER | name;
+className: name;
+name: ID | PATH;
+path: PATH;
+id: ID;
+
+PRIMITIVE: BYTE | SHORT | INT | LONG | FLOAT | DOUBLE | BOOLEAN | CHAR;
+BYTE: 'byte';
+SHORT: 'short';
+INT: 'int';
+LONG: 'long';
+FLOAT: 'float';
+DOUBLE: 'double';
+BOOLEAN: 'boolean';
+CHAR: 'char';
+PACKAGE: 'package';
+PARCELABLE: 'parcelable';
+IMPORT: 'import';
+INTERFACE: 'interface';
+ONEWAY: 'oneway';
+VOID: 'void';
+CONST: 'const';
+NULLABLE: '@nullable';
+INOUT: 'inout';
+IN: 'in';
+OUT: 'out';
+STRING: 'String';
+CHARSEQUENCE: 'CharSequence';
+MAP: 'Map';
+LIST: 'List';
+IBINDER: 'IBinder';
+
+LP: '(';
+RP: ')';
+LC: '{';
+RC: '}';
+LB: '[';
+RB: ']';
+LA: '<';
+RA: '>';
+DOT: '.';
+CO: ',';
+SE: ';';
+EQ: '=';
+
+PATH: ID (DOT ID)+;
+ID: [_a-zA-Z][_a-zA-Z0-9]*;
+INTEGER: [0-9]+;
+LITERALSTRING: '"' (ESC | .)*? '"';
+fragment ESC: '\\"' | '\\\\';
+
+WS: [ \t\r\n]+ -> channel(1);
+COMMENT_BLOCK: '/*' .*? '*/' -> channel(2);
+COMMENT_LINE: '//' .*? EL -> channel(2);
+fragment EL: '\r\n' | '\n' | '\n\r' | EOF;

BIN
out/production/aidl/AidlToJson.class


+ 12 - 0
out/production/aidl/aidl.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="lib" level="project" />
+  </component>
+</module>

+ 19 - 0
out/production/aidl/aidl/AudioPolicyConfig.aidl

@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audiopolicy;
+
+parcelable AudioPolicyConfig;

+ 58 - 0
out/production/aidl/aidl/IAccessibilityInteractionConnection.aidl

@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.accessibility;
+
+import android.graphics.Region;
+import android.graphics.Point;
+import android.os.Bundle;
+import android.view.MagnificationSpec;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
+
+/**
+ * Interface for interaction between the AccessibilityManagerService
+ * and the ViewRoot in a given window.
+ *
+ * @hide
+ */
+oneway interface IAccessibilityInteractionConnection {
+
+    void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId, in Region bounds,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec,
+        in Bundle arguments);
+
+    void findAccessibilityNodeInfosByViewId(long accessibilityNodeId, String viewId,
+        in Region bounds, int interactionId, IAccessibilityInteractionConnectionCallback callback,
+        int flags, int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+
+    void findAccessibilityNodeInfosByText(long accessibilityNodeId, String text, in Region bounds,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+
+    void findFocus(long accessibilityNodeId, int focusType, in Region bounds, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
+        long interrogatingTid, in MagnificationSpec spec);
+
+    void focusSearch(long accessibilityNodeId, int direction, in Region bounds, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
+        long interrogatingTid, in MagnificationSpec spec);
+
+    void performAccessibilityAction(long accessibilityNodeId, int action, in Bundle arguments,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid);
+}

+ 97 - 0
out/production/aidl/aidl/IAccessibilityServiceConnection.aidl

@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.accessibilityservice;
+
+import android.accessibilityservice.AccessibilityServiceInfo;
+import android.content.pm.ParceledListSlice;
+import android.graphics.Region;
+import android.os.Bundle;
+import android.view.MagnificationSpec;
+import android.view.MotionEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
+import android.view.accessibility.AccessibilityWindowInfo;
+
+/**
+ * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService.
+ *
+ * @hide
+ */
+interface IAccessibilityServiceConnection {
+
+    void setServiceInfo(in AccessibilityServiceInfo info);
+
+    String[] findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
+        long accessibilityNodeId, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int flags, long threadId,
+        in Bundle arguments);
+
+    String[] findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
+        String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
+        long threadId);
+
+    String[] findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
+        long accessibilityNodeId, String viewId, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    String[] findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    String[] focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
+        int action, in Bundle arguments, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, long threadId);
+
+    AccessibilityWindowInfo getWindow(int windowId);
+
+    List<AccessibilityWindowInfo> getWindows();
+
+    AccessibilityServiceInfo getServiceInfo();
+
+    boolean performGlobalAction(int action);
+
+    void disableSelf();
+
+    oneway void setOnKeyEventResult(boolean handled, int sequence);
+
+    float getMagnificationScale();
+
+    float getMagnificationCenterX();
+
+    float getMagnificationCenterY();
+
+    Region getMagnificationRegion();
+
+    boolean resetMagnification(boolean animate);
+
+    boolean setMagnificationScaleAndCenter(float scale, float centerX, float centerY,
+        boolean animate);
+
+    void setMagnificationCallbackEnabled(boolean enabled);
+
+    boolean setSoftKeyboardShowMode(int showMode);
+
+    void setSoftKeyboardCallbackEnabled(boolean enabled);
+
+    boolean isAccessibilityButtonAvailable();
+
+    void sendGesture(int sequence, in ParceledListSlice gestureSteps);
+
+    boolean isFingerprintGestureDetectionAvailable();
+}

+ 118 - 0
out/production/aidl/aidl/IBluetoothGatt.aidl

@@ -0,0 +1,118 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.bluetooth;
+
+import android.app.PendingIntent;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothGattService;
+import android.bluetooth.le.AdvertiseSettings;
+import android.bluetooth.le.AdvertiseData;
+import android.bluetooth.le.AdvertisingSetParameters;
+import android.bluetooth.le.PeriodicAdvertisingParameters;
+import android.bluetooth.le.ScanFilter;
+import android.bluetooth.le.ScanResult;
+import android.bluetooth.le.ScanSettings;
+import android.bluetooth.le.ResultStorageDescriptor;
+import android.os.ParcelUuid;
+import android.os.WorkSource;
+
+import android.bluetooth.IBluetoothGattCallback;
+import android.bluetooth.IBluetoothGattServerCallback;
+import android.bluetooth.le.IAdvertisingSetCallback;
+import android.bluetooth.le.IPeriodicAdvertisingCallback;
+import android.bluetooth.le.IScannerCallback;
+
+/**
+ * API for interacting with BLE / GATT
+ * @hide
+ */
+interface IBluetoothGatt {
+    List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
+
+    void registerScanner(in IScannerCallback callback, in WorkSource workSource);
+    void unregisterScanner(in int scannerId);
+    void startScan(in int scannerId, in ScanSettings settings, in List<ScanFilter> filters,
+                   in List scanStorages, in String callingPackage);
+    void startScanForIntent(in PendingIntent intent, in ScanSettings settings, in List<ScanFilter> filters,
+                            in String callingPackage);
+    void stopScanForIntent(in PendingIntent intent, in String callingPackage);
+    void stopScan(in int scannerId);
+    void flushPendingBatchResults(in int scannerId);
+
+    void startAdvertisingSet(in AdvertisingSetParameters parameters, in AdvertiseData advertiseData,
+                                in AdvertiseData scanResponse, in PeriodicAdvertisingParameters periodicParameters,
+                                in AdvertiseData periodicData, in int duration, in int maxExtAdvEvents,
+                                in IAdvertisingSetCallback callback);
+    void stopAdvertisingSet(in IAdvertisingSetCallback callback);
+
+    void getOwnAddress(in int advertiserId);
+    void enableAdvertisingSet(in int advertiserId, in boolean enable, in int duration, in int maxExtAdvEvents);
+    void setAdvertisingData(in int advertiserId, in AdvertiseData data);
+    void setScanResponseData(in int advertiserId, in AdvertiseData data);
+    void setAdvertisingParameters(in int advertiserId, in AdvertisingSetParameters parameters);
+    void setPeriodicAdvertisingParameters(in int advertiserId, in PeriodicAdvertisingParameters parameters);
+    void setPeriodicAdvertisingData(in int advertiserId, in AdvertiseData data);
+    void setPeriodicAdvertisingEnable(in int advertiserId, in boolean enable);
+
+    void registerSync(in ScanResult scanResult, in int skip, in int timeout, in IPeriodicAdvertisingCallback callback);
+    void unregisterSync(in IPeriodicAdvertisingCallback callback);
+
+    void registerClient(in ParcelUuid appId, in IBluetoothGattCallback callback);
+
+    void unregisterClient(in int clientIf);
+    void clientConnect(in int clientIf, in String address, in boolean isDirect, in int transport, in boolean opportunistic, in int phy);
+    void clientDisconnect(in int clientIf, in String address);
+    void clientSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int phyOptions);
+    void clientReadPhy(in int clientIf, in String address);
+    void refreshDevice(in int clientIf, in String address);
+    void discoverServices(in int clientIf, in String address);
+    void discoverServiceByUuid(in int clientIf, in String address, in ParcelUuid uuid);
+    void readCharacteristic(in int clientIf, in String address, in int handle, in int authReq);
+    void readUsingCharacteristicUuid(in int clientIf, in String address, in ParcelUuid uuid,
+                           in int startHandle, in int endHandle, in int authReq);
+    void writeCharacteristic(in int clientIf, in String address, in int handle,
+                            in int writeType, in int authReq, in byte[] value);
+    void readDescriptor(in int clientIf, in String address, in int handle, in int authReq);
+    void writeDescriptor(in int clientIf, in String address, in int handle,
+                            in int authReq, in byte[] value);
+    void registerForNotification(in int clientIf, in String address, in int handle, in boolean enable);
+    void beginReliableWrite(in int clientIf, in String address);
+    void endReliableWrite(in int clientIf, in String address, in boolean execute);
+    void readRemoteRssi(in int clientIf, in String address);
+    void configureMTU(in int clientIf, in String address, in int mtu);
+    void connectionParameterUpdate(in int clientIf, in String address, in int connectionPriority);
+    void leConnectionUpdate(int clientIf, String address, int minInterval,
+                            int maxInterval, int slaveLatency, int supervisionTimeout,
+                            int minConnectionEventLen, int maxConnectionEventLen);
+
+    void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback);
+    void unregisterServer(in int serverIf);
+    void serverConnect(in int serverIf, in String address, in boolean isDirect, in int transport);
+    void serverDisconnect(in int serverIf, in String address);
+    void serverSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int phyOptions);
+    void serverReadPhy(in int clientIf, in String address);
+    void addService(in int serverIf, in BluetoothGattService service);
+    void removeService(in int serverIf, in int handle);
+    void clearServices(in int serverIf);
+    void sendResponse(in int serverIf, in String address, in int requestId,
+                            in int status, in int offset, in byte[] value);
+    void sendNotification(in int serverIf, in String address, in int handle,
+                            in boolean confirm, in byte[] value);
+    void disconnectAll();
+    void unregAll();
+    int numHwTrackFiltersAvailable();
+}

+ 64 - 0
out/production/aidl/aidl/IBluetoothHeadsetClient.aidl

@@ -0,0 +1,64 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.bluetooth;
+
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothHeadsetClientCall;
+import android.os.Bundle;
+
+/**
+ * API for Bluetooth Headset Client service (HFP HF Role)
+ *
+ * {@hide}
+ */
+interface IBluetoothHeadsetClient {
+    boolean connect(in BluetoothDevice device);
+    boolean disconnect(in BluetoothDevice device);
+
+    List<BluetoothDevice> getConnectedDevices();
+    List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
+    int getConnectionState(in BluetoothDevice device);
+    boolean setPriority(in BluetoothDevice device, int priority);
+    int getPriority(in BluetoothDevice device);
+
+    boolean startVoiceRecognition(in BluetoothDevice device);
+    boolean stopVoiceRecognition(in BluetoothDevice device);
+
+    List<BluetoothHeadsetClientCall> getCurrentCalls(in BluetoothDevice device);
+    Bundle getCurrentAgEvents(in BluetoothDevice device);
+
+    boolean acceptCall(in BluetoothDevice device, int flag);
+    boolean holdCall(in BluetoothDevice device);
+    boolean rejectCall(in BluetoothDevice device);
+    boolean terminateCall(in BluetoothDevice device, in BluetoothHeadsetClientCall call);
+
+    boolean enterPrivateMode(in BluetoothDevice device, int index);
+    boolean explicitCallTransfer(in BluetoothDevice device);
+
+    BluetoothHeadsetClientCall dial(in BluetoothDevice device, String number);
+
+    boolean sendDTMF(in BluetoothDevice device, byte code);
+    boolean getLastVoiceTagNumber(in BluetoothDevice device);
+
+    int getAudioState(in BluetoothDevice device);
+    boolean connectAudio(in BluetoothDevice device);
+    boolean disconnectAudio(in BluetoothDevice device);
+    void setAudioRouteAllowed(in BluetoothDevice device, boolean allowed);
+    boolean getAudioRouteAllowed(in BluetoothDevice device);
+
+    Bundle getCurrentAgFeatures(in BluetoothDevice device);
+}

+ 124 - 0
out/production/aidl/aidl/IConnectionServiceAdapter.aidl

@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.telecom;
+
+import android.app.PendingIntent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.telecom.ConnectionRequest;
+import android.telecom.DisconnectCause;
+import android.telecom.Logging.Session;
+import android.telecom.ParcelableConnection;
+import android.telecom.ParcelableConference;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.StatusHints;
+
+import com.android.internal.telecom.IVideoProvider;
+import com.android.internal.telecom.RemoteServiceCallback;
+
+/**
+ * Internal remote callback interface for connection services.
+ *
+ * @see android.telecom.ConnectionServiceAdapter
+ *
+ * {@hide}
+ */
+oneway interface IConnectionServiceAdapter {
+    void handleCreateConnectionComplete(
+            String callId,
+            in ConnectionRequest request,
+            in ParcelableConnection connection,
+            in Session.Info sessionInfo);
+
+    void setActive(String callId, in Session.Info sessionInfo);
+
+    void setRinging(String callId, in Session.Info sessionInfo);
+
+    void setDialing(String callId, in Session.Info sessionInfo);
+
+    void setPulling(String callId, in Session.Info sessionInfo);
+
+    void setDisconnected(String callId, in DisconnectCause disconnectCause,
+    in Session.Info sessionInfo);
+
+    void setOnHold(String callId, in Session.Info sessionInfo);
+
+    void setRingbackRequested(String callId, boolean ringing, in Session.Info sessionInfo);
+
+    void setConnectionCapabilities(String callId, int connectionCapabilities,
+    in Session.Info sessionInfo);
+
+    void setConnectionProperties(String callId, int connectionProperties,
+    in Session.Info sessionInfo);
+
+    void setIsConferenced(String callId, String conferenceCallId, in Session.Info sessionInfo);
+
+    void setConferenceMergeFailed(String callId, in Session.Info sessionInfo);
+
+    void addConferenceCall(String callId, in ParcelableConference conference,
+    in Session.Info sessionInfo);
+
+    void removeCall(String callId, in Session.Info sessionInfo);
+
+    void onPostDialWait(String callId, String remaining, in Session.Info sessionInfo);
+
+    void onPostDialChar(String callId, char nextChar, in Session.Info sessionInfo);
+
+    void queryRemoteConnectionServices(RemoteServiceCallback callback, in Session.Info sessionInfo);
+
+    void setVideoProvider(String callId, IVideoProvider videoProvider, in Session.Info sessionInfo);
+
+    void setVideoState(String callId, int videoState, in Session.Info sessionInfo);
+
+    void setIsVoipAudioMode(String callId, boolean isVoip, in Session.Info sessionInfo);
+
+    void setStatusHints(String callId, in StatusHints statusHints, in Session.Info sessionInfo);
+
+    void setAddress(String callId, in Uri address, int presentation, in Session.Info sessionInfo);
+
+    void setCallerDisplayName(String callId, String callerDisplayName, int presentation,
+    in Session.Info sessionInfo);
+
+    void setConferenceableConnections(String callId, in List<String> conferenceableCallIds,
+    in Session.Info sessionInfo);
+
+    void addExistingConnection(String callId, in ParcelableConnection connection,
+    in Session.Info sessionInfo);
+
+    void putExtras(String callId, in Bundle extras, in Session.Info sessionInfo);
+
+    void removeExtras(String callId, in List<String> keys, in Session.Info sessionInfo);
+
+    void setAudioRoute(String callId, int audioRoute, String bluetoothAddress,
+            in Session.Info sessionInfo);
+
+    void onConnectionEvent(String callId, String event, in Bundle extras,
+    in Session.Info sessionInfo);
+
+    void onRttInitiationSuccess(String callId, in Session.Info sessionInfo);
+
+    void onRttInitiationFailure(String callId, int reason, in Session.Info sessionInfo);
+
+    void onRttSessionRemotelyTerminated(String callId, in Session.Info sessionInfo);
+
+    void onRemoteRttRequest(String callId, in Session.Info sessionInfo);
+
+    void onPhoneAccountChanged(String callId, in PhoneAccountHandle pHandle,
+    in Session.Info sessionInfo);
+
+    void onConnectionServiceFocusReleased(in Session.Info sessionInfo);
+}

+ 9 - 0
out/production/aidl/aidl/IFingerprintDaemonCallback.aidl

@@ -0,0 +1,9 @@
+package android.hardware.fingerprint;
+ interface IFingerprintDaemonCallback {
+    void onEnrollResult(long deviceId, int fingerId, int groupId, int remaining);
+    void onAcquired(long deviceId, int acquiredInfo);
+    void onAuthenticated(long deviceId, int fingerId, int groupId);
+    void onError(long deviceId, int error);
+    void onRemoved(long deviceId, int fingerId, int groupId);
+    void onEnumerate(long deviceId, in int [] fingerIds, in int [] groupIds);
+}

+ 453 - 0
out/production/aidl/aidl/INetworkManagementService.aidl

@@ -0,0 +1,453 @@
+/* //device/java/android/android/os/INetworkManagementService.antlr.aidl
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.os;
+
+import android.net.InterfaceConfiguration;
+import android.net.INetd;
+import android.net.INetworkManagementEventObserver;
+import android.net.ITetheringStatsProvider;
+import android.net.Network;
+import android.net.NetworkStats;
+import android.net.RouteInfo;
+import android.net.UidRange;
+import android.os.INetworkActivityListener;
+
+/**
+ * @hide
+ */
+interface INetworkManagementService
+{
+    /**
+     ** GENERAL
+     **/
+
+    /**
+     * Register an observer to receive events.
+     */
+    void registerObserver(INetworkManagementEventObserver obs);
+
+    /**
+     * Unregister an observer from receiving events.
+     */
+    void unregisterObserver(INetworkManagementEventObserver obs);
+
+    /**
+     * Retrieve an INetd to talk to netd.
+     */
+    INetd getNetdService();
+
+    /**
+     * Returns a list of currently known network interfaces
+     */
+    String[] listInterfaces();
+
+    /**
+     * Retrieves the specified interface config
+     *
+     */
+    InterfaceConfiguration getInterfaceConfig(String iface);
+
+    /**
+     * Sets the configuration of the specified interface
+     */
+    void setInterfaceConfig(String iface, in InterfaceConfiguration cfg);
+
+    /**
+     * Clear all IP addresses on the specified interface
+     */
+    void clearInterfaceAddresses(String iface);
+
+    /**
+     * Set interface down
+     */
+    void setInterfaceDown(String iface);
+
+    /**
+     * Set interface up
+     */
+    void setInterfaceUp(String iface);
+
+    /**
+     * Set interface IPv6 privacy extensions
+     */
+    void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable);
+
+    /**
+     * Disable IPv6 on an interface
+     */
+    void disableIpv6(String iface);
+
+    /**
+     * Enable IPv6 on an interface
+     */
+    void enableIpv6(String iface);
+
+    /**
+     * Set IPv6 autoconf address generation mode.
+     * This is a no-op if an unsupported mode is requested.
+     */
+    void setIPv6AddrGenMode(String iface, int mode);
+
+    /**
+     * Add the specified route to the interface.
+     */
+    void addRoute(int netId, in RouteInfo route);
+
+    /**
+     * Remove the specified route from the interface.
+     */
+    void removeRoute(int netId, in RouteInfo route);
+
+    /**
+     * Set the specified MTU size
+     */
+    void setMtu(String iface, int mtu);
+
+    /**
+     * Shuts down the service
+     */
+    void shutdown();
+
+    /**
+     ** TETHERING RELATED
+     **/
+
+    /**
+     * Returns true if IP forwarding is enabled
+     */
+    boolean getIpForwardingEnabled();
+
+    /**
+     * Enables/Disables IP Forwarding
+     */
+    void setIpForwardingEnabled(boolean enabled);
+
+    /**
+     * Start tethering services with the specified dhcp server range
+     * arg is a set of start end pairs defining the ranges.
+     */
+    void startTethering(in String[] dhcpRanges);
+
+    /**
+     * Stop currently running tethering services
+     */
+    void stopTethering();
+
+    /**
+     * Returns true if tethering services are started
+     */
+    boolean isTetheringStarted();
+
+    /**
+     * Tethers the specified interface
+     */
+    void tetherInterface(String iface);
+
+    /**
+     * Untethers the specified interface
+     */
+    void untetherInterface(String iface);
+
+    /**
+     * Returns a list of currently tethered interfaces
+     */
+    String[] listTetheredInterfaces();
+
+    /**
+     * Sets the list of DNS forwarders (in order of priority)
+     */
+    void setDnsForwarders(in Network network, in String[] dns);
+
+    /**
+     * Returns the list of DNS forwarders (in order of priority)
+     */
+    String[] getDnsForwarders();
+
+    /**
+     * Enables unidirectional packet forwarding from {@code fromIface} to
+     * {@code toIface}.
+     */
+    void startInterfaceForwarding(String fromIface, String toIface);
+
+    /**
+     * Disables unidirectional packet forwarding from {@code fromIface} to
+     * {@code toIface}.
+     */
+    void stopInterfaceForwarding(String fromIface, String toIface);
+
+    /**
+     *  Enables Network Address Translation between two interfaces.
+     *  The address and netmask of the external interface is used for
+     *  the NAT'ed network.
+     */
+    void enableNat(String internalInterface, String externalInterface);
+
+    /**
+     *  Disables Network Address Translation between two interfaces.
+     */
+    void disableNat(String internalInterface, String externalInterface);
+
+    /**
+     * Registers a {@code ITetheringStatsProvider} to provide tethering statistics.
+     * All registered providers will be called in order, and their results will be added together.
+     * Netd is always registered as a tethering stats provider.
+     */
+    void registerTetheringStatsProvider(ITetheringStatsProvider provider, String name);
+
+    /**
+     * Unregisters a previously-registered {@code ITetheringStatsProvider}.
+     */
+    void unregisterTetheringStatsProvider(ITetheringStatsProvider provider);
+
+    /**
+     * Reports that a tethering provider has reached a data limit.
+     *
+     * Currently triggers a global alert, which causes NetworkStatsService to poll counters and
+     * re-evaluate data usage.
+     *
+     * This does not take an interface name because:
+     * 1. The tethering offload stats provider cannot reliably determine the interface on which the
+     *    limit was reached, because the HAL does not provide it.
+     * 2. Firing an interface-specific alert instead of a global alert isn't really useful since in
+     *    all cases of interest, the system responds to both in the same way - it polls stats, and
+     *    then notifies NetworkPolicyManagerService of the fact.
+     */
+    void tetherLimitReached(ITetheringStatsProvider provider);
+
+    /**
+     ** PPPD
+     **/
+
+    /**
+     * Returns the list of currently known TTY devices on the system
+     */
+    String[] listTtys();
+
+    /**
+     * Attaches a PPP server daemon to the specified TTY with the specified
+     * local/remote addresses.
+     */
+    void attachPppd(String tty, String localAddr, String remoteAddr, String dns1Addr,
+            String dns2Addr);
+
+    /**
+     * Detaches a PPP server daemon from the specified TTY.
+     */
+    void detachPppd(String tty);
+
+    /**
+     ** DATA USAGE RELATED
+     **/
+
+    /**
+     * Return global network statistics summarized at an interface level,
+     * without any UID-level granularity.
+     */
+    NetworkStats getNetworkStatsSummaryDev();
+    NetworkStats getNetworkStatsSummaryXt();
+
+    /**
+     * Return detailed network statistics with UID-level granularity,
+     * including interface and tag details.
+     */
+    NetworkStats getNetworkStatsDetail();
+
+    /**
+     * Return detailed network statistics for the requested UID and interfaces,
+     * including interface and tag details.
+     * @param uid UID to obtain statistics for, or {@link NetworkStats#UID_ALL}.
+     * @param ifaces Interfaces to obtain statistics for, or {@link NetworkStats#INTERFACES_ALL}.
+     */
+    NetworkStats getNetworkStatsUidDetail(int uid, in String[] ifaces);
+
+    /**
+     * Return summary of network statistics all tethering interfaces.
+     */
+    NetworkStats getNetworkStatsTethering(int how);
+
+    /**
+     * Set quota for an interface.
+     */
+    void setInterfaceQuota(String iface, long quotaBytes);
+
+    /**
+     * Remove quota for an interface.
+     */
+    void removeInterfaceQuota(String iface);
+
+    /**
+     * Set alert for an interface; requires that iface already has quota.
+     */
+    void setInterfaceAlert(String iface, long alertBytes);
+
+    /**
+     * Remove alert for an interface.
+     */
+    void removeInterfaceAlert(String iface);
+
+    /**
+     * Set alert across all interfaces.
+     */
+    void setGlobalAlert(long alertBytes);
+
+    /**
+     * Control network activity of a UID over interfaces with a quota limit.
+     */
+    void setUidMeteredNetworkBlacklist(int uid, boolean enable);
+    void setUidMeteredNetworkWhitelist(int uid, boolean enable);
+    boolean setDataSaverModeEnabled(boolean enable);
+
+    void setUidCleartextNetworkPolicy(int uid, int policy);
+
+    /**
+     * Return status of bandwidth control module.
+     */
+    boolean isBandwidthControlEnabled();
+
+    /**
+     * Sets idletimer for an interface.
+     *
+     * This either initializes a new idletimer or increases its
+     * reference-counting if an idletimer already exists for given
+     * {@code iface}.
+     *
+     * {@code type} is the type of the interface, such as TYPE_MOBILE.
+     *
+     * Every {@code addIdleTimer} should be paired with a
+     * {@link removeIdleTimer} to cleanup when the network disconnects.
+     */
+    void addIdleTimer(String iface, int timeout, int type);
+
+    /**
+     * Removes idletimer for an interface.
+     */
+    void removeIdleTimer(String iface);
+
+    /**
+     * Configure name servers, search paths, and resolver parameters for the given network.
+     */
+    void setDnsConfigurationForNetwork(int netId, in String[] servers, in String[] domains,
+            in int[] params, String tlsHostname, in String[] tlsServers);
+
+    void setFirewallEnabled(boolean enabled);
+    boolean isFirewallEnabled();
+    void setFirewallInterfaceRule(String iface, boolean allow);
+    void setFirewallUidRule(int chain, int uid, int rule);
+    void setFirewallUidRules(int chain, in int[] uids, in int[] rules);
+    void setFirewallChainEnabled(int chain, boolean enable);
+
+    /**
+     * Set all packets from users in ranges to go through VPN specified by netId.
+     */
+    void addVpnUidRanges(int netId, in UidRange[] ranges);
+
+    /**
+     * Clears the special VPN rules for users in ranges and VPN specified by netId.
+     */
+    void removeVpnUidRanges(int netId, in UidRange[] ranges);
+
+    /**
+     * Start the clatd (464xlat) service on the given interface.
+     */
+    void startClatd(String interfaceName);
+
+    /**
+     * Stop the clatd (464xlat) service on the given interface.
+     */
+    void stopClatd(String interfaceName);
+
+    /**
+     * Determine whether the clatd (464xlat) service has been started on the given interface.
+     */
+    boolean isClatdStarted(String interfaceName);
+
+    /**
+     * Start listening for mobile activity state changes.
+     */
+    void registerNetworkActivityListener(INetworkActivityListener listener);
+
+    /**
+     * Stop listening for mobile activity state changes.
+     */
+    void unregisterNetworkActivityListener(INetworkActivityListener listener);
+
+    /**
+     * Check whether the mobile radio is currently active.
+     */
+    boolean isNetworkActive();
+
+    /**
+     * Setup a new physical network.
+     * @param permission null if no permissions required to access this network.  PERMISSION_NETWORK
+     *                   or PERMISSION_SYSTEM to set respective permission.
+     */
+    void createPhysicalNetwork(int netId, String permission);
+
+    /**
+     * Setup a new VPN.
+     */
+    void createVirtualNetwork(int netId, boolean hasDNS, boolean secure);
+
+    /**
+     * Remove a network.
+     */
+    void removeNetwork(int netId);
+
+    /**
+     * Add an interface to a network.
+     */
+    void addInterfaceToNetwork(String iface, int netId);
+
+    /**
+     * Remove an Interface from a network.
+     */
+    void removeInterfaceFromNetwork(String iface, int netId);
+
+    void addLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid);
+
+    void setDefaultNetId(int netId);
+    void clearDefaultNetId();
+
+    /**
+     * Set permission for a network.
+     * @param permission null to clear permissions. PERMISSION_NETWORK or PERMISSION_SYSTEM to set
+     *                   permission.
+     */
+    void setNetworkPermission(int netId, String permission);
+
+    void setPermission(String permission, in int[] uids);
+    void clearPermission(in int[] uids);
+
+    /**
+     * Allow UID to call protect().
+     */
+    void allowProtect(int uid);
+
+    /**
+     * Deny UID from calling protect().
+     */
+    void denyProtect(int uid);
+
+    void addInterfaceToLocalNetwork(String iface, in List<RouteInfo> routes);
+    void removeInterfaceFromLocalNetwork(String iface);
+    int removeRoutesFromLocalNetwork(in List<RouteInfo> routes);
+
+    void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges);
+
+    boolean isNetworkRestricted(int uid);
+}

+ 36 - 0
out/production/aidl/aidl/IOnAppsChangedListener.aidl

@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2014, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.content.pm;
+
+import android.content.pm.ParceledListSlice;
+import android.os.Bundle;
+import android.os.UserHandle;
+
+/**
+ * {@hide}
+ */
+oneway interface IOnAppsChangedListener {
+    void onPackageRemoved(in UserHandle user, String packageName);
+    void onPackageAdded(in UserHandle user, String packageName);
+    void onPackageChanged(in UserHandle user, String packageName);
+    void onPackagesAvailable(in UserHandle user, in String[] packageNames, boolean replacing);
+    void onPackagesUnavailable(in UserHandle user, in String[] packageNames, boolean replacing);
+    void onPackagesSuspended(in UserHandle user, in String[] packageNames,
+            in Bundle launcherExtras);
+    void onPackagesUnsuspended(in UserHandle user, in String[] packageNames);
+    void onShortcutChanged(in UserHandle user, String packageName, in ParceledListSlice shortcuts);
+}

+ 105 - 0
out/production/aidl/aidl/IUserManager.aidl

@@ -0,0 +1,105 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.os;
+
+import android.os.Bundle;
+import android.os.PersistableBundle;
+import android.os.UserManager;
+import android.content.pm.UserInfo;
+import android.content.IntentSender;
+import android.content.RestrictionEntry;
+import android.graphics.Bitmap;
+import android.os.ParcelFileDescriptor;
+
+/**
+ *  {@hide}
+ */
+interface IUserManager {
+
+    /*
+     * DO NOT MOVE - UserManager.h depends on the ordering of this function.
+     */
+    int getCredentialOwnerProfile(int userHandle);
+    int getProfileParentId(int userHandle);
+    /*
+     * END OF DO NOT MOVE
+     */
+
+    UserInfo createUser(in String name, int flags);
+    UserInfo createProfileForUser(in String name, int flags, int userHandle,
+            in String[] disallowedPackages);
+    UserInfo createRestrictedProfile(String name, int parentUserHandle);
+    void setUserEnabled(int userHandle);
+    void setUserAdmin(int userId);
+    void evictCredentialEncryptionKey(int userHandle);
+    boolean removeUser(int userHandle);
+    boolean removeUserEvenWhenDisallowed(int userHandle);
+    void setUserName(int userHandle, String name);
+    void setUserIcon(int userHandle, in Bitmap icon);
+    ParcelFileDescriptor getUserIcon(int userHandle);
+    UserInfo getPrimaryUser();
+    List<UserInfo> getUsers(boolean excludeDying);
+    List<UserInfo> getProfiles(int userHandle, boolean enabledOnly);
+    int[] getProfileIds(int userId, boolean enabledOnly);
+    boolean canAddMoreManagedProfiles(int userHandle, boolean allowedToRemoveOne);
+    UserInfo getProfileParent(int userHandle);
+    boolean isSameProfileGroup(int userHandle, int otherUserHandle);
+    UserInfo getUserInfo(int userHandle);
+    String getUserAccount(int userHandle);
+    void setUserAccount(int userHandle, String accountName);
+    long getUserCreationTime(int userHandle);
+    boolean isRestricted();
+    boolean canHaveRestrictedProfile(int userHandle);
+    int getUserSerialNumber(int userHandle);
+    int getUserHandle(int userSerialNumber);
+    int getUserRestrictionSource(String restrictionKey, int userHandle);
+    List<UserManager.EnforcingUser> getUserRestrictionSources(String restrictionKey, int userHandle);
+    Bundle getUserRestrictions(int userHandle);
+    boolean hasBaseUserRestriction(String restrictionKey, int userHandle);
+    boolean hasUserRestriction(in String restrictionKey, int userHandle);
+    boolean hasUserRestrictionOnAnyUser(in String restrictionKey);
+    void setUserRestriction(String key, boolean value, int userHandle);
+    void setApplicationRestrictions(in String packageName, in Bundle restrictions,
+            int userHandle);
+    Bundle getApplicationRestrictions(in String packageName);
+    Bundle getApplicationRestrictionsForUser(in String packageName, int userHandle);
+    void setDefaultGuestRestrictions(in Bundle restrictions);
+    Bundle getDefaultGuestRestrictions();
+    boolean markGuestForDeletion(int userHandle);
+    boolean isQuietModeEnabled(int userHandle);
+    void setSeedAccountData(int userHandle, in String accountName,
+            in String accountType, in PersistableBundle accountOptions, boolean persist);
+    String getSeedAccountName();
+    String getSeedAccountType();
+    PersistableBundle getSeedAccountOptions();
+    void clearSeedAccountData();
+    boolean someUserHasSeedAccount(in String accountName, in String accountType);
+    boolean isManagedProfile(int userId);
+    boolean isDemoUser(int userId);
+    UserInfo createProfileForUserEvenWhenDisallowed(in String name, int flags, int userHandle,
+            in String[] disallowedPackages);
+    boolean isUserUnlockingOrUnlocked(int userId);
+    int getManagedProfileBadge(int userId);
+    boolean isUserUnlocked(int userId);
+    boolean isUserRunning(int userId);
+    boolean isUserNameSet(int userHandle);
+    boolean hasRestrictedProfiles();
+    boolean requestQuietModeEnabled(String callingPackage, boolean enableQuietMode, int userHandle, in IntentSender target);
+    long getUserStartRealtime();
+    long getUserUnlockRealtime();
+}

Разница между файлами не показана из-за своего большого размера
+ 118 - 0
out/production/aidl/antlr/aidl/Aidl.interp


+ 80 - 0
out/production/aidl/antlr/aidl/Aidl.tokens

@@ -0,0 +1,80 @@
+PRIMITIVE=1
+BYTE=2
+SHORT=3
+INT=4
+LONG=5
+FLOAT=6
+DOUBLE=7
+BOOLEAN=8
+CHAR=9
+PACKAGE=10
+PARCELABLE=11
+IMPORT=12
+INTERFACE=13
+ONEWAY=14
+VOID=15
+CONST=16
+NULLABLE=17
+INOUT=18
+IN=19
+OUT=20
+STRING=21
+CHARSEQUENCE=22
+MAP=23
+LIST=24
+IBINDER=25
+LP=26
+RP=27
+LC=28
+RC=29
+LB=30
+RB=31
+LA=32
+RA=33
+DOT=34
+CO=35
+SE=36
+EQ=37
+PATH=38
+ID=39
+INTEGER=40
+LITERALSTRING=41
+WS=42
+COMMENT_BLOCK=43
+COMMENT_LINE=44
+'byte'=2
+'short'=3
+'int'=4
+'long'=5
+'float'=6
+'double'=7
+'boolean'=8
+'char'=9
+'package'=10
+'parcelable'=11
+'import'=12
+'interface'=13
+'oneway'=14
+'void'=15
+'const'=16
+'@nullable'=17
+'inout'=18
+'in'=19
+'out'=20
+'String'=21
+'CharSequence'=22
+'Map'=23
+'List'=24
+'IBinder'=25
+'('=26
+')'=27
+'{'=28
+'}'=29
+'['=30
+']'=31
+'<'=32
+'>'=33
+'.'=34
+','=35
+';'=36
+'='=37

BIN
out/production/aidl/antlr/aidl/AidlBaseListener.class


BIN
out/production/aidl/antlr/aidl/AidlBaseVisitor.class


BIN
out/production/aidl/antlr/aidl/AidlLexer.class


Разница между файлами не показана из-за своего большого размера
+ 150 - 0
out/production/aidl/antlr/aidl/AidlLexer.interp


+ 80 - 0
out/production/aidl/antlr/aidl/AidlLexer.tokens

@@ -0,0 +1,80 @@
+PRIMITIVE=1
+BYTE=2
+SHORT=3
+INT=4
+LONG=5
+FLOAT=6
+DOUBLE=7
+BOOLEAN=8
+CHAR=9
+PACKAGE=10
+PARCELABLE=11
+IMPORT=12
+INTERFACE=13
+ONEWAY=14
+VOID=15
+CONST=16
+NULLABLE=17
+INOUT=18
+IN=19
+OUT=20
+STRING=21
+CHARSEQUENCE=22
+MAP=23
+LIST=24
+IBINDER=25
+LP=26
+RP=27
+LC=28
+RC=29
+LB=30
+RB=31
+LA=32
+RA=33
+DOT=34
+CO=35
+SE=36
+EQ=37
+PATH=38
+ID=39
+INTEGER=40
+LITERALSTRING=41
+WS=42
+COMMENT_BLOCK=43
+COMMENT_LINE=44
+'byte'=2
+'short'=3
+'int'=4
+'long'=5
+'float'=6
+'double'=7
+'boolean'=8
+'char'=9
+'package'=10
+'parcelable'=11
+'import'=12
+'interface'=13
+'oneway'=14
+'void'=15
+'const'=16
+'@nullable'=17
+'inout'=18
+'in'=19
+'out'=20
+'String'=21
+'CharSequence'=22
+'Map'=23
+'List'=24
+'IBinder'=25
+'('=26
+')'=27
+'{'=28
+'}'=29
+'['=30
+']'=31
+'<'=32
+'>'=33
+'.'=34
+','=35
+';'=36
+'='=37

BIN
out/production/aidl/antlr/aidl/AidlListener.class


BIN
out/production/aidl/antlr/aidl/AidlParser$AidlContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ClassNameContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ConstStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$IdContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ImportStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$InterfaceNameContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$InterfaceStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$InterfaceSubStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ListContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$MethodReturnTypeContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$MethodStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$NameContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$PackageStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ParamContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ParamListContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ParamTagContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ParamTypeContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$ParcelableStatementContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$PathContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser$TypeContext.class


BIN
out/production/aidl/antlr/aidl/AidlParser.class


BIN
out/production/aidl/antlr/aidl/AidlVisitor.class


BIN
out/production/aidl/antlr/aidl/tools/AidlLoader.class


+ 4 - 0
out/production/aidl/foreach.cmd

@@ -0,0 +1,4 @@
+call antlr antlr.aidl.g4
+javac *.java
+set dir="antlr.aidl"
+for /r %dir% %%i in (*.antlr.aidl) do java antlr.AidlToJson "%%i" json

BIN
out/production/aidl/tools/MapToJson.class


+ 117 - 0
tools/MapToJson.java

@@ -0,0 +1,117 @@
+package tools;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+public class MapToJson {
+    public MapToJson(Map<String, Object> map) {
+        this.map = map;
+    }
+
+    Map<String, Object> map;
+    String json;
+    int depth;
+
+    public String toJson() {
+        if (json == null) {
+            json = "";
+            depth = 0;
+            _print(map);
+        }
+        return json;
+    }
+
+    private void _print(ArrayList<Object> list) {
+        _println("[");
+        ++depth;
+        int c = 0;
+        for (Object i : list) {
+            if (c++ > 0) _printlnC();
+            printV(i);
+        }
+        _println();
+        --depth;
+        print("]");
+    }
+
+    private void _print(Map<String, Object> map) {
+        _println("{");
+        ++depth;
+        int c = 0;
+        for (Map.Entry<String, Object> i : map.entrySet()) {
+            if (c++ > 0) _printlnC();
+            print(i.getKey(), i.getValue());
+        }
+        _println();
+        --depth;
+        print("}");
+    }
+
+    private void _print(Object o) {
+        if (o instanceof Map) {
+            _print((Map<String, Object>)o);
+        } else if (o instanceof ArrayList) {
+            _print((ArrayList<Object>)o);
+        } else if (o instanceof String) {
+            _print((String)o);
+        } else if (o instanceof Integer) {
+            _print(((Integer)o).toString());
+        }
+    }
+
+    private void print(Object o) {
+        String indent = "";
+        for (int i = 0; i<depth*4; ++i) {
+            indent += " ";
+        }
+        _print(indent);
+        _print(o);
+    }
+
+    private void printV(Object o) {
+        if (o instanceof String) {
+            print(quote((String)o));
+        } else {
+            print(o);
+        }
+    }
+
+    private void _printV(Object o) {
+        if (o instanceof String) {
+            _print(quote((String)o));
+        } else {
+            _print(o);
+        }
+    }
+
+    private void println(String str) {
+        print(str);
+        _println();
+    }
+
+    private void _println() {
+        _println("");
+    }
+
+    private void _print(String str){
+        json += str;
+    }
+
+    private void _println(String str) {
+        _print(str + "\r\n");
+    }
+
+    private void print(String key, Object value) {
+        print(quote(key));
+        _print(": ");
+        _printV(value);
+    }
+
+    private String quote(String str) {
+        return "\"" + str + "\"";
+    }
+
+    private void _printlnC() {
+        _println(",");
+    }
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов