Adding a resource pointer to the app name so that derived projects can

easily modify app name

Change-Id: I3f301e1b2ba38d0a45d220bb628dcfdf3906246c
This commit is contained in:
Sunny Goyal 2016-08-22 16:45:29 -07:00
parent 8f90dcff37
commit 112ce42926
3 changed files with 6 additions and 2 deletions

View File

@ -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" >

View File

@ -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" />

View File

@ -883,7 +883,7 @@ public class Launcher extends Activity
} 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) {