Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
launcher
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lihuaikun
launcher
Commits
e4b535bf
Commit
e4b535bf
authored
Jul 28, 2020
by
郑鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改权限判断位置
parent
52e58a56
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
67 additions
and
5 deletions
+67
-5
build.gradle
Launcher3/build.gradle
+1
-1
AndroidManifest.xml
Launcher3/src/main/AndroidManifest.xml
+1
-1
Launcher.java
Launcher3/src/main/java/com/android/launcher3/Launcher.java
+63
-1
ListenerAppService.java
...m/android/launcher3/accessibility/ListenerAppService.java
+1
-1
LauncherManager.java
...n/java/com/android/launcher3/manager/LauncherManager.java
+1
-1
ic_logo.png
Launcher3/src/main/res/mipmap-hdpi/ic_logo.png
+0
-0
logo.png
Launcher3/src/main/res/mipmap-hdpi/logo.png
+0
-0
ic_logo.png
Launcher3/src/main/res/mipmap-mdpi/ic_logo.png
+0
-0
logo.png
Launcher3/src/main/res/mipmap-mdpi/logo.png
+0
-0
ic_logo.png
Launcher3/src/main/res/mipmap-xhdpi/ic_logo.png
+0
-0
logo.png
Launcher3/src/main/res/mipmap-xhdpi/logo.png
+0
-0
ic_logo.png
Launcher3/src/main/res/mipmap-xxhdpi/ic_logo.png
+0
-0
logo.png
Launcher3/src/main/res/mipmap-xxhdpi/logo.png
+0
-0
No files found.
Launcher3/build.gradle
View file @
e4b535bf
...
...
@@ -103,7 +103,7 @@ ext {
GITHUB_REPO_PATH
=
"../../androidlibrary"
PUBLISH_GROUP_ID
=
'cn.dankal.android'
PUBLISH_ARTIFACT_ID
=
'launcher'
PUBLISH_VERSION
=
'1.4.4.
5
'
PUBLISH_VERSION
=
'1.4.4.
6
'
}
uploadArchives
{
...
...
Launcher3/src/main/AndroidManifest.xml
View file @
e4b535bf
...
...
@@ -76,7 +76,7 @@
android:taskAffinity=
""
android:windowSoftInputMode=
"adjustPan"
>
<intent-filter>
<!-- <category android:name="android.intent.category.HOME" />--
>
<category
android:name=
"android.intent.category.HOME"
/
>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.MONKEY"
/>
<category
android:name=
"android.intent.category.LAUNCHER_APP"
/>
...
...
Launcher3/src/main/java/com/android/launcher3/Launcher.java
View file @
e4b535bf
...
...
@@ -51,12 +51,14 @@ import android.content.Intent;
import
android.content.IntentFilter
;
import
android.content.IntentSender
;
import
android.content.SharedPreferences
;
import
android.content.pm.LauncherActivityInfo
;
import
android.content.pm.PackageManager
;
import
android.content.res.Configuration
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.Point
;
import
android.graphics.drawable.Drawable
;
import
android.net.Uri
;
import
android.os.AsyncTask
;
import
android.os.Build
;
...
...
@@ -111,14 +113,18 @@ import com.android.launcher3.allapps.AllAppsTransitionController;
import
com.android.launcher3.allapps.DiscoveryBounce
;
import
com.android.launcher3.badge.BadgeInfo
;
import
com.android.launcher3.compat.AppWidgetManagerCompat
;
import
com.android.launcher3.compat.LauncherAppsCompat
;
import
com.android.launcher3.compat.LauncherAppsCompatVO
;
import
com.android.launcher3.compat.ShortcutConfigActivityInfo
;
import
com.android.launcher3.config.FeatureFlags
;
import
com.android.launcher3.dialog.TipsDialog
;
import
com.android.launcher3.dragndrop.DragController
;
import
com.android.launcher3.dragndrop.DragLayer
;
import
com.android.launcher3.dragndrop.DragView
;
import
com.android.launcher3.dragndrop.FolderAdaptiveIcon
;
import
com.android.launcher3.folder.FolderIcon
;
import
com.android.launcher3.folder.FolderIconPreviewVerifier
;
import
com.android.launcher3.graphics.LauncherIcons
;
import
com.android.launcher3.keyboard.CustomActionsPopup
;
import
com.android.launcher3.keyboard.ViewGroupFocusHelper
;
import
com.android.launcher3.logging.FileLog
;
...
...
@@ -133,6 +139,8 @@ import com.android.launcher3.notification.NotificationListener;
import
com.android.launcher3.popup.PopupContainerWithArrow
;
import
com.android.launcher3.popup.PopupDataProvider
;
import
com.android.launcher3.shortcuts.DeepShortcutManager
;
import
com.android.launcher3.shortcuts.ShortcutInfoCompat
;
import
com.android.launcher3.shortcuts.ShortcutKey
;
import
com.android.launcher3.states.InternalStateHandler
;
import
com.android.launcher3.states.RotationHelper
;
import
com.android.launcher3.touch.ItemClickHandler
;
...
...
@@ -178,6 +186,7 @@ import com.android.launcher3.widget.custom.CustomWidgetParser;
import
java.io.FileDescriptor
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
...
...
@@ -2806,8 +2815,17 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
iconRes.packageName = shortcutInfo.intent.getComponent().getPackageName();
shortcutInfo.iconResource = iconRes;
shortcutInfo.intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconRes);*/
Bitmap
bitmap
=
BitmapFactory
.
decodeResource
(
getResources
(),
R
.
mipmap
.
ic_logo
);
/* LauncherAppState appState = LauncherAppState.getInstance(Launcher.this);
Object[] outObj = new Object[1];
final Drawable dr = getFullDrawable(bitmap, shortcutInfo, appState, outObj);
ShortcutInfoCompat si = (ShortcutInfoCompat) outObj[0];
shortcutInfo.contentDescription = shortcutInfo.title;
shortcutInfo
.
iconBitmap
=
BitmapFactory
.
decodeResource
(
getResources
(),
R
.
mipmap
.
logo
);
LauncherIcons li = LauncherIcons.obtain(appState.getContext());
Bitmap badge = li.getShortcutInfoBadge(si, appState.getIconCache()).iconBitmap;
li.recycle();*/
shortcutInfo
.
iconBitmap
=
bitmap
;
}
shortcutInfo
.
onAddToDatabase
(
writer
);
...
...
@@ -3110,4 +3128,48 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
void
onLauncherResume
();
}
/**
* Returns the full drawable for {@param info}.
*
* @param outObj this is set to the internal data associated with {@param info},
* eg {@link LauncherActivityInfo} or {@link ShortcutInfoCompat}.
*/
private
Drawable
getFullDrawable
(
Bitmap
bitmap
,
ItemInfo
info
,
LauncherAppState
appState
,
Object
[]
outObj
)
{
if
(
info
.
itemType
==
LauncherSettings
.
Favorites
.
ITEM_TYPE_APPLICATION
)
{
LauncherActivityInfo
activityInfo
=
LauncherAppsCompat
.
getInstance
(
this
)
.
resolveActivity
(
info
.
getIntent
(),
info
.
user
);
outObj
[
0
]
=
activityInfo
;
return
(
activityInfo
!=
null
)
?
appState
.
getIconCache
()
.
getFullResIcon
(
activityInfo
,
false
)
:
null
;
}
else
if
(
info
.
itemType
==
LauncherSettings
.
Favorites
.
ITEM_TYPE_DEEP_SHORTCUT
)
{
if
(
info
instanceof
PendingAddShortcutInfo
)
{
ShortcutConfigActivityInfo
activityInfo
=
((
PendingAddShortcutInfo
)
info
).
activityInfo
;
outObj
[
0
]
=
activityInfo
;
return
activityInfo
.
getFullResIcon
(
appState
.
getIconCache
());
}
ShortcutKey
key
=
ShortcutKey
.
fromItemInfo
(
info
);
DeepShortcutManager
sm
=
DeepShortcutManager
.
getInstance
(
this
);
List
<
ShortcutInfoCompat
>
si
=
sm
.
queryForFullDetails
(
key
.
componentName
.
getPackageName
(),
Arrays
.
asList
(
key
.
getId
()),
key
.
user
);
if
(
si
.
isEmpty
())
{
return
null
;
}
else
{
outObj
[
0
]
=
si
.
get
(
0
);
return
sm
.
getShortcutIconDrawable
(
si
.
get
(
0
),
appState
.
getInvariantDeviceProfile
().
fillResIconDpi
);
}
}
else
if
(
info
.
itemType
==
LauncherSettings
.
Favorites
.
ITEM_TYPE_FOLDER
)
{
FolderAdaptiveIcon
icon
=
FolderAdaptiveIcon
.
createFolderAdaptiveIcon
(
this
,
info
.
id
,
new
Point
(
bitmap
.
getWidth
(),
bitmap
.
getHeight
()));
if
(
icon
==
null
)
{
return
null
;
}
outObj
[
0
]
=
icon
;
return
icon
;
}
else
{
return
null
;
}
}
}
Launcher3/src/main/java/com/android/launcher3/accessibility/ListenerAppService.java
View file @
e4b535bf
...
...
@@ -470,7 +470,7 @@ public class ListenerAppService extends Service {
PendingIntent
pendingIntent
=
PendingIntent
.
getActivity
(
this
,
200
,
home
,
0
);
Notification
.
Builder
builder
=
new
Notification
.
Builder
(
this
)
.
setSmallIcon
(
R
.
mipmap
.
logo
)
.
setSmallIcon
(
R
.
mipmap
.
ic_
logo
)
.
setContentTitle
(
"“倍知守护孩子端”正在运行"
)
.
setContentText
(
"倍知守护孩子端管控中"
)
.
setContentIntent
(
pendingIntent
);
...
...
Launcher3/src/main/java/com/android/launcher3/manager/LauncherManager.java
View file @
e4b535bf
...
...
@@ -926,7 +926,7 @@ public class LauncherManager {
intent
.
setComponent
(
cn
);
Uri
uri
=
Uri
.
parse
(
"cn.dankal.bzshchild.ui.SplashActivity"
);
/*
ComponentName cn = new ComponentName("com.dankal.dankal_launcher", "com.dankal.dankal_launcher.PackageManageActivity");
/*
ComponentName cn = new ComponentName("com.dankal.dankal_launcher", "com.dankal.dankal_launcher.PackageManageActivity");
intent.setComponent(cn);
Uri uri = Uri.parse("com.dankal.dankal_launcher.PackageManageActivity");*/
...
...
Launcher3/src/main/res/mipmap-hdpi/ic_logo.png
0 → 100644
View file @
e4b535bf
10.2 KB
Launcher3/src/main/res/mipmap-hdpi/logo.png
deleted
100644 → 0
View file @
52e58a56
11.1 KB
Launcher3/src/main/res/mipmap-mdpi/ic_logo.png
0 → 100644
View file @
e4b535bf
5.36 KB
Launcher3/src/main/res/mipmap-mdpi/logo.png
deleted
100644 → 0
View file @
52e58a56
768 Bytes
Launcher3/src/main/res/mipmap-xhdpi/ic_logo.png
0 → 100644
View file @
e4b535bf
14.4 KB
Launcher3/src/main/res/mipmap-xhdpi/logo.png
deleted
100644 → 0
View file @
52e58a56
22 KB
Launcher3/src/main/res/mipmap-xxhdpi/ic_logo.png
0 → 100644
View file @
e4b535bf
27.7 KB
Launcher3/src/main/res/mipmap-xxhdpi/logo.png
deleted
100644 → 0
View file @
52e58a56
32.5 KB
Write
Preview
Markdown
is supported
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