Skip to content

Commit

Permalink
Use aapt to rename to com.android.camera2
Browse files Browse the repository at this point in the history
* Rename launcher activity too
* Just to keep launcher icon on upgrades

Change-Id: Ib6cbacf797f508828308bb781dc47a1a59b2561f
  • Loading branch information
chirayudesai authored and mikeNG committed Jan 15, 2025
1 parent 58f356d commit b3fa5ab
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
17 changes: 11 additions & 6 deletions app/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ android_app {

use_embedded_native_libs: true,

aaptflags: [
"--rename-manifest-package",
"com.android.camera2",
],

required: [
"ApertureFrameworksBaseOverlay",
"ApertureLensLauncher",
"initial-package-stopped-states-org.lineageos.aperture",
"preinstalled-packages-org.lineageos.aperture",
"initial-package-stopped-states-com.android.camera2",
"preinstalled-packages-com.android.camera2",
],

static_libs: [
Expand Down Expand Up @@ -68,17 +73,17 @@ android_app {
}

prebuilt_etc {
name: "initial-package-stopped-states-org.lineageos.aperture",
name: "initial-package-stopped-states-com.android.camera2",
product_specific: true,
sub_dir: "sysconfig",
src: "initial-package-stopped-states-org.lineageos.aperture.xml",
src: "initial-package-stopped-states-com.android.camera2.xml",
filename_from_src: true,
}

prebuilt_etc {
name: "preinstalled-packages-org.lineageos.aperture",
name: "preinstalled-packages-com.android.camera2",
product_specific: true,
sub_dir: "sysconfig",
src: "preinstalled-packages-org.lineageos.aperture.xml",
src: "preinstalled-packages-com.android.camera2.xml",
filename_from_src: true,
}
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
namespace = "org.lineageos.aperture"

defaultConfig {
applicationId = "org.lineageos.aperture"
applicationId = "com.android.camera2"
minSdk = 26
targetSdk = 35
versionCode = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
SPDX-License-Identifier: Apache-2.0
-->
<config>
<initial-package-state package="org.lineageos.aperture" stopped="false"/>
<initial-package-state package="com.android.camera2" stopped="false"/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: Apache-2.0
-->
<config>
<install-in-user-type package="org.lineageos.aperture">
<install-in-user-type package="com.android.camera2">
<install-in user-type="FULL" />
<install-in user-type="PROFILE" />
<do-not-install-in user-type="android.os.usertype.profile.CLONE" />
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<queries>
<package android:name="com.google.android.apps.googlecamera.fishfood" />
<package android:name="com.google.android.googlequicksearchbox" />
<package android:name="org.lineageos.aperture.auto_generated_rro_product__" />
<package android:name="org.lineageos.aperture.auto_generated_rro_vendor__" />
<package android:name="com.android.camera2.auto_generated_rro_product__" />
<package android:name="com.android.camera2.auto_generated_rro_vendor__" />
</queries>

<application
Expand Down Expand Up @@ -69,7 +69,7 @@
</activity>

<activity-alias
android:name=".CameraLauncher"
android:name="com.android.camera.CameraLauncher"
android:exported="true"
android:label="@string/app_name"
android:targetActivity=".CameraActivity">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class RROResources private constructor(val context: Context, private val package
companion object {
fun getAutoGeneratedRROResources(context: Context) =
listOf(
"org.lineageos.aperture.auto_generated_rro_product__",
"org.lineageos.aperture.auto_generated_rro_vendor__",
"com.android.camera2.auto_generated_rro_product__",
"com.android.camera2.auto_generated_rro_vendor__",
).mapNotNull {
runCatching {
RROResources(context, it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.lineageos.aperture.frameworksbaseoverlay"
package="com.android.camera2.frameworksbaseoverlay"
android:versionCode="1"
android:versionName="1.0">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Default component for QR code scanner -->
<string name="config_defaultQrCodeComponent" translatable="false">org.lineageos.aperture/.QrScannerActivity</string>
<string name="config_defaultQrCodeComponent" translatable="false">com.android.camera2/org.lineageos.aperture.QrScannerActivity</string>
</resources>

0 comments on commit b3fa5ab

Please sign in to comment.