// Copyright 2016 Google Inc. All Rights Reserved.
//
// 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.

//
// Protocol buffer containing information about installed packages.

syntax = "proto2";
package usagestats;

message PackageInfo {
  // Apps / service name. (e.g. com.google.android.apps.books)
  required string pkg_name = 1;

  // App version number
  optional int32 version_code = 2;

  // Version name
  optional string version_name = 3;

  // First install time
  optional int64 first_install_time = 4;

  // Last update time
  optional int64 last_update_time = 5;

  // The sharedUserId assigned to this package by the device.
  optional int32 uid = 6;

  // The string label of the sharedUserId this package claims, if any.
  optional string shared_user_id = 7;

  // Whether or not the package is a system app (was installed in the device's
  // system image).
  // http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_SYSTEM
  optional bool is_system_app = 8;

  // Whether or not the package has been installed as an update to a built-in
  // system app. This boolean is meaningless if is_system_app is false.
  // http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_UPDATED_SYSTEM_APP
  optional bool is_updated_system_app = 9;
}
