Skip to content

Commit

Permalink
Adding a resource pointer to the app name so that derived projects can
Browse files Browse the repository at this point in the history
easily modify app name

Change-Id: I3f301e1b2ba38d0a45d220bb628dcfdf3906246c
  • Loading branch information
Sunny Goyal committed Aug 22, 2016
1 parent 8f90dcf commit 112ce42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest-common.xml
Expand Up @@ -50,7 +50,7 @@
android:fullBackupContent="@xml/backupscheme"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher_home"
android:label="@string/app_name"
android:label="@string/derived_app_name"
android:largeHeap="@bool/config_largeHeap"
android:restoreAnyVersion="true"
android:supportsRtl="true" >
Expand Down
4 changes: 4 additions & 0 deletions res/values/config.xml
Expand Up @@ -9,6 +9,10 @@
<bool name="is_large_tablet">false</bool>
<bool name="allow_rotation">false</bool>

<!-- A string pointer to the original app name string. This allows derived projects to
easily override the app name without providing all translations -->
<string name="derived_app_name" translatable="false">@string/app_name</string>

<!-- DragController -->
<item type="id" name="drag_event_parity" />

Expand Down
2 changes: 1 addition & 1 deletion src/com/android/launcher3/Launcher.java
Expand Up @@ -883,7 +883,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions,
} else {
// TODO: Show a snack bar with link to settings
Toast.makeText(this, getString(R.string.msg_no_phone_permission,
getString(R.string.app_name)), Toast.LENGTH_SHORT).show();
getString(R.string.derived_app_name)), Toast.LENGTH_SHORT).show();
}
}
if (mLauncherCallbacks != null) {
Expand Down

0 comments on commit 112ce42

Please sign in to comment.