1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.ondevicepersonalization.services.data.user; 18 19 import android.provider.BaseColumns; 20 21 public class UserDataContract { UserDataContract()22 private UserDataContract() {} 23 24 /** Keep the installed apps for last 30 days. */ 25 public static class AppInstall implements BaseColumns { 26 /** The name of app install table. */ 27 public static final String TABLE_NAME = "app_install"; 28 29 /** The list of app information including app package name and last update time. */ 30 public static final String APP_LIST = "package_name"; 31 32 /** The time when create the record. */ 33 public static final String CREATION_TIME = "creation_time"; 34 35 public static final String CREATE_TABLE_STATEMENT = 36 "CREATE TABLE IF NOT EXISTS " 37 + TABLE_NAME 38 + " (" 39 + _ID 40 + " INTEGER PRIMARY KEY, " 41 + APP_LIST 42 + " BLOB NOT NULL, " 43 + CREATION_TIME 44 + " INTEGER NOT NULL)"; 45 } 46 } 47