Move aconfig files to aconfig folder

- Set packageName as com.android.launcher3
- Follow folder structure as per go/sysui-aconfig-structure

Bug: 294913042

Test: adb shell device_config put launcher com.android.launcher3.enable_all_apps_rv_preinflation true

Flag: enable_all_apps_rv_preinflation

Change-Id: Ib45a24d9100b657e7776c6120bdf9625533e9ed7
This commit is contained in:
Anushree Ganjam
2023-08-28 16:35:46 -07:00
parent b0b8e3a533
commit 8a6b74e51b
6 changed files with 42 additions and 27 deletions

View File

@@ -136,24 +136,6 @@ java_library {
min_sdk_version: min_launcher3_sdk_version,
}
aconfig_declarations {
name: "launcher_flags",
package: "com.google.android.platform.launcher.aconfig.flags",
srcs: ["launcher.aconfig"],
}
java_aconfig_library {
name: "launcher_flags_lib",
aconfig_declarations: "launcher_flags",
}
java_aconfig_library {
name: "launcher_flags_lib_test",
aconfig_declarations: "launcher_flags",
test: true
}
// Library with all the dependencies for building Launcher3
android_library {
name: "Launcher3ResLib",
@@ -208,7 +190,7 @@ android_library {
name: "Launcher3CommonDepsLib",
defaults: ["Launcher3CommonDepsDefault"],
static_libs: [
"launcher_flags_lib",
"com_android_launcher3_flags_lib",
],
}
@@ -219,7 +201,7 @@ android_library {
name: "Launcher3CommonDepsLibDebug",
defaults: ["Launcher3CommonDepsDefault"],
static_libs: [
"launcher_flags_lib_test",
"com_android_launcher3_flags_lib_debug",
],
}

35
aconfig/Android.bp Normal file
View File

@@ -0,0 +1,35 @@
// 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 {
// See: http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
aconfig_declarations {
name: "com_android_launcher3_flags",
package: "com.android.launcher3",
srcs: ["launcher.aconfig"],
}
java_aconfig_library {
name: "com_android_launcher3_flags_lib",
aconfig_declarations: "com_android_launcher3_flags",
}
java_aconfig_library {
name: "com_android_launcher3_flags_lib_debug",
aconfig_declarations: "com_android_launcher3_flags",
test: true
}

View File

@@ -1,4 +1,4 @@
package: "com.google.android.platform.launcher.aconfig.flags"
package: "com.android.launcher3"
flag {
name: "enable_expanding_pause_work_button"

View File

@@ -15,6 +15,7 @@
*/
package com.android.launcher3.allapps;
import static com.android.launcher3.Flags.enableExpandingPauseWorkButton;
import static com.android.launcher3.allapps.ActivityAllAppsContainerView.AdapterHolder.SEARCH;
import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_WORK_DISABLED_CARD;
import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_WORK_EDU_CARD;
@@ -26,8 +27,6 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.ScrollableLayoutManager.PREDICTIVE_BACK_MIN_SCALE;
import static com.google.android.platform.launcher.aconfig.flags.Flags.enableExpandingPauseWorkButton;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;

View File

@@ -88,7 +88,7 @@ android_library {
"truth-prebuilt",
"platform-test-rules",
"testables",
"launcher_flags_lib_test",
"com_android_launcher3_flags_lib_debug",
],
manifest: "AndroidManifest-common.xml",
platform_apis: true,
@@ -107,7 +107,7 @@ android_test {
],
static_libs: [
"Launcher3TestLib",
"launcher_flags_lib_test",
"com_android_launcher3_flags_lib_debug",
],
libs: [
"android.test.base",

View File

@@ -15,6 +15,7 @@
*/
package com.android.launcher3.ui;
import static com.android.launcher3.Flags.FLAG_ENABLE_EXPANDING_PAUSE_WORK_BUTTON;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
@@ -22,8 +23,6 @@ import static com.android.launcher3.util.TestUtil.installDummyAppForUser;
import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL;
import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT;
import static com.google.android.platform.launcher.aconfig.flags.Flags.FLAG_ENABLE_EXPANDING_PAUSE_WORK_BUTTON;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;