Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
BlissLauncher
Commits
22944c81
Commit
22944c81
authored
May 04, 2022
by
Nishith Khanna
Browse files
Move all toast message to strings.xml so that they can be translated
parent
2af4201c
Pipeline
#183143
passed with stage
in 4 minutes and 14 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherPreferences.java
View file @
22944c81
...
...
@@ -250,7 +250,7 @@ public class WeatherPreferences extends PreferenceActivity implements
if
(
requestCode
==
203
)
{
LocationManager
lm
=
(
LocationManager
)
getSystemService
(
Context
.
LOCATION_SERVICE
);
if
(!
lm
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
))
{
Toast
.
makeText
(
this
,
"Set
custom
location
in weather wettings."
,
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_
custom
_
location
)
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
startService
(
new
Intent
(
this
,
WeatherUpdateService
.
class
)
...
...
app/src/main/java/foundation/e/blisslauncher/core/blur/BlurWallpaperProvider.kt
View file @
22944c81
...
...
@@ -14,6 +14,7 @@ import android.util.Log
import
android.view.WindowManager
import
android.widget.Toast
import
androidx.core.app.ActivityCompat
import
foundation.e.blisslauncher.R
import
foundation.e.blisslauncher.core.Utilities
import
foundation.e.blisslauncher.core.runOnMainThread
import
foundation.e.blisslauncher.core.safeForEach
...
...
@@ -124,7 +125,7 @@ class BlurWallpaperProvider(val context: Context) {
}
else
{
if
(
error
is
OutOfMemoryError
)
{
runOnMainThread
{
Toast
.
makeText
(
context
,
"F
ailed
"
,
Toast
.
LENGTH_LONG
).
show
()
Toast
.
makeText
(
context
,
context
.
getString
(
R
.
string
.
toast_f
ailed
)
,
Toast
.
LENGTH_LONG
).
show
()
notifyWallpaperChanged
()
}
}
...
...
app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java
View file @
22944c81
...
...
@@ -605,7 +605,7 @@ public class LauncherActivity extends AppCompatActivity implements
moveTo
=
-
1
;
updateOrAddShortcut
(
shortcutAddEvent
.
getShortcutItem
());
DatabaseManager
.
getManager
(
this
).
saveLayouts
(
pages
,
mDock
);
Toast
.
makeText
(
this
,
"Shortcut has been
added
"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_shortcut_
added
)
,
Toast
.
LENGTH_SHORT
).
show
();
if
(
moveTo
!=
-
1
)
{
mHorizontalPager
.
setCurrentPage
(
moveTo
);
moveTo
=
-
1
;
...
...
@@ -1069,7 +1069,7 @@ public class LauncherActivity extends AppCompatActivity implements
@Override
public
void
onError
(
Throwable
e
)
{
Toast
.
makeText
(
LauncherActivity
.
this
,
"R
ecreating
L
auncher
"
,
Toast
.
makeText
(
LauncherActivity
.
this
,
getString
(
R
.
string
.
toast_r
ecreating
_l
auncher
)
,
Toast
.
LENGTH_SHORT
).
show
();
e
.
printStackTrace
();
recreate
();
...
...
@@ -1556,7 +1556,7 @@ public class LauncherActivity extends AppCompatActivity implements
if
(
requestCode
==
REQUEST_LOCATION_SOURCE_SETTING
)
{
LocationManager
lm
=
(
LocationManager
)
getSystemService
(
Context
.
LOCATION_SERVICE
);
if
(!
lm
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
))
{
Toast
.
makeText
(
this
,
"Set
custom
location
in weather settings."
,
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_
custom
_
location
)
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
startService
(
new
Intent
(
this
,
WeatherUpdateService
.
class
)
...
...
@@ -1816,7 +1816,7 @@ public class LauncherActivity extends AppCompatActivity implements
}
else
{
ApplicationItem
applicationItem
=
(
ApplicationItem
)
launcherItem
;
if
(
applicationItem
.
isDisabled
)
{
Toast
.
makeText
(
this
,
"P
ackage
not
available
or disabled"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_p
ackage
_un
available
)
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
if
(
user
==
null
||
user
.
equals
(
Process
.
myUserHandle
()))
{
context
.
startActivity
(
intent
);
...
...
@@ -1993,7 +1993,7 @@ public class LauncherActivity extends AppCompatActivity implements
// System applications cannot be installed. For now, show a toast explaining
// that.
// We may give them the option of disabling apps this way.
Toast
.
makeText
(
this
,
"C
an
not
uninstall
this app"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_c
annot
_
uninstall
)
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
Uri
packageUri
=
Uri
.
fromParts
(
"package"
,
componentName
.
getPackageName
(),
componentName
.
getClassName
());
...
...
@@ -2181,7 +2181,7 @@ public class LauncherActivity extends AppCompatActivity implements
if
(
movingApp
.
getParent
()
==
null
)
{
if
(
mDock
.
getChildCount
()
>=
mDeviceProfile
.
numColumns
)
{
Toast
.
makeText
(
LauncherActivity
.
this
,
"Dock is already
full
"
,
getString
(
R
.
string
.
toast_dock_
full
)
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
addAppToDock
(
movingApp
,
EMPTY_LOCATION_DRAG
);
...
...
@@ -2477,7 +2477,7 @@ public class LauncherActivity extends AppCompatActivity implements
private
void
removeAppFromFolder
()
{
if
(
pages
.
get
(
getCurrentAppsPageNumber
()).
getChildCount
()
>=
mDeviceProfile
.
maxAppsPerPage
)
{
Toast
.
makeText
(
this
,
"No more room in page"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_no_room
)
,
Toast
.
LENGTH_SHORT
).
show
();
movingApp
.
setVisibility
(
View
.
VISIBLE
);
int
currentItem
=
mFolderAppsViewPager
.
getCurrentItem
();
makeAppWobble
(
movingApp
,
true
,
...
...
app/src/main/java/foundation/e/blisslauncher/features/widgets/WidgetPicker.java
View file @
22944c81
...
...
@@ -207,7 +207,7 @@ public class WidgetPicker extends Activity implements WidgetPickerAdapter.OnClic
if
(
resultCode
==
RESULT_OK
)
{
setResultData
(
RESULT_OK
,
null
);
}
else
{
Toast
.
makeText
(
this
,
"P
ermission
denied
"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
getString
(
R
.
string
.
toast_p
ermission
_
denied
)
,
Toast
.
LENGTH_SHORT
).
show
();
setResultData
(
RESULT_CANCELED
,
null
);
}
...
...
app/src/main/res/values/strings.xml
View file @
22944c81
...
...
@@ -177,4 +177,14 @@
<string
name=
"uninstall_shortcut_dialog"
>
Do you want to uninstall this shortcut?
</string>
<string
name=
"ok"
>
ok
</string>
<string
name=
"widget_is_not_resizable"
>
Widget is not resizable
</string>
<string
name=
"toast_permission_denied"
>
Permission denied
</string>
<string
name=
"toast_custom_location"
>
Set custom location in weather settings.
</string>
<string
name=
"toast_failed"
>
Failed
</string>
<string
name=
"toast_shortcut_added"
>
Shortcut has been added
</string>
<string
name=
"toast_recreating_launcher"
>
Recreating Launcher
</string>
<string
name=
"toast_package_unavailable"
>
Package not available or disabled
</string>
<string
name=
"toast_cannot_uninstall"
>
Can not uninstall this app
</string>
<string
name=
"toast_dock_full"
>
Dock is already full
</string>
<string
name=
"toast_no_room"
>
No more room in page
</string>
</resources>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment