diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-11-26 23:44:41 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-11-27 23:20:32 +0000 |
commit | 4276e7b649ad2bf670880ad5915000b4b282884c (patch) | |
tree | fe15a585f5dbf1b0908eae3f085daf1e48b5406d | |
parent | 4a5bc9f8b0123dc82438f83d4c440db2da2ca242 (diff) | |
download | android_packages_apps_Trebuchet-4276e7b649ad2bf670880ad5915000b4b282884c.tar.gz android_packages_apps_Trebuchet-4276e7b649ad2bf670880ad5915000b4b282884c.tar.bz2 android_packages_apps_Trebuchet-4276e7b649ad2bf670880ad5915000b4b282884c.zip |
Moving autority definition to a separate file, so
that it can be easily customized using android studio
Change-Id: I17f4f4511c2af5d382727769d1b74413f233d500
Bug: 120079798
-rw-r--r-- | Android.mk | 3 | ||||
-rw-r--r-- | quickstep/AndroidManifest.xml | 1 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherProvider.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/config/BaseFlags.java | 9 | ||||
-rw-r--r-- | src_build_config/BuildConfig.java | 21 |
5 files changed, 25 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk index d9e464116..e5a712f19 100644 --- a/Android.mk +++ b/Android.mk @@ -82,7 +82,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := LauncherPluginLib LOCAL_SRC_FILES := \ $(call all-proto-files-under, protos) \ - $(call all-proto-files-under, proto_overrides) + $(call all-proto-files-under, proto_overrides) \ + $(call all-java-files-under, src_build_config) \ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res diff --git a/quickstep/AndroidManifest.xml b/quickstep/AndroidManifest.xml index 74e0b1e77..542a235ad 100644 --- a/quickstep/AndroidManifest.xml +++ b/quickstep/AndroidManifest.xml @@ -22,7 +22,6 @@ xmlns:tools="http://schemas.android.com/tools" package="com.android.launcher3" > - <uses-sdk android:targetSdkVersion="28" android:minSdkVersion="28"/> <uses-permission android:name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS" /> <application diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java index 7d62adaf4..7db3d5b9d 100644 --- a/src/com/android/launcher3/LauncherProvider.java +++ b/src/com/android/launcher3/LauncherProvider.java @@ -82,7 +82,7 @@ public class LauncherProvider extends ContentProvider { */ public static final int SCHEMA_VERSION = 27; - public static final String AUTHORITY = FeatureFlags.AUTHORITY; + public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".settings"; static final String EMPTY_DATABASE_CREATED = "EMPTY_DATABASE_CREATED"; diff --git a/src/com/android/launcher3/config/BaseFlags.java b/src/com/android/launcher3/config/BaseFlags.java index 8de352eaa..23ad91212 100644 --- a/src/com/android/launcher3/config/BaseFlags.java +++ b/src/com/android/launcher3/config/BaseFlags.java @@ -58,7 +58,6 @@ abstract class BaseFlags { } public static final boolean IS_DOGFOOD_BUILD = false; - public static final String AUTHORITY = "com.android.launcher3.settings".intern(); // When enabled the promise icon is visible in all apps while installation an app. public static final boolean LAUNCHER3_PROMISE_APPS_IN_ALL_APPS = false; @@ -104,12 +103,6 @@ abstract class BaseFlags { flag.initialize(context); } } - } else { - synchronized (sLock) { - for (TogglableFlag flag : sFlags) { - flag.currentValue = flag.defaultValue; - } - } } } @@ -139,7 +132,7 @@ abstract class BaseFlags { boolean defaultValue, String description) { this.key = checkNotNull(key); - this.defaultValue = defaultValue; + this.currentValue = this.defaultValue = defaultValue; this.description = checkNotNull(description); synchronized (sLock) { sFlags.add(this); diff --git a/src_build_config/BuildConfig.java b/src_build_config/BuildConfig.java new file mode 100644 index 000000000..36d7f4b36 --- /dev/null +++ b/src_build_config/BuildConfig.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2018 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.launcher3; + +public final class BuildConfig { + public static final String APPLICATION_ID = "com.android.launcher3"; +} |