• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19option java_package = "android";
20option java_multiple_files = true;
21
22import "google/protobuf/descriptor.proto";
23
24package android;
25
26// TODO: It's better to track this by semantic types and set policy for those.
27// Do this for now to bootstrap the tools.
28enum Destination {
29    // Fields or messages annotated with DEST_LOCAL must never be
30    // extracted from the device automatically. They can be accessed
31    // by tools on the developer's workstation, and if they are sent
32    // to another device that must be by the user, with a PII warning. (TBD)
33    DEST_LOCAL = 0;
34
35    // Fields or messages annotated with DEST_EXPLICIT can be sent
36    // off the device with an explicit user action.
37    DEST_EXPLICIT = 1;
38
39    // Fields or messages annotated with DEST_LOCAL can be sent by
40    // automatic means, without per-sending user consent. The user
41    // still must have previously accepted a consent to share this
42    // information.
43    DEST_AUTOMATIC = 2;
44
45    // There is no more permissive option than DEST_AUTOMATIC.
46}
47
48message PrivacyFlags {
49  optional Destination dest = 1  [
50      default = DEST_LOCAL
51  ];
52}
53
54extend google.protobuf.FieldOptions {
55    // Flags for automatically filtering statistics
56    optional PrivacyFlags privacy = 102672883;
57}
58