Add soong namespace to sysui libs

Also, move compile-time constant to new library

Test: m checkbuild
Flag: NONE
Bug: 214238812
Change-Id: I9222a609021ba2c647a9ec59e4a62b7f30eba7b5
diff --git a/packages/SettingsLib/Android.bp b/packages/SettingsLib/Android.bp
index 66fad36..0b36757 100644
--- a/packages/SettingsLib/Android.bp
+++ b/packages/SettingsLib/Android.bp
@@ -22,7 +22,7 @@
         "guava",
 
         "WifiTrackerLibRes",
-        "iconloader",
+        "//frameworks/libs/systemui:iconloader",
         "setupdesign",
 
         "SettingsLibActionBarShadow",
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 089782c..40db52e 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -57,6 +57,7 @@
         "src-release/**/*.kt",
         "src-release/**/*.java",
     ],
+    visibility: ["//visibility:private"],
 }
 
 filegroup {
@@ -65,6 +66,7 @@
         "src-debug/**/*.kt",
         "src-debug/**/*.java",
     ],
+    visibility: ["//visibility:private"],
 }
 
 //Create a library to expose SystemUI's resources to other modules.
@@ -105,6 +107,7 @@
     },
     use_resource_processor: true,
     static_libs: [
+        "//frameworks/libs/systemui:compilelib",
         "SystemUI-res",
         "WifiTrackerLib",
         "WindowManager-Shell",
@@ -117,7 +120,7 @@
         "SystemUI-statsd",
         "SettingsLib",
         "com_android_systemui_flags_lib",
-        "com_android_systemui_shared_flags_lib",
+        "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
         "androidx.core_core-ktx",
         "androidx.viewpager2_viewpager2",
         "androidx.legacy_legacy-support-v4",
@@ -145,7 +148,7 @@
         "device_state_flags_lib",
         "kotlinx_coroutines_android",
         "kotlinx_coroutines",
-        "iconloader_base",
+        "//frameworks/libs/systemui:iconloader_base",
         "SystemUI-tags",
         "SystemUI-proto",
         "monet",
@@ -156,7 +159,7 @@
         "lottie",
         "LowLightDreamLib",
         "TraceurCommon",
-        "motion_tool_lib",
+        "//frameworks/libs/systemui:motion_tool_lib",
         "notification_flags_lib",
         "PlatformComposeCore",
         "PlatformComposeSceneTransitionLayout",
@@ -263,7 +266,7 @@
         "SystemUI-statsd",
         "SettingsLib",
         "com_android_systemui_flags_lib",
-        "com_android_systemui_shared_flags_lib",
+        "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
         "flag-junit-base",
         "platform-parametric-runner-lib",
         "androidx.viewpager2_viewpager2",
@@ -293,7 +296,7 @@
         "kotlinx-coroutines-core",
         "kotlinx_coroutines_test",
         "kotlin-reflect",
-        "iconloader_base",
+        "//frameworks/libs/systemui:iconloader_base",
         "SystemUI-tags",
         "SystemUI-proto",
         "metrics-helper-lib",
@@ -307,7 +310,7 @@
         "jsr330",
         "WindowManager-Shell",
         "LowLightDreamLib",
-        "motion_tool_lib",
+        "//frameworks/libs/systemui:motion_tool_lib",
         "androidx.core_core-animation-testing",
         "androidx.compose.ui_ui",
         "flag-junit",
@@ -344,6 +347,7 @@
         "compose/facade/enabled/src/**/*.kt",
     ],
     static_libs: [
+        "//frameworks/libs/systemui:compilelib",
         "SystemUI-tests-base",
         "androidx.test.uiautomator_uiautomator",
         "androidx.core_core-animation-testing",
@@ -398,6 +402,7 @@
         "compose/facade/enabled/src/**/*.kt",
     ],
     static_libs: [
+        "//frameworks/libs/systemui:compilelib",
         "SystemUI-tests-base",
         "androidx.compose.runtime_runtime",
     ],
diff --git a/packages/SystemUI/animation/Android.bp b/packages/SystemUI/animation/Android.bp
index 1ce3be8..dec664f 100644
--- a/packages/SystemUI/animation/Android.bp
+++ b/packages/SystemUI/animation/Android.bp
@@ -47,8 +47,8 @@
         "com_android_systemui_flags_lib",
         "SystemUIShaderLib",
         "WindowManager-Shell-shared",
-        "animationlib",
-        "com_android_systemui_shared_flags_lib",
+        "//frameworks/libs/systemui:animationlib",
+        "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
     ],
 
     manifest: "AndroidManifest.xml",
diff --git a/packages/SystemUI/shared/Android.bp b/packages/SystemUI/shared/Android.bp
index 42ba05c..fbe1399 100644
--- a/packages/SystemUI/shared/Android.bp
+++ b/packages/SystemUI/shared/Android.bp
@@ -58,7 +58,7 @@
         "SystemUIUnfoldLib",
         "SystemUISharedLib-Keyguard",
         "WindowManager-Shell-shared",
-        "tracinglib-platform",
+        "//frameworks/libs/systemui:tracinglib-platform",
         "androidx.dynamicanimation_dynamicanimation",
         "androidx.concurrent_concurrent-futures",
         "androidx.lifecycle_lifecycle-runtime-ktx",
@@ -68,7 +68,7 @@
         "kotlinx_coroutines",
         "dagger2",
         "jsr330",
-        "com_android_systemui_shared_flags_lib",
+        "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
     ],
     resource_dirs: [
         "res",
diff --git a/packages/SystemUI/src-debug/com/android/systemui/util/Compile.java b/packages/SystemUI/src-debug/com/android/systemui/util/Compile.java
deleted file mode 100644
index dc804ca..0000000
--- a/packages/SystemUI/src-debug/com/android/systemui/util/Compile.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2021 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 com.android.systemui.util;
-
-/** Constants that vary by compilation configuration. */
-public class Compile {
-    /** Whether SystemUI was compiled in debug mode, and supports debug features */
-    public static final boolean IS_DEBUG = true;
-}
diff --git a/packages/SystemUI/src-release/com/android/systemui/util/Compile.java b/packages/SystemUI/src-release/com/android/systemui/util/Compile.java
deleted file mode 100644
index 8a63763..0000000
--- a/packages/SystemUI/src-release/com/android/systemui/util/Compile.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2021 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 com.android.systemui.util;
-
-/** Constants that vary by compilation configuration. */
-public class Compile {
-    /** Whether SystemUI was compiled in debug mode, and supports debug features */
-    public static final boolean IS_DEBUG = false;
-}