1 /* 2 * Copyright (C) 2021 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.locales; 18 19 import static android.os.Process.INVALID_UID; 20 21 import com.android.internal.util.FrameworkStatsLog; 22 23 /** 24 * Holds data used to report the ApplicationLocalesChanged atom. 25 */ 26 public final class AppLocaleChangedAtomRecord { 27 final int mCallingUid; 28 int mTargetUid = INVALID_UID; 29 String mNewLocales = ""; 30 String mPrevLocales = ""; 31 int mStatus = FrameworkStatsLog 32 .APPLICATION_LOCALES_CHANGED__STATUS__STATUS_UNSPECIFIED; 33 AppLocaleChangedAtomRecord(int callingUid)34 AppLocaleChangedAtomRecord(int callingUid) { 35 this.mCallingUid = callingUid; 36 } 37 setNewLocales(String newLocales)38 void setNewLocales(String newLocales) { 39 this.mNewLocales = newLocales; 40 } 41 setTargetUid(int targetUid)42 void setTargetUid(int targetUid) { 43 this.mTargetUid = targetUid; 44 } 45 setPrevLocales(String prevLocales)46 void setPrevLocales(String prevLocales) { 47 this.mPrevLocales = prevLocales; 48 } 49 setStatus(int status)50 void setStatus(int status) { 51 this.mStatus = status; 52 } 53 } 54