Loading packages/SystemUI/tests/utils/src/android/app/ActivityManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.app import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock val Kosmos.activityManager by Kosmos.Fixture { mock<ActivityManager>() } packages/SystemUI/tests/utils/src/android/app/admin/DevicePolicyManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.app.admin import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock val Kosmos.devicePolicyManager by Kosmos.Fixture { mock<DevicePolicyManager>() } packages/SystemUI/tests/utils/src/android/content/ContextKosmos.kt 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.content import com.android.systemui.SysuiTestableContext import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testCase val Kosmos.testableContext: SysuiTestableContext by Kosmos.Fixture { testCase.context } var Kosmos.applicationContext: Context by Kosmos.Fixture { testableContext } packages/SystemUI/tests/utils/src/android/content/res/ResourcesKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.content.res import android.content.applicationContext import com.android.systemui.kosmos.Kosmos var Kosmos.mainResources: Resources by Kosmos.Fixture { applicationContext.resources } packages/SystemUI/tests/utils/src/android/os/UserManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.os import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock var Kosmos.userManager by Kosmos.Fixture { mock<UserManager>() } Loading
packages/SystemUI/tests/utils/src/android/app/ActivityManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.app import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock val Kosmos.activityManager by Kosmos.Fixture { mock<ActivityManager>() }
packages/SystemUI/tests/utils/src/android/app/admin/DevicePolicyManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.app.admin import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock val Kosmos.devicePolicyManager by Kosmos.Fixture { mock<DevicePolicyManager>() }
packages/SystemUI/tests/utils/src/android/content/ContextKosmos.kt 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.content import com.android.systemui.SysuiTestableContext import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testCase val Kosmos.testableContext: SysuiTestableContext by Kosmos.Fixture { testCase.context } var Kosmos.applicationContext: Context by Kosmos.Fixture { testableContext }
packages/SystemUI/tests/utils/src/android/content/res/ResourcesKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.content.res import android.content.applicationContext import com.android.systemui.kosmos.Kosmos var Kosmos.mainResources: Resources by Kosmos.Fixture { applicationContext.resources }
packages/SystemUI/tests/utils/src/android/os/UserManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package android.os import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock var Kosmos.userManager by Kosmos.Fixture { mock<UserManager>() }