Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26e8370b authored by Wenhao Wang's avatar Wenhao Wang
Browse files

[pm] Implement the BIC service

The BIC service monitors two categories of events:

1. usage events to tell the foreground/background state
of package installers.
2. packages install/uninstall.

Based on the timestamps of the above events, the BIC service
detects the background installed packages.
The BIC service also stores the list of background installed
packages on the disk.

The clients of the BIC service can query the list of background
installed packages.

Bug: 238451991
Test: BackgroundInstallControlServiceTest
Change-Id: I58c98a176897893b60cf24d01c69266771d102ca
parent 9452d8bc
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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.
 */

syntax = "proto2";
package com.android.server.pm;

option java_multiple_files = true;

// Proto for the background installed packages.
// It's used for serializing the background installed package info to disk.
message BackgroundInstalledPackagesProto {
  repeated BackgroundInstalledPackageProto bg_installed_pkg = 1;
}

// Proto for the background installed package entry
message BackgroundInstalledPackageProto {
  optional string package_name = 1;
  optional int32 user_id = 2;
}
+448 −28

File changed.

Preview size limit exceeded, changes collapsed.

+840 −0

File added.

Preview size limit exceeded, changes collapsed.