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.server.appsearch.appsindexer; 18 19 import android.annotation.NonNull; 20 21 import com.android.server.appsearch.indexer.IndexerSettings; 22 23 import java.io.File; 24 25 /** 26 * Abstract class for settings backed by a PersistableBundle. 27 * 28 * <p>Holds settings such as: 29 * 30 * <ul> 31 * <li>getting and setting the timestamp of the last update, stored in {@link 32 * #getLastUpdateTimestampMillis()} 33 * </ul> 34 * 35 * <p>This class is NOT thread safe (similar to {@link PersistableBundle} which it wraps). 36 */ 37 public class AppOpenEventIndexerSettings extends IndexerSettings { 38 static final String SETTINGS_FILE_NAME = "app_open_event_indexer_settings.pb"; 39 AppOpenEventIndexerSettings(@onNull File baseDir)40 public AppOpenEventIndexerSettings(@NonNull File baseDir) { 41 super(baseDir); 42 } 43 44 @Override getSettingsFileName()45 protected String getSettingsFileName() { 46 return SETTINGS_FILE_NAME; 47 } 48 } 49